Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

wanghao 3 mēneši atpakaļ
vecāks
revīzija
2316cccd9c

+ 44 - 4
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerCalculatePremiumApplyMessage.java

@@ -172,6 +172,45 @@ public class AnShengCrawlerCalculatePremiumApplyMessage {
          *
 
 
+         public PolicyCoveragesDTO(KindInfoVo kind) {
+         this.dutyCode = kind.getKindCode();
+         this.dutyChineseName = kind.getKindName();
+         this.insuredAmount = (StringUtils.equals(kind.getKindCode(),"STORRS") || StringUtils.equals(kind.getKindCode(),"NESTORR")) ? "" : kind.getUnitAmount() ;
+         this.equipmentInsureAmount = "";
+         this.premiumRate = "";
+         this.deductibleDiscount = "";
+         this.totalActualPremium = "";
+         this.deductionRate = "0";
+         this.serviceNum = StringUtils.isNotEmpty(kind.getServiceTimes()) ? kind.getServiceTimes() : "";
+         this.isTelpeson = (StringUtils.equals(kind.getKindCode(),"STORRS") || StringUtils.equals(kind.getKindCode(),"NESTORR")) ? "1" : "";
+         this.telPhone = "";
+         this.mileage = "";
+         this.setMeal = "";
+         this.fireMultiple = "";
+         this.allAmount = "";
+         this.riskPremum = "";
+         this.seats = kind.getQuantity();
+         this.deductible = "";
+         this.totalStandardPremium = 0;
+         this.addedValueTax = 0;
+         this.totalAgreePremium = 0;
+         this.totalNetPremium = 0;
+         this.newEquipmentList = new ArrayList<>();
+         this.chargingPostDataList = new ArrayList<>();
+         this.fullYearPremium = "";
+         this.dieAmount = "";
+         this.medicalAmount = "";
+         this.propertyAmount = "";
+         this.noFaultDieAmount = "";
+         this.noFaultMedicalAmount = "";
+         this.noFaultPropertyAmount = "";
+         this.basePremium = "";
+         }
+         }
+
+
+
+
          PolicyCoveragesDTO dto = new PolicyCoveragesDTO();
          dto.setDutyCode(StringUtils.equals("0",energyTypeCode) ? "STORRS" : "NESTORR");
          dto.setDutyChineseName(StringUtils.equals("0",energyTypeCode) ? "道路救援服务特约条款" : "道路救援服务特约条款(新能源车)");
@@ -1544,16 +1583,17 @@ public class AnShengCrawlerCalculatePremiumApplyMessage {
             private String basePremium;
 
             public PolicyCoveragesDTO(KindInfoVo kind) {
+                boolean b = StringUtils.equals(kind.getKindCode(), "STORRS") || StringUtils.equals(kind.getKindCode(), "NESTORR");
                 this.dutyCode = kind.getKindCode();
                 this.dutyChineseName = kind.getKindName();
-                this.insuredAmount = kind.getUnitAmount();
+                this.insuredAmount = b ? "0" : kind.getUnitAmount();
                 this.equipmentInsureAmount = "";
                 this.premiumRate = "";
                 this.deductibleDiscount = "";
                 this.totalActualPremium = "";
-                this.deductionRate = "";
-                this.serviceNum = "";
-                this.isTelpeson = "";
+                this.deductionRate = "0";
+                this.serviceNum = b ? kind.getServiceTimes() : "";
+                this.isTelpeson = b ? "1" : "";
                 this.telPhone = "";
                 this.mileage = "";
                 this.setMeal = "";

+ 1 - 1
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/build/TkCrawlerQuoteResultsBuild.java

@@ -184,7 +184,7 @@ public class TkCrawlerQuoteResultsBuild {
         Map<String, TKCiKindsVo> collect = ciKindsVo.stream().collect(Collectors.toMap(TKCiKindsVo::getKindCode, x -> x));
         kindInfoVo.forEach(kind -> {
             TKCiKindsVo itemKindListDTO = collect.get(kind.getKindCode());
-            if (Objects.nonNull(itemKindListDTO) && itemKindListDTO.getKindCode().equals(kind.getPlatformKindCode())) {
+            if (Objects.nonNull(itemKindListDTO)) {
                 kind.setPremium(itemKindListDTO.getPremium() + "");
             }
         });

+ 4 - 5
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/TKSimpleService.java

@@ -1024,7 +1024,6 @@ public class TKSimpleService {
                     tkCiKindVo.setBjSelect("0");
                     tkCiKindVo.setDeductibleAmount(BigDecimal.ZERO);
                     tkCiKindVo.setIsSelect("0");
-                    tkCiKindVo.setQuantity(0);
                     tkCiKindVo.setQuoteAmountCN("不投保");
                 })
                 .collect(Collectors.toMap(TKCiKindsVo::getKindCode, Function.identity()));
@@ -1040,13 +1039,13 @@ public class TKSimpleService {
                     tkCiKindVo.setQuoteAmount(commonBiKindInfoVo.getAmount());
                     tkCiKindVo.setQuoteAmountCN(commonBiKindInfoVo.getAmount());
 
-                    // 设置数量:优先使用 quantity,其次使用 serviceTimes
+                    if (StringUtils.isNotBlank(commonBiKindInfoVo.getUnitAmount())) {
+                        tkCiKindVo.setUnitAmount(new BigDecimal(commonBiKindInfoVo.getUnitAmount()));
+                        tkCiKindVo.setUnitAmountCN(commonBiKindInfoVo.getUnitAmount());
+                    }
                     String quantity = commonBiKindInfoVo.getQuantity();
-                    String serviceTimes = commonBiKindInfoVo.getServiceTimes();
                     if (StringUtils.isNotBlank(quantity)) {
                         tkCiKindVo.setQuantity(Integer.parseInt(quantity));
-                    } else if (StringUtils.isNotBlank(serviceTimes)) {
-                        tkCiKindVo.setQuantity(Integer.parseInt(serviceTimes));
                     }
                 });