dongxin пре 1 година
родитељ
комит
231c09b67f

+ 68 - 26
src/main/java/com/ydtech/modules/fee/dto/vo/RuleAttrMappingVo.java

@@ -11,6 +11,7 @@ import com.ydtech.modules.order.entity.api.bohai.constants.VehicleUsage;
 import com.ydtech.modules.order.entity.api.dajia.constants.TypeVehicleMapping;
 import com.ydtech.modules.protocol.entity.po.PtlNewCarJudgeRules;
 import com.ydtech.modules.protocols.entity.po.PtlAgreementUndwrtRulesAttr;
+import com.ydtech.utils.StringUtils;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -113,44 +114,85 @@ public class RuleAttrMappingVo {
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("SyRenewalOfInsurance", insAreaCompany.getSyRenewal()));
 
         CustomerInfoVo ownerInfo = insOrders.getOwnerinfo().toJavaObject(CustomerInfoVo.class);
-        //车主 证件号码(前6位)
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersIDNumber", ownerInfo.getIdentifyNumber()));
-        //车主 年龄
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersAge", ownerInfo.getAge()));
-        //车主 性别
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersSex", ownerInfo.getGender().equals("男") ? "1" : "2"));
+        if(StringUtils.isBlank(ownerInfo.getProperty()) || !"0".equals(ownerInfo.getProperty())) {
+            //车主 证件号码(前6位)
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersIDNumber", ownerInfo.getIdentifyNumber()));
+            //车主 年龄
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersAge", ownerInfo.getAge()));
+            //车主 性别
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnersSex", ownerInfo.getGender().equals("男") ? "1" : "2"));
+        }
         //车主 姓名
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("CarOwnerName", ownerInfo.getName()));
 
         CustomerInfoVo policyHolderInfo = insOrders.getApplyinfo().toJavaObject(CustomerInfoVo.class);
-        //投保人 证件号码(前6位)
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantIDNumber", policyHolderInfo.getIdentifyNumber()));
-        //投保人 年龄
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantAge", policyHolderInfo.getAge()));
-        //投保人 性别
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantSex", policyHolderInfo.getGender().equals("男") ? "1" : "2"));
+        if(StringUtils.isBlank(policyHolderInfo.getProperty()) || !"0".equals(policyHolderInfo.getProperty())) {
+            //投保人 证件号码(前6位)
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantIDNumber", policyHolderInfo.getIdentifyNumber()));
+            //投保人 年龄
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantAge", policyHolderInfo.getAge()));
+            //投保人 性别
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("ApplicantSex", policyHolderInfo.getGender().equals("男") ? "1" : "2"));
+        }
 
         CustomerInfoVo insuredPersonInfo = insOrders.getInsureinfo().toJavaObject(CustomerInfoVo.class);
-        //被保人 证件号码(前6位)
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredIDNumber", insuredPersonInfo.getIdentifyNumber()));
-        //被保人 年龄
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredAge", insuredPersonInfo.getAge()));
-        //被保人 性别
-        ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredSex", insuredPersonInfo.getGender().equals("男") ? "1" : "2"));
-
+        if(StringUtils.isBlank(insuredPersonInfo.getProperty()) || !"0".equals(insuredPersonInfo.getProperty())) {
+            //被保人 证件号码(前6位)
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredIDNumber", insuredPersonInfo.getIdentifyNumber()));
+            //被保人 年龄
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredAge", insuredPersonInfo.getAge()));
+            //被保人 性别
+            ruleAttrMappingVoList.add(new RuleAttrMappingVo("InsuredSex", insuredPersonInfo.getGender().equals("男") ? "1" : "2"));
+        }
         String OPIConsistent = "0";
