Parcourir la source

1.子订单存储报价车人员信息 2.中煤爬虫处理驾意险

785834757 il y a 1 an
Parent
commit
b5fad74940
20 fichiers modifiés avec 292 ajouts et 33 suppressions
  1. 6 0
      src/main/java/com/ydtech/modules/ins/model/yc/ruote/response/VhlResponse.java
  2. 16 1
      src/main/java/com/ydtech/modules/order/controller/QrCodeController.java
  3. 0 1
      src/main/java/com/ydtech/modules/order/controller/QuoteController.java
  4. 38 0
      src/main/java/com/ydtech/modules/order/dao/InsAreaCompanyInfoMapper.java
  5. 15 0
      src/main/java/com/ydtech/modules/order/entity/InsAreaCompany.java
  6. 7 0
      src/main/java/com/ydtech/modules/order/entity/InsAreaCompanyAccidentalDriving.java
  7. 81 0
      src/main/java/com/ydtech/modules/order/entity/InsAreaCompanyInfo.java
  8. 1 1
      src/main/java/com/ydtech/modules/order/service/InsOrdersService.java
  9. 1 1
      src/main/java/com/ydtech/modules/order/service/impl/BoHaiOrderApiServiceImpl.java
  10. 11 3
      src/main/java/com/ydtech/modules/order/service/impl/ChengTaiOrderApiServiceImpl.java
  11. 8 1
      src/main/java/com/ydtech/modules/order/service/impl/DaJiaOrderServiceImpl.java
  12. 1 1
      src/main/java/com/ydtech/modules/order/service/impl/GuorenOrderApiServiceImpl.java
  13. 8 1
      src/main/java/com/ydtech/modules/order/service/impl/HuaTaiOrderApiServiceImpl.java
  14. 25 2
      src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java
  15. 9 3
      src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java
  16. 19 1
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java
  17. 19 11
      src/main/java/com/ydtech/modules/order/service/impl/YangGuangOrderApiServiceImpl.java
  18. 10 3
      src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java
  19. 7 0
      src/main/java/com/ydtech/modules/order/service/impl/ZhongMeiOrderApiServiceImpl.java
  20. 10 3
      src/main/java/com/ydtech/modules/order/service/impl/ZijinOrderApiServiceImpl.java

+ 6 - 0
src/main/java/com/ydtech/modules/ins/model/yc/ruote/response/VhlResponse.java

@@ -425,5 +425,11 @@ public class VhlResponse {
     @JacksonXmlProperty(localName = "CChdUbiData")
     private String CChdUbiData;
 
+    /**
+     * 睿控评分
+     */
+    @JacksonXmlProperty(localName = "CRkScore")
+    private String CRkScore;
+
 
 }

+ 16 - 1
src/main/java/com/ydtech/modules/order/controller/QrCodeController.java

@@ -2,6 +2,7 @@ package com.ydtech.modules.order.controller;
 
 import cn.dev33.satoken.annotation.SaIgnore;
 import cn.hutool.core.collection.CollUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ydtech.exception.SystemException;
 import com.ydtech.modules.admin.constants.UserConstants;
@@ -11,7 +12,9 @@ import com.ydtech.modules.admin.service.SysQRCodeRelationService;
 import com.ydtech.modules.esm.model.EsmInsCompany;
 import com.ydtech.modules.esm.service.EsmInsCompanyService;
 import com.ydtech.modules.inv.utils.LocalDateTimeUtils;
+import com.ydtech.modules.order.dao.InsAreaCompanyInfoMapper;
 import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsAreaCompanyInfo;
 import com.ydtech.modules.order.entity.InsOrderQrCode;
 import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.modules.order.entity.vo.QrCodeVo;
