Browse Source

永城修改省市县传递

wks 2 years ago
parent
commit
c5a26f9fdd

+ 3 - 3
src/main/java/com/ydtech/modules/admin/model/vo/PersonAreaVo.java

@@ -14,16 +14,16 @@ public class PersonAreaVo implements Serializable {
     private static final long serialVersionUID = -8235445978142897003L;
 
     //省
-    private Integer provinceCode;
+    private String provinceCode;
     private String provinceName;
 
 
     //市
-    private Integer CityCode;
+    private String CityCode;
     private String CityName;
 
     //区
-    private Integer CountyCode;
+    private String CountyCode;
     private String CountyName;
 
 

+ 9 - 9
src/main/java/com/ydtech/modules/admin/service/impl/SysAreaServiceImpl.java

@@ -75,27 +75,27 @@ public class SysAreaServiceImpl extends ServiceImpl<SysAreaMapper, SysArea>
             //如果等于2 说明是直辖市
             if (sysAreas.size() >= 2) {
                 if (sysAreas.size() == 2) {
-                    personAreaVo.setCountyCode(Integer.valueOf(sysAreas.get(0).getAreaCode()));
+                    personAreaVo.setCountyCode(sysAreas.get(0).getAreaCode());
                     personAreaVo.setCountyName(sysAreas.get(0).getAreaCname());
-                    personAreaVo.setCityCode(Integer.valueOf(sysAreas.get(0).getAreaCode()));
+                    personAreaVo.setCityCode(sysAreas.get(0).getAreaCode());
                     personAreaVo.setCityName(sysAreas.get(0).getAreaCname());
-                    personAreaVo.setProvinceCode(Integer.valueOf(sysAreas.get(1).getAreaCode()));
+                    personAreaVo.setProvinceCode(sysAreas.get(1).getAreaCode());
                     personAreaVo.setProvinceName(sysAreas.get(1).getAreaCname());
                 } else {
-                    personAreaVo.setCountyCode(Integer.valueOf(sysAreas.get(0).getAreaCode()));
+                    personAreaVo.setCountyCode(sysAreas.get(0).getAreaCode());
                     personAreaVo.setCountyName(sysAreas.get(0).getAreaCname());
-                    personAreaVo.setCityCode(Integer.valueOf(sysAreas.get(1).getAreaCode()));
+                    personAreaVo.setCityCode(sysAreas.get(1).getAreaCode());
                     personAreaVo.setCityName(sysAreas.get(1).getAreaCname());
-                    personAreaVo.setProvinceCode(Integer.valueOf(sysAreas.get(2).getAreaCode()));
+                    personAreaVo.setProvinceCode(sysAreas.get(2).getAreaCode());
                     personAreaVo.setProvinceName(sysAreas.get(2).getAreaCname());
                 }
                 return personAreaVo;
             }
         }
 
-        personAreaVo.setProvinceCode(Integer.parseInt(idcard.substring(0, 2) + "0000"));
-        personAreaVo.setCityCode(Integer.parseInt(idcard.substring(0, 4) + "00"));
-        personAreaVo.setCountyCode(Integer.parseInt(idcard.substring(0, 6)));
+        personAreaVo.setProvinceCode(idcard.substring(0, 2) + "0000");
+        personAreaVo.setCityCode(idcard.substring(0, 4) + "00");
+        personAreaVo.setCountyCode(idcard.substring(0, 6));
 
         return personAreaVo;
     }

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

