Explorar o código

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

dongxin hai 1 ano
pai
achega
0b14e6e81d

+ 15 - 6
src/main/java/com/ydtech/modules/ins/model/yc/audit/Audit.java

@@ -261,12 +261,21 @@ public class Audit {
         customer.setOwnerAddress(ownerInfo.getAddr());
         customer.setAppcIncome("0");
         customer.setInsuredcIncome("0");
-        customer.setBenefitCustType("1");
-        customer.setBenefitCertiType("120001");
-        customer.setBenefitCertiCode(insureInfo.getIdentifyNumber());
-        customer.setBenefitAge(IDCardUtils.GetBirthday(insureInfo.getIdentifyNumber()));
-        customer.setBenefitSex(IDCardUtils.GetYcSex(insureInfo.getIdentifyNumber()));
-        customer.setBenefitName(insureInfo.getName());
+        String property1 = insureInfo.getProperty();
+        if (StringUtils.isNotEmpty(property1) && "0".equals(property1)) {
+            customer.setBenefitCustType("0");
+            customer.setBenefitCertiType("110004");
+            customer.setBenefitCertiCode(insureInfo.getOrganizationCode());
+            customer.setBenefitName(insureInfo.getName());
+        }else {
+
+            customer.setBenefitCustType("1");
+            customer.setBenefitCertiType("120001");
+            customer.setBenefitCertiCode(insureInfo.getIdentifyNumber());
+            customer.setBenefitAge(IDCardUtils.GetBirthday(insureInfo.getIdentifyNumber()));
+            customer.setBenefitSex(IDCardUtils.GetYcSex(insureInfo.getIdentifyNumber()));
+            customer.setBenefitName(insureInfo.getName());
+        }
         customer.setBnfctcertfclsvalidate(YcBuildData.ID_CARD_INDATE);
 //        customer.setCProvince(Province.buildProvince(insureInfo.getAddr()));
 //        customer.setCCity(City.buildCity(insureInfo.getAddr()));

+ 3 - 1
src/main/java/com/ydtech/modules/ins/model/yc/ruote/Insured.java

@@ -274,12 +274,14 @@ public class Insured {
 //            insured.setCWorkCtt(insuredPersonInfo.getScope());
             insured.setNResvNum3(insuredPersonInfo.getRegisteredCapital());
             insured.setNResvNum3Cur("01");
+            insured.setCCntrNme(insuredPersonInfo.getLegalPerson());
             insured.setCClntMrk("0");
         } else {
             insured.setCCertfCls("120001");
             insured.setCCertfCde(insuredPersonInfo.getIdentifyNumber());
             insured.setTBirthday(IDCardUtils.GetBirthday(insuredPersonInfo.getIdentifyNumber()));
             insured.setCSex(IDCardUtils.GetYcSex(insuredPersonInfo.getIdentifyNumber()));
+            insured.setCCntrNme(insuredPersonInfo.getName());
             insured.setCClntMrk("1");
         }
 
@@ -292,7 +294,7 @@ public class Insured {
         insured.setCAreaCde("103132");
 
         insured.setTCertfClsValiDate(insuredPersonInfo.getIdentifyValidEndDate());
-        insured.setCCntrNme(insuredPersonInfo.getName());
+//        insured.setCCntrNme(insuredPersonInfo.getName());
         insured.setCRelCdes(ownerInfo.getName().equals(insuredPersonInfo.getName()) ? "601005" : "601008");
 
 

+ 20 - 14
src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java

@@ -293,14 +293,13 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
             }
             //被保人
             CustomerInfoVo insured = yaQuoteInfoVo.getInsuredPersonInfo();
-            if (StringUtils.isNullOrEmpty(insured.getIdentifyNumber())) {
-                throw new SystemException("被保人只能为个人信息");
-            }
-            PersonAreaVo insuredPersonAreaVo = sysAreaService.queryByAddressYc(insured.getAddr(), insured.getIdentifyNumber());
-            if (!Objects.isNull(insuredPersonAreaVo)) {
-                m.getRequestLabel().getCondition().getInsured().setCProvince(insuredPersonAreaVo.getProvinceCode());
-                m.getRequestLabel().getCondition().getInsured().setCCity(insuredPersonAreaVo.getCityCode());
-                m.getRequestLabel().getCondition().getInsured().setCCounty(insuredPersonAreaVo.getCountyCode());
+            if (!"0".equals(insured.getProperty())) {
+                PersonAreaVo insuredPersonAreaVo = sysAreaService.queryByAddressYc(insured.getAddr(), insured.getIdentifyNumber());
+                if (!Objects.isNull(insuredPersonAreaVo)) {
+                    m.getRequestLabel().getCondition().getInsured().setCProvince(insuredPersonAreaVo.getProvinceCode());
+                    m.getRequestLabel().getCondition().getInsured().setCCity(insuredPersonAreaVo.getCityCode());
+                    m.getRequestLabel().getCondition().getInsured().setCCounty(insuredPersonAreaVo.getCountyCode());
+                }
             }
 
         }
@@ -771,14 +770,21 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
         CustomerInfoVo applyInfo = order.getApplyinfo().toJavaObject(CustomerInfoVo.class);
         //组装参数
         Audit m = Audit.buildAuditParam(ownerInfo, insureInfo, applyInfo, ycConfigureParameters, iac);
+        String property = insureInfo.getProperty();
+        if (StringUtils.isNotEmpty(property) && "0".equals(property)) {
+            m.getRequestLabel().getCondition().getCustomer().setCProvince(insureInfo.getProvince());
+            m.getRequestLabel().getCondition().getCustomer().setCCity(insureInfo.getCity());
+            m.getRequestLabel().getCondition().getCustomer().setCCounty(insureInfo.getCounty());
+        }else {
 
-        //投保人地区信息
-        PersonAreaVo personAreaVo = sysAreaService.queryByAddressYc(insureInfo.getAddr(), insureInfo.getIdentifyNumber());
+            //投保人地区信息
+            PersonAreaVo personAreaVo = sysAreaService.queryByAddressYc(insureInfo.getAddr(), insureInfo.getIdentifyNumber());
 
-        //构造被保人地区
-        m.getRequestLabel().getCondition().getCustomer().setCProvince(personAreaVo.getProvinceCode());
-        m.getRequestLabel().getCondition().getCustomer().setCCity(personAreaVo.getCityCode());
-        m.getRequestLabel().getCondition().getCustomer().setCCounty(personAreaVo.getCountyCode());
+            //构造被保人地区
+            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);