Przeglądaj źródła

1.修改交叉销售(非车险)投保单号和保单号存入
2.修改紫金、python返回交叉销售信息(非车险)存入

wks 3 lat temu
rodzic
commit
f3a25d547c

+ 8 - 13
src/main/java/com/ydtech/modules/order/entity/InsAreaCompany.java

@@ -101,16 +101,16 @@ public class InsAreaCompany implements Serializable {
     private String sypolicyno;
 
     /**
-     * 驾意险投保单号
+     * 交叉销售保单信息
      */
-    @TableField(value = "jyapplyno")
-    private String jyapplyno;
+    @TableField(value = "cross_insurance", typeHandler = FastjsonTypeHandler.class)
+    private JSONArray crossInsurance;
 
     /**
-     * 驾意险保单号
+     * 驾意险
      */
-    @TableField(value = "jypolicyno")
-    private String jypolicyno;
+    @TableField(value = "accident_info", typeHandler = FastjsonTypeHandler.class)
+    private JSONArray accidentInfo;
 
     /**
      * 交强险商业险
@@ -231,11 +231,6 @@ public class InsAreaCompany implements Serializable {
     @TableField(value = "attribution_id")
     private String attributionId;
 
-    /**
-     * 驾意险
-     */
-    @TableField(value = "accident_info", typeHandler = FastjsonTypeHandler.class)
-    private JSONArray accidentInfo;
     /**
      * 欠税
      */
@@ -254,10 +249,10 @@ public class InsAreaCompany implements Serializable {
         this.inscompany = ptlAgreementAttribution.getInsCompanyName();
         this.jqpremium = BigDecimal.valueOf(quoteRespVo.getJqPremium());
         this.sypremium = BigDecimal.valueOf(quoteRespVo.getSyPremium());
-//        this.jypremium = BigDecimal.valueOf(quoteRespVo.getJyPremium());
+        this.jypremium = BigDecimal.valueOf(quoteRespVo.getJyPremium());
         this.taxamount = BigDecimal.valueOf(quoteRespVo.getTaxAmount());
         this.sumpremium = BigDecimal.valueOf(quoteRespVo.getSumPermium());
-//        this.accidentInfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getAccidentInfo()));
+        this.accidentInfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getAccidentInfo()));
         this.riskinfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getRiskList()));
         this.kindinfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getKindList()));
         this.orderstatus = InsOrderStatus.S_0.getCode();

+ 90 - 0
src/main/java/com/ydtech/modules/order/entity/api/zj/response/QueryOrderDetailResponse.java

@@ -1,11 +1,17 @@
 package com.ydtech.modules.order.entity.api.zj.response;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.order.entity.crawler.response.CrawlerAuditResponse;
+import com.ydtech.modules.order.entity.dto.DrivingInsuranceDto;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
 import java.io.Serializable;
+import java.util.List;
+import java.util.stream.Collectors;
 
+@EqualsAndHashCode(callSuper = true)
 @NoArgsConstructor
 @Data
 public class QueryOrderDetailResponse extends BaseResponse implements Serializable {
@@ -34,6 +40,13 @@ public class QueryOrderDetailResponse extends BaseResponse implements Serializab
     @JsonProperty("terminalId")
     private String terminalId;
 
+    @JsonProperty("orderPolicyList")
+    private List<OrderPolicyListDTO> orderPolicyList;
+
+    public List<DrivingInsuranceDto> getDrivingInsuranceDto(){
+        return orderPolicyList.stream().map(QueryOrderDetailResponse.OrderPolicyListDTO::toDrivingInsuranceDto).collect(Collectors.toList());
+    }
+
     @NoArgsConstructor
     @Data
     public static class ResultObjDTO implements Serializable {
@@ -59,4 +72,81 @@ public class QueryOrderDetailResponse extends BaseResponse implements Serializab
         private String orderStatus;
 
     }
+
+    @NoArgsConstructor
+    @Data
+    public static class OrderPolicyListDTO implements Serializable {
+
+        private static final long serialVersionUID = 3045604063024832056L;
+
+        @JsonProperty("endDate")
+        private String endDate;
+        /**
+         * 核保状态代码
+         */
+        @JsonProperty("underWriteFlag")
+        private String underWriteFlag;
+        /**
+         * 险种名称
+         */
+        @JsonProperty("typeName")
+        private String typeName;
+        /**
+         * 保单号
+         */
+        @JsonProperty("policyNo")
+        private String policyNo;
+        /**
+         * 保费
+         */
+        @JsonProperty("sumPremium")
+        private Double sumPremium;
+        /**
+         * 险种代码
+         */
+        @JsonProperty("typeCode")
+        private String typeCode;
+
+        @JsonProperty("endHour")
+        private String endHour;
+        /**
+         * 核保信息
+         */
+        @JsonProperty("underWriteMessage")
+        private String underWriteMessage;
+
+        @JsonProperty("startHour")
+        private String startHour;
+        /**
+         * 投保单号
+         */
+        @JsonProperty("insureNo")
+        private String insureNo;
+        /**
+         * 保单生成时间
+         */
+        @JsonProperty("pnpDate")
+        private String pnpDate;
+
+        @JsonProperty("startDate")
+        private String startDate;
+
+        @JsonProperty("startMinute")
+        private String startMinute;
+
+        @JsonProperty("endMinute")
+        private String endMinute;
+
+        private DrivingInsuranceDto toDrivingInsuranceDto() {
+            DrivingInsuranceDto drivingInsuranceDto = new DrivingInsuranceDto();
+            drivingInsuranceDto.setCode(typeCode);
+            drivingInsuranceDto.setName(typeName);
+            drivingInsuranceDto.setPolicyNumber(policyNo);
+            drivingInsuranceDto.setApplicationNumber(insureNo);
+            return drivingInsuranceDto;
+        }
+
+    }
+
+
 }

