|
|
@@ -37,10 +37,7 @@ 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.InsAreaCompanyService;
|
|
|
-import com.ydtech.modules.order.service.InsOrdersService;
|
|
|
-import com.ydtech.modules.order.service.InsTaskImagesService;
|
|
|
-import com.ydtech.modules.order.service.ZhongMeiOrderApiService;
|
|
|
+import com.ydtech.modules.order.service.*;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreementNonCarProductCosts;
|
|
|
import com.ydtech.modules.protocol.entity.vo.PtlNonCarProductSchemeDetailVo;
|
|
|
@@ -53,6 +50,7 @@ import com.ydtech.utils.baidu.FileUtil;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.core.ParameterizedTypeReference;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
@@ -108,6 +106,9 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
@Value("${api.url}")
|
|
|
private String apiUrl;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private InsSubOrderUpdateDetailService insSubOrderUpdateDetailService;
|
|
|
+
|
|
|
|
|
|
private void modelInquiry(String modelName, List<ModelsQueryResponse.SimpleStadarCarDTO> simpleStadarCarDTOS) {
|
|
|
if (!simpleStadarCarDTOS.isEmpty()) {
|
|
|
@@ -239,6 +240,8 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
zmConfigureParameters);
|
|
|
// 3. 人工核保
|
|
|
if (SubmitStatus.S_3.getCode().equals(response.getSubmitStatus())) {
|
|
|
+ // add by hxl 添加手动更新状态
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_AUDIT.getCode(),"1");
|
|
|
insAreaCompany.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
|
String message = response.getSubmitNotion();
|
|
|
@@ -254,6 +257,8 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(response.getAccidentNos())));
|
|
|
}
|
|
|
insAreaCompany.setInsOrderNo(response.getProposalNo());
|
|
|
+ // add by hxl 添加手动更新状态
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_PAY.getCode(),"1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.ok("核保成功");
|
|
|
@@ -296,6 +301,8 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
if (coverageRequest.getAccidentPolicyNos() != null) {
|
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(coverageRequest.getAccidentPolicyNos())));
|
|
|
}
|
|
|
+ // add by hxl 添加自动更新状态
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"2");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
}
|
|
|
@@ -318,12 +325,16 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
if (approvedRequest.getAccidentNos() != null) {
|
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(approvedRequest.getAccidentNos())));
|
|
|
}
|
|
|
+ // add by hxl 添加自动更新状态
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_PAY.getCode(),"1");
|
|
|
insAreaCompany.setPaymentLink(approvedRequest.getPayUrl());
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
} else {
|
|
|
if (StringUtils.isNotEmpty(approvedRequest.getHandleText())) {
|
|
|
insAreaCompany.setAuditopinion(approvedRequest.getHandleText());
|
|
|
}
|
|
|
+ // add by hxl 添加自动更新状态
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.TO_BACK.getCode(),"1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
|
|
|
}
|
|
|
insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, insAreaCompany.getAuditopinion());
|
|
|
@@ -365,6 +376,8 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
if (orderStatusResponse.getAccidentPolicyNos() != null) {
|
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(orderStatusResponse.getAccidentPolicyNos())));
|
|
|
}
|
|
|
+ // add by hxl 添加手动更新状态
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
|
|
|
@@ -622,10 +635,14 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
// 3. 通过返回核保状态修改状态
|
|
|
if ("核保通过".equals(underWriteInd) || "自动核保".equals(underWriteInd)) {
|
|
|
insAreaCompany.setPaymentLink(submitStatusQueryResponse.getPayUrl());
|
|
|
+ // add by hxl 添加手动更新状态
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_PAY.getCode(),"1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());//当核保状态返回核保通过时,调整保单状态为已核保待缴费
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.ok(underWriteInd);
|
|
|
} else if ("核保不通过".equals(underWriteInd)) {//当状态为核保不通过时,调整保单状态为报价中
|
|
|
+ // add by hxl 添加手动更新状态
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.QUOTE_ING.getCode(),"1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.error("核保不通过:" + submitStatusQueryResponse.getIssuedReason());
|
|
|
@@ -738,6 +755,8 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
if(insAreaCompany.getPayDate()==null){
|
|
|
insAreaCompany.setPayDate(LocalDateTime.now());
|
|
|
}
|
|
|
+ // add by hxl 添加手动更新状态
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"1");
|
|
|
//承保状态
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
|