|
|
@@ -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;
|
|
|
}
|
|
|
|