+ 50 - 8
src/main/java/com/ydtech/modules/order/entity/crawler/response/CrawlerAuditResponse.java

@@ -1,10 +1,15 @@
 package com.ydtech.modules.order.entity.crawler.response;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.order.entity.dto.DrivingInsuranceDto;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
+import java.io.Serializable;
+import java.util.List;
+import java.util.stream.Collectors;
+
 @EqualsAndHashCode(callSuper = true)
 @NoArgsConstructor
 @Data
@@ -23,15 +28,10 @@ public class CrawlerAuditResponse extends CrawlerBaseResponse {
     @JsonProperty("JQ_Policy")
     private String jqPolicy;
     /**
-     * 驾意险保单号
-     */
-    @JsonProperty("JYX_Application")
-    private String jyxApplication;
-    /**
-     * 驾意险投保单号
+     * 驾意险
      */
-    @JsonProperty("JYX_Policy")
-    private String jyxPolicy;
+    @JsonProperty("drivingInsurances")
+    private List<DrivingInsurance> drivingInsurances;
     /**
      * 商业险保单号
      */
@@ -49,4 +49,46 @@ public class CrawlerAuditResponse extends CrawlerBaseResponse {
     @JsonProperty("pay_url")
     private String payUrl;
 
+
+    public List<DrivingInsuranceDto> getDrivingInsuranceDto(){
+        return drivingInsurances.stream().map(DrivingInsurance::toDrivingInsuranceDto).collect(Collectors.toList());
+    }
+
+    @Data
+    public static class DrivingInsurance implements Serializable {
+
+        private static final long serialVersionUID = -1316826976645101919L;
+        /**
+         * 驾意险投保单号
+         */
+        @JsonProperty("policy")
+        private String policy;
+        /**
+         * 驾意险保单号
+         */
+        @JsonProperty("application")
+        private String application;
+        /**
+         * 驾意险名称
+         */
+        @JsonProperty("name")
+        private String name;
+        /**
+         * 驾意险编号
+         */
+        @JsonProperty("code")
+        private String code;
+
+        private DrivingInsuranceDto toDrivingInsuranceDto() {
+            DrivingInsuranceDto drivingInsuranceDto = new DrivingInsuranceDto();
+            drivingInsuranceDto.setCode(code);
+            drivingInsuranceDto.setName(name);
+            drivingInsuranceDto.setPolicyNumber(policy);
+            drivingInsuranceDto.setApplicationNumber(application);
+            return drivingInsuranceDto;
+        }
+
+    }
+
+
 }

+ 37 - 0
src/main/java/com/ydtech/modules/order/entity/dto/DrivingInsuranceDto.java

@@ -0,0 +1,37 @@
+package com.ydtech.modules.order.entity.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+
+/**
+ * @description: 子订单中驾意险信息
+ * @author: wenks
+ * @date: 2023/9/13 10:10
+ **/
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+@ApiModel("子订单中驾意险信息")
+public class DrivingInsuranceDto implements Serializable {
+
+    private static final long serialVersionUID = -3993826854060523043L;
+
+    @ApiModelProperty("驾意险编号")
+    private String code;
+
+    @ApiModelProperty("驾意险名称")
+    private String name;
+
+    @ApiModelProperty("保单号")
+    private String policyNumber;
+
+    @ApiModelProperty("投保单号")
+    private String applicationNumber;
+
+}

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/request/ZmRequestParameter.java

@@ -36,7 +36,7 @@ public class ZmRequestParameter {
         this.contractMainNo = insAreaCompany.getInsOrderNo();
         this.jContractNo = insAreaCompany.getJqapplyno();
         this.sContractNo = insAreaCompany.getSyapplyno();
-        this.jyContractNo = insAreaCompany.getJyapplyno();
+//        this.jyContractNo = insAreaCompany.getJyapplyno();
         this.username = username;
     }
 

+ 6 - 3
src/main/java/com/ydtech/modules/order/entity/vo/PolicyPrintVo.java

@@ -19,11 +19,14 @@ public class PolicyPrintVo implements Serializable {
     private static final long serialVersionUID = -7936960705993238646L;
 
     @ApiModelProperty("子订单")
-    String companyId;
+    private String companyId;
 
     @ApiModelProperty("保险编号 0507交强  0510商业 0513 驾意险")
-    String riskCode;
+    private String riskCode;
+
+    @ApiModelProperty("保单号")
+    private String policyNumber;
 
     @ApiModelProperty("1 标志 2 保单")
-    String type;
+    private String type;
 }

+ 7 - 2
src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.order.service.impl;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.ydtech.constants.enums.InsOrderStatus;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.exception.SystemException;
@@ -12,6 +13,7 @@ import com.ydtech.modules.order.entity.crawler.constants.CrawlerVerifyPaymentCon
 import com.ydtech.modules.order.entity.crawler.request.*;
 import com.ydtech.modules.order.entity.crawler.response.*;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
+import com.ydtech.modules.order.entity.dto.DrivingInsuranceDto;
 import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
@@ -119,11 +121,14 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
         insAreaCompany.setPaymentLink(crawlerAuditResponse.getPayUrl());
         insAreaCompany.setJqapplyno(crawlerAuditResponse.getJqPolicy());
         insAreaCompany.setSyapplyno(crawlerAuditResponse.getSyPolicy());
-        insAreaCompany.setJyapplyno(crawlerAuditResponse.getJyxPolicy());
+
+        // 交叉销售
+        List<DrivingInsuranceDto> drivingInsuranceDto = crawlerAuditResponse.getDrivingInsuranceDto();
+        insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsuranceDto)));
+
         // 保单号
         insAreaCompany.setJqpolicyno(crawlerAuditResponse.getJqApplication());
         insAreaCompany.setSypolicyno(crawlerAuditResponse.getSyApplication());
