|
|
@@ -12,6 +12,7 @@ import com.ydtech.components.InsAlltrustRequestApiComponents;
|
|
|
import com.ydtech.constants.InsTaskHistoryEnum;
|
|
|
import com.ydtech.constants.SysConstants;
|
|
|
import com.ydtech.constants.enums.InsQuoteFlow;
|
|
|
+import com.ydtech.constants.enums.InsuranceRisk;
|
|
|
import com.ydtech.constants.enums.dict.AttachInsureEnum;
|
|
|
import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
|
|
|
import com.ydtech.constants.enums.dict.WhetherEnum;
|
|
|
@@ -26,6 +27,7 @@ import com.ydtech.modules.esm.service.*;
|
|
|
import com.ydtech.modules.ins.dao.InsAlltrustRegionMapper;
|
|
|
import com.ydtech.modules.ins.model.InsApiLog;
|
|
|
import com.ydtech.modules.ins.model.InsOrder;
|
|
|
+import com.ydtech.modules.ins.model.dto.CarInsPolicyDto;
|
|
|
import com.ydtech.modules.ins.model.vo.CarInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
|
|
|
import com.ydtech.modules.ins.model.vo.QuoteRespVo;
|
|
|
@@ -315,6 +317,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
String textHead = "==========永诚API方式 - 车架号:" + carInfo.getVinNo() + " - 报价 ";
|
|
|
while (!boo) {
|
|
|
rr = requestApi(m, new RuoteResponse(), iac, YcBuildData.API_QUOTE, InsQuoteFlow.Q_S_0, textHead);
|
|
|
+ if (rr.getHead().getErrorCode().equals("009999")) return HttpResult.error(rr.getHead().getErrorMessage());
|
|
|
//处理返回信息
|
|
|
//1、交强险重复投保处理
|
|
|
boo = ciRepetitionInsure(rr, m);
|
|
|
@@ -351,6 +354,18 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
}
|
|
|
if (null == rr) return HttpResult.error("远程请求报价失败");
|
|
|
+ StringBuffer sb = new StringBuffer();
|
|
|
+ if (rr.getHead().getErrorCode().equals("E0001") && rr.getHead().getErrorMessage().equals("车主省市县码值不符合规范"))
|
|
|
+ sb.append("|永诚 - 保司 - 车主地区自动解析失败");
|
|
|
+// throw new SystemException("车主地区自动解析失败");
|
|
|
+ if (rr.getHead().getErrorCode().equals("E0001") && rr.getHead().getErrorMessage().equals("投保人省市县码值不符合规范"))
|
|
|
+ sb.append("|永诚 - 保司 - 投保人地区自动解析失败");
|
|
|
+// throw new SystemException("投保人地区自动解析失败");
|
|
|
+ if (rr.getHead().getErrorCode().equals("E0001") && rr.getHead().getErrorMessage().equals("被保人省市县码值不符合规范"))
|
|
|
+ sb.append("|永诚 - 保司 - 被保人地区自动解析失败");
|
|
|
+// throw new SystemException("被保人地区自动解析失败");
|
|
|
+ if (StringUtils.isNotEmpty(sb)) throw new SystemException(sb.toString());
|
|
|
+
|
|
|
if (!rr.getHead().getErrorCode().equals("000000")) return HttpResult.error(rr.getHead().getErrorMessage());
|
|
|
|
|
|
QuoteRespVo quoteRespVo = YcBuildData.buildQuoteRespVo(order, rr, yaQuoteInfoVo);
|
|
|
@@ -573,17 +588,23 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
//组装参数
|
|
|
Audit m = Audit.buildAuditParam(ownerInfo, insureInfo, applyInfo, ycConfigureParameters, iac);
|
|
|
|
|
|
+ List<String> insureProvinceData = insureInfo.getProvinceData();
|
|
|
+
|
|
|
//构造被保人地区
|
|
|
- Map<String, String> insureMap = gainRegionCode(insureInfo.getAddr());
|
|
|
- m.getRequestLabel().getCondition().getCustomer().setCProvince(insureMap.get("provinceCode"));
|
|
|
- m.getRequestLabel().getCondition().getCustomer().setCCity(insureMap.get("cityCode"));
|
|
|
- m.getRequestLabel().getCondition().getCustomer().setCCounty(insureMap.get("areaCode"));
|
|
|
+ m.getRequestLabel().getCondition().getCustomer().setCProvince(insureProvinceData.get(0));
|
|
|
+ m.getRequestLabel().getCondition().getCustomer().setCCity(insureProvinceData.get(1));
|
|
|
+ m.getRequestLabel().getCondition().getCustomer().setCCounty(insureProvinceData.get(2));
|
|
|
+// //构造被保人地区
|
|
|
+// Map<String, String> insureMap = gainRegionCode(insureInfo.getAddr());
|
|
|
+// m.getRequestLabel().getCondition().getCustomer().setCProvince(insureMap.get("provinceCode"));
|
|
|
+// m.getRequestLabel().getCondition().getCustomer().setCCity(insureMap.get("cityCode"));
|
|
|
+// m.getRequestLabel().getCondition().getCustomer().setCCounty(insureMap.get("areaCode"));
|
|
|
|
|
|
|
|
|
// findRegion()
|
|
|
|
|
|
//接口请求
|
|
|
- String responseData = httpPostResultLog(xmlMapper, m, YcBuildData.API_AUDIT, "永诚API方式 - 核保 - ");
|
|
|
+ String responseData = httpPostResultLog(gainXmlMapper(), m, YcBuildData.API_AUDIT, "永诚API方式 - 核保 - ");
|
|
|
|
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseData);
|
|
|
AuditResponse rd = xmlMapper.readValue(cleanStr, AuditResponse.class);
|
|
|
@@ -632,7 +653,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
}
|
|
|
log.info(logNo + "车牌号:" + order.getLicenseno() + ",永诚核保未获取缴费地址,状态为:" + InsOrderStatusEnum.matchKey(iac.getOrderstatus()).getDesc());
|
|
|
insAreaCompanyService.updateById(iac);
|
|
|
- insOrdersService.updateByOrderStatus(order.getOrderno(), order.getOrderstatus());
|
|
|
+ insOrdersService.updateById(order);
|
|
|
|
|
|
return HttpResult.ok("核保操作成功");
|
|
|
|
|
|
@@ -839,14 +860,14 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
AssertionUtils.isEmpty(iac, "报价订单不存在");
|
|
|
InsOrders order = insOrdersService.getById(iac.getOrderno());
|
|
|
|
|
|
- try {
|
|
|
- String ip = InetAddress.getLocalHost().getHostAddress();
|
|
|
- log.debug("------------------------------");
|
|
|
- log.debug("----测试服务器IP----" + ip);
|
|
|
- log.debug("------------------------------");
|
|
|
- } catch (UnknownHostException e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
- }
|
|
|
+ String ip = IPUtil.gainServerNo();
|
|
|
+ log.debug("------------------------------");
|
|
|
+ log.debug("----测试服务器IP----" + ip);
|
|
|
+ log.debug("------------------------------");
|
|
|
+
|
|
|
+ String jqbz = "-交强险标志.pdf";
|
|
|
+ String jqbd = "-交强险保单.pdf";
|
|
|
+ String sybd = "-商业险保单.pdf";
|
|
|
|
|
|
|
|
|
String licensePlate = order.getLicenseno();
|
|
|
@@ -854,14 +875,47 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
Map m = new HashMap();
|
|
|
|
|
|
- String jqFlagUrl = gainExistCarInsPolicy(licensePlate + "-交强险标志.pdf", licensePlate);
|
|
|
- String jqUrl = gainExistCarInsPolicy(licensePlate + "-交强险保单.pdf", licensePlate);
|
|
|
- String syUrl = gainExistCarInsPolicy(licensePlate + "-商业险保单.pdf", licensePlate);
|
|
|
- if (StringUtils.isNotEmpty(jqFlagUrl) || StringUtils.isNotEmpty(jqUrl) || StringUtils.isNotEmpty(syUrl)) {
|
|
|
- m.put("jqFlagUrl", jqFlagUrl);
|
|
|
- m.put("jqUrl", jqUrl);
|
|
|
- m.put("syUrl", syUrl);
|
|
|
- return HttpResult.ok(m);
|
|
|
+
|
|
|
+ CarInsPolicyDto cipDto = new CarInsPolicyDto();
|
|
|
+
|
|
|
+ String insFlag = "dj";
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(iac.getJqapplyno()) && StringUtils.isNotEmpty(iac.getSyapplyno()))
|
|
|
+ insFlag = "js";
|
|
|
+ if (StringUtils.isEmpty(iac.getJqapplyno()) && StringUtils.isNotEmpty(iac.getSyapplyno())) insFlag = "ds";
|
|
|
+
|
|
|
+
|
|
|
+ //单交
|
|
|
+ if (insFlag.equals("dj")) {
|
|
|
+ String jqFlagUrl = gainExistCarInsPolicy(licensePlate + jqbz, licensePlate);
|
|
|
+ String jqUrl = gainExistCarInsPolicy(licensePlate + jqbd, licensePlate);
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(jqFlagUrl) && StringUtils.isNotEmpty(jqUrl)) {
|
|
|
+ cipDto.setJqFlagUrl(jqFlagUrl);
|
|
|
+ cipDto.setJqUrl(jqUrl);
|
|
|
+ return HttpResult.ok(cipDto);
|
|
|
+ }
|
|
|
+
|
|
|
+ } else if (insFlag.equals("ds")) {//单商
|
|
|
+ String syUrl = gainExistCarInsPolicy(licensePlate + sybd, licensePlate);
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(syUrl)) {
|
|
|
+ cipDto.setSyUrl(syUrl);
|
|
|
+ return HttpResult.ok(cipDto);
|
|
|
+ }
|
|
|
+ } else if (insFlag.equals("js")) {//交商业
|
|
|
+
|
|
|
+ String syUrl = gainExistCarInsPolicy(licensePlate + sybd, licensePlate);
|
|
|
+ String jqFlagUrl = gainExistCarInsPolicy(licensePlate + jqbz, licensePlate);
|
|
|
+ String jqUrl = gainExistCarInsPolicy(licensePlate + jqbd, licensePlate);
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(jqFlagUrl) && StringUtils.isNotEmpty(jqUrl) && StringUtils.isNotEmpty(syUrl)) {
|
|
|
+ cipDto.setJqFlagUrl(jqFlagUrl);
|
|
|
+ cipDto.setJqUrl(jqUrl);
|
|
|
+ cipDto.setSyUrl(syUrl);
|
|
|
+ return HttpResult.ok(cipDto);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -886,28 +940,26 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
//标志
|
|
|
if (StringUtils.isNotEmpty(pResp.getPolicyBZUrl())) {
|
|
|
String bzInsUrl = pResp.getPolicyBZUrl().replaceAll(";pkid", "&pkid");
|
|
|
- jqFlagUrl = gainCarInsPolicy(bzInsUrl, licensePlate + "-交强险标志.pdf", licensePlate);
|
|
|
+ String jqFlagUrl = gainCarInsPolicy(bzInsUrl, licensePlate + jqbz, licensePlate);
|
|
|
+ cipDto.setJqFlagUrl(jqFlagUrl);
|
|
|
}
|
|
|
//交强
|
|
|
if (StringUtils.isNotEmpty(pResp.getJqpolicyUrl())) {
|
|
|
String jqInsUrl = pResp.getJqpolicyUrl().replaceAll(";pkid", "&pkid");
|
|
|
- jqUrl = gainCarInsPolicy(jqInsUrl, licensePlate + "-交强险保单.pdf", licensePlate);
|
|
|
+ String jqUrl = gainCarInsPolicy(jqInsUrl, licensePlate + jqbd, licensePlate);
|
|
|
+ cipDto.setJqUrl(jqUrl);
|
|
|
|
|
|
}
|
|
|
|
|
|
//商业
|
|
|
if (StringUtils.isNotEmpty(pResp.getSypolicyUrl())) {
|
|
|
String syInsUrl = pResp.getSypolicyUrl().replaceAll(";pkid", "&pkid");
|
|
|
- syUrl = gainCarInsPolicy(syInsUrl, licensePlate + "-商业险保单.pdf", licensePlate);
|
|
|
+ String syUrl = gainCarInsPolicy(syInsUrl, licensePlate + sybd, licensePlate);
|
|
|
+ cipDto.setSyUrl(syUrl);
|
|
|
|
|
|
}
|
|
|
|
|
|
- m.put("jqFlagUrl", jqFlagUrl);
|
|
|
- m.put("jqUrl", jqUrl);
|
|
|
- m.put("syUrl", syUrl);
|
|
|
-
|
|
|
-
|
|
|
- return HttpResult.ok(pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusDescription(), m);
|
|
|
+ return HttpResult.ok(pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusDescription(), cipDto);
|
|
|
|
|
|
} else {
|
|
|
return HttpResult.error(pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusDescription());
|
|
|
@@ -1738,11 +1790,90 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
rMap.put("areaCode", areaList.get(0).getAreaCode());
|
|
|
return rMap;
|
|
|
}
|
|
|
- throw new SystemException("永诚(日志号:" + IPUtil.gainServerNo() + ") - 被保人地区解析失败,请联系管理员,地址:" + address);
|
|
|
+ throw new SystemException("永诚(日志号:" + IPUtil.gainServerNo() + ") - 被保人地区自动解析失败,请手动填写。");
|
|
|
// return null;
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 新的
|
|
|
+ *
|
|
|
+ * @author: lig
|
|
|
+ * @date: 2023年10月12日 0012
|
|
|
+ */
|
|
|
+ public Map<String, String> gainRegionCode(String address, String type) {
|
|
|
+
|
|
|
+ log.debug("*********永诚API方式 - 身份证地址解析 参数:" + address);
|
|
|
+ Map rMap = new HashMap();
|
|
|
+
|
|
|
+
|
|
|
+// if (address.indexOf("湖北省仙桃市") == 0) {
|
|
|
+// rMap.put("provinceCode", "420000");
|
|
|
+// rMap.put("cityCode", "429004");
|
|
|
+// rMap.put("areaCode", "");
|
|
|
+// return rMap;
|
|
|
+// }
|
|
|
+
|
|
|
+// if (address.contains("邢台县")) {
|
|
|
+// address.replaceAll("邢台县", "信都区");
|
|
|
+// }
|
|
|
+ if (address.contains("旬阳县")) {
|
|
|
+ address.replaceAll("旬阳县", "旬阳市");
|
|
|
+ }
|
|
|
+ if (address.contains("开县")) {
|
|
|
+ address.replaceAll("开县", "开州区");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ Map<String, String> m = IDCardUtils.addressResolution(address);
|
|
|
+ if (null == m) return null;
|
|
|
+ String city = m.get("city");
|
|
|
+ String district = m.get("district");
|
|
|
+// if(StringUtils.isNullOrEmpty(district)){
|
|
|
+// //第二级赋值到第三级
|
|
|
+// district = city;
|
|
|
+// }
|
|
|
+
|
|
|
+ List<InsAlltrustRegion> areaList = new ArrayList<>();
|
|
|
+ if (StringUtils.isNotEmpty(district)) {
|
|
|
+ //查询地区
|
|
|
+ LambdaQueryWrapper<InsAlltrustRegion> lqw = new LambdaQueryWrapper<>();
|
|
|
+ lqw.eq(InsAlltrustRegion::getArea, district);
|
|
|
+ areaList = insAlltrustRegionMapper.selectList(lqw);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //如果地区查不到 用城市当地区查
|
|
|
+ if (null == areaList || areaList.size() < 1) {
|
|
|
+ LambdaQueryWrapper<InsAlltrustRegion> cityLqw = new LambdaQueryWrapper<>();
|
|
|
+ cityLqw.eq(InsAlltrustRegion::getArea, city);
|
|
|
+ areaList = insAlltrustRegionMapper.selectList(cityLqw);
|
|
|
+ }
|
|
|
+ //如果地区查不到 用城市当地区查
|
|
|
+ if (null == areaList || areaList.size() < 1) {
|
|
|
+ LambdaQueryWrapper<InsAlltrustRegion> cityLqw = new LambdaQueryWrapper<>();
|
|
|
+ cityLqw.eq(InsAlltrustRegion::getArea, city);
|
|
|
+ areaList = insAlltrustRegionMapper.selectList(cityLqw);
|
|
|
+ }
|
|
|
+ //如果地区查不到 查市
|
|
|
+ if (null == areaList || areaList.size() < 1) {
|
|
|
+ LambdaQueryWrapper<InsAlltrustRegion> cityLqw = new LambdaQueryWrapper<>();
|
|
|
+ cityLqw.eq(InsAlltrustRegion::getCity, city);
|
|
|
+ areaList = insAlltrustRegionMapper.selectList(cityLqw);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (null != areaList && areaList.size() > 0) {
|
|
|
+ rMap.put("provinceCode", areaList.get(0).getProvinceCode());
|
|
|
+ rMap.put("cityCode", areaList.get(0).getCityCode());
|
|
|
+ rMap.put("areaCode", areaList.get(0).getAreaCode());
|
|
|
+ return rMap;
|
|
|
+ }
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
private void buildRegion(Ruote m, BaseQuoteInfoVo yaQuoteInfoVo) {
|
|
|
//车主
|
|
|
CustomerInfoVo owner = yaQuoteInfoVo.getOwnerInfo();
|
|
|
@@ -1751,93 +1882,164 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
//投保人
|
|
|
CustomerInfoVo applicant = yaQuoteInfoVo.getPolicyHolderInfo();
|
|
|
|
|
|
- String province = "";
|
|
|
- String city = "";
|
|
|
- String area = "";
|
|
|
|
|
|
+ Map<String, String> ownerMap = null;
|
|
|
+ //被保人省市区
|
|
|
+ Map<String, String> insureMap = null;
|
|
|
+ Map<String, String> applicantMap = null;
|
|
|
|
|
|
- if (null != owner) {
|
|
|
- //处理地区 车主
|
|
|
- Map<String, String> ownerMap = gainRegionCode(owner.getAddr());
|
|
|
- m.getRequestLabel().getCondition().getVhlowner().setCProvince(ownerMap.get("provinceCode"));
|
|
|
- m.getRequestLabel().getCondition().getVhlowner().setCCity(ownerMap.get("cityCode"));
|
|
|
- m.getRequestLabel().getCondition().getVhlowner().setCCounty(ownerMap.get("areaCode"));
|
|
|
+ //车主省市区
|
|
|
+ List<String> ownerProvinceData = owner.getProvinceData();
|
|
|
+ //被保人省市区
|
|
|
+ List<String> insuredProvinceData = insured.getProvinceData();
|
|
|
+ //投保人 省市区
|
|
|
+ List<String> applicantProvinceData = applicant.getProvinceData();
|
|
|
+
|
|
|
+ if (CollUtil.isNotEmpty(ownerProvinceData) && CollUtil.isNotEmpty(insuredProvinceData) && CollUtil.isNotEmpty(applicantProvinceData)) {
|
|
|
+ yaQuoteInfoVo.getOwnerInfo().setProvinceData(ownerProvinceData);
|
|
|
+ m.getRequestLabel().getCondition().getVhlowner().setCProvince(ownerProvinceData.get(0));
|
|
|
+ m.getRequestLabel().getCondition().getVhlowner().setCCity(ownerProvinceData.get(1));
|
|
|
+ m.getRequestLabel().getCondition().getVhlowner().setCCounty(ownerProvinceData.get(2));
|
|
|
+
|
|
|
+
|
|
|
+ yaQuoteInfoVo.getInsuredPersonInfo().setProvinceData(insuredProvinceData);
|
|
|
+ m.getRequestLabel().getCondition().getInsured().setCProvince(insuredProvinceData.get(0));
|
|
|
+ m.getRequestLabel().getCondition().getInsured().setCCity(insuredProvinceData.get(1));
|
|
|
+ m.getRequestLabel().getCondition().getInsured().setCCounty(insuredProvinceData.get(2));
|
|
|
+
|
|
|
+
|
|
|
+ yaQuoteInfoVo.getPolicyHolderInfo().setProvinceData(applicantProvinceData);
|
|
|
+ m.getRequestLabel().getCondition().getApplicant().setCProvince(applicantProvinceData.get(0));
|
|
|
+ m.getRequestLabel().getCondition().getApplicant().setCCity(applicantProvinceData.get(1));
|
|
|
+ m.getRequestLabel().getCondition().getApplicant().setCCounty(applicantProvinceData.get(2));
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
-// InsAlltrustRegion ownerRegion = findRegion(owner);
|
|
|
-// if (null != ownerRegion) {
|
|
|
-// m.getRequestLabel().getCondition().getVhlowner().setCProvince(ownerRegion.getProvinceCode());
|
|
|
-// m.getRequestLabel().getCondition().getVhlowner().setCCity(ownerRegion.getCityCode());
|
|
|
-// m.getRequestLabel().getCondition().getVhlowner().setCCounty(ownerRegion.getAreaCode());
|
|
|
+ if (null != owner && CollUtil.isEmpty(ownerProvinceData)) {
|
|
|
+
|
|
|
+ ownerProvinceData = new ArrayList<>();
|
|
|
+ //处理地区 车主
|
|
|
+ ownerMap = gainRegionCode(owner.getAddr(), "车主");
|
|
|
+// if(CollUtil.isNotEmpty(ownerMap)){
|
|
|
+// m.getRequestLabel().getCondition().getVhlowner().setCProvince(ownerMap.get("provinceCode"));
|
|
|
+// m.getRequestLabel().getCondition().getVhlowner().setCCity(ownerMap.get("cityCode"));
|
|
|
+// m.getRequestLabel().getCondition().getVhlowner().setCCounty(ownerMap.get("areaCode"));
|
|
|
// }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- if (null != insured) {
|
|
|
+ if (null != insured && CollUtil.isEmpty(insuredProvinceData)) {
|
|
|
+
|
|
|
+ insuredProvinceData = new ArrayList<>();
|
|
|
//处理地区 被保人
|
|
|
- Map<String, String> insureMap = gainRegionCode(insured.getAddr());
|
|
|
- m.getRequestLabel().getCondition().getInsured().setCProvince(insureMap.get("provinceCode"));
|
|
|
- m.getRequestLabel().getCondition().getInsured().setCCity(insureMap.get("cityCode"));
|
|
|
- m.getRequestLabel().getCondition().getInsured().setCCounty(insureMap.get("areaCode"));
|
|
|
+ insureMap = gainRegionCode(insured.getAddr(), "被保人");
|
|
|
+// if(CollUtil.isNotEmpty(insureMap)){
|
|
|
+// m.getRequestLabel().getCondition().getInsured().setCProvince(insureMap.get("provinceCode"));
|
|
|
+// m.getRequestLabel().getCondition().getInsured().setCCity(insureMap.get("cityCode"));
|
|
|
+// m.getRequestLabel().getCondition().getInsured().setCCounty(insureMap.get("areaCode"));
|
|
|
+// }
|
|
|
|
|
|
|
|
|
-// InsAlltrustRegion insuredRegion = findRegion(insured);
|
|
|
-// if (null != insuredRegion) {
|
|
|
-// m.getRequestLabel().getCondition().getInsured().setCProvince(insuredRegion.getProvinceCode());
|
|
|
-// m.getRequestLabel().getCondition().getInsured().setCCity(insuredRegion.getCityCode());
|
|
|
-// m.getRequestLabel().getCondition().getInsured().setCCounty(insuredRegion.getAreaCode());
|
|
|
-// }
|
|
|
}
|
|
|
|
|
|
- if (null != applicant) {
|
|
|
+ if (null != applicant && CollUtil.isEmpty(applicantProvinceData)) {
|
|
|
+
|
|
|
+ applicantProvinceData = new ArrayList<>();
|
|
|
//处理地区 投保人
|
|
|
- Map<String, String> applicantMap = gainRegionCode(applicant.getAddr());
|
|
|
- m.getRequestLabel().getCondition().getApplicant().setCProvince(applicantMap.get("provinceCode"));
|
|
|
- m.getRequestLabel().getCondition().getApplicant().setCCity(applicantMap.get("cityCode"));
|
|
|
- m.getRequestLabel().getCondition().getApplicant().setCCounty(applicantMap.get("areaCode"));
|
|
|
+ applicantMap = gainRegionCode(applicant.getAddr(), "投保人");
|
|
|
+// if(CollUtil.isNotEmpty(applicantMap)){
|
|
|
+// m.getRequestLabel().getCondition().getApplicant().setCProvince(applicantMap.get("provinceCode"));
|
|
|
+// m.getRequestLabel().getCondition().getApplicant().setCCity(applicantMap.get("cityCode"));
|
|
|
+// m.getRequestLabel().getCondition().getApplicant().setCCounty(applicantMap.get("areaCode"));
|
|
|
+// }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
-// InsAlltrustRegion applicantRegion = findRegion(applicant);
|
|
|
-// if (null != applicantRegion) {
|
|
|
-// m.getRequestLabel().getCondition().getApplicant().setCProvince(applicantRegion.getProvinceCode());
|
|
|
-// m.getRequestLabel().getCondition().getApplicant().setCCity(applicantRegion.getCityCode());
|
|
|
-// m.getRequestLabel().getCondition().getApplicant().setCCounty(applicantRegion.getAreaCode());
|
|
|
-// }
|
|
|
+ StringBuffer sb = new StringBuffer();
|
|
|
+ if (null == ownerMap && CollUtil.isEmpty(ownerProvinceData)) {
|
|
|
+ sb.append("|永诚 - 车主地区自动解析失败,请手动填写。");
|
|
|
+ }
|
|
|
+ if (null == insureMap && CollUtil.isEmpty(insuredProvinceData)) {
|
|
|
+ sb.append("|永诚 - 被保人地区自动解析失败,请手动填写。");
|
|
|
+ }
|
|
|
+ if (null == applicantMap && CollUtil.isEmpty(applicantProvinceData)) {
|
|
|
+ sb.append("|永诚 - 投保人地区自动解析失败,请手动填写。");
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(sb)) throw new SystemException(sb.toString());
|
|
|
|
|
|
- private InsAlltrustRegion findRegion(CustomerInfoVo info) {
|
|
|
- String province = info.getProvince();
|
|
|
- String city = info.getCity();
|
|
|
- String area = info.getCounty();
|
|
|
+ if (CollUtil.isNotEmpty(ownerMap)) {
|
|
|
+ m.getRequestLabel().getCondition().getVhlowner().setCProvince(ownerMap.get("provinceCode"));
|
|
|
+ m.getRequestLabel().getCondition().getVhlowner().setCCity(ownerMap.get("cityCode"));
|
|
|
+ m.getRequestLabel().getCondition().getVhlowner().setCCounty(ownerMap.get("areaCode"));
|
|
|
+ ownerProvinceData.add(ownerMap.get("provinceCode"));
|
|
|
+ ownerProvinceData.add(ownerMap.get("cityCode"));
|
|
|
+ ownerProvinceData.add(ownerMap.get("areaCode"));
|
|
|
|
|
|
- //lig 2023-09-21 临时解决 页面解决后可删除。
|
|
|
- if (StringUtils.isEmpty(province) && StringUtils.isEmpty(city) && StringUtils.isEmpty(area)) {
|
|
|
- throw new SystemException("永诚报价需要录入省市县");
|
|
|
}
|
|
|
|
|
|
- if (info.getAddr().indexOf("湖北省仙桃市") == 0) {
|
|
|
- InsAlltrustRegion r = new InsAlltrustRegion();
|
|
|
- r.setProvinceCode("420000");
|
|
|
- r.setProvince("湖北省");
|
|
|
- r.setCityCode("429004");
|
|
|
- r.setCity("仙桃市");
|
|
|
- r.setArea("");
|
|
|
- r.setAreaCode("");
|
|
|
- return r;
|
|
|
+ if (CollUtil.isNotEmpty(insureMap)) {
|
|
|
+ m.getRequestLabel().getCondition().getInsured().setCProvince(insureMap.get("provinceCode"));
|
|
|
+ m.getRequestLabel().getCondition().getInsured().setCCity(insureMap.get("cityCode"));
|
|
|
+ m.getRequestLabel().getCondition().getInsured().setCCounty(insureMap.get("areaCode"));
|
|
|
+ insuredProvinceData.add(insureMap.get("provinceCode"));
|
|
|
+ insuredProvinceData.add(insureMap.get("cityCode"));
|
|
|
+ insuredProvinceData.add(insureMap.get("areaCode"));
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- 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);
|
|
|
+
|
|
|
+ if (CollUtil.isNotEmpty(applicantMap)) {
|
|
|
+ m.getRequestLabel().getCondition().getApplicant().setCProvince(applicantMap.get("provinceCode"));
|
|
|
+ m.getRequestLabel().getCondition().getApplicant().setCCity(applicantMap.get("cityCode"));
|
|
|
+ m.getRequestLabel().getCondition().getApplicant().setCCounty(applicantMap.get("areaCode"));
|
|
|
+ applicantProvinceData.add(applicantMap.get("provinceCode"));
|
|
|
+ applicantProvinceData.add(applicantMap.get("cityCode"));
|
|
|
+ applicantProvinceData.add(applicantMap.get("areaCode"));
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ yaQuoteInfoVo.getOwnerInfo().setProvinceData(ownerProvinceData);
|
|
|
+ yaQuoteInfoVo.getInsuredPersonInfo().setProvinceData(insuredProvinceData);
|
|
|
+ yaQuoteInfoVo.getPolicyHolderInfo().setProvinceData(applicantProvinceData);
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+// private InsAlltrustRegion findRegion(CustomerInfoVo info) {
|
|
|
+// String province = info.getProvince();
|
|
|
+// String city = info.getCity();
|
|
|
+// String area = info.getCounty();
|
|
|
+//
|
|
|
+// //lig 2023-09-21 临时解决 页面解决后可删除。
|
|
|
+// if (StringUtils.isEmpty(province) && StringUtils.isEmpty(city) && StringUtils.isEmpty(area)) {
|
|
|
+// throw new SystemException("永诚报价需要录入省市县");
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (info.getAddr().indexOf("湖北省仙桃市") == 0) {
|
|
|
+// InsAlltrustRegion r = new InsAlltrustRegion();
|
|
|
+// r.setProvinceCode("420000");
|
|
|
+// r.setProvince("湖北省");
|
|
|
+// r.setCityCode("429004");
|
|
|
+// r.setCity("仙桃市");
|
|
|
+// r.setArea("");
|
|
|
+// r.setAreaCode("");
|
|
|
+// return r;
|
|
|
+// }
|
|
|
+//
|
|
|
+// 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) {
|
|
|
// //车主
|
|
|
@@ -2061,9 +2263,9 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
}
|
|
|
}
|
|
|
//订单状态 已核保待缴费 不处理
|
|
|
- // if (order.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode())) {
|
|
|
- // order.setOrderstatus(iac.getOrderstatus());
|
|
|
- // }
|
|
|
+ // if (order.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode())) {
|
|
|
+ // order.setOrderstatus(iac.getOrderstatus());
|
|
|
+ // }
|
|
|
|
|
|
//订单状态 核保退回 不处理
|
|
|
if (order.getOrderstatus().equals(InsOrderStatusEnum.TO_BACK.getCode())) {
|