Prechádzať zdrojové kódy

1.紫金财险驾意险修改
2.紫金财险特别约定
3.图片类型
4.车辆类型

wks 3 rokov pred
rodič
commit
971fafb602
32 zmenil súbory, kde vykonal 529 pridanie a 124 odobranie
  1. 3 1
      src/main/java/com/ydtech/aop/RequestStringParamHandlerMethodArgumentResolver.java
  2. 40 0
      src/main/java/com/ydtech/constants/InsuranceImageEnum.java
  3. 3 1
      src/main/java/com/ydtech/constants/enums/InsuranceRisk.java
  4. 138 0
      src/main/java/com/ydtech/constants/enums/dict/insurance/Vehicles.java
  5. 4 4
      src/main/java/com/ydtech/constants/enums/dict/products/NonCarInsuranceCode.java
  6. 35 0
      src/main/java/com/ydtech/modules/ins/model/vo/AccidentResponseVo.java
  7. 20 5
      src/main/java/com/ydtech/modules/ins/model/vo/CustomerInfoVo.java
  8. 46 23
      src/main/java/com/ydtech/modules/ins/model/vo/QuoteRespVo.java
  9. 0 29
      src/main/java/com/ydtech/modules/order/components/ZhongmeiRequestApiComponents.java
  10. 2 1
      src/main/java/com/ydtech/modules/order/components/ZijinRequestApiComponents.java
  11. 1 0
      src/main/java/com/ydtech/modules/order/controller/YongAnOrderApiController.java
  12. 2 2
      src/main/java/com/ydtech/modules/order/controller/ZijinOrderApiController.java
  13. 10 2
      src/main/java/com/ydtech/modules/order/entity/InsAreaCompany.java
  14. 16 3
      src/main/java/com/ydtech/modules/order/entity/api/zj/request/CalculatePremiumRequest.java
  15. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/zj/request/QueryClauseDataRequest.java
  16. 2 8
      src/main/java/com/ydtech/modules/order/entity/api/zj/request/SubmitVerifyRequest.java
  17. 71 0
      src/main/java/com/ydtech/modules/order/entity/api/zj/response/CalculatePremiumResponse.java
  18. 51 13
      src/main/java/com/ydtech/modules/order/entity/api/zj/response/QueryClauseDataResponse.java
  19. 0 1
      src/main/java/com/ydtech/modules/order/entity/crawler/response/CrawlerQuoteResponse.java
  20. 1 0
      src/main/java/com/ydtech/modules/order/entity/vo/BaseQuoteInfoVo.java
  21. 1 2
      src/main/java/com/ydtech/modules/order/entity/vo/BaseQuoteVo.java
  22. 1 1
      src/main/java/com/ydtech/modules/order/entity/vo/InsTaskImagesVo.java
  23. 6 1
      src/main/java/com/ydtech/modules/order/entity/vo/OrderVo.java
  24. 1 1
      src/main/java/com/ydtech/modules/order/entity/vo/PolicyPrintVo.java
  25. 26 0
      src/main/java/com/ydtech/modules/order/entity/vo/zj/ZjQuoteAccidentVo.java
  26. 1 2
      src/main/java/com/ydtech/modules/order/service/InsCrawlerOrderService.java
  27. 2 6
      src/main/java/com/ydtech/modules/order/service/ZijinOrderApiService.java
  28. 0 1
      src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java
  29. 2 2
      src/main/java/com/ydtech/modules/order/service/impl/ZhongMeiOrderServiceImpl.java
  30. 28 10
      src/main/java/com/ydtech/modules/order/service/impl/ZijinOrderApiServiceImpl.java
  31. 12 3
      src/main/java/com/ydtech/modules/order/utils/InsuranceLog.java
  32. 3 1
      src/main/resources/mapper/modules/order/InsOrdersMapper.xml

+ 3 - 1
src/main/java/com/ydtech/aop/RequestStringParamHandlerMethodArgumentResolver.java

@@ -1,5 +1,6 @@
 package com.ydtech.aop;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.ydtech.aop.request.RequestSingleParam;
 import org.springframework.core.MethodParameter;
@@ -30,8 +31,9 @@ public class RequestStringParamHandlerMethodArgumentResolver implements HandlerM
         while ((rd = reader.read(buf)) != -1) {
             sb.append(buf, 0, rd);
         }
+
         String value = requestSingleParam.value();
-        JSONObject jsonObject = JSONObject.parseObject(sb.toString());
+        JSONObject jsonObject = JSON.parseObject(sb.toString());
         return jsonObject.get(value);
     }
 

+ 40 - 0
src/main/java/com/ydtech/constants/InsuranceImageEnum.java

@@ -0,0 +1,40 @@
+package com.ydtech.constants;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @description: 图片类型
+ * @author: wenks
+ * @date: 2023/9/7 9:26
+ **/
+@Getter
+@AllArgsConstructor
+public enum InsuranceImageEnum {
+
+    C01("C01", "行驶证正面"),
+    D01("D01", "行驶证反面"),
+
+    C02("C02", "车主身份证正面"),
+    D02("D02", "车主身份证反面"),
+
+    C03("C03", "投保人身份证正面"),
+    D03("D03", "投保人身份证反面"),
+
+    C04("C04", "被保人身份证正面"),
+    D04("D04", "被保人身份证反面"),
+
+    C0500("C0500", "验车照(车架)"),
+    C0501("C0501", "验车照(后左)"),
+    C0502("C0502", "验车照(后右)"),
+    C0503("C0503", "验车照(前右)"),
+    C0504("C0504", "验车照(前左)"),
+    C0505("C0505", "验车照(人车合影)");
+
+
+    private final String code;
+
+    private final String desc;
+
+}

+ 3 - 1
src/main/java/com/ydtech/constants/enums/InsuranceRisk.java