-        insAreaCompany.setJypolicyno(crawlerAuditResponse.getJyxApplication());
         insAreaCompany.setOrderstatus(InsOrderStatus.S_2.getCode());
         insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
         return HttpResult.ok("核保成功");

+ 4 - 4
src/main/java/com/ydtech/modules/order/service/impl/ZhongMeiOrderApiServiceImpl.java

@@ -188,7 +188,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         insAreaCompany.setPaymentLink(response.getPayUrl());
         insAreaCompany.setJqapplyno(response.getForceProposalNo());
         insAreaCompany.setSyapplyno(response.getBizProposalNo());
-        insAreaCompany.setJyapplyno(response.getAccidentProposalNo());
+//        insAreaCompany.setJyapplyno(response.getAccidentProposalNo());
         insAreaCompany.setInsOrderNo(response.getProposalNo());
         insAreaCompany.setOrderstatus(InsOrderStatus.S_2.getCode());
         insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
@@ -225,7 +225,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
                 // 保单号
                 insAreaCompany.setJqpolicyno(coverageRequest.getForcePolicyNo());
                 insAreaCompany.setSypolicyno(coverageRequest.getBizPolicyNo());
-                insAreaCompany.setJypolicyno(coverageRequest.getAccidentPolicyNo());
+//                insAreaCompany.setJypolicyno(coverageRequest.getAccidentPolicyNo());
                 insAreaCompany.setOrderstatus(InsOrderStatus.S_3.getCode());
                 insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
             }