@@ -80,17 +83,29 @@ public class QrCodeController {
     @Autowired
     private EsmInsCompanyService esmInsCompanyService;
 
+    @Autowired
+    private InsAreaCompanyInfoMapper insAreaCompanyInfoMapper;
+
     @GetMapping(value = "/getQrCode")
     @ApiOperation(value = "获取二维码")
     public ModelAndView getQrCode(String areaCompanyId) {
         InsOrderQrCode insOrderQrCode = insOrderQrCodeService.getOneOrSave(areaCompanyId);
+
         InsAreaCompany insAreaCompany = insAreaCompanyService.getById(areaCompanyId);
         Integer qrCodeType = sysQRCodeRelationService.getQRCodeType(insAreaCompany.getApiType(), insAreaCompany.getCompanyId(),
                 insAreaCompany.getInscompany());
         ModelAndView modelAndView = new ModelAndView(new MappingJackson2JsonView());
         if (!Objects.isNull(insOrderQrCode)) {
             InsOrders insOrders = insOrdersService.getById(insOrderQrCode.getOrderno());
-
+            //替换子订单的车辆人员信息
+            InsAreaCompanyInfo insAreaCompanyInfo = insAreaCompanyInfoMapper.selectOne(new LambdaQueryWrapper<InsAreaCompanyInfo>()
+                    .eq(InsAreaCompanyInfo::getSubOrderNo, areaCompanyId));
+            if(!Objects.isNull(insAreaCompanyInfo)){
+                insOrders.setCarinfo(JSON.parseObject(insAreaCompanyInfo.getCarInfo()));
+                insOrders.setOwnerinfo(JSON.parseObject(insAreaCompanyInfo.getOwnerInfo()));
+                insOrders.setApplyinfo(JSON.parseObject(insAreaCompanyInfo.getApplyInfo()));
+                insOrders.setInsureinfo(JSON.parseObject(insAreaCompanyInfo.getInsureInfo()));
+            }
             QrCodeVo qrCodeVo = new QrCodeVo();
             String qrCodeUrl = qrCodeGenAddress + "?areaCompanyId=" + areaCompanyId;
             qrCodeVo.setQrCodeUrl(qrCodeUrl);

+ 0 - 1
src/main/java/com/ydtech/modules/order/controller/QuoteController.java

@@ -261,7 +261,6 @@ public class QuoteController extends BaseController {
                 ygQuoteAccidentVo.setQuantityCasualty(jsonObject.getString("quantity"));
                 List<YgQuoteAccidentVo> javaObjectList = new ArrayList<>();
                 javaObjectList.add(ygQuoteAccidentVo);
-
                 quoteVo1.setAccidentalDrivingVo(javaObjectList);
             } else {
                 quoteVo1.setAccidentalDrivingVo(new ArrayList<>());

+ 38 - 0
src/main/java/com/ydtech/modules/order/dao/InsAreaCompanyInfoMapper.java

@@ -0,0 +1,38 @@
+package com.ydtech.modules.order.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ydtech.modules.admin.model.dto.*;
+import com.ydtech.modules.admin.model.report.company.*;
+import com.ydtech.modules.admin.model.report.opetationData.BusinessDataDto;
+import com.ydtech.modules.admin.model.report.opetationData.BusinessDataQueryDto;
+import com.ydtech.modules.admin.model.report.opetationData.QuotationCountDataDto;
+import com.ydtech.modules.admin.model.report.opetationData.QuotationCountQueryDto;
+import com.ydtech.modules.admin.model.vo.*;
+import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsAreaCompanyInfo;
+import com.ydtech.modules.order.entity.InsOrders;
+import com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto;
+import com.ydtech.modules.order.entity.dto.SubOrderCountDTO;
+import com.ydtech.modules.order.entity.vo.OrderQueryVo;
+import com.ydtech.modules.order.entity.vo.RejectPageQueryVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @description 针对表【ins_area_company(报价渠道)】的数据库操作Mapper
+ * @createDate 2023-01-31 15:51:19
+ * @Entity generator.domain.InsAreaCompany
+ */
+public interface InsAreaCompanyInfoMapper extends BaseMapper<InsAreaCompanyInfo> {
+
+}
+
+
+
+

+ 15 - 0
src/main/java/com/ydtech/modules/order/entity/InsAreaCompany.java

@@ -606,6 +606,21 @@ public class InsAreaCompany implements Serializable {
     @TableField(exist = false)
     private String recorder;
 
+    /**
+     * 添加车辆 人员信息 25-01-18
+     */
+    @TableField(exist = false)
+    private String carInfo;
+
+    @TableField(exist = false)
+    private String ownerInfo;
+
+    @TableField(exist = false)
+    private String applyInfo;
+
+    @TableField(exist = false)
+    private String insureInfo;
+
     public InsAreaCompany(QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution) {
         this.id = IdGenerate.nextId();
         this.orderno = quoteRespVo.getOrderno();

+ 7 - 0
src/main/java/com/ydtech/modules/order/entity/InsAreaCompanyAccidentalDriving.java

@@ -111,6 +111,13 @@ public class InsAreaCompanyAccidentalDriving implements Serializable {
             this.setRideRiskCode(jsonObject.getString("planCode"));
             this.setQuantity(1);
             this.setCompanyId(t.getCompanyId());
+        }else if(t.getCompanyId().equals("ZMBX1000000")){
+            //中煤财险
+            JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(t.getAccidentalDrivingVo()));
+            this.setRideRiskName(jsonObject.getString("rideRiskName"));
+            this.setRideRiskCode(jsonObject.getString("rideRiskCode"));
+            this.setQuantity(jsonObject.getInteger("quantity"));
+            this.setCompanyId(t.getCompanyId());
         }
     }
 }

+ 81 - 0
src/main/java/com/ydtech/modules/order/entity/InsAreaCompanyInfo.java

@@ -0,0 +1,81 @@
+package com.ydtech.modules.order.entity;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
+import com.ydtech.modules.ins.model.vo.QuoteRespVo;
+import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
+import com.ydtech.utils.StringUtils;
+import com.ydtech.utils.idgen.IdGenerate;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * 报价渠道
+ *
+ * @TableName ins_area_company
+ */
+@TableName(value = "ins_area_company_info", autoResultMap = true)
+@Data
+@ApiModel(value = "报价信息管理")
+@NoArgsConstructor
+@AllArgsConstructor
+public class InsAreaCompanyInfo implements Serializable {
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = -6827009009645748787L;
+    /**
+     * 主键
+     */
+    @TableId(value = "sub_order_no")
+    private String subOrderNo;
+    /**
+     * 车辆信息
+     */
+    @TableField(value = "car_info")
+    private String carInfo;
+    /**
+     * 车主信息
+     */;
+    @TableField(value = "owner_info")
+    private String ownerInfo;
+    /**
+     * 投保人信息
+     */;
+
+    @TableField(value = "apply_info")
+    private String applyInfo;
+    /**
+     * 被保人信息
+     */
+    @TableField(value = "insure_info")
+    private String insureInfo;
+
+
+    /**
+     * 获取子订单的车辆 人员信息
+     * @param insAreaCompany
+     * @return
+     */
+    public InsAreaCompanyInfo(InsAreaCompany insAreaCompany) {
+        this.setSubOrderNo(insAreaCompany.getId());
+        this.setCarInfo(insAreaCompany.getCarInfo());
+        this.setOwnerInfo(insAreaCompany.getOwnerInfo());
+        this.setApplyInfo(insAreaCompany.getApplyInfo());
+        this.setInsureInfo(insAreaCompany.getInsureInfo());
+    }
+}
+

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/InsOrdersService.java

@@ -287,7 +287,7 @@ public interface InsOrdersService extends IService<InsOrders> {
      * 生成失败订单数据
      * @return
      */
-    String responseFailedOrder(BaseQuoteVo quoteVo, PtlAgreementAttribution ptlAgreementAttribution, InsOrders insOrder, String errorMessage, InsOrderStatusEnum statusEnum);
+    String responseFailedOrder(BaseQuoteVo quoteVo, BaseQuoteInfoVo quoteInfoVo, PtlAgreementAttribution ptlAgreementAttribution, InsOrders insOrder, String errorMessage, InsOrderStatusEnum statusEnum);
 
     String responseFailedOrder(String subOrderNo,BaseQuoteVo quoteVo, PtlAgreementAttribution ptlAgreementAttribution, InsOrders insOrder, String errorMessage, InsOrderStatusEnum statusEnum);
 

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/impl/BoHaiOrderApiServiceImpl.java

@@ -294,7 +294,7 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
             if(responseMsg.contains("重复投保")){
                 insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
             }
-            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo, ptlAgreementAttribution, byId, responseMsg, insOrderStatusEnum);
+            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo,quoteInfoVo, ptlAgreementAttribution, byId, responseMsg, insOrderStatusEnum);
 
             //存储报价记录
             quoteRecords.forEach(item->{

+ 11 - 3
src/main/java/com/ydtech/modules/order/service/impl/ChengTaiOrderApiServiceImpl.java

@@ -147,7 +147,7 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
             {
                 insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
             }
-            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo, ptlAgreementAttribution, order, insurePremiumResponse.getMessage(), insOrderStatusEnum);
+            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo,quoteInfoVo, ptlAgreementAttribution, order, insurePremiumResponse.getMessage(), insOrderStatusEnum);
             SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                     QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
             sysQuoteRecords.add(sysQuoteRecord);
@@ -180,7 +180,7 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
 
         // 设置核心报价车型
         quoteRespVo.setCoreModels(carModelListDTO.toCoreModelsVo());
-        HttpResult<QuoteRespVo> quoteRespVoHttpResult = responseOrder(insurePremiumResponse, quoteRespVo, ptlAgreementAttribution, insurePremiumResponse.getOrderId());
+        HttpResult<QuoteRespVo> quoteRespVoHttpResult = responseOrder(insurePremiumResponse, quoteRespVo, ptlAgreementAttribution, insurePremiumResponse.getOrderId(),quoteInfoVo);
         SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                 QuoteNumberConstant.QuoteAction.QUOTE_SUCCESS.getCode().toString(),QuoteNumberConstant.QuoteResult.SUCCESS.getCode().toString());
         sysQuoteRecords.add(sysQuoteRecord);
@@ -397,9 +397,17 @@ public class ChengTaiOrderApiServiceImpl implements ChengTaiOrderApiService {
         });
     }
 
