dongxin 1 жил өмнө
parent
commit
4ce9499c65
15 өөрчлөгдсөн 1892 нэмэгдсэн , 175 устгасан
  1. 9 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/build/ChengTaiAPIQuoteResultsVoBuild.java
  2. 16 16
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/InsurePremiumRequest.java
  3. 1 1
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/service/QuotationBaseService.java
  4. 16 3
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/build/DaJiaAPIQuoteResultsVoBuild.java
  5. 27 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/compoment/DaJiaApiRequestComponent.java
  6. 9 4
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/po/DaJiaApiOrder.java
  7. 1217 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/request/NVHLODR1001Request.java
  8. 37 38
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/request/ODR1009Request.java
  9. 101 88
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/request/ODR1010Request.java
  10. 66 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/request/ODR1011Request.java
  11. 134 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/response/NVHLODR1001Response.java
  12. 50 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/response/ODR1011Response.java
  13. 5 3
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/service/DaJiaApiOrderService.java
  14. 11 7
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/service/impl/DaJiaApiOrderServiceImpl.java
  15. 193 15
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/service/impl/DaJiaApiRequestImpl.java

+ 9 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/build/ChengTaiAPIQuoteResultsVoBuild.java

@@ -1,5 +1,7 @@
 package com.jzg.quotation.chengtai.api.build;
 
