Parcourir la source

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

wks il y a 2 ans
Parent
commit
2a54899159
30 fichiers modifiés avec 1967 ajouts et 97 suppressions
  1. 1 1
      src/main/java/com/ydtech/modules/fnc/controller/CarSettleController.java
  2. 19 0
      src/main/java/com/ydtech/modules/order/components/dajia/DaJiaRequestApiComponents.java
  3. 7 0
      src/main/java/com/ydtech/modules/order/controller/DaJiaOrderController.java
  4. 15 0
      src/main/java/com/ydtech/modules/order/dao/InsAccidentalDrivingDaJiaMapper.java
  5. 15 0
      src/main/java/com/ydtech/modules/order/dao/InsAccidentalDrivingSubDaJiaMapper.java
  6. 2 0
      src/main/java/com/ydtech/modules/order/entity/api/dajia/DaJiaConfigureParameters.java
  7. 3 1
      src/main/java/com/ydtech/modules/order/entity/api/dajia/constants/ServiceCode.java
  8. 3 1
      src/main/java/com/ydtech/modules/order/entity/api/dajia/constants/TradeCode.java
  9. 1189 0
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/NVHLODR1001Request.java
  10. 51 0
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/NVHLODR2007Request.java
  11. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1007Request.java
  12. 49 10
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1008Request.java
  13. 45 11
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1009Request.java
  14. 6 4
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1010Request.java
  15. 11 2
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1011Request.java
  16. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1012Request.java
  17. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1013Request.java
  18. 1 2
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR2009Request.java
  19. 3 2
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR2010Request.java
  20. 3 2
      src/main/java/com/ydtech/modules/order/entity/api/dajia/request/VHLINS2005Request.java
  21. 134 0
      src/main/java/com/ydtech/modules/order/entity/api/dajia/response/NVHLODR1001Response.java
  22. 84 0
      src/main/java/com/ydtech/modules/order/entity/api/dajia/response/NVHLODR2007Response.java
  23. 43 0
      src/main/java/com/ydtech/modules/order/entity/vo/dajia/InsAccidentalDrivingDajia.java
  24. 36 0
      src/main/java/com/ydtech/modules/order/entity/vo/dajia/InsAccidentalDrivingSubDajia.java
  25. 7 0
      src/main/java/com/ydtech/modules/order/service/DaJiaOrderService.java
  26. 14 0
      src/main/java/com/ydtech/modules/order/service/InsAccidentalDrivingDaJiaService.java
  27. 16 0
      src/main/java/com/ydtech/modules/order/service/InsAccidentalDrivingSubDaJiaService.java
  28. 150 58
      src/main/java/com/ydtech/modules/order/service/impl/DaJiaOrderServiceImpl.java
  29. 25 0
      src/main/java/com/ydtech/modules/order/service/impl/InsAccidentalDrivingDaJiaServiceImpl.java
  30. 32 0
      src/main/java/com/ydtech/modules/order/service/impl/InsAccidentalDrivingSubDaJiaServiceImpl.java

+ 1 - 1
src/main/java/com/ydtech/modules/fnc/controller/CarSettleController.java

@@ -77,7 +77,7 @@ public class CarSettleController extends BaseController {
                 .eq(StringUtils.isNotEmpty(orderNo),"orderno",orderNo)
                 .eq("orderstatus","3").list();//3已承保
         if(areaList!=null && areaList.size()>0){
-            return insOrdersService.getByCompanyId(areaList.get(0).getInsOrderNo());
+            return insOrdersService.getByCompanyId(areaList.get(0).getId());
         }else{
             return HttpResult.error("订单号有误-未承保");
         }

+ 19 - 0
src/main/java/com/ydtech/modules/order/components/dajia/DaJiaRequestApiComponents.java

@@ -177,4 +177,23 @@ public class DaJiaRequestApiComponents {
         return post(vhlins2005Request, DJ_TQBD_200000, VHLINS2005Response.class);
     }
 
+    /**
+     * 非车险核保接口
+     * @param nvhlodr1001Request
+     * @return
+     * @throws Exception
+     */
+    public NVHLODR1001Response accidentPremiumCalculation(NVHLODR1001Request nvhlodr1001Request) throws Exception {
+        return post(nvhlodr1001Request, DJ_TQBD_100100, NVHLODR1001Response.class);
+    }
+
+    /**
+     * 非车查询保单接口
+     * @param nvhlodr2007Request
+     * @return
+     * @throws Exception
+     */
+    public NVHLODR2007Response accidentPremiumWarranty(NVHLODR2007Request nvhlodr2007Request) throws Exception {
+        return post(nvhlodr2007Request,DJ_TQBD_200007,NVHLODR2007Response.class);
+    }
 }

+ 7 - 0
src/main/java/com/ydtech/modules/order/controller/DaJiaOrderController.java

@@ -6,6 +6,7 @@ import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
+import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
@@ -60,4 +61,10 @@ public class DaJiaOrderController {
     public HttpResult<Object> obtainWarranty(@RequestBody PolicyPrintVo policyPrintVo) {
         return this.daJiaOrderService.obtainWarranty(policyPrintVo);
     }
+
+    @PostMapping(value = "/accidentalDrivingList")
+    @ApiOperation(value = "驾意险列表")
+    public HttpResult<Object> accidentalDrivingList() {
+        return this.daJiaOrderService.accidentalDrivingList();
+    }
 }

+ 15 - 0
src/main/java/com/ydtech/modules/order/dao/InsAccidentalDrivingDaJiaMapper.java

@@ -0,0 +1,15 @@
+package com.ydtech.modules.order.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ydtech.modules.order.entity.InsAccidentalDriving;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingDajia;
+
+/**
+ * @author Administrator
+ * @description 针对表【ins_accidental_driving(驾意险)】的数据库操作Mapper
+ * @createDate 2023-03-09 14:45:58
+ * @Entity generator.domain.InsAccidentalDriving
+ */
+public interface InsAccidentalDrivingDaJiaMapper extends BaseMapper<InsAccidentalDrivingDajia> {
+
+}

+ 15 - 0
src/main/java/com/ydtech/modules/order/dao/InsAccidentalDrivingSubDaJiaMapper.java

@@ -0,0 +1,15 @@
+package com.ydtech.modules.order.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingDajia;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingSubDajia;
+
+/**
+ * @author Administrator
+ * @description 针对表【ins_accidental_driving(驾意险)】的数据库操作Mapper
+ * @createDate 2023-03-09 14:45:58
+ * @Entity generator.domain.InsAccidentalDriving
+ */
+public interface InsAccidentalDrivingSubDaJiaMapper extends BaseMapper<InsAccidentalDrivingSubDajia> {
+
+}

+ 2 - 0
src/main/java/com/ydtech/modules/order/entity/api/dajia/DaJiaConfigureParameters.java

@@ -42,4 +42,6 @@ public class DaJiaConfigureParameters implements ConfigureParameters {
     private String channel;
     @JsonProperty("RecommendedSubChannels")
     private String recommendedSubChannels;
+    @JsonProperty("ChannelCode")
+    private String channelCode;
 }

+ 3 - 1
src/main/java/com/ydtech/modules/order/entity/api/dajia/constants/ServiceCode.java

