|
|
@@ -142,14 +142,9 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- private ODR1008Response confirmationVehicleCustomerInformation(String orderNo, String busiId, BaseQuoteInfoVo quoteInfoVo,
|
|
|
- DaJiaConfigureParameters daJiaConfigureParameters,
|
|
|
- ODR2009Response odr2009Request, PersonAreaVo policyHolderPersonArea,
|
|
|
- PersonAreaVo insuredPersonArea, PersonAreaVo ownerPersonArea,
|
|
|
- CoreModelsVo coreModelsVo) throws Exception {
|
|
|
-
|
|
|
- ODR1008Request odr1008Request = new ODR1008Request(orderNo, busiId, quoteInfoVo, daJiaConfigureParameters, odr2009Request,
|
|
|
- policyHolderPersonArea, insuredPersonArea, ownerPersonArea, coreModelsVo);
|
|
|
+ private ODR1008Response confirmationVehicleCustomerInformation(String orderNo, String busiId, BaseQuoteInfoVo quoteInfoVo, DaJiaConfigureParameters daJiaConfigureParameters, ODR2009Response odr2009Request, PersonAreaVo policyHolderPersonArea, PersonAreaVo insuredPersonArea, PersonAreaVo ownerPersonArea, CoreModelsVo coreModelsVo) throws Exception {
|
|
|
+
|
|
|
+ ODR1008Request odr1008Request = new ODR1008Request(orderNo, busiId, quoteInfoVo, daJiaConfigureParameters, odr2009Request, policyHolderPersonArea, insuredPersonArea, ownerPersonArea, coreModelsVo);
|
|
|
ODR1008Response odr1008Response = daJiaRequestApiComponents.carOrCustomInfoConfirm(odr1008Request);
|
|
|
if (odr1008Response.getStatus().equals(Message.M0000.getCode())) {
|
|
|
//车辆与客户信息确认返回
|
|
|
@@ -175,20 +170,17 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(t.getAgreementId());
|
|
|
|
|
|
//车主区划信息
|
|
|
- PersonAreaVo ownerPersonArea = sysAreaService.queryByAddress(quoteInfoVo.getOwnerInfo().getAddr(),
|
|
|
- quoteInfoVo.getOwnerInfo().getIdentifyNumber());
|
|
|
+ PersonAreaVo ownerPersonArea = sysAreaService.queryByAddress(quoteInfoVo.getOwnerInfo().getAddr(), quoteInfoVo.getOwnerInfo().getIdentifyNumber());
|
|
|
|
|
|
//投保人区划信息
|
|
|
- PersonAreaVo policyHolderPersonArea = sysAreaService.queryByAddress(quoteInfoVo.getPolicyHolderInfo().getAddr(),
|
|
|
- quoteInfoVo.getPolicyHolderInfo().getIdentifyNumber());
|
|
|
+ PersonAreaVo policyHolderPersonArea = sysAreaService.queryByAddress(quoteInfoVo.getPolicyHolderInfo().getAddr(), quoteInfoVo.getPolicyHolderInfo().getIdentifyNumber());
|
|
|
PersonAreaVo insuredPersonArea;
|
|
|
//投保人等于被保人
|
|
|
if (quoteInfoVo.getPolicyHolderInfo().getIdentifyNumber().equals(quoteInfoVo.getInsuredPersonInfo().getIdentifyNumber())) {
|
|
|
insuredPersonArea = policyHolderPersonArea;
|
|
|
} else {
|
|
|
//被保人区划信息
|
|
|
- insuredPersonArea = sysAreaService.queryByAddress(quoteInfoVo.getInsuredPersonInfo().getAddr(),
|
|
|
- quoteInfoVo.getInsuredPersonInfo().getIdentifyNumber());
|
|
|
+ insuredPersonArea = sysAreaService.queryByAddress(quoteInfoVo.getInsuredPersonInfo().getAddr(), quoteInfoVo.getInsuredPersonInfo().getIdentifyNumber());
|
|
|
}
|
|
|
|
|
|
// 1.获取业务订单号接口
|
|
|
@@ -206,8 +198,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
// 3.车辆与客户信息确认
|
|
|
CoreModelsVo coreModelsVo = new CoreModelsVo();
|
|
|
|
|
|
- ODR1008Response odr1008Response = confirmationVehicleCustomerInformation(orderNo, busiId, quoteInfoVo,
|
|
|
- daJiaConfigureParameters, odr2009Response, policyHolderPersonArea, insuredPersonArea, ownerPersonArea, coreModelsVo);
|
|
|
+ ODR1008Response odr1008Response = confirmationVehicleCustomerInformation(orderNo, busiId, quoteInfoVo, daJiaConfigureParameters, odr2009Response, policyHolderPersonArea, insuredPersonArea, ownerPersonArea, coreModelsVo);
|
|
|
if (!odr1008Response.getStatus().equals(Message.M0000.getCode())) {
|
|
|
return HttpResult.error("车辆与客户信息确认接口失败");
|
|
|
}
|
|
|
@@ -235,8 +226,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
List<InsAccidentalDrivingSubDajia> listByAccId = null;
|
|
|
if (!Objects.isNull(accidentalDrivingVo) && !accidentalDrivingVo.isEmpty()) {
|
|
|
//驾意险
|
|
|
- accidentalDriving = getAccidentalDrivingByCode(accidentalDrivingVo.getString("rideRiskCode"),
|
|
|
- accidentalDrivingVo.getInteger("quantity"));
|
|
|
+ accidentalDriving = getAccidentalDrivingByCode(accidentalDrivingVo.getString("rideRiskCode"), accidentalDrivingVo.getInteger("quantity"));
|
|
|
insAreaCompanyAccidentalDriving.setRideRiskCode(accidentalDrivingVo.getString("rideRiskCode"));
|
|
|
insAreaCompanyAccidentalDriving.setRideRiskName(accidentalDrivingVo.getString("rideRiskName"));
|
|
|
insAreaCompanyAccidentalDriving.setQuantity(accidentalDrivingVo.getInteger("quantity"));
|
|
|
@@ -244,8 +234,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
listByAccId = insAccidentalDrivingSubDaJiaService.getListByAccId(accidentalDriving.getId());
|
|
|
}
|
|
|
//6.报价
|
|
|
- ODR1009Response odr1009Response = quotation(orderNo, kindList, riskList, quoteInfoVo, odr1016Response, accidentalDriving,
|
|
|
- listByAccId, daJiaConfigureParameters, isEnergy);
|
|
|
+ ODR1009Response odr1009Response = quotation(orderNo, kindList, riskList, quoteInfoVo, odr1016Response, accidentalDriving, listByAccId, daJiaConfigureParameters, isEnergy);
|
|
|
|
|
|
NVHLODR1001Response nvhlodr1001Response = null;
|
|
|
|
|
|
@@ -254,8 +243,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
|
|
|
if (!Objects.isNull(accidentalDrivingVo) && !accidentalDrivingVo.isEmpty()) {
|
|
|
//6.驾意险报价
|
|
|
- NVHLODR1001Request nvhlodr1001Request = new NVHLODR1001Request(daJiaConfigureParameters, odr1009Response, quoteInfoVo
|
|
|
- , accidentalDriving, accidentalDrivingVo.getString("quantity"), policyHolderPersonArea, insuredPersonArea);
|
|
|
+ NVHLODR1001Request nvhlodr1001Request = new NVHLODR1001Request(daJiaConfigureParameters, odr1009Response, quoteInfoVo, accidentalDriving, accidentalDrivingVo.getString("quantity"), policyHolderPersonArea, insuredPersonArea);
|
|
|
nvhlodr1001Response = daJiaRequestApiComponents.accidentPremiumCalculation(nvhlodr1001Request);
|
|
|
if (!"2000".equals(nvhlodr1001Response.getStatus())) {
|
|
|
return HttpResult.error("驾意险报价失败");
|
|
|
@@ -267,8 +255,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
|
|
|
// 设置报价车型
|
|
|
quoteRespVo.setCoreModels(coreModelsVo);
|
|
|
- HttpResult<QuoteRespVo> quoteRespVoHttpResult = responseOrder(odr1009Response, quoteRespVo, ptlAgreementAttribution,
|
|
|
- orderNo, quoteInfoVo, busiId, nvhlodr1001Response,insAreaCompanyAccidentalDriving);
|
|
|
+ HttpResult<QuoteRespVo> quoteRespVoHttpResult = responseOrder(odr1009Response, quoteRespVo, ptlAgreementAttribution, orderNo, quoteInfoVo, busiId, nvhlodr1001Response, insAreaCompanyAccidentalDriving);
|
|
|
return quoteRespVoHttpResult;
|
|
|
} else {
|
|
|
if (Message.M0003.getCode().equals(odr1009Response.getStatus())) {
|
|
|
@@ -339,21 +326,14 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- public ODR1009Response quotation(String orderNo, List<KindInfoVo> kindInfoVos, List<RiskInfoVo> riskInfoVos,
|
|
|
- BaseQuoteInfoVo quoteInfoVo, ODR1016Response odr1016Response,
|
|
|
- InsAccidentalDrivingDajia insAccidentalDrivingDajia,
|
|
|
- List<InsAccidentalDrivingSubDajia> insAccidentalDrivingSubDajias,
|
|
|
- DaJiaConfigureParameters daJiaConfigureParameters, boolean isEnergy) throws Exception {
|
|
|
-
|
|
|
- ODR1009Request odr1009Request = new ODR1009Request(orderNo, kindInfoVos, riskInfoVos, quoteInfoVo, odr1016Response,
|
|
|
- insAccidentalDrivingDajia, insAccidentalDrivingSubDajias, daJiaConfigureParameters, isEnergy);
|
|
|
+ public ODR1009Response quotation(String orderNo, List<KindInfoVo> kindInfoVos, List<RiskInfoVo> riskInfoVos, BaseQuoteInfoVo quoteInfoVo, ODR1016Response odr1016Response, InsAccidentalDrivingDajia insAccidentalDrivingDajia, List<InsAccidentalDrivingSubDajia> insAccidentalDrivingSubDajias, DaJiaConfigureParameters daJiaConfigureParameters, boolean isEnergy) throws Exception {
|
|
|
+
|
|
|
+ ODR1009Request odr1009Request = new ODR1009Request(orderNo, kindInfoVos, riskInfoVos, quoteInfoVo, odr1016Response, insAccidentalDrivingDajia, insAccidentalDrivingSubDajias, daJiaConfigureParameters, isEnergy);
|
|
|
ODR1009Response odr1009Response = daJiaRequestApiComponents.newPremiumXnyCalculation(odr1009Request);
|
|
|
if (odr1009Response.getStatus().equals(Message.M0002.getCode())) {
|
|
|
//获取重复投保信息
|
|
|
- String jqAppStatusMessage = odr1009Response.getResult().getJqAppStatusMessage() == null ? "" :
|
|
|
- odr1009Response.getResult().getJqAppStatusMessage().toString();
|
|
|
- String syAppStatusMessage = odr1009Response.getResult().getReInsuredInfo() == null ? "" :
|
|
|
- odr1009Response.getResult().getReInsuredInfo();
|
|
|
+ String jqAppStatusMessage = odr1009Response.getResult().getJqAppStatusMessage() == null ? "" : odr1009Response.getResult().getJqAppStatusMessage().toString();
|
|
|
+ String syAppStatusMessage = odr1009Response.getResult().getReInsuredInfo() == null ? "" : odr1009Response.getResult().getReInsuredInfo();
|
|
|
if (jqAppStatusMessage.contains("重复投保") || syAppStatusMessage.contains("重复投保")) {
|
|
|
//交强重复投保
|
|
|
for (RiskInfoVo riskInfoVo : riskInfoVos) {
|
|
|
@@ -371,18 +351,14 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
riskInfoVo.setEndDate(duplicateDate.get(1));
|
|
|
}
|
|
|
}
|
|
|
- return quotation(orderNo, kindInfoVos, riskInfoVos, quoteInfoVo, odr1016Response, insAccidentalDrivingDajia,
|
|
|
- insAccidentalDrivingSubDajias, daJiaConfigureParameters, isEnergy);
|
|
|
+ return quotation(orderNo, kindInfoVos, riskInfoVos, quoteInfoVo, odr1016Response, insAccidentalDrivingDajia, insAccidentalDrivingSubDajias, daJiaConfigureParameters, isEnergy);
|
|
|
}
|
|
|
}
|
|
|
return odr1009Response;
|
|
|
}
|
|
|
|
|
|
|
|
|
- public HttpResult<QuoteRespVo> responseOrder(ODR1009Response odr1009Response, QuoteRespVo quoteRespVo,
|
|
|
- PtlAgreementAttribution ptlAgreementAttribution, String orderId,
|
|
|
- BaseQuoteInfoVo quoteInfoVo, String busiId, NVHLODR1001Response nvhlodr1001Response,
|
|
|
- InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving) {
|
|
|
+ public HttpResult<QuoteRespVo> responseOrder(ODR1009Response odr1009Response, QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution, String orderId, BaseQuoteInfoVo quoteInfoVo, String busiId, NVHLODR1001Response nvhlodr1001Response, InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving) {
|
|
|
// 保存订单信息
|
|
|
InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
|
|
|
// 协议id
|
|
|
@@ -407,14 +383,13 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
if (!Objects.isNull(nvhlodr1001Response)) {
|
|
|
insAreaCompany.setCrossInsurance(JSONArray.parseArray(JSON.toJSONString(nvhlodr1001Response.getPolicyInfos())));
|
|
|
}
|
|
|
- insAreaCompanyService.insertCompanyAndOrders(insAreaCompany,insAreaCompanyAccidentalDriving);
|
|
|
+ insAreaCompanyService.insertCompanyAndOrders(insAreaCompany, insAreaCompanyAccidentalDriving);
|
|
|
quoteRespVo.setCompanyId(companyId);
|
|
|
quoteRespVo.setOrderno(quoteInfoVo.getOrderNo());
|
|
|
// 车船税
|
|
|
ODR1009Response.ResultDTO.VehicleTaxationDTO carShipTax = odr1009Response.getResult().getVehicleTaxation();
|
|
|
if (!Objects.isNull(carShipTax)) {
|
|
|
- TaxArrears taxArrears = new TaxArrears("往年欠税", Double.parseDouble(carShipTax.getTaxableAmt()),
|
|
|
- Double.parseDouble(carShipTax.getTaxOverdueAmt()));
|
|
|
+ TaxArrears taxArrears = new TaxArrears("往年欠税", Double.parseDouble(carShipTax.getTaxableAmt()), Double.parseDouble(carShipTax.getTaxOverdueAmt()));
|
|
|
List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
|
|
|
insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
|
|
|
}
|
|
|
@@ -454,8 +429,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public QuoteRespVo getQuoteRespVo(ODR1009Response odr1009Response, BaseQuoteInfoVo yaQuoteInfoVo,
|
|
|
- NVHLODR1001Response nvhlodr1001Response) {
|
|
|
+ public QuoteRespVo getQuoteRespVo(ODR1009Response odr1009Response, BaseQuoteInfoVo yaQuoteInfoVo, NVHLODR1001Response nvhlodr1001Response) {
|
|
|
double jqPremium = 0;
|
|
|
double syPremium = 0;
|
|
|
double sumPayTax = 0;
|
|
|
@@ -587,19 +561,16 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
configureParametersComponents.toEntity(daJiaConfigureParameters, insAreaCompany.getAgreementId());
|
|
|
|
|
|
//1009返回数据
|
|
|
- ODR1009Response.ResultDTO resultDTO = JSONObject.parseObject(JSON.toJSONString(insAreaCompany.getReptxt()),
|
|
|
- ODR1009Response.ResultDTO.class);
|
|
|
+ ODR1009Response.ResultDTO resultDTO = JSONObject.parseObject(JSON.toJSONString(insAreaCompany.getReptxt()), ODR1009Response.ResultDTO.class);
|
|
|
|
|
|
//驾意险 返回数据
|
|
|
List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS = null;
|
|
|
if (!Objects.isNull(insAreaCompany.getCrossInsurance())) {
|
|
|
- policyInfosDTOS = JSON.parseArray(JSON.toJSONString(insAreaCompany.getCrossInsurance()),
|
|
|
- NVHLODR1001Response.policyInfosDTO.class);
|
|
|
+ policyInfosDTOS = JSON.parseArray(JSON.toJSONString(insAreaCompany.getCrossInsurance()), NVHLODR1001Response.policyInfosDTO.class);
|
|
|
}
|
|
|
|
|
|
//核保构造request
|
|
|
- ODR1010Request odr1010Request = new ODR1010Request(insAreaCompany.getInsOrderNo(), insAreaCompany.getReptxt().getString(
|
|
|
- "busiId"), daJiaConfigureParameters, resultDTO, insOrders);
|
|
|
+ ODR1010Request odr1010Request = new ODR1010Request(insAreaCompany.getInsOrderNo(), insAreaCompany.getReptxt().getString("busiId"), daJiaConfigureParameters, resultDTO, insOrders);
|
|
|
ODR1010Response odr1010Response = daJiaRequestApiComponents.underwriting(odr1010Request);
|
|
|
if (odr1010Response.getStatus().equals(Message.M0000.getCode())) {
|
|
|
if ("0".equals(odr1010Response.getResult().getJqAppStatus()) || "0".equals(odr1010Response.getResult().getSyAppStatus())) {
|
|
|
@@ -612,17 +583,17 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
if ("1".equals(odr1010Response.getResult().getJqAppStatus()) || "1".equals(odr1010Response.getResult().getSyAppStatus())) {
|
|
|
//修改状态 转人工
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
|
- insAreaCompanyService.updateById(insAreaCompany);
|
|
|
- if ("1".equals(odr1010Response.getResult().getJqAppStatus())) {
|
|
|
- return HttpResult.error("自核转人工,原因:" + odr1010Response.getResult().getJqAppStatusMessage());
|
|
|
- } else {
|
|
|
- return HttpResult.error("自核转人工,原因:" + odr1010Response.getResult().getSyAppStatusMessage());
|
|
|
- }
|
|
|
+ String message = "";
|
|
|
+ String jqAppStatusMessage = odr1010Response.getResult().getJqAppStatusMessage();
|
|
|
+ String syAppStatusMessage = odr1010Response.getResult().getSyAppStatusMessage();
|
|
|
+ message = message + jqAppStatusMessage;
|
|
|
+ message = message + syAppStatusMessage;
|
|
|
+ insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, message);
|
|
|
+ return HttpResult.error("自核转人工,原因:" + message);
|
|
|
}
|
|
|
//核保成功 获取支付二维码
|
|
|
//延迟3秒 等待生成
|
|
|
- ODR1011Request odr1011Request = new ODR1011Request(insAreaCompany.getInsOrderNo(), daJiaConfigureParameters,
|
|
|
- policyInfosDTOS);
|
|
|
+ ODR1011Request odr1011Request = new ODR1011Request(insAreaCompany.getInsOrderNo(), daJiaConfigureParameters, policyInfosDTOS);
|
|
|
ODR1011Response payNo = null;
|
|
|
boolean flag = true;
|
|
|
Integer frequencyControl = 0;
|
|
|
@@ -671,8 +642,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
public HttpResult<Object> submitImage(String companyId) {
|
|
|
try {
|
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
|
|
|
- List<InsTaskImagesBase64> insTaskImagesBase64s = insTaskImagesService.findByOrderNo(insAreaCompany.getOrderno(),
|
|
|
- insAreaCompany.getId());
|
|
|
+ List<InsTaskImagesBase64> insTaskImagesBase64s = insTaskImagesService.findByOrderNo(insAreaCompany.getOrderno(), insAreaCompany.getId());
|
|
|
//获取公司配置信息
|
|
|
DaJiaConfigureParameters daJiaConfigureParameters = new DaJiaConfigureParameters();
|
|
|
configureParametersComponents.toEntity(daJiaConfigureParameters, insAreaCompany.getAgreementId());
|
|
|
@@ -695,9 +665,8 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
|
|
|
//检测是否进入人工
|
|
|
public boolean checkArtificial(List<ODR2010Response.ResultDTO> result) {
|
|
|
- List<ODR2010Response.ResultDTO> artificialCollect =
|
|
|
- result.stream().filter(x -> x.getNotifyType().equals("2002")).collect(Collectors.toList());
|
|
|
- if (artificialCollect.size() > 0) {
|
|
|
+ List<ODR2010Response.ResultDTO> artificialCollect = result.stream().filter(x -> x.getNotifyType().equals("2002")).collect(Collectors.toList());
|
|
|
+ if (!artificialCollect.isEmpty()) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
|
@@ -705,9 +674,8 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
|
|
|
//检测是否核保退回
|
|
|
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.size() > 0) {
|
|
|
+ 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;
|
|
|
@@ -715,9 +683,8 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
|
|
|
//检测核保通过是否存在支付连接
|
|
|
public boolean checkPayLink(List<ODR2010Response.ResultDTO> result, InsAreaCompany insAreaCompany) {
|
|
|
- List<ODR2010Response.ResultDTO> traverseCollect =
|
|
|
- result.stream().filter(x -> x.getNotifyType().equals("2005")).collect(Collectors.toList());
|
|
|
- if (traverseCollect.size() > 0 && ("".equals(insAreaCompany.getPaymentLink()) || insAreaCompany.getPaymentLink() != null)) {
|
|
|
+ List<ODR2010Response.ResultDTO> traverseCollect = result.stream().filter(x -> x.getNotifyType().equals("2005")).collect(Collectors.toList());
|
|
|
+ if (!traverseCollect.isEmpty() && ("".equals(insAreaCompany.getPaymentLink()) || insAreaCompany.getPaymentLink() != null)) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
|
@@ -725,8 +692,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
|
|
|
//检测是否存在保单生成状态
|
|
|
public boolean checkBdGen(List<ODR2010Response.ResultDTO> result) {
|
|
|
- List<ODR2010Response.ResultDTO> collect =
|
|
|
- result.stream().filter(x -> x.getNotifyType().equals("2009")).collect(Collectors.toList());
|
|
|
+ List<ODR2010Response.ResultDTO> collect = result.stream().filter(x -> x.getNotifyType().equals("2009")).collect(Collectors.toList());
|
|
|
return !collect.isEmpty();
|
|
|
}
|
|
|
|
|
|
@@ -761,11 +727,9 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
//驾意险 返回数据
|
|
|
List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS = null;
|
|
|
if (!Objects.isNull(insAreaCompany.getCrossInsurance())) {
|
|
|
- policyInfosDTOS = JSON.parseArray(JSON.toJSONString(insAreaCompany.getCrossInsurance()),
|
|
|
- NVHLODR1001Response.policyInfosDTO.class);
|
|
|
+ policyInfosDTOS = JSON.parseArray(JSON.toJSONString(insAreaCompany.getCrossInsurance()), NVHLODR1001Response.policyInfosDTO.class);
|
|
|
}
|
|
|
- ODR1011Request odr1011Request = new ODR1011Request(insAreaCompany.getInsOrderNo(), daJiaConfigureParameters,
|
|
|
- policyInfosDTOS);
|
|
|
+ ODR1011Request odr1011Request = new ODR1011Request(insAreaCompany.getInsOrderNo(), daJiaConfigureParameters, policyInfosDTOS);
|
|
|
ODR1011Response payNo = daJiaRequestApiComponents.getPayNo(odr1011Request);
|
|
|
if (payNo.getStatus().equals(Message.M0000.getCode())) {
|
|
|
//获取支付二维码成功 保存支付二维码
|
|
|
@@ -779,8 +743,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
}
|
|
|
//是否存在保单生成
|
|
|
if (checkBdGen(result) && !"3".equals(insAreaCompany.getOrderstatus())) {
|
|
|
- List<ODR2010Response.ResultDTO> collect =
|
|
|
- result.stream().filter(x -> x.getNotifyType().equals("2009")).collect(Collectors.toList());
|
|
|
+ List<ODR2010Response.ResultDTO> collect = result.stream().filter(x -> x.getNotifyType().equals("2009")).collect(Collectors.toList());
|
|
|
|
|
|
//如果交强和商业都不为空
|
|
|
if (insAreaCompany.getJqapplyno() != null && insAreaCompany.getSyapplyno() != null) {
|
|
|
@@ -864,15 +827,11 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
if (InsuranceRisk.ACCIDENT.getCode().equals(policyPrintVo.getRiskCode())) {
|
|
|
|
|
|
if (!Objects.isNull(insAreaCompany.getCrossInsurance())) {
|
|
|
- List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS =
|
|
|
- JSON.parseArray(JSON.toJSONString(insAreaCompany.getCrossInsurance()),
|
|
|
- NVHLODR1001Response.policyInfosDTO.class);
|
|
|
- NVHLODR2007Request nvhlodr2007Request = new NVHLODR2007Request(policyInfosDTOS.get(0).getAppNo(),
|
|
|
- daJiaConfigureParameters);
|
|
|
+ List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS = JSON.parseArray(JSON.toJSONString(insAreaCompany.getCrossInsurance()), NVHLODR1001Response.policyInfosDTO.class);
|
|
|
+ NVHLODR2007Request nvhlodr2007Request = new NVHLODR2007Request(policyInfosDTOS.get(0).getAppNo(), daJiaConfigureParameters);
|
|
|
NVHLODR2007Response nvhlodr2007Response = daJiaRequestApiComponents.accidentPremiumWarranty(nvhlodr2007Request);
|
|
|
if ("2000".equals(nvhlodr2007Response.getStatus())) {
|
|
|
- url = gainCarInsPolicy(nvhlodr2007Response.getPolicyInfos().get(0).getCPdfUrl(),
|
|
|
- insOrders.getLicenseno() + templateName, insAreaCompany.getId());
|
|
|
+ url = gainCarInsPolicy(nvhlodr2007Response.getPolicyInfos().get(0).getCPdfUrl(), insOrders.getLicenseno() + templateName, insAreaCompany.getId());
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
@@ -939,8 +898,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
|
|
|
@Override
|
|
|
public HttpResult<Object> accidentalDrivingInfo(String accidentalId) {
|
|
|
- List<InsAccidentalDrivingSubDajia> list =
|
|
|
- insAccidentalDrivingSubDaJiaService.list(new LambdaQueryWrapper<InsAccidentalDrivingSubDajia>().eq(InsAccidentalDrivingSubDajia::getAccId, accidentalId));
|
|
|
+ List<InsAccidentalDrivingSubDajia> list = insAccidentalDrivingSubDaJiaService.list(new LambdaQueryWrapper<InsAccidentalDrivingSubDajia>().eq(InsAccidentalDrivingSubDajia::getAccId, accidentalId));
|
|
|
return HttpResult.ok("获取驾意险详情成功", list);
|
|
|
}
|
|
|
|
|
|
@@ -970,8 +928,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
List<ODR2010Response.ResultDTO> result = odr2010Response.getResult();
|
|
|
//是否存在保单生成
|
|
|
if (checkBdGen(result) && !"3".equals(insAreaCompany.getOrderstatus())) {
|
|
|
- List<ODR2010Response.ResultDTO> collect =
|
|
|
- result.stream().filter(x -> x.getNotifyType().equals("2009")).collect(Collectors.toList());
|
|
|
+ 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())) {
|
|
|
@@ -988,7 +945,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
|
|
|
insAreaCompany.setPayDate(parse);
|
|
|
}
|
|
|
//设置支付时间
|
|
|
- if(insAreaCompany.getPayDate()==null){
|
|
|
+ if (insAreaCompany.getPayDate() == null) {
|
|
|
insAreaCompany.setPayDate(LocalDateTime.now());
|
|
|
}
|
|
|
//更新订单状态
|