-    private HttpResult<QuoteRespVo> responseOrder(InsurePremiumResponse insurePremiumResponse, QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution, String orderId) {
+    private HttpResult<QuoteRespVo> responseOrder(InsurePremiumResponse insurePremiumResponse, QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution, String orderId,
+                                                  BaseQuoteInfoVo quoteInfoVo) {
         // 保存订单信息
         InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
+
+        // 子订单的车辆 人员信息存储
+        insAreaCompany.setCarInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getCarInfo())));
+        insAreaCompany.setOwnerInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getOwnerInfo())));
+        insAreaCompany.setApplyInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getPolicyHolderInfo())));
+        insAreaCompany.setInsureInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getInsuredPersonInfo())));
+
         // 协议id
         insAreaCompany.setReptxt(JSON.parseObject(JSON.toJSONString(insurePremiumResponse)));
         insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());

+ 8 - 1
src/main/java/com/ydtech/modules/order/service/impl/DaJiaOrderServiceImpl.java

@@ -304,7 +304,7 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
                 if(odr1009Response.getResult().getJqAppStatusMessage().toString().contains("重复投保")) {
                     orderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
                 }
-                String subOrderNo = insOrdersService.responseFailedOrder(t, ptlAgreementAttribution, insOrders, errorMessage, orderStatusEnum);
+                String subOrderNo = insOrdersService.responseFailedOrder(t,quoteInfoVo, ptlAgreementAttribution, insOrders, errorMessage, orderStatusEnum);
 
                 if (Message.M0003.getCode().equals(odr1009Response.getStatus())) {
                     return HttpResult.error("报价失败,原因:" + odr1009Response.getMessage());
@@ -432,6 +432,13 @@ public class DaJiaOrderServiceImpl implements DaJiaOrderService {
     public HttpResult<QuoteRespVo> responseOrder(ODR1009Response odr1009Response, QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution, String orderId, BaseQuoteInfoVo quoteInfoVo, String busiId, NVHLODR1001Response nvhlodr1001Response, InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving) {
         // 保存订单信息
         InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
+
+        // 子订单的车辆 人员信息存储
+        insAreaCompany.setCarInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getCarInfo())));
+        insAreaCompany.setOwnerInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getOwnerInfo())));
+        insAreaCompany.setApplyInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getPolicyHolderInfo())));
+        insAreaCompany.setInsureInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getInsuredPersonInfo())));
+
         // 协议id
         //子订单id
         String companyId = IdGenerate.nextId();

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/impl/GuorenOrderApiServiceImpl.java

@@ -293,7 +293,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
                 insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
             }
             PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(quoteVo.getAgreementId());
