|
|
@@ -3,7 +3,6 @@ package com.ydtech.modules.order.service.impl;
|
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
import com.ydtech.components.ZhongmeiRequestComponents;
|
|
|
import com.ydtech.constants.enums.InsuranceRisk;
|
|
|
import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
|
|
|
@@ -23,7 +22,6 @@ import com.ydtech.modules.order.convert.SimpleStadarCarDTOConvert;
|
|
|
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.dajia.response.NVHLODR1001Response;
|
|
|
import com.ydtech.modules.order.entity.api.zhongmei.BaseRequestHead;
|
|
|
import com.ydtech.modules.order.entity.api.zhongmei.constants.enums.AuditStatusEnum;
|
|
|
import com.ydtech.modules.order.entity.api.zhongmei.constants.enums.DocumentTypeEnum;
|
|
|
@@ -242,7 +240,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
insAreaCompany.setPaymentLink(response.getPayUrl());
|
|
|
insAreaCompany.setJqapplyno(response.getForceProposalNo());
|
|
|
insAreaCompany.setSyapplyno(response.getBizProposalNo());
|
|
|
- if(response.getAccidentNos()!=null){
|
|
|
+ if (response.getAccidentNos() != null) {
|
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(response.getAccidentNos())));
|
|
|
}
|
|
|
insAreaCompany.setInsOrderNo(response.getProposalNo());
|
|
|
@@ -286,7 +284,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
// 保单号
|
|
|
insAreaCompany.setJqpolicyno(coverageRequest.getForcePolicyNo());
|
|
|
insAreaCompany.setSypolicyno(coverageRequest.getBizPolicyNo());
|
|
|
- if(coverageRequest.getAccidentPolicyNos()!=null){
|
|
|
+ if (coverageRequest.getAccidentPolicyNos() != null) {
|
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(coverageRequest.getAccidentPolicyNos())));
|
|
|
}
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
@@ -308,7 +306,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
if (AuditStatusEnum.S_1.getCode().equals(approvedRequest.getStatusCode())) {
|
|
|
insAreaCompany.setJqapplyno(approvedRequest.getProposalNoJ());
|
|
|
insAreaCompany.setSyapplyno(approvedRequest.getProposalNoS());
|
|
|
- if(approvedRequest.getAccidentNos()!=null ){
|
|
|
+ if (approvedRequest.getAccidentNos() != null) {
|
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(approvedRequest.getAccidentNos())));
|
|
|
}
|
|
|
insAreaCompany.setPaymentLink(approvedRequest.getPayUrl());
|
|
|
@@ -355,7 +353,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
if (StringUtils.isNotEmpty(payDate)) {
|
|
|
insAreaCompany.setPayDate(LocalDateTime.parse(payDate, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
|
}
|
|
|
- if(orderStatusResponse.getAccidentPolicyNos()!=null ){
|
|
|
+ if (orderStatusResponse.getAccidentPolicyNos() != null) {
|
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(orderStatusResponse.getAccidentPolicyNos())));
|
|
|
}
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
@@ -389,7 +387,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
OrderStatusResponse.AccidentPolicyNo.class);
|
|
|
OrderStatusResponse.AccidentPolicyNo accidentPolicyNo = accidentPolicyNos.get(0);
|
|
|
policyNo = accidentPolicyNo.getRidePolicyNo();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
throw new SystemException("险种代码不存在");
|
|
|
}
|
|
|
} else {
|
|
|
@@ -417,13 +415,13 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
if ("DZ_AJ".equals(code)) {
|
|
|
templateName = "-交强险标志.pdf";
|
|
|
} else if ("DZ_AE".equals(code)) {
|
|
|
- if(StringUtils.isNotEmpty(request.getRiskCode())){
|
|
|
+ if (StringUtils.isNotEmpty(request.getRiskCode())) {
|
|
|
if ("0330".equals(request.getRiskCode())) {
|
|
|
templateName = "-交强险保单.pdf";
|
|
|
} else {
|
|
|
templateName = "-商业险保单.pdf";
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
templateName = "-非车险保单.pdf";
|
|
|
}
|
|
|
|
|
|
@@ -537,7 +535,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
quoteRespVo.setOrderno(yaQuoteInfoVo.getOrderNo()); //订单号
|
|
|
|
|
|
List<QuotedPriceResponse.AccidentPrimium> accidentPrimiumList = quotedPriceResponse.getAccidentPremium();
|
|
|
- if(accidentPrimiumList!=null && accidentPrimiumList.size()>0){
|
|
|
+ if (accidentPrimiumList != null && accidentPrimiumList.size() > 0) {
|
|
|
QuotedPriceResponse.AccidentPrimium accidentPrimium = accidentPrimiumList.get(0);
|
|
|
AccidentResponseVo accidentResponseVo = new AccidentResponseVo();
|
|
|
accidentResponseVo.setProjectCode(accidentPrimium.getRideRiskCode());
|
|
|
@@ -611,14 +609,14 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public HttpResult<List<RideAccidentQueryResponse.RideAccident>> rideAccidentQuery(AccidentalDrivingQueryVo accidentalDrivingVo) {
|
|
|
+ public HttpResult<List<RideAccidentQueryResponse.RideAccident>> rideAccidentQuery(GeneralNonCarProductReqVo accidentalDrivingVo) {
|
|
|
// 1. 协议id获取配置实体
|
|
|
ZmConfigureParameters zmConfigureParameters = configureParametersComponents.toEntity(ZmConfigureParameters.class,
|
|
|
accidentalDrivingVo.getAgreementId());
|
|
|
|
|
|
// 2. 组装请求体
|
|
|
RideAccidentQueryRequest rideAccidentQueryRequest = new RideAccidentQueryRequest(zmConfigureParameters);
|
|
|
- rideAccidentQueryRequest.setSeats(accidentalDrivingVo.getSeatNum());
|
|
|
+ rideAccidentQueryRequest.setSeats(Integer.parseInt(accidentalDrivingVo.getSeatNum()));
|
|
|
rideAccidentQueryRequest.setHead(new BaseRequestHead(zmConfigureParameters));
|
|
|
|
|
|
RideAccidentQueryResponse rideAccidentQueryResponse = zhongmeiRequestApiComponents.rideAccidentQuery(rideAccidentQueryRequest,
|