-        //车主 投被保人是否一致
-        if((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
-                (ownerInfo.getIdentifyNumber().equals(insuredPersonInfo.getIdentifyNumber()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber()))){
-            OPIConsistent = "1";
+        if(StringUtils.isNotBlank(ownerInfo.getProperty())){
+            boolean boo = ownerInfo.getProperty().equals(insuredPersonInfo.getProperty()) && insuredPersonInfo.getProperty().equals(policyHolderInfo.getProperty());
+            if(boo){
+                if("0".equals(ownerInfo.getProperty())){
+                    if((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
+                            (ownerInfo.getOrganizationCode().equals(insuredPersonInfo.getOrganizationCode()) && insuredPersonInfo.getOrganizationCode().equals(policyHolderInfo.getOrganizationCode()))){
+                        OPIConsistent = "1";
+                    }
+                }else{
+                    if((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
+                            (ownerInfo.getIdentifyNumber().equals(insuredPersonInfo.getIdentifyNumber()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber()))){
+                        OPIConsistent = "1";
+                    }
+                }
+            }
+        }else{
+            if((ownerInfo.getName().equals(insuredPersonInfo.getName()) && insuredPersonInfo.getName().equals(policyHolderInfo.getName())) &&
+                    (ownerInfo.getIdentifyNumber().equals(insuredPersonInfo.getIdentifyNumber()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber()))){
+                OPIConsistent = "1";
+            }
         }
+
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("OPIConsistent",OPIConsistent));
 
         String PIConsistent = "0";
-        //投被保人是否一致
-        if(insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber())){
-            PIConsistent = "1";
+
+        if(StringUtils.isNotBlank(insuredPersonInfo.getProperty())){
+            boolean boo = insuredPersonInfo.getProperty().equals(policyHolderInfo.getProperty());
+            if(boo){
+                if("0".equals(insuredPersonInfo.getProperty())){
+                    //投被保人是否一致
+                    if(insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getOrganizationCode().equals(policyHolderInfo.getOrganizationCode())){
+                        PIConsistent = "1";
+                    }
+                }else{
+                    //投被保人是否一致
+                    if(insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber())){
+                        PIConsistent = "1";
+                    }
+                }
+            }
+        }else{
+            //投被保人是否一致
+            if(insuredPersonInfo.getName().equals(policyHolderInfo.getName()) && insuredPersonInfo.getIdentifyNumber().equals(policyHolderInfo.getIdentifyNumber())){
+                PIConsistent = "1";
+            }
         }
+
         ruleAttrMappingVoList.add(new RuleAttrMappingVo("PIConsistent",PIConsistent));
 
         //2024-06-20 起保日期 月份判断

+ 1 - 1
src/main/java/com/ydtech/modules/order/components/chengtai/ChengTaiRequestApiComponents.java

@@ -211,7 +211,7 @@ public class ChengTaiRequestApiComponents {
      */
     private void verificationResponseCode(String responseCode, boolean flag, String responseMsg) {
         if (!flag){
-            throw new SystemException("验签失败");
+            throw new SystemException(responseMsg);
         }
         if (!ResponseCode.R_000.getCode().equals(responseCode) && !responseMsg.contains("重复投保") && !responseMsg.contains("录入的校验码有误")) {
             throw new SystemException(responseMsg);

+ 3 - 3
src/main/java/com/ydtech/modules/order/entity/api/chengtai/constants/ImageTypeEnum.java

@@ -19,21 +19,21 @@ public enum ImageTypeEnum {
     }),
 
     IT_2("2", "车主身份证正面",new String[]{
-            InsuranceImageEnum.C02.getCode(),
+            InsuranceImageEnum.C02.getCode(), InsuranceImageEnum.Y02.getCode()
     }),
     IT_3("3", "车主身份证反面",new String[]{
             InsuranceImageEnum.D02.getCode(),
     }),
 
     IT_4("4", "投保人身份证正面",new String[]{
-            InsuranceImageEnum.C03.getCode(),
+            InsuranceImageEnum.C03.getCode(), InsuranceImageEnum.Y03.getCode()
     }),
     IT_5("5", "投保人身份证反面",new String[]{
             InsuranceImageEnum.D03.getCode(),
     }),
 
     IT_6("6", "被保人身份证正面",new String[]{
-            InsuranceImageEnum.C04.getCode(),
+            InsuranceImageEnum.C04.getCode(), InsuranceImageEnum.Y04.getCode()
     }),
     IT_7("7", "被保人身份证反面",new String[]{
             InsuranceImageEnum.D04.getCode(),

+ 2 - 2
src/main/java/com/ydtech/modules/order/entity/api/chengtai/request/InsurePremiumRequest.java

@@ -659,8 +659,8 @@ public class InsurePremiumRequest extends ChengTaiBaseRequest{
                 this.longTerm = "0";
             }else{
                 this.type = "2"; // 机构
-                this.identifyTypeCode = "3";
-                this.identifyTypeName = "营业执照";
+                this.identifyTypeCode = "4";
+                this.identifyTypeName = "统一社会信用代码";
                 this.identifyNumber = ownerInfo.getOrganizationCode();
             }
             this.isTerror = "0";

+ 2 - 2
src/main/java/com/ydtech/modules/order/entity/api/chengtai/request/SubmitVerifyRequest.java

@@ -100,7 +100,7 @@ public class SubmitVerifyRequest extends ChengTaiBaseRequest{
             CustomerInfoVo applyInfo = JSON.toJavaObject(insOrders.getApplyinfo(),CustomerInfoVo.class);
             if("0".equals(applyInfo.getProperty())){
                 this.type = "2";
-                this.identifyTypeCode = "1";
+                this.identifyTypeCode = "4";
                 this.identifyNumber = applyInfo.getOrganizationCode();
                 this.organizationCode = applyInfo.getOrganizationCode();
                 this.tel = applyInfo.getMobile();
@@ -177,7 +177,7 @@ public class SubmitVerifyRequest extends ChengTaiBaseRequest{
             CustomerInfoVo insureInfo = JSON.toJavaObject(insOrders.getInsureinfo(),CustomerInfoVo.class);
             if("0".equals(insureInfo.getProperty())){
                 this.type = "2";
-                this.identifyTypeCode = "1";
+                this.identifyTypeCode = "4";
                 this.identifyNumber = insureInfo.getOrganizationCode();
                 this.organizationCode = insureInfo.getOrganizationCode();
                 this.tel = insureInfo.getMobile();

+ 17 - 9
src/main/java/com/ydtech/modules/order/entity/api/chengtai/request/UploadFileRequest.java

@@ -46,20 +46,28 @@ public class UploadFileRequest extends ChengTaiBaseRequest{
             if(contains){
                 this.imageType = imageTypeEnum.getCode();
                 this.fileList = Arrays.asList(new FileListDTO(insTaskImagesBase64, imageTypeEnum));
-                if(InsuranceImageEnum.C01.getCode().equals(this.imageType)
-                        || InsuranceImageEnum.D01.getCode().equals(this.imageType)
-                        || InsuranceImageEnum.C02.getCode().equals(this.imageType)
-                        || InsuranceImageEnum.D02.getCode().equals(this.imageType)
-                ){
+                if(InsuranceImageEnum.C01.getCode().equals(this.imageType)){
                     this.imageObjType = "1";
-                }else if(InsuranceImageEnum.C03.getCode().equals(this.imageType)
-                        || InsuranceImageEnum.D03.getCode().equals(this.imageType)
+                }else if(InsuranceImageEnum.D01.getCode().equals(this.imageType)){
+                    this.imageObjType = "11";
+                }else if(InsuranceImageEnum.C02.getCode().equals(this.imageType)
+                    || InsuranceImageEnum.Y02.getCode().equals(this.imageType)
                 ){
                     this.imageObjType = "2";
+                } else if(InsuranceImageEnum.D02.getCode().equals(this.imageType)){
+                    this.imageObjType = "3";
+                } else if(InsuranceImageEnum.C03.getCode().equals(this.imageType)
+                        || InsuranceImageEnum.Y03.getCode().equals(this.imageType)
+                ){
+                    this.imageObjType = "4";
+                } else if(InsuranceImageEnum.D03.getCode().equals(this.imageType)){
+                    this.imageObjType = "5";
                 } else if(InsuranceImageEnum.C04.getCode().equals(this.imageType)
-                        || InsuranceImageEnum.D04.getCode().equals(this.imageType)
+                        || InsuranceImageEnum.Y04.getCode().equals(this.imageType)
                 ){
-                    this.imageObjType = "3";
+                    this.imageObjType = "6";
+                } else if(InsuranceImageEnum.D04.getCode().equals(this.imageType)){
+                    this.imageObjType = "7";
                 }
                 break;
             }