فهرست منبع

Merge remote-tracking branch 'origin/master'

wanghao 2 ماه پیش
والد
کامیت
4b2b06dc7c

+ 4 - 2
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/build/AnShengCrawlerQuoteResultsVoBuild.java

@@ -65,7 +65,9 @@ public final class AnShengCrawlerQuoteResultsVoBuild {
                 quoteResultsVo.setBiRiskInfoVo(buildBiRiskInfoVo(contract.getPolicyBase()));
                 buildRiskInfoVo(quoteVo.getBiRiskInfoVo(), contract.getPolicyBase());
                 // 商业险信息
-                buildKindInfo(quoteResultsVo.getKindInfoVo(), contract.getPolicyCoverages());
+                List<KindInfoVo> kindInfoVo = quoteVo.getKindInfoVo();
+                buildKindInfo(kindInfoVo, contract.getPolicyCoverages());
+                quoteResultsVo.setKindInfoVo(kindInfoVo);
             }
         });
         QuoteResultsVo.CostsVo costs = quoteResultsVo.getCosts();
@@ -175,7 +177,7 @@ public final class AnShengCrawlerQuoteResultsVoBuild {
                 kindInfoVo,
                 coverage,
                 AnShengCrawlerCalculatePremiumApplyResponse.DataDTO.ContractsDTO.PolicyCoveragesDTO::getDutyCode,
-                AnShengCrawlerCalculatePremiumApplyResponse.DataDTO.ContractsDTO.PolicyCoveragesDTO::getTotalStandardPremium
+                AnShengCrawlerCalculatePremiumApplyResponse.DataDTO.ContractsDTO.PolicyCoveragesDTO::getTotalAgreePremium
         );
     }
 

+ 2 - 2
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/build/DaJiaCrawlerQuoteResultsVoBuild.java

@@ -188,7 +188,7 @@ public final class DaJiaCrawlerQuoteResultsVoBuild {
         JSONArray scoreArray = new JSONArray();
         scoreArray.add(new JSONObject()
                 .fluentPut("scoreName","交强类型评分")
-                .fluentPut("scoreKey","pubScores")
+                .fluentPut("scoreKey","jqPubScores")
                 .fluentPut("score",compulsoryInsurance.getCoefficientInfo().getPubScores()));
         scoreArray.add(new JSONObject()
                 .fluentPut("scoreName","违章评分")
@@ -229,7 +229,7 @@ public final class DaJiaCrawlerQuoteResultsVoBuild {
             scoreVo.setScoreJson(scoreArray);
             scoreArray.add(new JSONObject()
                     .fluentPut("scoreName","商业类型评分")
-                    .fluentPut("scoreKey","pubScores")
+                    .fluentPut("scoreKey","syPubScores")
                     .fluentPut("score",coefficientInfo1.getPubScores()));
             scoreVo.setScoreJson(scoreArray);
          }

+ 7 - 7
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/build/TaiShanCrawlerQuoteResultsVoBuild.java

@@ -92,34 +92,34 @@ public class TaiShanCrawlerQuoteResultsVoBuild {
             scoreJson.add(new JSONObject()
                     .fluentPut("scoreName","泰山分")
                     .fluentPut("scoreKey","ctsScore")
-                    .fluentPut("ctsScore", riskResponse.getResult().getCtsScore()));
+                    .fluentPut("score", riskResponse.getResult().getCtsScore()));
 
             scoreJson.add(new JSONObject()
                     .fluentPut("scoreName","续保客户价值分类")
                     .fluentPut("scoreKey","renewalClass")
-                    .fluentPut("renewalClass", riskResponse.getResult().getRenewalClass()));
+                    .fluentPut("score", riskResponse.getResult().getRenewalClass()));
 
             scoreJson.add(new JSONObject()
                     .fluentPut("scoreName","整单预期赔付率(GQ)")
                     .fluentPut("scoreKey","exRatio")
-                    .fluentPut("exRatio", riskResponse.getResult().getExRatio()));
+                    .fluentPut("score", riskResponse.getResult().getExRatio()));
             scoreJson.add(new JSONObject()
                     .fluentPut("scoreName","风险评级(G)")
                     .fluentPut("scoreKey","pvalue")
-                    .fluentPut("pvalue", riskResponse.getResult().getPvalue()));
+                    .fluentPut("score", riskResponse.getResult().getPvalue()));
 
             scoreJson.add(new JSONObject()
                     .fluentPut("scoreName","平台评分")
                     .fluentPut("scoreKey","ptScore")
-                    .fluentPut("ptScore", riskResponse.getResult().getPtScore()));
+                    .fluentPut("score", riskResponse.getResult().getPtScore()));
             scoreJson.add(new JSONObject()
                     .fluentPut("scoreName","商业综合评分")
                     .fluentPut("scoreKey","comPoints")
-                    .fluentPut("comPoints", riskResponse.getResult().getComPoints()));
+                    .fluentPut("score", riskResponse.getResult().getComPoints()));
             scoreJson.add(new JSONObject()
                     .fluentPut("scoreName","整体精算折扣")
                     .fluentPut("scoreKey","entireActuaryDiscount")
-                    .fluentPut("entireActuaryDiscount", riskResponse.getResult().getEntireActuaryDiscount()));
+                    .fluentPut("score", riskResponse.getResult().getEntireActuaryDiscount()));
         }
 
         quoteResultsVo.getScoreVo().setScoreJson(scoreJson);

