|
|
@@ -15,7 +15,9 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|
|
|
|
|
import java.io.Serial;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @description: 众安保险 报价 请求参数
|
|
|
@@ -107,21 +109,36 @@ public class ZhongAnCrawlerQuoteRequest{
|
|
|
}
|
|
|
this.coverageInfo = JSONObject.toJSONString(coverageInfoDTOS);
|
|
|
List<NonAutoInfoDto> nonAutoInfoDtos = new ArrayList<>();
|
|
|
+ Map<String, String> codeConvertMap = new HashMap<>();
|
|
|
+ codeConvertMap.put("-1", "1");
|
|
|
+ codeConvertMap.put("-2", "2");
|
|
|
+ codeConvertMap.put("-3", "3");
|
|
|
+ codeConvertMap.put("-4", "4");
|
|
|
+ codeConvertMap.put("-5", "5");
|
|
|
+ codeConvertMap.put("-6", "6");
|
|
|
// 驾意险
|
|
|
if (quoteVo.getAccidentalDrivings() != null && quoteVo.getAccidentalDrivings().size() > 0) {
|
|
|
-
|
|
|
quoteVo.getAccidentalDrivings().forEach(accidentalDriving -> {
|
|
|
+ String code = accidentalDriving.getProductCode();
|
|
|
+ if (codeConvertMap.containsKey(code)) {
|
|
|
+ accidentalDriving.setProductCode(codeConvertMap.get(code));
|
|
|
+ }
|
|
|
NonAutoInfoDto nonAutoInfoDto = new NonAutoInfoDto(accidentalDriving.getParentProductCode(), "1", accidentalDriving.getProductCode());
|
|
|
nonAutoInfoDtos.add(nonAutoInfoDto);
|
|
|
});
|
|
|
- this.nonAutoInfo = JSONObject.toJSONString(nonAutoInfoDtos);
|
|
|
+ boolean hasKpNhjcb = nonAutoInfoDtos.stream()
|
|
|
+ .anyMatch(dto -> "kp_nhjcb_v1".equals(dto.getProductCode()));
|
|
|
+ if (!hasKpNhjcb) {
|
|
|
+ NonAutoInfoDto jtywxV24 = new NonAutoInfoDto("kp_nhjcb_v1", "0", null);
|
|
|
+ nonAutoInfoDtos.add(jtywxV24);
|
|
|
+ }
|
|
|
} else {
|
|
|
- NonAutoInfoDto jtywxV24 = new NonAutoInfoDto("kp_jtywx_v24", "0", null);
|
|
|
- NonAutoInfoDto wjsGabV6 = new NonAutoInfoDto("wjs_gab_v6", "0", null);
|
|
|
+ NonAutoInfoDto jtywxV24 = new NonAutoInfoDto("kp_nhjcb_v1", "0", null);
|
|
|
+ NonAutoInfoDto wjsGabV6 = new NonAutoInfoDto("wjs_gab_v10", "0", null);
|
|
|
nonAutoInfoDtos.add(jtywxV24);
|
|
|
nonAutoInfoDtos.add(wjsGabV6);
|
|
|
- this.nonAutoInfo = JSONObject.toJSONString(nonAutoInfoDtos);
|
|
|
}
|
|
|
+ this.nonAutoInfo = JSONObject.toJSONString(nonAutoInfoDtos);
|
|
|
}
|
|
|
|
|
|
/**
|