|
@@ -159,21 +159,24 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
// 3.1 处理报价请求
|
|
// 3.1 处理报价请求
|
|
|
List<String> warnMessageList = new ArrayList<>();
|
|
List<String> warnMessageList = new ArrayList<>();
|
|
|
HuaTaiQuotedPriceResponse quotedPriceResponse = huaTaiQuotationProcessorComponent.handler(quoteInfo, quotedPriceRequest, warnMessageList,
|
|
HuaTaiQuotedPriceResponse quotedPriceResponse = huaTaiQuotationProcessorComponent.handler(quoteInfo, quotedPriceRequest, warnMessageList,
|
|
|
- huaTaiConfigureParameters.getInsuredCode(), zmQuoteVo.getCompanyId() ,maxQuoteNum,sysQuoteRecords);
|
|
|
|
|
|
|
+ huaTaiConfigureParameters.getInsuredCode(), zmQuoteVo.getCompanyId(), maxQuoteNum, sysQuoteRecords);
|
|
|
|
|
|
|
|
if (!"0".equals(quotedPriceResponse.getHead().getReturnCode())) {
|
|
if (!"0".equals(quotedPriceResponse.getHead().getReturnCode())) {
|
|
|
log.error(quotedPriceResponse.getHead().getReturnMessage());
|
|
log.error(quotedPriceResponse.getHead().getReturnMessage());
|
|
|
InsOrders order = insOrdersService.getById(quoteInfo.getOrderNo());
|
|
InsOrders order = insOrdersService.getById(quoteInfo.getOrderNo());
|
|
|
- String subOrderNo = insOrdersService.responseFailedOrder(zmQuoteVo, quoteInfo, ptlAgreementAttribution, order,quotedPriceResponse.getHead().getReturnMessage(),InsOrderStatusEnum.QUOTE_FAILED);
|
|
|
|
|
- SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(quoteInfo.getUserid(),zmQuoteVo.getCompanyId() ,quoteInfo.getCarInfo().getLicenseNo(),
|
|
|
|
|
- QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
|
|
|
|
|
|
|
+ String subOrderNo = insOrdersService.responseFailedOrder(zmQuoteVo, quoteInfo, ptlAgreementAttribution, order, quotedPriceResponse.getHead()
|
|
|
|
|
+ .getReturnMessage(), InsOrderStatusEnum.QUOTE_FAILED);
|
|
|
|
|
+ SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(quoteInfo.getUserid(), zmQuoteVo.getCompanyId(), quoteInfo.getCarInfo()
|
|
|
|
|
+ .getLicenseNo(),
|
|
|
|
|
+ QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode()
|
|
|
|
|
+ .toString(), QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
|
|
|
sysQuoteRecords.add(sysQuoteRecord);
|
|
sysQuoteRecords.add(sysQuoteRecord);
|
|
|
- sysQuoteRecords.forEach(item->{
|
|
|
|
|
|
|
+ sysQuoteRecords.forEach(item -> {
|
|
|
item.setSubOrderNo(subOrderNo);
|
|
item.setSubOrderNo(subOrderNo);
|
|
|
});
|
|
});
|
|
|
sysQuoteRecordMapper.insertBatch(sysQuoteRecords);
|
|
sysQuoteRecordMapper.insertBatch(sysQuoteRecords);
|
|
|
|
|
|
|
|
- sysQuoteRedisService.refreshQuoteNum(zmQuoteVo.getCompanyId(),quoteInfo.getUserid(),sysQuoteRecords);
|
|
|
|
|
|
|
+ sysQuoteRedisService.refreshQuoteNum(zmQuoteVo.getCompanyId(), quoteInfo.getUserid(), sysQuoteRecords);
|
|
|
|
|
|
|
|
throw new SystemException("该车两率管控不建议承保");
|
|
throw new SystemException("该车两率管控不建议承保");
|
|
|
}
|
|
}
|
|
@@ -182,15 +185,17 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
// 核心返回车型
|
|
// 核心返回车型
|
|
|
quoteRespVo.setCoreModels(fullCarDataDto.toCoreModelsVo());
|
|
quoteRespVo.setCoreModels(fullCarDataDto.toCoreModelsVo());
|
|
|
|
|
|
|
|
- SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(quoteInfo.getUserid(),zmQuoteVo.getCompanyId() ,quoteInfo.getCarInfo().getLicenseNo(),
|
|
|
|
|
- QuoteNumberConstant.QuoteAction.QUOTE_SUCCESS.getCode().toString(),QuoteNumberConstant.QuoteResult.SUCCESS.getCode().toString());
|
|
|
|
|
|
|
+ SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(quoteInfo.getUserid(), zmQuoteVo.getCompanyId(), quoteInfo.getCarInfo()
|
|
|
|
|
+ .getLicenseNo(),
|
|
|
|
|
+ QuoteNumberConstant.QuoteAction.QUOTE_SUCCESS.getCode()
|
|
|
|
|
+ .toString(), QuoteNumberConstant.QuoteResult.SUCCESS.getCode().toString());
|
|
|
sysQuoteRecords.add(sysQuoteRecord);
|
|
sysQuoteRecords.add(sysQuoteRecord);
|
|
|
- sysQuoteRecords.forEach(item->{
|
|
|
|
|
|
|
+ sysQuoteRecords.forEach(item -> {
|
|
|
item.setSubOrderNo(quoteRespVo.getCompanyId());
|
|
item.setSubOrderNo(quoteRespVo.getCompanyId());
|
|
|
});
|
|
});
|
|
|
sysQuoteRecordMapper.insertBatch(sysQuoteRecords);
|
|
sysQuoteRecordMapper.insertBatch(sysQuoteRecords);
|
|
|
//刷新redis中的报价次数
|
|
//刷新redis中的报价次数
|
|
|
- sysQuoteRedisService.refreshQuoteNum(zmQuoteVo.getCompanyId(),quoteInfo.getUserid(),sysQuoteRecords);
|
|
|
|
|
|
|
+ sysQuoteRedisService.refreshQuoteNum(zmQuoteVo.getCompanyId(), quoteInfo.getUserid(), sysQuoteRecords);
|
|
|
return responseOrder(quotedPriceResponse, quoteRespVo, ptlAgreementAttribution, quoteInfo);
|
|
return responseOrder(quotedPriceResponse, quoteRespVo, ptlAgreementAttribution, quoteInfo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -214,7 +219,8 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
|
|
|
|
|
//查找车主的区划信息
|
|
//查找车主的区划信息
|
|
|
PersonAreaVo ownerPersonArea = sysAreaService.queryByAddress(yaQuoteInfoVo.getOwnerInfo().getAddr(),
|
|
PersonAreaVo ownerPersonArea = sysAreaService.queryByAddress(yaQuoteInfoVo.getOwnerInfo().getAddr(),
|
|
|
- yaQuoteInfoVo.getOwnerInfo().getIdentifyNumber(),yaQuoteInfoVo.getOwnerInfo().getLeaderIdentifyNumber());
|
|
|
|
|
|
|
+ yaQuoteInfoVo.getOwnerInfo().getIdentifyNumber(), yaQuoteInfoVo.getOwnerInfo()
|
|
|
|
|
+ .getLeaderIdentifyNumber());
|
|
|
huaTaiConfigureParameters.setCity(ownerPersonArea.getCityCode());
|
|
huaTaiConfigureParameters.setCity(ownerPersonArea.getCityCode());
|
|
|
huaTaiConfigureParameters.setProvince(ownerPersonArea.getProvinceCode());
|
|
huaTaiConfigureParameters.setProvince(ownerPersonArea.getProvinceCode());
|
|
|
huaTaiConfigureParameters.setDistrict(ownerPersonArea.getCountyCode());
|
|
huaTaiConfigureParameters.setDistrict(ownerPersonArea.getCountyCode());
|
|
@@ -307,14 +313,14 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
} else if ("9".equals(huaTaiSubmitCommon.getTotalUnderWriteInd())) {//待核保
|
|
} else if ("9".equals(huaTaiSubmitCommon.getTotalUnderWriteInd())) {//待核保
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
insAreaCompany.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
|
|
insAreaCompany.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_AUDIT.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.WAIT_AUDIT.getCode(), "1");
|
|
|
//insAreaCompany.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
|
|
//insAreaCompany.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.ok("已转人工核保");
|
|
return HttpResult.ok("已转人工核保");
|
|
|
} else {//当状态为核保不通过时,调整保单状态为报价中
|
|
} else {//当状态为核保不通过时,调整保单状态为报价中
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.QUOTE_ING.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.QUOTE_ING.getCode(), "1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
|
|
|
String notion = jqNotion.toString() + syNotion + huaTaiSubmitCommon.getNotion();
|
|
String notion = jqNotion.toString() + syNotion + huaTaiSubmitCommon.getNotion();
|
|
|
insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, notion);
|
|
insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, notion);
|
|
@@ -322,7 +328,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.TO_BACK.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.TO_BACK.getCode(), "1");
|
|
|
String notion = jqNotion.toString() + syNotion;
|
|
String notion = jqNotion.toString() + syNotion;
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, notion);
|
|
insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, notion);
|
|
@@ -339,7 +345,11 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
CustomerInfoVo applyinfo = insOrders.getApplyinfo().toJavaObject(CustomerInfoVo.class);
|
|
CustomerInfoVo applyinfo = insOrders.getApplyinfo().toJavaObject(CustomerInfoVo.class);
|
|
|
|
|
|
|
|
List<String> collect =
|
|
List<String> collect =
|
|
|
- insAreaCompany.getRiskinfo().toJavaList(RiskInfoVo.class).stream().map(RiskInfoVo::getRiskCode).collect(Collectors.toList());
|
|
|
|
|
|
|
+ insAreaCompany.getRiskinfo()
|
|
|
|
|
+ .toJavaList(RiskInfoVo.class)
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .map(RiskInfoVo::getRiskCode)
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
List<InsHuataiContributing> list =
|
|
List<InsHuataiContributing> list =
|
|
|
insHuataiContributingService.lambdaQuery().in(InsHuataiContributing::getRiskCode, collect).list();
|
|
insHuataiContributingService.lambdaQuery().in(InsHuataiContributing::getRiskCode, collect).list();
|
|
|
|
|
|
|
@@ -360,13 +370,13 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
if (StringUtils.isNotEmpty(payUrl)) {
|
|
if (StringUtils.isNotEmpty(payUrl)) {
|
|
|
insAreaCompany.setPaymentLink(payUrl);
|
|
insAreaCompany.setPaymentLink(payUrl);
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_PAY.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.WAIT_PAY.getCode(), "1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.ok("核保成功");
|
|
return HttpResult.ok("核保成功");
|
|
|
} else {
|
|
} else {
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_AUDIT.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.WAIT_AUDIT.getCode(), "1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, "获取支付链接失败");
|
|
insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, "获取支付链接失败");
|
|
|
return HttpResult.error("获取支付链接失败");
|
|
return HttpResult.error("获取支付链接失败");
|
|
@@ -427,7 +437,8 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
List<HuaTaiOrderStatusResponse.PayDetaiDto> payDetaiList = orderStatusResponse.getPayDetaiList();
|
|
List<HuaTaiOrderStatusResponse.PayDetaiDto> payDetaiList = orderStatusResponse.getPayDetaiList();
|
|
|
for (HuaTaiOrderStatusResponse.PayDetaiDto payDetai : payDetaiList) {
|
|
for (HuaTaiOrderStatusResponse.PayDetaiDto payDetai : payDetaiList) {
|
|
|
//交强保单号存值
|
|
//交强保单号存值
|
|
|
- if (StringUtils.isNotEmpty(insAreaCompany.getJqapplyno()) && insAreaCompany.getJqapplyno().equals(payDetai.getBUSINESSNO())) {
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(insAreaCompany.getJqapplyno()) && insAreaCompany.getJqapplyno()
|
|
|
|
|
+ .equals(payDetai.getBUSINESSNO())) {
|
|
|
if ("1".equals(payDetai.getPOLICYSTATUS())) {
|
|
if ("1".equals(payDetai.getPOLICYSTATUS())) {
|
|
|
jqExistFlag = true;
|
|
jqExistFlag = true;
|
|
|
insAreaCompany.setJqpolicyno(payDetai.getPOLICYNO());
|
|
insAreaCompany.setJqpolicyno(payDetai.getPOLICYNO());
|
|
@@ -436,7 +447,8 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//商业保单号存值
|
|
//商业保单号存值
|
|
|
- if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno().equals(payDetai.getBUSINESSNO())) {
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno()
|
|
|
|
|
+ .equals(payDetai.getBUSINESSNO())) {
|
|
|
if ("1".equals(payDetai.getPOLICYSTATUS())) {
|
|
if ("1".equals(payDetai.getPOLICYSTATUS())) {
|
|
|
syExistFlag = true;
|
|
syExistFlag = true;
|
|
|
insAreaCompany.setSypolicyno(payDetai.getPOLICYNO());
|
|
insAreaCompany.setSypolicyno(payDetai.getPOLICYNO());
|
|
@@ -448,7 +460,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
|
|
|
|
|
if (jqExistFlag || syExistFlag) {
|
|
if (jqExistFlag || syExistFlag) {
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(), "1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.ok("保单生成成功");
|
|
return HttpResult.ok("保单生成成功");
|
|
@@ -562,7 +574,8 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
|
|
|
|
|
List<HuaTaiQuotedPriceResponse.ContractDto.CoverageDto> syCoverageDtoList = null;
|
|
List<HuaTaiQuotedPriceResponse.ContractDto.CoverageDto> syCoverageDtoList = null;
|
|
|
HuaTaiQuotedPriceResponse.ContractDto.TaxDto taxDto = null;
|
|
HuaTaiQuotedPriceResponse.ContractDto.TaxDto taxDto = null;
|
|
|
- List<HuaTaiQuotedPriceResponse.ContractDto> contractDtoList = quotedPriceResponse.getBusinessData().getContract();
|
|
|
|
|
|
|
+ List<HuaTaiQuotedPriceResponse.ContractDto> contractDtoList = quotedPriceResponse.getBusinessData()
|
|
|
|
|
+ .getContract();
|
|
|
for (HuaTaiQuotedPriceResponse.ContractDto contractDto : contractDtoList) {
|
|
for (HuaTaiQuotedPriceResponse.ContractDto contractDto : contractDtoList) {
|
|
|
HuaTaiQuotedPriceResponse.ContractDto.ContractMainDto contractMain = contractDto.getContractMain();
|
|
HuaTaiQuotedPriceResponse.ContractDto.ContractMainDto contractMain = contractDto.getContractMain();
|
|
|
if (HuaTaiRiskCode.R_1002.getCode().equals(contractMain.getRiskCode())) {
|
|
if (HuaTaiRiskCode.R_1002.getCode().equals(contractMain.getRiskCode())) {
|
|
@@ -600,7 +613,11 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getJinZhangGuiType(), kindInfoVo.getKindCode());
|
|
int i = ArrayUtil.indexOf(InsuranceTypeCorrespondence.getJinZhangGuiType(), kindInfoVo.getKindCode());
|
|
|
|
|
|
|
|
HuaTaiQuotedPriceResponse.ContractDto.CoverageDto coverageDto =
|
|
HuaTaiQuotedPriceResponse.ContractDto.CoverageDto coverageDto =
|
|
|
- syCoverageDtoList.stream().filter(a -> a.getKindCode().equals(InsuranceTypeCorrespondence.getHuaTaiConnectInsuranceType()[i])).collect(Collectors.toList()).get(0);
|
|
|
|
|
|
|
+ syCoverageDtoList.stream()
|
|
|
|
|
+ .filter(a -> a.getKindCode()
|
|
|
|
|
+ .equals(InsuranceTypeCorrespondence.getHuaTaiConnectInsuranceType()[i]))
|
|
|
|
|
+ .collect(Collectors.toList())
|
|
|
|
|
+ .get(0);
|
|
|
|
|
|
|
|
kind.setCoveragePremium(coverageDto.getCoveragePremium());
|
|
kind.setCoveragePremium(coverageDto.getCoveragePremium());
|
|
|
kind.setUnitAmount(kindInfoVo.getUnitAmount());
|
|
kind.setUnitAmount(kindInfoVo.getUnitAmount());
|
|
@@ -649,7 +666,8 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
insAreaCompany.setJqapplyno(quoteRespVo.getJqApplyNo());
|
|
insAreaCompany.setJqapplyno(quoteRespVo.getJqApplyNo());
|
|
|
insAreaCompany.setSyapplyno(quoteRespVo.getSyApplyNo());
|
|
insAreaCompany.setSyapplyno(quoteRespVo.getSyApplyNo());
|
|
|
HuaTaiQuotedPriceResponse.ContractDto.TaxDto taxDto = null;
|
|
HuaTaiQuotedPriceResponse.ContractDto.TaxDto taxDto = null;
|
|
|
- List<HuaTaiQuotedPriceResponse.ContractDto> contractDtoList = quotedPriceResponse.getBusinessData().getContract();
|
|
|
|
|
|
|
+ List<HuaTaiQuotedPriceResponse.ContractDto> contractDtoList = quotedPriceResponse.getBusinessData()
|
|
|
|
|
+ .getContract();
|
|
|
String jqQuerySequenceNo = " ";
|
|
String jqQuerySequenceNo = " ";
|
|
|
String syQuerySequenceNo = " ";
|
|
String syQuerySequenceNo = " ";
|
|
|
for (HuaTaiQuotedPriceResponse.ContractDto contractDto : contractDtoList) {
|
|
for (HuaTaiQuotedPriceResponse.ContractDto contractDto : contractDtoList) {
|
|
@@ -703,7 +721,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
return getPayURL(insAreaCompany, huaTaiConfigureParameters);
|
|
return getPayURL(insAreaCompany, huaTaiConfigureParameters);
|
|
|
} else if ("6".equals(huaTaiSubmitCommon.getTotalUnderWriteInd())) {//当状态为核保不通过时,调整保单状态为报价中
|
|
} else if ("6".equals(huaTaiSubmitCommon.getTotalUnderWriteInd())) {//当状态为核保不通过时,调整保单状态为报价中
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.QUOTE_ING.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.QUOTE_ING.getCode(), "1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.error("核保不通过:" + huaTaiSubmitCommon.getNotion());//需要处理放入核保原因
|
|
return HttpResult.error("核保不通过:" + huaTaiSubmitCommon.getNotion());//需要处理放入核保原因
|
|
@@ -735,7 +753,8 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno().equals(appliResult.getContractNo())) {
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno()
|
|
|
|
|
+ .equals(appliResult.getContractNo())) {
|
|
|
haveSYFlag = true;
|
|
haveSYFlag = true;
|
|
|
syStatus = appliResult.getUnderWriteFlag();
|
|
syStatus = appliResult.getUnderWriteFlag();
|
|
|
for (HuaTaiSubmitStatusQueryResponse.Notion notion : appliResult.getNotion()) {
|
|
for (HuaTaiSubmitStatusQueryResponse.Notion notion : appliResult.getNotion()) {
|
|
@@ -831,14 +850,16 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
List<HuaTaiOrderStatusResponse.PayDetaiDto> payDetaiList = orderStatusResponse.getPayDetaiList();
|
|
List<HuaTaiOrderStatusResponse.PayDetaiDto> payDetaiList = orderStatusResponse.getPayDetaiList();
|
|
|
for (HuaTaiOrderStatusResponse.PayDetaiDto payDetai : payDetaiList) {
|
|
for (HuaTaiOrderStatusResponse.PayDetaiDto payDetai : payDetaiList) {
|
|
|
//交强保单号存值
|
|
//交强保单号存值
|
|
|
- if (StringUtils.isNotEmpty(insAreaCompany.getJqapplyno()) && insAreaCompany.getJqapplyno().equals(payDetai.getBUSINESSNO())) {
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(insAreaCompany.getJqapplyno()) && insAreaCompany.getJqapplyno()
|
|
|
|
|
+ .equals(payDetai.getBUSINESSNO())) {
|
|
|
if ("1".equals(payDetai.getPOLICYSTATUS())) {
|
|
if ("1".equals(payDetai.getPOLICYSTATUS())) {
|
|
|
jqExistFlag = true;
|
|
jqExistFlag = true;
|
|
|
insAreaCompany.setJqpolicyno(payDetai.getPOLICYNO());
|
|
insAreaCompany.setJqpolicyno(payDetai.getPOLICYNO());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//商业保单号存值
|
|
//商业保单号存值
|
|
|
- if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno().equals(payDetai.getBUSINESSNO())) {
|
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(insAreaCompany.getSyapplyno()) && insAreaCompany.getSyapplyno()
|
|
|
|
|
+ .equals(payDetai.getBUSINESSNO())) {
|
|
|
if ("1".equals(payDetai.getPOLICYSTATUS())) {
|
|
if ("1".equals(payDetai.getPOLICYSTATUS())) {
|
|
|
syExistFlag = true;
|
|
syExistFlag = true;
|
|
|
insAreaCompany.setSypolicyno(payDetai.getPOLICYNO());
|
|
insAreaCompany.setSypolicyno(payDetai.getPOLICYNO());
|
|
@@ -852,7 +873,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
insAreaCompany.setPayDate(LocalDateTime.now());
|
|
insAreaCompany.setPayDate(LocalDateTime.now());
|
|
|
}
|
|
}
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(), "1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
|
|
insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
|
|
|
}
|
|
}
|
|
@@ -875,27 +896,28 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @version
|
|
|
|
|
- * @author: hxl
|
|
|
|
|
- * @Date: 2024/10/16 14:57
|
|
|
|
|
- * @Description: 获取保单pdf 无驾意
|
|
|
|
|
|
|
+ * @version
|
|
|
|
|
+ * @author: hxl
|
|
|
|
|
+ * @Date: 2024/10/16 14:57
|
|
|
|
|
+ * @Description: 获取保单pdf 无驾意
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public ReadPdfUrlListDto getPolicyByCompanyIdPdfList(InsAreaCompany insAreaCompany,InsOrders insOrders,boolean flag) {
|
|
|
|
|
|
|
+ public ReadPdfUrlListDto getPolicyByCompanyIdPdfList(InsAreaCompany insAreaCompany, InsOrders insOrders, boolean flag) {
|
|
|
//文件前缀
|
|
//文件前缀
|
|
|
- String pathPrefix = insAreaCompany.getInscompany()+"-"+insOrders.getLicenseno()+"-"+ insAreaCompany.getId()+"-";
|
|
|
|
|
- CrawlerPolicyPrintVo jqEntity = getPdfUrl(insAreaCompany, insOrders,InsuranceRisk.TRAFFIC.getCode(),insAreaCompany.getJqapplyno(),pathPrefix,flag);
|
|
|
|
|
|
|
+ String pathPrefix = insAreaCompany.getInscompany() + "-" + insOrders.getLicenseno() + "-" + insAreaCompany.getId() + "-";
|
|
|
|
|
+ CrawlerPolicyPrintVo jqEntity = getPdfUrl(insAreaCompany, insOrders, InsuranceRisk.TRAFFIC.getCode(), insAreaCompany.getJqpolicyno(), pathPrefix, flag);
|
|
|
String jqPath = jqEntity.getJqxPolicyUrl();
|
|
String jqPath = jqEntity.getJqxPolicyUrl();
|
|
|
String jqSignPath = jqEntity.getJqxFlagUrl();
|
|
String jqSignPath = jqEntity.getJqxFlagUrl();
|
|
|
- CrawlerPolicyPrintVo syEntity = getPdfUrl(insAreaCompany, insOrders, InsuranceRisk.BUSINESS.getCode(),insAreaCompany.getJqapplyno(),pathPrefix,flag);
|
|
|
|
|
|
|
+ CrawlerPolicyPrintVo syEntity = getPdfUrl(insAreaCompany, insOrders, InsuranceRisk.BUSINESS.getCode(), insAreaCompany.getSypolicyno(), pathPrefix, flag);
|
|
|
String syPath = syEntity.getSyxPolicyUrl();
|
|
String syPath = syEntity.getSyxPolicyUrl();
|
|
|
- InsAreaCompanyExternalPolicy insAreaCompanyExternalPolicy =new InsAreaCompanyExternalPolicy(insAreaCompany.getId(),jqPath,syPath,null,jqSignPath);
|
|
|
|
|
- return new ReadPdfUrlListDto(insAreaCompanyExternalPolicy,insAreaCompany,null);
|
|
|
|
|
|
|
+ InsAreaCompanyExternalPolicy insAreaCompanyExternalPolicy = new InsAreaCompanyExternalPolicy(insAreaCompany.getId(), jqPath, syPath, null, jqSignPath);
|
|
|
|
|
+ return new ReadPdfUrlListDto(insAreaCompanyExternalPolicy, insAreaCompany, null);
|
|
|
}
|
|
}
|
|
|
- public CrawlerPolicyPrintVo getPdfUrl(InsAreaCompany insAreaCompany,InsOrders insOrders,String jqFlag,String policyNo,String pathPrefix,boolean flag){
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public CrawlerPolicyPrintVo getPdfUrl(InsAreaCompany insAreaCompany, InsOrders insOrders, String jqFlag, String policyNo, String pathPrefix, boolean flag) {
|
|
|
CrawlerPolicyPrintVo crawlerPolicyPrintVo = new CrawlerPolicyPrintVo();
|
|
CrawlerPolicyPrintVo crawlerPolicyPrintVo = new CrawlerPolicyPrintVo();
|
|
|
try {
|
|
try {
|
|
|
- if(StringUtils.isEmpty(policyNo)){
|
|
|
|
|
|
|
+ if (StringUtils.isEmpty(policyNo)) {
|
|
|
return crawlerPolicyPrintVo;
|
|
return crawlerPolicyPrintVo;
|
|
|
}
|
|
}
|
|
|
// 1. 协议id获取配置实体
|
|
// 1. 协议id获取配置实体
|
|
@@ -905,7 +927,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
String password = yaQuoteInfoVo.getInsuredPersonInfo().getIdentifyNumber();
|
|
String password = yaQuoteInfoVo.getInsuredPersonInfo().getIdentifyNumber();
|
|
|
// 2. 组装请求体
|
|
// 2. 组装请求体
|
|
|
HuaTaiInsurancePolicyPrintRequest request = new HuaTaiInsurancePolicyPrintRequest();
|
|
HuaTaiInsurancePolicyPrintRequest request = new HuaTaiInsurancePolicyPrintRequest();
|
|
|
- if (InsuranceRisk.TRAFFIC.getCode().equals(policyNo)) {
|
|
|
|
|
|
|
+ if (InsuranceRisk.TRAFFIC.getCode().equals(jqFlag)) {
|
|
|
request.setBusinessNo(policyNo);
|
|
request.setBusinessNo(policyNo);
|
|
|
} else if (InsuranceRisk.BUSINESS.getCode().equals(jqFlag)) {
|
|
} else if (InsuranceRisk.BUSINESS.getCode().equals(jqFlag)) {
|
|
|
request.setBusinessNo(policyNo);
|
|
request.setBusinessNo(policyNo);
|
|
@@ -920,10 +942,10 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
for (HuaTaiInsurancePolicyPrintResponse.ElecDownLoadResultDto elecDownLoadResultDto : urlList) {
|
|
for (HuaTaiInsurancePolicyPrintResponse.ElecDownLoadResultDto elecDownLoadResultDto : urlList) {
|
|
|
String url = elecDownLoadResultDto.getDownURL();
|
|
String url = elecDownLoadResultDto.getDownURL();
|
|
|
if (InsuranceRisk.TRAFFIC.getCode().equals(jqFlag)) {
|
|
if (InsuranceRisk.TRAFFIC.getCode().equals(jqFlag)) {
|
|
|
- crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBD.getDesc(), insAreaCompany.getId(),pathPrefix + insAreaCompany.getSypolicyno()+ "-" + InsuranceOrderPdf.JQBD.getCode(), password,flag));
|
|
|
|
|
- crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBZ.getDesc(), insAreaCompany.getId(),pathPrefix + insAreaCompany.getSypolicyno()+ "-" + InsuranceOrderPdf.JQBZ.getCode(), password,flag));
|
|
|
|
|
|
|
+ crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBD.getDesc(), insAreaCompany.getId(), pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.JQBD.getCode(), password, flag));
|
|
|
|
|
+ crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBZ.getDesc(), insAreaCompany.getId(), pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.JQBZ.getCode(), password, flag));
|
|
|
} else if (InsuranceRisk.BUSINESS.getCode().equals(jqFlag)) {
|
|
} else if (InsuranceRisk.BUSINESS.getCode().equals(jqFlag)) {
|
|
|
- crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.SYBD.getDesc(), insAreaCompany.getId(),pathPrefix + insAreaCompany.getSypolicyno()+ "-" + InsuranceOrderPdf.SYBD.getCode(), password,flag));
|
|
|
|
|
|
|
+ crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.SYBD.getDesc(), insAreaCompany.getId(), pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.SYBD.getCode(), password, flag));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -938,14 +960,14 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @version
|
|
|
|
|
- * @author: hxl
|
|
|
|
|
- * @Date: 2024/10/18 9:37
|
|
|
|
|
- * @Description: 新路径
|
|
|
|
|
|
|
+ * @version
|
|
|
|
|
+ * @author: hxl
|
|
|
|
|
+ * @Date: 2024/10/18 9:37
|
|
|
|
|
+ * @Description: 新路径
|
|
|
*/
|
|
*/
|
|
|
- public String gainCarInsPolicyNew(String url, String fileName, String subOrderId ,String password,String path,boolean flag) {
|
|
|
|
|
|
|
+ public String gainCarInsPolicyNew(String url, String fileName, String subOrderId, String password, String path, boolean flag) {
|
|
|
String dir = "carInsPolicyNew/" + subOrderId + "/";
|
|
String dir = "carInsPolicyNew/" + subOrderId + "/";
|
|
|
- return FileUtil.netUrlStoreToLocalNew(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl, password, path,flag);
|
|
|
|
|
|
|
+ return FileUtil.netUrlStoreToLocalNew(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl, password, path, flag);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|