|
|
@@ -2,7 +2,8 @@ package com.jzg.quotation.guoren.crawler.entity.request;
|
|
|
|
|
|
import com.alibaba.nacos.common.utils.CollectionUtils;
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
-import com.jzg.commons.entity.quote.vo.*;
|
|
|
+import com.jzg.commons.entity.quote.vo.KindInfoVo;
|
|
|
+import com.jzg.commons.entity.quote.vo.QuoteVo;
|
|
|
import com.jzg.commons.exception.SystemException;
|
|
|
import com.jzg.commons.util.StringUtils;
|
|
|
import com.jzg.quotation.commons.utils.TimeProcessing;
|
|
|
@@ -14,7 +15,7 @@ import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
-import java.util.*;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* @author wks
|
|
|
@@ -265,14 +266,22 @@ public class GuoRenCrawlerCalculationPremiumRequest {
|
|
|
private Integer shareSumLimitSign;
|
|
|
|
|
|
|
|
|
- public PrptitemkindListDTO(KindInfoVo kindInfoVo, GuoRenPrpTmainDTO prpTmain) {
|
|
|
- InsuranceItem insuranceItem = InsuranceMap.INSURANCE_MAP.get(kindInfoVo.getKindCode());
|
|
|
+ public PrptitemkindListDTO(KindInfoVo kindInfoVo, GuoRenPrpTmainDTO prpTmain, String newEnergyFlag) {
|
|
|
+ String kindCode = kindInfoVo.getKindCode();
|
|
|
+ // 新能源汽车:普通条款险种(20X)切换为新能源条款险种(21X)
|
|
|
+ if ("1".equals(newEnergyFlag) && kindCode.startsWith("20")) {
|
|
|
+ String newEnergyCode = "21" + kindCode.substring(2);
|
|
|
+ if (InsuranceMap.INSURANCE_MAP.containsKey(newEnergyCode)) {
|
|
|
+ kindCode = newEnergyCode;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ InsuranceItem insuranceItem = InsuranceMap.INSURANCE_MAP.get(kindCode);
|
|
|
if (ObjectUtils.isEmpty(insuranceItem)) {
|
|
|
throw new SystemException("未知险种");
|
|
|
}
|
|
|
this.checked = 1;
|
|
|
- this.kindCode = kindInfoVo.getKindCode();
|
|
|
- this.kindName = kindInfoVo.getKindName();
|
|
|
+ this.kindCode = kindCode;
|
|
|
+ this.kindName = kindCode.equals(kindInfoVo.getKindCode()) ? kindInfoVo.getKindName() : insuranceItem.getName();
|
|
|
this.itemKindNo = Integer.parseInt(insuranceItem.getItemKindNo());
|
|
|
this.shortRateFlag = "2";
|
|
|
this.shortRate = "100.0000";
|
|
|
@@ -359,8 +368,8 @@ public class GuoRenCrawlerCalculationPremiumRequest {
|
|
|
return List.of(prptitemkindListDTO);
|
|
|
}
|
|
|
|
|
|
- public static List<PrptitemkindListDTO> getBiPrptitemkindList(List<KindInfoVo> kindInfoVo, GuoRenPrpTmainDTO prpTmain) {
|
|
|
- return kindInfoVo.stream().map(x -> new PrptitemkindListDTO(x, prpTmain)).toList();
|
|
|
+ public static List<PrptitemkindListDTO> getBiPrptitemkindList(List<KindInfoVo> kindInfoVo, GuoRenPrpTmainDTO prpTmain, String newEnergyFlag) {
|
|
|
+ return kindInfoVo.stream().map(x -> new PrptitemkindListDTO(x, prpTmain, newEnergyFlag)).toList();
|
|
|
}
|
|
|
|
|
|
|