@@ -15,7 +15,9 @@ public enum InsuranceRisk {
 
     TRAFFIC("0507", "机动车交通事故责任强制保险"),
 
-    BUSINESS("0510", "机动车商业保险");
+    BUSINESS("0510", "机动车商业保险"),
+
+    ACCIDENT("0513", "意外险");
 
     private final String code;
 

+ 138 - 0
src/main/java/com/ydtech/constants/enums/dict/insurance/Vehicles.java

@@ -0,0 +1,138 @@
+package com.ydtech.constants.enums.dict.insurance;
+
+
+import com.ydtech.aop.request.DictEnum;
+import com.ydtech.constants.enums.dict.IBaseEnum;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+@DictEnum(key = "vehicles", desc = "车辆类型")
+public enum Vehicles implements IBaseEnum {
+
+    B11("B11", "重型普通半挂车", 0, 0),
+    B12("B12", "重型厢式半挂车", 1, 0),
+    B13("B13", "重型罐式半挂车", 2, 0),
+    B14("B14", "重型平板半挂车", 3, 0),
+    B15("B15", "重型集装箱半挂车", 4, 0),
+    B16("B16", "重型自卸半挂车", 5, 0),
+    B17("B17", "重型特殊结构半挂车", 6, 0),
+    B21("B21", "中型普通半挂车", 7, 0),
+    B22("B22", "中型厢式半挂车", 8, 0),
+    B23("B23", "中型罐式半挂车", 9, 0),
+    B24("B24", "中型平板半挂车", 10, 0),
+    B25("B25", "中型集装箱半挂车", 11, 0),
+    B26("B26", "中型自卸半挂车", 12, 0),
+    B27("B27", "中型特殊结构半挂车", 13, 0),
+    B31("B31", "轻型普通半挂车", 14, 0),
+    B32("B32", "轻型厢式半挂车", 15, 0),
+    B33("B33", "轻型罐式半挂车", 16, 0),
+    B34("B34", "轻型平板半挂车", 17, 0),
+    B35("B35", "轻型自卸半挂车", 18, 0),
+    D11("D11", "无轨电车", 19, 0),
+    D12("D12", "有轨电车", 20, 0),
+    G11("G11", "重型普通全挂车", 21, 0),
+    G12("G12", "重型厢式全挂车", 22, 0),
+    G13("G13", "重型罐式全挂车", 23, 0),
+    G14("G14", "重型平板全挂车", 24, 0),
+    G15("G15", "重型集装箱全挂车", 25, 0),
+    G16("G16", "重型自卸全挂车", 26, 0),
+    G21("G21", "中型普通全挂车", 27, 0),
+    G22("G22", "中型厢式全挂车", 28, 0),
+    G23("G23", "中型罐式全挂车", 29, 0),
+    G24("G24", "中型平板全挂车", 30, 0),
+    G25("G25", "中型集装箱全挂车", 31, 0),
+    G26("G26", "中型自卸全挂车", 32, 0),
+    G31("G31", "轻型普通全挂车", 33, 0),
+    G32("G32", "轻型厢式全挂车", 34, 0),
+    G33("G33", "轻型罐式全挂车", 35, 0),
+    G34("G34", "轻型平板全挂车", 36, 0),
+    G35("G35", "轻型自卸全挂车", 37, 0),
+    H11("H11", "重型普通货车", 38, 0),
+    H12("H12", "重型厢式货车", 39, 0),
+    H13("H13", "重型封闭货车", 40, 0),
+    H14("H14", "重型罐式货车", 41, 0),
+    H15("H15", "重型平板货车", 42, 0),
+    H16("H16", "重型集装厢车", 43, 0),
+    H17("H17", "重型自卸货车", 44, 0),
+    H18("H18", "重型特殊结构货车", 45, 0),
+    H21("H21", "中型普通货车", 46, 0),
+    H22("H22", "中型厢式货车", 47, 0),
+    H23("H23", "中型封闭货车", 48, 0),
+    H24("H24", "中型罐式货车", 49, 0),
+    H25("H25", "中型平板货车", 50, 0),
+    H26("H26", "中型集装厢车", 51, 0),
+    H27("H27", "中型自卸货车", 52, 0),
+    H28("H28", "中型特殊结构货车", 53, 0),
+    H31("H31", "轻型普通货车", 54, 0),
+    H32("H32", "轻型厢式货车", 55, 0),
+    H33("H33", "轻型封闭货车", 56, 0),
+    H34("H34", "轻型罐式货车", 57, 0),
+    H35("H35", "轻型平板货车", 58, 0),
+    H37("H37", "轻型自卸货车", 59, 0),
+    H38("H38", "轻型特殊结构货车", 60, 0),
+    H41("H41", "微型普通货车", 61, 0),
+    H42("H42", "微型厢式货车", 62, 0),
+    H43("H43", "微型封闭货车", 63, 0),
+    H44("H44", "微型罐式货车", 64, 0),
+    H45("H45", "微型自卸货车", 65, 0),
+    H46("H46", "微型特殊结构货车", 66, 0),
+    H51("H51", "低速普通货车", 67, 0),
+    H52("H52", "低速厢式货车", 68, 0),
+    H53("H53", "罐式低速货车", 69, 0),
+    H54("H54", "低速自卸货车", 70, 0),
+    J11("J11", "轮式装载机械", 71, 0),
+    J12("J12", "轮式挖掘机械", 72, 0),
+    J13("J13", "轮式平地机械", 73, 0),
+    K11("K11", "大型普通客车", 74, 0),
+    K12("K12", "大型双层客车", 75, 0),
+    K13("K13", "大型卧铺客车", 76, 0),
+    K14("K14", "大型铰接客车", 77, 0),
+    K15("K15", "大型越野客车", 78, 0),
+    K21("K21", "中型普通客车", 79, 0),
+    K22("K22", "中型双层客车", 80, 0),
+    K23("K23", "中型卧铺客车", 81, 0),
+    K24("K24", "中型铰接客车", 82, 0),
+    K25("K25", "中型越野客车", 83, 0),
+    K31("K31", "小型普通客车", 84, 0),
+    K32("K32", "小型越野客车", 85, 0),
+    K33("K33", "轿车", 86, 0),
+    K41("K41", "微型普通客车", 87, 0),
+    K42("K42", "微型越野客车", 88, 0),
+    K43("K43", "微型轿车", 89, 0),
+    M11("M11", "普通正三轮摩托车", 90, 0),
+    M12("M12", "轻便正三轮摩托车", 91, 0),
+    M13("M13", "正三轮载客摩托车", 92, 0),
+    M14("M14", "正三轮载货摩托车", 93, 0),
+    M15("M15", "侧三轮摩托车", 94, 0),
+    M21("M21", "普通二轮摩托车", 95, 0),
+    M22("M22", "轻便二轮摩托车", 96, 0),
+    N11("N11", "三轮农用运输车", 97, 0),
+    Q11("Q11", "重型半挂牵引车", 98, 0),
+    Q21("Q21", "中型半挂牵引车", 99, 0),
+    Q31("Q31", "轻型半挂牵引车", 100, 0),
+    S("S", "特种作业专用车", 101, 0),
+    T11("T11", "大型轮式拖拉机", 102, 0),
+    T21("T21", "中型轮式拖拉机", 103, 0),
+    T22("T22", "手扶拖拉机", 104, 0),
+    T23("T23", "手扶变形运输机", 105, 0),
+    X99("X99", "其它", 106, 0),
+    Z11("Z11", "大型专项作业车", 107, 0),
+    Z21("Z21", "中型专项作业车", 108, 0),
+    Z31("Z31", "小型专项作业车", 109, 0),
+    Z41("Z41", "微型专项作业车", 110, 0),
+    Z51("Z51", "重型专项作业车", 111, 0),
+    Z71("Z71", "轻型专项作业车", 112, 0);
+
+    // 编号
+    private final String code;
+    // 说明
+    private final String desc;
+    // 排序
+    private final Integer sort;
+    // 状态  0 启用  1 不启用
+    private final Integer status;
+
+}
+

+ 4 - 4
src/main/java/com/ydtech/constants/enums/dict/products/NonCarInsuranceCode.java

@@ -41,13 +41,13 @@ public enum NonCarInsuranceCode implements IBaseEnum {
     NC_23("23", "养殖险", 22, 0),
     NC_99("99", "其他", 23, 0);
 
+    // 编号
     private final String code;
-
+    // 说明
     private final String desc;
-    //排序
+    // 排序
     private final Integer sort;
-    //状态  0 启用  1 不启用
+    // 状态  0 启用  1 不启用
     private final Integer status;
 
-
 }

+ 35 - 0
src/main/java/com/ydtech/modules/ins/model/vo/AccidentResponseVo.java

@@ -0,0 +1,35 @@
+package com.ydtech.modules.ins.model.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+ * @description: 驾意险返回实体
+ * @author: wenks
+ * @date: 2023/9/6 16:45
+ **/
+@Data
+@ApiModel("驾意险")
+public class AccidentResponseVo {
+
+    @ApiModelProperty("项目代码")
+    private String projectCode;
+
+    @ApiModelProperty("项目名称")
+    private String projectName;
+
+    @ApiModelProperty("方案描述")
+    private String projectDesc;
+
+    @ApiModelProperty("份数")
+    private String quantity;
+
+    @ApiModelProperty("单价")
+    private String premium;
+
+    @ApiModelProperty("实际保费")
+    private String actualPremium;
+
+}

+ 20 - 5
src/main/java/com/ydtech/modules/ins/model/vo/CustomerInfoVo.java

@@ -1,6 +1,5 @@
 package com.ydtech.modules.ins.model.vo;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ydtech.validation.annotation.CheckDateTime;
 import com.ydtech.validation.annotation.CheckIdentifyNumber;
 import io.swagger.annotations.ApiModel;
@@ -8,10 +7,6 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.time.LocalDateTime;
-import java.util.Date;
 
 /**
  * @author qinfenglong
@@ -24,13 +19,33 @@ import java.util.Date;
 @AllArgsConstructor
 @ApiModel(value = "人员信息")
 public class CustomerInfoVo {
+
+    @ApiModelProperty("姓名")
     private String name;
 
     @CheckIdentifyNumber
+    @ApiModelProperty("身份证号")
     private String identifyNumber;
+
+    @ApiModelProperty("身份证类型")
     private String identifyType;
+
+    @ApiModelProperty("省")
+    private String province;
+
+    @ApiModelProperty("市")
+    private String city;
+
+    @ApiModelProperty("县")
+    private String county;
+
+    @ApiModelProperty("地址")
     private String addr;
+
+    @ApiModelProperty("邮箱")
     private String email;
+
+    @ApiModelProperty("手机号")
     private String mobile;
 
     @ApiModelProperty(value = "有效时间开始")

+ 46 - 23
src/main/java/com/ydtech/modules/ins/model/vo/QuoteRespVo.java

@@ -1,11 +1,11 @@
 package com.ydtech.modules.ins.model.vo;
 
 
-import com.ydtech.modules.ins.model.request.ZhongmeiQuoteResponse;
 import com.ydtech.modules.order.entity.TaxArrears;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.util.Collections;
 import java.util.List;
 
 /**
@@ -17,20 +17,26 @@ import java.util.List;
 @Data
 public class QuoteRespVo {
 
-    private double ciSumPermium; //交强险和车船税合计
-    private double sumPermium; //保费合计
-    private double taxAmount; //车船税
-    private double totalAdjustRate; //商业险折扣系数
-    private String iLogPreUdwMess; //评分
-    private List<QuoteKindRespVo> kindList;
-    private List<QuoteRiskRespVo> riskList;
-    private String orderno; //订单号
-    private String iszdj; //是否真单交
+    @ApiModelProperty("交强险和车船税合计")
+    private double ciSumPermium;
+
+    @ApiModelProperty("保费合计")
+    private double sumPermium;
+
+    @ApiModelProperty("车船税")
+    private double taxAmount;
 
-    private double jqPremium; //交强险保费
-    private double syPremium; //商业险保费
+    @ApiModelProperty("商业险折扣系数")
+    private double totalAdjustRate;
 
-    private String companyId;   //子订单ID
+    @ApiModelProperty("评分")
+    private String iLogPreUdwMess;
+
+    @ApiModelProperty("商业险险种")
+    private List<QuoteKindRespVo> kindList;
+
+    @ApiModelProperty("交强险和商业险")
+    private List<QuoteRiskRespVo> riskList;
 
     //add 警告信息 lig 2023-09-12
     @ApiModelProperty("警告信息")
@@ -48,19 +54,36 @@ public class QuoteRespVo {
 
     //add end 交强商业开始结束起保日期 lig 2023-09-12
 
-    /**
-     * 驾意险信息
-     */
-    private ZhongmeiQuoteResponse.AccidentDTO accident;
+    @ApiModelProperty("驾意险信息")
+    private List<AccidentResponseVo> accident;
 
-    /**
-     * 欠税明细
-     */
+    @ApiModelProperty("订单号")
+    private String orderno;
+
+    @ApiModelProperty("是否真单交")
+    private String iszdj;
+
+    @ApiModelProperty("交强险保费")
+    private double jqPremium;
+
+    @ApiModelProperty("商业险保费")
+    private double syPremium;
+
+    @ApiModelProperty("驾意险保费")
+    private double jyPremium;
+
+    @ApiModelProperty("子订单ID")
+    private String companyId;
+
+    @ApiModelProperty("欠税明细")
     private List<TaxArrears> taxArrears;
 
-    /**
-     * 扩展字段
-     */
+    @ApiModelProperty("扩展字段")
     private Object extendInfo;
 
+    public List<AccidentResponseVo> getAccidentInfo() {
+        return accident == null ? Collections.emptyList() : accident;
+    }
+
+
 }