+import com.jzg.commons.constants.dict.InsOrderStatusEnum;
+import com.jzg.quotation.chengtai.api.entity.constants.ResponseCode;
 import com.jzg.quotation.chengtai.api.entity.response.InsurePremiumResponse;
 import com.jzg.quotation.commons.constant.enums.quote.KindCode;
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteResultsVo;
@@ -24,6 +26,8 @@ public final class ChengTaiAPIQuoteResultsVoBuild {
     }
 
     public static QuoteResultsVo buildQuoteResultsVo(QuoteVo quoteVo, InsurePremiumResponse insurePremiumResponse) {
+
+
         QuoteResultsVo quoteResultsVo = new QuoteResultsVo();
         quoteResultsVo.setOrdersNo(insurePremiumResponse.getOrderId());
         // 交强险
@@ -33,10 +37,15 @@ public final class ChengTaiAPIQuoteResultsVoBuild {
         // 商业险险种信息
         List<KindInfoVo> kindInfoVo = buildKindInfoVo(quoteVo.getKindInfoVo(), insurePremiumResponse.getBiContract().getCoverage());
         quoteResultsVo.setKindInfoVo(kindInfoVo);
+        quoteResultsVo.setQuoteStatus(InsOrderStatusEnum.WAIT_AUDIT);
         // 费用因子
 //        List<ExpenseFactor> expenseFactors = buildExpenseFactor(calculatePremiumResponse.getPriceInfoList());
 //        quoteResultsVo.setExpenseFactors(expenseFactors);
         // 交强保费 车船税 商业保费
+        if(!ResponseCode.R_000.getCode().equals(insurePremiumResponse.getCode())){
+            quoteResultsVo.setQuoteStatus(InsOrderStatusEnum.QUOTE_FAIL);
+            quoteResultsVo.setErrorMessage(insurePremiumResponse.getMessage());
+        }
         buildPremium(quoteResultsVo, insurePremiumResponse);
         return quoteResultsVo;
     }

+ 16 - 16
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/entity/request/InsurePremiumRequest.java

@@ -135,7 +135,7 @@ public class InsurePremiumRequest extends BaseRequest {
             ContractMainDTO contractMain = new ContractMainDTO(quoteVo);
             this.contractMain = contractMain;
             // 投保险别列表
-//            this.coverage = CoverageDTO.toCoverageList(accidentalDrivingVos);
+            this.coverage = CoverageDTO.toCoverageList(accidentalDrivingVos);
         }
         @NoArgsConstructor
         @Data
@@ -217,12 +217,12 @@ public class InsurePremiumRequest extends BaseRequest {
              */
             @JsonProperty("quantity")
             private Integer quantity;
-//            @JsonProperty("calculateFlag")
-//            private String calculateFlag;
-//            @JsonProperty("shortRateType")
-//            private String shortRateType;
-//            @JsonProperty("shortRate")
-//            private String shortRate;
+            @JsonProperty("calculateFlag")
+            private String calculateFlag;
+            @JsonProperty("shortRateType")
+            private String shortRateType;
+            @JsonProperty("shortRate")
+            private String shortRate;
 
             public static List<CoverageDTO> toCoverageList(List<AccidentalDrivingVo> ctQuoteAccidentVo) {
                 List<CoverageDTO> coverageDTOS = new ArrayList<>();
@@ -230,25 +230,25 @@ public class InsurePremiumRequest extends BaseRequest {
                 coverageDTO1.setKindCode("ct_111601");
                 coverageDTO1.setIfMainKind("2");
                 coverageDTO1.setQuantity(0);
-//                coverageDTO1.setCalculateFlag("1");
-//                coverageDTO1.setShortRateType("2");
-//                coverageDTO1.setShortRate("100");
+                coverageDTO1.setCalculateFlag("1");
+                coverageDTO1.setShortRateType("2");
+                coverageDTO1.setShortRate("100");
                 coverageDTOS.add(coverageDTO1);
                 CoverageDTO coverageDTO2 = new CoverageDTO();
                 coverageDTO2.setKindCode("ct_111602");
                 coverageDTO2.setIfMainKind("2");
                 coverageDTO2.setQuantity(0);
-//                coverageDTO2.setCalculateFlag("1");
-//                coverageDTO2.setShortRateType("2");
-//                coverageDTO2.setShortRate("100");
+                coverageDTO2.setCalculateFlag("1");
+                coverageDTO2.setShortRateType("2");
+                coverageDTO2.setShortRate("100");
                 coverageDTOS.add(coverageDTO2);
                 CoverageDTO coverageDTO3 = new CoverageDTO();
                 coverageDTO3.setKindCode("ct_111603");
                 coverageDTO3.setIfMainKind("2");
                 coverageDTO3.setQuantity(0);
-//                coverageDTO3.setCalculateFlag("1");
-//                coverageDTO3.setShortRateType("2");
-//                coverageDTO3.setShortRate("100");
+                coverageDTO3.setCalculateFlag("1");
+                coverageDTO3.setShortRateType("2");
+                coverageDTO3.setShortRate("100");
                 coverageDTOS.add(coverageDTO3);
                 return coverageDTOS;
             }

+ 1 - 1
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/service/QuotationBaseService.java

@@ -22,7 +22,7 @@ public interface QuotationBaseService {
     /**
      * 提交核保 子订单
      */
-    UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) throws JsonProcessingException;
+    UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) throws Exception;
 
     /**
      * 获取支付链接

+ 16 - 3
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/build/DaJiaAPIQuoteResultsVoBuild.java

@@ -1,14 +1,18 @@
 package com.jzg.quotation.dajia.api.build;
 
+import com.jzg.commons.constants.dict.InsOrderStatusEnum;
 import com.jzg.quotation.commons.constant.enums.quote.KindCode;
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteResultsVo;
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
 import com.jzg.commons.entity.quote.vo.KindInfoVo;
 import com.jzg.commons.entity.quote.vo.RiskInfoVo;
+import com.jzg.quotation.dajia.api.constant.enums.Message;
+import com.jzg.quotation.dajia.api.entity.response.NVHLODR1001Response;
 import com.jzg.quotation.dajia.api.entity.response.ODR1009Response;
 
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.stream.Collectors;
 
 public final class DaJiaAPIQuoteResultsVoBuild {
@@ -17,7 +21,7 @@ public final class DaJiaAPIQuoteResultsVoBuild {
         throw new IllegalStateException("Utility class");
     }
 
-    public static QuoteResultsVo buildQuoteResultsVo(QuoteVo quoteVo, ODR1009Response odr1009Response) {
+    public static QuoteResultsVo buildQuoteResultsVo(QuoteVo quoteVo, ODR1009Response odr1009Response, NVHLODR1001Response nvhlodr1001Response) {
         QuoteResultsVo quoteResultsVo = new QuoteResultsVo();
         quoteResultsVo.setOrdersNo(quoteVo.getOrder().getOrdersNo());
         // 交强险
@@ -27,19 +31,28 @@ public final class DaJiaAPIQuoteResultsVoBuild {
         // 商业险险种信息
         List<KindInfoVo> kindInfoVo = buildKindInfoVo(quoteVo.getKindInfoVo(), odr1009Response.getResult().getCoverageList());
         quoteResultsVo.setKindInfoVo(kindInfoVo);
+        quoteResultsVo.setQuoteStatus(InsOrderStatusEnum.PAY_PENDING);
+        if(!Message.M0000.getCode().equals(odr1009Response.getStatus())) {
+            quoteResultsVo.setQuoteStatus(InsOrderStatusEnum.QUOTE_FAIL);
+            quoteResultsVo.setErrorMessage(odr1009Response.getMessage());
+        }
         // 费用因子
 //        List<ExpenseFactor> expenseFactors = buildExpenseFactor(calculatePremiumResponse.getPriceInfoList());
 //        quoteResultsVo.setExpenseFactors(expenseFactors);
         // 交强保费 车船税 商业保费
-        buildPremium(quoteResultsVo, odr1009Response);
+        buildPremium(quoteResultsVo, odr1009Response,nvhlodr1001Response);
         return quoteResultsVo;
     }
 
-    private static void buildPremium(QuoteResultsVo quoteResultsVo, ODR1009Response odr1009Response) {
+    private static void buildPremium(QuoteResultsVo quoteResultsVo, ODR1009Response odr1009Response, NVHLODR1001Response nvhlodr1001Response) {
 
         quoteResultsVo.setCiPremium(odr1009Response.getResult().getBasePart().getJqPremium() + "");
         quoteResultsVo.setVvTax(odr1009Response.getResult().getBasePart().getJqPremiumVat() + "");
         quoteResultsVo.setBiPremium(odr1009Response.getResult().getBasePart().getSyPremium() + "");
+        if (!Objects.isNull(nvhlodr1001Response)) {
+            quoteResultsVo.setNiPremium(nvhlodr1001Response.getOrderPrm());
+        }
+
     }
 
     private static List<KindInfoVo> buildKindInfoVo(List<KindInfoVo> kindInfoVo, List<ODR1009Response.ResultDTO.CoverageListDTO> itemKindList) {

+ 27 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/compoment/DaJiaApiRequestComponent.java

@@ -123,4 +123,31 @@ public class DaJiaApiRequestComponent {
     public ODR1013Response uploadImage(ODR1013Request odr1013Request) {
         return requestRequestUrl(RequestUrl.DJ_TQBD_100013, odr1013Request, ODR1013Response.class);
     }
+
+    /**
+     * 非车险核保接口
+     * @param nvhlodr1001Request
+     * @return
+     */
+    public NVHLODR1001Response accidentPremiumCalculation(NVHLODR1001Request nvhlodr1001Request) {
+        return requestRequestUrl(RequestUrl.DJ_TQBD_100100, nvhlodr1001Request, NVHLODR1001Response.class);
+    }
+
+    /**
+     * 核保
+     * @param odr1010Request
+     * @return
+     */
+    public ODR1010Response underwriting(ODR1010Request odr1010Request) {
+        return requestRequestUrl(RequestUrl.DJ_TQBD_100010, odr1010Request, ODR1010Response.class);
+    }
+
+    /**
+     * 支付链接
+     * @param odr1011Request
+     * @return
+     */
+    public ODR1011Response getPayNo(ODR1011Request odr1011Request) {
+        return requestRequestUrl(RequestUrl.DJ_TQBD_100011, odr1011Request, ODR1011Response.class);
+    }
 }

+ 9 - 4
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/po/DaJiaApiOrder.java

@@ -1,5 +1,9 @@
 package com.jzg.quotation.dajia.api.entity.po;
 
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -25,11 +29,12 @@ public class DaJiaApiOrder {
      */
     private String orderNo;
     /**
-     * 产品代码
+     * 报价返回信息
      */
-    private String productsCode;
+    private String reptxt;
+
     /**
-     * 被保人省份证
+     * 交叉销售保单信息
      */
-    private String insuredIdentify;
+    private String crossInsurance;
 }

+ 1217 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/request/NVHLODR1001Request.java

@@ -0,0 +1,1217 @@
+package com.jzg.quotation.dajia.api.entity.request;
+
+import cn.hutool.core.util.IdcardUtil;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.entity.quote.vo.AccidentalDrivingVo;
+import com.jzg.commons.entity.quote.vo.CarInfoVo;
+import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
+import com.jzg.commons.entity.quote.vo.RiskInfoVo;
+import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
+import com.jzg.quotation.dajia.api.constant.ServiceCode;
+import com.jzg.quotation.dajia.api.entity.DaJiaApiConfigureParameters;
+import com.jzg.quotation.dajia.api.entity.DaJiaBaseRequest;
+import com.jzg.quotation.dajia.api.entity.response.ODR1009Response;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+
+/**
+ * 非车险核保接口
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+
+public class NVHLODR1001Request extends DaJiaBaseRequest {
+    private static final long serialVersionUID = -2891022722388399132L;
+
+    public NVHLODR1001Request(DaJiaApiConfigureParameters parameters,
+                              ODR1009Response odr1009Response,
+                              String orderNo,
+                              List<AccidentalDrivingVo> accidentalDrivings,
+                              QuoteVo quoteVo) {
+        super(parameters.getChannelCode(), ServiceCode.NVHLODR1001V01.getCode());
+        if(Objects.isNull(body)){
+            body = new BodyDTO();
+        }
+        //第三方订单号
+        body.setBookingNo(orderNo);
+        //交强险投保单号
+        body.setOcPlyNo(odr1009Response.getResult().getBasePart().getJqProposalNo());
+        //商业险投保单号
+        body.setOpenCoverNo(odr1009Response.getResult().getBasePart().getSyProposalNo());
+        body.setSignflag("1");//默认核保签单
+        body.setPolicyInfos(new ArrayList<>());
+        policyInfosDTO policyInfos = new policyInfosDTO();
+        policyInfos.setApplySeqNo("1");
+        //设置基本信息
+        policyInfos.base = setBase(accidentalDrivings,quoteVo);
+        //设置投保人信息
+        policyInfos.applicant = setApplicant(quoteVo);
+        //设置被保人信息
+        policyInfos.insured = setInsured(quoteVo);
+        //设置业务数据
+        policyInfos.businessInfo = setBusinessInfo(parameters);
+
+        policyInfos.prodBaseInfo = setProdBaseInfo(accidentalDrivings);
+
+        policyInfos._0684_tgt = setTag0684(quoteVo.getCarInfoVo());
+
+        policyInfos._0684_tgtList_1 = setTag0684List(quoteVo.getCarInfoVo());
+
+//        policyInfos.prodCvrgList = setProdCvrgList(insAccidentalDrivingDajia);
+        body.policyInfos.add(policyInfos);
+
+    }
+
+    //设置投保信息
+    public baseDTO setBase(List<AccidentalDrivingVo> accidentalDrivings, QuoteVo quoteVo){
+
+        baseDTO base = new baseDTO();
+        //商品编码
+        base.setGoodsCode(accidentalDrivings.get(0).getProductCode());
+        //方案编码
+        base.setSchemeCode(accidentalDrivings.get(0).getRiskCode());
+        //投保分数
+        base.setCopies(String.valueOf(accidentalDrivings.get(0).getQuantity()));
+        //单份方案保费
+        base.setPerPrm(Double.parseDouble(accidentalDrivings.get(0).getSumPremium())
+                /accidentalDrivings.get(0).getQuantity() + "");
+        //总保费
+        base.setSumPrm(accidentalDrivings.get(0).getSumPremium());
+
+        RiskInfoVo ciRiskInfoVo = quoteVo.getCiRiskInfoVo();
+        RiskInfoVo biRiskInfoVo = quoteVo.getBiRiskInfoVo();
+        if(Objects.nonNull(ciRiskInfoVo)){
+            //投保日期
+            base.setAppTm(ciRiskInfoVo.getStartDate());
+            //保险起期
+            base.setEffectiveDate(ciRiskInfoVo.getStartDate());
+            //保险止期
+            base.setExpireDate(ciRiskInfoVo.getEndDate());
+        } else if(Objects.nonNull(biRiskInfoVo)){
+            //投保日期
+            base.setAppTm(biRiskInfoVo.getStartDate());
+            //保险起期
+            base.setEffectiveDate(biRiskInfoVo.getStartDate());
+            //保险止期
+            base.setExpireDate(biRiskInfoVo.getEndDate());
+        }
+
+        //是否及时起保
+        base.setIsImmeffMrk("1");
+        //是否团单
+        base.setIsGrpMrk("0");
+        //被保险人数
+        base.setInsuredNum("1");
+        return base;
+    }
+
+    //设置投保人信息
+    public applicantDTO setApplicant(QuoteVo quoteVo){
+        CustomerInfoVo policyHolderInfo = quoteVo.getPolicyHolderInfo();
+        applicantDTO applicantDTO = new applicantDTO();
+        //投保人名称
+        applicantDTO.setAppName(policyHolderInfo.getName());
+
+        if(policyHolderInfo.getPersonType().equals("1")){
+            //证件号码
+            applicantDTO.setAppCertfCde(policyHolderInfo.getIdentifyNumber());
+            //年龄
+            applicantDTO.setAppAge(policyHolderInfo.getAge() + "");
+            //性别
+            applicantDTO.setAppSex(policyHolderInfo.getGender());
+            //出生日期
+            applicantDTO.setAppBirthday(IdcardUtil.getBirthByIdCard(policyHolderInfo.getIdentifyNumber()));
+            //客户分类/投保人性质  1 个人
+            applicantDTO.setAppClntMrk("1");
+        }else{
+            //证件号码
+            applicantDTO.setAppCertfCde(policyHolderInfo.getOrganizationCode());
+            //客户分类/投保人性质  1 个人
+            applicantDTO.setAppClntMrk("3");
+        }
+        //证件类型
+        applicantDTO.setAppCertfCls(policyHolderInfo.getDocumentsTypeCode());
+        //省份
+        applicantDTO.setAppProvince(policyHolderInfo.getProvinceCode());
+        //市
+        applicantDTO.setAppCity(policyHolderInfo.getCityCode());
+        //县
+        applicantDTO.setAppCounty(policyHolderInfo.getCountyCode());
+        //街道
+        applicantDTO.setAppStreet(policyHolderInfo.getAddr());
+        //地址
+        applicantDTO.setAppClntAddr(policyHolderInfo.getAddr());
+        //手机
+        applicantDTO.setAppMobile(policyHolderInfo.getMobile());
+
+        //证件是否长期有效
+        applicantDTO.setAppExpiredFlag("0");
+        //证件有效起期
+        applicantDTO.setAppEffectiveDate(policyHolderInfo.getIdentifyValidDate());
+        //证件有效止期
+        applicantDTO.setAppExpiredDate(policyHolderInfo.getIdentifyValidEndDate());
+        //电子邮箱
+        applicantDTO.setAppEmail(policyHolderInfo.getEmail());
+        return applicantDTO;
+    }
+
+    //设置被保人信息
+    public insuredDTO setInsured(QuoteVo quoteVo){
+        CustomerInfoVo insuredPersonInfo = quoteVo.getInsuredPersonInfo();
+        insuredDTO insuredDTO = new insuredDTO();
+        //被保人名称
+        insuredDTO.setInsName(insuredPersonInfo.getName());
+        if(insuredPersonInfo.getPersonType().equals("1")){
+            //证件号码
+            insuredDTO.setInsCertfCde(insuredPersonInfo.getIdentifyNumber());
+            //出生日期
+            insuredDTO.setInsBirthday(IdcardUtil.getBirthByIdCard(insuredPersonInfo.getIdentifyNumber()));
+            //性别
+            insuredDTO.setInsSex(insuredPersonInfo.getGender());
+            //年龄
+            insuredDTO.setInsAge(insuredPersonInfo.getAge() + "");
+            //客户分类/投保人性质  1 个人
+            insuredDTO.setInsClntMrk("1");
+        }else{
+            //证件号码
+            insuredDTO.setInsCertfCde(insuredPersonInfo.getOrganizationCode());
+            //客户分类/投保人性质  1 个人
+            insuredDTO.setInsClntMrk("3");
+        }
+        //证件类型
+        insuredDTO.setInsCertfCls(insuredPersonInfo.getDocumentsTypeCode());
+        //省份
+        insuredDTO.setInsProvince(insuredPersonInfo.getProvinceCode());
+        //市
+        insuredDTO.setInsCity(insuredPersonInfo.getCityCode());
+        //县
+        insuredDTO.setInsCounty(insuredPersonInfo.getCountyCode());
+        //街道
+        insuredDTO.setInsStreet(insuredPersonInfo.getAddr());
+        //地址
+        insuredDTO.setInsClntAddr(insuredPersonInfo.getAddr());
+        //手机
+        insuredDTO.setInsMobile(insuredPersonInfo.getMobile());
+
+        //证件是否长期有效
+        insuredDTO.setInsExpiredFlag("0");
+        //证件有效起期
+        insuredDTO.setInsEffectiveDate(insuredPersonInfo.getIdentifyValidDate());
+
+        insuredDTO.setInsExpiredDate(insuredPersonInfo.getIdentifyValidEndDate());
+        return insuredDTO;
+    }
+
+    //设置业务数据
+    public businessDTO setBusinessInfo(DaJiaApiConfigureParameters daJiaConfigureParameters)
+    {
+        businessDTO businessDTO = new businessDTO();
+        //登录机构
+        businessDTO.setOpDpt(daJiaConfigureParameters.getLoginInstitution());
+        //操作员代码
+        businessDTO.setOprCde(daJiaConfigureParameters.getOperatorCode());
+        //出单口
+        businessDTO.setDptCde(daJiaConfigureParameters.getIssuingInstitution());
+        //代理人编码
+        businessDTO.setBrkrCde(daJiaConfigureParameters.getAgentCode());
+        //业务员代码
+        businessDTO.setSlsCde(daJiaConfigureParameters.getSalespersonCode());
+        //推荐人代码
+        businessDTO.setRecommendCde(daJiaConfigureParameters.getOperatorCode());
+        //渠道
+        businessDTO.setChannelSrc("A01");
+        //推荐子渠道
+        businessDTO.setRecSubChannel(daJiaConfigureParameters.getRecommendedSubChannels());
+        //一级来源
+        businessDTO.setDataSrc("G");
+        //二级来源
+        businessDTO.setDataFlag("TQBD");
+        //业务来源
+        businessDTO.setBsnsTyp("19002");
+        return businessDTO;
+    }
+
+
+    public List<prodBaseInfoDTO> setProdBaseInfo(List<AccidentalDrivingVo> accidentalDrivings){
+        List<prodBaseInfoDTO> prodBaseInfoDTOList = new ArrayList<>();
+        prodBaseInfoDTO prodBaseInfoDTO = new prodBaseInfoDTO();
+        prodBaseInfoDTO.setProdNo(accidentalDrivings.get(0).getProductCode());
+        prodBaseInfoDTO.setFeeGeneType("1");
+        prodBaseInfoDTOList.add(prodBaseInfoDTO);
+        return prodBaseInfoDTOList;
+    }
+
+    public tag0684DTO setTag0684(CarInfoVo carInfoVo){
+        tag0684DTO tag0684 = new tag0684DTO();
+        tag0684.cTgtTxtFld1 = carInfoVo.getCarNatureCode();
+        if(Integer.parseInt(carInfoVo.getSeatCount()) < 6){
+            tag0684.cTgtTxtFld4 = "0000";
+        }else if(Integer.parseInt(carInfoVo.getSeatCount()) >= 6 && Integer.parseInt(carInfoVo.getSeatCount()) <=7){
+            tag0684.cTgtTxtFld4 = "0001";
+        }else {
+            tag0684.cTgtTxtFld4 = "0002";
+        }
+        return tag0684;
+    }
+
+    public List<tag0684ListDTO> setTag0684List(CarInfoVo carInfoVo){
+        List<tag0684ListDTO> tag0684ListDTOS = new ArrayList<>();
+        tag0684ListDTO tag0684 = new tag0684ListDTO();
+        //序列号
+        tag0684.nSeqNo = "1";
+        //车牌号
+        tag0684.cResevFld1 = carInfoVo.getLicenseNo();
+        //厂牌型号
+        tag0684.cResevFld2 = carInfoVo.getBrandName();
+        //发动机号
+        tag0684.cResevFld3 = carInfoVo.getEngineNo();
+        //车架号
+        tag0684.cResevFld4 = carInfoVo.getVinNo();
+        //座位数
+        tag0684.cResevFld5 = carInfoVo.getSeatCount();
+        tag0684.cResevFld6 = carInfoVo.getCarNatureCode();
+        tag0684ListDTOS.add(tag0684);
+        return tag0684ListDTOS;
+
+    }
+
+    public List<prodCvrgListDTO> setProdCvrgList(InsAccidentalDrivingDajia insAccidentalDrivingDajia){
+        List<prodCvrgListDTO> prodCvrgListDTOS = new ArrayList<>();
+        prodCvrgListDTO prodCvrg = new prodCvrgListDTO();
+        prodCvrg.prodNo = insAccidentalDrivingDajia.getProductCode();
+        prodCvrg.seqNo = "1";
+        prodCvrg.cvrgType = "0";
+        prodCvrg.cvrgCde = "067901";
+        prodCvrg.cvrgNme = "机动车辆驾乘人员意外伤害保险";
+        prodCvrg.responsisCde = "06790101";
+        prodCvrg.responsisNme = "意外伤害身故和伤残";
+        prodCvrg.cvrgAmt = "25";
+        prodCvrg.cvrgPrm = "25";
+        prodCvrg.freeDuty = "1";
+        prodCvrg.tgtQty = "1";
+        prodCvrgListDTOS.add(prodCvrg);
+
+        prodCvrgListDTO prodCvrg1 = new prodCvrgListDTO();
+        prodCvrg1.prodNo = insAccidentalDrivingDajia.getProductCode();
+        prodCvrg1.seqNo = "2";
+        prodCvrg1.cvrgType = "1";
+        prodCvrg1.cvrgCde = "12T006";
+        prodCvrg1.cvrgNme = "司机保额*1+乘客保额*(座位数-1)";
+        prodCvrg1.responsisCde = "12T00601";
+        prodCvrg1.responsisNme = "意外医疗";
+        prodCvrg1.cvrgAmt = "20";
+        prodCvrg1.cvrgPrm = "20";
+        prodCvrg1.freeDuty = "1";
+        prodCvrg1.tgtQty = "1";
+        prodCvrgListDTOS.add(prodCvrg1);
+
+        prodCvrgListDTO prodCvrg2 = new prodCvrgListDTO();
+        prodCvrg2.prodNo = insAccidentalDrivingDajia.getProductCode();
+        prodCvrg2.seqNo = "3";
+        prodCvrg2.cvrgType = "1";
+        prodCvrg2.cvrgCde = "12T005";
+        prodCvrg2.cvrgNme = "附加意外伤害住院津贴保险";
+        prodCvrg2.responsisCde = "12T00501";
+        prodCvrg2.responsisNme = "意外伤害住院津贴";
+        prodCvrg2.cvrgAmt = "15";
+        prodCvrg2.cvrgPrm = "15";
+        prodCvrg2.freeDuty = "1";
+        prodCvrg2.tgtQty = "1";
+        prodCvrgListDTOS.add(prodCvrg2);
+
+        return prodCvrgListDTOS;
+    }
+
+    @JsonProperty("body")
+    private BodyDTO body;
+
+    @NoArgsConstructor
+    @Data
+    public static class BodyDTO implements Serializable {
+        //第三方订单号
+        @JsonProperty("bookingNo")
+        private String bookingNo;
+        //交强险投保单号
+        @JsonProperty("ocPlyNo")
+        private String ocPlyNo;
+        //商业险投保单号
+        @JsonProperty("openCoverNo")
+        private String openCoverNo;
+        //
+        @JsonProperty("signflag")
+        private String signflag;
+
+        @JsonProperty("policyInfos")
+        private List<policyInfosDTO> policyInfos;
+    }
+
+    @Data
+    public static class policyInfosDTO implements Serializable{
+        //投保序号
+        @JsonProperty("applySeqNo")
+        private String applySeqNo;
+
+        //基本信息
+        @JsonProperty("base")
+        private baseDTO base;
+
+        //投保人信息
+        @JsonProperty("applicant")
+        private applicantDTO applicant;
+
+        //被保人信息
+        @JsonProperty("insured")
+        private insuredDTO insured;
+
+        //业务数据
+        @JsonProperty("businessInfo")
+        private businessDTO businessInfo;
+
+        //险别信息
+        @JsonProperty("prodCvrgList")
+        private List<prodCvrgListDTO> prodCvrgList;
+
+        //
+        @JsonProperty("prodBaseInfo")
+        private List<prodBaseInfoDTO> prodBaseInfo;
+
+        @JSONField(name = "_0684_tgt")
+        @JsonProperty("_0684_tgt")
+        private tag0684DTO _0684_tgt;
+
+        @JSONField(name = "_0684_tgtList_1")
+        @JsonProperty("_0684_tgtList_1")
+        private List<tag0684ListDTO> _0684_tgtList_1;
+
+    }
+
+    @Data
+    public static class baseDTO implements  Serializable{
+
+        //商品号
+        @JsonProperty("goodsCode")
+        private String goodsCode;
+
+        //方案号
+        @JsonProperty("schemeCode")
+        private String schemeCode;
+
+        //业务归属大类
+        @JsonProperty("salesBusiClass")
+        private String salesBusiClass;
+
+        //投保份数
+        @JsonProperty("copies")
+        private String copies;
+
+        //单份方案保费
+        @JsonProperty("perPrm")
+        private String perPrm;
+
+        //总保额
+        @JsonProperty("sumAmt")
+        private String sumAmt;
+
+        //总保费
+        @JsonProperty("sumPrm")
+        private String sumPrm;
+
+        //投保日期
+        @JsonProperty("appTm")
+        private String appTm;
+
+        //签单日期
+        @JsonProperty("issueTm")
+        private String issueTm;
+
+        //保险起期
+        @JsonProperty("effectiveDate")
+        private String effectiveDate;
+
+        //保险止期
+        @JsonProperty("expireDate")
+        private String expireDate;
+
+        //保险天数
+        @JsonProperty("tmSysCde")
+        private String tmSysCde;
+
+        //是否即时起保
+        @JsonProperty("isImmeffMrk")
+        private String isImmeffMrk;
+
+        //是否团单
+        @JsonProperty("isGrpMrk")
+        private String isGrpMrk;
+
+        //被保险人数量
+        @JsonProperty("insuredNum")
+        private String insuredNum;
+    }
+
+    //投保人信息
+    @Data
+    public static class applicantDTO implements  Serializable{
+
+        //投保人名称
+        @JsonProperty("appName")
+        private String appName;
+
+        //证件号码
+        @JsonProperty("appCertfCde")
+        private String appCertfCde;
+
+        //证件类型
+        @JsonProperty("appCertfCls")
+        private String appCertfCls;
+
+        //客户分类/投保人性质
+        @JsonProperty("appClntMrk")
+        private String appClntMrk;
+
+        //国家
+        @JsonProperty("appCountry")
+        private String appCountry;
+
+        //省份
+        @JsonProperty("appProvince")
+        private String appProvince;
+
+        //市
+        @JsonProperty("appCity")
+        private String appCity;
+
+        //县
+        @JsonProperty("appCounty")
+        private String appCounty;
+
+        //街道
+        @JsonProperty("appStreet")
+        private String appStreet;
+
+        //地址
+        @JsonProperty("appClntAddr")
+        private String appClntAddr;
+
+        //邮编
+        @JsonProperty("appZipCde")
+        private String appZipCde;
+
+        //邮箱Email
+        @JsonProperty("appEmail")
+        private String appEmail;
+
+        //手机
+        @JsonProperty("appMobile")
+        private String appMobile;
+
+        //固定电话
+        @JsonProperty("appTel")
+        private String appTel;
+
+        //性别
+        @JsonProperty("appSex")
+        private String appSex;
+
+        //出生日期
+        @JsonProperty("appBirthday")
+        private String appBirthday;
+
+        //证件是否长期有效
+        @JsonProperty("appExpiredFlag")
+        private String appExpiredFlag;
+
+        //证件有效起期
+        @JsonProperty("appEffectiveDate")
+        private String appEffectiveDate;
+
+        //证件失效日期
+        @JsonProperty("appExpiredDate")
+        private String appExpiredDate;
+
+        //客户授权标识(默认为“1-是”)
+        @JsonProperty("appEmPower")
+        private String appEmPower;
+
+        //客户行业风险(默认值“0-其他行业”)
+        @JsonProperty("appBusiness")
+        private String appBusiness;
+
+        //客户风险等级(默认“925104,低风险客户”)
+        @JsonProperty("appCusriskLvl")
+        private String appCusriskLvl;
+
+        //国籍(默认为中国)
+        @JsonProperty("appNation")
+        private String appNation;
+
+        //职业(洗钱风险)一级
+        @JsonProperty("appProfissionXiq1")
+        private String appProfissionXiq1;
+
+        //职业(洗钱风险)二级
+        @JsonProperty("appProfissionXiq2")
+        private String appProfissionXiq2;
+
+        //单位性质(默认为“9-其他”)
+        @JsonProperty("appWorkdpt")
+        private String appWorkdpt;
+
+        //年龄
+        @JsonProperty("appAge")
+        private String appAge;
+
+        //职业
+        @JsonProperty("appOccupCde")
+        private String appOccupCde;
+
+        //职业小分类名称
+        @JsonProperty("appOccupSubName")
+        private String appOccupSubName;
+
+        //职业小分类
+        @JsonProperty("appOccupSubCde")
+        private String appOccupSubCde;
+
+        //年收入
+        @JsonProperty("appIncome")
+        private String appIncome;
+
+        //与被保险人关系
+        @JsonProperty("appRelCde")
+        private String appRelCde;
+
+        //与付款人关系
+        @JsonProperty("payerRel")
+        private String payerRel;
+
+        //股东客户
+        @JsonProperty("isStkMrk")
+        private String isStkMrk;
+
+        //联系人
+        @JsonProperty("appCntrNme")
+        private String appCntrNme;
+
+        //是否授权的标识
+        @JsonProperty("isEmPower")
+        private String isEmPower;
+    }
+
+    //被保人信息
+    @Data
+    public static class insuredDTO implements  Serializable{
+
+
+        //被保人名称
+        @JsonProperty("insName")
+        private String insName;
+
+
+        //证件号码
+        @JsonProperty("insCertfCde")
+        private String insCertfCde;
+
+
+        //证件类型
+        @JsonProperty("insCertfCls")
+        private String insCertfCls;
+
+
+        //国家
+        @JsonProperty("insCountry")
+        private String insCountry;
+
+
+        //省份
+        @JsonProperty("insProvince")
+        private String insProvince;
+
+
+        //市
+        @JsonProperty("insCity")
+        private String insCity;
+
+
+        //县
+        @JsonProperty("insCounty")
+        private String insCounty;
+
+
+        //街道
+        @JsonProperty("insStreet")
+        private String insStreet;
+
+
+        //地址
+        @JsonProperty("insClntAddr")
+        private String insClntAddr;
+
+
+        //客户分类/被保人性质
+        @JsonProperty("insClntMrk")
+        private String insClntMrk;
+
+
+        //邮箱Email
+        @JsonProperty("insEmail")
+        private String insEmail;
+
+
+        //手机
+        @JsonProperty("insMobile")
+        private String insMobile;
+
+
+        //固定电话
+        @JsonProperty("insTel")
+        private String insTel;
+
+
+        //性别
+        @JsonProperty("insSex")
+        private String insSex;
+
+
+        //邮编
+        @JsonProperty("insZipCde")
+        private String insZipCde;
+
+
+        //出生日期
+        @JsonProperty("insBirthday")
+        private String insBirthday;
+
+
+        //证件是否长期有效
+        @JsonProperty("insExpiredFlag")
+        private String insExpiredFlag;
+
+
+        //证件有效起期
+        @JsonProperty("insEffectiveDate")
+        private String insEffectiveDate;
+
+
+        //证件失效日期
+        @JsonProperty("insExpiredDate")
+        private String insExpiredDate;
+
+
+        //客户行业风险(默认值“0-其他行业”)
+        @JsonProperty("insBusiness")
+        private String insBusiness;
+
+
+        //客户风险等级(默认“915001,低风险客户”)
+        @JsonProperty("insCusriskLvl")
+        private String insCusriskLvl;
+
+
+        //国籍(默认为中国)
+        @JsonProperty("insNation")
+        private String insNation;
+
+
+        //职业(洗钱风险)一级
+        @JsonProperty("insProfissionXiq1")
+        private String insProfissionXiq1;
+
+
+        //职业(洗钱风险)二级
+        @JsonProperty("insProfissionXiq2")
+        private String insProfissionXiq2;
+
+
+        //单位性质(默认为“9-其他”)
+        @JsonProperty("insWorkdpt")
+        private String insWorkdpt;
+
+
+        //年龄
+        @JsonProperty("insAge")
+        private String insAge;
+
+
+        //职业
+        @JsonProperty("insOccupCde")
+        private String insOccupCde;
+
+
+        //职业小分类名称
+        @JsonProperty("insOccupSubName")
+        private String insOccupSubName;
+
+
+        //职业小分类
+        @JsonProperty("insOccupSubCde")
+        private String insOccupSubCde;
+
+
+        //年收入
+        @JsonProperty("insIncome")
+        private String insIncome;
+
+
+        //受益人类型
+        @JsonProperty("insBnftype")
+        private String insBnftype;
+
+
+        //学生类别
+        @JsonProperty("studentType")
+        private String studentType;
+
+
+        //学校
+        @JsonProperty("schoolName")
+        private String schoolName;
+
+
+        //班级
+        @JsonProperty("className")
+        private String className;
+
+
+        //家长姓名
+        @JsonProperty("parentName")
+        private String parentName;
+
+
+        //家庭住址
+        @JsonProperty("homeAddress")
+        private String homeAddress;
+
+
+        //房屋面积
+        @JsonProperty("houseArea")
+        private String houseArea;
+
+
+        //房屋建筑结构
+        @JsonProperty("buildingStructure")
+        private String buildingStructure;
+
+
+        //投保财产坐落地址
+        @JsonProperty("appPropertyAddr")
+        private String appPropertyAddr;
+    }
+
+    //业务数据
+    @Data
+    public static class businessDTO implements  Serializable{
+
+        //登录机构
+        @JsonProperty("opDpt")
+        private String opDpt;
+
+        //操作员代码
+        @JsonProperty("oprCde")
+        private String oprCde;
+
+        //操作员名称
+        @JsonProperty("oprNme")
+        private String oprNme;
+
+        //出单口
+        @JsonProperty("dptCde")
+        private String dptCde;
+
+        //出单口名称
+        @JsonProperty("dptNme")
+        private String dptNme;
+
+        //业务来源
+        @JsonProperty("bsnsTyp")
+        private String bsnsTyp;
+
+        //代理人编码
+        @JsonProperty("brkrCde")
+        private String brkrCde;
+
+        //代理人名称
+        @JsonProperty("agentNme")
+        private String agentNme;
+
+        //销售经办人
+        @JsonProperty("chaSalesId")
+        private String chaSalesId;
+
+        //业务员代码
+        @JsonProperty("slsCde")
+        private String slsCde;
+
+        //业务员身份证号
+        @JsonProperty("slsId")
+        private String slsId;
+
+        //业务员名称
+        @JsonProperty("slsName")
+        private String slsName;
+
+        //推荐人代码
+        @JsonProperty("recommendCde")
+        private String recommendCde;
+
+        //渠道
+        @JsonProperty("channelSrc")
+        private String channelSrc;
+
+        //推荐子渠道
+        @JsonProperty("recSubChannel")
+        private String recSubChannel;
+
+        //合作店送修码
+        @JsonProperty("coopCde")
+        private String coopCde;
+
+        //合作店名称
+        @JsonProperty("coopName")
+        private String coopName;
+
+        //是否返修
+        @JsonProperty("repairFlag")
+        private String repairFlag;
+
+        //修理厂编码
+        @JsonProperty("garageCode")
+        private String garageCode;
+
+        //修理厂名称
+        @JsonProperty("garageName")
+        private String garageName;
+
+        //业务识别
+        @JsonProperty("servieCode")
+        private String servieCode;
+
+        //合作渠道(意健险)
+        @JsonProperty("coopChannel")
+        private String coopChannel;
+
+        //一级来源
+        @JsonProperty("dataSrc")
+        private String dataSrc;
+
+        //二级来源
+        @JsonProperty("dataFlag")
+        private String dataFlag;
+
+        //销售团队编码
+        @JsonProperty("salegrpCde")
+        private String salegrpCde;
+
+        //上级代理人编码
+        @JsonProperty("suprBrkrCde")
+        private String suprBrkrCde;
+    }
+
+    //险别信息
+    @Data
+    public static class prodCvrgListDTO implements  Serializable{
+
+        //产品编码
+        @JsonProperty("prodNo")
+        private String prodNo;
+
+        //序号
+        @JsonProperty("seqNo")
+        private String seqNo;
+
+        //险别类型
+        @JsonProperty("cvrgType")
+        private String cvrgType;
+
+        //险别代码
+        @JsonProperty("cvrgCde")
+        private String cvrgCde;
+
+        //险别名称
+        @JsonProperty("cvrgNme")
+        private String cvrgNme;
+
+        //责任代码
+        @JsonProperty("responsisCde")
+        private String responsisCde;
+
+        //责任名称
+        @JsonProperty("responsisNme")
+        private String responsisNme;
+
+        //保额合计
+        @JsonProperty("cvrgAmt")
+        private String cvrgAmt;
+
+        //共享保额
+        @JsonProperty("sharedAmt")
+        private String sharedAmt;
+
+        //保费合计/保费小计
+        @JsonProperty("cvrgPrm")
+        private String cvrgPrm;
+
+        //应免税
+        @JsonProperty("freeDuty")
+        private String freeDuty;
+
+        //费率(‰)/基准费率
+        @JsonProperty("rate")
+        private String rate;
+
+        //折扣系统/浮动系数(%)
+        @JsonProperty("floatCoef")
+        private String floatCoef;
+
+        //数量/人数
+        @JsonProperty("tgtQty")
+        private String tgtQty;
+
+        //单一标的保额合计
+        @JsonProperty("perAmt")
+        private String perAmt;
+
+        //单一标的保费合计/单车保费小计
+        @JsonProperty("perPrm")
+        private String perPrm;
+
+        //免赔额
+        @JsonProperty("dductAmt")
+        private String dductAmt;
+
+        //免赔率(%)/免赔比例(%)
+        @JsonProperty("dductRate")
+        private String dductRate;
+
+        //免赔说明
+        @JsonProperty("dductDesc")
+        private String dductDesc;
+
+        //免赔天数
+        @JsonProperty("dductDays")
+        private String dductDays;
+
+        //赔付比例(%)
+        @JsonProperty("compenRate")
+        private String compenRate;
+
+        //保险金额/累计赔偿限额
+        @JsonProperty("indemLmt")
+        private String indemLmt;
+
+        //每年最长赔付天数
+        @JsonProperty("liabDaysLmt")
+        private String liabDaysLmt;
+
+        //每日赔偿限额(每户)
+        @JsonProperty("onceAmt")
+        private String onceAmt;
+
+        //每次事故累计赔偿天数
+        @JsonProperty("onceLiabDaysLmt")
+        private String onceLiabDaysLmt;
+
+        //每次事故赔偿限额
+        @JsonProperty("onceIndemLmt")
+        private String onceIndemLmt;
+
+        //每人赔偿限额
+        @JsonProperty("onceInjurLmt")
+        private String onceInjurLmt;
+
+        //每次事故每人医疗费用赔偿限额
+        @JsonProperty("onceMedicalIndemLmt")
+        private String onceMedicalIndemLmt;
+
+        //每次事故每人财产损失赔偿限额
+        @JsonProperty("oncePropertyIndemLmt")
+        private String oncePropertyIndemLmt;
+
+        //职业类别
+        @JsonProperty("propesTyp")
+        private String propesTyp;
+
+        //交通工具
+        @JsonProperty("traffic")
+        private String traffic;
+
+        //投保标的
+        @JsonProperty("tgtName")
+        private String tgtName;
+
+        //学生类别
+        @JsonProperty("studentType")
+        private String studentType;
+
+        //年龄上限
+        @JsonProperty("age1")
+        private String age1;
+
+        //年龄下限
+        @JsonProperty("age2")
+        private String age2;
+
+        //校内保额
+        @JsonProperty("amt3")
+        private String amt3;
+
+        //校外保额
+        @JsonProperty("amt4")
+        private String amt4;
+
+        //等待期内保额
+        @JsonProperty("amt1")
+        private String amt1;
+
+        //等待期外保额
+        @JsonProperty("amt2")
+        private String amt2;
+
+        //赔付比例(等待期外)
+        @JsonProperty("compenRate1")
+        private String compenRate1;
+
+        //赔付比例(等待期内)
+        @JsonProperty("compenRate2")
+        private String compenRate2;
+
+        //单次赔付最高天数
+        @JsonProperty("oncePayMaxDays")
+        private String oncePayMaxDays;
+
+        //乘客每座日津贴保额
+        @JsonProperty("farePerSeatAmt")
+        private String farePerSeatAmt;
+
+        //乘客座位保额
+        @JsonProperty("fareSeatAmt")
+        private String fareSeatAmt;
+
+        //座位数
+        @JsonProperty("seatNum")
+        private String seatNum;
+
+        //司机每座日津贴保额
+        @JsonProperty("dirverPerSeatAmt")
+        private String dirverPerSeatAmt;
+
+        //车辆数
+        @JsonProperty("carNum")
+        private String carNum;
+
+        //累计赔付天数
+        @JsonProperty("payDaysLmt")
+        private String payDaysLmt;
+
+        //司机座位保额
+        @JsonProperty("dirverSeatAmt")
+        private String dirverSeatAmt;
+    }
+
+    @Data
+    public static class prodBaseInfoDTO implements  Serializable{
+
+        //产品编码
+        @JsonProperty("prodNo")
+        private String prodNo;
+
+        //核心系统是否用传入销售费用标志
+        @JsonProperty("feeGeneType")
+        private String feeGeneType;
+
+        //收费方式
+        @JsonProperty("finTyp")
+        private String finTyp;
+
+    }
+
+    @Data
+    public static class tag0684DTO implements Serializable{
+
+        //驾驶机动车类别
+        @JsonProperty("cTgtTxtFld1")
+        private String cTgtTxtFld1;
+
+        //驾驶机动车类别次级
+        @JsonProperty("cTgtTxtFld4")
+        private String cTgtTxtFld4;
+
+        //房屋建筑结构
+        @JsonProperty("cTgtTxtFld11")
+        private String cTgtTxtFld11;
+
+        //国家
+        @JsonProperty("cTgtTxtFld12")
+        private String cTgtTxtFld12;
+
+        //省
+        @JsonProperty("cTgtTxtFld13")
+        private String cTgtTxtFld13;
+
+        //市
+        @JsonProperty("cTgtTxtFld14")
+        private String cTgtTxtFld14;
+
+        //县/区
+        @JsonProperty("cTgtTxtFld15")
+        private String cTgtTxtFld15;
+
+        //街道
+        @JsonProperty("cTgtTxtFld16")
+        private String cTgtTxtFld16;
+
+        //家庭财产标的地址
+        @JsonProperty("cTgtTxtFld17")
+        private String cTgtTxtFld17;
+
+        //备注
+        @JsonProperty("cTgtTxtFld18")
+        private String cTgtTxtFld18;
+
+    }
+
+    @Data
+    public static class tag0684ListDTO implements Serializable{
+
+        //序号
+        @JsonProperty("nSeqNo")
+        private String nSeqNo;
+
+        //车牌号码
+        @JsonProperty("cResevFld1")
+        private String cResevFld1;
+
+        //厂牌型号
+        @JsonProperty("cResevFld2")
+        private String cResevFld2;
+
+        //发动机号
+        @JsonProperty("cResevFld3")
+        private String cResevFld3;
+
+        //车架号
+        @JsonProperty("cResevFld4")
+        private String cResevFld4;
+
+        //车辆使用性质
+        @JsonProperty("cResevFld6")
+        private String cResevFld6;
+
+        //核定座位数
+        @JsonProperty("cResevFld5")
+        private String cResevFld5;
+
+        //备注
+        @JsonProperty("cResevFld7")
+        private String cResevFld7;
+
+    }
+}

+ 37 - 38
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/request/ODR1009Request.java

@@ -1,6 +1,8 @@
 package com.jzg.quotation.dajia.api.entity.request;
 
+import cn.hutool.core.collection.CollUtil;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.entity.quote.vo.AccidentalDrivingVo;
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
 import com.jzg.commons.entity.quote.vo.KindInfoVo;
 import com.jzg.commons.entity.quote.vo.VehicleAndVesselTaxVo;
@@ -65,9 +67,10 @@ public class ODR1009Request extends DaJiaBaseRequest {
         setSpecialInfo(quoteVo);
 
         //非车险
-//        if(!Objects.isNull(insAccidentalDrivingDajia)) {
-//            body.nvhPolicyList = setNvhPolicyList(insAccidentalDrivingDajia, insAccidentalDrivingSubDajias,riskInfoVos);
-//        }
+        List<AccidentalDrivingVo> accidentalDrivings = quoteVo.getAccidentalDrivings();
+        if(CollUtil.isNotEmpty(accidentalDrivings)) {
+            body.nvhPolicyList = setNvhPolicyList(accidentalDrivings,quoteVo);
+        }
 
     }
 
@@ -277,44 +280,40 @@ public class ODR1009Request extends DaJiaBaseRequest {
         {
             body.inspectionInfo = new BodyDTO.inspectionInfoDTO();
         }
-//        //验车情况
-//        body.inspectionInfo.setVehicleInspectionCde(CInspectionCde.INS3.getCode().toString());
-//        //免验原因
-//        body.inspectionInfo.setVehicleResvTxt1(CResvTxt.RESC3.getCode().toString());
-//        //验车时间
-//        body.inspectionInfo.setVehicleInspectTm(new DateTime().toDateStr());
-//        //验车人
-//        body.inspectionInfo.setVehicleInspectorNme("张英");
-//        //验车结果
-//        body.inspectionInfo.setVehicleInspectRec(INSREC1.getCode().toString());
     }
 
     //非车险
-//    public List<BodyDTO.nvhPolicyListDTO> setNvhPolicyList(InsAccidentalDrivingDajia insAccidentalDrivingDajia,List<InsAccidentalDrivingSubDajia> insAccidentalDrivingSubDajias,List<RiskInfoVo> riskInfoVos){
-//        List<BodyDTO.nvhPolicyListDTO> nvhPolicyListDTOS = new ArrayList<>();
-//        insAccidentalDrivingSubDajias.forEach(item->{
-//            BodyDTO.nvhPolicyListDTO nvhPolicyListDTO = new BodyDTO.nvhPolicyListDTO();
-//            nvhPolicyListDTO.setNvhlProdCode(insAccidentalDrivingDajia.getProductCode());
-//            //非车方案代码
-//            nvhPolicyListDTO.setNvhlSchemeCode(insAccidentalDrivingDajia.getPlanCode());
-//            //非车商品号
-//            nvhPolicyListDTO.setNvDutyRiskCode(insAccidentalDrivingDajia.getCommodityCode());
-//            for (RiskInfoVo riskInfoVo : riskInfoVos) {
-//                //时间
-//                nvhPolicyListDTO.setNvhlEffectiveDate(riskInfoVos.get(0).getStartDate());
-//                nvhPolicyListDTO.setNvhlExpireDate(riskInfoVos.get(0).getStartDate());
-//            }
-//            //非车投保份数
-//            nvhPolicyListDTO.setNoVhlSum(insAccidentalDrivingDajia.getQuantity().toString());
-//            //非车险每份保费
-//            nvhPolicyListDTO.setNvhlPrm(insAccidentalDrivingDajia.getPrice().toString());
-//            //险别代码
-//            nvhPolicyListDTO.setNvDutyRiskCode(item.getCvrgCde());
-//            nvhPolicyListDTO.setNvhlSumPrm(insAccidentalDrivingDajia.getPrice() + "");
-//            nvhPolicyListDTOS.add(nvhPolicyListDTO);
-//        });
-//        return nvhPolicyListDTOS;
-//    }
+    public List<BodyDTO.nvhPolicyListDTO> setNvhPolicyList(List<AccidentalDrivingVo> accidentalDrivings, QuoteVo quoteVo){
+        List<BodyDTO.nvhPolicyListDTO> nvhPolicyListDTOS = new ArrayList<>();
+        accidentalDrivings.forEach(item->{
+            BodyDTO.nvhPolicyListDTO nvhPolicyListDTO = new BodyDTO.nvhPolicyListDTO();
+            nvhPolicyListDTO.setNvhlProdCode(item.getProductCode());
+            //非车方案代码
+            nvhPolicyListDTO.setNvhlSchemeCode(item.getProductCategoryCode());
+            //非车商品号
+            nvhPolicyListDTO.setNvDutyRiskCode(item.getRiskCode());
+
+            if (Objects.nonNull(quoteVo.getCiRiskInfoVo())){
+                //交强险保险起期
+                nvhPolicyListDTO.setNvhlEffectiveDate(quoteVo.getCiRiskInfoVo().getStartDate());
+                //交强险保险止期
+                nvhPolicyListDTO.setNvhlExpireDate(quoteVo.getCiRiskInfoVo().getEndDate());
+            } else if (Objects.nonNull(quoteVo.getBiRiskInfoVo())){
+                //商业险保险起期
+                nvhPolicyListDTO.setNvhlEffectiveDate(quoteVo.getBiRiskInfoVo().getStartDate());
+                //商业险保险止期
+                nvhPolicyListDTO.setNvhlExpireDate(quoteVo.getBiRiskInfoVo().getEndDate());
+            }
+            //非车投保份数
+            nvhPolicyListDTO.setNoVhlSum(item.getQuantity() + "");
+            //非车险每份保费
+            nvhPolicyListDTO.setNvhlPrm(Double.parseDouble(item.getSumPremium()) / item.getQuantity() + "");
+            //险别代码
+            nvhPolicyListDTO.setNvhlSumPrm(item.getSumPremium());
+            nvhPolicyListDTOS.add(nvhPolicyListDTO);
+        });
+        return nvhPolicyListDTOS;
+    }
 
     @NoArgsConstructor
     @Data

+ 101 - 88
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/request/ODR1010Request.java

@@ -1,7 +1,12 @@
 package com.jzg.quotation.dajia.api.entity.request;
 
-import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.entity.orders.po.InsOrdersCarInfo;
+import com.jzg.commons.entity.orders.po.InsOrdersCarUserInfo;
+import com.jzg.commons.util.StringUtils;
+import com.jzg.quotation.commons.entity.vo.aggregated.UnderwritingVo;
+import com.jzg.quotation.dajia.api.constant.ServiceCode;
+import com.jzg.quotation.dajia.api.entity.DaJiaApiConfigureParameters;
 import com.jzg.quotation.dajia.api.entity.DaJiaBaseRequest;
 import com.jzg.quotation.dajia.api.entity.response.ODR1009Response;
 import lombok.Data;
@@ -29,22 +34,22 @@ public class ODR1010Request extends DaJiaBaseRequest {
     @JsonProperty("body")
     private BodyDTO body;
 
-//    public ODR1010Request(String orderNo, String busiId, DaJiaConfigureParameters daJiaConfigureParameters,
-//                          ODR1009Response.ResultDTO odr1009Response, InsOrders insOrders) {
-//        super(daJiaConfigureParameters.getChannelCode(), ServiceCode.ODR1010.getCode());
-//        if(body == null){
-//            body = new BodyDTO();
-//        }
-//        body.setOrderNo( orderNo );
-//        //业务信息
-//        setBusinessInfo(busiId,daJiaConfigureParameters);
-//        //交强特约信息
-//        setJqSpecialEngageList(odr1009Response.getJqSpecialEngageList());
-//        //商业特约信息
-//        setSySpecialEngageList(odr1009Response.getSySpecialEngageList());
-//        //校验信息
-//        setCheckInfo(insOrders);
-//    }
+    public ODR1010Request(String orderNo, DaJiaApiConfigureParameters parameters,
+                          ODR1009Response.ResultDTO odr1009Response, UnderwritingVo underwritingVo) {
+        super(parameters.getChannelCode(), ServiceCode.ODR1010.getCode());
+        if(body == null){
+            body = new BodyDTO();
+        }
+        body.setOrderNo( orderNo );
+        //业务信息
+        setBusinessInfo(odr1009Response.getBasePart().getSyProposalNo(),parameters);
+        //交强特约信息
+        setJqSpecialEngageList(odr1009Response.getJqSpecialEngageList());
+        //商业特约信息
+        setSySpecialEngageList(odr1009Response.getSySpecialEngageList());
+        //校验信息
+        setCheckInfo(underwritingVo);
+    }
 
     @NoArgsConstructor
     @Data
@@ -170,37 +175,37 @@ public class ODR1010Request extends DaJiaBaseRequest {
     }
 
     //业务信息
-//    public void setBusinessInfo(String busiId,DaJiaConfigureParameters daJiaConfigureParameters){
-//        if(Objects.isNull(body.businessInfo)){
-//            body.businessInfo = new BodyDTO.BusinessInfoDTO();
-//        }
-//        //业务ID
-//        body.businessInfo.setBusiId(busiId);
-//        //登录机构
-//        body.businessInfo.setBusiOpdpt(daJiaConfigureParameters.getLoginInstitution());
-//        //出单口
-//        body.businessInfo.setBusiDptCde(daJiaConfigureParameters.getIssuingInstitution());
-//        //代理人编码
-//        body.businessInfo.setBusiBrkrCde(daJiaConfigureParameters.getAgentCode());
-//        //操作员代码
-//        body.businessInfo.setBusiOprCde(daJiaConfigureParameters.getOperatorCode());
-//        //操作员姓名
-//        body.businessInfo.setBusiOprNme(daJiaConfigureParameters.getOperatorName());
-//        //业务来源
-//        body.businessInfo.setBusiBsnsTyp(Integer.parseInt(daJiaConfigureParameters.getBusinessSource()));
-//        //业务员代码
-//        body.businessInfo.setBusiSlsCde(daJiaConfigureParameters.getSalespersonCode());
-//        //推荐人代码
-//        body.businessInfo.setBusiRecommendCde(daJiaConfigureParameters.getRecommendedCode());
-//        //推荐子渠道
-//        body.businessInfo.setBusiRecSubChannel(daJiaConfigureParameters.getRecommendedSubChannels());
-//        //渠道
-//        body.businessInfo.setBusiChannelSrc(daJiaConfigureParameters.getChannel());
-//        //设置一级来源
-//        body.businessInfo.setBusiDataSrc("G");
-//        //设置二级来源
-//        body.businessInfo.setBusiDataFlag("TQBD");
-//    }
+    public void setBusinessInfo(String busiId,DaJiaApiConfigureParameters parameters){
+        if(Objects.isNull(body.businessInfo)){
+            body.businessInfo = new BodyDTO.BusinessInfoDTO();
+        }
+        //业务ID
+        body.businessInfo.setBusiId(busiId); // todo 后续应该确认下
+        //登录机构
+        body.businessInfo.setBusiOpdpt(parameters.getLoginInstitution());
+        //出单口
+        body.businessInfo.setBusiDptCde(parameters.getIssuingInstitution());
+        //代理人编码
+        body.businessInfo.setBusiBrkrCde(parameters.getAgentCode());
+        //操作员代码
+        body.businessInfo.setBusiOprCde(parameters.getOperatorCode());
+        //操作员姓名
+        body.businessInfo.setBusiOprNme(parameters.getOperatorName());
+        //业务来源
+        body.businessInfo.setBusiBsnsTyp(Integer.parseInt(parameters.getBusinessSource()));
+        //业务员代码
+        body.businessInfo.setBusiSlsCde(parameters.getSalespersonCode());
+        //推荐人代码
+        body.businessInfo.setBusiRecommendCde(parameters.getRecommendedCode());
+        //推荐子渠道
+        body.businessInfo.setBusiRecSubChannel(parameters.getRecommendedSubChannels());
+        //渠道
+        body.businessInfo.setBusiChannelSrc(parameters.getChannel());
+        //设置一级来源
+        body.businessInfo.setBusiDataSrc("G");
+        //设置二级来源
+        body.businessInfo.setBusiDataFlag("TQBD");
+    }
 
     //交强特约信息
     public void setJqSpecialEngageList(List<BodyDTO.JqSpecialEngageListDTO> jqSpecialEngageList){
@@ -219,45 +224,53 @@ public class ODR1010Request extends DaJiaBaseRequest {
     }
 
     //校验信息
-//    public void setCheckInfo(InsOrders insOrders){
-//        if(Objects.isNull(body.checkInfo)){
-//            body.checkInfo = new BodyDTO.CheckInfoDTO();
-//        }
-//        //车牌号
-//        if(!insOrders.getCarinfo().getBooleanValue("noLicenseFlag")){
-//            body.checkInfo.setVehiclePlateNo(insOrders.getLicenseno());
-//        }
-//
-//        //车架号
-//        body.checkInfo.setVehicleFrmNo(insOrders.getFrameno());
-//        JSONObject applyInfo = insOrders.getApplyinfo();
-//        JSONObject insureInfo = insOrders.getInsureinfo();
-//        String applyProperty = applyInfo.getString("property");
-//        String insureProperty = insureInfo.getString("property");
-//        //投保人名称
-//        body.checkInfo.setApplicantNme(applyInfo.getString("name"));
-//        if(StringUtils.isBlank(applyProperty) || !"0".equals(applyProperty)){
-//            //投保人证件号码
-//            body.checkInfo.setApplicantCCertfCde(applyInfo.getString("identifyNumber"));
-//        }else{
-//            //投保人证件号码
-//            body.checkInfo.setApplicantCCertfCde(applyInfo.getString("organizationCode"));
-//        }
-//        //投保人手机号
-//        body.checkInfo.setApplicantMobile(applyInfo.getString("mobile"));
-//
-//        //被保人名称
-//        body.checkInfo.setInsuredNme(insureInfo.getString("name"));
-//        if(StringUtils.isBlank(insureProperty) || !"0".equals(insureProperty)){
-//            //被保人证件号码
-//            body.checkInfo.setInsuredCertfCde(insureInfo.getString("identifyNumber"));
-//        }else{
-//            //被保人证件号码
-//            body.checkInfo.setInsuredCertfCde(insureInfo.getString("organizationCode"));
-//        }
-//        //被保人手机号
-//        body.checkInfo.setInsuredMobile(insureInfo.getString("mobile"));
-//
-//    }
+    public void setCheckInfo(UnderwritingVo underwritingVo){
+        if(Objects.isNull(body.checkInfo)){
+            body.checkInfo = new BodyDTO.CheckInfoDTO();
+        }
+
+        InsOrdersCarInfo insOrdersCarInfo = underwritingVo.getInsOrdersCarInfo();
+        //车牌号
+        if(!insOrdersCarInfo.isRegistered()){
+            body.checkInfo.setVehiclePlateNo(insOrdersCarInfo.getLicenseNo());
+        }
+
+        //车架号
+        body.checkInfo.setVehicleFrmNo(insOrdersCarInfo.getVinNo());
+        List<InsOrdersCarUserInfo> insOrdersCarUserInfoList = underwritingVo.getInsOrdersCarUserInfoList();
+        InsOrdersCarUserInfo applyInfo = null;
+        InsOrdersCarUserInfo insureInfo = null;
+        for (InsOrdersCarUserInfo userInfo : insOrdersCarUserInfoList) {
+            if(userInfo.getPolicyPersonType().equals(2)){
+                applyInfo = userInfo;
+            } else if(userInfo.getPolicyPersonType().equals(3)){
+                insureInfo = userInfo;
+            }
+        }
+        //投保人名称
+        body.checkInfo.setApplicantNme(applyInfo.getName());
+        if(applyInfo.getPersonType().equals(1)){
+            //投保人证件号码
+            body.checkInfo.setApplicantCCertfCde(applyInfo.getIdentifyNumber());
+        }else{
+            //投保人证件号码
+            body.checkInfo.setApplicantCCertfCde(applyInfo.getIdentifyNumber());
+        }
+        //投保人手机号
+        body.checkInfo.setApplicantMobile(applyInfo.getMobile());
+
+        //被保人名称
+        body.checkInfo.setInsuredNme(insureInfo.getName());
+        if(insureInfo.getPersonType().equals(1)){
+            //投保人证件号码
+            body.checkInfo.setInsuredCertfCde(insureInfo.getIdentifyNumber());
+        }else{
+            //投保人证件号码
+            body.checkInfo.setInsuredCertfCde(insureInfo.getIdentifyNumber());
+        }
+        //被保人手机号
+        body.checkInfo.setInsuredMobile(insureInfo.getMobile());
+
+    }
 
 }

+ 66 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/request/ODR1011Request.java

@@ -0,0 +1,66 @@
+package com.jzg.quotation.dajia.api.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.dajia.api.constant.ServiceCode;
+import com.jzg.quotation.dajia.api.entity.DaJiaApiConfigureParameters;
+import com.jzg.quotation.dajia.api.entity.DaJiaBaseRequest;
+import com.jzg.quotation.dajia.api.entity.response.NVHLODR1001Response;
+import com.ydtech.modules.order.entity.api.dajia.DaJiaBaseRequest;
+import com.ydtech.modules.order.entity.api.dajia.DaJiaConfigureParameters;
+import com.ydtech.modules.order.entity.api.dajia.constants.ServiceCode;
+import com.ydtech.modules.order.entity.api.dajia.response.NVHLODR1001Response;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Objects;
+
+
+/**
+ * @version 
+ * @description: 大家财险 非个人申请支付接口 请求参数
+ * @author: wenks 
+ * @date: 2023/11/14 17:43
+ **/
+
+@EqualsAndHashCode(callSuper = true)
+//@NoArgsConstructor
+@Data
+public class ODR1011Request extends DaJiaBaseRequest {
+
+    private static final long serialVersionUID = -7892713641287949312L;
+
+    @JsonProperty("body")
+    private BodyDTO body;
+
+    public ODR1011Request(String orderNo, DaJiaApiConfigureParameters parameters, List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS) {
+        super(parameters.getChannelCode(), ServiceCode.ODR1011.getCode());
+        if(body == null){
+            body = new BodyDTO();
+        }
+        body.setOrderNo(orderNo);
+        body.setOperCde(parameters.getOperatorCode());
+        if(!Objects.isNull(policyInfosDTOS)){
+            body.setNoVhlAppNo(policyInfosDTOS.get(0).getAppNo());
+        }
+    }
+
+    @NoArgsConstructor
+    @Data
+    public static class BodyDTO implements Serializable {
+
+        private static final long serialVersionUID = -4592159874022566051L;
+
+        @JsonProperty("operCde")
+        private String operCde;
+
+        @JsonProperty("orderNo")
+        private String orderNo;
+
+        @JsonProperty("noVhlAppNo")
+        private String noVhlAppNo;
+
+    }
+}

+ 134 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/response/NVHLODR1001Response.java

@@ -0,0 +1,134 @@
+package com.jzg.quotation.dajia.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.dajia.api.entity.DaJiaBaseResponse;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+/**
+ * @description: 大家财险 非车险 响应参数
+ * @author: wenks
+ * @date: 2023/11/14 16:28
+ **/
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class NVHLODR1001Response extends DaJiaBaseResponse {
+
+    private static final long serialVersionUID = -8058364300759565052L;
+
+    //第三方订单号
+    @JsonProperty("bookingNo")
+    private String bookingNo;
+
+    //业务订单号(业务中台)
+    @JsonProperty("orderNo")
+    private String orderNo;
+
+    //订单总保额
+    @JsonProperty("orderAmt")
+    private String orderAmt;
+
+    //订单总保费
+    @JsonProperty("orderPrm")
+    private String orderPrm;
+
+    //保单信息
+    @JsonProperty("policyInfos")
+    private List<policyInfosDTO> policyInfos;
+
+
+    @NoArgsConstructor
+    @Data
+    public static class policyInfosDTO implements Serializable {
+
+        private static final long serialVersionUID = 7893426766810061120L;
+
+        //投保序号
+        @JsonProperty("applySeqNo")
+        private String applySeqNo;
+
+        //商品号
+        @JsonProperty("goodsCode")
+        private String goodsCode;
+
+        //方案号
+        @JsonProperty("schemeCode")
+        private String schemeCode;
+
+        //总保额
+        @JsonProperty("sumAmt")
+        private String sumAmt;
+
+        //总保费
+        @JsonProperty("sumPrm")
+        private String sumPrm;
+
+        //投保份数
+        @JsonProperty("copies")
+        private String copies;
+
+        //单份方案保费
+        @JsonProperty("perPrm")
+        private String perPrm;
+
+        //投保单号
+        @JsonProperty("appNo")
+        private String appNo;
+
+        //保单号
+        @JsonProperty("plyNo")
+        private String plyNo;
+
+        //产品代码
+        @JsonProperty("prodNo")
+        private String prodNo;
+
+        //产品名称
+        @JsonProperty("prodName")
+        private String prodName;
+
+        //产品保额
+        @JsonProperty("amt")
+        private String amt;
+
+        //产品保费
+        @JsonProperty("prm")
+        private String prm;
+
+        //产品投保日期
+        @JsonProperty("appTm")
+        private String appTm;
+
+        //产品签单日期
+        @JsonProperty("issueTm")
+        private String issueTm;
+
+        //产品保险起期
+        @JsonProperty("effetiveDate")
+        private String effetiveDate;
+
+        //产品保险止期
+        @JsonProperty("expireDate")
+        private String expireDate;
+
+        //电子保单下载地址
+        @JsonProperty("pdfUrl")
+        private String pdfUrl;
+
+        //核保描述
+        @JsonProperty("rstMsg")
+        private String rstMsg;
+
+        //核保结论
+        @JsonProperty("decision")
+        private String decision;
+
+    }
+
+}

+ 50 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/entity/response/ODR1011Response.java

@@ -0,0 +1,50 @@
+package com.jzg.quotation.dajia.api.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.dajia.api.entity.DaJiaBaseResponse;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @description: 大家财险 影像上传接口 响应参数
+ * @author: wenks
+ * @date: 2023/11/14 17:50
+ **/
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class ODR1011Response extends DaJiaBaseResponse {
+
+    private static final long serialVersionUID = 272886779414029674L;
+
+    @JsonProperty("result")
+    private ResultDTO result;
+
+    @NoArgsConstructor
+    @Data
+    public static class ResultDTO implements Serializable {
+
+        private static final long serialVersionUID = 2420666839215689701L;
+
+        @JsonProperty("status")
+        private String status;
+
+        @JsonProperty("message")
+        private String message;
+
+        @JsonProperty("result")
+        private String result;
+
+        //二维码图片信息
+        @JsonProperty("signInfoImage")
+        private String signInfoImage;
+        //url地址
+        @JsonProperty("signInfoUrl")
+        private String signInfoUrl;
+
+    }
+
+}

+ 5 - 3
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/service/DaJiaApiOrderService.java

@@ -2,6 +2,7 @@ package com.jzg.quotation.dajia.api.service;
 
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
 import com.jzg.quotation.dajia.api.entity.po.DaJiaApiOrder;
+import com.jzg.quotation.dajia.api.entity.response.NVHLODR1001Response;
 import com.jzg.quotation.dajia.api.entity.response.ODR1009Response;
 
 public interface DaJiaApiOrderService {
@@ -9,10 +10,11 @@ public interface DaJiaApiOrderService {
     /**
      * 存储订单信息
      *
-     * @param quoteVo            报价信息
-     * @param odr1009Response 报价信息
+     * @param quoteVo             报价信息
+     * @param odr1009Response     报价信息
+     * @param nvhlodr1001Response
      */
-    void saveOrderInfo(QuoteVo quoteVo, ODR1009Response odr1009Response);
+    void saveOrderInfo(QuoteVo quoteVo, ODR1009Response odr1009Response, NVHLODR1001Response nvhlodr1001Response);
 
     /**
      * 获取mongo中的订单信息

+ 11 - 7
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/service/impl/DaJiaApiOrderServiceImpl.java

@@ -1,13 +1,17 @@
 package com.jzg.quotation.dajia.api.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.jzg.quotation.commons.entity.vo.aggregated.QuoteVo;
 import com.jzg.quotation.dajia.api.entity.po.DaJiaApiOrder;
+import com.jzg.quotation.dajia.api.entity.response.NVHLODR1001Response;
 import com.jzg.quotation.dajia.api.entity.response.ODR1009Response;
 import com.jzg.quotation.dajia.api.repository.DaJiaApiOrderRepository;
 import com.jzg.quotation.dajia.api.service.DaJiaApiOrderService;
 import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Objects;
 
 @Service
 @RequiredArgsConstructor
@@ -15,15 +19,15 @@ public class DaJiaApiOrderServiceImpl implements DaJiaApiOrderService {
 
     private final DaJiaApiOrderRepository daJiaApiOrderRepository;
     @Override
-    public void saveOrderInfo(QuoteVo quoteVo, ODR1009Response odr1009Response) {
+    public void saveOrderInfo(QuoteVo quoteVo, ODR1009Response odr1009Response, NVHLODR1001Response nvhlodr1001Response) {
         // 存储信息
         DaJiaApiOrder daJiaApiOrder = new DaJiaApiOrder();
         daJiaApiOrder.setId(quoteVo.getOrder().getOrdersNo());
-//        daJiaApiOrder.setOrderNo(odr1009Response.getResult().getBasePart());
-        daJiaApiOrder.setProductsCode(quoteVo.getOrder().getProductsCode());
-        daJiaApiOrder.setInsuredIdentify(quoteVo
-                .getInsuredPersonInfo()
-                .getIdentifyNumber());
+        daJiaApiOrder.setReptxt(JSON.toJSONString(odr1009Response));
+        //驾意险信息
+        if (!Objects.isNull(nvhlodr1001Response)) {
+            daJiaApiOrder.setCrossInsurance(JSON.toJSONString(nvhlodr1001Response.getPolicyInfos()));
+        }
         daJiaApiOrderRepository.save(daJiaApiOrder);
     }
 

+ 193 - 15
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/api/service/impl/DaJiaApiRequestImpl.java

@@ -1,15 +1,22 @@
 package com.jzg.quotation.dajia.api.service.impl;
 
+import cn.hutool.core.collection.CollUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.core.JsonProcessingException;
+import com.jzg.commons.constants.dict.InsOrderStatusEnum;
+import com.jzg.commons.entity.quote.vo.AccidentalDrivingVo;
+import com.jzg.commons.entity.quote.vo.RiskInfoVo;
+import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.AssertionUtils;
 import com.jzg.commons.util.idgen.IdGenerate;
-import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.vo.aggregated.*;
 import com.jzg.quotation.commons.entity.vo.base.OrderBase;
 import com.jzg.quotation.commons.entity.vo.image.InsuranceImageVo;
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
 import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
+import com.jzg.quotation.commons.utils.DateTimeUtil;
 import com.jzg.quotation.dajia.api.build.DaJiaAPIQuoteResultsVoBuild;
 import com.jzg.quotation.dajia.api.compoment.DaJiaApiRequestComponent;
 import com.jzg.quotation.dajia.api.constant.enums.Message;
@@ -24,8 +31,12 @@ import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.List;
-import java.util.Objects;
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 @Service
 @RequiredArgsConstructor
@@ -35,6 +46,10 @@ public class DaJiaApiRequestImpl implements DaJiaApiRequest {
     private final DaJiaApiRequestComponent daJiaApiRequestComponent;
     private final DaJiaApiOrderService daJiaCrawlerOrderService;
 
+    public static final String THE_FIRST_REGEX = "终保日期(.+?);";
+
+    public static Map<Integer, String> dateFormatMap;
+
     @Override
     public QuoteResultsVo quote(QuoteVo quoteVo) throws JsonProcessingException {
         OrderBase order = quoteVo.getOrder();
@@ -69,14 +84,18 @@ public class DaJiaApiRequestImpl implements DaJiaApiRequest {
 
         // 报价
         ODR1009Response odr1009Response = quotation(orderNo, quoteVo, odr1016Response, parameters);
-        // 处理重复投保
-
-        // 处理验车码
-
-        // 处理验车码识别错误
-
-        daJiaCrawlerOrderService.saveOrderInfo(quoteVo,odr1009Response);
-        return DaJiaAPIQuoteResultsVoBuild.buildQuoteResultsVo(quoteVo,odr1009Response);
+        List<AccidentalDrivingVo> accidentalDrivings = quoteVo.getAccidentalDrivings();
+        NVHLODR1001Response nvhlodr1001Response = null;
+        if (CollUtil.isNotEmpty(accidentalDrivings)) {
+            //6.驾意险报价
+            NVHLODR1001Request nvhlodr1001Request = new NVHLODR1001Request(parameters, odr1009Response, order.getOrdersNo(), accidentalDrivings, quoteVo);
+            nvhlodr1001Response = daJiaApiRequestComponent.accidentPremiumCalculation(nvhlodr1001Request);
+            if (!"2000".equals(nvhlodr1001Response.getStatus())) {
+                throw new SystemException("驾意险报价失败");
+            }
+        }
+        daJiaCrawlerOrderService.saveOrderInfo(quoteVo,odr1009Response,nvhlodr1001Response);
+        return DaJiaAPIQuoteResultsVoBuild.buildQuoteResultsVo(quoteVo,odr1009Response,nvhlodr1001Response);
     }
 
     /**
@@ -90,12 +109,115 @@ public class DaJiaApiRequestImpl implements DaJiaApiRequest {
     private ODR1009Response quotation(String orderNo, QuoteVo quoteVo, ODR1016Response odr1016Response, DaJiaApiConfigureParameters parameters) {
         ODR1009Request odr1009Request = new ODR1009Request(orderNo, quoteVo, odr1016Response,parameters);
         ODR1009Response odr1009Response = daJiaApiRequestComponent.newPremiumXnyCalculation(odr1009Request);
+
         // 处理重复投保
+        repeatCoverhandler(odr1009Response,quoteVo,orderNo,odr1016Response,parameters);
+        return odr1009Response;
+    }
 
-        // 处理验车码
+    /**
+     * 处理重复投保
+     *
+     * @param odr1009Response
+     * @param quoteVo
+     * @param orderNo
+     * @param odr1016Response
+     */
+    private void repeatCoverhandler(ODR1009Response odr1009Response, QuoteVo quoteVo, String orderNo, ODR1016Response odr1016Response, DaJiaApiConfigureParameters parameters) {
+        if (odr1009Response.getStatus().equals(Message.M0002.getCode())) {
+            //获取重复投保信息
+            String jqAppStatusMessage = odr1009Response.getResult().getJqAppStatusMessage() == null ? "" : odr1009Response.getResult().getJqAppStatusMessage().toString();
+            String syAppStatusMessage = odr1009Response.getResult().getReInsuredInfo() == null ? "" : odr1009Response.getResult().getReInsuredInfo();
+            if (jqAppStatusMessage.contains("重复投保") || syAppStatusMessage.contains("重复投保")) {
+                //交强重复投保
+                RiskInfoVo ciRiskInfoVo = quoteVo.getCiRiskInfoVo();
+                if(Objects.nonNull(ciRiskInfoVo) && !jqAppStatusMessage.isEmpty()){
+                    String jqEndDate = getTheExpiryDate(jqAppStatusMessage, THE_FIRST_REGEX);
+                    List<String> duplicateDate = getDuplicateDate(jqEndDate);
+                    ciRiskInfoVo.setStartDate(duplicateDate.get(0));
+                    ciRiskInfoVo.setEndDate(duplicateDate.get(1));
+                }
+                //商业重复投保
+                RiskInfoVo biRiskInfoVo = quoteVo.getBiRiskInfoVo();
+                if(Objects.nonNull(biRiskInfoVo) && !syAppStatusMessage.isEmpty()){
+                    String syEndDate = getTheExpiryDate(syAppStatusMessage, THE_FIRST_REGEX);
+                    List<String> duplicateDate = getDuplicateDate(syEndDate);
+                    biRiskInfoVo.setStartDate(duplicateDate.get(0));
+                    biRiskInfoVo.setEndDate(duplicateDate.get(1));
+                }
+                ODR1009Request odr1009Request = new ODR1009Request(orderNo, quoteVo, odr1016Response,parameters);
+                odr1009Response = daJiaApiRequestComponent.newPremiumXnyCalculation(odr1009Request);
+            }
+        }
+    }
 
-        // 处理验车码识别错误
-        return odr1009Response;
+    /**
+     * 获取终保日期
+     *
+     * @param message 重复投保返回信息
+     * @param regex   正则内容
+     * @return
+     */
+    public static String getTheExpiryDate(String message, String regex) {
+        Pattern pattern = Pattern.compile(regex);
+        String replace = message.replace("\r", ";").replace("\n", ";").replace(" ", "");
+        Matcher m = pattern.matcher(replace);
+
+        boolean b = m.find();
+        if (b) {
+            try {
+                String group = m.group(1);
+                String startDate = group.replace(":", "").replace(":", "").replace("-", "").replace(" ", "");
+                String string = dateFormatMap.get(startDate.length());
+                SimpleDateFormat dateFormat = new SimpleDateFormat(string);
+                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+                Date parse = dateFormat.parse(startDate);
+
+                return simpleDateFormat.format(parse);
+
+            } catch (Exception e) {
+                throw new SystemException(message);
+            }
+        }
+        return "";
+    }
+
+
+    /**
+     * 获取重复投保时间
+     *
+     * @param newStDate
+     * @return
+     */
+    public List<String> getDuplicateDate(String newStDate) {
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+//        //处理23:59:59
+        if (newStDate.endsWith("59")) {
+            LocalDateTime time = LocalDateTime.parse(newStDate, formatter);
+            LocalDateTime timePlusOneSecond = time.plusSeconds(1);
+            newStDate = timePlusOneSecond.format(formatter);
+        }
+
+        LocalDateTime start = DateTimeUtil.parseLocalDateTime(newStDate, DateTimeUtil.DATETIME_PATTERN);
+        List<String> result = new ArrayList<>();
+        String newStartDate;
+        String newEndDate;
+        //及时起保
+        LocalDateTime end = start.plusYears(1L);
+        if (start.getHour() > 0) {
+            newStartDate = DateTimeUtil.format(start, DateTimeUtil.DATETIME_PATTERN);
+            //减去一天
+            end = end.minusDays(1L);
+            newEndDate = DateTimeUtil.format(end, DateTimeUtil.DATETIME_PATTERN);
+        } else {
+            newStartDate = DateTimeUtil.getStartTimeOfDayStr(start, DateTimeUtil.DATETIME_PATTERN);
+            //减去一天
+            end = end.minusDays(1L);
+            newEndDate = DateTimeUtil.getEndTimeOfDayStr(end, DateTimeUtil.DATETIME_PATTERN);
+        }
+        result.add(newStartDate);
+        result.add(newEndDate);
+        return result;
     }
 
     /**
@@ -134,13 +256,69 @@ public class DaJiaApiRequestImpl implements DaJiaApiRequest {
     }
 
     @Override
-    public UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) {
+    public UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) throws InterruptedException {
         OrderBase orderBase = underwritingVo.getOrder();
         DaJiaApiOrder daJiaApiOrder = daJiaCrawlerOrderService.getById(orderBase.getOrdersNo());
         // 配置信息
         DaJiaApiConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(DaJiaApiConfigureParameters.class,
                 orderBase.getAttributionInformationVo().getConfigInfo());
         UnderwritingResultsVo underwritingResultsVo = new UnderwritingResultsVo();
+        //1009返回数据
+        ODR1009Response.ResultDTO resultDTO = JSONObject.parseObject(JSON.toJSONString(daJiaApiOrder.getReptxt()), ODR1009Response.ResultDTO.class);
+        //驾意险 返回数据
+        List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS = null;
+        if (!Objects.isNull(daJiaApiOrder.getCrossInsurance())) {
+            policyInfosDTOS = JSON.parseArray(JSON.toJSONString(daJiaApiOrder.getCrossInsurance()), NVHLODR1001Response.policyInfosDTO.class);
+        }
+
+        //核保构造request
+        ODR1010Request odr1010Request = new ODR1010Request(orderBase.getCompanyOrderNo(), parameters, resultDTO,underwritingVo);
+        ODR1010Response odr1010Response = daJiaApiRequestComponent.underwriting(odr1010Request);
+        if (odr1010Response.getStatus().equals(Message.M0000.getCode())) {
+            if ("0".equals(odr1010Response.getResult().getJqAppStatus()) || "0".equals(odr1010Response.getResult().getSyAppStatus())) {
+                if ("0".equals(odr1010Response.getResult().getJqAppStatus())) {
+                    underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.AUDIT_FAIL);
+                    underwritingResultsVo.setUnderwritingResult("自核失败,原因:" + odr1010Response.getResult().getJqAppStatusMessage());
+                } else {
+                    underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.AUDIT_FAIL);
+                    underwritingResultsVo.setUnderwritingResult("自核失败,原因:" + odr1010Response.getResult().getSyAppStatusMessage());
+                }
+            }
+
+            if ("1".equals(odr1010Response.getResult().getJqAppStatus()) || "1".equals(odr1010Response.getResult().getSyAppStatus())) {
+                String message = "";
+                String jqAppStatusMessage = odr1010Response.getResult().getJqAppStatusMessage();
+                String syAppStatusMessage = odr1010Response.getResult().getSyAppStatusMessage();
+                message = message + jqAppStatusMessage;
+                message = message + syAppStatusMessage;
+                underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.STAFF_PROCESS);
+                underwritingResultsVo.setUnderwritingResult("自核转人工,原因:" + message);
+            }
+
+            //核保成功  获取支付二维码
+            //延迟3秒 等待生成
+            ODR1011Request odr1011Request = new ODR1011Request(orderBase.getCompanyOrderNo(), parameters, policyInfosDTOS);
+            ODR1011Response payNo = null;
+            boolean flag = true;
+            Integer frequencyControl = 0;
+            while (flag) {
+                payNo = daJiaApiRequestComponent.getPayNo(odr1011Request);
+                if ("0000".equals(payNo.getStatus())) {
+                    flag = false;
+                }
+                frequencyControl += 1;
+                if (frequencyControl > 20) {
+                    throw new RuntimeException("获取支付二维码失败");
+                }
+                Thread.sleep(500);
+            }
+
+            if (payNo.getStatus().equals(Message.M0000.getCode())) {
+                underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.PAY_PENDING);
+                // 获取支付链接
+                underwritingResultsVo.setPaymentLink(payNo.getResult().getSignInfoUrl());
+            }
+        }
         return underwritingResultsVo;
     }