-            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo, ptlAgreementAttribution, order, resp.getResultMsg(), insOrderStatusEnum);
+            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo,yaQuoteInfoVo, ptlAgreementAttribution, order, resp.getResultMsg(), insOrderStatusEnum);
             SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(yaQuoteInfoVo.getUserid(),quoteVo.getCompanyId(),yaQuoteInfoVo.getCarInfo().getLicenseNo(),
                     QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
             sysQuoteRecords.add(sysQuoteRecord);

+ 8 - 1
src/main/java/com/ydtech/modules/order/service/impl/HuaTaiOrderApiServiceImpl.java

@@ -164,7 +164,7 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
         if (!"0".equals(quotedPriceResponse.getHead().getReturnCode())) {
             log.error(quotedPriceResponse.getHead().getReturnMessage());
             InsOrders order = insOrdersService.getById(quoteInfo.getOrderNo());
-            String subOrderNo = insOrdersService.responseFailedOrder(zmQuoteVo,ptlAgreementAttribution, order,quotedPriceResponse.getHead().getReturnMessage(),InsOrderStatusEnum.QUOTE_FAILED);
+            String subOrderNo = insOrdersService.responseFailedOrder(zmQuoteVo, quoteInfo, ptlAgreementAttribution, order,quotedPriceResponse.getHead().getReturnMessage(),InsOrderStatusEnum.QUOTE_FAILED);
             SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(quoteInfo.getUserid(),zmQuoteVo.getCompanyId() ,quoteInfo.getCarInfo().getLicenseNo(),
                     QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
             sysQuoteRecords.add(sysQuoteRecord);
@@ -636,6 +636,13 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
                                                   PtlAgreementAttribution ptlAgreementAttribution, BaseQuoteInfoVo quoteInfo) {
         //保存订单信息
         InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
+
+        // 子订单的车辆 人员信息存储
+        insAreaCompany.setCarInfo(JSON.toJSONString(JSON.toJSONString(quoteInfo.getCarInfo())));
+        insAreaCompany.setOwnerInfo(JSON.toJSONString(JSON.toJSONString(quoteInfo.getOwnerInfo())));
+        insAreaCompany.setApplyInfo(JSON.toJSONString(JSON.toJSONString(quoteInfo.getPolicyHolderInfo())));
+        insAreaCompany.setInsureInfo(JSON.toJSONString(JSON.toJSONString(quoteInfo.getInsuredPersonInfo())));
+
         //华泰没有总订单号,使用自定义订单号
         String orderNo = IdGenerate.nextId();
         insAreaCompany.setId(orderNo);

+ 25 - 2
src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java

@@ -27,6 +27,7 @@ import com.ydtech.modules.ins.model.vo.RiskInfoVo;
 import com.ydtech.modules.message.constants.MessageTypeConstants;
 import com.ydtech.modules.message.service.MessageSecretaryService;
 import com.ydtech.modules.order.constants.OrderFeeAuditHistroy;
+import com.ydtech.modules.order.dao.InsAreaCompanyInfoMapper;
 import com.ydtech.modules.order.dao.InsAreaCompanyMapper;
 import com.ydtech.modules.order.dao.InsOrdersMapper;
 import com.ydtech.modules.order.entity.*;
@@ -111,6 +112,9 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
     @Autowired
     private SysUserService sysUserService;
 
+    @Autowired
+    private InsAreaCompanyInfoMapper insAreaCompanyInfoMapper;
+
     public InsAreaCompanyServiceImpl(@Lazy InsOrdersService insOrdersService, InsOrdersTrackService insOrdersTrackService, SysDeptService sysDeptService) {
         this.insOrdersService = insOrdersService;
         this.insOrdersTrackService = insOrdersTrackService;
@@ -179,6 +183,7 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
     }
 
     @Override
+    @Transactional
     public String insertCompanyAndOrders(InsAreaCompany insAreaCompany, InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving) {
         //add by hxl   解决部分数据更新不了险种信息
         insAreaCompany = updateEntityPruductAndPruductid(insAreaCompany);
@@ -189,7 +194,12 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
                 insAreaCompany.getSyStartDate(), insAreaCompany.getSyEndDate(), insAreaCompany);
         String subOrderNo = IdGenerate.nextId();
         insAreaCompany.setId(subOrderNo);
+
         baseMapper.insert(insAreaCompany);
+
+        //保存 车辆人员信息
+        InsAreaCompanyInfo insAreaCompanyInfo = new InsAreaCompanyInfo(insAreaCompany);
+        insAreaCompanyInfoMapper.insert(insAreaCompanyInfo);
         //保存驾意险信息
 
         final InsAreaCompany finalInsAreaCompany = insAreaCompany;
@@ -210,14 +220,17 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
     public String insertCompanyAndOrders(String subOrderNo, InsAreaCompany insAreaCompany, InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving) {
         insAreaCompany = updateEntityPruductAndPruductid(insAreaCompany);
 
-
         //更新主订单的投保时间
         insOrdersService.updateOrderStartingInsruanceTime(insAreaCompany.getOrderno(), insAreaCompany.getJqStartDate(), insAreaCompany.getJqEndDate(),
                 insAreaCompany.getSyStartDate(), insAreaCompany.getSyEndDate(), insAreaCompany);
         insAreaCompany.setId(subOrderNo);
         baseMapper.insert(insAreaCompany);
-        //保存驾意险信息
 
+        //保存 车辆人员信息
+        InsAreaCompanyInfo insAreaCompanyInfo = new InsAreaCompanyInfo(insAreaCompany);
+        insAreaCompanyInfoMapper.insert(insAreaCompanyInfo);
+
+        //保存驾意险信息
         final InsAreaCompany finalInsAreaCompany = insAreaCompany;
         Optional.ofNullable(insAreaCompanyAccidentalDriving)
                 .filter(x -> StringUtils.isNotEmpty(x.getRideRiskName()) && !ObjectUtils.isEmpty(x.getQuantity()))
@@ -243,6 +256,11 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
                 insAreaCompany.getSyStartDate(), insAreaCompany.getSyEndDate(), insAreaCompany);
 
         baseMapper.insert(insAreaCompany);
+
+        //保存 车辆人员信息
+        InsAreaCompanyInfo insAreaCompanyInfo = new InsAreaCompanyInfo(insAreaCompany);
+        insAreaCompanyInfoMapper.insert(insAreaCompanyInfo);
+
         //保存驾意险信息
         InsAreaCompany finalInsAreaCompany = insAreaCompany;
         insAreaCompanyAccidentalDriving.forEach(item -> {
@@ -261,6 +279,11 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
     public void insertCompanyAndOrders(InsAreaCompany insAreaCompany) {
         //add by hxl   解决部分数据更新不了险种信息
         insAreaCompany = updateEntityPruductAndPruductid(insAreaCompany);
+
+        //存储 车辆  人员信息
+        InsAreaCompanyInfo insAreaCompanyInfo = new InsAreaCompanyInfo(insAreaCompany);
+        insAreaCompanyInfoMapper.insert(insAreaCompanyInfo);
+
         baseMapper.insert(insAreaCompany);
         insOrdersTrackService.addingTrajectories(insAreaCompany);
         insOrdersService.updateByOrderStatus(insAreaCompany);

+ 9 - 3
src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java

@@ -157,7 +157,7 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
             if(response.getMessage().contains("重复投保")){
                 insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
             }
-            String subOrderNo = insOrdersService.responseFailedOrder(t, ptlAgreementAttribution, order, response.getMessage(), insOrderStatusEnum);
+            String subOrderNo = insOrdersService.responseFailedOrder(t,quoteInfoVo, ptlAgreementAttribution, order, response.getMessage(), insOrderStatusEnum);
             if(!Objects.isNull(response.getOther().getMaxQuoteNum())) {
                 int quoteNum = maxQuoteNum - Integer.parseInt(response.getOther().getMaxQuoteNum());
                 for (int i = 0; i < quoteNum; i++) {
@@ -203,7 +203,7 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
         }
 
         //处理订单信息
-        QuoteRespVo responseVo = responseOrder(response, quoteRespVo, ptlAgreementAttribution, insAreaCompanyAccidentalDriving);
+        QuoteRespVo responseVo = responseOrder(response, quoteRespVo, ptlAgreementAttribution, insAreaCompanyAccidentalDriving,quoteInfoVo);
         if(!Objects.isNull(response.getOther().getMaxQuoteNum())) {
             int quoteNum = maxQuoteNum - Integer.parseInt(response.getOther().getMaxQuoteNum());
             for (int i = 0; i < quoteNum; i++) {
@@ -501,9 +501,15 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
 
     private QuoteRespVo responseOrder(CrawlerQuoteResponse response, QuoteRespVo quoteRespVo,
                                       PtlAgreementAttribution ptlAgreementAttribution,
-                                      InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving) {
+                                      InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving,
+                                      BaseQuoteInfoVo quoteInfoVo) {
         //保存订单信息
         InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
+//在修改中
+        insAreaCompany.setCarInfo(JSON.toJSONString(quoteInfoVo.getCarInfo()));
+        insAreaCompany.setOwnerInfo(JSON.toJSONString(quoteInfoVo.getOwnerInfo()));
+        insAreaCompany.setApplyInfo(JSON.toJSONString(quoteInfoVo.getPolicyHolderInfo()));
+        insAreaCompany.setInsureInfo(JSON.toJSONString(quoteInfoVo.getInsuredPersonInfo()));
 
         insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(quoteRespVo.getTaxArrears())));
 

+ 19 - 1
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -50,6 +50,7 @@ import com.ydtech.modules.inv.utils.EasyExcelUtils;
 import com.ydtech.modules.order.constants.BusinessConstant;
 import com.ydtech.modules.order.constants.JqInsuranceType;
 import com.ydtech.modules.order.constants.OrderLinkTypeConstants;
+import com.ydtech.modules.order.dao.InsAreaCompanyInfoMapper;
 import com.ydtech.modules.order.dao.InsOrdersMapper;
 import com.ydtech.modules.order.entity.*;
 import com.ydtech.modules.order.entity.crawler.response.CrawlerVerifyPaymentResponse;
@@ -205,6 +206,9 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
     @Resource
     private  SysUserLinkCompanyMapper sysUserLinkCompanyMapper;
 
+    @Autowired
+    private InsAreaCompanyInfoMapper insAreaCompanyInfoMapper;
+
 
     public InsOrdersServiceImpl(OrderComponents orderComponents, SysUserService sysUserService,
                                 SysUserRoleService sysUserRoleService,
@@ -891,6 +895,15 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
     @Override
     public HttpResult<OrderVo> getByCompanyId(@NotBlank(message = "子订单不能为空") String companyId, String userId) {
         OrderVo orderAndAreaCompany = baseMapper.getOrderAndAreaCompany(companyId);
+        //查询子订单的数据是否存在
+        InsAreaCompanyInfo insAreaCompanyInfo = insAreaCompanyInfoMapper.selectOne(new LambdaQueryWrapper<InsAreaCompanyInfo>()
+                .eq(InsAreaCompanyInfo::getSubOrderNo, companyId));
+        if(!Objects.isNull(insAreaCompanyInfo)){
+            orderAndAreaCompany.setCarinfo(JSON.parseObject(insAreaCompanyInfo.getCarInfo()));
+            orderAndAreaCompany.setOwnerinfo(JSON.parseObject(insAreaCompanyInfo.getOwnerInfo()));
+            orderAndAreaCompany.setApplyinfo(JSON.parseObject(insAreaCompanyInfo.getApplyInfo()));
+            orderAndAreaCompany.setInsureinfo(JSON.parseObject(insAreaCompanyInfo.getInsureInfo()));
+        }
         //团队归属信息
         List<SysArea> sysAreas = sysDeptService.getListQueryBelongArea(orderAndAreaCompany.getDeptid());
         SysDept sysUserDept = sysDeptService.getById(orderAndAreaCompany.getDeptid());
@@ -2352,7 +2365,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
     }
 
     @Override
-    public String responseFailedOrder(BaseQuoteVo quoteVo, PtlAgreementAttribution ptlAgreementAttribution, InsOrders insOrder, String errorMessage, InsOrderStatusEnum statusEnum) {
+    public String responseFailedOrder(BaseQuoteVo quoteVo,BaseQuoteInfoVo baseQuoteInfoVo, PtlAgreementAttribution ptlAgreementAttribution, InsOrders insOrder, String errorMessage, InsOrderStatusEnum statusEnum) {
 
         //保存订单信息
         InsAreaCompany insAreaCompany = new InsAreaCompany();
@@ -2370,6 +2383,11 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         insAreaCompany.setSyStartDate(insOrder.getSystartdate());
         insAreaCompany.setSyEndDate(insOrder.getSyenddate());
 
+        insAreaCompany.setCarInfo(JSON.toJSONString(baseQuoteInfoVo.getCarInfo()));
+        insAreaCompany.setOwnerInfo(JSON.toJSONString(baseQuoteInfoVo.getOwnerInfo()));
+        insAreaCompany.setApplyInfo(JSON.toJSONString(baseQuoteInfoVo.getPolicyHolderInfo()));
+        insAreaCompany.setInsureInfo(JSON.toJSONString(baseQuoteInfoVo.getInsuredPersonInfo()));
+
         if (CollUtil.isEmpty(quoteVo.getRisks())) {
             insAreaCompany.setRiskinfo(new JSONArray());
         } else {

+ 19 - 11
src/main/java/com/ydtech/modules/order/service/impl/YangGuangOrderApiServiceImpl.java

@@ -191,7 +191,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
                             if (yangGuangAccuracyCalculateResponse1.getErrorMessage().contains("重复投保")) {
                             insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
                             }
-                            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse1.getErrorMessage(), insOrderStatusEnum);
+                            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo,quoteInfoVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse1.getErrorMessage(), insOrderStatusEnum);
                             SysQuoteRecord sysQuoteRecord2 = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                                     QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
                             sysQuoteRecords.add(sysQuoteRecord2);
@@ -211,7 +211,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
                         // 设置核心报价车型
                         quoteRespVo.setCoreModels(carModelList1.toCoreModelsVo());
                         HttpResult<QuoteRespVo> quoteRespVoHttpResult = responseOrder(yangGuangAccuracyCalculateResponse1, quoteRespVo, ptlAgreementAttribution, quoteInfoVo.getOrderNo(),
-                                quoteVo.getAccidentalDrivingVo());
+                                quoteVo.getAccidentalDrivingVo(),quoteInfoVo);
 
                         SysQuoteRecord sysQuoteRecord3 = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                                 QuoteNumberConstant.QuoteAction.QUOTE_SUCCESS.getCode().toString(),QuoteNumberConstant.QuoteResult.SUCCESS.getCode().toString());
@@ -229,7 +229,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
                         if (yangGuangAccuracyCalculateResponseRe.getErrorMessage().contains("重复投保")) {
                             insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
                         }
-                        String subOrderNo = insOrdersService.responseFailedOrder(quoteVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse.getErrorMessage(), insOrderStatusEnum);
+                        String subOrderNo = insOrdersService.responseFailedOrder(quoteVo,quoteInfoVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse.getErrorMessage(), insOrderStatusEnum);
                         SysQuoteRecord sysQuoteRecord2 = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                                 QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
                         sysQuoteRecords.add(sysQuoteRecord2);
@@ -252,7 +252,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
                         if (yangGuangAccuracyCalculateResponseRe.getErrorMessage().contains("重复投保")) {
                         insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
                         }
-                        String subOrderNo = insOrdersService.responseFailedOrder(quoteVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponseRe.getErrorMessage(), insOrderStatusEnum);
+                        String subOrderNo = insOrdersService.responseFailedOrder(quoteVo,quoteInfoVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponseRe.getErrorMessage(), insOrderStatusEnum);
                         SysQuoteRecord sysQuoteRecord2 = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                                 QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
                         sysQuoteRecords.add(sysQuoteRecord2);
@@ -272,7 +272,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
                 // 设置核心报价车型
                 quoteRespVo.setCoreModels(carModelList1.toCoreModelsVo());
                 return responseOrder(yangGuangAccuracyCalculateResponseRe, quoteRespVo, ptlAgreementAttribution, quoteInfoVo.getOrderNo(),
-                        quoteVo.getAccidentalDrivingVo());
+                        quoteVo.getAccidentalDrivingVo(),quoteInfoVo);
             }
         }
         // 单商 交三 交商 需要获取车辆actualValue 进行二次报价
@@ -291,7 +291,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
                     if (yangGuangAccuracyCalculateResponse1.getErrorMessage().contains("重复投保")) {
                         insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
                     }
-                    String s = insOrdersService.responseFailedOrder(quoteVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse1.getErrorMessage(), insOrderStatusEnum);
+                    String s = insOrdersService.responseFailedOrder(quoteVo,quoteInfoVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse1.getErrorMessage(), insOrderStatusEnum);
                     SysQuoteRecord sysQuoteRecord2 = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                             QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
                     sysQuoteRecords.add(sysQuoteRecord2);
@@ -312,7 +312,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
                 // 设置核心报价车型
                 quoteRespVo.setCoreModels(carModelList1.toCoreModelsVo());
                 HttpResult<QuoteRespVo> quoteRespVoHttpResult = responseOrder(yangGuangAccuracyCalculateResponse1, quoteRespVo, ptlAgreementAttribution, quoteInfoVo.getOrderNo(),
-                        quoteVo.getAccidentalDrivingVo());
+                        quoteVo.getAccidentalDrivingVo(),quoteInfoVo);
                 SysQuoteRecord sysQuoteRecord3 = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                         QuoteNumberConstant.QuoteAction.QUOTE_SUCCESS.getCode().toString(),QuoteNumberConstant.QuoteResult.SUCCESS.getCode().toString());
                 sysQuoteRecords.add(sysQuoteRecord3);
@@ -329,7 +329,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
                 if (yangGuangAccuracyCalculateResponse.getErrorMessage().contains("重复投保")) {
                     insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
                 }
-                String s = insOrdersService.responseFailedOrder(quoteVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse.getErrorMessage(), insOrderStatusEnum);
+                String s = insOrdersService.responseFailedOrder(quoteVo,quoteInfoVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse.getErrorMessage(), insOrderStatusEnum);
                 SysQuoteRecord sysQuoteRecord2 = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                         QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
                 sysQuoteRecords.add(sysQuoteRecord2);
@@ -353,7 +353,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
                 if (yangGuangAccuracyCalculateResponse.getErrorMessage().contains("重复投保")) {
                     insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
                 }
-                String s = insOrdersService.responseFailedOrder(quoteVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse.getErrorMessage(), insOrderStatusEnum);
+                String s = insOrdersService.responseFailedOrder(quoteVo,quoteInfoVo, ptlAgreementAttribution, order, yangGuangAccuracyCalculateResponse.getErrorMessage(), insOrderStatusEnum);
                 SysQuoteRecord sysQuoteRecord2 = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                         QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
                 sysQuoteRecords.add(sysQuoteRecord2);
@@ -373,7 +373,7 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
             // 设置核心报价车型
             quoteRespVo.setCoreModels(carModelList1.toCoreModelsVo());
             HttpResult<QuoteRespVo> quoteRespVoHttpResult = responseOrder(yangGuangAccuracyCalculateResponse, quoteRespVo, ptlAgreementAttribution, quoteInfoVo.getOrderNo(),
-                    quoteVo.getAccidentalDrivingVo());
+                    quoteVo.getAccidentalDrivingVo(),quoteInfoVo);
             SysQuoteRecord sysQuoteRecord3 = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                     QuoteNumberConstant.QuoteAction.QUOTE_SUCCESS.getCode().toString(),QuoteNumberConstant.QuoteResult.SUCCESS.getCode().toString());
             sysQuoteRecords.add(sysQuoteRecord3);
@@ -970,9 +970,17 @@ public class YangGuangOrderApiServiceImpl implements YangGuangOrderApiService {
                                                  QuoteRespVo quoteRespVo,
                                                  PtlAgreementAttribution ptlAgreementAttribution,
                                                  String orderId,
-                                                 List<YgQuoteAccidentVo> accidentalDrivingVo) {
+                                                 List<YgQuoteAccidentVo> accidentalDrivingVo,
+                                                 BaseQuoteInfoVo quoteInfoVo) {
         //保存订单信息
         InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
+
+        // 子订单的车辆 人员信息存储
+        insAreaCompany.setCarInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getCarInfo())));
+        insAreaCompany.setOwnerInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getOwnerInfo())));
+        insAreaCompany.setApplyInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getPolicyHolderInfo())));
+        insAreaCompany.setInsureInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getInsuredPersonInfo())));
+
         //协议id
         insAreaCompany.setOrderno(orderId);
         insAreaCompany.setReptxt(JSON.parseObject(JSON.toJSONString(yangGuangAccuracyCalculateResponse)));

