785834757 пре 1 година
родитељ
комит
90bc438aa3
1 измењених фајлова са 119 додато и 0 уклоњено
  1. 119 0
      src/main/java/com/ydtech/modules/ins/model/guoren/PremiumReq.java

+ 119 - 0
src/main/java/com/ydtech/modules/ins/model/guoren/PremiumReq.java

@@ -21,6 +21,7 @@ import com.ydtech.modules.order.entity.vo.guoren.GuoRenSpecialAgreementVo;
 import com.ydtech.modules.protocol.utils.AssertionUtils;
 import com.ydtech.utils.DateTimeUtil;
 import com.ydtech.utils.StringUtils;
+import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -58,6 +59,10 @@ public class PremiumReq {
     @JSONField(name = "uuid")
     private String uuid;
 
+    @JsonProperty(value = "bc")
+    @JSONField(name = "bc")
+    private BcDTO bc;
+
 
     /**
      * 构造保费计算请求参数
@@ -116,6 +121,9 @@ public class PremiumReq {
             quoteReq.setBi(biDto);
         }
 
+        //设置 投保人被保人信息
+        BcDTO bcDto = new BcDTO(yaQuoteInfoVo.getPolicyHolderInfo(),yaQuoteInfoVo.getInsuredPersonInfo());
+        quoteReq.setBc(bcDto);
         //车价查询uid
         quoteReq.setUuid(carPriceResult.getInputvo());
         //不超过业实际参考价格上下30%
@@ -1340,6 +1348,117 @@ public class PremiumReq {
             private String startDate;
         }
     }
+
+    @NoArgsConstructor
+    @AllArgsConstructor
+    @Data
+    public static class BcDTO{
+
+        @JsonProperty(value = "prpTinsured")
+        @JSONField(name = "prpTinsured")
+        private BcDTO.PrpTinsured prpTinsured;
+
+        @NoArgsConstructor
+        @Data
+        public static class PrpTinsured{
+
+            @JsonProperty(value = "appliName")
+            @JSONField(name = "appliName")
+            private String appliName;
+
+            @JsonProperty(value = "appliInsuredNature")
+            @JSONField(name = "appliInsuredNature")
+            private String appliInsuredNature;
+
+            @JsonProperty(value = "appliIdentifyType")
+            @JSONField(name = "appliIdentifyType")
+            private String appliIdentifyType;
+
+            @JsonProperty(value = "appliIdentifyNumber")
+            @JSONField(name = "appliIdentifyNumber")
+            private String appliIdentifyNumber;
+
+            @JsonProperty(value = "appliMobile")
+            @JSONField(name = "appliMobile")
+            private String appliMobile;
+
+            @JsonProperty(value = "appliAddress")
+            @JSONField(name = "appliAddress")
+            private String appliAddress;
+
+            @JsonProperty(value = "appliPostCode")
+            @JSONField(name = "appliPostCode")
+            private String appliPostCode;
+
+
+            @JsonProperty(value = "insuredName")
+            @JSONField(name = "insuredName")
+            private String insuredName;
+
+            @JsonProperty(value = "insuredInsuredNature")
+            @JSONField(name = "insuredInsuredNature")
+            private String insuredInsuredNature;
+
+            @JsonProperty(value = "insuredMobile")
+            @JSONField(name = "insuredMobile")
+            private String insuredMobile;
+
+            @JsonProperty(value = "insuredIdentifyType")
+            @JSONField(name = "insuredIdentifyType")
+            private String insuredIdentifyType;
+
+            @JsonProperty(value = "insuredIdentifyNumber")
+            @JSONField(name = "insuredIdentifyNumber")
+            private String insuredIdentifyNumber;
+
+            @JsonProperty(value = "insuredAddress")
+            @JSONField(name = "insuredAddress")
+            private String insuredAddress;
+
+            @JsonProperty(value = "insuredPostCode")
+            @JSONField(name = "insuredPostCode")
+            private String insuredPostCode;
+
+            @JsonProperty(value = "appliIDValidStartDate")
+            @JSONField(name = "appliIDValidStartDate")
+            private String appliIDValidStartDate;
+
+            @JsonProperty(value = "appliIDValidDate")
+            @JSONField(name = "appliIDValidDate")
+            private String appliIDValidDate;
+
+            @JsonProperty(value = "insuredIDValidStartDate")
+            @JSONField(name = "insuredIDValidStartDate")
+            private String insuredIDValidStartDate;
+
+            @JsonProperty(value = "insuredIDValidDate")
+            @JSONField(name = "insuredIDValidDate")
+            private String insuredIDValidDate;
+
+        }
+
+        public BcDTO(CustomerInfoVo app,CustomerInfoVo insurance){
+            PrpTinsured prpTinsured = new PrpTinsured();
+            prpTinsured.setAppliName(app.getName());
+            prpTinsured.setAppliInsuredNature("3");
+            prpTinsured.setAppliIdentifyType(app.getIdentifyType());
+            prpTinsured.setAppliIdentifyNumber(app.getIdentifyNumber());
+            prpTinsured.setAppliMobile(app.getMobile());
+            prpTinsured.setAppliAddress(app.getAddr());
+//            prpTinsured.setAppliPostCode(app.get);
+            prpTinsured.setAppliIDValidStartDate(app.getIdentifyValidDate());
+            prpTinsured.setAppliIDValidDate(app.getIdentifyValidEndDate());
+            prpTinsured.setInsuredName(insurance.getName());
+            prpTinsured.setInsuredInsuredNature("1");
+            prpTinsured.setInsuredMobile(insurance.getMobile());
+            prpTinsured.setInsuredIdentifyType(insurance.getIdentifyType());
+            prpTinsured.setInsuredIdentifyNumber(insurance.getIdentifyNumber());
+            prpTinsured.setInsuredAddress(insurance.getAddr());
+            prpTinsured.setInsuredIDValidStartDate(insurance.getIdentifyValidDate());
+            prpTinsured.setInsuredIDValidDate(insurance.getIdentifyValidEndDate());
+            this.setPrpTinsured(prpTinsured);
+        }
+    }
 }