Kaynağa Gözat

Merge remote-tracking branch 'origin/test' into test

wks 1 yıl önce
ebeveyn
işleme
4a5b049bb2

+ 3 - 0
src/main/java/com/ydtech/modules/ins/model/vo/CustomerInfoVo.java

@@ -58,6 +58,9 @@ public class CustomerInfoVo {
     @ApiModelProperty("手机号")
     private String mobile;
 
+    @ApiModelProperty("固定电话")
+    private String tel;
+
     @ApiModelProperty(value = "有效时间开始")
     @CheckDateTime(format = "yyyy-MM-dd", message = "请检查身份证的开始有效时间")
     @NotBlank(message = "请检车有效时间开始是否填写")

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

@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.ArrayUtil;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ydtech.constants.enums.InsuranceRisk;
+import com.ydtech.exception.SystemException;
 import com.ydtech.modules.admin.model.vo.PersonAreaVo;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
@@ -63,6 +64,18 @@ public class InsurePremiumRequest extends ChengTaiBaseRequest{
         // 客户信息
         OwnerDTO owner = new OwnerDTO(quoteInfoVo.getOwnerInfo());
         this.owner = owner;
+        CustomerInfoVo policyHolderInfo = quoteInfoVo.getPolicyHolderInfo();
+        CustomerInfoVo insuredPersonInfo = quoteInfoVo.getInsuredPersonInfo();
+        if ("0".equals(policyHolderInfo.getProperty())){
+            if (StringUtils.isBlank(policyHolderInfo.getTel())){
+                throw new SystemException("诚泰公司企业报价固定电话必填!");
+            }
+        }
+        if ("0".equals(insuredPersonInfo.getProperty())){
+            if (StringUtils.isBlank(insuredPersonInfo.getTel())){
+                throw new SystemException("诚泰公司企业报价固定电话必填!");
+            }
+        }
         // 交强险
         Boolean isJq = InsuranceRisk.getFlagByTRAFFIC(quoteInfoVo.getRiskList());
         if (isJq){
@@ -658,6 +671,9 @@ public class InsurePremiumRequest extends ChengTaiBaseRequest{
                 this.identifyValidEndDate = ownerInfo.getIdentifyValidEndDate();
                 this.longTerm = "0";
             }else{
+                if (StringUtils.isBlank(ownerInfo.getTel())){
+                    throw new SystemException("诚泰公司企业报价固定电话必填!");
+                }
                 this.type = "2"; // 机构
                 this.identifyTypeCode = "4";
                 this.identifyTypeName = "统一社会信用代码";

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

@@ -103,7 +103,7 @@ public class SubmitVerifyRequest extends ChengTaiBaseRequest{
                 this.identifyTypeCode = "4";
                 this.identifyNumber = applyInfo.getOrganizationCode();
                 this.organizationCode = applyInfo.getOrganizationCode();
-                this.tel = applyInfo.getMobile();
+                this.tel = applyInfo.getTel();
                 this.linkerName = applyInfo.getName();
                 this.unitTypeCode = "900"; // 单位性质 900:其他
             }else{
@@ -180,7 +180,7 @@ public class SubmitVerifyRequest extends ChengTaiBaseRequest{
                 this.identifyTypeCode = "4";
                 this.identifyNumber = insureInfo.getOrganizationCode();
                 this.organizationCode = insureInfo.getOrganizationCode();
-                this.tel = insureInfo.getMobile();
+                this.tel = insureInfo.getTel();
                 this.linkerName = insureInfo.getName();
                 this.unitTypeCode = "900"; // 单位性质 900:其他
             }else{