+ 10 - 3
src/main/java/com/ydtech/modules/order/service/impl/YongchengOrderApiServiceImpl.java

@@ -550,7 +550,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
             }
 
             PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(quoteVo.getAgreementId());
-            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo,ptlAgreementAttribution, order,rr.getHead().getErrorMessage(),insOrderStatusEnum);
+            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo,yaQuoteInfoVo,ptlAgreementAttribution, order,rr.getHead().getErrorMessage(),insOrderStatusEnum);
             SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(yaQuoteInfoVo.getUserid(),quoteVo.getCompanyId(),yaQuoteInfoVo.getCarInfo().getLicenseNo(),
                     QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
             sysQuoteRecords.add(sysQuoteRecord);
@@ -567,7 +567,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
 
         QuoteRespVo quoteRespVo = YcBuildData.buildQuoteRespVo(order, rr, yaQuoteInfoVo);
         //8 生成订单
-        InsAreaCompany iac = responseOrder(order, quoteRespVo, rr, quoteVo);
+        InsAreaCompany iac = responseOrder(order, quoteRespVo, rr, quoteVo,yaQuoteInfoVo);
 
         SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(yaQuoteInfoVo.getUserid(),quoteVo.getCompanyId(),yaQuoteInfoVo.getCarInfo().getLicenseNo(),
                 QuoteNumberConstant.QuoteAction.QUOTE_SUCCESS.getCode().toString(),QuoteNumberConstant.QuoteResult.SUCCESS.getCode().toString());
@@ -1276,6 +1276,8 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
         redisKey.append(accidentalDrivingVo.getCompanyCode());
         redisKey.append(accidentalDrivingVo.getSeatNum());
         redisKey.append(accidentalDrivingVo.getCode());
+        redisKey.append(accidentalDrivingVo.getCUsageCde());
+        redisKey.append(accidentalDrivingVo.getCProdNo());
 
         //查询redis
         if (!Objects.isNull(redisTemplate.opsForValue().get(redisKey.toString()))) {
@@ -1428,7 +1430,7 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
      * @author: lig
      * @date: 2023年02月16日 0016
      */
-    private InsAreaCompany responseOrder(InsOrders insOrder, QuoteRespVo quoteRespVo, RuoteResponse responseData, BaseQuoteVo<AccidentalDrivingVo> quoteVo) {
+    private InsAreaCompany responseOrder(InsOrders insOrder, QuoteRespVo quoteRespVo, RuoteResponse responseData, BaseQuoteVo<AccidentalDrivingVo> quoteVo,BaseQuoteInfoVo quoteInfoVo) {
 
         //交强保费 含税
         double jqPremium = StringUtils.toDouble(responseData.getBase().getNBefTaxPrmJQ()) + StringUtils.toDouble(responseData.getBase().getNAppTaxAmtJQ());
@@ -1469,6 +1471,11 @@ public class YongchengOrderApiServiceImpl implements YongchengOrderApiService {
         insAreaCompany.setSyStartDate(responseData.getBase().getTInsrncBgnTmSY());
         insAreaCompany.setSyEndDate(responseData.getBase().getTInsrncEndTmSY());
 
+        insAreaCompany.setCarInfo(JSON.toJSONString(quoteInfoVo.getCarInfo()));
+        insAreaCompany.setOwnerInfo(JSON.toJSONString(quoteInfoVo.getOwnerInfo()));
+        insAreaCompany.setApplyInfo(JSON.toJSONString(quoteInfoVo.getPolicyHolderInfo()));
+        insAreaCompany.setInsureInfo(JSON.toJSONString(quoteInfoVo.getInsuredPersonInfo()));
+
         if (CollUtil.isEmpty(quoteRespVo.getRiskList())) {
             insAreaCompany.setRiskinfo(new JSONArray());
         } else {

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

@@ -638,6 +638,13 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
         insAreaCompany.setId(quotedPriceResponse.getBusinessNo());
         insAreaCompany.setInsOrderNo(quotedPriceResponse.getBusinessNo());
+
+        // 子订单的车辆 人员信息存储
+        insAreaCompany.setCarInfo(JSON.toJSONString(JSON.toJSONString(quoteInfo.getCarInfo())));
+        insAreaCompany.setOwnerInfo(JSON.toJSONString(JSON.toJSONString(quoteInfo.getOwnerInfo())));
+        insAreaCompany.setApplyInfo(JSON.toJSONString(JSON.toJSONString(quoteInfo.getPolicyHolderInfo())));
+        insAreaCompany.setInsureInfo(JSON.toJSONString(JSON.toJSONString(quoteInfo.getInsuredPersonInfo())));
+
         // 车船税
         double prePayTax = quotedPriceResponse.getTaxinfo() != null ? quotedPriceResponse.getTaxinfo().getPrePayTax() : 0;
         double delayPayTax = quotedPriceResponse.getTaxinfo() != null ? quotedPriceResponse.getTaxinfo().getDelayPayTax() : 0;

+ 10 - 3
src/main/java/com/ydtech/modules/order/service/impl/ZijinOrderApiServiceImpl.java

@@ -169,7 +169,7 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
             {
                 insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
             }
-            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo, ptlAgreementAttribution, order, calculatePremiumResponse.getRtnMsg(), insOrderStatusEnum);
+            String subOrderNo = insOrdersService.responseFailedOrder(quoteVo,quoteInfoVo, ptlAgreementAttribution, order, calculatePremiumResponse.getRtnMsg(), insOrderStatusEnum);
             SysQuoteRecord deplSysQuoteRecord = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                     QuoteNumberConstant.QuoteAction.QUOTE_SUCCESS.getCode().toString(),QuoteNumberConstant.QuoteResult.SUCCESS.getCode().toString());
             sysQuoteRecords.add(deplSysQuoteRecord);
@@ -193,7 +193,7 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
         // 设置核心报价车型
         quoteRespVo.setCoreModels(vehicleModelInfosDTO.toCoreModelsVo());
         HttpResult<QuoteRespVo> quoteRespVoHttpResult = responseOrder(calculatePremiumResponse, quoteRespVo, ptlAgreementAttribution, calculatePremiumRequest.getOrderId(),
-                calculatePremiumRequest.getOrderNo(), quoteVo.getAccidentalDrivingVo());
+                calculatePremiumRequest.getOrderNo(), quoteVo.getAccidentalDrivingVo(),quoteInfoVo);
         SysQuoteRecord deplSysQuoteRecord = new SysQuoteRecord(quoteInfoVo.getUserid(),quoteVo.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
                 QuoteNumberConstant.QuoteAction.QUOTE_SUCCESS.getCode().toString(),QuoteNumberConstant.QuoteResult.SUCCESS.getCode().toString());
         sysQuoteRecords.add(deplSysQuoteRecord);
@@ -635,7 +635,7 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
 
     public HttpResult<QuoteRespVo> responseOrder(CalculatePremiumResponse calculatePremiumResponse, QuoteRespVo quoteRespVo,
                                                  PtlAgreementAttribution ptlAgreementAttribution, String orderId, String orderNo,
-                                                 List<ZjQuoteAccidentVo> accidentalDrivingVo) {
+                                                 List<ZjQuoteAccidentVo> accidentalDrivingVo,BaseQuoteInfoVo quoteInfoVo) {
         // 保存订单信息
         InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
         // 协议id
@@ -643,6 +643,13 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
         insAreaCompany.setReptxt(JSON.parseObject(JSON.toJSONString(calculatePremiumResponse)));
         insAreaCompany.setOrderstatus(InsOrderStatusEnum.QUOTE_ING.getCode());
         insAreaCompany.setInsOrderNo(orderId);
+
+        // 子订单的车辆 人员信息存储
+        insAreaCompany.setCarInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getCarInfo())));
+        insAreaCompany.setOwnerInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getOwnerInfo())));
+        insAreaCompany.setApplyInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getPolicyHolderInfo())));
+        insAreaCompany.setInsureInfo(JSON.toJSONString(JSON.toJSONString(quoteInfoVo.getInsuredPersonInfo())));
+
         // 车船税
         CalculatePremiumResponse.CarShipTaxDTO carShipTax = calculatePremiumResponse.getCarShipTax();
         TaxArrears taxArrears = new TaxArrears("往年欠税", Double.parseDouble(carShipTax.getPreviousPay()),