Kaynağa Gözat

添加泰康 完善核保

wlq 1 yıl önce
ebeveyn
işleme
d196da6e5e

+ 2 - 52
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/service/TKQuotationBaseServiceImpl.java

@@ -72,7 +72,7 @@ public class TKQuotationBaseServiceImpl implements QuotationBaseService {
         AreaUserResult province = areaUserResults.get(0);
 
         // # 查询车型
-        TKAreaInfoVo tkAreaInfoVo = tkSimpleService.createArea(loginInfo, mainOrderId, agentFuzzyResult, agentCode, agentQueryResult, province, commonCarInfoVo);
+        TKAreaInfoVo tkAreaInfoVo = tkSimpleService.dataCreateArea(loginInfo, mainOrderId, agentFuzzyResult, agentCode, agentQueryResult, province, commonCarInfoVo);
         TKCarModel tkCarModel = tkSimpleService.queryCarModel(loginInfo, mainOrderId, commonCarInfoVo, tkAreaInfoVo);
 
         // todo 暂时不知道是否需要执行 /car/modelinfo/checkVehicleType 接口
@@ -167,57 +167,7 @@ public class TKQuotationBaseServiceImpl implements QuotationBaseService {
 
         InitProposalResult initProposalResult = tkSimpleService.queryCarOwner(loginInfo, preciseInitResult.getMainOrderId());
 
-        // 车主信息
-        TKCarOwnerVo carOwnerVo = new TKCarOwnerVo();
-        carOwnerVo.setInsuredAddress(initProposalResult.getCarOwnerVo().getInsuredAddress());
-        carOwnerVo.setPhoneNo("手机号");
-        carOwnerVo.setInsuredCityCode(initProposalResult.getCityCode());
-        carOwnerVo.setInsuredCityCname(initProposalResult.getCityName());
-        carOwnerVo.setInsuredProvinceCode(initProposalResult.getProvinceCode());
-        carOwnerVo.setInsuredProvinceCname(initProposalResult.getProvinceName());
-
-
-        // 投保人信息
-        TKAppliInfo appliInfo = new TKAppliInfo();
-        appliInfo.setAppliName(carOwnerVo.getName());
-        appliInfo.setBirthday(carOwnerVo.getBirthDate());
-        appliInfo.setIdentifyNumber(carOwnerVo.getId());
-        appliInfo.setIdentifyType(carOwnerVo.getCertificateType());
-        appliInfo.setInsuredAddress("地址");
-        appliInfo.setInsuredNature("1"); // todo
-        appliInfo.setInvoiceFlag("1"); // todo
-        appliInfo.setInvoiceType("002"); // todo
-        appliInfo.setIsSelf("1");
-        appliInfo.setPhoneNumber(carOwnerVo.getPhoneNo());
-        appliInfo.setSerialno(2);
-        appliInfo.setSex(carOwnerVo.getSex());
-        appliInfo.setTaxNumber(carOwnerVo.getId());
-        appliInfo.setTaxPayer(carOwnerVo.getName());
-        appliInfo.setTaxpayerType("0");
-        appliInfo.setWithOwner(1);
-
-        // 被保险人信息
-        TKInsuredInfo insuredInfo = new TKInsuredInfo();
-        insuredInfo.setBirthday(carOwnerVo.getBirthDate());
-        insuredInfo.setIdentifyNumber(carOwnerVo.getId());
-        insuredInfo.setIdentifyType(carOwnerVo.getCertificateType());
-        insuredInfo.setInsuredNature("1");
-        insuredInfo.setInsuredAddress("地址");
-        insuredInfo.setInsuredName(carOwnerVo.getName());
-        insuredInfo.setIsSelf("1");
-        insuredInfo.setPhoneNumber(carOwnerVo.getPhoneNo());
-        insuredInfo.setSerialno(1);
-        insuredInfo.setSex(carOwnerVo.getSex());
-        insuredInfo.setWithOwner(1);
-        insuredInfo.setWithApplyer(1);
-
-        TKInsureInfo insureInfo = new TKInsureInfo();
-        insureInfo.setPolicyType("1"); // 电子保单
-        insureInfo.setMessageSendFlag("0"); // 不发送短信
-        insureInfo.setContacts(new TKContacts());
-        insureInfo.setCarOwnerVo(carOwnerVo);
-        insureInfo.setAppliInfo(appliInfo);
-        insureInfo.setInsuredInfo(insuredInfo);
+        TKInsureInfo insureInfo = tkSimpleService.dataCreateInsureInfo(initProposalResult, "手机号", "地址");
 
         // # 车险投保单报价
         preciseInitResult = tkSimpleService.orderSubmit(loginInfo, preciseInitResult.getMainOrderId(), insureInfo);

+ 60 - 4
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/service/TKSimpleService.java

@@ -317,10 +317,10 @@ public class TKSimpleService {
         return TKCarModel;
     }
 
-    public TKAreaInfoVo createArea(LoginResult result, String mainOrderId,
-                                   TKAgentFuzzy agentFuzzy,
-                                   String agentCode, TKAgentQueryResult agentQueryResult,
-                                   AreaUserResult province, CarInfoVo commonCarInfoVo) {
+    public TKAreaInfoVo dataCreateArea(LoginResult result, String mainOrderId,
+                                       TKAgentFuzzy agentFuzzy,
+                                       String agentCode, TKAgentQueryResult agentQueryResult,
+                                       AreaUserResult province, CarInfoVo commonCarInfoVo) {
         String tplatformId = result.getTplatformId();
         String fromId = result.getWebsysUserVo().getFromid();
 
@@ -362,6 +362,62 @@ public class TKSimpleService {
         return tkAreaInfoVo;
     }
 
+    public TKInsureInfo dataCreateInsureInfo(InitProposalResult initProposalResult, String phone, String address) {
+        // 车主信息
+        TKCarOwnerVo carOwnerVo = new TKCarOwnerVo();
+        carOwnerVo.setInsuredAddress(initProposalResult.getCarOwnerVo().getInsuredAddress());
+        carOwnerVo.setPhoneNo(phone);
+        carOwnerVo.setInsuredCityCode(initProposalResult.getCityCode());
+        carOwnerVo.setInsuredCityCname(initProposalResult.getCityName());
+        carOwnerVo.setInsuredProvinceCode(initProposalResult.getProvinceCode());
+        carOwnerVo.setInsuredProvinceCname(initProposalResult.getProvinceName());
+        carOwnerVo.setInsuredAddress(address);
+
+        // 投保人信息
+        TKAppliInfo appliInfo = new TKAppliInfo();
+        appliInfo.setAppliName(carOwnerVo.getName());
+        appliInfo.setBirthday(carOwnerVo.getBirthDate());
+        appliInfo.setIdentifyNumber(carOwnerVo.getId());
+        appliInfo.setIdentifyType(carOwnerVo.getCertificateType());
+        appliInfo.setInsuredAddress(carOwnerVo.getInsuredAddress());
+        appliInfo.setInsuredNature("1"); // todo
+        appliInfo.setInvoiceFlag("1"); // todo
+        appliInfo.setInvoiceType("002"); // todo
+        appliInfo.setIsSelf("1");
+        appliInfo.setPhoneNumber(carOwnerVo.getPhoneNo());
+        appliInfo.setSerialno(2);
+        appliInfo.setSex(carOwnerVo.getSex());
+        appliInfo.setTaxNumber(carOwnerVo.getId());
+        appliInfo.setTaxPayer(carOwnerVo.getName());
+        appliInfo.setTaxpayerType("0");
+        appliInfo.setWithOwner(1);
+
+        // 被保险人信息
+        TKInsuredInfo insuredInfo = new TKInsuredInfo();
+        insuredInfo.setBirthday(carOwnerVo.getBirthDate());
+        insuredInfo.setIdentifyNumber(carOwnerVo.getId());
+        insuredInfo.setIdentifyType(carOwnerVo.getCertificateType());
+        insuredInfo.setInsuredNature("1");
+        insuredInfo.setInsuredAddress(carOwnerVo.getInsuredAddress());
+        insuredInfo.setInsuredName(carOwnerVo.getName());
+        insuredInfo.setIsSelf("1");
+        insuredInfo.setPhoneNumber(carOwnerVo.getPhoneNo());
+        insuredInfo.setSerialno(1);
+        insuredInfo.setSex(carOwnerVo.getSex());
+        insuredInfo.setWithOwner(1);
+        insuredInfo.setWithApplyer(1);
+
+        TKInsureInfo insureInfo = new TKInsureInfo();
+        insureInfo.setPolicyType("1"); // 电子保单
+        insureInfo.setMessageSendFlag("0"); // 不发送短信
+        insureInfo.setContacts(new TKContacts());
+        insureInfo.setCarOwnerVo(carOwnerVo);
+        insureInfo.setAppliInfo(appliInfo);
+        insureInfo.setInsuredInfo(insuredInfo);
+    }
+
+
+
     /**
      * <pre>
      * var _carOwnerNature = $("#ownerNature input:radio[name=nature]:checked").val();//车主性质