|
@@ -298,7 +298,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
//组装参数
|
|
//组装参数
|
|
|
Ruote m = Ruote.buildQuoteParam(yaQuoteInfoVo, ycConfigureParameters, apiComponents, adVo);
|
|
Ruote m = Ruote.buildQuoteParam(yaQuoteInfoVo, ycConfigureParameters, apiComponents, adVo);
|
|
|
//构造地区
|
|
//构造地区
|
|
|
- buildRegion(m);
|
|
|
|
|
|
|
+ buildRegion(m,yaQuoteInfoVo);
|
|
|
|
|
|
|
|
RuoteResponse rr = null;
|
|
RuoteResponse rr = null;
|
|
|
boolean boo = false;
|
|
boolean boo = false;
|
|
@@ -1731,50 +1731,109 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- private void buildRegion(Ruote m) {
|
|
|
|
|
|
|
+ private void buildRegion(Ruote m,BaseQuoteInfoVo yaQuoteInfoVo) {
|
|
|
//车主
|
|
//车主
|
|
|
- Vhlowner owner = m.getRequestLabel().getCondition().getVhlowner();
|
|
|
|
|
|
|
+ CustomerInfoVo owner = yaQuoteInfoVo.getOwnerInfo();
|
|
|
//被保人
|
|
//被保人
|
|
|
- Insured i = m.getRequestLabel().getCondition().getInsured();
|
|
|
|
|
|
|
+ CustomerInfoVo insured = yaQuoteInfoVo.getInsuredPersonInfo();
|
|
|
//投保人
|
|
//投保人
|
|
|
- Applicant a = m.getRequestLabel().getCondition().getApplicant();
|
|
|
|
|
|
|
+ CustomerInfoVo applicant = yaQuoteInfoVo.getPolicyHolderInfo();
|
|
|
|
|
|
|
|
|
|
+ String province = "";
|
|
|
|
|
+ String city = "";
|
|
|
|
|
+ String area = "";
|
|
|
|
|
|
|
|
- String provinceCode = "provinceCode";
|
|
|
|
|
- String cityCode = "cityCode";
|
|
|
|
|
- String areaCode = "areaCode";
|
|
|
|
|
-// owner.getCAreaCde()
|
|
|
|
|
|
|
|
|
|
- Map<String, String> ownerMap = gainRegionCode(owner.getCWaddress());
|
|
|
|
|
- if (null != ownerMap && ownerMap.size() > 0) {
|
|
|
|
|
- owner.setCProvince(ownerMap.get(provinceCode));
|
|
|
|
|
- owner.setCCity(ownerMap.get(cityCode));
|
|
|
|
|
- owner.setCCounty(ownerMap.get(areaCode));
|
|
|
|
|
- //清空格式化 自建数据
|
|
|
|
|
- owner.setCWaddress(null);
|
|
|
|
|
- } else {
|
|
|
|
|
- throw new SystemException("永诚 - 车主地区获取失败,请联系管理员");
|
|
|
|
|
|
|
+ if(null != owner){
|
|
|
|
|
+ InsAlltrustRegion insAlltrustRegion = findRegion(owner);
|
|
|
|
|
+ if(null != insAlltrustRegion){
|
|
|
|
|
+ m.getRequestLabel().getCondition().getVhlowner().setCProvince(insAlltrustRegion.getProvinceCode());
|
|
|
|
|
+ m.getRequestLabel().getCondition().getVhlowner().setCCity(insAlltrustRegion.getCityCode());
|
|
|
|
|
+ m.getRequestLabel().getCondition().getVhlowner().setCCounty(insAlltrustRegion.getAreaCode());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- Map<String, String> iMap = gainRegionCode(i.getCClntAddr());
|
|
|
|
|
- if (null != iMap && iMap.size() > 0) {
|
|
|
|
|
- i.setCProvince(iMap.get(provinceCode));
|
|
|
|
|
- i.setCCity(iMap.get(cityCode));
|
|
|
|
|
- i.setCCounty(iMap.get(areaCode));
|
|
|
|
|
- } else {
|
|
|
|
|
- throw new SystemException("永诚 - 被保人地区获取失败,请联系管理员");
|
|
|
|
|
|
|
+ if(null != insured){
|
|
|
|
|
+ InsAlltrustRegion insAlltrustRegion = findRegion(insured);
|
|
|
|
|
+ if(null != insAlltrustRegion){
|
|
|
|
|
+ m.getRequestLabel().getCondition().getInsured().setCProvince(insAlltrustRegion.getProvinceCode());
|
|
|
|
|
+ m.getRequestLabel().getCondition().getInsured().setCCity(insAlltrustRegion.getCityCode());
|
|
|
|
|
+ m.getRequestLabel().getCondition().getInsured().setCCounty(insAlltrustRegion.getAreaCode());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- Map<String, String> aMap = gainRegionCode(a.getCClntAddr());
|
|
|
|
|
- if (null != aMap && aMap.size() > 0) {
|
|
|
|
|
- a.setCProvince(aMap.get(provinceCode));
|
|
|
|
|
- a.setCCity(aMap.get(cityCode));
|
|
|
|
|
- a.setCCounty(aMap.get(areaCode));
|
|
|
|
|
- } else {
|
|
|
|
|
- throw new SystemException("永诚 - 投保人地区获取失败,请联系管理员");
|
|
|
|
|
|
|
+ if(null != applicant){
|
|
|
|
|
+ InsAlltrustRegion insAlltrustRegion = findRegion(applicant);
|
|
|
|
|
+ if(null != insAlltrustRegion){
|
|
|
|
|
+ m.getRequestLabel().getCondition().getApplicant().setCProvince(insAlltrustRegion.getProvinceCode());
|
|
|
|
|
+ m.getRequestLabel().getCondition().getApplicant().setCCity(insAlltrustRegion.getCityCode());
|
|
|
|
|
+ m.getRequestLabel().getCondition().getApplicant().setCCounty(insAlltrustRegion.getAreaCode());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private InsAlltrustRegion findRegion(CustomerInfoVo info){
|
|
|
|
|
+ String province = info.getProvince();
|
|
|
|
|
+ String city = info.getCity();
|
|
|
|
|
+ String area = info.getCounty();
|
|
|
|
|
+
|
|
|
|
|
+ LambdaQueryWrapper<InsAlltrustRegion> lqw = new LambdaQueryWrapper<>();
|
|
|
|
|
+ lqw.eq(StringUtils.isNotEmpty(province),InsAlltrustRegion::getProvince, province);
|
|
|
|
|
+ lqw.eq(StringUtils.isNotEmpty(city),InsAlltrustRegion::getCity, city);
|
|
|
|
|
+ lqw.eq(StringUtils.isNotEmpty(area),InsAlltrustRegion::getArea, area);
|
|
|
|
|
+ try {
|
|
|
|
|
+ return insAlltrustRegionMapper.selectOne(lqw);
|
|
|
|
|
+ }catch (Exception e){
|
|
|
|
|
+ throw new SystemException("永诚 - 省市县校验失败," + province + city + area);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// private void buildRegion(Ruote m) {
|
|
|
|
|
+// //车主
|
|
|
|
|
+// Vhlowner owner = m.getRequestLabel().getCondition().getVhlowner();
|
|
|
|
|
+// //被保人
|
|
|
|
|
+// Insured i = m.getRequestLabel().getCondition().getInsured();
|
|
|
|
|
+// //投保人
|
|
|
|
|
+// Applicant a = m.getRequestLabel().getCondition().getApplicant();
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+// String provinceCode = "provinceCode";
|
|
|
|
|
+// String cityCode = "cityCode";
|
|
|
|
|
+// String areaCode = "areaCode";
|
|
|
|
|
+//// owner.getCAreaCde()
|
|
|
|
|
+//
|
|
|
|
|
+// Map<String, String> ownerMap = gainRegionCode(owner.getCWaddress());
|
|
|
|
|
+// if (null != ownerMap && ownerMap.size() > 0) {
|
|
|
|
|
+// owner.setCProvince(ownerMap.get(provinceCode));
|
|
|
|
|
+// owner.setCCity(ownerMap.get(cityCode));
|
|
|
|
|
+// owner.setCCounty(ownerMap.get(areaCode));
|
|
|
|
|
+// //清空格式化 自建数据
|
|
|
|
|
+// owner.setCWaddress(null);
|
|
|
|
|
+// } else {
|
|
|
|
|
+// throw new SystemException("永诚 - 车主地区获取失败,请联系管理员");
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// Map<String, String> iMap = gainRegionCode(i.getCClntAddr());
|
|
|
|
|
+// if (null != iMap && iMap.size() > 0) {
|
|
|
|
|
+// i.setCProvince(iMap.get(provinceCode));
|
|
|
|
|
+// i.setCCity(iMap.get(cityCode));
|
|
|
|
|
+// i.setCCounty(iMap.get(areaCode));
|
|
|
|
|
+// } else {
|
|
|
|
|
+// throw new SystemException("永诚 - 被保人地区获取失败,请联系管理员");
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// Map<String, String> aMap = gainRegionCode(a.getCClntAddr());
|
|
|
|
|
+// if (null != aMap && aMap.size() > 0) {
|
|
|
|
|
+// a.setCProvince(aMap.get(provinceCode));
|
|
|
|
|
+// a.setCCity(aMap.get(cityCode));
|
|
|
|
|
+// a.setCCounty(aMap.get(areaCode));
|
|
|
|
|
+// } else {
|
|
|
|
|
+// throw new SystemException("永诚 - 投保人地区获取失败,请联系管理员");
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 构造回调
|
|
* 构造回调
|
|
|
* 依赖 buildCallBack
|
|
* 依赖 buildCallBack
|