Commit 7fbcce5a by 崔彦峰

feat(eval-order): 添加核价流程功能并优化报价历史管理

- 在EvalOrderDetailResDTO中新增maxRoundNo字段用于存储除客户报价外的最大报价轮次
- 启用EvalOrderManageRemote中的本地URL配置以支持服务调用
- 优化核价通过操作的日志记录,添加核价金额和意见信息
- 调整核价驳回逻辑,将状态从已报价改为已驳回并清除相关报价字段
- 修改报价历史记录逻辑,确保每次操作都递增轮次编号
- 更新报价历史查询逻辑,正确计算除客户报价外的最大轮次
- 在前端服务层实现报价历史数据筛选,仅显示最新轮次的评估师报价或核价通过记录
2 parents 2b1eb69d b6fc7580
...@@ -16,6 +16,7 @@ import com.gsc4cloud.gsc.vpc.api.req.web.evalorder.EvalOrderDetailRequest; ...@@ -16,6 +16,7 @@ import com.gsc4cloud.gsc.vpc.api.req.web.evalorder.EvalOrderDetailRequest;
import com.gsc4cloud.gsc.vpc.api.req.web.evalorder.EvalOrderImageExportRequest; import com.gsc4cloud.gsc.vpc.api.req.web.evalorder.EvalOrderImageExportRequest;
import com.gsc4cloud.gsc.vpc.api.req.web.evalorder.EvalOrderPriceHistoryRequest; import com.gsc4cloud.gsc.vpc.api.req.web.evalorder.EvalOrderPriceHistoryRequest;
import com.gsc4cloud.gsc.vpc.api.req.web.evalorder.EvalOrderQuoteRequest; import com.gsc4cloud.gsc.vpc.api.req.web.evalorder.EvalOrderQuoteRequest;
import com.gsc4cloud.gsc.vpc.api.enums.EvalPriceHistroyOptTypeEnum;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -107,7 +108,26 @@ public class EvalOrderManageService { ...@@ -107,7 +108,26 @@ public class EvalOrderManageService {
evalOrderDetailResDTO.setEvalPrice(evalOrderDTO.getEvalPrice()); evalOrderDetailResDTO.setEvalPrice(evalOrderDTO.getEvalPrice());
evalOrderDetailResDTO.setEvalOpinion(evalOrderDTO.getEvalOpinion()); evalOrderDetailResDTO.setEvalOpinion(evalOrderDTO.getEvalOpinion());
evalOrderDetailResDTO.setSource(evalOrderDTO.getSource()); evalOrderDetailResDTO.setSource(evalOrderDTO.getSource());
evalOrderDetailResDTO.setPriceHistoryListDTO(evalOrderDTO.getPriceHistoryListDTO()); List<EvalPriceHistoryDTO> priceHistoryListDTO = evalOrderDTO.getPriceHistoryListDTO();
//priceHistoryListDTO筛选出除客户报价类型以外的最大轮次
int maxRoundNo = 0;
if (priceHistoryListDTO != null && !priceHistoryListDTO.isEmpty()) {
maxRoundNo = priceHistoryListDTO.stream()
.filter(h -> !EvalPriceHistroyOptTypeEnum.CUSTOMER_QUOTE.getCode().equals(h.getOpType()))
.mapToInt(h -> h.getRoundNo() != null ? h.getRoundNo() : 0)
.max()
.orElse(0);
}
// 筛选出最大轮次中类型为评估师报价或核价通过的数据
final int finalMaxRoundNo = maxRoundNo;
List<EvalPriceHistoryDTO> filteredList = (priceHistoryListDTO != null)
? priceHistoryListDTO.stream()
.filter(h -> finalMaxRoundNo > 0 && finalMaxRoundNo == (h.getRoundNo() != null ? h.getRoundNo() : 0)
&& (EvalPriceHistroyOptTypeEnum.APPRAISER_QUOTE.getCode().equals(h.getOpType())
|| EvalPriceHistroyOptTypeEnum.CHECK_PRICE_APPROVE.getCode().equals(h.getOpType())))
.collect(Collectors.toList())
: Collections.emptyList();
evalOrderDetailResDTO.setPriceHistoryListDTO(filteredList);
} }
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!