|
@@ -4,11 +4,13 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
|
+import com.jzg.commons.constants.InsuranceRisk;
|
|
|
import com.jzg.commons.constants.dict.InsOrderStatusEnum;
|
|
import com.jzg.commons.constants.dict.InsOrderStatusEnum;
|
|
|
import com.jzg.commons.entity.quote.vo.AccidentalDrivingVo;
|
|
import com.jzg.commons.entity.quote.vo.AccidentalDrivingVo;
|
|
|
import com.jzg.commons.entity.quote.vo.RiskInfoVo;
|
|
import com.jzg.commons.entity.quote.vo.RiskInfoVo;
|
|
|
import com.jzg.commons.exception.SystemException;
|
|
import com.jzg.commons.exception.SystemException;
|
|
|
import com.jzg.commons.util.AssertionUtils;
|
|
import com.jzg.commons.util.AssertionUtils;
|
|
|
|
|
+import com.jzg.commons.util.StringUtils;
|
|
|
import com.jzg.commons.util.idgen.IdGenerate;
|
|
import com.jzg.commons.util.idgen.IdGenerate;
|
|
|
import com.jzg.quotation.commons.entity.vo.aggregated.*;
|
|
import com.jzg.quotation.commons.entity.vo.aggregated.*;
|
|
|
import com.jzg.quotation.commons.entity.vo.base.OrderBase;
|
|
import com.jzg.quotation.commons.entity.vo.base.OrderBase;
|
|
@@ -19,6 +21,7 @@ import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversi
|
|
|
import com.jzg.quotation.commons.utils.DateTimeUtil;
|
|
import com.jzg.quotation.commons.utils.DateTimeUtil;
|
|
|
import com.jzg.quotation.dajia.api.build.DaJiaAPIQuoteResultsVoBuild;
|
|
import com.jzg.quotation.dajia.api.build.DaJiaAPIQuoteResultsVoBuild;
|
|
|
import com.jzg.quotation.dajia.api.compoment.DaJiaApiRequestComponent;
|
|
import com.jzg.quotation.dajia.api.compoment.DaJiaApiRequestComponent;
|
|
|
|
|
+import com.jzg.quotation.dajia.api.constant.CProdNo;
|
|
|
import com.jzg.quotation.dajia.api.constant.enums.Message;
|
|
import com.jzg.quotation.dajia.api.constant.enums.Message;
|
|
|
import com.jzg.quotation.dajia.api.entity.DaJiaApiConfigureParameters;
|
|
import com.jzg.quotation.dajia.api.entity.DaJiaApiConfigureParameters;
|
|
|
import com.jzg.quotation.dajia.api.entity.po.DaJiaApiOrder;
|
|
import com.jzg.quotation.dajia.api.entity.po.DaJiaApiOrder;
|
|
@@ -37,6 +40,7 @@ import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
import java.util.regex.Matcher;
|
|
import java.util.regex.Matcher;
|
|
|
import java.util.regex.Pattern;
|
|
import java.util.regex.Pattern;
|
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
@Service
|
|
@Service
|
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
@@ -95,7 +99,7 @@ public class DaJiaApiRequestImpl implements DaJiaApiRequest {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
daJiaCrawlerOrderService.saveOrderInfo(quoteVo,odr1009Response,nvhlodr1001Response);
|
|
daJiaCrawlerOrderService.saveOrderInfo(quoteVo,odr1009Response,nvhlodr1001Response);
|
|
|
- return DaJiaAPIQuoteResultsVoBuild.buildQuoteResultsVo(quoteVo,odr1009Response,nvhlodr1001Response);
|
|
|
|
|
|
|
+ return DaJiaAPIQuoteResultsVoBuild.buildQuoteResultsVo(quoteVo,odr1009Response,nvhlodr1001Response,orderNo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -256,7 +260,7 @@ public class DaJiaApiRequestImpl implements DaJiaApiRequest {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) throws InterruptedException {
|
|
|
|
|
|
|
+ public UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) throws Exception {
|
|
|
OrderBase orderBase = underwritingVo.getOrder();
|
|
OrderBase orderBase = underwritingVo.getOrder();
|
|
|
DaJiaApiOrder daJiaApiOrder = daJiaCrawlerOrderService.getById(orderBase.getOrdersNo());
|
|
DaJiaApiOrder daJiaApiOrder = daJiaCrawlerOrderService.getById(orderBase.getOrdersNo());
|
|
|
// 配置信息
|
|
// 配置信息
|
|
@@ -297,37 +301,48 @@ public class DaJiaApiRequestImpl implements DaJiaApiRequest {
|
|
|
|
|
|
|
|
//核保成功 获取支付二维码
|
|
//核保成功 获取支付二维码
|
|
|
//延迟3秒 等待生成
|
|
//延迟3秒 等待生成
|
|
|
- ODR1011Request odr1011Request = new ODR1011Request(orderBase.getCompanyOrderNo(), parameters, policyInfosDTOS);
|
|
|
|
|
- ODR1011Response payNo = null;
|
|
|
|
|
- boolean flag = true;
|
|
|
|
|
- Integer frequencyControl = 0;
|
|
|
|
|
- while (flag) {
|
|
|
|
|
- payNo = daJiaApiRequestComponent.getPayNo(odr1011Request);
|
|
|
|
|
- if ("0000".equals(payNo.getStatus())) {
|
|
|
|
|
- flag = false;
|
|
|
|
|
- }
|
|
|
|
|
- frequencyControl += 1;
|
|
|
|
|
- if (frequencyControl > 20) {
|
|
|
|
|
- throw new RuntimeException("获取支付二维码失败");
|
|
|
|
|
- }
|
|
|
|
|
- Thread.sleep(500);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (payNo.getStatus().equals(Message.M0000.getCode())) {
|
|
|
|
|
|
|
+ PaymentLinkVo paymentLinkVo = new PaymentLinkVo();
|
|
|
|
|
+ paymentLinkVo.setOrder(underwritingVo.getOrder());
|
|
|
|
|
+ PaymentLinkResultsVo paymentLinkResultsVo = getPaymentLink(paymentLinkVo);
|
|
|
|
|
+ if(StringUtils.isNotEmpty(paymentLinkResultsVo.getPaymentLink())){
|
|
|
|
|
+ underwritingResultsVo.setPaymentLink(paymentLinkResultsVo.getPaymentLink());
|
|
|
underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.PAY_PENDING);
|
|
underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.PAY_PENDING);
|
|
|
- // 获取支付链接
|
|
|
|
|
- underwritingResultsVo.setPaymentLink(payNo.getResult().getSignInfoUrl());
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return underwritingResultsVo;
|
|
return underwritingResultsVo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public PaymentLinkResultsVo getPaymentLink(PaymentLinkVo paymentLinkVo) throws JsonProcessingException {
|
|
|
|
|
|
|
+ public PaymentLinkResultsVo getPaymentLink(PaymentLinkVo paymentLinkVo) throws Exception {
|
|
|
DaJiaApiOrder daJiaApiOrder = daJiaCrawlerOrderService.getById(paymentLinkVo.getOrder().getOrdersNo());
|
|
DaJiaApiOrder daJiaApiOrder = daJiaCrawlerOrderService.getById(paymentLinkVo.getOrder().getOrdersNo());
|
|
|
DaJiaApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(DaJiaApiConfigureParameters.class,
|
|
DaJiaApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(DaJiaApiConfigureParameters.class,
|
|
|
paymentLinkVo.getOrder().getAttributionInformationVo().getConfigInfo());
|
|
paymentLinkVo.getOrder().getAttributionInformationVo().getConfigInfo());
|
|
|
PaymentLinkResultsVo resultsVo = new PaymentLinkResultsVo();
|
|
PaymentLinkResultsVo resultsVo = new PaymentLinkResultsVo();
|
|
|
|
|
+
|
|
|
|
|
+ //驾意险 返回数据
|
|
|
|
|
+ List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS = null;
|
|
|
|
|
+ if (!Objects.isNull(daJiaApiOrder.getCrossInsurance())) {
|
|
|
|
|
+ policyInfosDTOS = JSON.parseArray(JSON.toJSONString(daJiaApiOrder.getCrossInsurance()), NVHLODR1001Response.policyInfosDTO.class);
|
|
|
|
|
+ }
|
|
|
|
|
+ ODR1011Request odr1011Request = new ODR1011Request(paymentLinkVo.getOrder().getCompanyOrderNo(), parameters, policyInfosDTOS);
|
|
|
|
|
+ ODR1011Response payNo = null;
|
|
|
|
|
+ boolean flag = true;
|
|
|
|
|
+ Integer frequencyControl = 0;
|
|
|
|
|
+ while (flag) {
|
|
|
|
|
+ payNo = daJiaApiRequestComponent.getPayNo(odr1011Request);
|
|
|
|
|
+ if ("0000".equals(payNo.getStatus())) {
|
|
|
|
|
+ flag = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ frequencyControl += 1;
|
|
|
|
|
+ if (frequencyControl > 20) {
|
|
|
|
|
+ throw new RuntimeException("获取支付二维码失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ Thread.sleep(500);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (payNo.getStatus().equals(Message.M0000.getCode())) {
|
|
|
|
|
+ resultsVo.setPaymentLink(payNo.getResult().getSignInfoUrl());
|
|
|
|
|
+ }
|
|
|
return resultsVo;
|
|
return resultsVo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -339,23 +354,213 @@ public class DaJiaApiRequestImpl implements DaJiaApiRequest {
|
|
|
// 配置信息
|
|
// 配置信息
|
|
|
DaJiaApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(DaJiaApiConfigureParameters.class,
|
|
DaJiaApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(DaJiaApiConfigureParameters.class,
|
|
|
orderBase.getAttributionInformationVo().getConfigInfo());
|
|
orderBase.getAttributionInformationVo().getConfigInfo());
|
|
|
-
|
|
|
|
|
// 上传影像信息
|
|
// 上传影像信息
|
|
|
List<InsuranceImageVo> imageVoList = insuranceUploadImageVo.getImageVoList();
|
|
List<InsuranceImageVo> imageVoList = insuranceUploadImageVo.getImageVoList();
|
|
|
-
|
|
|
|
|
- ODR1013Request odr1013Request = new ODR1013Request(orderBase, parameters, imageVoList);
|
|
|
|
|
- ODR1013Response odr1013Response = daJiaApiRequestComponent.uploadImage(odr1013Request);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ ODR1013Request odr1013Request = new ODR1013Request(orderBase, parameters, imageVoList,daJiaApiOrder);
|
|
|
|
|
+ try {
|
|
|
|
|
+ ODR1013Response odr1013Response = daJiaApiRequestComponent.uploadImage(odr1013Request);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ throw new SystemException("上传途中异常,请重新上传或截取图片上传");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public DownloadPolicyResultVo downloadPolicy(DownloadPolicyVo downloadPolicyVo) {
|
|
public DownloadPolicyResultVo downloadPolicy(DownloadPolicyVo downloadPolicyVo) {
|
|
|
- DaJiaApiOrder daJiaApiOrder = daJiaCrawlerOrderService.getById(downloadPolicyVo.getOrder().getOrdersNo());
|
|
|
|
|
- return null;
|
|
|
|
|
|
|
+ // 配置信息
|
|
|
|
|
+ DaJiaApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(DaJiaApiConfigureParameters.class,
|
|
|
|
|
+ downloadPolicyVo.getOrder().getAttributionInformationVo().getConfigInfo());
|
|
|
|
|
+
|
|
|
|
|
+ DownloadPolicyResultVo downloadPolicyResultVo = new DownloadPolicyResultVo();
|
|
|
|
|
+
|
|
|
|
|
+ String jqPolicyNo = downloadPolicyVo.getPolicie().getJqPolicyNo();
|
|
|
|
|
+ if(Objects.nonNull(jqPolicyNo)) {
|
|
|
|
|
+ queryPolicy(jqPolicyNo,downloadPolicyResultVo,parameters, InsuranceRisk.TRAFFIC.getCode());
|
|
|
|
|
+ }
|
|
|
|
|
+ String syPolicyNo = downloadPolicyVo.getPolicie().getSyPolicyNo();
|
|
|
|
|
+ if(Objects.nonNull(syPolicyNo)) {
|
|
|
|
|
+ queryPolicy(syPolicyNo,downloadPolicyResultVo,parameters, InsuranceRisk.BUSINESS.getCode());
|
|
|
|
|
+ }
|
|
|
|
|
+ String jyPolicyNo = downloadPolicyVo.getPolicie().getJyPolicyNo();
|
|
|
|
|
+ if(Objects.nonNull(jyPolicyNo)) {
|
|
|
|
|
+ queryJyPolicy(jyPolicyNo,downloadPolicyResultVo,parameters);
|
|
|
|
|
+ }
|
|
|
|
|
+ return downloadPolicyResultVo;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询驾意险保单
|
|
|
|
|
+ * @param policyNo
|
|
|
|
|
+ * @param downloadPolicyResultVo
|
|
|
|
|
+ * @param parameters
|
|
|
|
|
+ */
|
|
|
|
|
+ private void queryJyPolicy(String policyNo, DownloadPolicyResultVo downloadPolicyResultVo, DaJiaApiConfigureParameters parameters) {
|
|
|
|
|
+
|
|
|
|
|
+ NVHLODR2007Request nvhlodr2007Request = new NVHLODR2007Request(policyNo, parameters);
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ NVHLODR2007Response nvhlodr2007Response = daJiaApiRequestComponent.accidentPremiumWarranty(nvhlodr2007Request);
|
|
|
|
|
+ if ("2000".equals(nvhlodr2007Response.getStatus())) {
|
|
|
|
|
+ String jyUrl = nvhlodr2007Response.getPolicyInfos().get(0).getCPdfUrl();
|
|
|
|
|
+ downloadPolicyResultVo.setJyUrl(jyUrl);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ throw new SystemException(nvhlodr2007Response.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ }catch (Exception exception) {
|
|
|
|
|
+ exception.printStackTrace();
|
|
|
|
|
+ throw new SystemException("获取保单链接失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询保单
|
|
|
|
|
+ * @param policyNo
|
|
|
|
|
+ * @param downloadPolicyResultVo
|
|
|
|
|
+ */
|
|
|
|
|
+ private void queryPolicy(String policyNo, DownloadPolicyResultVo downloadPolicyResultVo,DaJiaApiConfigureParameters parameters, String riskCode) {
|
|
|
|
|
+ ArrayList<String> warrantys = new ArrayList<String>();
|
|
|
|
|
+ warrantys.add(policyNo);
|
|
|
|
|
+ String[] warrantysArray = warrantys.toArray(new String[0]);
|
|
|
|
|
+ VHLINS2005Request vhlins2005Request = new VHLINS2005Request(warrantysArray, parameters);
|
|
|
|
|
+ try {
|
|
|
|
|
+ VHLINS2005Response vhlins2005Response = daJiaApiRequestComponent.obtainWarranty(vhlins2005Request);
|
|
|
|
|
+ if (vhlins2005Response.getStatus().equals(Message.M0000.getCode())) {
|
|
|
|
|
+ //标志
|
|
|
|
|
+ if (vhlins2005Response.getResult().size() > 0) {
|
|
|
|
|
+ VHLINS2005Response.ResultDTO resultDTO = vhlins2005Response.getResult().get(0);
|
|
|
|
|
+ if (InsuranceRisk.TRAFFIC.getCode().equals(riskCode)) {
|
|
|
|
|
+ if(StringUtils.isNotEmpty(resultDTO.getReturnBzUrl())){
|
|
|
|
|
+ String jqFlagUrl = resultDTO.getReturnBzUrl();
|
|
|
|
|
+ downloadPolicyResultVo.setJqFlagUrl(jqFlagUrl);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StringUtils.isNotEmpty(resultDTO.getReturnUrl())){
|
|
|
|
|
+ String jqUrl = resultDTO.getReturnUrl();
|
|
|
|
|
+ downloadPolicyResultVo.setJqUrl(jqUrl);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (InsuranceRisk.BUSINESS.getCode().equals(riskCode)) {
|
|
|
|
|
+ if(StringUtils.isNotEmpty(resultDTO.getReturnUrl())){
|
|
|
|
|
+ String syUrl = resultDTO.getReturnUrl();
|
|
|
|
|
+ downloadPolicyResultVo.setSyUrl(syUrl);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ throw new SystemException(vhlins2005Response.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception exception) {
|
|
|
|
|
+ exception.printStackTrace();
|
|
|
|
|
+ throw new SystemException("获取保单链接失败");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public OrderStatusResultVo queryOrderState(OrderStatusVo orderStatusVo) {
|
|
public OrderStatusResultVo queryOrderState(OrderStatusVo orderStatusVo) {
|
|
|
- return null;
|
|
|
|
|
|
|
+ OrderStatusResultVo orderStatusResultVo = new OrderStatusResultVo();
|
|
|
|
|
+ // 配置信息
|
|
|
|
|
+ DaJiaApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(DaJiaApiConfigureParameters.class,
|
|
|
|
|
+ orderStatusVo.getOrder().getAttributionInformationVo().getConfigInfo());
|
|
|
|
|
+ ODR2010Request odr2010Request = new ODR2010Request(orderStatusVo.getOrder().getCompanyOrderNo(), parameters);
|
|
|
|
|
+ try{
|
|
|
|
|
+ ODR2010Response odr2010Response = daJiaApiRequestComponent.verifyPayment(odr2010Request);
|
|
|
|
|
+ if (odr2010Response.getStatus().equals(Message.M0000.getCode())) {
|
|
|
|
|
+
|
|
|
|
|
+ List<ODR2010Response.ResultDTO> result = odr2010Response.getResult();
|
|
|
|
|
+ //是否存在保单生成
|
|
|
|
|
+ if (checkBdGen(result) && !InsOrderStatusEnum.PAY_PENDING.equals(orderStatusVo.getInsOrders().getOrderStatus())) {
|
|
|
|
|
+ List<ODR2010Response.ResultDTO> collect = result.stream().filter(x -> x.getNotifyType().equals("2009")).collect(Collectors.toList());
|
|
|
|
|
+ for (int i = 0, length = collect.size(); i < length; i++) {
|
|
|
|
|
+ //交强或商业 的 保单号
|
|
|
|
|
+ if (collect.get(i).getProdNo().equals(CProdNo.JQ.getCode())) {
|
|
|
|
|
+ orderStatusResultVo.setJqPolicyno(collect.get(i).getPlyNo());
|
|
|
|
|
+ } else if (collect.get(i).getProdNo().equals(CProdNo.SY.getCode())) {
|
|
|
|
|
+ orderStatusResultVo.setSyPolicyno(collect.get(i).getPlyNo());
|
|
|
|
|
+ } else if (collect.get(i).getProdNo().equals(CProdNo.SY_XNY.getCode())) {
|
|
|
|
|
+ //新能源保单号
|
|
|
|
|
+ orderStatusResultVo.setSyPolicyno(collect.get(i).getPlyNo());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ orderStatusResultVo.setOrderStatus(InsOrderStatusEnum.UNDERWRITED);
|
|
|
|
|
+ }
|
|
|
|
|
+ //是否人工核保
|
|
|
|
|
+ if (!checkArtificial(result)) {
|
|
|
|
|
+ orderStatusResultVo.setOrderStatus(InsOrderStatusEnum.STAFF_PROCESS);
|
|
|
|
|
+ return orderStatusResultVo;
|
|
|
|
|
+ }
|
|
|
|
|
+ //是否存在核保退回
|
|
|
|
|
+ if (checkBack(result)) {
|
|
|
|
|
+ orderStatusResultVo.setOrderStatus(InsOrderStatusEnum.WAIT_AUDIT);
|
|
|
|
|
+ return orderStatusResultVo;
|
|
|
|
|
+ }
|
|
|
|
|
+ //存在 核保通过 并且 不存在支付连接 则 生成支付连接
|
|
|
|
|
+ if (checkPayLink(result, orderStatusVo.getInsOrders().getPayLink())) {
|
|
|
|
|
+ // 刷新支付连接
|
|
|
|
|
+ PaymentLinkVo paymentLinkVo = new PaymentLinkVo();
|
|
|
|
|
+ paymentLinkVo.setOrder(orderStatusVo.getOrder());
|
|
|
|
|
+ PaymentLinkResultsVo paymentLink = getPaymentLink(paymentLinkVo);
|
|
|
|
|
+ String paymentLinkUrl = paymentLink.getPaymentLink();
|
|
|
|
|
+ if(StringUtils.isNotEmpty(paymentLinkUrl)){
|
|
|
|
|
+ orderStatusResultVo.setOrderStatus(InsOrderStatusEnum.PAY_PENDING);
|
|
|
|
|
+ orderStatusResultVo.setPaymentLink(paymentLinkUrl);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ throw new SystemException("获取支付二维码失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }catch (Exception exception) {
|
|
|
|
|
+ exception.printStackTrace();
|
|
|
|
|
+ }
|
|
|
|
|
+ return orderStatusResultVo;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 检测是否存在保单生成状态
|
|
|
|
|
+ * @param result
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public boolean checkBdGen(List<ODR2010Response.ResultDTO> result) {
|
|
|
|
|
+ List<ODR2010Response.ResultDTO> collect = result.stream().filter(x -> x.getNotifyType().equals("2009")).collect(Collectors.toList());
|
|
|
|
|
+ return !collect.isEmpty();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 检测核保通过是否存在支付连接
|
|
|
|
|
+ * @param result
|
|
|
|
|
+ * @param payLink
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public boolean checkPayLink(List<ODR2010Response.ResultDTO> result, String payLink) {
|
|
|
|
|
+ List<ODR2010Response.ResultDTO> traverseCollect = result.stream().filter(x -> x.getNotifyType().equals("2005")).collect(Collectors.toList());
|
|
|
|
|
+ if (!traverseCollect.isEmpty() && ("".equals(payLink) || payLink != null)) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 检测是否核保退回
|
|
|
|
|
+ * @param result
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public boolean checkBack(List<ODR2010Response.ResultDTO> result) {
|
|
|
|
|
+ List<ODR2010Response.ResultDTO> backCollect = result.stream().filter(x -> x.getNotifyType().equals("2003") || x.getNotifyType().equals("2004")).collect(Collectors.toList());
|
|
|
|
|
+ if (!backCollect.isEmpty()) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 检测是否进入人工
|
|
|
|
|
+ * @param result
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public boolean checkArtificial(List<ODR2010Response.ResultDTO> result) {
|
|
|
|
|
+ List<ODR2010Response.ResultDTO> artificialCollect = result.stream().filter(x -> x.getNotifyType().equals("2002")).collect(Collectors.toList());
|
|
|
|
|
+ if (!artificialCollect.isEmpty()) {
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|