|
|
@@ -34,29 +34,25 @@ public class GuoRenApiQuoteResultsVoBuild {
|
|
|
quoteResultsVo.setQuoteStatusEnum(InsOrderStatusEnum.WAIT_AUDIT);
|
|
|
|
|
|
// 交强保费 车船税 商业保费
|
|
|
- buildPremium(quoteResultsVo, premiumResponse,nonAutoInsOrderResponse);
|
|
|
+ buildPremium(quoteResultsVo, premiumResponse, nonAutoInsOrderResponse);
|
|
|
|
|
|
QuoteResultsVo.ScoreVo scoreVo = new QuoteResultsVo.ScoreVo();
|
|
|
scoreVo.setLossRation(premiumResponse.getData().getAutoPriceOutputXOMRespVo().getBillELR());
|
|
|
scoreVo.setJqLossRation(premiumResponse.getData().getAutoPriceOutputXOMRespVo().getBillCTPELR());
|
|
|
scoreVo.setSyLossRation(premiumResponse.getData().getAutoPriceOutputXOMRespVo().getBillCOMELR());
|
|
|
- scoreVo.setCiClaims(premiumResponse.getData().getCiInsureDemandDTOS().get(0).getClaimTimes());
|
|
|
- scoreVo.setBiClaims(premiumResponse.getData().getCiInsureDemandDTOS().get(0).getClaimTimes());
|
|
|
+ if (premiumResponse.getData().getCiInsureDemandDTOS() != null && premiumResponse.getData().getCiInsureDemandDTOS().size() > 0) {
|
|
|
+ scoreVo.setCiClaims(premiumResponse.getData().getCiInsureDemandDTOS().get(0).getClaimTimes());
|
|
|
+ scoreVo.setBiClaims(premiumResponse.getData().getCiInsureDemandDTOS().get(0).getClaimTimes());
|
|
|
+ }
|
|
|
scoreVo.setTotalAdjustRate(premiumResponse.getData().getSignDiscount());
|
|
|
|
|
|
// 保司评分
|
|
|
JSONArray scoreJson = new JSONArray();
|
|
|
//光博评分
|
|
|
- scoreJson.add(new JSONObject()
|
|
|
- .fluentPut("scoreName", "交强光博分")
|
|
|
- .fluentPut("scoreKey", "score")
|
|
|
- .fluentPut("score", premiumResponse.getData().getCirate().getBillcomeGroup()));
|
|
|
+ scoreJson.add(new JSONObject().fluentPut("scoreName", "交强光博分").fluentPut("scoreKey", "score").fluentPut("score", premiumResponse.getData().getCirate().getBillcomeGroup()));
|
|
|
|
|
|
if (premiumResponse.getData().getBirate() != null) {
|
|
|
- scoreJson.add(new JSONObject()
|
|
|
- .fluentPut("scoreName", "商业光博分")
|
|
|
- .fluentPut("scoreKey", "score")
|
|
|
- .fluentPut("score", premiumResponse.getData().getBirate().getBillcomeGroup()));
|
|
|
+ scoreJson.add(new JSONObject().fluentPut("scoreName", "商业光博分").fluentPut("scoreKey", "score").fluentPut("score", premiumResponse.getData().getBirate().getBillcomeGroup()));
|
|
|
}
|
|
|
|
|
|
scoreVo.setScoreJson(scoreJson);
|
|
|
@@ -67,6 +63,7 @@ public class GuoRenApiQuoteResultsVoBuild {
|
|
|
|
|
|
/**
|
|
|
* 处理商业险数据
|
|
|
+ *
|
|
|
* @param premiumResponse
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -81,6 +78,7 @@ public class GuoRenApiQuoteResultsVoBuild {
|
|
|
|
|
|
/**
|
|
|
* 处理交强险数据
|
|
|
+ *
|
|
|
* @param premiumResponse
|
|
|
* @return riskInfoVo
|
|
|
*/
|
|
|
@@ -95,13 +93,13 @@ public class GuoRenApiQuoteResultsVoBuild {
|
|
|
|
|
|
/**
|
|
|
* 处理商业险信息
|
|
|
+ *
|
|
|
* @param kindInfoVo
|
|
|
* @param itemVOListDTOS
|
|
|
* @return
|
|
|
*/
|
|
|
private static List<KindInfoVo> buildKindInfoVo(List<KindInfoVo> kindInfoVo, List<PremiumResponse.DataDTO.ItemVOListDTO> itemVOListDTOS) {
|
|
|
- Map<String, PremiumResponse.DataDTO.ItemVOListDTO> collect = itemVOListDTOS.stream()
|
|
|
- .collect(Collectors.toMap(PremiumResponse.DataDTO.ItemVOListDTO::getKindCode, x -> x));
|
|
|
+ Map<String, PremiumResponse.DataDTO.ItemVOListDTO> collect = itemVOListDTOS.stream().collect(Collectors.toMap(PremiumResponse.DataDTO.ItemVOListDTO::getKindCode, x -> x));
|
|
|
kindInfoVo.forEach(kind -> {
|
|
|
PremiumResponse.DataDTO.ItemVOListDTO itemVOListDTO = collect.get(kind.getKindCode());
|
|
|
if (itemVOListDTO.getKindCode().equals(kind.getKindCode())) {
|
|
|
@@ -116,6 +114,7 @@ public class GuoRenApiQuoteResultsVoBuild {
|
|
|
|
|
|
/**
|
|
|
* 设置商业险,交强险保费
|
|
|
+ *
|
|
|
* @param quoteResultsVo
|
|
|
* @param premiumResponse
|
|
|
*/
|