|
@@ -237,7 +237,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
//匹配的车辆信息数据 为空
|
|
//匹配的车辆信息数据 为空
|
|
|
if (CollUtil.isEmpty(vehicleInfoList)) {
|
|
if (CollUtil.isEmpty(vehicleInfoList)) {
|
|
|
|
|
|
|
|
- buildCarInfo(carInfo,rd.getVehicleInfoList().get(0));
|
|
|
|
|
|
|
+ buildCarInfo(carInfo, rd.getVehicleInfoList().get(0));
|
|
|
// carInfo.setModelCode(rd.getVehicleInfoList().get(0).getVehicleId());
|
|
// carInfo.setModelCode(rd.getVehicleInfoList().get(0).getVehicleId());
|
|
|
//// carInfo.setCiModelCode(a.getModelCode());
|
|
//// carInfo.setCiModelCode(a.getModelCode());
|
|
|
// carInfo.setCiCarName(rd.getVehicleInfoList().get(0).getVehicleName());
|
|
// carInfo.setCiCarName(rd.getVehicleInfoList().get(0).getVehicleName());
|
|
@@ -248,7 +248,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
//匹配的车辆信息数据
|
|
//匹配的车辆信息数据
|
|
|
ModelsQueryResponse.VehicleInfo matchVehicleInfo = vehicleInfoList.stream().filter(a -> a.getVehiclePrice().equals(carInfo.getPurchasePrice())).findFirst().orElse(null);
|
|
ModelsQueryResponse.VehicleInfo matchVehicleInfo = vehicleInfoList.stream().filter(a -> a.getVehiclePrice().equals(carInfo.getPurchasePrice())).findFirst().orElse(null);
|
|
|
if (null != matchVehicleInfo) {
|
|
if (null != matchVehicleInfo) {
|
|
|
- buildCarInfo(carInfo,matchVehicleInfo);
|
|
|
|
|
|
|
+ buildCarInfo(carInfo, matchVehicleInfo);
|
|
|
// carInfo.setModelCode(matchVehicleInfo.getVehicleId());
|
|
// carInfo.setModelCode(matchVehicleInfo.getVehicleId());
|
|
|
// carInfo.setCiCarName(matchVehicleInfo.getVehicleName());
|
|
// carInfo.setCiCarName(matchVehicleInfo.getVehicleName());
|
|
|
// carInfo.setModelcname(matchVehicleInfo.getVehicleName());
|
|
// carInfo.setModelcname(matchVehicleInfo.getVehicleName());
|
|
@@ -262,7 +262,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
|
- buildCarInfo(carInfo,vehicleInfoList.get(0));
|
|
|
|
|
|
|
+ buildCarInfo(carInfo, vehicleInfoList.get(0));
|
|
|
// carInfo.setModelCode(vehicleInfoList.get(0).getVehicleId());
|
|
// carInfo.setModelCode(vehicleInfoList.get(0).getVehicleId());
|
|
|
// carInfo.setCiCarName(vehicleInfoList.get(0).getVehicleName());
|
|
// carInfo.setCiCarName(vehicleInfoList.get(0).getVehicleName());
|
|
|
// carInfo.setModelcname(vehicleInfoList.get(0).getVehicleName());
|
|
// carInfo.setModelcname(vehicleInfoList.get(0).getVehicleName());
|
|
@@ -550,7 +550,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional
|
|
@Transactional
|
|
|
public HttpResult auditApi(String quoteOrderNo) {
|
|
public HttpResult auditApi(String quoteOrderNo) {
|
|
|
- String logNo = String.format("(日志号:%s)",IPUtil.gainServerNo());
|
|
|
|
|
|
|
+ String logNo = String.format("(日志号:%s)", IPUtil.gainServerNo());
|
|
|
try {
|
|
try {
|
|
|
//子订单
|
|
//子订单
|
|
|
InsAreaCompany iac = insAreaCompanyService.getById(quoteOrderNo);
|
|
InsAreaCompany iac = insAreaCompanyService.getById(quoteOrderNo);
|
|
@@ -596,19 +596,19 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
} else if (statusJq.equals("3") || statusSy.equals("3")) {
|
|
} else if (statusJq.equals("3") || statusSy.equals("3")) {
|
|
|
iac.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
|
|
iac.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
|
|
|
StringBuffer sb = new StringBuffer();
|
|
StringBuffer sb = new StringBuffer();
|
|
|
- if(null != rd.getSailResponseMessagedate()){
|
|
|
|
|
- sb.append(String.format("交强险提示信息:s%",rd.getSailResponseMessagedate().getCMessage()));
|
|
|
|
|
|
|
+ if (null != rd.getSailResponseMessagedate()) {
|
|
|
|
|
+ sb.append(String.format("交强险提示信息:s%", rd.getSailResponseMessagedate().getCMessage()));
|
|
|
}
|
|
}
|
|
|
- if(null != rd.getCiResponseMessagedate()){
|
|
|
|
|
- sb.append(String.format(" 商业险提示信息:s%",rd.getCiResponseMessagedate().getCMessage()));
|
|
|
|
|
|
|
+ if (null != rd.getCiResponseMessagedate()) {
|
|
|
|
|
+ sb.append(String.format(" 商业险提示信息:s%", rd.getCiResponseMessagedate().getCMessage()));
|
|
|
}
|
|
}
|
|
|
iac.setAuditopinion(sb.toString());
|
|
iac.setAuditopinion(sb.toString());
|
|
|
- } else if(statusJq.equals("9") || statusSy.equals("9")){
|
|
|
|
|
|
|
+ } else if (statusJq.equals("9") || statusSy.equals("9")) {
|
|
|
iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
iac.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//构造订单状态
|
|
//构造订单状态
|
|
|
- buildOrderStatus(order,iac);
|
|
|
|
|
|
|
+ buildOrderStatus(order, iac);
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
return HttpResult.error(logNo + "核保失败" + rd.getResponseHead().getReturnMessage());
|
|
return HttpResult.error(logNo + "核保失败" + rd.getResponseHead().getReturnMessage());
|
|
@@ -630,7 +630,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
//获取缴费地址
|
|
//获取缴费地址
|
|
|
getPayUrlApi(iac);
|
|
getPayUrlApi(iac);
|
|
|
}
|
|
}
|
|
|
- log.info(logNo +"车牌号:"+order.getLicenseno()+ ",永诚核保未获取缴费地址,状态为:" + InsOrderStatusEnum.matchKey(iac.getOrderstatus()).getDesc());
|
|
|
|
|
|
|
+ log.info(logNo + "车牌号:" + order.getLicenseno() + ",永诚核保未获取缴费地址,状态为:" + InsOrderStatusEnum.matchKey(iac.getOrderstatus()).getDesc());
|
|
|
insAreaCompanyService.updateById(iac);
|
|
insAreaCompanyService.updateById(iac);
|
|
|
insOrdersService.updateByOrderStatus(order.getOrderno(), order.getOrderstatus());
|
|
insOrdersService.updateByOrderStatus(order.getOrderno(), order.getOrderstatus());
|
|
|
|
|
|
|
@@ -760,7 +760,6 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
String respData = httpPostResultLog(xmlMapper, o, YcBuildData.API_ORDER_QUERY, "永诚API方式 - 补传回调 - ");
|
|
String respData = httpPostResultLog(xmlMapper, o, YcBuildData.API_ORDER_QUERY, "永诚API方式 - 补传回调 - ");
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
String cleanStr = YcBuildData.cleanResponseStr(respData);
|
|
String cleanStr = YcBuildData.cleanResponseStr(respData);
|
|
|
// CallbackAnOrderResponse callbackAnOrderResponse = xmlMapper.readValue(cleanStr, CallbackAnOrderResponse.class);
|
|
// CallbackAnOrderResponse callbackAnOrderResponse = xmlMapper.readValue(cleanStr, CallbackAnOrderResponse.class);
|
|
|
|
|
|
|
@@ -771,7 +770,9 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
|
|
//成功
|
|
//成功
|
|
|
if (param.getResult().equals("0")) {
|
|
if (param.getResult().equals("0")) {
|
|
|
- if(StringUtils.isEmpty(param.getBizPolicyNo()) && StringUtils.isEmpty(param.getCiPolicyNo())) return HttpResult.ok("操作成功,状态未变动。");;
|
|
|
|
|
|
|
+ if (StringUtils.isEmpty(param.getBizPolicyNo()) && StringUtils.isEmpty(param.getCiPolicyNo()))
|
|
|
|
|
+ return HttpResult.ok("操作成功,状态未变动。");
|
|
|
|
|
+ ;
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(param.getBizPolicyNo())) iac.setSypolicyno(param.getBizPolicyNo());
|
|
if (StringUtils.isNotEmpty(param.getBizPolicyNo())) iac.setSypolicyno(param.getBizPolicyNo());
|
|
@@ -779,7 +780,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
|
|
iac = buildCallBack(iac, param);
|
|
iac = buildCallBack(iac, param);
|
|
|
//构造订单状态
|
|
//构造订单状态
|
|
|
- buildOrderStatus(order,iac);
|
|
|
|
|
|
|
+ buildOrderStatus(order, iac);
|
|
|
insAreaCompanyService.updateById(iac);
|
|
insAreaCompanyService.updateById(iac);
|
|
|
insOrdersService.updateByOrderStatus(order.getOrderno(), order.getOrderstatus());
|
|
insOrdersService.updateByOrderStatus(order.getOrderno(), order.getOrderstatus());
|
|
|
|
|
|
|
@@ -875,7 +876,7 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
|
|
|
|
|
|
|
|
|
|
//接口请求
|
|
//接口请求
|
|
|
- String responseData = httpPostResultLog(xmlMapper, p, YcBuildData.API_GUARANTEE_SLIP, "车牌号:"+order.getLicenseno()+",永诚API方式 - 获取保单 - ");
|
|
|
|
|
|
|
+ String responseData = httpPostResultLog(xmlMapper, p, YcBuildData.API_GUARANTEE_SLIP, "车牌号:" + order.getLicenseno() + ",永诚API方式 - 获取保单 - ");
|
|
|
|
|
|
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseData);
|
|
String cleanStr = YcBuildData.cleanResponseStr(responseData);
|
|
|
PolicyResponse pResp = xmlMapper.readValue(cleanStr, PolicyResponse.class);
|
|
PolicyResponse pResp = xmlMapper.readValue(cleanStr, PolicyResponse.class);
|
|
@@ -883,19 +884,19 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
if (pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusCode().equals("E0000")) {
|
|
if (pResp.getHead().getResponseCompleteMessageStatus().getMessageStatusCode().equals("E0000")) {
|
|
|
|
|
|
|
|
//标志
|
|
//标志
|
|
|
- if(StringUtils.isNotEmpty(pResp.getPolicyBZUrl())){
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(pResp.getPolicyBZUrl())) {
|
|
|
String bzInsUrl = pResp.getPolicyBZUrl().replaceAll(";pkid", "&pkid");
|
|
String bzInsUrl = pResp.getPolicyBZUrl().replaceAll(";pkid", "&pkid");
|
|
|
jqFlagUrl = gainCarInsPolicy(bzInsUrl, licensePlate + "-交强险标志.pdf", licensePlate);
|
|
jqFlagUrl = gainCarInsPolicy(bzInsUrl, licensePlate + "-交强险标志.pdf", licensePlate);
|
|
|
}
|
|
}
|
|
|
//交强
|
|
//交强
|
|
|
- if(StringUtils.isNotEmpty(pResp.getJqpolicyUrl())){
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(pResp.getJqpolicyUrl())) {
|
|
|
String jqInsUrl = pResp.getJqpolicyUrl().replaceAll(";pkid", "&pkid");
|
|
String jqInsUrl = pResp.getJqpolicyUrl().replaceAll(";pkid", "&pkid");
|
|
|
jqUrl = gainCarInsPolicy(jqInsUrl, licensePlate + "-交强险保单.pdf", licensePlate);
|
|
jqUrl = gainCarInsPolicy(jqInsUrl, licensePlate + "-交强险保单.pdf", licensePlate);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//商业
|
|
//商业
|
|
|
- if(StringUtils.isNotEmpty(pResp.getSypolicyUrl())){
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(pResp.getSypolicyUrl())) {
|
|
|
String syInsUrl = pResp.getSypolicyUrl().replaceAll(";pkid", "&pkid");
|
|
String syInsUrl = pResp.getSypolicyUrl().replaceAll(";pkid", "&pkid");
|
|
|
syUrl = gainCarInsPolicy(syInsUrl, licensePlate + "-商业险保单.pdf", licensePlate);
|
|
syUrl = gainCarInsPolicy(syInsUrl, licensePlate + "-商业险保单.pdf", licensePlate);
|
|
|
|
|
|
|
@@ -1558,7 +1559,6 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
insAreaCompany.setOrderstatus(InsTaskHistoryEnum.IN_QUOTATION.getState() + "");
|
|
insAreaCompany.setOrderstatus(InsTaskHistoryEnum.IN_QUOTATION.getState() + "");
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
insAreaCompany.setCreatetime(LocalDateTime.now());
|
|
insAreaCompany.setCreatetime(LocalDateTime.now());
|
|
|
insAreaCompany.setInsOrderNo(insOrderNo);
|
|
insAreaCompany.setInsOrderNo(insOrderNo);
|
|
|
insAreaCompany.setJqapplyno(queryCodeJq);
|
|
insAreaCompany.setJqapplyno(queryCodeJq);
|
|
@@ -1573,15 +1573,15 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
insAreaCompany.setSyEndDate(responseData.getBase().getTInsrncEndTmSY());
|
|
insAreaCompany.setSyEndDate(responseData.getBase().getTInsrncEndTmSY());
|
|
|
|
|
|
|
|
|
|
|
|
|
- if(CollUtil.isEmpty(quoteRespVo.getRiskList())){
|
|
|
|
|
|
|
+ if (CollUtil.isEmpty(quoteRespVo.getRiskList())) {
|
|
|
insAreaCompany.setRiskinfo(new JSONArray());
|
|
insAreaCompany.setRiskinfo(new JSONArray());
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
insAreaCompany.setRiskinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getRiskList())));
|
|
insAreaCompany.setRiskinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getRiskList())));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(CollUtil.isEmpty(quoteRespVo.getKindList())){
|
|
|
|
|
|
|
+ if (CollUtil.isEmpty(quoteRespVo.getKindList())) {
|
|
|
insAreaCompany.setKindinfo(new JSONArray());
|
|
insAreaCompany.setKindinfo(new JSONArray());
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
insAreaCompany.setKindinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getKindList())));
|
|
insAreaCompany.setKindinfo(JSONObject.parseArray(JSONObject.toJSONString(quoteRespVo.getKindList())));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1595,7 +1595,6 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
return insAreaCompany;
|
|
return insAreaCompany;
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1684,14 +1683,14 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
// return rMap;
|
|
// return rMap;
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
- if(address.contains("邢台县")){
|
|
|
|
|
- address.replaceAll("邢台县","信都区");
|
|
|
|
|
|
|
+ if (address.contains("邢台县")) {
|
|
|
|
|
+ address.replaceAll("邢台县", "信都区");
|
|
|
}
|
|
}
|
|
|
- if(address.contains("旬阳县")){
|
|
|
|
|
- address.replaceAll("旬阳县","旬阳市");
|
|
|
|
|
|
|
+ if (address.contains("旬阳县")) {
|
|
|
|
|
+ address.replaceAll("旬阳县", "旬阳市");
|
|
|
}
|
|
}
|
|
|
- if(address.contains("开县")){
|
|
|
|
|
- address.replaceAll("开县","开州区");
|
|
|
|
|
|
|
+ if (address.contains("开县")) {
|
|
|
|
|
+ address.replaceAll("开县", "开州区");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -2045,21 +2044,39 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- private void buildOrderStatus(InsOrders order,InsAreaCompany iac){
|
|
|
|
|
|
|
+ private void buildOrderStatus(InsOrders order, InsAreaCompany iac) {
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //订单状态不为已承包的处理
|
|
|
if (!order.getOrderstatus().equals(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode())) {
|
|
if (!order.getOrderstatus().equals(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode())) {
|
|
|
- if (order.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode()) && order.getOrderstatus().equals(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode())) {
|
|
|
|
|
- order.setOrderstatus(iac.getOrderstatus());
|
|
|
|
|
- } else if (order.getOrderstatus().equals(InsOrderStatusEnum.TO_BACK.getCode())) {
|
|
|
|
|
- order.setOrderstatus(iac.getOrderstatus());
|
|
|
|
|
- } else if (StringUtils.toInt(order.getOrderstatus()) < StringUtils.toInt(iac.getOrderstatus())) {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //订单状态 报价中,状态覆盖
|
|
|
|
|
+ if (order.getOrderstatus().equals(InsOrderStatusEnum.QUOTE_ING.getCode())) {
|
|
|
order.setOrderstatus(iac.getOrderstatus());
|
|
order.setOrderstatus(iac.getOrderstatus());
|
|
|
}
|
|
}
|
|
|
|
|
+ //订单状态 待核保
|
|
|
|
|
+ if (order.getOrderstatus().equals(InsOrderStatusEnum.WAIT_AUDIT.getCode())) {
|
|
|
|
|
+ if (StringUtils.toInt(iac.getOrderstatus()) > StringUtils.toInt(order.getOrderstatus())) {
|
|
|
|
|
+ order.setOrderstatus(iac.getOrderstatus());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ //订单状态 已核保待缴费 不处理
|
|
|
|
|
+ // if (order.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode())) {
|
|
|
|
|
+ // order.setOrderstatus(iac.getOrderstatus());
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ //订单状态 核保退回 不处理
|
|
|
|
|
+ if (order.getOrderstatus().equals(InsOrderStatusEnum.TO_BACK.getCode())) {
|
|
|
|
|
+ if (!iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode())) {
|
|
|
|
|
+ order.setOrderstatus(iac.getOrderstatus());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- private void buildCarInfo(CarInfoVo carInfo,ModelsQueryResponse.VehicleInfo vehicleInfo){
|
|
|
|
|
|
|
+ private void buildCarInfo(CarInfoVo carInfo, ModelsQueryResponse.VehicleInfo vehicleInfo) {
|
|
|
carInfo.setModelCode(vehicleInfo.getVehicleId());
|
|
carInfo.setModelCode(vehicleInfo.getVehicleId());
|
|
|
carInfo.setCiCarName(vehicleInfo.getVehicleName());
|
|
carInfo.setCiCarName(vehicleInfo.getVehicleName());
|
|
|
carInfo.setModelcname(vehicleInfo.getVehicleName());
|
|
carInfo.setModelcname(vehicleInfo.getVehicleName());
|
|
@@ -2068,5 +2085,4 @@ public class InsAlltrustApiServiceImpl implements InsAlltrustApiService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|