@@ -39,7 +39,9 @@ public enum ServiceCode {
     ODR1009("ODR1009"	,"保费计算接口"),
     ODR1008("ODR1008"	,"车辆和客户信息确认接口"),
     ODR1007("ODR1007"	,"获取业务订单号接口"),
-    VHL_INS2005("VHL-INS2005"	,"电子保单下载接口");
+    VHL_INS2005("VHL-INS2005"	,"电子保单下载接口"),
+    NVHLODR1001V01("NVHL-ODR1001V01","驾意险接口"),
+    NVHLODR2007("NVHL-ODR2007V01","驾意险保单查询接口");
 
     private final String code;
 

+ 3 - 1
src/main/java/com/ydtech/modules/order/entity/api/dajia/constants/TradeCode.java

@@ -36,7 +36,9 @@ public enum TradeCode {
     DJ_TQBD_100009("DJ_TQBD_100009", "保费计算接口"),
     DJ_TQBD_100008("DJ_TQBD_100008", "车辆和客户信息确认接口"),
     DJ_TQBD_100007("DJ_TQBD_100007", "获取业务订单号接口"),
-    DJ_TQBD_200000("DJ_TQBD_200000", "电子保单下载接口");
+    DJ_TQBD_200000("DJ_TQBD_200000", "电子保单下载接口"),
+    DJ_TQBD_100100("DJ_TQB_NDR1001", "驾意险接口"),
+    DJ_TQBD_200007("DJ_TQB_NDR2007","驾意险保单查询接口");
 
     private final String code;
 

+ 1189 - 0
src/main/java/com/ydtech/modules/order/entity/api/dajia/request/NVHLODR1001Request.java

@@ -0,0 +1,1189 @@
+package com.ydtech.modules.order.entity.api.dajia.request;
+
+import cn.hutool.core.util.IdcardUtil;
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.admin.model.vo.PersonAreaVo;
+import com.ydtech.modules.ins.model.vo.RiskInfoVo;
+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.CVhlTyp;
+import com.ydtech.modules.order.entity.api.dajia.constants.ServiceCode;
+import com.ydtech.modules.order.entity.api.dajia.response.ODR1009Response;
+import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
+import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
+import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingDajia;
+import com.ydtech.utils.idgen.IdGenerate;
+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(DaJiaConfigureParameters dajiaConfigureParameters, ODR1009Response odr1009Response, BaseQuoteInfoVo baseQuoteInfoVo, InsAccidentalDrivingDajia insAccidentalDrivingDajia, String quantity, PersonAreaVo policyHolderPersonArea,PersonAreaVo insuredPersonArea) {
+        super(dajiaConfigureParameters.getChannelCode(), ServiceCode.NVHLODR1001V01.getCode());
+        if(Objects.isNull(body)){
+            body = new BodyDTO();
+        }
+        //第三方订单号
+        body.setBookingNo(IdGenerate.nextId());
+        //交强险投保单号
+        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(insAccidentalDrivingDajia,baseQuoteInfoVo.getRiskList().get(0),quantity);
+        //设置投保人信息
+        policyInfos.applicant = setApplicant(baseQuoteInfoVo,policyHolderPersonArea);
+        //设置被保人信息
+        policyInfos.insured = setInsured(baseQuoteInfoVo,insuredPersonArea);
+        //设置业务数据
+        policyInfos.businessInfo = setBusinessInfo(dajiaConfigureParameters);
+
+        policyInfos.prodBaseInfo = setProdBaseInfo(insAccidentalDrivingDajia);
+
+        policyInfos._0684_tgt = setTag0684(baseQuoteInfoVo);
+
+        policyInfos._0684_tgtList_1 = setTag0684List(baseQuoteInfoVo);
+
+        policyInfos.prodCvrgList = setProdCvrgList(insAccidentalDrivingDajia);
+        body.policyInfos.add(policyInfos);
+
+    }
+
+    //设置投保信息
+    public baseDTO setBase(InsAccidentalDrivingDajia insAccidentalDrivingDajia, RiskInfoVo riskInfoVo, String quantity){
+
+        baseDTO base = new baseDTO();
+        //商品编码
+        base.setGoodsCode(insAccidentalDrivingDajia.getCommodityCode());
+        //方案编码
+        base.setSchemeCode(insAccidentalDrivingDajia.getPlanCode());
+        //投保分数
+        base.setCopies(String.valueOf(quantity));
+        //单份方案保费
+        base.setPerPrm(insAccidentalDrivingDajia.getPrice().toString());
+        //总保费
+        base.setSumPrm(insAccidentalDrivingDajia.getPrice().toString());
+        //投保日期
+        base.setAppTm(riskInfoVo.getStartDate());
+        //保险起期
+        base.setEffectiveDate(riskInfoVo.getStartDate());
+        //保险止期
+        base.setExpireDate(riskInfoVo.getEndDate());
+        //是否及时起保
+        base.setIsImmeffMrk("1");
+        //是否团单
+        base.setIsGrpMrk("0");
+        //被保险人数
+        base.setInsuredNum("1");
+        return base;
+    }
+
+    //设置投保人信息
+    public applicantDTO setApplicant(BaseQuoteInfoVo quoteInfoVo,PersonAreaVo personAreaVo){
+        applicantDTO applicantDTO = new applicantDTO();
+        //投保人名称
+        applicantDTO.setAppName(quoteInfoVo.getPolicyHolderInfo().getName());
+        //证件号码
+        applicantDTO.setAppCertfCde(quoteInfoVo.getPolicyHolderInfo().getIdentifyNumber());
+        //证件类型
+        applicantDTO.setAppCertfCls("01");
+        //客户分类/投保人性质  1 个人
+        applicantDTO.setAppClntMrk("1");
+        //省份
+        applicantDTO.setAppProvince(personAreaVo.getProvinceCode().toString());
+        //市
+        applicantDTO.setAppCity(personAreaVo.getCityCode().toString());
+        //县
+        applicantDTO.setAppCounty(personAreaVo.getCountyCode().toString());
+        //街道
+        applicantDTO.setAppStreet(quoteInfoVo.getPolicyHolderInfo().getAddr());
+        //地址
+        applicantDTO.setAppClntAddr(quoteInfoVo.getPolicyHolderInfo().getAddr());
+        //手机
+        applicantDTO.setAppMobile(quoteInfoVo.getPolicyHolderInfo().getMobile());
+        //年龄
+        applicantDTO.setAppAge(quoteInfoVo.getPolicyHolderInfo().getAge());
+        //性别
+        applicantDTO.setAppSex(String.valueOf(IdcardUtil.getGenderByIdCard(quoteInfoVo.getPolicyHolderInfo().getIdentifyNumber())));
+        //出生日期
+        applicantDTO.setAppBirthday(IdcardUtil.getBirthByIdCard(quoteInfoVo.getInsuredPersonInfo().getIdentifyNumber()));
+        //证件是否长期有效
+        applicantDTO.setAppExpiredFlag("0");
+        //证件有效起期
+        applicantDTO.setAppEffectiveDate(quoteInfoVo.getPolicyHolderInfo().getIdentifyValidDate());
+        //证件有效止期
+        applicantDTO.setAppExpiredDate(quoteInfoVo.getPolicyHolderInfo().getIdentifyValidEndDate());
+        return applicantDTO;
+    }
+
+    //设置被保人信息
+    public insuredDTO setInsured(BaseQuoteInfoVo quoteInfoVo,PersonAreaVo personAreaVo){
+        insuredDTO insuredDTO = new insuredDTO();
+        //被保人名称
+        insuredDTO.setInsName(quoteInfoVo.getInsuredPersonInfo().getName());
+        //证件号码
+        insuredDTO.setInsCertfCde(quoteInfoVo.getInsuredPersonInfo().getIdentifyNumber());
+        //证件类型
+        insuredDTO.setInsCertfCls("01");
+        //客户分类/投保人性质  1 个人
+        insuredDTO.setInsClntMrk("1");
+        //省份
+        insuredDTO.setInsProvince(personAreaVo.getProvinceCode().toString());
+        //市
+        insuredDTO.setInsCity(personAreaVo.getCityCode().toString());
+        //县
+        insuredDTO.setInsCounty(personAreaVo.getCountyCode().toString());
+        //街道
+        insuredDTO.setInsStreet(quoteInfoVo.getInsuredPersonInfo().getAddr());
+        //地址
+        insuredDTO.setInsClntAddr(quoteInfoVo.getInsuredPersonInfo().getAddr());
+        //手机
+        insuredDTO.setInsMobile(quoteInfoVo.getInsuredPersonInfo().getMobile());
+        //性别
+        insuredDTO.setInsSex(String.valueOf(IdcardUtil.getGenderByIdCard(quoteInfoVo.getInsuredPersonInfo().getIdentifyNumber())));
+        //年龄
+        insuredDTO.setInsAge(quoteInfoVo.getInsuredPersonInfo().getAge());
+        //出生日期
+        insuredDTO.setInsBirthday(IdcardUtil.getBirthByIdCard(quoteInfoVo.getInsuredPersonInfo().getIdentifyNumber()));
+        //证件是否长期有效
+        insuredDTO.setInsExpiredFlag("0");
+        //证件有效起期
+        insuredDTO.setInsEffectiveDate(quoteInfoVo.getInsuredPersonInfo().getIdentifyValidDate());
+
+        insuredDTO.setInsExpiredDate(quoteInfoVo.getInsuredPersonInfo().getIdentifyValidEndDate());
+        return insuredDTO;
+    }
+
+    //设置业务数据
+    public businessDTO setBusinessInfo(DaJiaConfigureParameters 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(InsAccidentalDrivingDajia insAccidentalDrivingDajia){
+        List<prodBaseInfoDTO> prodBaseInfoDTOList = new ArrayList<>();
+        prodBaseInfoDTO prodBaseInfoDTO = new prodBaseInfoDTO();
+        prodBaseInfoDTO.setProdNo(insAccidentalDrivingDajia.getProductCode());
+        prodBaseInfoDTO.setFeeGeneType("1");
+        prodBaseInfoDTOList.add(prodBaseInfoDTO);
+        return prodBaseInfoDTOList;
+    }
+
+    public tag0684DTO setTag0684(BaseQuoteInfoVo baseQuoteInfoVo){
+        tag0684DTO tag0684 = new tag0684DTO();
+        if("01".equals(baseQuoteInfoVo.getCarInfo().getCarnature())) {
+            tag0684.cTgtTxtFld1 = "05";
+        }else if("02".equals(baseQuoteInfoVo.getCarInfo().getCarnature())){
+            tag0684.cTgtTxtFld1 = "00";
+        }
+        if(Integer.parseInt(baseQuoteInfoVo.getCarInfo().getSeatCount()) < 6){
+            tag0684.cTgtTxtFld4 = "0000";
+        }else if(Integer.parseInt(baseQuoteInfoVo.getCarInfo().getSeatCount()) >= 6 && Integer.parseInt(baseQuoteInfoVo.getCarInfo().getSeatCount()) <=7){
+            tag0684.cTgtTxtFld4 = "0001";
+        }else {
+            tag0684.cTgtTxtFld4 = "0002";
+        }
+        return tag0684;
+    }
+
+    public List<tag0684ListDTO> setTag0684List(BaseQuoteInfoVo baseQuoteInfoVo){
+        List<tag0684ListDTO> tag0684ListDTOS = new ArrayList<>();
+        tag0684ListDTO tag0684 = new tag0684ListDTO();
+        //序列号
+        tag0684.nSeqNo = "1";
+        //车牌号
+        tag0684.cResevFld1 = baseQuoteInfoVo.getCarInfo().getLicenseNo();
+        //厂牌型号
+        tag0684.cResevFld2 = baseQuoteInfoVo.getCarInfo().getBrandName();
+        //发动机号
+        tag0684.cResevFld3 = baseQuoteInfoVo.getCarInfo().getEngineNo();
+        //车架号
+        tag0684.cResevFld4 = baseQuoteInfoVo.getCarInfo().getFrameNo();
+        //座位数
+        tag0684.cResevFld5 = baseQuoteInfoVo.getCarInfo().getSeatCount();
+        if("01".equals(baseQuoteInfoVo.getCarInfo().getCarnature())) {
+            tag0684.cResevFld6 = "01";
+        }else{
+            tag0684.cResevFld6 = "02";
+        }
+        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;
+
+    }
+}

+ 51 - 0
src/main/java/com/ydtech/modules/order/entity/api/dajia/request/NVHLODR2007Request.java

@@ -0,0 +1,51 @@
+package com.ydtech.modules.order.entity.api.dajia.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+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.vo.BaseQuoteInfoVo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Objects;
+
+
+/**
+ * @description: 大家财险 驾意险保单查询 请求参数
+ * @author: wenks
+ * @date: 2023/11/14 16:28
+ **/
+@EqualsAndHashCode(callSuper = true)
+//@NoArgsConstructor
+@Data
+public class NVHLODR2007Request extends DaJiaBaseRequest{
+
+
+    private static final long serialVersionUID = 243809151769159227L;
+
+    @JsonProperty("body")
+    private BodyDTO body;
+
+    @NoArgsConstructor
+    @Data
+    public static class BodyDTO implements Serializable {
+        //投保单号
+        @JsonProperty("appNo")
+        private String appNo;
+
+    }
+
+    public NVHLODR2007Request(String appNo,DaJiaConfigureParameters daJiaConfigureParameters) {
+        super(daJiaConfigureParameters.getChannelCode(), ServiceCode.NVHLODR2007.getCode());
+        if(Objects.isNull(this.body)){
+            this.body = new BodyDTO();
+        }
+        //订单号
+        this.body.appNo = appNo;
+
+    }
+}

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1007Request.java

@@ -71,7 +71,7 @@ public class ODR1007Request extends DaJiaBaseRequest {
     }
 
     public ODR1007Request(DaJiaConfigureParameters daJiaConfigureParameters){
-        super("TQBD", ServiceCode.ODR1007.getCode());
+        super(daJiaConfigureParameters.getChannelCode(), ServiceCode.ODR1007.getCode());
         BodyDTO bodyDTO = new BodyDTO();
         BodyDTO.BusinessInfoDTO businessInfoDTO = new BodyDTO.BusinessInfoDTO();
         businessInfoDTO.setBusiOpdpt(daJiaConfigureParameters.getLoginInstitution());

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

@@ -1,7 +1,9 @@
 package com.ydtech.modules.order.entity.api.dajia.request;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.constants.enums.InsuranceRisk;
 import com.ydtech.modules.admin.model.vo.PersonAreaVo;
+import com.ydtech.modules.ins.model.vo.RiskInfoVo;
 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.*;
@@ -12,6 +14,7 @@ import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
 import java.io.Serializable;
+import java.util.List;
 import java.util.Objects;
 
 import static com.ydtech.modules.order.entity.api.dajia.constants.CInspectRec.INSREC1;
@@ -402,7 +405,7 @@ public class ODR1008Request extends DaJiaBaseRequest {
     }
 
     public ODR1008Request(String orderNo, String busiId, BaseQuoteInfoVo quoteInfoVo, DaJiaConfigureParameters daJiaConfigureParameters, ODR2009Response odr2009Response, PersonAreaVo policyHolderPersonArea,PersonAreaVo insuredPersonArea){
-        super("TQBD", ServiceCode.ODR1008.getCode());
+        super(daJiaConfigureParameters.getChannelCode(), ServiceCode.ODR1008.getCode());
         if(Objects.isNull(body))
         {
             this.body = new BodyDTO();
@@ -567,7 +570,14 @@ public class ODR1008Request extends DaJiaBaseRequest {
         //设置车架号
         vehicleInfoDTO.setVehicleFrmNo(quoteInfoVo.getCarInfo().getFrameNo());
         //是否是过户车
-        vehicleInfoDTO.setVehicleChgOwnerFlag(0);
+        if(quoteInfoVo.getCarInfo().isTransferFlag()){
+            //过户
+            vehicleInfoDTO.setVehicleChgOwnerFlag(1);
+            vehicleInfoDTO.setVehicleTTransferDate(quoteInfoVo.getCarInfo().getTransferDate());
+        }else{
+            //没有过户
+            vehicleInfoDTO.setVehicleChgOwnerFlag(0);
+        }
         //初登日期
         vehicleInfoDTO.setVehicleFstRegYmBar(quoteInfoVo.getCarInfo().getRegisterDate());
         //能源类型
@@ -577,19 +587,48 @@ public class ODR1008Request extends DaJiaBaseRequest {
         //交强险特殊车标志
 
         //使用性质
+        List<RiskInfoVo> riskList = quoteInfoVo.getRiskList();
         if(quoteInfoVo.getCarInfo().getCarnature().equals("01")) {
-            vehicleInfoDTO.setVehicleUsageCde(CUsageCde.U07.getCode().toString());
-            vehicleInfoDTO.setVehicleTraUsageCde(CUsageCde.U07.getCode());
+            //运营性质
+            if(riskList.size() > 1){
+                //交商联合
+                vehicleInfoDTO.setVehicleUsageCde(CUsageCde.U07.getCode().toString());
+                vehicleInfoDTO.setVehicleTraUsageCde(CUsageCde.U07.getCode());
+            }else if(riskList.size() == 1) {
+                if (riskList.get(0).getRiskCode().equals(InsuranceRisk.BUSINESS_CODE)) {
+                    //单商业
+                    vehicleInfoDTO.setVehicleUsageCde(CUsageCde.U07.getCode().toString());
+                    vehicleInfoDTO.setVehicleTraUsageCde(CUsageCde.U07.getCode());
+                } else {
+                    // 单交强
+                    vehicleInfoDTO.setVehicleUsageCde(CUsageCdeJq.UJQ364003001.getCode().toString());
+                    vehicleInfoDTO.setVehicleTraUsageCde(CUsageCdeJq.UJQ364003001.getCode());
+                }
+            }
         }else{
-            vehicleInfoDTO.setVehicleUsageCde(CUsageCde.U01.getCode().toString());
-            vehicleInfoDTO.setVehicleTraUsageCde(CUsageCde.U01.getCode());
+            //非运营性质
+            if(riskList.size() > 1){
+                //交商联合
+                vehicleInfoDTO.setVehicleUsageCde(CUsageCde.U01.getCode().toString());
+                vehicleInfoDTO.setVehicleTraUsageCde(CUsageCde.U01.getCode());
+            }else if(riskList.size() == 1) {
+                if (riskList.get(0).getRiskCode().equals(InsuranceRisk.BUSINESS_CODE)) {
+                    //单商业
+                    vehicleInfoDTO.setVehicleUsageCde(CUsageCde.U01.getCode().toString());
+                    vehicleInfoDTO.setVehicleTraUsageCde(CUsageCde.U01.getCode());
+                } else {
+                    // 单交强
+                    vehicleInfoDTO.setVehicleUsageCde(CUsageCdeJq.UJQ364001001.getCode().toString());
+                    vehicleInfoDTO.setVehicleTraUsageCde(CUsageCdeJq.UJQ364001001.getCode());
+                }
+            }
         }
 
         //特殊风险标识
 
         //是否上牌
-        if(quoteInfoVo.getCarInfo().isNoLicenseFlag()) {
-            //是否是新车
+        if(!quoteInfoVo.getCarInfo().isNoLicenseFlag()) {
+            //上牌
             vehicleInfoDTO.setVehicleNewPlate(0);
             vehicleInfoDTO.setVehicleNewMrk(0);
             //车牌号
@@ -597,7 +636,7 @@ public class ODR1008Request extends DaJiaBaseRequest {
             //车牌种类
             vehicleInfoDTO.setVehiclePlateTyp("02");
         }else{
-            //是否是新车
+            //新车
             vehicleInfoDTO.setVehicleNewPlate(1);
             vehicleInfoDTO.setVehicleNewMrk(1);
         }
@@ -673,7 +712,7 @@ public class ODR1008Request extends DaJiaBaseRequest {
         //设置一级来源
         businessInfoDTO.setBusiDataSrc("G");
         //设置二级来源
-        businessInfoDTO.setBusiDataFlag("TQDL");
+        businessInfoDTO.setBusiDataFlag("TQBD");
 
         this.body.setBusinessInfo(businessInfoDTO);
     }

+ 45 - 11
src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1009Request.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.order.entity.api.dajia.request;
 
 import cn.hutool.core.date.DateTime;
+import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ydtech.constants.enums.InsurKind;
 import com.ydtech.constants.enums.InsuranceRisk;
@@ -8,10 +9,14 @@ import com.ydtech.modules.ins.model.vo.KindInfoVo;
 import com.ydtech.modules.ins.model.vo.QuoteInfoVo;
 import com.ydtech.modules.ins.model.vo.RiskInfoVo;
 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.*;
 import com.ydtech.modules.order.entity.api.dajia.response.ODR1009Response;
 import com.ydtech.modules.order.entity.api.dajia.response.ODR1016Response;
+import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingDajia;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingSubDajia;
 import com.ydtech.utils.DateTimeUtil;
 import com.ydtech.utils.DateTimeUtils;
 import com.ydtech.utils.idgen.IdGenerate;
@@ -45,8 +50,8 @@ public class ODR1009Request extends DaJiaBaseRequest {
     @JsonProperty("body")
     private BodyDTO body;
 
-    public ODR1009Request(String orderNo, List<KindInfoVo> kindInfoVos, List<RiskInfoVo> riskInfoVos, BaseQuoteInfoVo quoteInfoVo, ODR1016Response odr1016Response,boolean isEnergy) {
-        super("TQBD", ServiceCode.ODR1009.getCode());
+    public ODR1009Request(String orderNo, List<KindInfoVo> kindInfoVos, List<RiskInfoVo> riskInfoVos, BaseQuoteInfoVo quoteInfoVo, ODR1016Response odr1016Response, InsAccidentalDrivingDajia insAccidentalDrivingDajia, List<InsAccidentalDrivingSubDajia> insAccidentalDrivingSubDajias,DaJiaConfigureParameters daJiaConfigureParameters, boolean isEnergy) {
+        super(daJiaConfigureParameters.getChannelCode(), ServiceCode.ODR1009.getCode());
         if(Objects.isNull(body)){
             body = new BodyDTO();
         }
@@ -74,8 +79,11 @@ public class ODR1009Request extends DaJiaBaseRequest {
         setInspectionInfo();
         //设置特殊属性
         setSpecialInfo(riskInfoVos);
-//        this.body.setVehicleInfo(new BodyDTO.vehicleInfoDTO());
-//        this.body.setNvhPolicyList(new BodyDTO.nvhPolicyListDTO());
+
+        //非车险
+        if(!Objects.isNull(insAccidentalDrivingDajia)) {
+            body.nvhPolicyList = setNvhPolicyList(insAccidentalDrivingDajia, insAccidentalDrivingSubDajias,riskInfoVos);
+        }
 
     }
 
@@ -83,7 +91,7 @@ public class ODR1009Request extends DaJiaBaseRequest {
     public void setBasePartReq(List<RiskInfoVo> riskInfoVos, BaseQuoteInfoVo quoteInfoVo, ODR1016Response odr1016Response){
         BodyDTO.basePartReqDTO basePartReqDTO = new BodyDTO.basePartReqDTO();
         riskInfoVos.forEach(risk->{
-            if("0507".equals(risk.getRiskCode())) {
+            if(InsuranceRisk.TRAFFIC.getCode().equals(risk.getRiskCode())) {
                 //交强险保险起期
                 basePartReqDTO.setJqEffectiveDate(risk.getStartDate());
                 //交强险保险止期
@@ -93,7 +101,7 @@ public class ODR1009Request extends DaJiaBaseRequest {
                 //交强险产品编码
                 basePartReqDTO.setJqProdNo(CProdNo.JQ.getCode());
             }
-            if("0510".equals(risk.getRiskCode())){
+            if(InsuranceRisk.BUSINESS.getCode().equals(risk.getRiskCode())){
                 //商业险保险起期
                 basePartReqDTO.setSyEffectiveDate(risk.getStartDate());
                 //商业险保险止期
@@ -109,7 +117,7 @@ public class ODR1009Request extends DaJiaBaseRequest {
 
 
         //期望折扣
-        basePartReqDTO.setSyExpectedFloatingRate("1.5");
+//        basePartReqDTO.setSyExpectedFloatingRate("1.5");
         //收费方式
         basePartReqDTO.setFinType("10");//默认是10  二维码收款
         //协商实际价值
@@ -124,7 +132,7 @@ public class ODR1009Request extends DaJiaBaseRequest {
         vehicleTaxationDTO.setTaxPaytaxTyp(T5002.getCode());
 
         riskInfoVos.forEach(risk->{
-            if("0507".equals(risk.getRiskCode())) {
+            if(InsuranceRisk.TRAFFIC.getCode().equals(risk.getRiskCode())) {
                 //交强险保险起期
                 vehicleTaxationDTO.setTaxEffBgnTm(risk.getStartDate());
                 //交强险保险止期
@@ -147,10 +155,9 @@ public class ODR1009Request extends DaJiaBaseRequest {
                 specialInfoDTO.setVehicleUsageCde(CUsageCde.U03.getCode().toString());
             } else {
                 // 单交强
-                specialInfoDTO.setVehicleUsageCde(CUsageCdeJq.UJQ364002001.getCode().toString());
+                specialInfoDTO.setVehicleUsageCde(CUsageCdeJq.UJQ364001001.getCode().toString());
             }
         }
-//        specialInfoDTO.setBusiServiceCode("1958202300001A");
         this.body.specialInfo = specialInfoDTO;
     }
     private CIndemLmtLvl getCPayTaxType(KindInfoVo kindInfoVo){
@@ -311,6 +318,33 @@ public class ODR1009Request extends DaJiaBaseRequest {
 //        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() * insAccidentalDrivingDajia.getQuantity() + "");
+            nvhPolicyListDTOS.add(nvhPolicyListDTO);
+        });
+        return nvhPolicyListDTOS;
+    }
+
     @NoArgsConstructor
     @Data
     public static class BodyDTO implements Serializable {
@@ -339,7 +373,7 @@ public class ODR1009Request extends DaJiaBaseRequest {
 
         //商业平台车型信息
         @JsonProperty("nvhPolicyList")
-        private nvhPolicyListDTO nvhPolicyList;
+        private List<nvhPolicyListDTO> nvhPolicyList;
 
         //验车情况
         @JsonProperty("inspectionInfo")

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

@@ -7,6 +7,7 @@ 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.CChannelSrc;
 import com.ydtech.modules.order.entity.api.dajia.constants.ServiceCode;
+import com.ydtech.modules.order.entity.api.dajia.response.NVHLODR1001Response;
 import com.ydtech.modules.order.entity.api.dajia.response.ODR1009Response;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import lombok.Data;
@@ -34,8 +35,9 @@ public class ODR1010Request extends DaJiaBaseRequest {
     @JsonProperty("body")
     private BodyDTO body;
 
-    public ODR1010Request(String orderNo, String busiId, DaJiaConfigureParameters daJiaConfigureParameters, ODR1009Response.ResultDTO odr1009Response, InsOrders insOrders) {
-        super("TQBD", ServiceCode.ODR1010.getCode());
+    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();
         }
@@ -203,7 +205,7 @@ public class ODR1010Request extends DaJiaBaseRequest {
         //设置一级来源
         body.businessInfo.setBusiDataSrc("G");
         //设置二级来源
-        body.businessInfo.setBusiDataFlag("TQDL");
+        body.businessInfo.setBusiDataFlag("TQBD");
     }
 
     //交强特约信息
@@ -228,7 +230,7 @@ public class ODR1010Request extends DaJiaBaseRequest {
             body.checkInfo = new BodyDTO.CheckInfoDTO();
         }
         //车牌号
-        if(insOrders.getCarinfo().getBoolean("noLicenseFlag")){
+        if(!insOrders.getCarinfo().getBoolean("noLicenseFlag")){
             body.checkInfo.setVehiclePlateNo(insOrders.getLicenseno());
         }
 

+ 11 - 2
src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1011Request.java

@@ -4,11 +4,14 @@ import com.fasterxml.jackson.annotation.JsonProperty;
 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;
 
 
 /**
@@ -28,13 +31,16 @@ public class ODR1011Request extends DaJiaBaseRequest {
     @JsonProperty("body")
     private BodyDTO body;
 
-    public ODR1011Request(String orderNo, DaJiaConfigureParameters daJiaConfigureParameters) {
-        super("TQBD", ServiceCode.ODR1014.getCode());
+    public ODR1011Request(String orderNo, DaJiaConfigureParameters daJiaConfigureParameters, List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS) {
+        super(daJiaConfigureParameters.getChannelCode(), ServiceCode.ODR1014.getCode());
         if(body == null){
             body = new BodyDTO();
         }
         body.setOrderNo(orderNo);
         body.setOperCde(daJiaConfigureParameters.getOperatorCode());
+        if(!Objects.isNull(policyInfosDTOS)){
+            body.setNoVhlAppNo(policyInfosDTOS.get(0).getAppNo());
+        }
     }
 
     @NoArgsConstructor
@@ -49,5 +55,8 @@ public class ODR1011Request extends DaJiaBaseRequest {
         @JsonProperty("orderNo")
         private String orderNo;
 
+        @JsonProperty("noVhlAppNo")
+        private String noVhlAppNo;
+
     }
 }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1012Request.java

@@ -28,7 +28,7 @@ public class ODR1012Request extends DaJiaBaseRequest {
     private BodyDTO body;
 
     public ODR1012Request(String orderNo) {
-        super("TQBD", ServiceCode.ODR1014.getCode());
+        super("", ServiceCode.ODR1014.getCode());
         if(body == null){
             body = new BodyDTO();
         }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR1013Request.java

@@ -35,7 +35,7 @@ public class ODR1013Request extends DaJiaBaseRequest {
     private BodyDTO body;
 
     public ODR1013Request(InsAreaCompany insAreaCompany, DaJiaConfigureParameters daJiaConfigureParameters, List<InsTaskImagesBase64> insUploadImagesDtos) {
-        super("TQBD", ServiceCode.ODR1013.getCode());
+        super(daJiaConfigureParameters.getChannelCode(), ServiceCode.ODR1013.getCode());
         if(Objects.isNull(body)){
             body = new BodyDTO();
         }

+ 1 - 2
src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR2009Request.java

@@ -58,7 +58,7 @@ public class ODR2009Request extends DaJiaBaseRequest{
     }
 
     public ODR2009Request(String orderNo, BaseQuoteInfoVo quoteInfoVo, DaJiaConfigureParameters daJiaConfigureParameters) {
-        super("TQBD", ServiceCode.ODR2009.getCode());
+        super(daJiaConfigureParameters.getChannelCode(), ServiceCode.ODR2009.getCode());
         if(Objects.isNull(this.body)){
             this.body = new BodyDTO();
         }
@@ -72,6 +72,5 @@ public class ODR2009Request extends DaJiaBaseRequest{
         this.body.licensePlateNo = quoteInfoVo.getCarInfo().getLicenseNo();
         //出单口
         this.body.cdptCde = daJiaConfigureParameters.getIssuingInstitution();
-
     }
 }

+ 3 - 2
src/main/java/com/ydtech/modules/order/entity/api/dajia/request/ODR2010Request.java

@@ -2,6 +2,7 @@ package com.ydtech.modules.order.entity.api.dajia.request;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 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 lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -27,8 +28,8 @@ public class ODR2010Request extends DaJiaBaseRequest {
     @JsonProperty("body")
     private BodyDTO body;
 
-    public ODR2010Request(String orderNo) {
-        super("TQBD", ServiceCode.ODR1014.getCode());
+    public ODR2010Request(String orderNo, DaJiaConfigureParameters daJiaConfigureParameters) {
+        super(daJiaConfigureParameters.getChannelCode(), ServiceCode.ODR1014.getCode());
         if(body == null){
             body = new BodyDTO();
         }

+ 3 - 2
src/main/java/com/ydtech/modules/order/entity/api/dajia/request/VHLINS2005Request.java

@@ -2,6 +2,7 @@ package com.ydtech.modules.order.entity.api.dajia.request;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 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 lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -27,8 +28,8 @@ public class VHLINS2005Request extends DaJiaBaseRequest {
     @JsonProperty("body")
     private BodyDTO body;
 
-    public VHLINS2005Request(String[] plyNos) {
-        super("TQBD", ServiceCode.VHL_INS2005.getCode());
+    public VHLINS2005Request(String[] plyNos, DaJiaConfigureParameters daJiaConfigureParameters) {
+        super(daJiaConfigureParameters.getChannelCode(), ServiceCode.VHL_INS2005.getCode());
         if(body == null){
             body = new BodyDTO();
         }

+ 134 - 0
src/main/java/com/ydtech/modules/order/entity/api/dajia/response/NVHLODR1001Response.java

@@ -0,0 +1,134 @@
+package com.ydtech.modules.order.entity.api.dajia.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.order.entity.api.dajia.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;
+
+    }
+
+}

+ 84 - 0
src/main/java/com/ydtech/modules/order/entity/api/dajia/response/NVHLODR2007Response.java

@@ -0,0 +1,84 @@
+package com.ydtech.modules.order.entity.api.dajia.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.order.entity.api.dajia.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:46
+ **/
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class NVHLODR2007Response extends DaJiaBaseResponse {
+
+    private static final long serialVersionUID = -5345963590207304369L;
+
+    @JsonProperty("policyInfos")
+    private List<policyInfosDTO> policyInfos;
+
+    @NoArgsConstructor
+    @Data
+    public static class policyInfosDTO implements Serializable {
+
+        private static final long serialVersionUID = -8892193629620452567L;
+
+
+        //投保单号
+        @JsonProperty("CAppNo")
+        private String CAppNo;
+
+        //保单号
+        @JsonProperty("CPlyNo")
+        private String CPlyNo;
+
+        //产品代码
+        @JsonProperty("CProdNo")
+        private String CProdNo;
+
+        //产品名称
+        @JsonProperty("CProdName")
+        private String CProdName;
+
+        //产品保额
+        @JsonProperty("NAmt")
+        private String NAmt;
+
+        //产品保费
+        @JsonProperty("NPrm")
+        private String NPrm;
+
+        //产品投保日期
+        @JsonProperty("TAppTm")
+        private String TAppTm;
+
+        //产品签单日期
+        @JsonProperty("TIssueTm")
+        private String TIssueTm;
+
+        //产品保险起期
+        @JsonProperty("NVhlEffectiveDate")
+        private String NVhlEffectiveDate;
+
+        //产品保险止期
+        @JsonProperty("NVhlExpireDate")
+        private String NVhlExpireDate;
+
+        //投保单状态
+        @JsonProperty("CAppStatus")
+        private String CAppStatus;
+
+        //电子保单下载地址
+        @JsonProperty("CPdfUrl")
+        private String CPdfUrl;
+
+    }
+}

+ 43 - 0
src/main/java/com/ydtech/modules/order/entity/vo/dajia/InsAccidentalDrivingDajia.java

@@ -0,0 +1,43 @@
+package com.ydtech.modules.order.entity.vo.dajia;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+@Data
+@ApiModel(value = "驾意险查询 - 大家保险")
+public class InsAccidentalDrivingDajia implements Serializable {
+    private static final long serialVersionUID = 6098565535096545432L;
+
+    @ApiModelProperty(value = "id")
+    private Long id;
+
+    @ApiModelProperty(value = "渠道code")
+    private String channelCode;
+
+    @ApiModelProperty(value = "商品编码")
+    private String commodityCode;
+
+    @ApiModelProperty(value = "方案编码")
+    private String planCode;
+
+    @ApiModelProperty(value = "产品编码")
+    private String productCode;
+
+    @ApiModelProperty(value = "方案名称")
+    private String productName;
+
+    @ApiModelProperty(value = "价格")
+    private Double price;
+
+    @ApiModelProperty(value = "份数")
+    @TableField(exist = false)
+    private Integer quantity;
+
+}

+ 36 - 0
src/main/java/com/ydtech/modules/order/entity/vo/dajia/InsAccidentalDrivingSubDajia.java

@@ -0,0 +1,36 @@
+package com.ydtech.modules.order.entity.vo.dajia;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+@ApiModel(value = "驾意险查询子类型 - 大家保险")
+public class InsAccidentalDrivingSubDajia implements Serializable {
+    private static final long serialVersionUID = 6098565535096545432L;
+
+    @ApiModelProperty(value = "id")
+    private Long id;
+
+    @ApiModelProperty(value = "父表id")
+    private Long accId;
+
+    @ApiModelProperty(value = "险别代码")
+    private String cvrgCde;
+
+    @ApiModelProperty(value = "险种类型")
+    private String cvrgType;
+
+    @ApiModelProperty(value = "责任代码")
+    private String responsisCde;
+
+    @ApiModelProperty(value = "责任名称")
+    private String responsisName;
+
+    @ApiModelProperty(value = "价格")
+    private Double cvrgPrm;
+
+}

+ 7 - 0
src/main/java/com/ydtech/modules/order/service/DaJiaOrderService.java

@@ -21,4 +21,11 @@ public interface DaJiaOrderService extends BaseOrderService<Object>{
      */
     HttpResult<Object> obtainWarranty(PolicyPrintVo policyPrintVo);
 
+    /**
+     * 获取驾意险列表
+     * @return
+     */
+    HttpResult<Object> accidentalDrivingList();
+
+
 }

+ 14 - 0
src/main/java/com/ydtech/modules/order/service/InsAccidentalDrivingDaJiaService.java

@@ -0,0 +1,14 @@
+package com.ydtech.modules.order.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ydtech.modules.order.entity.InsAccidentalDriving;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingDajia;
+
+/**
+ * @author
+ * @description 针对表【ins_accidental_driving(驾意险)】的数据库操作Service
+ * @createDate 2023-03-09 14:45:58
+ */
+public interface InsAccidentalDrivingDaJiaService extends IService<InsAccidentalDrivingDajia> {
+
+}

+ 16 - 0
src/main/java/com/ydtech/modules/order/service/InsAccidentalDrivingSubDaJiaService.java

@@ -0,0 +1,16 @@
+package com.ydtech.modules.order.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingDajia;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingSubDajia;
+
+import java.util.List;
+
+/**
+ * @author
+ * @description 针对表【ins_accidental_driving(驾意险)】的数据库操作Service
+ * @createDate 2023-03-09 14:45:58
+ */
+public interface InsAccidentalDrivingSubDaJiaService extends IService<InsAccidentalDrivingSubDajia> {
+    List<InsAccidentalDrivingSubDajia> getListByAccId(Long accId);
+}

+ 150 - 58
src/main/java/com/ydtech/modules/order/service/impl/DaJiaOrderServiceImpl.java

@@ -2,11 +2,13 @@ package com.ydtech.modules.order.service.impl;
 
 import cn.hutool.core.util.ArrayUtil;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.ydtech.constants.enums.InsuranceRisk;
 import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
 import com.ydtech.core.page.HttpResult;
+import com.ydtech.exception.SystemException;
 import com.ydtech.modules.admin.model.SysArea;
 import com.ydtech.modules.admin.model.vo.PersonAreaVo;
 import com.ydtech.modules.admin.model.vo.SysAreaVo;
@@ -27,13 +29,13 @@ import com.ydtech.modules.order.entity.api.dajia.request.*;
 import com.ydtech.modules.order.entity.api.dajia.response.*;
 import com.ydtech.modules.order.entity.api.zijin.constants.enums.BusType;
 import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
+import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
-import com.ydtech.modules.order.service.DaJiaOrderService;
-import com.ydtech.modules.order.service.InsAreaCompanyService;
-import com.ydtech.modules.order.service.InsOrdersService;
-import com.ydtech.modules.order.service.InsTaskImagesService;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingDajia;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingSubDajia;
+import com.ydtech.modules.order.service.*;
 import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
 import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
 import com.ydtech.modules.protocol.service.PtlAgreementService;
@@ -78,6 +80,12 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
     @Autowired
     private SysAreaService sysAreaService;
 
+    @Autowired
+    private InsAccidentalDrivingDaJiaService insAccidentalDrivingDaJiaService;
+
+    @Autowired
+    private InsAccidentalDrivingSubDaJiaService insAccidentalDrivingSubDaJiaService;
+
     @Value("${upload.file.path}")
     private String uploadFilePath;
 
@@ -141,15 +149,14 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
 
             //投保人区划信息
             PersonAreaVo policyHolderPersonArea = sysAreaService.queryByAddress(quoteInfoVo.getPolicyHolderInfo().getAddr(), quoteInfoVo.getPolicyHolderInfo().getIdentifyNumber());
-
-            //被保人区划信息
-            PersonAreaVo insuredPersonArea = sysAreaService.queryByAddress(quoteInfoVo.getInsuredPersonInfo().getAddr(), quoteInfoVo.getInsuredPersonInfo().getIdentifyNumber());
-
-
-
-            //投保人 赛选出的地址条件
-//            List<SysArea> collect = sysAreaVos.stream().filter(item -> quoteInfoVo.getPolicyHolderInfo().getAddr().contains(item.getAreaCname())).collect(Collectors.toList());
-//            List<SysArea> sysAreas1 = sysAreaService.queryAllParent(collect1.get(0));
+            PersonAreaVo insuredPersonArea;
+            //投保人等于被保人
+            if(quoteInfoVo.getPolicyHolderInfo().getIdentifyNumber().equals(quoteInfoVo.getInsuredPersonInfo().getIdentifyNumber())){
+                insuredPersonArea = policyHolderPersonArea;
+            }else{
+                //被保人区划信息
+                insuredPersonArea = sysAreaService.queryByAddress(quoteInfoVo.getInsuredPersonInfo().getAddr(), quoteInfoVo.getInsuredPersonInfo().getIdentifyNumber());
+            }
 
             // 1.获取业务订单号接口
             String orderNo = getOrderNo(daJiaConfigureParameters);
@@ -163,7 +170,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
             // 3.车辆与客户信息确认
             ODR1008Response odr1008Response = ConfirmationVehicleCustomerInformation(orderNo,busiId,quoteInfoVo,daJiaConfigureParameters,odr2009Response,policyHolderPersonArea,insuredPersonArea);
             if(!odr1008Response.getStatus().equals(Message.M0000.getCode())){
-                throw new Exception("车辆与客户信息确认接口失败");
+                return HttpResult.error("车辆与客户信息确认接口失败");
             }
 
             String fuelType = odr1008Response.getResult().getVehicleInfo().getVehicleFuelType();
@@ -179,32 +186,54 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
             ODR1016Request odr1016Request = new ODR1016Request(orderNo,bxStartDate);
             ODR1016Response odr1016Response = daJiaRequestApiComponents.carValueCalculation(odr1016Request);
             if(!odr1016Response.getStatus().equals(Message.M0000.getCode())){
-                throw new Exception("车辆实际价值计算接口失败");
+                return HttpResult.error("车辆实际价值计算接口失败");
             }
 
             //5.保费计算接口
             List<KindInfoVo> kindList = quoteInfoVo.getKindList();
             List<RiskInfoVo> riskList = quoteInfoVo.getRiskList();
-            ODR1009Request odr1009Request = new ODR1009Request(orderNo, kindList, riskList,quoteInfoVo,odr1016Response,isEnergy);
+            //非车险
+            JSONObject accidentalDrivingVo = JSONObject.parseObject(JSONObject.toJSONString(t.getAccidentalDrivingVo()));
+            InsAccidentalDrivingDajia accidentalDriving = null;
+            List<InsAccidentalDrivingSubDajia> listByAccId = null;
+            if(!Objects.isNull(accidentalDrivingVo) && accidentalDrivingVo.size() > 0){
+                //驾意险
+                accidentalDriving = getAccidentalDrivingByCode(accidentalDrivingVo.getString("rideRiskCode"), accidentalDrivingVo.getInteger("quantity"));
+                //驾意险详细信息
+                listByAccId = insAccidentalDrivingSubDaJiaService.getListByAccId(accidentalDriving.getId());
+            }
+            ODR1009Request odr1009Request = new ODR1009Request(orderNo, kindList, riskList,quoteInfoVo,odr1016Response,accidentalDriving,listByAccId,daJiaConfigureParameters,isEnergy);
             ODR1009Response odr1009Response = daJiaRequestApiComponents.newPremiumXnyCalculation(odr1009Request);
-            if(odr1009Response.getStatus().equals(Message.M0000.getCode())){
+            NVHLODR1001Response nvhlodr1001Response = null;
+            if(!Objects.isNull(accidentalDrivingVo) && accidentalDrivingVo.size() > 0){
+                //6.驾意险报价
+                NVHLODR1001Request nvhlodr1001Request = new NVHLODR1001Request(daJiaConfigureParameters,odr1009Response,
+                        quoteInfoVo,accidentalDriving,accidentalDrivingVo.getString("quantity"),policyHolderPersonArea,insuredPersonArea);
+                nvhlodr1001Response = daJiaRequestApiComponents.accidentPremiumCalculation(nvhlodr1001Request);
+                if(!"2000".equals(nvhlodr1001Response.getStatus())){
+                    return HttpResult.error("驾意险报价失败");
+                }
+            }
+
+            if(Message.M0000.getCode().equals(odr1009Response.getStatus())){
+
                 //保费计算接口返回
-                QuoteRespVo quoteRespVo = getQuoteRespVo(odr1009Response, quoteInfoVo);
+                QuoteRespVo quoteRespVo = getQuoteRespVo(odr1009Response, quoteInfoVo,nvhlodr1001Response);
                 //添加调用费用匹配功能
 //                feeRuleSchemeService.dealFeeOrderInfo(quoteInfoVo, quoteRespVo, t.getAgreementId(),
 //                        odr1009Request.getBody().getOrderNo());
-                HttpResult<QuoteRespVo> quoteRespVoHttpResult = responseOrder(odr1009Response, quoteRespVo, ptlAgreementAttribution, orderNo, quoteInfoVo.getOrderNo(),busiId);
+                HttpResult<QuoteRespVo> quoteRespVoHttpResult = responseOrder(odr1009Response, quoteRespVo, ptlAgreementAttribution, orderNo, quoteInfoVo.getOrderNo(),busiId,nvhlodr1001Response);
                 return quoteRespVoHttpResult;
             }else{
                 if(odr1009Response.getResult().getJqAppStatus().equals("0") && odr1009Response.getStatus().equals("0002")) {
-                    throw new Exception("报价失败,原因:"+odr1009Response.getResult().getJqAppStatusMessage());
+                    return HttpResult.error("报价失败,原因:"+odr1009Response.getResult().getJqAppStatusMessage());
                 }else if(odr1009Response.getResult().getSyAppStatus().equals("0") && odr1009Response.getStatus().equals("0002")) {
-                    throw new Exception("报价失败,原因:" + odr1009Response.getResult().getSyAppStatusMessage());
+                    return HttpResult.error("报价失败,原因:" + odr1009Response.getResult().getSyAppStatusMessage());
                 }
-                throw new Exception("报价失败");
+                return HttpResult.error("报价失败");
             }
         }catch(Exception e){
-            throw new RuntimeException(e.getMessage());
+            throw new SystemException(e.getMessage());
         }
     }
 
@@ -212,7 +241,8 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
     public HttpResult<QuoteRespVo> responseOrder(ODR1009Response odr1009Response,
                                                  QuoteRespVo quoteRespVo,
                                                  PtlAgreementAttribution ptlAgreementAttribution, String orderId,
-                                                 String orderNo,String busiId) {
+                                                 String orderNo,String busiId,
+                                                 NVHLODR1001Response nvhlodr1001Response) {
         // 保存订单信息
         InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
         // 协议id
@@ -235,15 +265,21 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
         {
             insAreaCompany.setSyapplyno(odr1009Response.getResult().getBasePart().getSyProposalNo().toString());
         }
+        //驾意险信息
+        if(!Objects.isNull(nvhlodr1001Response)){
+            insAreaCompany.setCrossInsurance(JSONArray.parseArray(JSON.toJSONString(nvhlodr1001Response.getPolicyInfos())));
+        }
         insAreaCompanyService.insertCompanyAndOrders(insAreaCompany);
         quoteRespVo.setCompanyId(companyId);
         quoteRespVo.setOrderno(orderNo);
         // 车船税
         ODR1009Response.ResultDTO.VehicleTaxationDTO carShipTax = odr1009Response.getResult().getVehicleTaxation();
-        TaxArrears taxArrears = new TaxArrears("往年欠税", Double.parseDouble(carShipTax.getTaxableAmt()),
-                Double.parseDouble(carShipTax.getTaxOverdueAmt()));
-        List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
-        insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
+        if(!Objects.isNull(carShipTax)) {
+            TaxArrears taxArrears = new TaxArrears("往年欠税", Double.parseDouble(carShipTax.getTaxableAmt()),
+                    Double.parseDouble(carShipTax.getTaxOverdueAmt()));
+            List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
+            insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
+        }
 
         return HttpResult.ok("报价成功", quoteRespVo);
     }
@@ -263,8 +299,22 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
         return null;
     }
 
+    /**
+     * 根据id 获取驾意险信息
+     * @param id
+     * @param quantity
+     * @return
+     */
+    public InsAccidentalDrivingDajia getAccidentalDrivingByCode(String id,Integer quantity){
+        InsAccidentalDrivingDajia byId = insAccidentalDrivingDaJiaService.getById(id);
+        byId.setQuantity(quantity);
+        return byId;
+    }
+
+
     public QuoteRespVo getQuoteRespVo(ODR1009Response odr1009Response,
-                                      BaseQuoteInfoVo yaQuoteInfoVo) {
+                                      BaseQuoteInfoVo yaQuoteInfoVo,
+                                      NVHLODR1001Response nvhlodr1001Response) {
         double jqPremium = 0;
         double syPremium = 0;
         double sumPayTax = 0;
@@ -348,6 +398,10 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
 //            jyPremium = bigDecimal.doubleValue();
 //        }
 
+        if(!Objects.isNull(nvhlodr1001Response)){
+            jyPremium = Double.parseDouble(nvhlodr1001Response.getOrderPrm());
+        }
+
         quoteRespVo.setRiskList(riskList);
         quoteRespVo.setKindList(kindList);
         if(!Objects.isNull(odr1009Response.getResult().getBasePart().getJqPremium()))
@@ -357,7 +411,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
         if(!Objects.isNull(odr1009Response.getResult().getBasePart().getSyPremium())){
             syPremium = Double.parseDouble(odr1009Response.getResult().getBasePart().getSyPremium().toString());
         }
-        if(!Objects.isNull(odr1009Response.getResult().getVehicleTaxation().getTaxTotalAmount())){
+        if(!Objects.isNull(odr1009Response.getResult().getVehicleTaxation())){
             sumPayTax = Double.parseDouble(odr1009Response.getResult().getVehicleTaxation().getTaxTotalAmount());
         }
         quoteRespVo.setJqPremium(jqPremium);
@@ -386,13 +440,19 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
             DaJiaConfigureParameters daJiaConfigureParameters = new DaJiaConfigureParameters();
             configureParametersComponents.toEntity(daJiaConfigureParameters, insAreaCompany.getAgreementId());
             //先进行影像提交
-            submitImage(companyId);
+//            submitImage(companyId);
 
             //1009返回数据
             ODR1009Response.ResultDTO resultDTO = JSONObject.parseObject(
                     JSON.toJSONString(insAreaCompany.getReptxt()),
                     ODR1009Response.ResultDTO.class);
 
+            //驾意险 返回数据
+            List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS = null;
+            if(!Objects.isNull(insAreaCompany.getCrossInsurance())){
+                policyInfosDTOS = JSON.parseArray(JSON.toJSONString(insAreaCompany.getCrossInsurance()),NVHLODR1001Response.policyInfosDTO.class);
+            }
+
             //核保构造request
             ODR1010Request odr1010Request = new ODR1010Request(
                     insAreaCompany.getInsOrderNo(),
@@ -403,7 +463,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
             ODR1010Response odr1010Response = daJiaRequestApiComponents.underwriting(odr1010Request);
             if (odr1010Response.getStatus().equals(Message.M0000.getCode())) {
                 //核保成功  获取支付二维码
-                ODR1011Request odr1011Request = new ODR1011Request(insAreaCompany.getInsOrderNo(),daJiaConfigureParameters);
+                ODR1011Request odr1011Request = new ODR1011Request(insAreaCompany.getInsOrderNo(),daJiaConfigureParameters,policyInfosDTOS);
                 ODR1011Response payNo = daJiaRequestApiComponents.getPayNo(odr1011Request);
                 if(payNo.getStatus().equals(Message.M0000.getCode())){
                     //获取支付二维码成功  保存支付二维码
@@ -414,12 +474,12 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
                 }
             }else{
                 if(odr1010Response.getResult().getJqAppStatus().equals("0") && odr1010Response.getStatus().equals("0003")){
-                    throw new RuntimeException("核保失败,原因:"+odr1010Response.getResult().getJqAppStatusMessage());
+                    return HttpResult.error("核保失败,原因:"+odr1010Response.getResult().getJqAppStatusMessage());
                 }else if(odr1010Response.getResult().getSyAppStatus().equals("0") && odr1010Response.getStatus().equals("0003")){
-                    throw new RuntimeException("核保失败,原因:"+odr1010Response.getResult().getSyAppStatusMessage());
+                    return HttpResult.error("核保失败,原因:"+odr1010Response.getResult().getSyAppStatusMessage());
                 }
             }
-            throw new RuntimeException("核保失败");
+            return HttpResult.error("核保失败");
         }catch(Exception e){
             throw new RuntimeException(e.getMessage());
         }
@@ -445,7 +505,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
                 //上传成功
                 return HttpResult.ok("上传影像成功");
             }
-            throw new RuntimeException("上传影像失败");
+            return HttpResult.error("上传影像失败");
         }catch (Exception e){
             throw new RuntimeException(e.getMessage());
         }
@@ -460,7 +520,10 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
     public HttpResult<Object> verifyPayment(String companyId) {
         try {
             InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
-            ODR2010Request odr2010Request = new ODR2010Request(insAreaCompany.getInsOrderNo());
+            //获取公司配置信息
+            DaJiaConfigureParameters daJiaConfigureParameters = new DaJiaConfigureParameters();
+            configureParametersComponents.toEntity(daJiaConfigureParameters, insAreaCompany.getAgreementId());
+            ODR2010Request odr2010Request = new ODR2010Request(insAreaCompany.getInsOrderNo(),daJiaConfigureParameters);
             ODR2010Response odr2010Response = daJiaRequestApiComponents.verifyPayment(odr2010Request);
             if(odr2010Response.getStatus().equals(Message.M0000.getCode())){
                 List<ODR2010Response.ResultDTO> result = odr2010Response.getResult();
@@ -480,7 +543,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
                 }
                 return HttpResult.ok("查询订单状态成功");
             }
-            throw new RuntimeException("查询订单状态错误");
+            return HttpResult.error("查询订单状态错误");
         }catch (Exception e){
             throw new RuntimeException(e.getMessage());
         }
@@ -499,12 +562,15 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
             String url = "";
             InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(policyPrintVo.getCompanyId());
             InsOrders insOrders = insOrdersService.getById(insAreaCompany.getOrderno());
+            //获取公司配置信息
+            DaJiaConfigureParameters daJiaConfigureParameters = new DaJiaConfigureParameters();
+            configureParametersComponents.toEntity(daJiaConfigureParameters, insAreaCompany.getAgreementId());
             // 被保人信息
             JSONObject ownerInfo = insOrders.getInsureinfo();
             CustomerInfoVo customerInfoVo = ownerInfo.toJavaObject(CustomerInfoVo.class);
             String identifyNo = customerInfoVo.getIdentifyNumber();
             //交强险
-            if(policyPrintVo.getRiskCode().equals(InsuranceRisk.TRAFFIC.getCode())){
+            if(InsuranceRisk.TRAFFIC.getCode().equals(policyPrintVo.getRiskCode())){
                 if (insAreaCompany.getJqpolicyno() != null) {
                     warrantys.add(insAreaCompany.getJqpolicyno());
                 }
@@ -513,33 +579,49 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
                 } else {
                     templateName = "-交强险保单.pdf";
                 }
-            }else if(policyPrintVo.getRiskCode().equals(InsuranceRisk.BUSINESS.getCode())) {
+            }else if(InsuranceRisk.BUSINESS.getCode().equals(policyPrintVo.getRiskCode())) {
                 //商业险
                 if (insAreaCompany.getSypolicyno() != null) {
                     warrantys.add(insAreaCompany.getSypolicyno());
                 }
                 templateName = "-商业险保单.pdf";
+            }else if(InsuranceRisk.ACCIDENT.getCode().equals(policyPrintVo.getRiskCode())){
+                //驾意险
+                templateName = "-驾意险保单.pdf";
             }
             String[] warrantysArray = warrantys.toArray(new String[0]);
-            VHLINS2005Request vhlins2005Request = new VHLINS2005Request(warrantysArray);
-            VHLINS2005Response vhlins2005Response = daJiaRequestApiComponents.obtainWarranty(vhlins2005Request);
-            if(vhlins2005Response.getStatus().equals(Message.M0000.getCode())){
-                //获取保单成功
-                if(PolicyPrintVo.PolicyPrintType.PPT_1.getCode().equals(policyPrintVo.getType())){
-                    //下载保单
-                    if(vhlins2005Response.getResult().size() > 0){
-                        VHLINS2005Response.ResultDTO resultDTO = vhlins2005Response.getResult().get(0);
-                        url = gainCarInsPolicy(resultDTO.getReturnBzUrl(), insAreaCompany.getOrderno() + templateName, identifyNo);
-                    }else{
-                        throw new RuntimeException("获取保单失败");
+            //是否获取驾意险保单
+            if(InsuranceRisk.ACCIDENT.getCode().equals(policyPrintVo.getRiskCode())){
+
+                if(!Objects.isNull(insAreaCompany.getCrossInsurance())){
+                    List<NVHLODR1001Response.policyInfosDTO> policyInfosDTOS = JSON.parseArray(JSON.toJSONString(insAreaCompany.getCrossInsurance()), NVHLODR1001Response.policyInfosDTO.class);
+                    NVHLODR2007Request nvhlodr2007Request = new NVHLODR2007Request(policyInfosDTOS.get(0).getAppNo(),daJiaConfigureParameters);
+                    NVHLODR2007Response nvhlodr2007Response = daJiaRequestApiComponents.accidentPremiumWarranty(nvhlodr2007Request);
+                    if("2000".equals(nvhlodr2007Response.getStatus())){
+                        url = gainCarInsPolicy(nvhlodr2007Response.getPolicyInfos().get(0).getCPdfUrl(), nvhlodr2007Response.getPolicyInfos().get(0).getCAppNo() + templateName, identifyNo);
                     }
-                }else if(PolicyPrintVo.PolicyPrintType.PPT_2.getCode().equals(policyPrintVo.getType())) {
-                    //获取保单
-                    if (vhlins2005Response.getResult().size() > 0) {
-                        VHLINS2005Response.ResultDTO resultDTO = vhlins2005Response.getResult().get(0);
-                        url = gainCarInsPolicy(resultDTO.getReturnUrl(), insAreaCompany.getOrderno() + templateName, identifyNo);
-                    } else {
-                        throw new RuntimeException("获取保单失败");
+                }
+            }else {
+                VHLINS2005Request vhlins2005Request = new VHLINS2005Request(warrantysArray, daJiaConfigureParameters);
+                VHLINS2005Response vhlins2005Response = daJiaRequestApiComponents.obtainWarranty(vhlins2005Request);
+                if (vhlins2005Response.getStatus().equals(Message.M0000.getCode())) {
+                    //获取保单成功
+                    if (PolicyPrintVo.PolicyPrintType.PPT_1.getCode().equals(policyPrintVo.getType())) {
+                        //下载标志
+                        if (vhlins2005Response.getResult().size() > 0) {
+                            VHLINS2005Response.ResultDTO resultDTO = vhlins2005Response.getResult().get(0);
+                            url = gainCarInsPolicy(resultDTO.getReturnBzUrl(), insAreaCompany.getOrderno() + templateName, identifyNo);
+                        } else {
+                            return HttpResult.error("获取保单失败");
+                        }
+                    } else if (PolicyPrintVo.PolicyPrintType.PPT_2.getCode().equals(policyPrintVo.getType())) {
+                        //获取保单
+                        if (vhlins2005Response.getResult().size() > 0) {
+                            VHLINS2005Response.ResultDTO resultDTO = vhlins2005Response.getResult().get(0);
+                            url = gainCarInsPolicy(resultDTO.getReturnUrl(), insAreaCompany.getOrderno() + templateName, identifyNo);
+                        } else {
+                            return HttpResult.error("获取保单失败");
+                        }
                     }
                 }
             }
@@ -549,6 +631,16 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
         }
     }
 
+    /**
+     * 获取驾意险列表
+     * @return
+     */
+    @Override
+    public HttpResult<Object> accidentalDrivingList() {
+        List<InsAccidentalDrivingDajia> list = insAccidentalDrivingDaJiaService.list();
+        return HttpResult.ok("获取驾意险列表成功",list);
+    }
+
     private String gainCarInsPolicy(String url, String fileName, String licensePlate) {
         String dir = "carInsPolicy/" + licensePlate + "/";
         return FileUtil.netUrlToFile(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl);

+ 25 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsAccidentalDrivingDaJiaServiceImpl.java

@@ -0,0 +1,25 @@
+package com.ydtech.modules.order.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.modules.order.dao.InsAccidentalDrivingDaJiaMapper;
+import com.ydtech.modules.order.dao.InsAccidentalDrivingMapper;
+import com.ydtech.modules.order.entity.InsAccidentalDriving;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingDajia;
+import com.ydtech.modules.order.service.InsAccidentalDrivingDaJiaService;
+import com.ydtech.modules.order.service.InsAccidentalDrivingService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author Administrator
+ * @description 针对表【ins_accidental_driving(驾意险)】的数据库操作Service实现
+ * @createDate 2023-03-09 14:45:58
+ */
+@Service
+public class InsAccidentalDrivingDaJiaServiceImpl extends ServiceImpl<InsAccidentalDrivingDaJiaMapper, InsAccidentalDrivingDajia>
+        implements InsAccidentalDrivingDaJiaService {
+
+}
+
+
+
+

+ 32 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsAccidentalDrivingSubDaJiaServiceImpl.java

@@ -0,0 +1,32 @@
+package com.ydtech.modules.order.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.modules.order.dao.InsAccidentalDrivingSubDaJiaMapper;
+import com.ydtech.modules.order.entity.vo.dajia.InsAccidentalDrivingSubDajia;
+import com.ydtech.modules.order.service.InsAccidentalDrivingSubDaJiaService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @description 针对表【ins_accidental_driving(驾意险)】的数据库操作Service实现
+ * @createDate 2023-03-09 14:45:58
+ */
+@Service
+public class InsAccidentalDrivingSubDaJiaServiceImpl extends ServiceImpl<InsAccidentalDrivingSubDaJiaMapper, InsAccidentalDrivingSubDajia>
+        implements InsAccidentalDrivingSubDaJiaService {
+
+    @Override
+    public List<InsAccidentalDrivingSubDajia> getListByAccId(Long accId){
+        List<InsAccidentalDrivingSubDajia> insAccidentalDrivingSubDajias = this.baseMapper.selectList(new LambdaQueryWrapper<InsAccidentalDrivingSubDajia>()
+                .eq(InsAccidentalDrivingSubDajia::getAccId, accId));
+        return insAccidentalDrivingSubDajias;
+    }
+
+}
+
+
+
+