Explorar el Código

紫金企业报价的开发

dongxin hace 1 año
padre
commit
343f159c06

+ 7 - 1
src/main/java/com/ydtech/modules/ins/model/vo/CustomerInfoVo.java

@@ -94,9 +94,15 @@ public class CustomerInfoVo {
     @ApiModelProperty(value = "经营范围")
     private String scope;
 
-    @ApiModelProperty(value = "联系人")
+    @ApiModelProperty(value = "人")
     private String legalPerson;
 
+    @ApiModelProperty(value = "法人身份证号")
+    private String leaderIdentifyNumber;
+
+    @ApiModelProperty(value = "法人身份证止期")
+    private String leaderOtherEffectiveDate;
+
 
     public boolean contrastInfo(CustomerInfoVo customerInfoVo) {
         if (!ObjectUtils.nullSafeEquals(this.name, customerInfoVo.getName())) {

+ 5 - 1
src/main/java/com/ydtech/modules/order/entity/api/zijin/constants/enums/FileTypeEnum.java

@@ -15,7 +15,11 @@ public enum FileTypeEnum {
 
     FT_1("1", "验车照片", new String[]{"C05"}),
     FT_2("2", "其他车辆证件", new String[]{}),
-    FT_3("3", "其他客户证件", new String[]{}),
+    FT_3("3", "其他客户证件",  new String[]{
+            InsuranceImageEnum.Y02.getCode(),
+            InsuranceImageEnum.Y03.getCode(),
+            InsuranceImageEnum.Y04.getCode(),
+    }),
     FT_4("4", "车辆购置证明", new String[]{
             InsuranceImageEnum.GC00.getCode()
     }),

+ 97 - 9
src/main/java/com/ydtech/modules/order/entity/api/zijin/request/CalculatePremiumRequest.java

@@ -406,12 +406,19 @@ public class CalculatePremiumRequest implements Serializable {
         private String vehicleOwnerNature;
 
         public CarOwnerInfoDTO(CustomerInfoVo customerInfoVo) {
+            if(StringUtils.isBlank(customerInfoVo.getProperty()) || !"0".equals(customerInfoVo.getProperty())) {
+                this.ownerIdentifyNumber = customerInfoVo.getIdentifyNumber();
+                this.ownerIdentifyType = "01";
+                this.vehicleOwnerNature = "1";
+            }else{
+                this.ownerIdentifyNumber = customerInfoVo.getOrganizationCode();
+                this.ownerIdentifyType = "73";
+                this.vehicleOwnerNature = "3";
+            }
             this.carOwner = customerInfoVo.getName();
             this.mobile = customerInfoVo.getMobile();
             this.ownerAddress = customerInfoVo.getAddr();
-            this.ownerIdentifyNumber = customerInfoVo.getIdentifyNumber();
-            this.ownerIdentifyType = "01";
-            this.vehicleOwnerNature = "1";
+
         }
 
     }
@@ -1071,19 +1078,100 @@ public class CalculatePremiumRequest implements Serializable {
         @JsonProperty("validDate")
         private String validDate;
 
+        /**
+         * 授权人姓名 说明:投保人为法人时必传
+         */
+        @JsonProperty("certigierName")
+        private String certigierName;
+
+        /**
+         * 授权人证件类型	说明:投保人为法人时必传;
+         */
+        @JsonProperty("certigierType")
+        private String certigierType;
+
+        /**
+         * 授权人证件号码	说明:投保人为法人时必传;
+         */
+        @JsonProperty("certigierNumber")
+        private String certigierNumber;
+
+        /**
+         * 授权人证件号码有效期	说明:投保人为法人时必传;
+         */
+        @JsonProperty("certigierNumValidDate")
+        private String certigierNumValidDate;
+
+        /**
+         * 负责人姓名	说明:投保人为法人时必传;
+         */
+        @JsonProperty("chiefName")
+        private String chiefName;
+
+        /**
+         * 负责人证件类型	说明:投保人为法人时必传;
+         */
+        @JsonProperty("chiefType")
+        private String chiefType;
+
+        /**
+         * 负责人证件号码	说明:投保人为法人时必传;
+         */
+        @JsonProperty("chiefNumber")
+        private String chiefNumber;
+
+        /**
+         * 负责人证件号码有效期	说明:投保人为法人时必传;
+         */
+        @JsonProperty("chiefNumValidDate")
+        private String chiefNumValidDate;
+
+        /**
+         * 民族
+         */
+        @JsonProperty("nation")
+        private String nation;
+
+        /**
+         * 客户性质为单位时,单位性质必传
+         */
+        @JsonProperty("businessSort")
+        private String businessSort;
+
+
+
         public InsuredListDTO(CustomerInfoVo policyHolderInfo, String insuredFlag) {
             this.occupation = "030199";
             this.address = policyHolderInfo.getAddr();
-            this.identifyNumber = policyHolderInfo.getIdentifyNumber();
-            this.identifyType = "01";
+
+            if(StringUtils.isBlank(policyHolderInfo.getProperty()) || !"0".equals(policyHolderInfo.getProperty())) {
+                this.identifyNumber = policyHolderInfo.getIdentifyNumber();
+                this.identifyType = "01";
+                this.insuredNature = "3";
+                this.insuredType = "1";
+                int gender = IdcardUtil.getGenderByIdCard(policyHolderInfo.getIdentifyNumber());
+                this.sex = gender == 1 ? "1" : "2";
+            }else{
+                this.businessSort = "900";
+                this.businessSort = "900";
+                this.identifyNumber = policyHolderInfo.getOrganizationCode();
+                this.identifyType = "73";
+                this.insuredNature = "4";
+                this.insuredType = "2";
+                this.sex = "9";
+                this.certigierName = policyHolderInfo.getLegalPerson();
+                this.certigierType = "01";
+                this.certigierNumber = policyHolderInfo.getLeaderIdentifyNumber();
+                this.certigierNumValidDate = policyHolderInfo.getLeaderOtherEffectiveDate();
+                this.chiefName = policyHolderInfo.getLegalPerson();
+                this.chiefType = "01";
+                this.chiefNumber = policyHolderInfo.getLeaderIdentifyNumber();
+                this.chiefNumValidDate = policyHolderInfo.getLeaderOtherEffectiveDate();
+            }
             this.insuredFlag = insuredFlag;
             this.insuredName = policyHolderInfo.getName();
-            this.insuredNature = "3";
-            this.insuredType = "1";
             this.longAddress = policyHolderInfo.getAddr();
             this.mobile = policyHolderInfo.getMobile();
-            int gender = IdcardUtil.getGenderByIdCard(policyHolderInfo.getIdentifyNumber());
-            this.sex = gender == 1 ? "1" : "2";
             this.validDate = policyHolderInfo.getIdentifyValidEndDate();
         }