+ 0 - 29
src/main/java/com/ydtech/modules/order/components/ZhongmeiRequestApiComponents.java

@@ -77,35 +77,6 @@ public class ZhongmeiRequestApiComponents {
         return t;
     }
 
-
-//    /**
-//     * @param q      请求参数
-//     * @param url    请求url
-//     * @param tClass 响应类型
-//     * @param <Q>    Request 请求体
-//     * @param <S>    Response 响应体
-//     * @return <S>
-//     */
-//    private <Q extends BaseRequest, S extends BaseResponse> S post(Q q, String url, Class<S> tClass) {
-//        String jsonString = JSON.toJSONString(q);
-//        log.info("---------> 请求参数:{}", jsonString);
-//
-//        HttpHeaders httpHeaders = new HttpHeaders();
-//        httpHeaders.setContentType(MediaType.APPLICATION_JSON);
-//
-//        HttpEntity<Q> yaQuoteInfoVoHttpEntity = new HttpEntity<>(q, httpHeaders);
-//        ResponseEntity<String> response = restTemplate.postForEntity(url, yaQuoteInfoVoHttpEntity, String.class);
-//        String body = response.getBody();
-//        log.info("---------> 响应参数:{}", body);
-//
-//        S t = JSON.parseObject(body, tClass);
-//        if (ObjectUtils.isEmpty(t)) {
-//            throw new SystemException("请求失败");
-//        }
-//
-//        return t;
-//    }
-
     /**
      * @param <Q>     Request 请求体
      * @param <S>     Response 响应体

+ 2 - 1
src/main/java/com/ydtech/modules/order/components/ZijinRequestApiComponents.java

@@ -284,7 +284,8 @@ public class ZijinRequestApiComponents {
      * @return 出参实体
      */
     public QueryOrderDetailResponse getOrderDetail(OrderNoRequest orderNoRequest, HttpHeaders httpHeaders) {
-        return request(zjApiConfigurationProperties.getOrderUrl(), RequestUrl.GET_ORDER_DETAIL.getDesc(), orderNoRequest, QueryOrderDetailResponse.class, httpHeaders);
+        String url = zjApiConfigurationProperties.getOrderUrl() + "?orderNo=" + orderNoRequest.getOrderNo();
+        return request(url, RequestUrl.GET_ORDER_DETAIL.getDesc(), null, QueryOrderDetailResponse.class, httpHeaders);
     }
 
     /**

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

@@ -12,6 +12,7 @@ import com.ydtech.modules.order.entity.vo.ya.YaPolicyPrintVo;
 import com.ydtech.modules.order.service.YongAnOrderService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Map;

+ 2 - 2
src/main/java/com/ydtech/modules/order/controller/ZijinOrderApiController.java

@@ -6,7 +6,6 @@ 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.api.zj.request.CalculatePremiumRequest;
 import com.ydtech.modules.order.entity.api.zj.request.PaymentCallbacksRequest;
 import com.ydtech.modules.order.entity.api.zj.request.SubmitVerifyRequest;
 import com.ydtech.modules.order.entity.api.zj.response.QueryClauseDataResponse;
@@ -15,6 +14,7 @@ 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.entity.vo.SpecialAuditVo;
+import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.zj.ZjVehicleProductsQueryVo;
 import com.ydtech.modules.order.service.ZijinOrderApiService;
 import io.swagger.annotations.Api;
@@ -49,7 +49,7 @@ public class ZijinOrderApiController {
     @QuoteVerification("报价授权")
     @PostMapping("/quote")
     @ApiOperation("报价")
-    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<List<CalculatePremiumRequest.CarPolicySubInfoListDTO>> quoteVo) {
+    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<List<ZjQuoteAccidentVo>> quoteVo) {
         BaseQuoteInfoVo quoteInfo = this.insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo(), quoteVo.getAgreementId());
         return this.zijinOrderApiService.quote(quoteInfo, quoteVo);
     }

+ 10 - 2
src/main/java/com/ydtech/modules/order/entity/InsAreaCompany.java

@@ -113,7 +113,7 @@ public class InsAreaCompany implements Serializable {
     private String jypolicyno;
 
     /**
-     * 交强险信息
+     * 交强险商业险
      */
     @TableField(value = "riskinfo", typeHandler = FastjsonTypeHandler.class)
     private JSONArray riskinfo;