+ 7 - 18
tenant/insurance/quotation-yangguang/src/main/java/com/jzg/quotation/yangguang/api/build/YangGuangApiQuoteResultsVoBuild.java

@@ -8,6 +8,7 @@ import com.jzg.commons.entity.quote.vo.RiskInfoVo;
 import com.jzg.commons.constants.quote.enums.quote.KindCode;
 import com.jzg.commons.entity.quote.vo.aggregated.QuoteResultsVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
+import com.jzg.quotation.commons.constant.enums.quote.RenewalEnum;
 import com.jzg.quotation.yangguang.api.entity.response.YangGuangAccuracyCalculateResponse;
 
 import java.math.BigDecimal;
@@ -185,28 +186,16 @@ public final class YangGuangApiQuoteResultsVoBuild {
 
         if (yangGuangAccuracyCalculateResponse.getNewAndRenewalFlagCI() != null) {
             switch (yangGuangAccuracyCalculateResponse.getNewAndRenewalFlagCI()) {
-                case "1":
-                case "3":
-                    scoreVo.setJqRenewal("0");
-                    break;
-                case "2":
-                case "4":
-                case "5":
-                    scoreVo.setJqRenewal("1");
-                    break;
+                case "1" -> scoreVo.setJqRenewal(String.valueOf(RenewalEnum.New.getCode()));
+                case "2", "4", "5" -> scoreVo.setJqRenewal(String.valueOf(RenewalEnum.Renewal.getCode()));
+                case "3" -> scoreVo.setJqRenewal(String.valueOf(RenewalEnum.Transfer.getCode()));
             }
         }
         if (yangGuangAccuracyCalculateResponse.getNewAndRenewalFlagBI() != null) {
             switch (yangGuangAccuracyCalculateResponse.getNewAndRenewalFlagBI()) {
-                case "1":
-                case "3":
-                    scoreVo.setSyRenewal("0");
-                    break;
-                case "2":
-                case "4":
-                case "5":
-                    scoreVo.setSyRenewal("1");
-                    break;
+                case "1" -> scoreVo.setSyRenewal(String.valueOf(RenewalEnum.New.getCode()));
+                case "2", "4", "5" -> scoreVo.setSyRenewal(String.valueOf(RenewalEnum.Renewal.getCode()));
+                case "3" -> scoreVo.setSyRenewal(String.valueOf(RenewalEnum.Transfer.getCode()));
             }
         }
         return scoreVo;

+ 11 - 2
tenant/insurance/quotation-zhongan/src/main/java/com/jzg/quotation/zhongan/crawler/build/ZhongAnCrawlerQuoteResultsVoBuild.java

@@ -9,6 +9,7 @@ import com.jzg.commons.entity.quote.vo.RiskInfoVo;
 import com.jzg.commons.entity.quote.vo.aggregated.QuoteResultsVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.entity.quote.vo.base.OrderBase;
+import com.jzg.quotation.commons.constant.enums.quote.RenewalEnum;
 import com.jzg.quotation.zhongan.crawler.entity.response.ZhongAnCrawlerQuoteResponse;
 import com.jzg.quotation.zhongan.crawler.entity.response.ZhongAnCrawlerUploadInitDateResponse;
 
@@ -98,8 +99,16 @@ public class ZhongAnCrawlerQuoteResultsVoBuild {
         QuoteResultsVo.ScoreVo scoreVo = new QuoteResultsVo.ScoreVo();
         scoreVo.setJqAdjustRate(dataDTO.getCompelDiscount());
         scoreVo.setSyAdjustRate(dataDTO.getBusinessDiscount());
-        scoreVo.setJqRenewal("ZA".equals(dataDTO.getForceRenewalFlag()) ? "1" : "0");
-        scoreVo.setSyRenewal("ZA".equals(dataDTO.getBizRenewalFlag()) ? "1" : "0");
+        switch (dataDTO.getForceRenewalFlag()) {
+            case "PA": scoreVo.setJqRenewal(String.valueOf(RenewalEnum.Transfer.getCode()));
+            case "ZA": scoreVo.setJqRenewal(String.valueOf(RenewalEnum.Renewal.getCode()));
+            default: scoreVo.setJqRenewal(String.valueOf(RenewalEnum.New.getCode()));
+        }
+        switch (dataDTO.getBizRenewalFlag()) {
+            case "PA": scoreVo.setSyRenewal(String.valueOf(RenewalEnum.Transfer.getCode()));
+            case "ZA": scoreVo.setSyRenewal(String.valueOf(RenewalEnum.Renewal.getCode()));
+            default: scoreVo.setSyRenewal(String.valueOf(RenewalEnum.New.getCode()));
+        }
         JSONArray scoreJson = new JSONArray();
         scoreJson.add(new JSONObject()
                 .fluentPut("scoreName", "评分")