|
|
@@ -1,6 +1,7 @@
|
|
|
package com.ydtech.modules.ins.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
@@ -10,9 +11,9 @@ import com.fasterxml.jackson.dataformat.xml.XmlMapper;
|
|
|
import com.ydtech.components.InsAlltrustRequestApiComponents;
|
|
|
import com.ydtech.constants.InsTaskHistoryEnum;
|
|
|
import com.ydtech.constants.SysConstants;
|
|
|
-import com.ydtech.constants.enums.InsOrderStatus;
|
|
|
import com.ydtech.constants.enums.InsQuoteFlow;
|
|
|
import com.ydtech.constants.enums.dict.AttachInsureEnum;
|
|
|
+import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
|
|
|
import com.ydtech.constants.enums.dict.WhetherEnum;
|
|
|
import com.ydtech.core.page.HttpResult;
|
|
|
import com.ydtech.exception.SystemException;
|
|
|
@@ -71,6 +72,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.net.InetAddress;
|
|
|
+import java.net.UnknownHostException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
@@ -422,7 +425,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
String ciMsg = tfiWarnData.getWarnMessage();
|
|
|
requestInfoList.add(ciMsg);
|
|
|
|
|
|
- if(ciMsg.contains("终保日期: 以上为所有结果信息"))return true;
|
|
|
+ if (ciMsg.contains("终保日期: 以上为所有结果信息")) return true;
|
|
|
|
|
|
|
|
|
//终保日期
|
|
|
@@ -559,7 +562,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
// 获取协议配置信息
|
|
|
YcConfigureParameters ycConfigureParameters = gainYcConfigParams(iac.getAgreementId());
|
|
|
|
|
|
-// if (InsOrderStatus.S_5.getCode().equals(iac.getOrderstatus()) || InsOrderStatus.S_4.getCode().equals(iac.getOrderstatus())) {
|
|
|
+// if (InsOrderStatus.S_5.getCode().equals(iac.getOrderstatus()) || InsOrderStatusEnum.TO_BACK.getCode().equals(iac.getOrderstatus())) {
|
|
|
// return HttpResult.ok(InsOrderStatus.matchKey(iac.getOrderstatus()).getDesc());
|
|
|
// }
|
|
|
|
|
|
@@ -575,25 +578,21 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
//组装参数
|
|
|
Audit m = Audit.buildAuditParam(ownerInfo, insureInfo, applyInfo, ycConfigureParameters, iac);
|
|
|
|
|
|
- //构造被保人地区
|
|
|
- InsAlltrustRegion insureInfoRegion = findRegion(insureInfo);
|
|
|
- if(null != insureInfoRegion){
|
|
|
- m.getRequestLabel().getCondition().getCustomer().setCProvince(insureInfoRegion.getProvinceCode());
|
|
|
- m.getRequestLabel().getCondition().getCustomer().setCCity(insureInfoRegion.getCityCode());
|
|
|
- m.getRequestLabel().getCondition().getCustomer().setCCounty(insureInfoRegion.getArea());
|
|
|
- }else{
|
|
|
- throw new SystemException("永诚 - 被保人地区获取失败,请确认页面是否填写");
|
|
|
- }
|
|
|
|
|
|
-
|
|
|
-// //处理地区
|
|
|
-// Map<String, String> insureMap = gainRegionCode(insureInfo.getAddr());
|
|
|
-// if (null != insureMap && insureMap.size() > 0) {
|
|
|
-// m.getRequestLabel().getCondition().getCustomer().setCProvince(insureMap.get("provinceCode"));
|
|
|
-// m.getRequestLabel().getCondition().getCustomer().setCCity(insureMap.get("cityCode"));
|
|
|
-// m.getRequestLabel().getCondition().getCustomer().setCCounty(insureMap.get("areaCode"));
|
|
|
+ //构造被保人地区
|
|
|
+ //处理地区 车主
|
|
|
+ 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"));
|
|
|
+
|
|
|
+// InsAlltrustRegion insureInfoRegion = findRegion(insureInfo);
|
|
|
+// if (null != insureInfoRegion) {
|
|
|
+// m.getRequestLabel().getCondition().getCustomer().setCProvince(insureInfoRegion.getProvinceCode());
|
|
|
+// m.getRequestLabel().getCondition().getCustomer().setCCity(insureInfoRegion.getCityCode());
|
|
|
+// m.getRequestLabel().getCondition().getCustomer().setCCounty(insureInfoRegion.getArea());
|
|
|
// } else {
|
|
|
-// throw new SystemException("永诚 - 被保人地区获取失败,请联系管理员");
|
|
|
+// throw new SystemException("永诚 - 被保人地区获取失败,请确认页面是否填写");
|
|
|
// }
|
|
|
|
|
|
|
|
|
@@ -613,11 +612,11 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
String statusJq = StringUtils.toString(rd.getStatusJq(), "");
|
|
|
String statusSy = StringUtils.toString(rd.getStatusSY(), "");
|
|
|
if (statusJq.equals("0") || statusSy.equals("0")) {
|
|
|
- iac.setOrderstatus(InsOrderStatus.S_1.getCode());
|
|
|
+ iac.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
|
} else if (statusJq.equals("3") || statusSy.equals("3")) {
|
|
|
- iac.setOrderstatus(InsOrderStatus.S_4.getCode());
|
|
|
+ iac.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
|
|
|
} else {
|
|
|
- iac.setOrderstatus(InsOrderStatus.S_2.getCode());
|
|
|
+ iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
}
|
|
|
if (StringUtils.toInt(order.getOrderstatus()) < StringUtils.toInt(iac.getOrderstatus())) {
|
|
|
order.setOrderstatus(iac.getOrderstatus());
|
|
|
@@ -639,16 +638,16 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
iac.setJqappoint(""); //交强特别约定
|
|
|
iac.setSyappoint(""); //商业特别约定
|
|
|
|
|
|
- if (InsOrderStatus.S_2.getCode().equals(InsOrderStatus.matchKey(iac.getOrderstatus()).getCode())) {
|
|
|
+ if (InsOrderStatusEnum.WAIT_PAY.getCode().equals(InsOrderStatusEnum.matchKey(iac.getOrderstatus()).getCode())) {
|
|
|
//获取缴费地址
|
|
|
getPayUrlApi(iac);
|
|
|
} else {
|
|
|
- h = HttpResult.error(msg + "状态:" + InsOrderStatus.matchKey(iac.getOrderstatus()).getDesc());
|
|
|
+ h = HttpResult.error(msg + "状态:" + InsOrderStatusEnum.matchKey(iac.getOrderstatus()).getDesc());
|
|
|
}
|
|
|
insAreaCompanyService.updateById(iac);
|
|
|
insOrdersService.updateByOrderStatus(order.getOrderno(), order.getOrderstatus());
|
|
|
|
|
|
-// if (InsOrderStatus.S_2.getCode().equals(InsOrderStatus.matchKey(iac.getOrderstatus()).getCode())) {
|
|
|
+// if (InsOrderStatusEnum.WAIT_PAY.getCode().equals(InsOrderStatus.matchKey(iac.getOrderstatus()).getCode())) {
|
|
|
// return HttpResult.ok(msg);
|
|
|
// } else {
|
|
|
// return HttpResult.error(msg + "状态:" + InsOrderStatus.matchKey(iac.getOrderstatus()).getDesc());
|
|
|
@@ -756,7 +755,6 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
@Override
|
|
|
public HttpResult callbackAnOrder(String quoteOrderNo) {
|
|
|
// log.debug("=========永诚API方式 - xml请求 - 补传回调开始======");
|
|
|
- HttpResult httpResult = new HttpResult();
|
|
|
|
|
|
try {
|
|
|
InsAreaCompany iac = insAreaCompanyService.getById(quoteOrderNo);
|
|
|
@@ -772,7 +770,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
//0 支付回调 1核保回调 5直接返回字符串信息
|
|
|
// String type = "0";
|
|
|
String type = "5";
|
|
|
-// if(iac.getOrderstatus().equals(InsOrderStatus.S_1.getCode())) type = "1";
|
|
|
+// if(iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_AUDIT.getCode())) type = "1";
|
|
|
//组装参数
|
|
|
CallbackAnOrder o = CallbackAnOrder.buildCallbackAnOrderParam(iac, ycConfigureParameters.gainAuthorityDataXml(), type);
|
|
|
|
|
|
@@ -781,12 +779,6 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
// InsApiLog apiLog = httpPostResultLog(xmlMapper, o, YcBuildData.API_ORDER_QUERY);
|
|
|
String respData = httpPostResultLog(xmlMapper, o, YcBuildData.API_ORDER_QUERY, "永诚API方式 - 补传回调 - ");
|
|
|
|
|
|
-// log.info("永诚API方式 - xml请求 - 参数:" + apiLog.getRequestData());
|
|
|
-// log.info("永诚API方式 - xml请求 ------------分割线----------------");
|
|
|
-// log.info("永诚API方式 - xml请求 - 响应:" + apiLog.getResponseData());
|
|
|
-
|
|
|
-// verifyRequest(apiLog, iac, InsQuoteFlow.Q_S_5);
|
|
|
-// String responseData = apiLog.getResponseData();
|
|
|
|
|
|
|
|
|
String cleanStr = YcBuildData.cleanResponseStr(respData);
|
|
|
@@ -799,12 +791,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
//成功
|
|
|
if (param.getResult().equals("0")) {
|
|
|
-// LambdaQueryWrapper<InsAreaCompany> lqw = new LambdaQueryWrapper();
|
|
|
-// //交强投保单号查询
|
|
|
-// lqw.eq(StringUtils.isNotEmpty(param.getCiPolicyAppNo()), InsAreaCompany::getJqapplyno, param.getCiPolicyAppNo());
|
|
|
-// //商业投保单号查询
|
|
|
-// lqw.eq(StringUtils.isNotEmpty(param.getBizPolicyAppNo()), InsAreaCompany::getSyapplyno, param.getBizPolicyAppNo());
|
|
|
-// InsAreaCompany iac = insAreaCompanyService.getOne(lqw);
|
|
|
+ if(StringUtils.isEmpty(param.getBizPolicyNo()) && StringUtils.isEmpty(param.getCiPolicyNo())) return HttpResult.ok("操作成功,状态未变动。");;
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(param.getBizPolicyNo())) iac.setSypolicyno(param.getBizPolicyNo());
|
|
|
@@ -820,10 +807,10 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
} else {
|
|
|
//失败原因
|
|
|
- httpResult = HttpResult.error(param.getMessage());
|
|
|
log.info(String.format("永诚API方式 - 补传回调 - 失败,交强保单号:{} ,商业保单号:{},类型:{}", param.getCiPolicyNo(), param.getBizPolicyNo(), param.getType()));
|
|
|
+ return HttpResult.error(param.getMessage());
|
|
|
}
|
|
|
- return HttpResult.ok(param);
|
|
|
+ return HttpResult.ok("操作成功,状态已更新。");
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -840,7 +827,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
return HttpResult.error("系统错误,请联系管理员");
|
|
|
}
|
|
|
// log.debug("=========永诚API方式 - xml请求 - 补传回调结束!======");
|
|
|
- return httpResult;
|
|
|
+ return HttpResult.error("操作失败,请联系管理员");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -850,7 +837,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
public void callbackAnOrder() {
|
|
|
|
|
|
LambdaQueryWrapper<InsAreaCompany> lqw = new LambdaQueryWrapper<>();
|
|
|
- lqw.eq(InsAreaCompany::getOrderstatus, InsOrderStatus.S_2.getCode());
|
|
|
+ lqw.eq(InsAreaCompany::getOrderstatus, InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
lqw.gt(InsAreaCompany::getAudittime, LocalDate.now().minusDays(1));
|
|
|
List<InsAreaCompany> list = insAreaCompanyService.list(lqw);
|
|
|
|
|
|
@@ -1588,8 +1575,9 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
insAreaCompany.setSumpremium(BigDecimal.valueOf(quoteRespVo.getSumPermium()));
|
|
|
// insAreaCompany.setSumpremium(BigDecimal.valueOf(add(quoteRespVo.getSumPermium(), insOrder.getTaxamount())));
|
|
|
insAreaCompany.setOrderstatus(InsTaskHistoryEnum.WAITING_NUCLEAR_INSURANCE.getState() + "");
|
|
|
- insAreaCompany.setRiskinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getRiskList())));
|
|
|
- insAreaCompany.setKindinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getKindList())));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
insAreaCompany.setCreatetime(LocalDateTime.now());
|
|
|
insAreaCompany.setInsOrderNo(insOrderNo);
|
|
|
insAreaCompany.setJqapplyno(queryCodeJq);
|
|
|
@@ -1604,6 +1592,19 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
insAreaCompany.setSyEndDate(responseData.getBase().getTInsrncEndTmSY());
|
|
|
|
|
|
|
|
|
+ if(CollUtil.isEmpty(quoteRespVo.getRiskList())){
|
|
|
+ insAreaCompany.setRiskinfo(new JSONArray());
|
|
|
+ }else{
|
|
|
+ insAreaCompany.setRiskinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getRiskList())));
|
|
|
+ }
|
|
|
+
|
|
|
+ if(CollUtil.isEmpty(quoteRespVo.getKindList())){
|
|
|
+ insAreaCompany.setKindinfo(new JSONArray());
|
|
|
+ }else{
|
|
|
+ insAreaCompany.setKindinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getKindList())));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
insAreaCompanyService.save(insAreaCompany);
|
|
|
return insAreaCompany;
|
|
|
|
|
|
@@ -1696,51 +1697,62 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-// @Override
|
|
|
-// public Map<String, String> gainRegionCode(String address) {
|
|
|
-//
|
|
|
-// log.debug("*********永诚API方式 - 身份证地址解析 参数:" + address);
|
|
|
-// 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() > 0) {
|
|
|
-// Map rMap = new HashMap();
|
|
|
-// rMap.put("provinceCode", areaList.get(0).getProvinceCode());
|
|
|
-// rMap.put("cityCode", areaList.get(0).getCityCode());
|
|
|
-// rMap.put("areaCode", areaList.get(0).getAreaCode());
|
|
|
-// return rMap;
|
|
|
+ @Override
|
|
|
+ public Map<String, String> gainRegionCode(String address) {
|
|
|
+
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ 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() > 0) {
|
|
|
+ rMap.put("provinceCode", areaList.get(0).getProvinceCode());
|
|
|
+ rMap.put("cityCode", areaList.get(0).getCityCode());
|
|
|
+ rMap.put("areaCode", areaList.get(0).getAreaCode());
|
|
|
+ return rMap;
|
|
|
+ }
|
|
|
+ throw new SystemException("永诚(日志号:" + IPUtil.gainServerNo() + ") - 被保人地区解析失败,请联系管理员,地址:" + address);
|
|
|
// return null;
|
|
|
-// }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
private void buildRegion(Ruote m, BaseQuoteInfoVo yaQuoteInfoVo) {
|
|
|
@@ -1757,30 +1769,51 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
|
|
|
if (null != owner) {
|
|
|
- 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());
|
|
|
- }
|
|
|
+ //处理地区 车主
|
|
|
+ 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"));
|
|
|
+
|
|
|
+
|
|
|
+// 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 != insured) {
|
|
|
- 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());
|
|
|
- }
|
|
|
+ //处理地区 被保人
|
|
|
+ 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"));
|
|
|
+
|
|
|
+
|
|
|
+// 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) {
|
|
|
- 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());
|
|
|
- }
|
|
|
+ //处理地区 投保人
|
|
|
+ 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"));
|
|
|
+
|
|
|
+
|
|
|
+// 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());
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -1795,7 +1828,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
throw new SystemException("永诚报价需要录入省市县");
|
|
|
}
|
|
|
|
|
|
- if(info.getAddr().indexOf("湖北省仙桃市")==0){
|
|
|
+ if (info.getAddr().indexOf("湖北省仙桃市") == 0) {
|
|
|
InsAlltrustRegion r = new InsAlltrustRegion();
|
|
|
r.setProvinceCode("420000");
|
|
|
r.setProvince("湖北省");
|
|
|
@@ -1893,17 +1926,17 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
*/
|
|
|
private InsAreaCompany buildCallBackStatus(InsAreaCompany iac, String status) {
|
|
|
if (status.equals("9")) {
|
|
|
- iac.setOrderstatus(InsOrderStatus.S_2.getCode());
|
|
|
+ iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
//更新支付连接
|
|
|
log.debug("准备进入获取支付连接######################");
|
|
|
iac = getPayUrlApi(iac);
|
|
|
log.debug("结束 - 准备进入获取支付连接######################");
|
|
|
}
|
|
|
if (status.equals("3")) {
|
|
|
- iac.setOrderstatus(InsOrderStatus.S_4.getCode());
|
|
|
+ iac.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
|
|
|
}
|
|
|
if (status.equals("1")) {
|
|
|
- iac.setOrderstatus(InsOrderStatus.S_3.getCode());
|
|
|
+ iac.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
}
|
|
|
return iac;
|
|
|
}
|