Prechádzať zdrojové kódy

Merge branch 'feature_2023-04-13_alltrust' into test

ligang134 3 rokov pred
rodič
commit
4d361c0a22

+ 18 - 2
README.md

@@ -6,11 +6,16 @@
 * PC中煤爬虫方式,报价、核保、影像上传、缴费、电子保单。
 
 ---
+* **《掌柜鼎PC平台》系统维护公告**
+* 
+* 预计更新时间:2023-04-13 9:30 ~ 2023-04-13 10:30
 * 版本号:v0.0.2 
-* 发布时间:待发布
+* 发布时间:2023-04-13
+* 更新内容:
+* 
 * 保险公司增加配置,是否开启报价功能。
 * 系统日志优化
-* 任务池功能上线
+* 影响上传优化
 
 * 订单状态调整如下:
 * 1、报价中 : 所有未提交核保的均为报价中(包括拒保订单 )
@@ -24,6 +29,17 @@
 * 5、核保退回: 人工核保退回状态,直至再次提交核保,状态修改为待核保
 
 
+---
+* 《掌柜鼎PC平台》系统维护公告
+*
+* 预计更新时间: ~ 
+* 版本号:v0.0.3
+* 发布时间:待发布
+* 更新内容:
+* 
+* 任务池功能上线
+* 已知BUG修复
+
 
 
 

+ 1 - 1
pom.xml

@@ -6,7 +6,7 @@
 
     <groupId>com.ydtech</groupId>
     <artifactId>insagent</artifactId>
-    <version>0.0.1</version>
+    <version>0.0.2</version>
     <packaging>jar</packaging>
     <parent>
         <groupId>org.springframework.boot</groupId>

+ 1 - 1
src/main/java/com/ydtech/components/YongchengRequestApiComponents.java

@@ -70,7 +70,7 @@ public class YongchengRequestApiComponents {
             agent.setCustNature(custNature);
             agent.setAgentProfId(agentCode);
             agent.setSubCoNo(agentType);
-            agent.setCustNature("192099");
+            agent.setCustNature(cOprcde);
         }
         return agent;
     }

+ 2 - 2
src/main/java/com/ydtech/modules/ins/model/ya/YaQuoteInfoVo.java

