Преглед изворни кода

fix 恒邦报价单预览不显示三者险和附加医保险保费问题

liub пре 1 месец
родитељ
комит
2e622b2bcf

+ 51 - 0
tenant/insurance/quotation-dadi/src/main/java/com/jzg/quotation/dadi/crawler/build/DaDiCrawlerQuoteResultVoBuild.java

@@ -1,5 +1,7 @@
 package com.jzg.quotation.dadi.crawler.build;
 
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.jzg.commons.constants.dict.InsOrderStatusEnum;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.entity.quote.vo.RiskInfoVo;
@@ -60,6 +62,55 @@ public class DaDiCrawlerQuoteResultVoBuild {
 
         //设置保费,车船税,投保单号,折旧价
         buildParams(daDiQuoteResponse, quoteResultsVo, vehiclePricResponse);
+
+        // 保司评分数据(用于规则引擎匹配)
+        QuoteResultsVo.ScoreVo scoreVo = new QuoteResultsVo.ScoreVo();
+        JSONArray scoreJson = new JSONArray();
+        // 上年保费
+        if (daDiQuoteResponse.getLastPremium() != null) {
+            scoreJson.add(new JSONObject()
+                    .fluentPut("scoreName", "上年保费")
+                    .fluentPut("scoreKey", "lastPremium")
+                    .fluentPut("score", daDiQuoteResponse.getLastPremium()));
+        }
+        // 智能评分
+        if (daDiQuoteResponse.getSmartscore() != null) {
+            scoreJson.add(new JSONObject()
+                    .fluentPut("scoreName", "智能评分")
+                    .fluentPut("scoreKey", "smartscore")
+                    .fluentPut("score", daDiQuoteResponse.getSmartscore()));
+        }
+        // 商业险折扣率
+        if (daDiQuoteResponse.getCdiscountrate() != null) {
+            scoreJson.add(new JSONObject()
+                    .fluentPut("scoreName", "商业险折扣率")
+                    .fluentPut("scoreKey", "cdiscountrate")
+                    .fluentPut("score", daDiQuoteResponse.getCdiscountrate()));
+        }
+        // cbit评分
+        if (daDiQuoteResponse.getCbitScore() != null) {
+            scoreJson.add(new JSONObject()
+                    .fluentPut("scoreName", "cbit评分")
+                    .fluentPut("scoreKey", "cbitScore")
+                    .fluentPut("score", daDiQuoteResponse.getCbitScore()));
+        }
+        // 中银车评分
+        if (daDiQuoteResponse.getCcicVehicleScore() != null) {
+            scoreJson.add(new JSONObject()
+                    .fluentPut("scoreName", "中银车评分")
+                    .fluentPut("scoreKey", "ccicVehicleScore")
+                    .fluentPut("score", daDiQuoteResponse.getCcicVehicleScore()));
+        }
+        // 车信评分
+        if (daDiQuoteResponse.getXcarscore() != null) {
+            scoreJson.add(new JSONObject()
+                    .fluentPut("scoreName", "车信评分")
+                    .fluentPut("scoreKey", "xcarscore")
+                    .fluentPut("score", daDiQuoteResponse.getXcarscore()));
+        }
+        scoreVo.setScoreJson(scoreJson);
+        quoteResultsVo.setScoreVo(scoreVo);
+
         return quoteResultsVo;
     }
 

+ 1 - 1
tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/build/HbCrawlerQuoteResultVoBuild.java

@@ -159,7 +159,7 @@ public final class HbCrawlerQuoteResultVoBuild {
             kindInfoVo.setUnitAmount(carInsureLiabilityDTO.getUnitAmount());
             kindInfoVo.setQuantity(String.valueOf(carInsureLiabilityDTO.getQuantity()));
             kindInfoVo.setDeductibleRate(carInsureLiabilityDTO.getLiabrate());
-            kindInfoVo.setPlatformKindCode(kindInfoVo.getKindCode());
+            kindInfoVo.setPlatformKindCode(kindInfoVo.getPlatformKindCode());
         });
         return kindInfoVoList;
     }