@@ -245,7 +245,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
             if (AuditStatusEnum.S_1.getCode().equals(approvedRequest.getStatusCode())) {
                 insAreaCompany.setJqapplyno(approvedRequest.getProposalNoJ());
                 insAreaCompany.setSyapplyno(approvedRequest.getProposalNoS());
-                insAreaCompany.setJyapplyno(approvedRequest.getProposalNoCP());
+//                insAreaCompany.setJyapplyno(approvedRequest.getProposalNoCP());
                 insAreaCompany.setPaymentLink(approvedRequest.getPayUrl());
                 insAreaCompany.setOrderstatus(InsOrderStatus.S_2.getCode());
             } else {
@@ -282,7 +282,7 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         if (status.equals(String.valueOf(PaymentStatusEnum.P_2.getCode()))) {
             insAreaCompany.setJqpolicyno(orderStatusResponse.getSubContractNoJ());
             insAreaCompany.setSypolicyno(orderStatusResponse.getSubContractNoS());
-            insAreaCompany.setJypolicyno(orderStatusResponse.getAccidentNo());
+//            insAreaCompany.setJypolicyno(orderStatusResponse.getAccidentNo());
             insAreaCompany.setOrderstatus(InsOrderStatus.S_3.getCode());
             insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
 

+ 2 - 2
src/main/java/com/ydtech/modules/order/service/impl/ZhongMeiOrderServiceImpl.java

@@ -210,7 +210,7 @@ public class ZhongMeiOrderServiceImpl implements ZhongMeiOrderService {
         ZmVerifyPaymentVo data = mapResponse.getData();
         insAreaCompany.setJqpolicyno(data.getContractNo1());
         insAreaCompany.setSypolicyno(data.getContractNo2());
-        insAreaCompany.setJypolicyno(data.getContractNo_CP());
+//        insAreaCompany.setJypolicyno(data.getContractNo_CP());
         insAreaCompany.setInsOrderNo(data.getContractMainNo());
         insAreaCompany.setOrderstatus(InsOrderStatus.S_3.getCode());//已承保
         //  order.setPaytype(payAppNo);
@@ -229,7 +229,7 @@ public class ZhongMeiOrderServiceImpl implements ZhongMeiOrderService {
         ZmRequestParameter zmRequestParameter = new ZmRequestParameter();
         // 传入保单号
         zmRequestParameter.setPolicyNo(insAreaCompany, esmInsAttribution.getUsername());
-        zmRequestParameter.setJyContractNo(insAreaCompany.getJypolicyno());
+//        zmRequestParameter.setJyContractNo(insAreaCompany.getJypolicyno());
         Response<Map<String, String>> body = zhongmeiRequestComponents.zmGetPolicyPrint(zmRequestParameter, new ParameterizedTypeReference<Response<Map<String, String>>>() {
         });
         return HttpResult.ok(body.getData());

+ 6 - 1
src/main/java/com/ydtech/modules/order/service/impl/ZijinOrderApiServiceImpl.java

@@ -21,6 +21,7 @@ import com.ydtech.modules.order.entity.api.zj.constants.enums.RiskCodeEnum;
 import com.ydtech.modules.order.entity.api.zj.request.*;
 import com.ydtech.modules.order.entity.api.zj.response.*;
 import com.ydtech.modules.order.entity.config.ZjConfigureParameters;
+import com.ydtech.modules.order.entity.dto.DrivingInsuranceDto;
 import com.ydtech.modules.order.entity.filter.CarModelsFilterUtils;
 import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
@@ -241,7 +242,7 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
             busNo = insAreaCompany.getSypolicyno();
             busType = "3";
         } else {
-            busNo = insAreaCompany.getJypolicyno();
+            busNo = policyPrintVo.getPolicyNumber();
             busType = "3";
         }
 
@@ -263,6 +264,10 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
         String orderStatus = queryOrderDetailResponse.getResultObj().getOrderStatus();
 
         if (OrderStatusEnum.O_4.getCode().equals(orderStatus)) {
+            // 交叉销售
+            List<DrivingInsuranceDto> drivingInsuranceDto = queryOrderDetailResponse.getDrivingInsuranceDto();
+            insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsuranceDto)));
+
             insAreaCompany.setOrderstatus(InsOrderStatus.S_3.getCode());
             insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
             return HttpResult.ok("订单已支付,订单状态修改完成");