@@ -33,11 +33,11 @@ public class YaQuoteInfoVo implements Serializable {
     //车主  lig 2023-02-15
     @Valid
     private CustomerInfoVo ownerInfo;
-    //被保人信息  lig 2023-02-15
     @Valid
+    //投保人信息  lig 2023-04-13
     private CustomerInfoVo policyHolderInfo;
-    //投保人信息  lig 2023-02-15
     @Valid
+    //被保人信息  lig 2023-04-13
     private CustomerInfoVo insuredPersonInfo;
 
     @Valid

+ 13 - 13
src/main/java/com/ydtech/modules/ins/model/yc/ruote/Applicant.java

@@ -241,30 +241,30 @@ public class Applicant {
 
 
 
-    public static Applicant buildApplicant(YaQuoteInfoVo yaQuoteInfoVo){
+    public static Applicant buildApplicant(CustomerInfoVo ownerInfo,CustomerInfoVo policyHolderInfo){
+//    public static Applicant buildApplicant(YaQuoteInfoVo yaQuoteInfoVo){
 
-        CustomerInfoVo ownerInfo = yaQuoteInfoVo.getOwnerInfo();
-        CustomerInfoVo insuredPersonInfo = yaQuoteInfoVo.getInsuredPersonInfo();
+//        CustomerInfoVo ownerInfo = yaQuoteInfoVo.getOwnerInfo();
 //        CustomerInfoVo policyHolderInfo = yaQuoteInfoVo.getPolicyHolderInfo();
 
         Applicant applicant = new Applicant();
 
-        applicant.setCAppNme(insuredPersonInfo.getName());
-        applicant.setCClntAddr(insuredPersonInfo.getAddr());
-        applicant.setCMobile(insuredPersonInfo.getMobile());
-        applicant.setCCertfCde(insuredPersonInfo.getIdentifyNumber());
+        applicant.setCAppNme(policyHolderInfo.getName());
+        applicant.setCClntAddr(policyHolderInfo.getAddr());
+        applicant.setCMobile(policyHolderInfo.getMobile());
+        applicant.setCCertfCde(policyHolderInfo.getIdentifyNumber());
         applicant.setCCertfCls("120001");
         applicant.setCResvTxt5("007");
         applicant.setCClntMrk("1");
         applicant.setCAreaCde("103132");
-        applicant.setCCntrNme(insuredPersonInfo.getName());
-        applicant.setTBirthday(IDCardUtils.GetBirthday(insuredPersonInfo.getIdentifyNumber()));
-        applicant.setCSex(IDCardUtils.GetYcSex(insuredPersonInfo.getIdentifyNumber()));
+        applicant.setCCntrNme(policyHolderInfo.getName());
+        applicant.setTBirthday(IDCardUtils.GetBirthday(policyHolderInfo.getIdentifyNumber()));
+        applicant.setCSex(IDCardUtils.GetYcSex(policyHolderInfo.getIdentifyNumber()));
 
-        applicant.setCProvince(Province.buildProvince(insuredPersonInfo.getAddr()));
-        applicant.setCCity(City.buildCity(insuredPersonInfo.getAddr()));
+        applicant.setCProvince(Province.buildProvince(policyHolderInfo.getAddr()));
+        applicant.setCCity(City.buildCity(policyHolderInfo.getAddr()));
 
-        applicant.setCRelCde(insuredPersonInfo.getName().equals(ownerInfo.getName())?"601005":"601008");
+        applicant.setCRelCde(ownerInfo.getName().equals(policyHolderInfo.getName())?"601005":"601008");
 
         applicant.setTCertfClsValiDate("9999-12-31");
 

+ 11 - 9
src/main/java/com/ydtech/modules/ins/model/yc/ruote/Insured.java

@@ -267,25 +267,27 @@ public class Insured {
 
 
 
-    public static Insured buildApplicant(CustomerInfoVo ownerInfo){
+    public static Insured buildApplicant(CustomerInfoVo ownerInfo,CustomerInfoVo insuredPersonInfo){
 
         Insured insured = new Insured();
 
-        insured.setCInsuredNme(ownerInfo.getName());
-        insured.setCClntAddr(ownerInfo.getAddr());
-        insured.setCMobile(ownerInfo.getMobile());
-        insured.setCCertfCde(ownerInfo.getIdentifyNumber());
+        insured.setCInsuredNme(insuredPersonInfo.getName());
+        insured.setCClntAddr(insuredPersonInfo.getAddr());
+        insured.setCMobile(insuredPersonInfo.getMobile());
+        insured.setCCertfCde(insuredPersonInfo.getIdentifyNumber());
         insured.setCCertfCls("120001");
         insured.setCClntMrk("1");
         insured.setCAreaCde("103132");
-        insured.setTBirthday(IDCardUtils.GetBirthday(ownerInfo.getIdentifyNumber()));
-        insured.setCSex(IDCardUtils.GetYcSex(ownerInfo.getIdentifyNumber()));
+        insured.setTBirthday(IDCardUtils.GetBirthday(insuredPersonInfo.getIdentifyNumber()));
+        insured.setCSex(IDCardUtils.GetYcSex(insuredPersonInfo.getIdentifyNumber()));
 
-        insured.setCProvince(Province.buildProvince(ownerInfo.getAddr()));
-        insured.setCCity(City.buildCity(ownerInfo.getAddr()));
+        insured.setCProvince(Province.buildProvince(insuredPersonInfo.getAddr()));
+        insured.setCCity(City.buildCity(insuredPersonInfo.getAddr()));
 
         insured.setTCertfClsValiDate("9999-12-31");
 
+        insured.setCRelCdes(ownerInfo.getName().equals(insuredPersonInfo.getName())?"601005":"601008");
+
 
         return insured;
     }

+ 15 - 53
src/main/java/com/ydtech/modules/ins/model/yc/ruote/Ruote.java

@@ -157,11 +157,11 @@ public class Ruote {
         Ruote.Condition condition = new Ruote.Condition();
 
 
-        //2.1投保人信息
-        CustomerInfoVo insuredPersonInfo = yaQuoteInfoVo.getInsuredPersonInfo();
-        //被投保人信息
+        //投保人信息
         CustomerInfoVo policyHolderInfo = yaQuoteInfoVo.getPolicyHolderInfo();
-        //2.2车主
+        //被保人信息
+        CustomerInfoVo insuredPersonInfo = yaQuoteInfoVo.getInsuredPersonInfo();
+        //车主
         CustomerInfoVo ownerInfo = yaQuoteInfoVo.getOwnerInfo();
         /**
          * 基本信息 base
@@ -208,6 +208,7 @@ public class Ruote {
         String jqFlag = base.getCAppJqFlag();
         String syFlag = base.getAppSYFlag();
         String szFlag = "N";
+
         /**
          * 商业险险别
          * 代码:cvrgListSY/CvrgSY
@@ -215,9 +216,6 @@ public class Ruote {
         CvrgListSY cvrgListSY = CvrgListSY.buildCvrgListSY(yaQuoteInfoVo.getKindList(),vhl);
         condition.setCvrgListSY(cvrgListSY);
 
-
-
-
         /**
          * 交强险费率信息
          * 费率调整系数表vehicleAdjust
@@ -225,16 +223,13 @@ public class Ruote {
         VehicleAdjust vehicleAdjust = new VehicleAdjust();
         vehicleAdjust.setSecondaryOrganization("");
 
-
-
+        //投保组合
         String groupStr = YcBuildData.buildInsureGroup(jqFlag.equals("Y")?true:false,syFlag.equals("Y")?true:false);
         vehicleAdjust.setCInsuranceGroup(groupStr);
 //        vehicleAdjust.setCInsuranceGroup("DJ");
         condition.setVehicleAdjust(vehicleAdjust);
 
 
-
-
         //商业险
         if (base.getAppSYFlag().equals("Y")) {
 
@@ -261,58 +256,26 @@ public class Ruote {
          * 交强险车船税
          * 车船税tax
          */
-        Tax tax = new Tax();
-        tax.setTaxCurrentType("349002001");
-        tax.setVehicleCategory("K33");
-        tax.setTaxPayerName(insuredPersonInfo.getName());
-        //补交上年
-        tax.setPayLastYear("0");
-        tax.setIdType("120001");
-        tax.setCalculatedType("349003001");
-        tax.setVehecleTypeDetail("3490010013");
-
-        //纳税人识别号 =  投保人身份证号
-        tax.setTaxpayerNO(insuredPersonInfo.getIdentifyNumber());
-
-        tax.setVehicleType("349001001");
-        tax.setTaxpayerType("338001");
-        tax.setConruty("156");
-        tax.setTel(insuredPersonInfo.getMobile());
-        //@TODO 不确定
-        tax.setExhaust("1.5");
-        condition.setTax(tax);
-
+        condition.setTax(Tax.buildTax(policyHolderInfo));
 
         /**
          * 渠道及费用信息
          * 渠道及费用信息agent
          */
-//        Agent agent = new Agent();
-//        agent.setAgentCode("250000P00004");
-//        agent.setConferCode("250000P0000401");
-//        agent.setAgentType("191010");
-//        agent.setAgentNme("永鑫保险销售服务有限公司山西分公司");
-//        agent.setQlftNo("2752454675645");
-//        agent.setCustNature("192099");
-//        agent.setAgentProfId("250000P00004");
-//        agent.setSubCoNo("250000P0000401");
         condition.setAgent(agent);
 
-
         /**
          * 投保人信息
          * 代码:applicant
          */
-        Applicant applicant = Applicant.buildApplicant(yaQuoteInfoVo);
-//        Applicant applicant = Applicant.buildApplicant(policyHolderInfo);
+        Applicant applicant = Applicant.buildApplicant(ownerInfo,policyHolderInfo);
         condition.setApplicant(applicant);
 
-
         /**
          * 被保人信息
          * 代码:insured
          */
-        Insured insured = Insured.buildApplicant(ownerInfo);
+        Insured insured = Insured.buildApplicant(ownerInfo,insuredPersonInfo);
         condition.setInsured(insured);
 
 //        /**
@@ -325,13 +288,12 @@ public class Ruote {
 //        cvrgYW.setNInsuranceQuantity("1");
 //        condition.setCvrgYW(cvrgYW);
 
-        /**
-         * 意健险被保人信息
-         * 代码:VHlADDINSURED
-         */
-        VhlAddInsured vhlAddInsured = VhlAddInsured.buildVhladdinsured(ownerInfo);
-        condition.setVhlAddInsured(vhlAddInsured);
-
+//        /**
+//         * 意健险被保人信息
+//         * 代码:VHlADDINSURED
+//         */
+//        VhlAddInsured vhlAddInsured = VhlAddInsured.buildVhladdinsured(ownerInfo);
+//        condition.setVhlAddInsured(vhlAddInsured);
 
 
         requestLabel.setAuthorityData(authorityDataXml);

+ 33 - 0
src/main/java/com/ydtech/modules/ins/model/yc/ruote/Tax.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.ins.model.yc.ruote;
 
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.ydtech.modules.ins.vo.CustomerInfoVo;
 import lombok.Data;
 
 
@@ -119,4 +120,36 @@ public class Tax {
     private String Exhaust;
 
 
+    /**
+     *  构造tax
+     *
+     * @param policyHolderInfo 投保人
+     *
+     * @author: lig
+     * @date: 2023年04月13日 0013
+     */
+    public static Tax buildTax(CustomerInfoVo policyHolderInfo){
+        Tax tax = new Tax();
+        tax.setTaxCurrentType("349002001");
+        tax.setVehicleCategory("K33");
+        tax.setTaxPayerName(policyHolderInfo.getName());
+        //补交上年
+        tax.setPayLastYear("0");
+        tax.setIdType("120001");
+        tax.setCalculatedType("349003001");
+        tax.setVehecleTypeDetail("3490010013");
+
+        //纳税人识别号 =  投保人身份证号
+        tax.setTaxpayerNO(policyHolderInfo.getIdentifyNumber());
+
+        tax.setVehicleType("349001001");
+        tax.setTaxpayerType("338001");
+        tax.setConruty("156");
+        tax.setTel(policyHolderInfo.getMobile());
+        //@TODO 不确定
+        tax.setExhaust("1.5");
+        return tax;
+    }
+
+
 }

+ 15 - 7
src/main/java/com/ydtech/modules/ins/model/yc/ruote/Vhl.java

@@ -153,11 +153,11 @@ public class Vhl {
      */
     @JacksonXmlProperty(localName = "CChgOwnerFlag")
     private String CChgOwnerFlag;
-//    /**
-//     * 转移登记日期   过户车必输 YYYY-MM-DD
-//     */
-//    @JacksonXmlProperty(localName = "TTransferDate")
-//    private String TTransferDate;
+    /**
+     * 转移登记日期   过户车必输 YYYY-MM-DD
+     */
+    @JacksonXmlProperty(localName = "TTransferDate")
+    private String TTransferDate;
 //    /**
 //     * 续保单号(往年(续/转)保单号)  如果续保则和续保单号相同
 //     */
@@ -357,8 +357,16 @@ public class Vhl {
         //玻璃类型 303011001	国产   303011002	进口
         vhl.setCGlassTyp("303011001");
         vhl.setCEcdemicMrk("0");
-        //必传。过户车传1;非过户车传0
-        vhl.setCChgOwnerFlag("0");
+
+        //过户
+        if(carInfo.isTransferFlag() == true){
+            //必传。过户车传1;非过户车传0
+            vhl.setCChgOwnerFlag("1");
+            vhl.setTTransferDate(carInfo.getTransferDate());
+        }else{
+            vhl.setCChgOwnerFlag("0");
+
+        }
         //0:新保 1:续保 2:转保
         vhl.setCBusType("0");
         vhl.setCMortgageMrk("0");

+ 1 - 1
src/main/java/com/ydtech/modules/ins/service/impl/InsYongchengApiServiceImpl.java

@@ -288,10 +288,10 @@ public class InsYongchengApiServiceImpl implements InsYongchengApiService {
         try {
             //子订单
             InsAreaCompany iac = insAreaCompanyService.getById(quoteOrderNo);
-            InsOrders order = insOrdersService.getById(iac.getOrderno());
             if (iac == null) {
                 return HttpResult.error("订单不存在");
             }
+            InsOrders order = insOrdersService.getById(iac.getOrderno());
 
 //            if (InsOrderStatus.S_5.getCode().equals(iac.getOrderstatus()) || InsOrderStatus.S_4.getCode().equals(iac.getOrderstatus())) {
 //                return HttpResult.ok(InsOrderStatus.matchKey(iac.getOrderstatus()).getDesc());