|
|
@@ -1049,26 +1049,41 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
|
|
|
ArrayList<DocumentStatusListResponse.DocumentDTO> documentList = documentStatusListResponse.getDocumentList();
|
|
|
Boolean jqflag = false;
|
|
|
Boolean sqflag = false;
|
|
|
+ String jqpolicyno=null;
|
|
|
+ String sypolicyno=null;
|
|
|
+ String status="";
|
|
|
+ String noticeNo="";
|
|
|
//B5 为 承保
|
|
|
for (DocumentStatusListResponse.DocumentDTO dto : documentList) {
|
|
|
- if (OrderStatusCodeEnum.ORDER_STATUS_CODE_B5.getCode().equals(dto.getStatus()) && bizApplyNo.equals(dto.getApplyNo()==null?"":dto.getApplyNo())) {
|
|
|
+ status = dto.getStatus();
|
|
|
+ noticeNo=dto.getNoticeNo();
|
|
|
+ if ((bizApplyNo==null?"":bizApplyNo).equals(dto.getApplyNo()==null?"":dto.getApplyNo())) {
|
|
|
+ jqpolicyno=dto.getPolicyNo();
|
|
|
sqflag = true;
|
|
|
}
|
|
|
- if (OrderStatusCodeEnum.ORDER_STATUS_CODE_B5
|
|
|
- .getCode().equals(dto.getStatus()) && forceApplyNo.equals(dto.getApplyNo()==null?"":dto.getApplyNo())) {
|
|
|
+ if ((forceApplyNo==null?"":forceApplyNo).equals(dto.getApplyNo()==null?"":dto.getApplyNo())) {
|
|
|
+ sypolicyno=dto.getPolicyNo();
|
|
|
jqflag = true;
|
|
|
}
|
|
|
}
|
|
|
- if ("单交".equals(insAreaCompany.getProduct()) && !jqflag) {
|
|
|
- insAreaCompany.setJqpolicyno(bizApplyNo);
|
|
|
- } else if (("交三".equals(insAreaCompany.getProduct()) || "交商".equals(insAreaCompany.getProduct())) && !jqflag && !sqflag) {
|
|
|
- insAreaCompany.setJqpolicyno(bizApplyNo);
|
|
|
- insAreaCompany.setSypolicyno(forceApplyNo);
|
|
|
- } else if (("单商".equals(insAreaCompany.getProduct()) || "单三".equals(insAreaCompany.getProduct())) && !sqflag) {
|
|
|
- insAreaCompany.setSypolicyno(forceApplyNo);
|
|
|
+ if ("单交".equals(insAreaCompany.getProduct()) && jqflag) {
|
|
|
+ insAreaCompany.setJqpolicyno(jqpolicyno);
|
|
|
+ } else if (("交三".equals(insAreaCompany.getProduct()) || "交商".equals(insAreaCompany.getProduct())) && jqflag && sqflag) {
|
|
|
+ insAreaCompany.setJqpolicyno(jqpolicyno);
|
|
|
+ insAreaCompany.setSypolicyno(sypolicyno);
|
|
|
+ } else if (("单商".equals(insAreaCompany.getProduct()) || "单三".equals(insAreaCompany.getProduct())) && sqflag) {
|
|
|
+ insAreaCompany.setSypolicyno(sypolicyno);
|
|
|
+ }
|
|
|
+ if(OrderStatusCodeEnum.ORDER_STATUS_CODE_B2.getCode().equals(status)){
|
|
|
+ //已核保待缴费
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
+ }else if(OrderStatusCodeEnum.ORDER_STATUS_CODE_B5.getCode().equals(status)){
|
|
|
+ //说明核保成功,更新大订单和小订单的状态为3 更新为已承保
|
|
|
+ if(StringUtils.isNotBlank(noticeNo)){
|
|
|
+ insAreaCompany.setNoticeNo(noticeNo);
|
|
|
+ }
|
|
|
+ insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
}
|
|
|
- //说明核保成功,更新大订单和小订单的状态为3 更新为已承保
|
|
|
- insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
|
return HttpResult.ok("更新状态成功");
|
|
|
|