@@ -33,8 +33,6 @@ public class CustomerInfoVo {
     @ApiModelProperty("身份证类型")
     private String identifyType;
 
-    @ApiModelProperty("省市区数组")
-    private List<String> provinceData = new ArrayList<>();
 
     @ApiModelProperty("地址")
     private String addr;

+ 6 - 6
src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1008Request.java

@@ -93,13 +93,13 @@ public class ODR1008Request extends DaJiaBaseRequest {
             @JsonProperty("applicantChasalesNme")
             private String applicantChasalesNme;
             @JsonProperty("applicantCity")
-            private Integer applicantCity;
+            private String applicantCity;
             @JsonProperty("applicantClntAddr")
             private String applicantClntAddr;
             @JsonProperty("applicantClntMrk")
             private Integer applicantClntMrk;
             @JsonProperty("applicantCounty")
-            private Integer applicantCounty;
+            private String applicantCounty;
             @JsonProperty("applicantEmPower")
             private Integer applicantEmPower;
             @JsonProperty("applicantSuffixAddr")
@@ -129,7 +129,7 @@ public class ODR1008Request extends DaJiaBaseRequest {
             @JsonProperty("applicantPhoneType")
             private String applicantPhoneType;
             @JsonProperty("applicantProvince")
-            private Integer applicantProvince;
+            private String applicantProvince;
             @JsonProperty("applicantSex")
             private String applicantSex;
             @JsonProperty("applicantTBirthday")
@@ -213,7 +213,7 @@ public class ODR1008Request extends DaJiaBaseRequest {
             @JsonProperty("insuredCertfCls")
             private String insuredCertfCls;
             @JsonProperty("insuredCity")
-            private Integer insuredCity;
+            private String insuredCity;
             @JsonProperty("insuredClntAddr")
             private String insuredClntAddr;
             @JsonProperty("insuredClntMrk")
@@ -221,7 +221,7 @@ public class ODR1008Request extends DaJiaBaseRequest {
             @JsonProperty("insuredCountry")
             private Integer insuredCountry;
             @JsonProperty("insuredCounty")
-            private Integer insuredCounty;
+            private String insuredCounty;
             @JsonProperty("insuredSuffixAddr")
             private String insuredSuffixAddr;
             @JsonProperty("insuredCusRiskLvl")
@@ -253,7 +253,7 @@ public class ODR1008Request extends DaJiaBaseRequest {
             @JsonProperty("insuredProfissionXiq2")
             private Integer insuredProfissionXiq2;
             @JsonProperty("insuredProvince")
-            private Integer insuredProvince;
+            private String insuredProvince;
             @JsonProperty("insuredResidAddr")
             private String insuredResidAddr;
             @JsonProperty("insuredSex")

+ 13 - 42
src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java

@@ -586,9 +586,9 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
         PersonAreaVo personAreaVo = sysAreaService.queryByAddressYc(insureInfo.getAddr(), insureInfo.getIdentifyNumber());
 
         //构造被保人地区
-        m.getRequestLabel().getCondition().getCustomer().setCProvince(personAreaVo.getProvinceCode().toString());
-        m.getRequestLabel().getCondition().getCustomer().setCCity(personAreaVo.getCityCode().toString());
-        m.getRequestLabel().getCondition().getCustomer().setCCounty(personAreaVo.getCountyCode().toString());
+        m.getRequestLabel().getCondition().getCustomer().setCProvince(personAreaVo.getProvinceCode());
+        m.getRequestLabel().getCondition().getCustomer().setCCity(personAreaVo.getCityCode());
+        m.getRequestLabel().getCondition().getCustomer().setCCounty(personAreaVo.getCountyCode());
 
         try {
             AuditResponse rd = yongchengRequestApiComponents.newXnyUnderwritingService(m);
@@ -1408,19 +1408,6 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
         //投保人
         CustomerInfoVo applicant = yaQuoteInfoVo.getPolicyHolderInfo();
 
-        //车主省市区
-        List<String> ownerProvinceData = owner.getProvinceData();
-        //被保人省市区
-        List<String> insuredProvinceData = insured.getProvinceData();
-        //投保人 省市区
-        List<String> applicantProvinceData = applicant.getProvinceData();
-
-        if (CollUtil.isNotEmpty(ownerProvinceData) && CollUtil.isNotEmpty(insuredProvinceData) && CollUtil.isNotEmpty(applicantProvinceData)) {
-            //构造参数
-            buildRegionParam(m, yaQuoteInfoVo, ownerProvinceData, insuredProvinceData, applicantProvinceData);
-            return;
-        }
-
         //车主地区信息
         PersonAreaVo ownerPersonAreaVo = sysAreaService.queryByAddressYc(owner.getAddr(), owner.getIdentifyNumber());
         PersonAreaVo insuredPersonAreaVo;
@@ -1446,26 +1433,23 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
             }
 
         if (!Objects.isNull(ownerPersonAreaVo)) {
-            ownerProvinceData.add(ownerPersonAreaVo.getCountyCode().toString());
-            ownerProvinceData.add(ownerPersonAreaVo.getCityCode().toString());
-            ownerProvinceData.add(ownerPersonAreaVo.getProvinceCode().toString());
+            m.getRequestLabel().getCondition().getVhlowner().setCProvince(ownerPersonAreaVo.getProvinceCode());
+            m.getRequestLabel().getCondition().getVhlowner().setCCity(ownerPersonAreaVo.getCityCode());
+            m.getRequestLabel().getCondition().getVhlowner().setCCounty(ownerPersonAreaVo.getCountyCode());
         }
 
         if (!Objects.isNull(insuredPersonAreaVo)) {
-            insuredProvinceData.add(insuredPersonAreaVo.getCountyCode().toString());
-            insuredProvinceData.add(insuredPersonAreaVo.getCityCode().toString());
-            insuredProvinceData.add(insuredPersonAreaVo.getProvinceCode().toString());
+            m.getRequestLabel().getCondition().getInsured().setCProvince(insuredPersonAreaVo.getProvinceCode());
+            m.getRequestLabel().getCondition().getInsured().setCCity(insuredPersonAreaVo.getCityCode());
+            m.getRequestLabel().getCondition().getInsured().setCCounty(insuredPersonAreaVo.getCountyCode());
         }
 
         if (!Objects.isNull(applicantPersonAreaVo)) {
-            applicantProvinceData.add(applicantPersonAreaVo.getCountyCode().toString());
-            applicantProvinceData.add(applicantPersonAreaVo.getCityCode().toString());
-            applicantProvinceData.add(applicantPersonAreaVo.getProvinceCode().toString());
+            m.getRequestLabel().getCondition().getApplicant().setCProvince(applicantPersonAreaVo.getProvinceCode());
+            m.getRequestLabel().getCondition().getApplicant().setCCity(applicantPersonAreaVo.getCityCode());
+            m.getRequestLabel().getCondition().getApplicant().setCCounty(applicantPersonAreaVo.getCountyCode());
         }
 
-        //构造参数
-        buildRegionParam(m, yaQuoteInfoVo, ownerProvinceData, insuredProvinceData, applicantProvinceData);
-
     }
 
 
@@ -1555,20 +1539,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
     private void buildRegionParam(Ruote m, BaseQuoteInfoVo yaQuoteInfoVo, List<String> ownerProvinceData,
                                   List<String> insuredProvinceData, List<String> applicantProvinceData) {
-        yaQuoteInfoVo.getOwnerInfo().setProvinceData(ownerProvinceData);
-        m.getRequestLabel().getCondition().getVhlowner().setCProvince(ownerProvinceData.get(2));
-        m.getRequestLabel().getCondition().getVhlowner().setCCity(ownerProvinceData.get(1));
-        m.getRequestLabel().getCondition().getVhlowner().setCCounty(ownerProvinceData.get(0));
-
-        yaQuoteInfoVo.getInsuredPersonInfo().setProvinceData(insuredProvinceData);
-        m.getRequestLabel().getCondition().getInsured().setCProvince(insuredProvinceData.get(2));
-        m.getRequestLabel().getCondition().getInsured().setCCity(insuredProvinceData.get(1));
-        m.getRequestLabel().getCondition().getInsured().setCCounty(insuredProvinceData.get(0));
-
-        yaQuoteInfoVo.getPolicyHolderInfo().setProvinceData(applicantProvinceData);
-        m.getRequestLabel().getCondition().getApplicant().setCProvince(applicantProvinceData.get(2));
-        m.getRequestLabel().getCondition().getApplicant().setCCity(applicantProvinceData.get(1));
-        m.getRequestLabel().getCondition().getApplicant().setCCounty(applicantProvinceData.get(0));
+
 
     }