|
|
@@ -2,36 +2,31 @@ package com.ydtech.modules.order.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.alibaba.fastjson.JSONArray;
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ydtech.constants.enums.InsuranceRisk;
|
|
|
import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
|
|
|
import com.ydtech.core.page.HttpResult;
|
|
|
import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.fee.service.FeeRuleSchemeService;
|
|
|
-import com.ydtech.modules.ins.model.request.Response;
|
|
|
import com.ydtech.modules.ins.model.vo.*;
|
|
|
import com.ydtech.modules.ins.model.ya.YaQuoteInfoVo;
|
|
|
-import com.ydtech.modules.ins.model.zm.ZmCarModel;
|
|
|
import com.ydtech.modules.order.components.ConfigureParametersComponents;
|
|
|
import com.ydtech.modules.order.components.huatai.HuaTaiRequestApiComponents;
|
|
|
+import com.ydtech.modules.order.components.huatai.HuiTaiUploadImageComponents;
|
|
|
import com.ydtech.modules.order.constants.InsuranceTypeCorrespondence;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
|
import com.ydtech.modules.order.entity.TaxArrears;
|
|
|
import com.ydtech.modules.order.entity.api.huatai.HuaTaiBaseRequestHead;
|
|
|
-import com.ydtech.modules.order.entity.api.huatai.request.HuaTaiQuotedPriceRequest;
|
|
|
-import com.ydtech.modules.order.entity.api.huatai.response.HuaTaiQuotedPriceResponse;
|
|
|
import com.ydtech.modules.order.entity.api.huatai.request.*;
|
|
|
import com.ydtech.modules.order.entity.api.huatai.response.*;
|
|
|
-import com.ydtech.modules.order.entity.api.zhongmei.constants.TimeConstants;
|
|
|
-import com.ydtech.modules.order.entity.api.zhongmei.constants.enums.SubmitStatus;
|
|
|
-import com.ydtech.modules.order.entity.api.zhongmei.request.ModelsQueryRequest;
|
|
|
-import com.ydtech.modules.order.entity.api.zhongmei.response.ModelsQueryResponse;
|
|
|
import com.ydtech.modules.order.entity.config.HuaTaiConfigureParameters;
|
|
|
-import com.ydtech.modules.order.entity.config.ZmConfigureParameters;
|
|
|
+import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
|
|
|
+import com.ydtech.modules.order.entity.dto.InsUploadImagesDto;
|
|
|
import com.ydtech.modules.order.entity.filter.CarModelsFilterUtils;
|
|
|
-import com.ydtech.modules.order.entity.vo.*;
|
|
|
+import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
|
|
|
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
|
+import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
|
|
|
+import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
|
|
|
import com.ydtech.modules.order.service.*;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
|
|
|
import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
|
|
|
@@ -42,13 +37,11 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.core.ParameterizedTypeReference;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.time.LocalDate;
|
|
|
-import java.time.LocalDateTime;
|
|
|
-import java.time.format.DateTimeFormatter;
|
|
|
-import java.util.*;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
@@ -71,6 +64,8 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
|
|
|
private final InsFeeOrderService insFeeOrderService;
|
|
|
|
|
|
+ private final HuiTaiUploadImageComponents huiTaiUploadImageComponents;
|
|
|
+
|
|
|
|
|
|
@Value("${upload.file.path}")
|
|
|
private String uploadFilePath;
|
|
|
@@ -81,10 +76,15 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
@Value("${api.url}")
|
|
|
private String apiUrl;
|
|
|
|
|
|
- public HuaTaiOrderApiServiceImpl(InsOrdersService insOrdersService, InsAreaCompanyService insAreaCompanyService, InsTaskImagesService insTaskImagesService,
|
|
|
+ public HuaTaiOrderApiServiceImpl(InsOrdersService insOrdersService,
|
|
|
+ InsAreaCompanyService insAreaCompanyService,
|
|
|
+ InsTaskImagesService insTaskImagesService,
|
|
|
HuaTaiRequestApiComponents huaTaiRequestApiComponents,
|
|
|
- ConfigureParametersComponents configureParametersComponents, PtlAgreementAttributionService ptlAgreementAttributionService,
|
|
|
- FeeRuleSchemeService feeRuleSchemeService, InsFeeOrderService insFeeOrderService) {
|
|
|
+ ConfigureParametersComponents configureParametersComponents,
|
|
|
+ PtlAgreementAttributionService ptlAgreementAttributionService,
|
|
|
+ FeeRuleSchemeService feeRuleSchemeService,
|
|
|
+ InsFeeOrderService insFeeOrderService,
|
|
|
+ HuiTaiUploadImageComponents huiTaiUploadImageComponents) {
|
|
|
this.insOrdersService = insOrdersService;
|
|
|
this.insAreaCompanyService = insAreaCompanyService;
|
|
|
this.insTaskImagesService = insTaskImagesService;
|
|
|
@@ -93,6 +93,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
this.ptlAgreementAttributionService = ptlAgreementAttributionService;
|
|
|
this.feeRuleSchemeService = feeRuleSchemeService;
|
|
|
this.insFeeOrderService = insFeeOrderService;
|
|
|
+ this.huiTaiUploadImageComponents = huiTaiUploadImageComponents;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -115,7 +116,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
List<HuaTaiModelsQueryResponse.CarModelDto> carModelDtos = huaTaiRequestApiComponents.modelQuery(huaTaiModelsQueryRequest, HuaTaiModelsQueryResponse.class);
|
|
|
|
|
|
List<HuaTaiModelsQueryResponse.CarModelDto.FullCarDataDto> fullCarDataDtos = new ArrayList<>();
|
|
|
- for(HuaTaiModelsQueryResponse.CarModelDto carModelDto : carModelDtos){
|
|
|
+ for (HuaTaiModelsQueryResponse.CarModelDto carModelDto : carModelDtos) {
|
|
|
fullCarDataDtos.add(carModelDto.getFullCarData());
|
|
|
}
|
|
|
// 2.2 过滤车型
|
|
|
@@ -125,17 +126,17 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
|
|
|
HuaTaiActualValueResponse actualValueResponse = null;
|
|
|
for (RiskInfoVo riskInfoVo : quoteInfo.getRiskList()) {
|
|
|
- if("0510".equals(riskInfoVo.getRiskCode())){
|
|
|
+ if ("0510".equals(riskInfoVo.getRiskCode())) {
|
|
|
String startDate = riskInfoVo.getStartDate();
|
|
|
- HuaTaiActualValueRequest huaTaiActualValueRequest = new HuaTaiActualValueRequest(carInfo,fullCarDataDto,startDate);
|
|
|
+ HuaTaiActualValueRequest huaTaiActualValueRequest = new HuaTaiActualValueRequest(carInfo, fullCarDataDto, startDate);
|
|
|
huaTaiActualValueRequest.setHead(baseRequestHead);
|
|
|
- actualValueResponse = huaTaiRequestApiComponents.actualValue(huaTaiActualValueRequest,HuaTaiActualValueResponse.class);
|
|
|
+ actualValueResponse = huaTaiRequestApiComponents.actualValue(huaTaiActualValueRequest, HuaTaiActualValueResponse.class);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
// 3 组装报价参数
|
|
|
- HuaTaiQuotedPriceRequest quotedPriceRequest = new HuaTaiQuotedPriceRequest(quoteInfo, fullCarDataDto,actualValueResponse, zmQuoteVo.getAccidentalDrivingVo(), huaTaiConfigureParameters);
|
|
|
+ HuaTaiQuotedPriceRequest quotedPriceRequest = new HuaTaiQuotedPriceRequest(quoteInfo, fullCarDataDto, actualValueResponse, zmQuoteVo.getAccidentalDrivingVo(), huaTaiConfigureParameters);
|
|
|
quotedPriceRequest.setHead(baseRequestHead);
|
|
|
|
|
|
HuaTaiQuotedPriceResponse quotedPriceResponse = huaTaiRequestApiComponents.quotedPrice(quotedPriceRequest, HuaTaiQuotedPriceResponse.class);
|
|
|
@@ -147,6 +148,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
|
|
|
/**
|
|
|
* 转投保接口
|
|
|
+ *
|
|
|
* @param companyId 子订单号
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -159,7 +161,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
YaQuoteInfoVo yaQuoteInfoVo = new YaQuoteInfoVo(insOrders);
|
|
|
|
|
|
// 2. 调用转投保接口
|
|
|
- HuaTaiSubmitResponse response = submitForUnderwriting(yaQuoteInfoVo,insAreaCompany, huaTaiConfigureParameters);
|
|
|
+ HuaTaiSubmitResponse response = submitForUnderwriting(yaQuoteInfoVo, insAreaCompany, huaTaiConfigureParameters);
|
|
|
|
|
|
/**
|
|
|
* 0 下发修改
|
|
|
@@ -176,78 +178,78 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
String syStatus = "";
|
|
|
StringBuffer jqNotion = new StringBuffer();
|
|
|
StringBuffer syNotion = new StringBuffer();
|
|
|
- for(HuaTaiSubmitResponse.AppliResult appliResult:response.getAppliResult()){
|
|
|
+ for (HuaTaiSubmitResponse.AppliResult appliResult : response.getAppliResult()) {
|
|
|
appliResult.getStatus();
|
|
|
- if(StringUtils.isNotEmpty(insAreaCompany.getJqapplyno())){
|
|
|
+ if (StringUtils.isNotEmpty(insAreaCompany.getJqapplyno())) {
|
|
|
haveJQFlag = true;
|
|
|
- if(insAreaCompany.getJqapplyno().equals(appliResult.getContractNo())){
|
|
|
+ if (insAreaCompany.getJqapplyno().equals(appliResult.getContractNo())) {
|
|
|
jqStatus = appliResult.getStatus();
|
|
|
- for(HuaTaiSubmitResponse.Notion notion:appliResult.getNotion()){
|
|
|
- jqNotion.append(notion.getUWResult()+",");
|
|
|
+ for (HuaTaiSubmitResponse.Notion notion : appliResult.getNotion()) {
|
|
|
+ jqNotion.append(notion.getUWNotion() + ",");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno().equals(appliResult.getContractNo())){
|
|
|
+ if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno().equals(appliResult.getContractNo())) {
|
|
|
haveSYFlag = true;
|
|
|
- if(insAreaCompany.getJqapplyno().equals(appliResult.getContractNo())){
|
|
|
+ if (insAreaCompany.getJqapplyno().equals(appliResult.getContractNo())) {
|
|
|
syStatus = appliResult.getStatus();
|
|
|
- for(HuaTaiSubmitResponse.Notion notion:appliResult.getNotion()){
|
|
|
- syNotion.append(notion.getUWResult()+",");
|
|
|
+ for (HuaTaiSubmitResponse.Notion notion : appliResult.getNotion()) {
|
|
|
+ syNotion.append(notion.getUWNotion() + ",");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
String totalStatus = "";
|
|
|
//同保交商
|
|
|
- if(haveJQFlag && haveSYFlag){
|
|
|
+ if (haveJQFlag && haveSYFlag) {
|
|
|
//自核通过 和 强制自核
|
|
|
- if("4,7".contains(jqStatus) && "4,7".contains(syStatus)){
|
|
|
+ if ("4,7".contains(jqStatus) && "4,7".contains(syStatus)) {
|
|
|
totalStatus = "4";
|
|
|
}
|
|
|
//转人工和转复核
|
|
|
- if("1,3".contains(jqStatus) || "1,3".contains(syStatus)){
|
|
|
+ if ("1,3".contains(jqStatus) || "1,3".contains(syStatus)) {
|
|
|
totalStatus = "1";
|
|
|
}
|
|
|
- if("0,6,7".contains(jqStatus) || "0,6,7".contains(syStatus)){
|
|
|
+ if ("0,6,7".contains(jqStatus) || "0,6,7".contains(syStatus)) {
|
|
|
totalStatus = "0";
|
|
|
}
|
|
|
- }else if((haveJQFlag && !haveSYFlag)||(!haveJQFlag && haveSYFlag)){//单保交强或单保商业
|
|
|
+ } else if ((haveJQFlag && !haveSYFlag) || (!haveJQFlag && haveSYFlag)) {//单保交强或单保商业
|
|
|
String status = jqStatus;
|
|
|
- if(StringUtils.isNotEmpty(syStatus)){
|
|
|
+ if (StringUtils.isNotEmpty(syStatus)) {
|
|
|
status = syStatus;
|
|
|
}
|
|
|
- if("4,7".contains(status)){
|
|
|
+ if ("4,7".contains(status)) {
|
|
|
totalStatus = "4";
|
|
|
- }else if("1,3".contains(status)){
|
|
|
+ } else if ("1,3".contains(status)) {
|
|
|
totalStatus = "1";
|
|
|
- }else if("0,6,7".contains(status)){
|
|
|
+ } else if ("0,6,7".contains(status)) {
|
|
|
totalStatus = "0";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
- if("4".equals(totalStatus)){
|
|
|
+ if ("4".equals(totalStatus)) {
|
|
|
//再调用缴费接口获取缴费链接
|
|
|
- HuaTaiPaymentUrlRequest huaTaiPaymentUrlRequest = new HuaTaiPaymentUrlRequest(insAreaCompany,huaTaiConfigureParameters);
|
|
|
- huaTaiPaymentUrlRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
- HuaTaiPaymentUrlResponse paymentUrlResponse = huaTaiRequestApiComponents.getPaymentUrl(huaTaiPaymentUrlRequest, HuaTaiPaymentUrlResponse.class);
|
|
|
- if(StringUtils.isNotEmpty(paymentUrlResponse.getPayUrl())){
|
|
|
- insAreaCompany.setPaymentLink(paymentUrlResponse.getPayUrl());
|
|
|
+ String payUrl = getPaymentUrl(insAreaCompany, huaTaiConfigureParameters);
|
|
|
+ if (StringUtils.isNotEmpty(payUrl)) {
|
|
|
+ insAreaCompany.setPaymentLink(payUrl);
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
+ insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
+ return HttpResult.ok("核保成功");
|
|
|
+ } else {
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
|
+ insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
+ return HttpResult.error("获取支付链接失败");
|
|
|
}
|
|
|
- insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
- insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
- return HttpResult.ok("核保成功");
|
|
|
- }else if("1".equals(totalStatus)){
|
|
|
+ } else if ("1".equals(totalStatus)) {
|
|
|
//再次调用提交核保接口
|
|
|
- HuaTaiSubmitStatusQueryRequest huaTaiSubmitStatusQueryRequest = new HuaTaiSubmitStatusQueryRequest(insAreaCompany,huaTaiConfigureParameters,"1");
|
|
|
- huaTaiSubmitStatusQueryRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
- HuaTaiSubmitStatusQueryResponse submitStatusQueryResponse = huaTaiRequestApiComponents.submitStatus(huaTaiSubmitStatusQueryRequest, HuaTaiSubmitStatusQueryResponse.class);
|
|
|
+ HuaTaiSubmitStatusQueryResponse submitStatusQueryResponse = submitStatus(insAreaCompany, huaTaiConfigureParameters, "1");
|
|
|
//根据核保返回信息进行更新
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.error("已转人工核保");
|
|
|
- }else {
|
|
|
- String notion = jqNotion.toString()+syNotion.toString();
|
|
|
+ } else {
|
|
|
+ String notion = jqNotion.toString() + syNotion.toString();
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.error(notion);
|
|
|
@@ -256,12 +258,28 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
|
|
|
@Override
|
|
|
public HttpResult<Object> submitImage(String companyId) {
|
|
|
+ InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
|
|
|
+
|
|
|
+ // 1. 协议id获取配置实体
|
|
|
+ HuaTaiConfigureParameters huaTaiConfigureParameters = configureParametersComponents.toEntity(HuaTaiConfigureParameters.class, insAreaCompany.getAgreementId());
|
|
|
+ InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
+ List<InsUploadImagesDto> insUploadImagesDtoList = insTaskImagesService.findImageByOrderNo(insOrders.getOrderno());
|
|
|
+ if (insUploadImagesDtoList.isEmpty()) {
|
|
|
+ throw new SystemException("请检查影像是否上传了");
|
|
|
+ }
|
|
|
+ HuaTaiUploadImageRequest request = new HuaTaiUploadImageRequest(insAreaCompany, huaTaiConfigureParameters);
|
|
|
+ request.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
+ //调用华泰影像接口获取上传链接地址
|
|
|
+ HuaTaiUploadImageResponse response = huaTaiRequestApiComponents.uploadImage(request, HuaTaiUploadImageResponse.class);
|
|
|
+ //爬虫方式进行图片上传
|
|
|
+ huiTaiUploadImageComponents.uploadImage(response.getUrl(), insUploadImagesDtoList);
|
|
|
return HttpResult.ok("上传文件成功");
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 缴费查询
|
|
|
+ *
|
|
|
* @param companyId 子订单号
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -275,112 +293,127 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
if (insAreaCompany.getOrderstatus().equals(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode())) {
|
|
|
return HttpResult.ok(InsOrderStatusEnum.ACCEPT_INSURANCE.getDesc());
|
|
|
}
|
|
|
-
|
|
|
// 2. 组装请求体
|
|
|
- HuaTaiOrderStatusRequest orderStatusRequest = new HuaTaiOrderStatusRequest(insAreaCompany,huaTaiConfigureParameters);
|
|
|
+ HuaTaiOrderStatusRequest orderStatusRequest = new HuaTaiOrderStatusRequest(insAreaCompany, huaTaiConfigureParameters);
|
|
|
orderStatusRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
-
|
|
|
HuaTaiOrderStatusResponse orderStatusResponse = huaTaiRequestApiComponents.orderStatus(orderStatusRequest, HuaTaiOrderStatusResponse.class);
|
|
|
- return HttpResult.ok("");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /* *//**
|
|
|
- * 缴费查询
|
|
|
- * @param companyId 子订单号
|
|
|
- * @return
|
|
|
- *//*
|
|
|
- @Override
|
|
|
- public HttpResult<Object> getPaymentUrl(String companyId) {
|
|
|
- InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(companyId);
|
|
|
-
|
|
|
- // 1. 协议id获取配置实体
|
|
|
- HuaTaiConfigureParameters huaTaiConfigureParameters = configureParametersComponents.toEntity(HuaTaiConfigureParameters.class, insAreaCompany.getAgreementId());
|
|
|
|
|
|
- if (insAreaCompany.getOrderstatus().equals(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode())) {
|
|
|
- return HttpResult.ok(InsOrderStatusEnum.ACCEPT_INSURANCE.getDesc());
|
|
|
+ boolean jqExistFlag = false;
|
|
|
+ boolean syExistFlag = false;
|
|
|
+ String jqFailReason = "";
|
|
|
+ String syFailReason = "";
|
|
|
+ List<HuaTaiOrderStatusResponse.PayDetaiDto> payDetaiList = orderStatusResponse.getPayDetaiList();
|
|
|
+ for (HuaTaiOrderStatusResponse.PayDetaiDto payDetai : payDetaiList) {
|
|
|
+ insAreaCompany.getJqapplyno();
|
|
|
+ //交强保单号存值
|
|
|
+ if (StringUtils.isNotEmpty(insAreaCompany.getJqapplyno()) && insAreaCompany.getJqapplyno().equals(payDetai.getBUSINESSNO())) {
|
|
|
+ if ("1".equals(payDetai.getPOLICYSTATUS())) {
|
|
|
+ jqExistFlag = true;
|
|
|
+ insAreaCompany.setJqpolicyno(payDetai.getPOLICYNO());
|
|
|
+ } else {
|
|
|
+ jqFailReason = payDetai.getFAILREASON();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //商业保单号存值
|
|
|
+ if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno().equals(payDetai.getBUSINESSNO())) {
|
|
|
+ if ("1".equals(payDetai.getPOLICYSTATUS())) {
|
|
|
+ syExistFlag = true;
|
|
|
+ insAreaCompany.setSypolicyno(payDetai.getPOLICYNO());
|
|
|
+ } else {
|
|
|
+ syFailReason = payDetai.getFAILREASON();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (jqExistFlag || syExistFlag) {
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
+ insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
+ return HttpResult.ok("保单生成成功");
|
|
|
+ } else {
|
|
|
+ if (StringUtils.isNotEmpty(jqFailReason) || StringUtils.isNotEmpty(syFailReason)) {
|
|
|
+ return HttpResult.error("保单生成失败,原因为:" + jqFailReason + syFailReason);
|
|
|
+ } else {
|
|
|
+ return HttpResult.error("保单生成失败,华泰返回异常,请联系管理员排查!");
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- // 2. 组装请求体 调用缴费接口获取缴费链接
|
|
|
- HuaTaiPaymentUrlRequest huaTaiPaymentUrlRequest = new HuaTaiPaymentUrlRequest(insAreaCompany,huaTaiConfigureParameters);
|
|
|
+ private String getPaymentUrl(InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters) {
|
|
|
+ String payUrl = "";
|
|
|
+ HuaTaiPaymentUrlRequest huaTaiPaymentUrlRequest = new HuaTaiPaymentUrlRequest(insAreaCompany, huaTaiConfigureParameters);
|
|
|
huaTaiPaymentUrlRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
HuaTaiPaymentUrlResponse paymentUrlResponse = huaTaiRequestApiComponents.getPaymentUrl(huaTaiPaymentUrlRequest, HuaTaiPaymentUrlResponse.class);
|
|
|
- if(StringUtils.isNotEmpty(paymentUrlResponse.getPayUrl())){
|
|
|
- insAreaCompany.setPaymentLink(paymentUrlResponse.getPayUrl());
|
|
|
+ if (StringUtils.isNotEmpty(paymentUrlResponse.getPayUrl())) {
|
|
|
+ payUrl = paymentUrlResponse.getPayUrl();
|
|
|
}
|
|
|
- insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
- insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
- return HttpResult.ok("核保成功");
|
|
|
- }*/
|
|
|
+ return payUrl;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
- *电子保单下载接口
|
|
|
+ * 电子保单下载接口
|
|
|
+ *
|
|
|
* @param policyPrintVo
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public HttpResult<List<String>> getPolicyPrint(PolicyPrintVo policyPrintVo) {
|
|
|
+ public HttpResult<CrawlerPolicyPrintVo> getPolicyPrint(PolicyPrintVo policyPrintVo) {
|
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getById(policyPrintVo.getCompanyId());
|
|
|
// 1. 协议id获取配置实体
|
|
|
HuaTaiConfigureParameters huaTaiConfigureParameters = configureParametersComponents.toEntity(HuaTaiConfigureParameters.class, insAreaCompany.getAgreementId());
|
|
|
- InsOrders order = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
- String policyNo;
|
|
|
+ InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
|
|
|
+ String licensePlate = insOrders.getLicenseno();
|
|
|
+ YaQuoteInfoVo yaQuoteInfoVo = new YaQuoteInfoVo(insOrders);
|
|
|
+ String password = yaQuoteInfoVo.getInsuredPersonInfo().getIdentifyNumber();
|
|
|
String riskCode = policyPrintVo.getRiskCode();
|
|
|
+ // 2. 组装请求体
|
|
|
+ HuaTaiInsurancePolicyPrintRequest request = new HuaTaiInsurancePolicyPrintRequest();
|
|
|
if (InsuranceRisk.TRAFFIC.getCode().equals(riskCode)) {
|
|
|
- policyNo = insAreaCompany.getJqpolicyno();
|
|
|
+ request.setBusinessNo(insAreaCompany.getJqpolicyno());
|
|
|
} else if (InsuranceRisk.BUSINESS.getCode().equals(riskCode)) {
|
|
|
- policyNo = insAreaCompany.getJqpolicyno();
|
|
|
+ request.setBusinessNo(insAreaCompany.getSypolicyno());
|
|
|
} else {
|
|
|
throw new SystemException("险种代码不存在");
|
|
|
}
|
|
|
-
|
|
|
- // 2. 组装请求体
|
|
|
- HuaTaiInsurancePolicyPrintRequest request = new HuaTaiInsurancePolicyPrintRequest();
|
|
|
- request.setBusinessNo(policyNo);
|
|
|
+ request.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
HuaTaiInsurancePolicyPrintResponse response = huaTaiRequestApiComponents.insurancePolicyPrint(request, HuaTaiInsurancePolicyPrintResponse.class);
|
|
|
- if("0000".equals(response.getRegistResult())){
|
|
|
- List<String> urlList = response.getElecDownLoadResultList();
|
|
|
+ CrawlerPolicyPrintVo crawlerPolicyPrintVo = new CrawlerPolicyPrintVo();
|
|
|
+ if ("0".equals(response.getHead().getReturnCode())) {
|
|
|
+ List<HuaTaiInsurancePolicyPrintResponse.ElecDownLoadResultDto> urlList = response.getElecDownLoadResultList();
|
|
|
//接口文档与返回示例不一致,待联调后修改
|
|
|
|
|
|
-
|
|
|
- /* if(urlList!=null && !urlList.isEmpty()){
|
|
|
- String url = urlList.get(0);
|
|
|
- String templateName = "";
|
|
|
- if("DZ_AJ".equals(code)){
|
|
|
- templateName = "-交强险标志.pdf";
|
|
|
- }else if("DZ_AE".equals(code)){
|
|
|
- if("0330".equals(request.getRiskCode())){
|
|
|
- templateName = "-交强险保单.pdf";
|
|
|
- }else {
|
|
|
- templateName = "-商业险保单.pdf";
|
|
|
- }
|
|
|
- }
|
|
|
- String transferUrl = gainCarInsPolicy(url, licensePlate + templateName, licensePlate);
|
|
|
- List<String> transferUrlList = new ArrayList<>();
|
|
|
- transferUrlList.add(transferUrl);
|
|
|
- response.setDownloadUrl(transferUrlList);
|
|
|
- }*/
|
|
|
- }else{
|
|
|
- return HttpResult.error("获取华泰电子保单失败:"+response.getRegistResult());
|
|
|
+ if (urlList != null && !urlList.isEmpty()) {
|
|
|
+ for (HuaTaiInsurancePolicyPrintResponse.ElecDownLoadResultDto elecDownLoadResultDto : urlList) {
|
|
|
+ String url = elecDownLoadResultDto.getDownURL();
|
|
|
+ if (InsuranceRisk.TRAFFIC.getCode().equals(riskCode)) {
|
|
|
+ crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicy(url, licensePlate + "-交强险保单.pdf", licensePlate, password));
|
|
|
+ crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicy(url, licensePlate + "-交强险标志.pdf", licensePlate, password));
|
|
|
+ } else if (InsuranceRisk.BUSINESS.getCode().equals(riskCode)) {
|
|
|
+ crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicy(url, licensePlate + "-商业险保单.pdf", licensePlate, password));
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 先下载到本地,然后再解压到固定路径
|
|
|
+ */
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return HttpResult.error("获取华泰电子保单失败:" + response.getRegistResult());
|
|
|
}
|
|
|
- return HttpResult.ok("下载成功"/*, response.getDownloadUrl()*/);
|
|
|
+ return HttpResult.ok("下载成功", crawlerPolicyPrintVo);
|
|
|
}
|
|
|
|
|
|
- public String gainCarInsPolicy(String url, String fileName, String licensePlate) {
|
|
|
+ public String gainCarInsPolicy(String url, String fileName, String licensePlate, String password) {
|
|
|
String dir = "carInsPolicy/" + licensePlate + "/";
|
|
|
- return FileUtil.netUrlToFile(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl);
|
|
|
+ return FileUtil.netUrlStoreToLocal(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl, password, licensePlate);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- *
|
|
|
* @param yaQuoteInfoVo
|
|
|
* @param insAreaCompany
|
|
|
* @param huaTaiConfigureParameters
|
|
|
* @return
|
|
|
*/
|
|
|
- public HuaTaiSubmitResponse submitForUnderwriting(YaQuoteInfoVo yaQuoteInfoVo, InsAreaCompany insAreaCompany,HuaTaiConfigureParameters huaTaiConfigureParameters) {
|
|
|
- HuaTaiSubmitRequest submitRequest = new HuaTaiSubmitRequest(yaQuoteInfoVo,insAreaCompany,huaTaiConfigureParameters);
|
|
|
-
|
|
|
+ public HuaTaiSubmitResponse submitForUnderwriting(YaQuoteInfoVo yaQuoteInfoVo, InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters) {
|
|
|
+ HuaTaiSubmitRequest submitRequest = new HuaTaiSubmitRequest(yaQuoteInfoVo, insAreaCompany, huaTaiConfigureParameters);
|
|
|
submitRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
return huaTaiRequestApiComponents.submit(submitRequest, HuaTaiSubmitResponse.class);
|
|
|
}
|
|
|
@@ -392,31 +425,29 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
double syDiscount = 0;
|
|
|
String jqApplyNo = "";
|
|
|
String syApplyNo = "";
|
|
|
- List<HuaTaiQuotedPriceResponse.ContractDto.CoverageDto> syCoverageDtoList =null;
|
|
|
+ List<HuaTaiQuotedPriceResponse.ContractDto.CoverageDto> syCoverageDtoList = null;
|
|
|
HuaTaiQuotedPriceResponse.ContractDto.TaxDto taxDto = null;
|
|
|
List<HuaTaiQuotedPriceResponse.ContractDto> contractDtoList = quotedPriceResponse.getBusinessData().getContract();
|
|
|
- for(HuaTaiQuotedPriceResponse.ContractDto contractDto:contractDtoList){
|
|
|
+ for (HuaTaiQuotedPriceResponse.ContractDto contractDto : contractDtoList) {
|
|
|
HuaTaiQuotedPriceResponse.ContractDto.ContractMainDto contractMain = contractDto.getContractMain();
|
|
|
- if("1002".equals(contractMain.getRiskCode())){
|
|
|
+ if ("1002".equals(contractMain.getRiskCode())) {
|
|
|
taxDto = contractDto.getTax();
|
|
|
jqDiscount = contractMain.getTotalAdjustRate();
|
|
|
jqPremium = contractMain.getTotalPremium();
|
|
|
jqApplyNo = contractMain.getContractNo();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
syCoverageDtoList = contractDto.getCoverage();
|
|
|
syDiscount = contractMain.getTotalAdjustRate();
|
|
|
syPremium = contractMain.getTotalPremium();
|
|
|
syApplyNo = contractMain.getContractNo();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
QuoteRespVo quoteRespVo = new QuoteRespVo();
|
|
|
-
|
|
|
List<RiskInfoVo> riskList = yaQuoteInfoVo.getRiskList();
|
|
|
// 报价险种放入保费
|
|
|
List<QuoteRiskRespVo> riskList1 = QuoteRiskRespVo.toQuoteRiskRespVoList(riskList, jqPremium, syPremium);
|
|
|
|
|
|
- for(QuoteRiskRespVo quoteRiskRespVo:riskList1){
|
|
|
+ for (QuoteRiskRespVo quoteRiskRespVo : riskList1) {
|
|
|
if (InsuranceRisk.TRAFFIC.getCode().equals(quoteRiskRespVo.getRiskCode())) {
|
|
|
quoteRespVo.setStartDateJq(quoteRiskRespVo.getStartDate());
|
|
|
quoteRespVo.setEndDateJq(quoteRiskRespVo.getEndDate());
|
|
|
@@ -446,7 +477,6 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
kindList1.add(kind);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
quoteRespVo.setRiskList(riskList1);
|
|
|
quoteRespVo.setKindList(kindList1);
|
|
|
quoteRespVo.setJqPremium(jqPremium);
|
|
|
@@ -458,7 +488,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
|
|
|
double sumPayTax = 0;
|
|
|
if (!ObjectUtils.isEmpty(taxDto)) {
|
|
|
- sumPayTax = taxDto.getSumTax();
|
|
|
+ sumPayTax = taxDto.getSumTax();
|
|
|
}
|
|
|
quoteRespVo.setCiSumPermium(CalculateUtils.add(jqPremium, sumPayTax));//交强险和车船税合计
|
|
|
quoteRespVo.setSumPermium(CalculateUtils.add(jqPremium, syPremium, sumPayTax));//保费合计
|
|
|
@@ -480,22 +510,22 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
List<HuaTaiQuotedPriceResponse.ContractDto> contractDtoList = quotedPriceResponse.getBusinessData().getContract();
|
|
|
String jqQuerySequenceNo = " ";
|
|
|
String syQuerySequenceNo = " ";
|
|
|
- for(HuaTaiQuotedPriceResponse.ContractDto contractDto:contractDtoList) {
|
|
|
+ for (HuaTaiQuotedPriceResponse.ContractDto contractDto : contractDtoList) {
|
|
|
HuaTaiQuotedPriceResponse.ContractDto.ContractMainDto contractMain = contractDto.getContractMain();
|
|
|
HuaTaiQuotedPriceResponse.ContractDto.PlatFormMessageDto platFormMessageDto = contractDto.getPlatFormMessage();
|
|
|
if ("1002".equals(contractMain.getRiskCode())) {
|
|
|
jqQuerySequenceNo = platFormMessageDto.getQuerySequenceNo();
|
|
|
taxDto = contractDto.getTax();
|
|
|
// 车船税
|
|
|
- TaxArrears taxArrears = new TaxArrears("往年欠税",taxDto.getSumTaxDefault(), taxDto.getSumOverdue());
|
|
|
+ TaxArrears taxArrears = new TaxArrears("往年欠税", taxDto.getSumTaxDefault(), taxDto.getSumOverdue());
|
|
|
List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
|
|
|
insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
|
|
|
quoteRespVo.setTaxArrears(taxArrearsList);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
syQuerySequenceNo = platFormMessageDto.getQuerySequenceNo();
|
|
|
}
|
|
|
}
|
|
|
- insAreaCompany.setInsOrderNo(jqQuerySequenceNo+"-"+syQuerySequenceNo);
|
|
|
+ insAreaCompany.setInsOrderNo(jqQuerySequenceNo + "-" + syQuerySequenceNo);
|
|
|
quoteRespVo.setCompanyId(insAreaCompany.getId());
|
|
|
insAreaCompanyService.insertCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.ok(quotedPriceResponse.getHead().getReturnMessage(), quoteRespVo);
|
|
|
@@ -503,12 +533,13 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
|
|
|
/**
|
|
|
* 提交核保及查询核保状态接口
|
|
|
+ *
|
|
|
* @param companyId
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
public HttpResult<Object> auditStatusQuery(String companyId) {
|
|
|
- InsAreaCompany insAreaCompany = insAreaCompanyService.getByInsOrderNo(companyId);
|
|
|
+ InsAreaCompany insAreaCompany = insAreaCompanyService.getById(companyId);
|
|
|
// 1. 协议id获取配置实体
|
|
|
HuaTaiConfigureParameters huaTaiConfigureParameters = configureParametersComponents.toEntity(HuaTaiConfigureParameters.class, insAreaCompany.getAgreementId());
|
|
|
|
|
|
@@ -517,26 +548,111 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
}
|
|
|
|
|
|
// 2. 组装请求体
|
|
|
- HuaTaiSubmitStatusQueryRequest submitStatusQueryRequest = new HuaTaiSubmitStatusQueryRequest();
|
|
|
- submitStatusQueryRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
-
|
|
|
- HuaTaiSubmitStatusQueryResponse submitStatusQueryResponse = huaTaiRequestApiComponents.submitStatus(submitStatusQueryRequest, HuaTaiSubmitStatusQueryResponse.class);
|
|
|
- String underWriteInd="";
|
|
|
+ boolean haveJQFlag = false;
|
|
|
+ boolean haveSYFlag = false;
|
|
|
+ String jqStatus = "";
|
|
|
+ String syStatus = "";
|
|
|
+ StringBuffer jqNotion = new StringBuffer();
|
|
|
+ StringBuffer syNotion = new StringBuffer();
|
|
|
+ HuaTaiSubmitStatusQueryResponse submitStatusQueryResponse = submitStatus(insAreaCompany, huaTaiConfigureParameters, "2");
|
|
|
+ for (HuaTaiSubmitStatusQueryResponse.AppliResult appliResult : submitStatusQueryResponse.getAppliResult()) {
|
|
|
+ if (StringUtils.isNotEmpty(insAreaCompany.getJqapplyno())) {
|
|
|
+ haveJQFlag = true;
|
|
|
+ if (insAreaCompany.getJqapplyno().equals(appliResult.getContractNo())) {
|
|
|
+ jqStatus = appliResult.getUnderWriteFlag();
|
|
|
+ for (HuaTaiSubmitStatusQueryResponse.Notion notion : appliResult.getNotion()) {
|
|
|
+ jqNotion.append(notion.getUWNotion() + ",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno().equals(appliResult.getContractNo())) {
|
|
|
+ haveSYFlag = true;
|
|
|
+ if (insAreaCompany.getJqapplyno().equals(appliResult.getContractNo())) {
|
|
|
+ syStatus = appliResult.getUnderWriteFlag();
|
|
|
+ for (HuaTaiSubmitStatusQueryResponse.Notion notion : appliResult.getNotion()) {
|
|
|
+ syNotion.append(notion.getUWNotion() + ",");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 0 初始状态默认值
|
|
|
+ * 1 已通过核保已实收
|
|
|
+ * 2 待修改
|
|
|
+ * 4 主动撤回(出单员撤回)
|
|
|
+ * 6 下发修改(核保员下发)
|
|
|
+ * 8 已通过核保未实收
|
|
|
+ * 9 待核保
|
|
|
+ */
|
|
|
+ String totalUnderWriteInd = "";
|
|
|
+ //同保交商
|
|
|
+ if (haveJQFlag && haveSYFlag) {
|
|
|
+ //已通过核保未实收
|
|
|
+ if ("8".contains(jqStatus) && "8".contains(syStatus)) {
|
|
|
+ totalUnderWriteInd = "8";
|
|
|
+ } else if ("1".contains(jqStatus) || "1".contains(syStatus)) {
|
|
|
+ totalUnderWriteInd = "1";
|
|
|
+ } else if ("9".contains(jqStatus) || "9".contains(syStatus)) {
|
|
|
+ totalUnderWriteInd = "9";
|
|
|
+ } else {
|
|
|
+ totalUnderWriteInd = "6";
|
|
|
+ }
|
|
|
+ } else if ((haveJQFlag && !haveSYFlag) || (!haveJQFlag && haveSYFlag)) {//单保交强或单保商业
|
|
|
+ String status = jqStatus;
|
|
|
+ if (StringUtils.isNotEmpty(syStatus)) {
|
|
|
+ status = syStatus;
|
|
|
+ }
|
|
|
+ if ("8".contains(status)) {
|
|
|
+ totalUnderWriteInd = "8";
|
|
|
+ } else if ("1".contains(status)) {
|
|
|
+ totalUnderWriteInd = "1";
|
|
|
+ } else if ("9".contains(status)) {
|
|
|
+ totalUnderWriteInd = "9";
|
|
|
+ } else {
|
|
|
+ totalUnderWriteInd = "6";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String underWriteInd = "";
|
|
|
// 3. 通过返回核保状态修改状态
|
|
|
- if ("核保通过".equals(underWriteInd) || "自动核保".equals(underWriteInd)) {
|
|
|
-// insAreaCompany.setPaymentLink(submitStatusQueryResponse.getPayUrl());//需要调用接口获取支付链接
|
|
|
- insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());//当核保状态返回核保通过时,调整保单状态为已核保待缴费
|
|
|
- insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
- return HttpResult.ok(underWriteInd);
|
|
|
- }else if("核保不通过".equals(underWriteInd)){//当状态为核保不通过时,调整保单状态为报价中
|
|
|
+ if ("8".equals(totalUnderWriteInd)) {
|
|
|
+ //再调用缴费接口获取缴费链接
|
|
|
+ String payUrl = getPaymentUrl(insAreaCompany, huaTaiConfigureParameters);
|
|
|
+ if (StringUtils.isNotEmpty(payUrl)) {
|
|
|
+ insAreaCompany.setPaymentLink(payUrl);
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
+ insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
+ return HttpResult.ok("核保成功");
|
|
|
+ } else {
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
|
+ insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
+ return HttpResult.error("获取支付链接失败");
|
|
|
+ }
|
|
|
+ } else if ("6".equals(underWriteInd)) {//当状态为核保不通过时,调整保单状态为报价中
|
|
|
+ String notion = jqNotion.toString() + syNotion.toString();
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
- return HttpResult.error("核保不通过:"/*+submitStatusQueryResponse.getIssuedReason()*/);//需要处理放入核保原因
|
|
|
- }else {
|
|
|
+ return HttpResult.error("核保不通过:" + notion);//需要处理放入核保原因
|
|
|
+ } else if ("9".equals(underWriteInd)) {//当状态为核保不通过时,调整保单状态为报价中
|
|
|
+ return HttpResult.ok("正在核保中");//需要处理放入核保原因
|
|
|
+ } else {
|
|
|
return HttpResult.ok(underWriteInd);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 提交核保或核保查询接口
|
|
|
+ *
|
|
|
+ * @param insAreaCompany
|
|
|
+ * @param huaTaiConfigureParameters
|
|
|
+ * @param operateType 1为提交 2为查询
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private HuaTaiSubmitStatusQueryResponse submitStatus(InsAreaCompany insAreaCompany, HuaTaiConfigureParameters huaTaiConfigureParameters, String operateType) {
|
|
|
+ HuaTaiSubmitStatusQueryRequest huaTaiSubmitStatusQueryRequest = new HuaTaiSubmitStatusQueryRequest(insAreaCompany, huaTaiConfigureParameters, operateType);
|
|
|
+ huaTaiSubmitStatusQueryRequest.setHead(new HuaTaiBaseRequestHead(huaTaiConfigureParameters));
|
|
|
+ HuaTaiSubmitStatusQueryResponse submitStatusQueryResponse = huaTaiRequestApiComponents.submitStatus(huaTaiSubmitStatusQueryRequest, HuaTaiSubmitStatusQueryResponse.class);
|
|
|
+ return submitStatusQueryResponse;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|