@@ -136,6 +136,12 @@ public class InsAreaCompany implements Serializable {
     @TableField(value = "sypremium")
     private BigDecimal sypremium;
 
+    /**
+     * 驾意险
+     */
+    @TableField(value = "jypremium")
+    private BigDecimal jypremium;
+
     /**
      * 车船税费用
      */
@@ -229,7 +235,7 @@ public class InsAreaCompany implements Serializable {
      * 驾意险
      */
     @TableField(value = "accident_info", typeHandler = FastjsonTypeHandler.class)
-    private JSONObject accidentInfo;
+    private JSONArray accidentInfo;
     /**
      * 欠税
      */
@@ -248,8 +254,10 @@ public class InsAreaCompany implements Serializable {
         this.inscompany = ptlAgreementAttribution.getInsCompanyName();
         this.jqpremium = BigDecimal.valueOf(quoteRespVo.getJqPremium());
         this.sypremium = BigDecimal.valueOf(quoteRespVo.getSyPremium());
+//        this.jypremium = BigDecimal.valueOf(quoteRespVo.getJyPremium());
         this.taxamount = BigDecimal.valueOf(quoteRespVo.getTaxAmount());
         this.sumpremium = BigDecimal.valueOf(quoteRespVo.getSumPermium());
+//        this.accidentInfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getAccidentInfo()));
         this.riskinfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getRiskList()));
         this.kindinfo = JSON.parseArray(JSON.toJSONString(quoteRespVo.getKindList()));
         this.orderstatus = InsOrderStatus.S_0.getCode();

+ 16 - 3
src/main/java/com/ydtech/modules/order/entity/api/zj/request/CalculatePremiumRequest.java

@@ -18,6 +18,7 @@ import com.ydtech.modules.order.entity.api.zj.response.ModelQueryResponse;
 import com.ydtech.modules.order.entity.api.zm.constants.TimeConstants;
 import com.ydtech.modules.order.entity.config.ZjConfigureParameters;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
+import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 import com.ydtech.modules.order.utils.InsuranceTimeProcessing;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -28,6 +29,7 @@ import lombok.NoArgsConstructor;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @description: 紫金财险 保费计算 入参实体
@@ -102,7 +104,7 @@ public class CalculatePremiumRequest implements Serializable {
     @JsonProperty("vehicleInfo")
     private VehicleInfoDTO vehicleInfo;
 
-    public CalculatePremiumRequest(BaseQuoteInfoVo quoteInfoVo, ModelQueryResponse.VehicleModelInfosDTO vehicleModelInfosDTO, String actualValue, List<CarPolicySubInfoListDTO> accidentalDrivingVo, ZjConfigureParameters zjConfigureParameters, ModelQueryResponse modelQueryResponse) {
+    public CalculatePremiumRequest(BaseQuoteInfoVo quoteInfoVo, ModelQueryResponse.VehicleModelInfosDTO vehicleModelInfosDTO, String actualValue, List<ZjQuoteAccidentVo> zjQuoteAccidentVos, ZjConfigureParameters zjConfigureParameters, ModelQueryResponse modelQueryResponse) {
         // 基本信息
         this.baseInfo = new BaseInfoDTO(quoteInfoVo.getRiskList());
         // 车主信息
@@ -112,7 +114,7 @@ public class CalculatePremiumRequest implements Serializable {
         // 险别信息
         this.itemKindList = ItemKindListDTO.toItemKindListDTOList(actualValue, quoteInfoVo.getKindList(), Integer.parseInt(quoteInfoVo.getCarInfo().getSeatCount()) - 1);
         // 驾意险
-        this.carPolicySubInfoList = accidentalDrivingVo;
+        this.carPolicySubInfoList = CarPolicySubInfoListDTO.toCarPolicySubInfoListDTO(zjQuoteAccidentVos);
         // 交强险
         if (!"1".equals(this.baseInfo.calculateFlag)) {
             itemKindList.add(ItemKindListDTO.getCompulsoryInsurance());
@@ -928,7 +930,18 @@ public class CalculatePremiumRequest implements Serializable {
         @JsonProperty("sumPremium")
         private String sumPremium;
 
-    }
+        public CarPolicySubInfoListDTO(ZjQuoteAccidentVo zjQuoteAccidentVo) {
+            this.riskCode = zjQuoteAccidentVo.getRiskCode();
+            this.riskName = zjQuoteAccidentVo.getRiskName();
+            this.insureGradeNo = zjQuoteAccidentVo.getProjectCode();
+            this.quantity = zjQuoteAccidentVo.getQuantity();
+            this.sumAmount = zjQuoteAccidentVo.getSumAmount();
+            this.sumPremium = zjQuoteAccidentVo.getSumPremium();
+        }
 
+        public static List<CarPolicySubInfoListDTO> toCarPolicySubInfoListDTO(List<ZjQuoteAccidentVo> zjQuoteAccidentVos) {
+            return zjQuoteAccidentVos.stream().map(CarPolicySubInfoListDTO::new).collect(Collectors.toList());
+        }
+    }
 
 }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/zj/request/QueryClauseDataRequest.java

@@ -16,7 +16,7 @@ public class QueryClauseDataRequest implements Serializable {
     private String orderId;
 
     @JsonProperty("optType")
-    private String optType = "2";
+    private String optType;
 
     @JsonProperty("riskCode")
     private String riskCode;

+ 2 - 8
src/main/java/com/ydtech/modules/order/entity/api/zj/request/SubmitVerifyRequest.java

@@ -3,13 +3,12 @@ package com.ydtech.modules.order.entity.api.zj.request;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ydtech.constants.enums.dict.agreement.ProductsType;
 import com.ydtech.modules.order.entity.api.zj.constants.enums.CarCheckReasonEnum;
+import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.io.Serializable;
-import java.util.Collections;
 import java.util.List;
 
 /**
@@ -48,6 +47,7 @@ public class SubmitVerifyRequest implements Serializable {
         this.underWritingRequestVehicleDto = new UnderWritingRequestVehicleDTO(code);
     }
 
+    @ApiModel("特约参数")
     @NoArgsConstructor
     @Data
     public static class EngageListDTO implements Serializable {
@@ -70,12 +70,6 @@ public class SubmitVerifyRequest implements Serializable {
         @JsonProperty("riskCode")
         private String riskCode;
 
-        public EngageListDTO(String clauseCode, String clauseName, String clauses, String riskCode) {
-            this.clauseCode = clauseCode;
-            this.clauseName = clauseName;
-            this.clauses = clauses;
-            this.riskCode = riskCode;
-        }
     }
 
     @NoArgsConstructor

+ 71 - 0
src/main/java/com/ydtech/modules/order/entity/api/zj/response/CalculatePremiumResponse.java

@@ -1,12 +1,18 @@
 package com.ydtech.modules.order.entity.api.zj.response;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.ins.model.vo.AccidentResponseVo;
+import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * 紫金财险 保费计算 出参实体
@@ -27,6 +33,9 @@ public class CalculatePremiumResponse extends BaseResponse implements Serializab
     @JsonProperty("carShipTax")
     private CarShipTaxDTO carShipTax;
 
+    @JsonProperty("carPolicySubInfoList")
+    private List<CarPolicySubInfoListDTO> carPolicySubInfoList;
+
     @JsonProperty("channelAndUwRate")
     private ChannelAndUwRateDTO channelAndUwRate;
 
@@ -62,6 +71,68 @@ public class CalculatePremiumResponse extends BaseResponse implements Serializab
     private Boolean success;
 
 
+    @NoArgsConstructor
+    @Data
+    public static class CarPolicySubInfoListDTO implements Serializable {
+
+        private static final long serialVersionUID = 6411381770080211343L;
+
+        @JsonProperty("productCode")
+        private String productCode;
+        @JsonProperty("productName")
+        private String productName;
+        @JsonProperty("riskName")
+        private String riskNameX;
+        @JsonProperty("insureGradeNo")
+        private String insureGradeNo;
+        @JsonProperty("address")
+        private String address;
+        @JsonProperty("isUseInsured")
+        private String isUseInsured;
+        @JsonProperty("actualPremium")
+        private String actualPremium;
+        @JsonProperty("commi")
+        private String commi;
+        @JsonProperty("commi2")
+        private String commi2;
+        @JsonProperty("salary")
+        private String salary;
+        @JsonProperty("salary2")
+        private String salary2;
+        @JsonProperty("sumNoTaxPremium")
+        private String sumNoTaxPremium;
+
+        public static AccidentResponseVo toAccidentResponseVo(String actualPremium, ZjQuoteAccidentVo zjQuoteAccidentVo) {
+            AccidentResponseVo accidentResponseVo = new AccidentResponseVo();
+            accidentResponseVo.setProjectCode(zjQuoteAccidentVo.getProjectCode());
+            accidentResponseVo.setProjectName(zjQuoteAccidentVo.getProjectName());
+            accidentResponseVo.setProjectDesc(zjQuoteAccidentVo.getProjectDesc());
+            accidentResponseVo.setQuantity(zjQuoteAccidentVo.getQuantity());
+            accidentResponseVo.setPremium(zjQuoteAccidentVo.getSumAmount());
+            accidentResponseVo.setActualPremium(actualPremium);
+            return accidentResponseVo;
+        }
+
+        public static List<AccidentResponseVo> toAccidentResponseVoList(List<CarPolicySubInfoListDTO> carPolicySubInfoList, List<ZjQuoteAccidentVo> accidentalDrivingVo) {
+            Map<String, CarPolicySubInfoListDTO> map = new HashMap<>();
+            carPolicySubInfoList.forEach(x -> map.put(x.getInsureGradeNo(), x));
+            return accidentalDrivingVo.stream().map(x -> {
+                CarPolicySubInfoListDTO carPolicySubInfoListDTO = map.get(x.getProjectCode());
+                return toAccidentResponseVo(carPolicySubInfoListDTO.getActualPremium(), x);
+            }).collect(Collectors.toList());
+        }
+
+        public static BigDecimal sumPremium(List<CarPolicySubInfoListDTO> carPolicySubInfoListDTOS) {
+            BigDecimal bigDecimal = new BigDecimal(0);
+            for (CarPolicySubInfoListDTO carPolicySubInfoListDTO : carPolicySubInfoListDTOS) {
+                bigDecimal = bigDecimal.add(new BigDecimal(carPolicySubInfoListDTO.getActualPremium()));
+            }
+            return bigDecimal;
+        }
+
+    }
+
+
     @NoArgsConstructor
     @Data
     public static class BasePartDTO implements Serializable {

+ 51 - 13
src/main/java/com/ydtech/modules/order/entity/api/zj/response/QueryClauseDataResponse.java

@@ -32,34 +32,72 @@ public class QueryClauseDataResponse extends BaseResponse implements Serializabl
     @Data
     public static class ClauseInfoDtoListDTO implements Serializable {
 
-        private static final long serialVersionUID = 2486640047109521788L;
+        private static final long serialVersionUID = -2491859617378324759L;
 
-        @ApiModelProperty("特约代码")
-        @JsonProperty("clauseCode")
-        private String clauseCode;
+        @ApiModelProperty("特约id")
+        @JsonProperty("clauseId")
+        private String clauseId;
+
+        @ApiModelProperty("特约名称")
+        @JsonProperty("clauseName")
+        private String clauseName;
 
         @ApiModelProperty("特约内容")
         @JsonProperty("clauseContent")
         private String clauseContent;
 
-        @ApiModelProperty("特约名称")
-        @JsonProperty("clauseName")
-        private String clauseName;
+        @ApiModelProperty("是否可修改")
+        @JsonProperty("modifyFlag")
+        private String modifyFlag;
 
         @ApiModelProperty("特约类型")
         @JsonProperty("clauseType")
         private String clauseType;
 
-        @ApiModelProperty("是否可修改")
-        @JsonProperty("modifyFlag")
-        private String modifyFlag;
+        @ApiModelProperty("险种代码")
+        @JsonProperty("riskCode")
+        private String riskCode;
 
         @ApiModelProperty("选择类型")
         @JsonProperty("optType")
         private String optType;
 
-        @ApiModelProperty("险种代码")
-        @JsonProperty("riskCode")
-        private String riskCode;
+        @JsonProperty("clauseFlag")
+        private String clauseFlag;
+
+        @ApiModelProperty("特约代码")
+        @JsonProperty("clauseCode")
+        private String clauseCode;
+
+        @JsonProperty("proClauseConfDto")
+        private ProClauseConfDtoDTO proClauseConfDto;
+
+        @NoArgsConstructor
+        @Data
+        public static class ProClauseConfDtoDTO implements Serializable{
+
+            private static final long serialVersionUID = -5616060670260884786L;
+
+            @JsonProperty("id")
+            private String id;
+
+            @JsonProperty("ruleName")
+            private String ruleName;
+
+            @JsonProperty("usageCode")
+            private String usageCode;
+
+            @JsonProperty("riskCode")
+            private String riskCode;
+
+            @JsonProperty("provinceCode")
+            private String provinceCode;
+
+            @JsonProperty("needState")
+            private String needState;
+
+            @JsonProperty("clauseFlag")
+            private String clauseFlag;
+        }
     }
 }

+ 0 - 1
src/main/java/com/ydtech/modules/order/entity/crawler/response/CrawlerQuoteResponse.java

@@ -87,7 +87,6 @@ public class CrawlerQuoteResponse extends CrawlerBaseResponse {
         private double lateFee;
 
 
-
     }
 
 }

+ 1 - 0
src/main/java/com/ydtech/modules/order/entity/vo/BaseQuoteInfoVo.java

@@ -11,6 +11,7 @@ import lombok.EqualsAndHashCode;
 @EqualsAndHashCode(callSuper = true)
 @Data
 public class BaseQuoteInfoVo extends YaQuoteInfoVo {
+
     private static final long serialVersionUID = -4489767537219232665L;
 
     private String orderNo;

+ 1 - 2
src/main/java/com/ydtech/modules/order/entity/vo/BaseQuoteVo.java

@@ -17,10 +17,9 @@ public class BaseQuoteVo<T> {
     @ApiModelProperty(value = "协议id", required = true)
     private String agreementId;
 
-    @ApiModelProperty("扩展实体")
+    @ApiModelProperty("驾意险")
     private T accidentalDrivingVo;
 
-
     //add 交强转保确认码  lig  2023-05-23
     @ApiModelProperty("交强转保确认码")
     private String renewalCodeJq;

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/vo/InsTaskImagesVo.java

@@ -22,7 +22,7 @@ public class InsTaskImagesVo {
     @NotBlank(message = "报价号不能为空")
     private String quoteNo;
 
-    @ApiModelProperty(value = "图片类型(C01车辆影像,C02车主身份证,C03投保人身份证,C04被保人身份证,C05验车照)")
+    @ApiModelProperty(value = "图片类型")
     @NotBlank(message = "文件类型不能为空")
     private String imageType;
 

+ 6 - 1
src/main/java/com/ydtech/modules/order/entity/vo/OrderVo.java

@@ -203,6 +203,11 @@ public class OrderVo implements Serializable {
     @TableField(value = "sypremium")
     private BigDecimal sypremium;
 
+    /**
+     * 驾意险费用
+     */
+    @TableField(value = "jypremium")
+    private BigDecimal jypremium;
     /**
      * 车船税费用
      */
@@ -291,7 +296,7 @@ public class OrderVo implements Serializable {
      * 驾意险
      */
     @TableField(value = "accident_info", typeHandler = FastjsonTypeHandler.class)
-    private JSONObject accidentInfo;
+    private JSONArray accidentInfo;
 
     /**
      * 欠税

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/vo/PolicyPrintVo.java

@@ -21,7 +21,7 @@ public class PolicyPrintVo implements Serializable {
     @ApiModelProperty("子订单")
     String companyId;
 
-    @ApiModelProperty("保险编号  0507交强  0510商业")
+    @ApiModelProperty("保险编号 0507交强  0510商业 0513 驾意险")
     String riskCode;
 
     @ApiModelProperty("1 标志 2 保单")

+ 26 - 0
src/main/java/com/ydtech/modules/order/entity/vo/zj/ZjQuoteAccidentVo.java

@@ -0,0 +1,26 @@
+package com.ydtech.modules.order.entity.vo.zj;
+
+
+import com.ydtech.modules.order.entity.api.zj.response.QueryVehicProductsResponse;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @description: 紫金财险报价驾意添加
+ * @author: wenks
+ * @date: 2023/9/6 16:51
+ **/
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@Data
+public class ZjQuoteAccidentVo extends QueryVehicProductsResponse.ProductDtoListDTO {
+
+    private static final long serialVersionUID = -6929408640408913271L;
+
+    @ApiModelProperty("份数")
+    private String quantity;
+
+
+}

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

@@ -28,9 +28,8 @@ public interface InsCrawlerOrderService extends BaseOrderService<Object> {
      *
      * @param attribution    配置归属
      * @param insCompanyName 保险公司名称
-     * @return 是否成功登陆
      */
-    void isLogin(PtlAgreementAttributionDto attribution,String companyId, String insCompanyName);
+    void isLogin(PtlAgreementAttributionDto attribution, String companyId, String insCompanyName);
 
     /**
      * 获取驾意险

+ 2 - 6
src/main/java/com/ydtech/modules/order/service/ZijinOrderApiService.java

@@ -2,7 +2,6 @@ package com.ydtech.modules.order.service;
 
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
-import com.ydtech.modules.order.entity.api.zj.request.CalculatePremiumRequest;
 import com.ydtech.modules.order.entity.api.zj.request.PaymentCallbacksRequest;
 import com.ydtech.modules.order.entity.api.zj.request.SubmitVerifyRequest;
 import com.ydtech.modules.order.entity.api.zj.response.QueryClauseDataResponse;
@@ -11,6 +10,7 @@ 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.entity.vo.SpecialAuditVo;
+import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.zj.ZjVehicleProductsQueryVo;
 
 import java.util.List;
@@ -21,9 +21,8 @@ public interface ZijinOrderApiService {
      * 报价
      *
      * @param quoteInfoVo 报价实体
-     * @return
      */
-    HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfoVo, BaseQuoteVo<List<CalculatePremiumRequest.CarPolicySubInfoListDTO>> t);
+    HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfoVo, BaseQuoteVo<List<ZjQuoteAccidentVo>> t);
 
     /**
      * 提交影像信息
@@ -44,7 +43,6 @@ public interface ZijinOrderApiService {
      * 提交核保
      *
      * @param specialAudit 核保特约
-     * @return
      */
     HttpResult<Object> audit(SpecialAuditVo<SubmitVerifyRequest.EngageListDTO> specialAudit);
 
@@ -62,7 +60,6 @@ public interface ZijinOrderApiService {
      */
     HttpResult<Object> getOrderDetail(String companyId);
 
-
     /**
      * 未缴费保单撤单
      *
@@ -70,7 +67,6 @@ public interface ZijinOrderApiService {
      */
     HttpResult<Object> cancel(String companyId);
 
-
     /**
      * 获取电子保单
      *

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

@@ -1,7 +1,6 @@
 package com.ydtech.modules.order.service.impl;
 
 import com.alibaba.fastjson.JSON;
-import com.ydtech.constants.InsuranceEnum;
 import com.ydtech.constants.enums.InsOrderStatus;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.exception.SystemException;

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

@@ -339,7 +339,7 @@ public class ZhongMeiOrderServiceImpl implements ZhongMeiOrderService {
         insAreaCompany.setSyapplyno(response.getSContractNo());
         insAreaCompany.setCompanyId(esmInsCompanies.getId());
         insAreaCompany.setInscompany(esmInsCompanies.getNamesimple());
-        insAreaCompany.setAccidentInfo(JSON.parseObject(JSON.toJSONString(accident)));
+//        insAreaCompany.setAccidentInfo(JSON.parseObject(JSON.toJSONString(accident)));
         insAreaCompany.setInsOrderNo(response.getContractMainNo());
         // 车船税
         TaxArrears taxArrears = new TaxArrears("往年欠税", response.getSumTaxDefault(), response.getSumOverdue());
@@ -348,7 +348,7 @@ public class ZhongMeiOrderServiceImpl implements ZhongMeiOrderService {
         insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));
         insAreaCompanyService.insertCompanyAndOrders(insAreaCompany);
         quoteRespVo.setCompanyId(insAreaCompany.getId());
-        quoteRespVo.setAccident(accident);
+//        quoteRespVo.setAccident(accident);
         quoteRespVo.setTaxArrears(taxArrearsList);
         return HttpResult.ok(body.getMessage(), quoteRespVo);
     }

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

@@ -27,6 +27,7 @@ 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.entity.vo.SpecialAuditVo;
+import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.zj.ZjVehicleProductsQueryVo;
 import com.ydtech.modules.order.service.InsAreaCompanyService;
 import com.ydtech.modules.order.service.InsOrdersService;
@@ -85,7 +86,7 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
 
 
     @Override
-    public HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfoVo, BaseQuoteVo<List<CalculatePremiumRequest.CarPolicySubInfoListDTO>> quoteVo) {
+    public HttpResult<QuoteRespVo> quote(BaseQuoteInfoVo quoteInfoVo, BaseQuoteVo<List<ZjQuoteAccidentVo>> quoteVo) {
         // 1. 协议id获取配置实体
         String agreementId = quoteVo.getAgreementId();
         // 1.1 账号信息
@@ -120,9 +121,8 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
         CalculatePremiumRequest calculatePremiumRequest
                 = new CalculatePremiumRequest(quoteInfoVo, vehicleModelInfosDTO, queryActualValueResponse.getActualValue(), quoteVo.getAccidentalDrivingVo(), zjConfigureParameters, modelQueryResponse);
 
-
         CalculatePremiumResponse calculatePremiumResponse = zijinRequestApiComponents.calculatePremium(calculatePremiumRequest, httpHeaders);
-        QuoteRespVo quoteRespVo = getQuoteRespVo(calculatePremiumResponse, quoteInfoVo);
+        QuoteRespVo quoteRespVo = getQuoteRespVo(calculatePremiumResponse, quoteInfoVo, quoteVo.getAccidentalDrivingVo());
         return responseOrder(calculatePremiumResponse, quoteRespVo, ptlAgreementAttribution, modelQueryResponse.getOrderId(), modelQueryResponse.getOrderNo());
     }
 
@@ -175,7 +175,7 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
         insAreaCompany.setSyapplyno(submitVerifyInfo.getProposalNo());
         insAreaCompany.setOrderstatus(InsOrderStatus.S_2.getCode());
 
-        // 2. 聚合支付服务
+        // 3. 聚合支付服务
         BigDecimal multiply = insAreaCompany.getSumpremium().multiply(new BigDecimal(100));
         ZbfAggregatePayRequest zbfAggregatePayRequest = new ZbfAggregatePayRequest(String.valueOf(multiply.intValue()), zjConfigureParameters.getAppKey(), insAreaCompany.getId());
         ZbfAggregatePayResponse zbfAggregatePayResponse = zijinRequestApiComponents.zbfAggregatePay(zbfAggregatePayRequest, httpHeaders);
@@ -229,6 +229,7 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
         String busNo;
         String busType;
         String identifyNo = customerInfoVo.getIdentifyNumber();
+
         if (InsuranceRisk.TRAFFIC.getCode().equals(policyPrintVo.getRiskCode())) {
             busNo = insAreaCompany.getJqpolicyno();
             if ("1".equals(policyPrintVo.getType())) {
@@ -236,10 +237,14 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
             } else {
                 busType = "1";
             }
-        } else {
+        } else if (InsuranceRisk.ACCIDENT.getCode().equals(policyPrintVo.getRiskCode())) {
             busNo = insAreaCompany.getSypolicyno();
             busType = "3";
+        } else {
+            busNo = insAreaCompany.getJypolicyno();
+            busType = "3";
         }
+
         String url = zijinRequestApiComponents.getDownLoadDocumentUrl(busNo, busType, identifyNo);
         return HttpResult.ok("生成成功", url);
     }
@@ -253,10 +258,10 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
         HttpHeaders httpHeaders = zijinRequestApiComponents.getHttpHeaders(insAreaCompany.getAgreementId());
 
         // 2 请求查看订单状态
-        QueryOrderDetailRequest queryOrderDetailRequest = new QueryOrderDetailRequest(insAreaCompany.getInsOrderNo());
-        QueryOrderStateResponse queryOrderStateResponse = zijinRequestApiComponents.queryOrderDetail(queryOrderDetailRequest, httpHeaders);
+        OrderNoRequest orderNoRequest = new OrderNoRequest(insAreaCompany.getId());
+        QueryOrderDetailResponse queryOrderDetailResponse = zijinRequestApiComponents.getOrderDetail(orderNoRequest, httpHeaders);
+        String orderStatus = queryOrderDetailResponse.getResultObj().getOrderStatus();
 
-        String orderStatus = queryOrderStateResponse.getUwFlag();
         if (OrderStatusEnum.O_4.getCode().equals(orderStatus)) {
             insAreaCompany.setOrderstatus(InsOrderStatus.S_3.getCode());
             insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
@@ -300,10 +305,11 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
         return null;
     }
 
-    public QuoteRespVo getQuoteRespVo(CalculatePremiumResponse calculatePremiumResponse, BaseQuoteInfoVo yaQuoteInfoVo) {
+    public QuoteRespVo getQuoteRespVo(CalculatePremiumResponse calculatePremiumResponse, BaseQuoteInfoVo yaQuoteInfoVo, List<ZjQuoteAccidentVo> accidentalDrivingVo) {
         double jqPremium = 0;
         double syPremium = 0;
         double sumPayTax = 0;
+        double jyPremium = 0;
         List<CalculatePremiumResponse.PlanListDTO> planList = calculatePremiumResponse.getPlanList();
         QuoteRespVo quoteRespVo = new QuoteRespVo();
 
@@ -351,13 +357,25 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
             kindList1.add(kind);
         }
 
+        // 驾意险
+        List<CalculatePremiumResponse.CarPolicySubInfoListDTO> carPolicySubInfoList = calculatePremiumResponse.getCarPolicySubInfoList();
+
+        if (carPolicySubInfoList != null && !carPolicySubInfoList.isEmpty()) {
+            List<AccidentResponseVo> accidentResponseVos = CalculatePremiumResponse.CarPolicySubInfoListDTO.toAccidentResponseVoList(carPolicySubInfoList, accidentalDrivingVo);
+            quoteRespVo.setAccident(accidentResponseVos);
+            // 驾意险价格
+            BigDecimal bigDecimal = CalculatePremiumResponse.CarPolicySubInfoListDTO.sumPremium(carPolicySubInfoList);
+            jyPremium = bigDecimal.doubleValue();
+        }
+
         quoteRespVo.setRiskList(riskList1);
         quoteRespVo.setKindList(kindList1);
         quoteRespVo.setJqPremium(jqPremium);
         quoteRespVo.setSyPremium(syPremium);
         quoteRespVo.setTaxAmount(sumPayTax);
+        quoteRespVo.setJyPremium(jyPremium);
         quoteRespVo.setCiSumPermium(CalculateUtils.add(jqPremium, sumPayTax));//交强险和车船税合计
-        quoteRespVo.setSumPermium(CalculateUtils.add(jqPremium, syPremium, sumPayTax));//保费合计
+        quoteRespVo.setSumPermium(CalculateUtils.add(jqPremium, syPremium, sumPayTax, jyPremium));//保费合计
         quoteRespVo.setTotalAdjustRate(0);
         quoteRespVo.setOrderno(yaQuoteInfoVo.getOrderNo()); //订单号
         return quoteRespVo;

+ 12 - 3
src/main/java/com/ydtech/modules/order/utils/InsuranceLog.java

@@ -20,13 +20,22 @@ public class InsuranceLog {
     public static final Logger logger = LoggerFactory.getLogger(InsuranceLog.class);
 
     public static void errorLog(String devId, String message, Object... objects) {
-        MDC.put(INSURE_NAME, devId);
-        logger.error(message);
+        log(devId, message, logger::error, objects);
     }
 
     public static void infoLog(String devId, String message, Object... objects) {
+        log(devId, message, logger::info, objects);
+    }
+
+    private static void log(String devId,  String message,  LogFunction<String> function, Object... objects) {
         MDC.put(INSURE_NAME, devId);
-        logger.info(message, objects);
+        function.execute(message, objects);
+        MDC.clear();
+    }
+
+    @FunctionalInterface
+    interface LogFunction<T> {
+        void execute(T value, Object... objects);
     }
 
 }

+ 3 - 1
src/main/resources/mapper/modules/order/InsOrdersMapper.xml

@@ -77,6 +77,7 @@
                 typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" jdbcType="VARCHAR"/>
         <result property="jqpremium" column="jqpremium" jdbcType="DECIMAL"/>
         <result property="sypremium" column="sypremium" jdbcType="DECIMAL"/>
+        <result property="jypremium" column="jypremium" jdbcType="DECIMAL"/>
         <result property="taxamount" column="taxamount" jdbcType="DECIMAL"/>
         <result property="sumpremium" column="sumpremium" jdbcType="DECIMAL"/>
         <result property="jqdiscountrate" column="jqdiscountrate" jdbcType="DOUBLE"/>
@@ -91,7 +92,7 @@
         <result property="syappoint" column="syappoint" jdbcType="VARCHAR"/>
         <result property="createtime" column="createtime" jdbcType="TIMESTAMP"/>
         <result property="paymentLink" column="payment_link" jdbcType="VARCHAR"/>
-        <result property="accidentInfo" column="accident_info" javaType="com.alibaba.fastjson.JSONObject"
+        <result property="accidentInfo" column="accident_info" javaType="com.alibaba.fastjson.JSONArray"
                 typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" jdbcType="VARCHAR"/>
         <result property="taxArrears" column="tax_arrears" javaType="com.alibaba.fastjson.JSONArray"
                 typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" jdbcType="VARCHAR"/>
@@ -141,6 +142,7 @@
                iac.kindinfo,
                iac.jqpremium,
                iac.sypremium,
+               iac.jypremium,
                iac.taxamount,
                iac.sumpremium,
                iac.jqdiscountrate,