Explorar el Código

Merge remote-tracking branch 'origin/master'

liub hace 2 meses
padre
commit
58c7441bee
Se han modificado 39 ficheros con 4268 adiciones y 139 borrados
  1. 6 0
      commons/src/main/java/com/jzg/commons/entity/dto/IncomeAndExpenseParam.java
  2. 6 0
      commons/src/main/java/com/jzg/commons/entity/quote/vo/orders/InsFeeCalculateRequest.java
  3. 4 0
      commons/src/main/java/com/jzg/commons/entity/quote/vo/orders/InsOrdersAdd.java
  4. 41 0
      commons/src/main/java/com/jzg/commons/entity/vo/IncomeAndExpenseList.java
  5. 6 0
      commons/src/main/java/com/jzg/commons/entity/vo/InsFeeOrdersVo.java
  6. 6 0
      commons/src/main/java/com/jzg/commons/entity/vo/InsOrdersOtherInfoVo.java
  7. 39 0
      consoleStatistics/src/main/java/com/jzg/console/controller/ReportFinanceDataManageController.java
  8. 31 0
      consoleStatistics/src/main/java/com/jzg/console/mapper/ReportReceivableDataMapper.java
  9. 24 2
      consoleStatistics/src/main/java/com/jzg/console/service/ReportReceivableDataService.java
  10. 27 2
      consoleStatistics/src/main/java/com/jzg/console/service/impl/ReportReceivableDataServiceImpl.java
  11. 193 0
      consoleStatistics/src/main/resources/mapper/ReportReceivableDataMapper.xml
  12. 167 0
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/build/AnShengCrawlerNonContractsBuild.java
  13. 3 2
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/build/AnShengCrawlerQuoteResultsVoBuild.java
  14. 31 1
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/component/AnShengCrawlerRequestComponent.java
  15. 11 1
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/constant/enums/RequestUrl.java
  16. 5 0
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/po/AnShengCrawlerOrder.java
  17. 148 0
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/po/QuotationListDTO.java
  18. 5 1
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerApplyApplicationRequest.java
  19. 1 59
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerCalculatePremiumApplyMessage.java
  20. 1298 0
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerCalculatePremiumNonApplyRequest.java
  21. 24 0
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerGetNonConfigCoveragesRequest.java
  22. 998 0
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerNonContractsDTO.java
  23. 15 9
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerPaymentRequest.java
  24. 37 0
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/response/AnShengCrawlerAutoResetTimeResponse.java
  25. 347 0
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/response/AnShengCrawlerCalculatePremiumNonApplyResponse.java
  26. 279 0
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/response/AnShengCrawlerNonConfigCoveragesResponse.java
  27. 50 0
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/response/AnShengCrawlerNonInsuranceResponse.java
  28. 147 27
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/service/impl/AnShengCrawlerRequestImpl.java
  29. 5 1
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/utils/BeanCopyUtil.java
  30. 1 1
      tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/build/HuaTaiCrawlerQuoteResultsVoBuild.java
  31. 28 4
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java
  32. 1 0
      tenant/organization/src/main/java/com/jzg/organization/controller/UserAccountController.java
  33. 10 0
      tenant/organization/src/main/java/com/jzg/organization/mapper/SysAmountAuditingMapper.java
  34. 11 1
      tenant/organization/src/main/java/com/jzg/organization/service/SysAmountAuditingService.java
  35. 16 1
      tenant/organization/src/main/java/com/jzg/organization/service/SysUserAccountService.java
  36. 5 3
      tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementServiceImpl.java
  37. 16 0
      tenant/organization/src/main/java/com/jzg/organization/service/impl/SysAmountAuditingServiceImpl.java
  38. 145 24
      tenant/organization/src/main/java/com/jzg/organization/service/impl/SysUserAccountServiceImpl.java
  39. 81 0
      tenant/organization/src/main/resources/mapper/SysAmountAuditingMapper.xml

+ 6 - 0
commons/src/main/java/com/jzg/commons/entity/dto/IncomeAndExpenseParam.java

@@ -25,4 +25,10 @@ public class IncomeAndExpenseParam {
     @Schema(description = "月份筛选 格式:yyyy-MM,例如:2026-03")
     private String month;
 
+    @Schema(description = "租户代码")
+    private String systemCode;
+
+    @Schema(description = "用户序号")
+    private String userId;
+
 }

+ 6 - 0
commons/src/main/java/com/jzg/commons/entity/quote/vo/orders/InsFeeCalculateRequest.java

@@ -70,4 +70,10 @@ public class InsFeeCalculateRequest {
 
     @Schema(description = "驾意险出口留点比例(百分比)", example = "0")
     private BigDecimal jyExportKeepPointRatio;
+    
+    /**
+     * 出口费用是否需要扣减1%
+     */
+    @Schema(description = "出口费用是否需要扣减1%")
+    private boolean isrecordByLeader;
 }

+ 4 - 0
commons/src/main/java/com/jzg/commons/entity/quote/vo/orders/InsOrdersAdd.java

@@ -11,10 +11,14 @@ import com.jzg.commons.entity.vo.InsOrdersOtherInfoVo;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
+import java.io.Serial;
+
 @Data
 @Schema(description = "订单录入保存")
 public class InsOrdersAdd extends QuoteVo {
 
+    @Serial
+    private static final long serialVersionUID = 7816759936705939136L;
     @Schema(description = "是否暂存0-保存;1-暂存")
     private int isTemporarily;
 

+ 41 - 0
commons/src/main/java/com/jzg/commons/entity/vo/IncomeAndExpenseList.java

@@ -0,0 +1,41 @@
+package com.jzg.commons.entity.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+@Data
+public class IncomeAndExpenseList {
+
+    @Schema(description = "状态 0-收入 1-支出")
+    private String incomeAndExpense;
+
+    @Schema(description = "金额")
+    private BigDecimal amount;
+
+    @Schema(description = "时间")
+    private LocalDateTime createTime;
+
+    @Schema(description = "备注")
+    private String remark;
+
+    @Schema(description = "车牌号")
+    private String licenseNo;
+
+    @Schema(description = "审核状态 0-待审核 1-审核通过 2-审核驳回")
+    private String status;
+
+    @Schema(description = "银行名称")
+    private String bankName;
+
+    @Schema(description = "用户名")
+    private String userName;
+
+    @Schema(description = "银行卡号")
+    private String bankCardNum;
+
+    @Schema(description = "驳回原因")
+    private String rejectReason;
+}

+ 6 - 0
commons/src/main/java/com/jzg/commons/entity/vo/InsFeeOrdersVo.java

@@ -194,6 +194,12 @@ public class InsFeeOrdersVo {
     @Schema(description = "租户代码")
     private String systemCode;
 
+    /**
+     * 出口费用是否需要扣减1%
+     */
+    @Schema(description = "出口费用是否需要扣减1%")
+    private boolean isrecordByLeader;
+
     public InsFeeOrdersVo(InsFeeOrders insFeeOrders) {
         this.orderNo = insFeeOrders.getOrderNo();
         this.agreementId = insFeeOrders.getAgreementId();

+ 6 - 0
commons/src/main/java/com/jzg/commons/entity/vo/InsOrdersOtherInfoVo.java

@@ -111,4 +111,10 @@ public class InsOrdersOtherInfoVo {
 
     @Schema(description = "评分json")
     private JSONArray scoreJson;
+
+    /**
+     * 出口费用是否需要扣减1%
+     */
+    @Schema(description = "出口费用是否需要扣减1%")
+    private boolean isrecordByLeader;
 }

+ 39 - 0
consoleStatistics/src/main/java/com/jzg/console/controller/ReportFinanceDataManageController.java

@@ -379,4 +379,43 @@ public class ReportFinanceDataManageController extends BaseController {
         }
     }
 
+    /**
+     * 财务数据-应收统计:按月份汇总查询应收数据
+     * 查询选中年份的私有协议(车险+非车的手续费+跟单费)应收数据,按月份汇总
+     * 返回:时间(年月)、未开票、已开票、已结算、未结算
+     * 当前以签单时间为统计维度来区分年-月
+     * @author: jk
+     */
+    @Operation(summary = "财务数据-应收统计", description = "财务数据-应收统计(按月份汇总)")
+    @PostMapping(value = "/receivableStatistics")
+    public HttpResult<?> receivableStatistics(@RequestBody ReportSearchCommonVo reportSearchCommonVo) {
+        try {
+            String systemCode = getSystemCode();
+            List<?> list = reportReceivableDataService.getReceivableStatisticsByMonth(reportSearchCommonVo, systemCode);
+            return HttpResult.ok(list);
+        } catch (Exception e) {
+            log.error("财务数据-应收统计异常", e);
+            return HttpResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 财务数据-应收统计明细:按保险公司分组查询应收数据
+     * 查询选中年月的应收数据,按保险公司分组
+     * 返回:公司ID、公司名称、应收、未开票、已开票、未结算、已结算(各包含手续费金额、跟单费金额、平台应收金额、合计金额)
+     * @author: jk
+     */
+    @Operation(summary = "财务数据-应收统计明细", description = "财务数据-应收统计明细(按保险公司分组)")
+    @PostMapping(value = "/receivableStatisticsDetail")
+    public HttpResult<?> receivableStatisticsDetail(@RequestBody ReportSearchCommonVo reportSearchCommonVo) {
+        try {
+            String systemCode = getSystemCode();
+            List<?> list = reportReceivableDataService.getReceivableStatisticsDetail(reportSearchCommonVo, systemCode);
+            return HttpResult.ok(list);
+        } catch (Exception e) {
+            log.error("财务数据-应收统计明细异常", e);
+            return HttpResult.error(e.getMessage());
+        }
+    }
+
 }

+ 31 - 0
consoleStatistics/src/main/java/com/jzg/console/mapper/ReportReceivableDataMapper.java

@@ -0,0 +1,31 @@
+package com.jzg.console.mapper;
+
+import com.jzg.commons.entity.report.dto.ReportReceivableDataDto;
+import com.jzg.commons.entity.report.dto.ReportReceivableDetailDto;
+import com.jzg.commons.entity.report.vo.ReportSearchCommonVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface ReportReceivableDataMapper {
+
+    /**
+     * 按月份统计应收数据
+     * 查询选中年份的私有协议应收数据,按月份汇总
+     * @param reportSearchCommonVo 查询参数
+     * @param systemCode 系统编码
+     * @return 按月份汇总的应收数据
+     */
+    List<ReportReceivableDataDto> getReceivableStatisticsByMonth(@Param("param") ReportSearchCommonVo reportSearchCommonVo, @Param("systemCode") String systemCode);
+
+    /**
+     * 按保险公司统计应收明细数据
+     * 查询选中年月的应收数据,按保险公司分组
+     * @param reportSearchCommonVo 查询参数
+     * @param systemCode 系统编码
+     * @return 按保险公司分组的应收明细数据
+     */
+    List<ReportReceivableDetailDto> getReceivableStatisticsDetail(@Param("param") ReportSearchCommonVo reportSearchCommonVo, @Param("systemCode") String systemCode);
+}

+ 24 - 2
consoleStatistics/src/main/java/com/jzg/console/service/ReportReceivableDataService.java

@@ -13,7 +13,7 @@ import java.util.List;
 public interface ReportReceivableDataService extends  ReportBaseService{
     /**
      *  @version
-     *  @author: hxl
+     *  @author: jk
      *  @Date: 2025/9/26 10:37
      *  @Description:  列表
      */
@@ -22,9 +22,31 @@ public interface ReportReceivableDataService extends  ReportBaseService{
 
     /**
      *  @version
-     *  @author: hxl
+     *  @author: jk
      *  @Date: 2025/9/26 10:37
      *  @Description:  明细
      */
     List<?> getDetailListByParams(ReportSearchCommonVo reportSearchCommonVo);
+
+    /**
+     *  @version
+     *  @author: jk
+     *  @Date: 2026/7/20
+     *  @Description:  财务数据-应收统计(按月份汇总)
+     *  @param reportSearchCommonVo 查询参数(包含年份)
+     *  @param systemCode 系统编码
+     *  @return 按月份汇总的应收数据列表
+     */
+    List<?> getReceivableStatisticsByMonth(ReportSearchCommonVo reportSearchCommonVo, String systemCode);
+
+    /**
+     *  @version
+     *  @author: jk
+     *  @Date: 2026/7/20
+     *  @Description:  财务数据-应收统计明细(按保险公司分组)
+     *  @param reportSearchCommonVo 查询参数(包含年月)
+     *  @param systemCode 系统编码
+     *  @return 按保险公司分组的应收明细数据列表
+     */
+    List<?> getReceivableStatisticsDetail(ReportSearchCommonVo reportSearchCommonVo, String systemCode);
 }

+ 27 - 2
consoleStatistics/src/main/java/com/jzg/console/service/impl/ReportReceivableDataServiceImpl.java

@@ -1,15 +1,15 @@
 package com.jzg.console.service.impl;
 
-
-
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.jzg.commons.entity.report.dto.*;
 import com.jzg.commons.entity.report.vo.ReportSearchCommonVo;
+import com.jzg.console.mapper.ReportReceivableDataMapper;
 import com.jzg.console.service.ReportReceivableDataService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -27,6 +27,9 @@ public class ReportReceivableDataServiceImpl extends ReportBaseServiceImpl imple
 
     private static final Logger log = LoggerFactory.getLogger(ReportReceivableDataServiceImpl.class);
 
+    @Autowired
+    private ReportReceivableDataMapper reportReceivableDataMapper;
+
     /**
      *  @version
      *  @author: hxl
@@ -122,4 +125,26 @@ public class ReportReceivableDataServiceImpl extends ReportBaseServiceImpl imple
         list.add(reportReceivableDataDetailDto);
         return list;
     }
+
+    @Override
+    public List<?> getReceivableStatisticsByMonth(ReportSearchCommonVo reportSearchCommonVo, String systemCode) {
+        log.info("财务数据-应收统计(按月份汇总). reportSearchCommonVo=[{}], systemCode=[{}]", JSONUtil.toJsonStr(reportSearchCommonVo), systemCode);
+        List<String> years = reportSearchCommonVo.getYear();
+        if (CollUtil.isEmpty(years)) {
+            log.warn("查询年份为空,返回空列表");
+            return new ArrayList<>();
+        }
+        return reportReceivableDataMapper.getReceivableStatisticsByMonth(reportSearchCommonVo, systemCode);
+    }
+
+    @Override
+    public List<?> getReceivableStatisticsDetail(ReportSearchCommonVo reportSearchCommonVo, String systemCode) {
+        log.info("财务数据-应收统计明细(按保险公司分组). reportSearchCommonVo=[{}], systemCode=[{}]", JSONUtil.toJsonStr(reportSearchCommonVo), systemCode);
+        List<String> years = reportSearchCommonVo.getYear();
+        if (CollUtil.isEmpty(years)) {
+            log.warn("查询年份为空,返回空列表");
+            return new ArrayList<>();
+        }
+        return reportReceivableDataMapper.getReceivableStatisticsDetail(reportSearchCommonVo, systemCode);
+    }
 }

+ 193 - 0
consoleStatistics/src/main/resources/mapper/ReportReceivableDataMapper.xml

@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jzg.console.mapper.ReportReceivableDataMapper">
+
+    <resultMap id="ReceivableStatisticsResultMap" type="com.jzg.commons.entity.report.dto.ReportReceivableDataDto">
+        <result column="year_and_month_time" property="yearAndMonthTime"/>
+        <result column="total_receivable" property="accountsReceivableMoney"/>
+        <result column="uninvoiced_money" property="uninvoicedMoney"/>
+        <result column="invoiced_money" property="invoicedMoney"/>
+        <result column="settled_money" property="settledMoney"/>
+        <result column="unsettled_money" property="unsettledMoney"/>
+    </resultMap>
+
+    <resultMap id="ReceivableDetailResultMap" type="com.jzg.commons.entity.report.dto.ReportReceivableDetailDto">
+        <result column="company_id" property="companyId"/>
+        <result column="company_name" property="companyName"/>
+        <result column="receivable_commission_fee" property="receivable.commissionFee"/>
+        <result column="receivable_follow_fee" property="receivable.followFee"/>
+        <result column="receivable_platform" property="receivable.platformReceivable"/>
+        <result column="receivable_total" property="receivable.totalAmount"/>
+        <result column="uninvoiced_commission_fee" property="uninvoiced.commissionFee"/>
+        <result column="uninvoiced_follow_fee" property="uninvoiced.followFee"/>
+        <result column="uninvoiced_platform" property="uninvoiced.platformReceivable"/>
+        <result column="uninvoiced_total" property="uninvoiced.totalAmount"/>
+        <result column="invoiced_commission_fee" property="invoiced.commissionFee"/>
+        <result column="invoiced_follow_fee" property="invoiced.followFee"/>
+        <result column="invoiced_platform" property="invoiced.platformReceivable"/>
+        <result column="invoiced_total" property="invoiced.totalAmount"/>
+        <result column="unsettled_commission_fee" property="unsettled.commissionFee"/>
+        <result column="unsettled_follow_fee" property="unsettled.followFee"/>
+        <result column="unsettled_platform" property="unsettled.platformReceivable"/>
+        <result column="unsettled_total" property="unsettled.totalAmount"/>
+        <result column="settled_commission_fee" property="settled.commissionFee"/>
+        <result column="settled_follow_fee" property="settled.followFee"/>
+        <result column="settled_platform" property="settled.platformReceivable"/>
+        <result column="settled_total" property="settled.totalAmount"/>
+    </resultMap>
+
+    <select id="getReceivableStatisticsByMonth" resultMap="ReceivableStatisticsResultMap">
+        SELECT
+            r.year_and_month_time,
+            r.total_receivable,
+            (r.private_receivable - COALESCE(i.invoiced_money, 0)) AS uninvoiced_money,
+            COALESCE(i.invoiced_money, 0) AS invoiced_money,
+            COALESCE(s.settled_money, 0) AS settled_money,
+            (r.total_receivable - COALESCE(s.settled_money, 0)) AS unsettled_money
+        FROM (
+            SELECT
+                CONCAT(YEAR(ipi.signing_time), '-', LPAD(MONTH(ipi.signing_time), 2, '0')) AS year_and_month_time,
+                SUM(COALESCE(ipi.jq_receivable_premium, 0) + COALESCE(ipi.sy_receivable_premium, 0) + COALESCE(ipi.jy_receivable_premium, 0)) AS total_receivable,
+                SUM(
+                    COALESCE(ipi.jq_supervise_costs_premiums, 0) + COALESCE(ipi.sy_supervise_costs_premiums, 0) +
+                    COALESCE(ipi.jy_supervise_costs_premiums, 0) +
+                    COALESCE(ipi.jq_other_costs_premiums, 0) + COALESCE(ipi.sy_other_costs_premiums, 0) +
+                    COALESCE(ipi.jy_other_costs_premiums, 0)
+                ) AS private_receivable
+            FROM ins_ply_income ipi
+            WHERE ipi.is_delete = 0
+                AND ipi.system_code = #{systemCode}
+                AND YEAR(ipi.signing_time) between #{param.year[0]} and #{param.year[1]}
+            GROUP BY CONCAT(YEAR(ipi.signing_time), '-', LPAD(MONTH(ipi.signing_time), 2, '0'))
+        ) r
+        LEFT JOIN (
+            SELECT
+                CONCAT(YEAR(ipii.create_time), '-', LPAD(MONTH(ipii.create_time), 2, '0')) AS year_and_month_time,
+                SUM(COALESCE(ipii.receivable_supervise_premium, 0)) AS invoiced_money
+            FROM ins_ply_income_invoice ipii
+            WHERE ipii.is_delete = 0
+                AND ipii.system_code = #{systemCode}
+                AND ipii.invoice_type IN ('1','2','3','4')
+                AND YEAR(ipii.create_time) between #{param.year[0]} and #{param.year[1]}
+            GROUP BY CONCAT(YEAR(ipii.create_time), '-', LPAD(MONTH(ipii.create_time), 2, '0'))
+        ) i ON r.year_and_month_time = i.year_and_month_time
+        LEFT JOIN (
+            SELECT
+                CONCAT(YEAR(ipiis.create_time), '-', LPAD(MONTH(ipiis.create_time), 2, '0')) AS year_and_month_time,
+                SUM(COALESCE(ipiis.actual_received_amount, 0)) AS settled_money
+            FROM ins_ply_income_invoice_settlement ipiis
+            LEFT JOIN ins_ply_income_invoice ipii ON ipii.id = ipiis.invoice_id AND ipii.is_delete = 0
+            WHERE ipiis.is_delete = 0
+                AND ipii.system_code = #{systemCode}
+                AND ipii.invoice_type IN ('1','2','3','4','5','6')
+                AND YEAR(ipiis.create_time) between #{param.year[0]} and #{param.year[1]}
+            GROUP BY CONCAT(YEAR(ipiis.create_time), '-', LPAD(MONTH(ipiis.create_time), 2, '0'))
+        ) s ON r.year_and_month_time = s.year_and_month_time
+        ORDER BY r.year_and_month_time ASC
+    </select>
+
+    <select id="getReceivableStatisticsDetail" resultMap="ReceivableDetailResultMap">
+        SELECT
+            rc.company_id,
+            (SELECT NAME FROM esm_ins_company WHERE id = rc.company_id) AS company_name,
+            COALESCE(rc.receivable_commission, 0) AS receivable_commission_fee,
+            COALESCE(rc.receivable_follow, 0) AS receivable_follow_fee,
+            COALESCE(rc.receivable_platform, 0) AS receivable_platform,
+            (COALESCE(rc.receivable_commission, 0) + COALESCE(rc.receivable_follow, 0) + COALESCE(rc.receivable_platform, 0)) AS receivable_total,
+            -- 相减小于0则取0
+            GREATEST((COALESCE(rc.receivable_commission, 0) - COALESCE(i.invoiced_commission, 0)), 0) AS uninvoiced_commission_fee,
+            -- 相减小于0则取0
+            GREATEST((COALESCE(rc.receivable_follow, 0) - COALESCE(i.invoiced_follow, 0)), 0) AS uninvoiced_follow_fee,
+            0 AS uninvoiced_platform,
+            GREATEST(
+                    COALESCE(rc.receivable_commission, 0) + COALESCE(rc.receivable_follow, 0)
+                        - COALESCE(i.invoiced_commission, 0) - COALESCE(i.invoiced_follow, 0),
+                    0
+            ) AS uninvoiced_total,
+            COALESCE(i.invoiced_commission, 0) AS invoiced_commission_fee,
+            COALESCE(i.invoiced_follow, 0) AS invoiced_follow_fee,
+            0 AS invoiced_platform,
+            (COALESCE(i.invoiced_commission, 0) + COALESCE(i.invoiced_follow, 0)) AS invoiced_total,
+            COALESCE(us.unsettled_commission, 0) AS unsettled_commission_fee,
+            COALESCE(us.unsettled_follow, 0) AS unsettled_follow_fee,
+            COALESCE(us.unsettled_platform, 0) AS unsettled_platform,
+            (COALESCE(us.unsettled_commission, 0) + COALESCE(us.unsettled_follow, 0) + COALESCE(us.unsettled_platform, 0)) AS unsettled_total,
+            COALESCE(s.settled_commission, 0) AS settled_commission_fee,
+            COALESCE(s.settled_follow, 0) AS settled_follow_fee,
+            COALESCE(s.settled_platform, 0) AS settled_platform,
+            COALESCE(s.settled_commission, 0) + COALESCE(s.settled_follow, 0) + COALESCE(s.settled_platform, 0) AS settled_total
+        FROM (
+            SELECT
+                ipi.company_id AS company_id,
+                SUM(COALESCE(ipi.jq_supervise_costs_premiums, 0) + COALESCE(ipi.sy_supervise_costs_premiums, 0) + COALESCE(ipi.jy_supervise_costs_premiums, 0)) AS receivable_commission,
+                SUM(COALESCE(ipi.jq_other_costs_premiums, 0) + COALESCE(ipi.sy_other_costs_premiums, 0) + COALESCE(ipi.jy_other_costs_premiums, 0)) AS receivable_follow,
+                SUM(COALESCE(ipi.jq_receivable_premium, 0) + COALESCE(ipi.sy_receivable_premium, 0) + COALESCE(ipi.jy_receivable_premium, 0)) -
+                SUM(COALESCE(ipi.jq_supervise_costs_premiums, 0) + COALESCE(ipi.sy_supervise_costs_premiums, 0) + COALESCE(ipi.jy_supervise_costs_premiums, 0) +
+                    COALESCE(ipi.jq_other_costs_premiums, 0) + COALESCE(ipi.sy_other_costs_premiums, 0) + COALESCE(ipi.jy_other_costs_premiums, 0)) AS receivable_platform
+            FROM ins_ply_income ipi
+            WHERE ipi.is_delete = 0
+                AND ipi.system_code = #{systemCode}
+                AND YEAR(ipi.signing_time) between #{param.year[0]} and #{param.year[1]}
+            GROUP BY ipi.company_id, ipi.company_name
+        ) rc
+        LEFT JOIN (
+            SELECT
+                ipii.company_id AS company_id,
+                SUM(CASE WHEN ipii.invoice_type IN ('1','3') THEN COALESCE(ipii.receivable_supervise_premium, 0) ELSE 0 END) AS invoiced_commission,
+                SUM(CASE WHEN ipii.invoice_type IN ('2','4') THEN COALESCE(ipii.receivable_supervise_premium, 0) ELSE 0 END) AS invoiced_follow
+            FROM ins_ply_income_invoice ipii
+            WHERE ipii.is_delete = 0
+                AND ipii.system_code = #{systemCode}
+                AND ipii.invoice_type IN ('1','2','3','4')
+                AND YEAR(ipii.create_time) between #{param.year[0]} and #{param.year[1]}
+            GROUP BY ipii.company_id
+        ) i ON rc.company_id = i.company_id
+        LEFT JOIN (
+        SELECT
+            t.company_id,
+            t.settled_commission,
+            t.settled_follow,
+            t.settled_platform + plat.plat_amount AS settled_platform
+        FROM (
+            SELECT
+                ipii.company_id AS company_id,
+                SUM(CASE WHEN ipii.invoice_type IN ('1','3') THEN COALESCE(ipiis.actual_received_amount, 0) ELSE 0 END) AS settled_commission,
+                SUM(CASE WHEN ipii.invoice_type IN ('2','4') THEN COALESCE(ipiis.actual_received_amount, 0) ELSE 0 END) AS settled_follow,
+                SUM(CASE WHEN ipii.invoice_type IN ('5','6') THEN COALESCE(ipiis.actual_received_amount, 0) ELSE 0 END) AS settled_platform
+            FROM ins_ply_income_invoice_settlement ipiis
+            LEFT JOIN ins_ply_income_invoice ipii
+                ON ipii.id = ipiis.invoice_id
+                AND ipii.is_delete = 0
+                AND ipii.system_code = #{systemCode}
+            WHERE ipiis.is_delete = 0
+                AND YEAR(ipiis.create_time) between #{param.year[0]} and #{param.year[1]}
+                AND ipii.company_id IS NOT NULL
+            GROUP BY ipii.company_id
+            ) t
+            CROSS JOIN (
+            SELECT SUM(COALESCE(ipiis.actual_received_amount,0)) AS plat_amount
+            FROM ins_ply_income_invoice_settlement ipiis
+            LEFT JOIN ins_ply_income_invoice ipii
+                ON ipii.id = ipiis.invoice_id
+                AND ipii.is_delete = 0
+                AND ipii.system_code = #{systemCode}
+            WHERE ipiis.is_delete = 0
+                AND YEAR(ipiis.create_time) between #{param.year[0]} and #{param.year[1]}
+                AND ipii.company_id IS NULL
+            ) plat
+        ) s ON rc.company_id = s.company_id
+        LEFT JOIN (
+            SELECT
+                ipii.company_id AS company_id,
+                SUM(CASE WHEN ipii.invoice_type IN ('1','3') AND ipii.status = '0' THEN COALESCE(ipii.receivable_supervise_premium, 0) ELSE 0 END) AS unsettled_commission,
+                SUM(CASE WHEN ipii.invoice_type IN ('2','4') AND ipii.status = '0' THEN COALESCE(ipii.receivable_supervise_premium, 0) ELSE 0 END) AS unsettled_follow,
+                SUM(CASE WHEN ipii.invoice_type IN ('5','6') AND ipii.status = '0' THEN COALESCE(ipii.receivable_supervise_premium, 0) ELSE 0 END) AS unsettled_platform
+            FROM ins_ply_income_invoice ipii
+            WHERE ipii.is_delete = 0
+                AND ipii.system_code = #{systemCode}
+                AND ipii.invoice_type IN ('1','2','3','4','5','6')
+                AND YEAR(ipii.create_time) between #{param.year[0]} and #{param.year[1]}
+            GROUP BY ipii.company_id
+        ) us ON rc.company_id = us.company_id
+    </select>
+</mapper>

+ 167 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/build/AnShengCrawlerNonContractsBuild.java

@@ -0,0 +1,167 @@
+package com.jzg.quotation.ansheng.crawler.build;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.convert.Convert;
+import com.alibaba.fastjson2.JSONArray;
+import com.google.common.collect.Lists;
+import com.jzg.quotation.ansheng.crawler.entity.po.QuotationListDTO;
+import com.jzg.quotation.ansheng.crawler.entity.request.AnShengCrawlerApplyApplicationRequest;
+import com.jzg.quotation.ansheng.crawler.entity.request.AnShengCrawlerCalculatePremiumApplyMessage;
+import com.jzg.quotation.ansheng.crawler.entity.request.AnShengCrawlerNonContractsDTO;
+import com.jzg.quotation.ansheng.crawler.entity.response.AnShengCrawlerNonInsuranceResponse;
+import lombok.extern.slf4j.Slf4j;
+
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+public final class AnShengCrawlerNonContractsBuild {
+
+
+    public static Map<String,Object> build(AnShengCrawlerApplyApplicationRequest applicationRequest,Map<String, Object> stringObjectMap){
+        try {
+            List contracts = Convert.toList(stringObjectMap.get("contracts"));
+            AnShengCrawlerNonInsuranceResponse fex = applicationRequest.getFex();
+            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+            AnShengCrawlerApplyApplicationRequest.ContractsDTO contractsDTO = applicationRequest.getContracts()
+                    .stream()
+                    .filter(v -> "105".equals(v.getPolicyBase().getPlanCode()))
+                    .findFirst()
+                    .orElse(new AnShengCrawlerApplyApplicationRequest.ContractsDTO());
+            List<QuotationListDTO> quotationList = contractsDTO.getQuotationList();
+            for (QuotationListDTO dto : quotationList) {
+                AnShengCrawlerNonContractsDTO nonContractsDTO = new AnShengCrawlerNonContractsDTO();
+                nonContractsDTO.setAgentDefine(new AnShengCrawlerNonContractsDTO.AgentDefine(contractsDTO.getPolicyBase().getAgentCode()));
+                nonContractsDTO.setDepartmentDefine(new AnShengCrawlerNonContractsDTO.DepartmentDefine(contractsDTO.getPolicyBase().getDepartmentCode()));
+                AnShengCrawlerNonContractsDTO.PolicyBase policyBaseDTO = new AnShengCrawlerNonContractsDTO.PolicyBase();
+                BeanUtil.copyProperties(contractsDTO.getPolicyBase(),policyBaseDTO);
+
+                policyBaseDTO.setMainVersionNo("Z20211104309005");
+                policyBaseDTO.setTargetType("accidentTarget");
+                policyBaseDTO.setModelEnergyType("0");
+                policyBaseDTO.setTotalInsuredAmount(0);
+                policyBaseDTO.setTotalActualSumPremium(dto.getTotalActualPremium());
+                policyBaseDTO.setTotalNetPremium(dto.getTotalNetPremium());
+                policyBaseDTO.setAddedValueTax(dto.getAddedValueTax());
+                policyBaseDTO.setInsuranceBeginTime(dto.getInsuranceBeginTime().format(formatter));
+                policyBaseDTO.setInsuranceEndTime(dto.getInsuranceEndTime().format(formatter));
+                policyBaseDTO.setPlanCode(dto.getPlanCode());
+                policyBaseDTO.setProductCode(dto.getProductCode());
+                policyBaseDTO.setTotalStandardPremium(dto.getTotalStandardPremium());
+                policyBaseDTO.setTotalActualPremium(dto.getTotalActualPremium());
+                policyBaseDTO.setTotalAgreePremium(dto.getTotalAgreePremium());
+                nonContractsDTO.setPolicyBase(policyBaseDTO);
+                nonContractsDTO.setPolicyAttachments(Lists.newArrayList());
+
+                AnShengCrawlerNonContractsDTO.Target target = new AnShengCrawlerNonContractsDTO.Target();
+                BeanUtil.copyProperties(contractsDTO.getTargetList().get(0),target);
+                nonContractsDTO.setTargetList(buildNonTargetDTO(contractsDTO.getPolicyPersons(),target));
+                nonContractsDTO.setPolicyCoverages(BeanUtil.copyToList(fex.getDtoList(),AnShengCrawlerNonContractsDTO.PolicyCoverage.class));
+                nonContractsDTO.setPolicyPersons(BeanUtil.copyToList(contractsDTO.getPolicyPersons(),AnShengCrawlerNonContractsDTO.PolicyPerson.class));
+                AnShengCrawlerNonContractsDTO.SaleBusinessSource saleBusinessSource = new AnShengCrawlerNonContractsDTO.SaleBusinessSource();
+                BeanUtil.copyProperties(contractsDTO.getSaleBusinessSource(),saleBusinessSource);
+                nonContractsDTO.setSaleBusinessSource(saleBusinessSource);
+                nonContractsDTO.setPolicyRatioList(Lists.newArrayList());
+                AnShengCrawlerNonContractsDTO.PolicyPayments policyPayments = new AnShengCrawlerNonContractsDTO.PolicyPayments();
+                BeanUtil.copyProperties(contractsDTO.getPolicyPayments().get(0),policyPayments);
+                policyPayments.setActualPremium(dto.getTotalActualPremium());
+                nonContractsDTO.setPolicyPayments(policyPayments);
+                AnShengCrawlerNonContractsDTO.BillInfoDetail billInfoDetail = new AnShengCrawlerNonContractsDTO.BillInfoDetail();
+                BeanUtil.copyProperties(contractsDTO.getBillInfoDetail(),billInfoDetail);
+                billInfoDetail.setBillType("2");
+                nonContractsDTO.setBillInfoDetail(billInfoDetail);
+
+                AnShengCrawlerNonContractsDTO.OverlayVehicle overlayVehicle = new AnShengCrawlerNonContractsDTO.OverlayVehicle();
+                BeanUtil.copyProperties(contractsDTO.getTargetList().get(0),overlayVehicle);
+                nonContractsDTO.setOverlayVehicle(overlayVehicle);
+                nonContractsDTO.setOverlayRatios(buildOverlayRatios());
+                contracts.add(nonContractsDTO);
+            }
+            stringObjectMap.put("contracts",contracts);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return stringObjectMap;
+    }
+
+    public static List<AnShengCrawlerNonContractsDTO.OverlayRatio> buildOverlayRatios(){
+        String json = "[{\"linkId\":\"\",\"ratio\":\"\",\"discountValue\":\"\",\"dutyCode\":\"OD\",\"factorCode\":\"F44\",\"factorValue\":\"V6\",\"ratioOd\":1,\"ratioTp\":1,\"ratioTheft\":1,\"ratioOther\":1,\"ratiototal\":1}," +
+                "{\"linkId\":\"\",\"ratio\":\"\",\"discountValue\":\"\",\"dutyCode\":\"OD\",\"factorCode\":\"F89\",\"ratioOd\":1,\"ratioTp\":1,\"ratioTheft\":1,\"ratioOther\":1,\"ratiototal\":1}," +
+                "{\"linkId\":\"\",\"ratio\":\"\",\"discountValue\":\"\",\"dutyCode\":\"OD\",\"factorCode\":\"F87\",\"ratioOd\":1,\"ratioTp\":1,\"ratioTheft\":1,\"ratioOther\":1,\"ratiototal\":1}," +
+                "{\"linkId\":\"\",\"ratio\":\"\",\"discountValue\":\"\",\"dutyCode\":\"OD\",\"factorCode\":\"F84\",\"factorValue\":\"4A\",\"ratioOd\":1,\"ratioTp\":0.8,\"ratioTheft\":1,\"ratioOther\":0.8,\"ratiototal\":0.8}," +
+                "{\"linkId\":\"\",\"ratio\":\"\",\"discountValue\":\"\",\"dutyCode\":\"OD\",\"factorCode\":\"F45\",\"factorValue\":\"A1\",\"ratioOd\":1,\"ratioTp\":0.8,\"ratioTheft\":1,\"ratioOther\":1,\"ratiototal\":0.8}]";
+        return JSONArray.parseArray(json, AnShengCrawlerNonContractsDTO.OverlayRatio.class);
+    }
+
+    public static List<AnShengCrawlerNonContractsDTO.Target> buildNonTargetDTO(List<AnShengCrawlerCalculatePremiumApplyMessage.ContractsDTO.PolicyPersonsDTO> policyPersonsDTOList,
+                                                                                                       AnShengCrawlerNonContractsDTO.Target nonTarget){
+
+        AnShengCrawlerCalculatePremiumApplyMessage.ContractsDTO.PolicyPersonsDTO  bb = null;
+        AnShengCrawlerCalculatePremiumApplyMessage.ContractsDTO.PolicyPersonsDTO  tb = null;
+        for (AnShengCrawlerCalculatePremiumApplyMessage.ContractsDTO.PolicyPersonsDTO personsDTO : policyPersonsDTOList) {
+            if ("0100000000".equals(personsDTO.getPersonnelAttribute())){
+                tb = personsDTO;
+            }
+            if ("1000000000".equals(personsDTO.getPersonnelAttribute())){
+                bb = personsDTO;
+            }
+        }
+        String relationshipPersons = "";
+        String relationships = "";
+        if (tb.getPersonnelInfoBase().getPerson().getPersonnelName().equals(bb.getPersonnelInfoBase().getPerson().getPersonnelName())){
+            relationshipPersons="1";
+            relationships="本人";
+        }else {
+            relationshipPersons = "5";
+            relationships = "其他";
+        }
+        AnShengCrawlerCalculatePremiumApplyMessage.ContractsDTO.PolicyPersonsDTO.PersonnelInfoBaseDTO.PersonDTO person = bb.getPersonnelInfoBase().getPerson();
+        nonTarget.setTargetType("accidentTarget");
+        nonTarget.setRelApplicant(relationshipPersons);
+        nonTarget.setRelInsured(relationshipPersons);
+        nonTarget.setPersonName(person.getPersonnelName());
+        nonTarget.setCertiType("1");
+        nonTarget.setCertiCode(person.getCertificateNo());
+        nonTarget.setGender(person.getSexCode());
+        nonTarget.setMobileTelephone(person.getMobileTelephone());
+        nonTarget.setDob(person.getBirthday());
+        nonTarget.setOccupationType("65");
+        nonTarget.setIsHaveSocial("1");
+        nonTarget.setAccNation("142");
+        nonTarget.setLongExpiredDate("0");
+        nonTarget.setBeneficiaryList(new ArrayList<>(0));
+        nonTarget.setBenefit("1");
+        nonTarget.setShebao("1");
+        nonTarget.setIsBeneficiary(false);
+        nonTarget.setRelationshipPersons(relationshipPersons);
+        nonTarget.setRelationships(relationships);
+        nonTarget.setPhoneOwnerCertiType("身份证");
+        nonTarget.setTeleNoOwnerIsSelfFlag("1");
+        nonTarget.setLongTime(false);
+        nonTarget.setCertificateType("1");
+        nonTarget.setCertificateNo(person.getCertificateNo());
+        nonTarget.setSex(person.getSexCode());
+        nonTarget.setAge(person.getPersonnelAge());
+        nonTarget.setBirthday(person.getBirthday());
+        nonTarget.setNationality("142");
+        nonTarget.setMobileTelephones(person.getMobileTelephone());
+        nonTarget.setStart("1");
+        nonTarget.setPersonnelName(person.getPersonnelName());
+        nonTarget.setVipMark("1");
+        nonTarget.setPersonTypeOverseas("0");
+        nonTarget.setHomeAddrShow("");
+        nonTarget.setGroupCode(null);
+        nonTarget.setGroupName(null);
+        List<AnShengCrawlerNonContractsDTO.Target> list = new ArrayList<>();
+        list.add(nonTarget);
+        return list;
+    }
+
+
+
+
+
+
+}

+ 3 - 2
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/build/AnShengCrawlerQuoteResultsVoBuild.java

@@ -37,7 +37,7 @@ public final class AnShengCrawlerQuoteResultsVoBuild {
      * @param calculatePremiumApply 报价响应信息
      * @return 报价返回信息
      */
-    public static QuoteResultsVo buildQuoteResultsVo(final String ordersNo, QuoteVo quoteVo, AnShengCrawlerCalculatePremiumApplyResponse calculatePremiumApply) {
+    public static QuoteResultsVo buildQuoteResultsVo(final String ordersNo, QuoteVo quoteVo, AnShengCrawlerCalculatePremiumApplyResponse calculatePremiumApply,BigDecimal fcxPrice) {
         QuoteResultsVo quoteResultsVo = new QuoteResultsVo();
         quoteResultsVo.setOrdersNo(ordersNo);
 
@@ -74,8 +74,9 @@ public final class AnShengCrawlerQuoteResultsVoBuild {
         BigDecimal bi = costs.getBiPremium() == null ? BigDecimal.ZERO : new BigDecimal(costs.getBiPremium());
         BigDecimal ci = costs.getCiPremium() == null ? BigDecimal.ZERO : new BigDecimal(costs.getCiPremium());
         BigDecimal vv = costs.getVvTax() == null ? BigDecimal.ZERO : new BigDecimal(costs.getVvTax());
-        BigDecimal total = bi.add(ci).add(vv);
+        BigDecimal total = bi.add(ci).add(vv).add(fcxPrice);
         String totalStr = total.toPlainString();
+        costs.setNiPremium(BigDecimal.ZERO.compareTo(fcxPrice) == 0 ? "0" : fcxPrice.toPlainString());
         costs.setSumPremium(totalStr);
         quoteResultsVo.setScoreVo(buildScoreVo(calculatePremiumApply));
         quoteResultsVo.setQuoteStatusEnum(InsOrderStatusEnum.WAIT_AUDIT);

+ 31 - 1
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/component/AnShengCrawlerRequestComponent.java

@@ -185,6 +185,18 @@ public class AnShengCrawlerRequestComponent {
         return post(RequestUrl.CALCULATE_PREMIUM_APPLY, message, AnShengCrawlerCalculatePremiumApplyResponse.class, headers);
     }
 
+
+    /**
+     * 保费计算
+     *
+     * @param message 报价参数
+     * @param headers 请求头
+     * @return 报价返回
+     */
+    public AnShengCrawlerAutoResetTimeResponse autoResetTime(AnShengCrawlerCalculatePremiumApplyMessage message, HttpHeaders headers) {
+        return post(RequestUrl.AUTO_RESET_TIME, message, AnShengCrawlerAutoResetTimeResponse.class, headers);
+    }
+
     /**
      * 车架号查询车型
      *
@@ -226,7 +238,7 @@ public class AnShengCrawlerRequestComponent {
      * @param headers 请求头
      * @return 报价返回信息
      */
-    public AnShengCrawlerApplyApplicationResponse applyApplication(AnShengCrawlerApplyApplicationRequest request, HttpHeaders headers) {
+    public AnShengCrawlerApplyApplicationResponse applyApplication(Map<String, Object> request, HttpHeaders headers) {
         return post(RequestUrl.APPLY_APPLICATION, request, AnShengCrawlerApplyApplicationResponse.class, headers);
     }
 
@@ -397,4 +409,22 @@ public class AnShengCrawlerRequestComponent {
                 .map(HttpEntity::getBody)
                 .orElseThrow(() -> new SystemException("程序异常请联系管理员"));
     }
+
+    public AnShengCrawlerNonConfigCoveragesResponse getNonConfigCoverages(AnShengCrawlerGetNonConfigCoveragesRequest coveragesRequest, HttpHeaders headers) {
+        MultiValueMap<String, Object> map = new LinkedMultiValueMap<>();
+        map.set("message", JSONObject.toJSONString(coveragesRequest));
+        ResponseEntity<AnShengCrawlerNonConfigCoveragesResponse> responseEntity = requestComponent.formData(RequestUrl.GET_NON_CONFIG_COVERAGES.getRequestUrl(anShengCrawlerProperties.getUrl()), map, AnShengCrawlerNonConfigCoveragesResponse.class, headers);
+        return Optional.ofNullable(responseEntity)
+                .map(HttpEntity::getBody)
+                .orElseThrow(() -> new SystemException("程序异常请联系管理员"));
+    }
+
+    public AnShengCrawlerCalculatePremiumNonApplyResponse calculatePremiumNonApply(AnShengCrawlerCalculatePremiumNonApplyRequest applyRequest, HttpHeaders headers) {
+        MultiValueMap<String, Object> map = new LinkedMultiValueMap<>();
+        map.set("message",JSON.toJSONString(applyRequest,SerializerFeature.DisableCircularReferenceDetect,SerializerFeature.WriteSlashAsSpecial,SerializerFeature.QuoteFieldNames,SerializerFeature.PrettyFormat));
+        ResponseEntity<AnShengCrawlerCalculatePremiumNonApplyResponse> responseEntity = requestComponent.formData(RequestUrl.CALCULATE_PREMIUM_NON_APPLY.getRequestUrl(anShengCrawlerProperties.getUrl()), map, AnShengCrawlerCalculatePremiumNonApplyResponse.class, headers);
+        return Optional.ofNullable(responseEntity)
+                .map(HttpEntity::getBody)
+                .orElseThrow(() -> new SystemException("程序异常请联系管理员"));
+    }
 }

+ 11 - 1
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/constant/enums/RequestUrl.java

@@ -56,7 +56,17 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
     QUERY_AUTO_UNDERWRITE_INFO("/portalapi/queryAutoUnderwriteInfo", "归属登录"),
 
     //   获取销售单
-    GET_SALE_SLIP("/portalapi/getSaleSlip", "获取销售单")
+    GET_SALE_SLIP("/portalapi/getSaleSlip", "获取销售单"),
+
+
+    //   获取非配置保险
+    GET_NON_CONFIG_COVERAGES("/portalapi/getNonConfigCoverages", "获取非配置保险"),
+
+    //   非车险计算保费
+    CALCULATE_PREMIUM_NON_APPLY("/portalapi/calculatePremiumNonApply", "非车险计算保费"),
+
+    //   非车险计算保费
+    AUTO_RESET_TIME("/portalapi/autoResetTime", "非车险计算保费")
 
 
     ;

+ 5 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/po/AnShengCrawlerOrder.java

@@ -75,6 +75,11 @@ public class AnShengCrawlerOrder {
          */
         private String niPolicyNo;
 
+        /**
+         * 产品代码
+         */
+        private String productCode;
+
     }
 
 }

+ 148 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/po/QuotationListDTO.java

@@ -0,0 +1,148 @@
+package com.jzg.quotation.ansheng.crawler.entity.po;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+public  class QuotationListDTO {
+    @JsonProperty("applyPolicyNo")
+    private String applyPolicyNo;
+
+    /** 计划名称 */
+    @JsonProperty("planCodeName")
+    private String planCodeName;
+
+    /** 计划代码 */
+    @JsonProperty("planCode")
+    private String planCode;
+
+    /** 产品代码 */
+    @JsonProperty("productCode")
+    private String productCode;
+
+    /** 产品名称 */
+    @JsonProperty("productName")
+    private String productName;
+
+    /** 是否包含下级机构 */
+    @JsonProperty("includeSubDep")
+    private Boolean includeSubDep;
+
+    /** 保险起期 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonProperty("insuranceBeginTime")
+    private LocalDateTime insuranceBeginTime;
+
+    /** 保险止期 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonProperty("insuranceEndTime")
+    private LocalDateTime insuranceEndTime;
+
+    /** 总保额 */
+    @JsonProperty("totalInsuredAmount")
+    private BigDecimal totalInsuredAmount;
+
+    /** 标准保费 */
+    @JsonProperty("totalStandardPremium")
+    private BigDecimal totalStandardPremium;
+
+    /** 协议保费 */
+    @JsonProperty("totalAgreePremium")
+    private BigDecimal totalAgreePremium;
+
+    /** 实收保费 */
+    @JsonProperty("totalActualPremium")
+    private BigDecimal totalActualPremium;
+
+    /** 净保费 */
+    @JsonProperty("totalNetPremium")
+    private BigDecimal totalNetPremium;
+
+    /** 增值税 */
+    @JsonProperty("addedValueTax")
+    private BigDecimal addedValueTax;
+
+    /** 业务类别 */
+    @JsonProperty("businessClass")
+    private String businessClass;
+
+    /** 费率比例 */
+    @JsonProperty("rateScale")
+    private BigDecimal rateScale;
+
+    /** 二级费率比例 */
+    @JsonProperty("rateTwoScale")
+    private BigDecimal rateTwoScale;
+
+    /** 业务赔案数量 */
+    @JsonProperty("claimRecordBizSize")
+    private Integer claimRecordBizSize;
+
+    /** 赔案数量 */
+    @JsonProperty("claimRecordSize")
+    private Integer claimRecordSize;
+
+    /** 业务总赔付金额 */
+    @JsonProperty("allClaimAmountBiz")
+    private BigDecimal allClaimAmountBiz;
+
+    /** 总赔付金额 */
+    @JsonProperty("allClaimAmount")
+    private BigDecimal allClaimAmount;
+
+    /** 被保人证件异常标识 */
+    @JsonProperty("illegalInsuredCertFlag")
+    private Boolean illegalInsuredCertFlag;
+
+    /** 即时生效标识 */
+    @JsonProperty("immediateEffectFlag")
+    private String immediateEffectFlag;
+
+    /** 是否逾期 */
+    @JsonProperty("isOverdue")
+    private Boolean isOverdue;
+
+    /** 非车险增量服务比例 */
+    @JsonProperty("nMotorIncreServiceRatio")
+    private BigDecimal nMotorIncreServiceRatio;
+
+    /** 投保人年龄校验标识 */
+    @JsonProperty("applicantAgeFlag")
+    private Boolean applicantAgeFlag;
+
+    /** 被保险人年龄校验标识 */
+    @JsonProperty("insuranerAgeFlag")
+    private Boolean insuranerAgeFlag;
+
+    /** 人员年龄校验标识 */
+    @JsonProperty("personnelAgeFlag")
+    private Boolean personnelAgeFlag;
+
+    /** 交强险标识 */
+    @JsonProperty("compulsoryInsureFlag")
+    private Boolean compulsoryInsureFlag;
+
+    /** 商业险标识 */
+    @JsonProperty("businessInsureFlag")
+    private Boolean businessInsureFlag;
+
+    /** 最小折扣模式 */
+    @JsonProperty("minRatioMode")
+    private String minRatioMode;
+
+    /** 因子比例 */
+    @JsonProperty("factorScale")
+    private String factorScale;
+
+    /** 短期系数展示标识 */
+    @JsonProperty("shortTimeCoefficientShow")
+    private Boolean shortTimeCoefficientShow;
+}

+ 5 - 1
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerApplyApplicationRequest.java

@@ -2,7 +2,9 @@ package com.jzg.quotation.ansheng.crawler.entity.request;
 
 import com.alibaba.fastjson2.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.ansheng.crawler.entity.po.QuotationListDTO;
 import com.jzg.quotation.ansheng.crawler.entity.response.AnShengCrawlerCalculatePremiumApplyResponse;
+import com.jzg.quotation.ansheng.crawler.entity.response.AnShengCrawlerNonInsuranceResponse;
 import com.jzg.quotation.commons.utils.TimeProcessing;
 import lombok.AllArgsConstructor;
 import lombok.Data;
@@ -35,6 +37,8 @@ public class AnShengCrawlerApplyApplicationRequest {
     @JSONField(name = "createdBy")
     private String createdBy;
 
+    private AnShengCrawlerNonInsuranceResponse fex;
+
     public AnShengCrawlerApplyApplicationRequest() {
         this.contracts = new ArrayList<>();
     }
@@ -105,7 +109,7 @@ public class AnShengCrawlerApplyApplicationRequest {
 
         @JsonProperty("quotationList")
         @JSONField(name = "quotationList")
-        private List<?> quotationList;
+        private List<QuotationListDTO> quotationList;
         @JsonProperty("saleBusinessSource")
         @JSONField(name = "saleBusinessSource")
         private SaleBusinessSourceDTO saleBusinessSource;

+ 1 - 59
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerCalculatePremiumApplyMessage.java

@@ -6,6 +6,7 @@ import com.google.common.collect.Lists;
 import com.jzg.commons.entity.quote.vo.*;
 import com.jzg.commons.util.StringUtils;
 import com.jzg.quotation.ansheng.crawler.constant.enums.DepartmentPlanCode;
+import com.jzg.quotation.ansheng.crawler.entity.po.QuotationListDTO;
 import com.jzg.quotation.ansheng.crawler.entity.response.AnShengCrawlerGetUserDetailResponse;
 import com.jzg.quotation.ansheng.crawler.entity.response.AnShengCrawlerSearchVehicleByVinResponse;
 import com.jzg.quotation.ansheng.crawler.utils.CustomerNegotiatePriceUtils;
@@ -15,7 +16,6 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 import org.springframework.util.ObjectUtils;
 
-import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
@@ -188,7 +188,6 @@ public class AnShengCrawlerCalculatePremiumApplyMessage {
             this.policyCoverages = new ArrayList<>();
             this.policyPersons = buildPolicyPersons(quoteVo.getOwnersInfo(), quoteVo.getPolicyHolderInfo(), quoteVo.getInsuredPersonInfo(), userDetailResponse.getDepartmentCode());
             this.policyRatios = new ArrayList<>();
-            this.quotationList = buildQuotationList(quoteVo);
         }
 
         private List<PolicyPersonsDTO> buildPolicyPersons(CustomerInfoVo ownersInfo, CustomerInfoVo policyHolderInfo, CustomerInfoVo insuredPersonInfo, String department) {
@@ -198,15 +197,6 @@ public class AnShengCrawlerCalculatePremiumApplyMessage {
             return List.of(owners, policyHolder, insuredPerson);
         }
 
-        private List<QuotationListDTO> buildQuotationList(QuoteVo quoteVo) {
-            List<QuotationListDTO> quotationListDTOS = new ArrayList<>();
-            if (quoteVo.getAccidentalDrivings() != null && quoteVo.getAccidentalDrivings().size() > 0) {
-                for (AccidentalDrivingVo accidentalDriving : quoteVo.getAccidentalDrivings()) {
-                    quotationListDTOS.add(new QuotationListDTO(accidentalDriving, quoteVo));
-                }
-            }
-            return quotationListDTOS;
-        }
 
         public void addCiPolicyRatios() {
             PolicyRatiosDTO policyRatiosDTOF44 = new PolicyRatiosDTO("", "", "", "", "F44", "V6", 1.0, 1.0, 1.0, 1.0, 1.0);
@@ -1920,53 +1910,5 @@ public class AnShengCrawlerCalculatePremiumApplyMessage {
             private Double ratiototal;
         }
 
-        @AllArgsConstructor
-        @NoArgsConstructor
-        @Data
-        public static class QuotationListDTO {
-            @JsonProperty("totalStandardPremium")
-            @JSONField(name = "totalStandardPremium")
-            private Integer totalStandardPremium;
-
-            @JsonProperty("totalAgreePremium")
-            @JSONField(name = "totalAgreePremium")
-            private Integer totalAgreePremium;
-
-            @JsonProperty("totalActualPremium")
-            @JSONField(name = "totalActualPremium")
-            private Integer totalActualPremium;
-
-            @JsonProperty("insuranceBeginTime")
-            @JSONField(name = "insuranceBeginTime")
-            private String insuranceBeginTime;
-
-            @JsonProperty("insuranceEndTime")
-            @JSONField(name = "insuranceEndTime")
-            private String insuranceEndTime;
-
-            @JsonProperty("productCode")
-            @JSONField(name = "productCode")
-            private String productCode;
-
-            @JsonProperty("totalInsuredAmount")
-            @JSONField(name = "totalInsuredAmount")
-            private Integer totalInsuredAmount;
-
-            public QuotationListDTO(AccidentalDrivingVo accidentalDrivingVo, QuoteVo quoteVo) {
-                BigDecimal premiumBigDecimal = new BigDecimal(accidentalDrivingVo.getPremium());
-                int premiumInt = premiumBigDecimal.setScale(0, BigDecimal.ROUND_HALF_UP).intValue();
-                this.totalStandardPremium = premiumInt;
-                this.totalAgreePremium = premiumInt;
-                this.totalActualPremium = premiumInt;
-                if (quoteVo.getCiRiskInfoVo() != null) {
-                    this.insuranceBeginTime = quoteVo.getCiRiskInfoVo().getStartDate();
-                    this.insuranceEndTime = quoteVo.getCiRiskInfoVo().getEndDate();
-                } else {
-                    this.insuranceBeginTime = quoteVo.getBiRiskInfoVo().getStartDate();
-                    this.insuranceEndTime = quoteVo.getBiRiskInfoVo().getEndDate();
-                }
-                this.productCode = accidentalDrivingVo.getProductCode();
-            }
-        }
     }
 }

+ 1298 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerCalculatePremiumNonApplyRequest.java

@@ -0,0 +1,1298 @@
+package com.jzg.quotation.ansheng.crawler.entity.request;
+
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.entity.quote.vo.*;
+import com.jzg.commons.util.StringUtils;
+import com.jzg.quotation.ansheng.crawler.entity.response.AnShengCrawlerGetUserDetailResponse;
+import com.jzg.quotation.ansheng.crawler.entity.response.AnShengCrawlerInsureAddResponse;
+import com.jzg.quotation.ansheng.crawler.entity.response.AnShengCrawlerNonConfigCoveragesResponse;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * 保单根对象
+ */
+@Data
+public class AnShengCrawlerCalculatePremiumNonApplyRequest {
+
+
+    public AnShengCrawlerCalculatePremiumNonApplyRequest(AnShengCrawlerNonConfigCoveragesResponse crawlerNonConfigCoveragesResponse, AnShengCrawlerGetUserDetailResponse.DataDTO.AgentDefineDTO userDetailResponse,
+                                                         AccidentalDrivingVo accidentalDriving, QuoteVo quoteVo, AnShengCrawlerInsureAddResponse.DataDTO insureAdd,
+                                                         AnShengCrawlerCalculatePremiumApplyMessage crawlerCalculatePremiumApply){
+        this.contracts = Collections.singletonList(new Contract(crawlerNonConfigCoveragesResponse, userDetailResponse, accidentalDriving, insureAdd, quoteVo, crawlerCalculatePremiumApply));
+    }
+
+
+
+    @JsonProperty("contracts")
+    private List<Contract> contracts;
+
+    /* ================== Contract ================== */
+    @Data
+    @NoArgsConstructor
+    @AllArgsConstructor
+    public static class Contract implements Serializable {
+
+        public Contract(AnShengCrawlerNonConfigCoveragesResponse crawlerNonConfigCoveragesResponse, AnShengCrawlerGetUserDetailResponse.DataDTO.AgentDefineDTO userDetailResponse,
+                         AccidentalDrivingVo accidentalDriving, AnShengCrawlerInsureAddResponse.DataDTO insureAdd, QuoteVo quoteVo,AnShengCrawlerCalculatePremiumApplyMessage crawlerCalculatePremiumApply) {
+            List<AnShengCrawlerCalculatePremiumApplyMessage.ContractsDTO.TargetListDTO> targetList1 = crawlerCalculatePremiumApply.getContracts().get(0).getTargetList();
+            this.overlayVehicle = JSONObject.parseObject(JSONObject.toJSONString(targetList1),OverlayVehicle.class);
+            this.overlayPersons = JSONObject.parseArray(JSONObject.toJSONString(crawlerCalculatePremiumApply.getContracts().get(0).getPolicyPersons()),OverlayPerson.class);
+            overlayRatios();
+            this.agentDefine = new AgentDefine(insureAdd.getGroupAgentPage().getCommonParameterList().get(0).getValueCode());
+            this.departmentDefine = new DepartmentDefine(userDetailResponse.getDepartmentCode());
+            this.policyBase = policyBase(crawlerNonConfigCoveragesResponse,userDetailResponse, accidentalDriving,quoteVo);
+            targetList(quoteVo,accidentalDriving.getProductCode());
+            policyCoverages(crawlerNonConfigCoveragesResponse);
+            this.policyPersons = JSONObject.parseArray(JSONObject.toJSONString(crawlerCalculatePremiumApply.getContracts().get(0).getPolicyPersons()),PolicyPerson.class);
+            this.saleBusinessSource = new SaleBusinessSource(insureAdd.getSaleAgentPage().getSaleGroupCode(),insureAdd.getSaleAgentPage().getSaleGroupName(),
+                    "7","","",insureAdd.getSaleAgentPage().getCommonParameterList().get(0).getValueCode());
+            this.policyRatioList = null;
+        }
+
+        public void policyCoverages(AnShengCrawlerNonConfigCoveragesResponse crawlerNonConfigCoveragesResponse){
+            List<PolicyCoverage> list = new ArrayList<>();
+            for (AnShengCrawlerNonConfigCoveragesResponse.PolicyResponse.PolicyCoverage policyCoverage : crawlerNonConfigCoveragesResponse.getData().getPolicyCoverageList()) {
+                list.add(new PolicyCoverage(policyCoverage.getDutyCode(),policyCoverage.getDutyChineseName(),String.valueOf(policyCoverage.getDutyVersionAge().get(0).getInsuredAmount()),"0"));
+            }
+            this.policyCoverages = list;
+
+        }
+
+
+        public void targetList(QuoteVo quoteVo, String planCode ){
+            CustomerInfoVo ownersInfo = quoteVo.getOwnersInfo();
+            CustomerInfoVo policyHolderInfo = quoteVo.getPolicyHolderInfo();
+            CustomerInfoVo insuredPersonInfo = quoteVo.getInsuredPersonInfo();
+            CarInfoVo carInfoVo = quoteVo.getCarInfoVo();
+
+            boolean planCodeType = StringUtils.equals("H24", planCode);
+            this.targetList = new ArrayList<>();
+            boolean name = StringUtils.equals(insuredPersonInfo.getName(), policyHolderInfo.getName());
+            this.targetList.add(new TargetList("accidentTarget",name ? "1" : "5",name ? "1" : "5",insuredPersonInfo.getName(),"","1",insuredPersonInfo.getIdentifyNumber(),
+                    Integer.parseInt(String.valueOf(insuredPersonInfo.getIdentifyNumber().charAt(16))) % 2 == 0 ? "F" : "M",insuredPersonInfo.getMobile(),insuredPersonInfo.getBirthday(),
+                    "0",planCodeType ? "" : carInfoVo.getLicenseNo(),planCodeType ? "" : carInfoVo.getVinNo(),planCodeType ? "" : carInfoVo.getSeatCount(),"0",
+                    planCodeType ? "1" : "",planCodeType ? String.valueOf(insuredPersonInfo.getAge()) : ""));
+        }
+
+        public PolicyBase policyBase(AnShengCrawlerNonConfigCoveragesResponse crawlerNonConfigCoveragesResponse, AnShengCrawlerGetUserDetailResponse.DataDTO.AgentDefineDTO userDetailResponse,
+                                     AccidentalDrivingVo accidentalDriving, QuoteVo quoteVo){
+            AnShengCrawlerNonConfigCoveragesResponse.PolicyResponse.ProductDefine productDefine = crawlerNonConfigCoveragesResponse.getData().getProductDefine();
+            String productAlias = productDefine.getProductAlias();
+            RiskInfoVo biRiskInfoVo = quoteVo.getBiRiskInfoVo();
+            PolicyBase base = new PolicyBase();
+            base.setAgentName("");
+            base.setAgentPersonCode("");
+            base.setAgentPersonName("");
+            base.setAgentLevelCode("");
+            base.setTransactionNo("");
+            base.setThirdChannelSource("");
+            base.setDepartmentCode(userDetailResponse.getDepartmentCode());
+            base.setPlanCodeName(StringUtils.equals("盛行天下2023",productAlias) ? "乐行天下"  : productAlias);
+            base.setProductName(productDefine.getProductName());
+            base.setInsuranceBeginTime(biRiskInfoVo.getStartDate());
+            base.setInsuranceEndTime(biRiskInfoVo.getEndDate());
+            base.setPlanCode(productDefine.getPlanCode());
+            base.setProductCode(productDefine.getProductCode());
+            base.setApplyPolicyNo("");
+            base.setLastPolicyNo("");
+            base.setRealBusinessType(userDetailResponse.getRealBusinessType());
+            base.setBusinessType(userDetailResponse.getAgentCharactorGeneral());
+            base.setBusinessTypeDetail(userDetailResponse.getAgentCharactor());
+            base.setTargetType("accidentTarget");
+            base.setPlanSeries(accidentalDriving.getRiskCode());
+            return base;
+        }
+
+        public void overlayRatios(){
+
+            List<OverlayRatio> overlayRatiosList = new ArrayList<>(Arrays.asList(
+                    new OverlayRatio("", "", "", "", "F44", "V6", "1", "1", "1", "1", "1"),
+                    new OverlayRatio("", "", "", "", "F89", "", "1", "1", "1", "1", "1"),
+                    new OverlayRatio("", "", "", "", "F87", "", "1", "1", "1", "1", "1"),
+                    new OverlayRatio("", "", "", "", "F84", "5A", "1", "1", "1", "1", "1"),
+                    new OverlayRatio("", "", "", "", "F45", "A4", "1", "1", "1", "1", "1")
+            ));
+
+            this.overlayRatios = overlayRatiosList;
+        }
+
+
+
+        @JsonProperty("overlayVehicle")
+        private OverlayVehicle overlayVehicle;
+
+        @JsonProperty("overlayPersons")
+        private List<OverlayPerson> overlayPersons;
+
+        @JsonProperty("overlayRatios")
+        private List<OverlayRatio> overlayRatios;
+
+        @JsonProperty("agentDefine")
+        private AgentDefine agentDefine;
+
+        @JsonProperty("departmentDefine")
+        private DepartmentDefine departmentDefine;
+
+        @JsonProperty("policyBase")
+        private PolicyBase policyBase;
+
+        @JsonProperty("targetList")
+        private List<TargetList> targetList;
+
+        @JsonProperty("policyCoverages")
+        private List<PolicyCoverage> policyCoverages;
+
+        @JsonProperty("policyPersons")
+        private List<PolicyPerson> policyPersons;
+
+        @JsonProperty("saleBusinessSource")
+        private SaleBusinessSource saleBusinessSource;
+
+        @JsonProperty("policyRatioList")
+        private List<Object> policyRatioList;
+
+
+        /* ================== OverlayVehicle ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class OverlayVehicle implements Serializable {
+
+            @JsonProperty("linkId")
+            private String linkId;
+
+            @JsonProperty("targetId")
+            private String targetId;
+
+            @JsonProperty("ymIsbuyOrnot")
+            private String ymIsbuyOrnot;
+
+            @JsonProperty("ymBirthDate")
+            private String ymBirthDate;
+
+            @JsonProperty("ymElecBatteryType")
+            private String ymElecBatteryType;
+
+            @JsonProperty("marketDate")
+            private String marketDate;
+
+            @JsonProperty("vehicleStyleUniqueId")
+            private String vehicleStyleUniqueId;
+
+            @JsonProperty("vehicleCertificateNo")
+            private String vehicleCertificateNo;
+
+            @JsonProperty("vehicleCertificateType")
+            private String vehicleCertificateType;
+
+            @JsonProperty("vehiclePurchasePrice")
+            private String vehiclePurchasePrice;
+
+            @JsonProperty("modelsListedYear")
+            private String modelsListedYear;
+
+            @JsonProperty("platformId")
+            private String platformId;
+
+            @JsonProperty("newJYFlag")
+            private String newJYFlag;
+
+            @JsonProperty("vehicleColor")
+            private String vehicleColor;
+
+            @JsonProperty("theftproofEquipmentCode")
+            private String theftproofEquipmentCode;
+
+            @JsonProperty("isMortgage")
+            private String isMortgage;
+
+            @JsonProperty("isSpecialInsuranceVehicle")
+            private String isSpecialInsuranceVehicle;
+
+            @JsonProperty("vehicleVer")
+            private String vehicleVer;
+
+            @JsonProperty("groupCode")
+            private String groupCode;
+
+            @JsonProperty("standardName")
+            private String standardName;
+
+            @JsonProperty("tradeName")
+            private String tradeName;
+
+            @JsonProperty("tradeCode")
+            private String tradeCode;
+
+            @JsonProperty("totalVehicleWeight")
+            private String totalVehicleWeight;
+
+            @JsonProperty("seriesCode")
+            private String seriesCode;
+
+            @JsonProperty("modelIdCode")
+            private String modelIdCode;
+
+            @JsonProperty("seats")
+            private String seats;
+
+            @JsonProperty("rbCode")
+            private String rbCode;
+
+            @JsonProperty("otherEnergyTypeDesc")
+            private String otherEnergyTypeDesc;
+
+            @JsonProperty("madeDate")
+            private String madeDate;
+
+            @JsonProperty("exhaustCapability")
+            private String exhaustCapability;
+
+            @JsonProperty("noDamageYears")
+            private String noDamageYears;
+
+            @JsonProperty("specialVehicleFlag")
+            private String specialVehicleFlag;
+
+            @JsonProperty("overseasVehicleFlag")
+            private String overseasVehicleFlag;
+
+            @JsonProperty("brand")
+            private String brand;
+
+            @JsonProperty("modelCodeAlien")
+            private String modelCodeAlien;
+
+            @JsonProperty("carNameAlien")
+            private String carNameAlien;
+
+            @JsonProperty("tradeNameAlien")
+            private String tradeNameAlien;
+
+            @JsonProperty("brandAlien")
+            private String brandAlien;
+
+            @JsonProperty("deptNameAlien")
+            private String deptNameAlien;
+
+            @JsonProperty("checkVehicleInfo")
+            private CheckVehicleInfo checkVehicleInfo;
+
+            @JsonProperty("departmentCode")
+            private String departmentCode;
+
+            @JsonProperty("dbVehicleType")
+            private String dbVehicleType;
+
+            @JsonProperty("vehicleLicenceCode")
+            private String vehicleLicenceCode;
+
+            @JsonProperty("vehicleFrameNo")
+            private String vehicleFrameNo;
+
+            @JsonProperty("engineNo")
+            private String engineNo;
+
+            @JsonProperty("firstRegisterDate")
+            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+            private String firstRegisterDate;
+
+            @JsonProperty("firstRegisterDateStr")
+            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+            private String firstRegisterDateStr;
+
+            @JsonProperty("vehicleCertificateDate")
+            private String vehicleCertificateDate;
+
+            @JsonProperty("weigth")
+            private String weigth;
+
+            @JsonProperty("totalMass")
+            private String totalMass;
+
+            @JsonProperty("priceType")
+            private String priceType;
+
+            @JsonProperty("purchasePrice")
+            private String purchasePrice;
+
+            @JsonProperty("vehicleLossInsuredValue")
+            private String vehicleLossInsuredValue;
+
+            @JsonProperty("importFlag")
+            private String importFlag;
+
+            @JsonProperty("modelCode")
+            private String modelCode;
+
+            @JsonProperty("carName")
+            private String carName;
+
+            @JsonProperty("theftProof")
+            private String theftProof;
+
+            @JsonProperty("vehicleType")
+            private String vehicleType;
+
+            @JsonProperty("pureRange")
+            private String pureRange;
+
+            @JsonProperty("vehicleClass")
+            private String vehicleClass;
+
+            @JsonProperty("vehicleStyle")
+            private String vehicleStyle;
+
+            @JsonProperty("autoModelCode")
+            private String autoModelCode;
+
+            @JsonProperty("vehicleBrand")
+            private String vehicleBrand;
+
+            @JsonProperty("brandChnName")
+            private String brandChnName;
+
+            @JsonProperty("averageMile")
+            private String averageMile;
+
+            @JsonProperty("csTradeName")
+            private String csTradeName;
+
+            @JsonProperty("csTradeCode")
+            private String csTradeCode;
+
+            @JsonProperty("brandCode")
+            private String brandCode;
+
+            @JsonProperty("series")
+            private String series;
+
+            @JsonProperty("noticeType")
+            private String noticeType;
+
+            @JsonProperty("categoryName")
+            private String categoryName;
+
+            @JsonProperty("categoryCode")
+            private String categoryCode;
+
+            @JsonProperty("configType")
+            private String configType;
+
+            @JsonProperty("partInfo")
+            private String partInfo;
+
+            @JsonProperty("powerType")
+            private String powerType;
+
+            @JsonProperty("vehicleFgwCode")
+            private String vehicleFgwCode;
+
+            @JsonProperty("vehicleFgwName")
+            private String vehicleFgwName;
+
+            @JsonProperty("vehicleModelType")
+            private String vehicleModelType;
+
+            @JsonProperty("vehicleStyleDesc")
+            private String vehicleStyleDesc;
+
+            @JsonProperty("vehicleTypeName")
+            private String vehicleTypeName;
+
+            @JsonProperty("makeDate")
+            private String makeDate;
+
+            @JsonProperty("detailDesc")
+            private String detailDesc;
+
+            @JsonProperty("vehicleCategory")
+            private String vehicleCategory;
+
+            @JsonProperty("personnelName")
+            private String personnelName;
+
+            @JsonProperty("refitDesc")
+            private String refitDesc;
+
+            @JsonProperty("basicRateCode")
+            private String basicRateCode;
+
+            @JsonProperty("deptName")
+            private String deptName;
+
+            @JsonProperty("deptCode")
+            private String deptCode;
+
+            @JsonProperty("vehicleSeats")
+            private String vehicleSeats;
+
+            @JsonProperty("fuelType")
+            private String fuelType;
+
+            @JsonProperty("autoModelChnName")
+            private String autoModelChnName;
+
+            @JsonProperty("licenceTypeCode")
+            private String licenceTypeCode;
+
+            @JsonProperty("ecdemicVehicleFlag")
+            private String ecdemicVehicleFlag;
+
+            @JsonProperty("vehicleTonnages")
+            private String vehicleTonnages;
+
+            @JsonProperty("power")
+            private String power;
+
+            @JsonProperty("maxDesignSpeed")
+            private String maxDesignSpeed;
+
+            @JsonProperty("runCardCertificateDate")
+            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+            private String runCardCertificateDate;
+
+            @JsonProperty("customerNegotiatePrice")
+            private String customerNegotiatePrice;
+
+            @JsonProperty("originalCustomerNegotiatePrice")
+            private String originalCustomerNegotiatePrice;
+
+            @JsonProperty("fleetNo")
+            private String fleetNo;
+
+            @JsonProperty("maker")
+            private String maker;
+
+            @JsonProperty("approvedCapacity")
+            private String approvedCapacity;
+
+            @JsonProperty("ineffectualDate")
+            private String ineffectualDate;
+
+            @JsonProperty("lastCheckDate")
+            private String lastCheckDate;
+
+            @JsonProperty("rejectDate")
+            private String rejectDate;
+
+            @JsonProperty("riskFlag")
+            private String riskFlag;
+
+            @JsonProperty("targetType")
+            private String targetType;
+
+            @JsonProperty("fleetRate")
+            private String fleetRate;
+
+            @JsonProperty("usageAttributeCode")
+            private String usageAttributeCode;
+
+            @JsonProperty("usageAttributeCodePM")
+            private String usageAttributeCodePM;
+
+            @JsonProperty("ownershipAttributeCode")
+            private String ownershipAttributeCode;
+
+            @JsonProperty("beneficiaryList")
+            private List<Object> beneficiaryList;
+
+            @JsonProperty("checkVehicleCodeSecret")
+            private String checkVehicleCodeSecret;
+
+            @JsonProperty("policyPricing")
+            private PolicyPricing policyPricing;
+        }
+
+        /* ================== CheckVehicleInfo ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class CheckVehicleInfo implements Serializable {
+
+            @JsonProperty("usageAttributeCode")
+            private String usageAttributeCode;
+
+            @JsonProperty("usageAttributeCodePM")
+            private String usageAttributeCodePM;
+
+            @JsonProperty("runRegionCode")
+            private String runRegionCode;
+
+            @JsonProperty("checkVehicleFlag")
+            private String checkVehicleFlag;
+
+            @JsonProperty("uploadCheckVehicleInfo")
+            private String uploadCheckVehicleInfo;
+
+            @JsonProperty("checkVehicleSituation")
+            private String checkVehicleSituation;
+
+            @JsonProperty("vehicleChecker")
+            private String vehicleChecker;
+
+            @JsonProperty("checkRecord")
+            private String checkRecord;
+
+            @JsonProperty("checkTime")
+            private String checkTime;
+        }
+
+        /* ================== PolicyPricing ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class PolicyPricing implements Serializable {
+
+            @JsonProperty("useBasicDataCoverFlag")
+            private String useBasicDataCoverFlag;
+
+            @JsonProperty("usageAttributeCode")
+            private String usageAttributeCode;
+
+            @JsonProperty("usageAttributeCodePM")
+            private String usageAttributeCodePM;
+
+            @JsonProperty("ownershipAttributeCode")
+            private String ownershipAttributeCode;
+
+            @JsonProperty("nonclaimAdjust")
+            private String nonclaimAdjust;
+
+            @JsonProperty("claimAdjustLevel")
+            private String claimAdjustLevel;
+
+            @JsonProperty("lastyearStartDate")
+            private String lastyearStartDate;
+
+            @JsonProperty("lastyearEndDate")
+            private String lastyearEndDate;
+
+            @JsonProperty("partInfo")
+            private String partInfo;
+
+            @JsonProperty("isMortgage")
+            private String isMortgage;
+
+            @JsonProperty("isSpecialInsuranceVehicle")
+            private String isSpecialInsuranceVehicle;
+
+            @JsonProperty("claimRecordBizScoreSize")
+            private String claimRecordBizScoreSize;
+
+            @JsonProperty("loanVehicleFlag")
+            private String loanVehicleFlag;
+
+            @JsonProperty("injurySite")
+            private String injurySite;
+
+            @JsonProperty("transferFlag")
+            private String transferFlag;
+
+            @JsonProperty("searchSequenceNo")
+            private String searchSequenceNo;
+
+            @JsonProperty("dbVehicleAutoModelChnName")
+            private String dbVehicleAutoModelChnName;
+
+            @JsonProperty("refitDesc")
+            private String refitDesc;
+
+            @JsonProperty("lastYearIsTel")
+            private String lastYearIsTel;
+
+            @JsonProperty("reinsureFlag")
+            private String reinsureFlag;
+
+            @JsonProperty("rateFloatFlag")
+            private String rateFloatFlag;
+
+            @JsonProperty("ratioFluctuateType")
+            private String ratioFluctuateType;
+
+            @JsonProperty("repairFactory")
+            private String repairFactory;
+
+            @JsonProperty("dbVehicleWeigth")
+            private String dbVehicleWeigth;
+
+            @JsonProperty("riskScore")
+            private String riskScore;
+
+            @JsonProperty("riskScoreTwenty")
+            private String riskScoreTwenty;
+
+            @JsonProperty("algrId")
+            private String algrId;
+
+            @JsonProperty("riskScoreColor")
+            private String riskScoreColor;
+
+            @JsonProperty("scoreReason")
+            private String scoreReason;
+
+            @JsonProperty("scoreReasonLevel")
+            private String scoreReasonLevel;
+
+            @JsonProperty("scoreReasonLevel2")
+            private String scoreReasonLevel2;
+
+            @JsonProperty("scoreReasonLevel3")
+            private String scoreReasonLevel3;
+
+            @JsonProperty("highRiskFlag")
+            private String highRiskFlag;
+
+            @JsonProperty("effectReason")
+            private String effectReason;
+
+            @JsonProperty("dbVehicleVeiw")
+            private String dbVehicleVeiw;
+
+            @JsonProperty("lastYearCompanyId")
+            private String lastYearCompanyId;
+
+            @JsonProperty("chargeRateFinal")
+            private String chargeRateFinal;
+
+            @JsonProperty("rateType")
+            private String rateType;
+
+            @JsonProperty("priceRises")
+            private String priceRises;
+
+            @JsonProperty("underWriteRate")
+            private String underWriteRate;
+
+            @JsonProperty("autoRuleRatioOD")
+            private String autoRuleRatioOD;
+
+            @JsonProperty("autoRuleRatioTP")
+            private String autoRuleRatioTP;
+
+            @JsonProperty("autoRuleRatioTHEFT")
+            private String autoRuleRatioTHEFT;
+
+            @JsonProperty("autoRuleRatioOTHER")
+            private String autoRuleRatioOTHER;
+
+            @JsonProperty("underwriteRuleRatioOD")
+            private String underwriteRuleRatioOD;
+
+            @JsonProperty("underwriteRuleRatioTP")
+            private String underwriteRuleRatioTP;
+
+            @JsonProperty("underwriteRuleRatioTHEFT")
+            private String underwriteRuleRatioTHEFT;
+
+            @JsonProperty("underwriteRuleRatioOTHER")
+            private String underwriteRuleRatioOTHER;
+
+            @JsonProperty("tlType")
+            private String tlType;
+
+            @JsonProperty("autoFloatRatioOD")
+            private Integer autoFloatRatioOD;
+
+            @JsonProperty("autoFloatRatioTp")
+            private String autoFloatRatioTp;
+
+            @JsonProperty("autoFloatRatioTheft")
+            private String autoFloatRatioTheft;
+
+            @JsonProperty("autoFloatRatioOther")
+            private String autoFloatRatioOther;
+
+            @JsonProperty("appointAreaCode")
+            private String appointAreaCode;
+
+            @JsonProperty("fdConfigId")
+            private String fdConfigId;
+
+            @JsonProperty("modelDiscount")
+            private String modelDiscount;
+
+            @JsonProperty("autoFloatHandingCost")
+            private Integer autoFloatHandingCost;
+
+            @JsonProperty("modelrate")
+            private String modelrate;
+
+            @JsonProperty("advicediscount")
+            private String advicediscount;
+
+            @JsonProperty("dbVehicleBrand")
+            private String dbVehicleBrand;
+
+            @JsonProperty("dbVehicleTypeName")
+            private String dbVehicleTypeName;
+
+            @JsonProperty("usageLicenceName")
+            private String usageLicenceName;
+
+            @JsonProperty("vehicleTypeChiName")
+            private String vehicleTypeChiName;
+
+            @JsonProperty("autoFloatTargetRebate")
+            private String autoFloatTargetRebate;
+
+            @JsonProperty("riskFlag")
+            private String riskFlag;
+
+            @JsonProperty("dbExhaustCapability")
+            private String dbExhaustCapability;
+
+            @JsonProperty("dbVehicleSeats")
+            private String dbVehicleSeats;
+
+            @JsonProperty("dbVehicleTonnages")
+            private String dbVehicleTonnages;
+
+            @JsonProperty("dbVehicleValue")
+            private String dbVehicleValue;
+
+            @JsonProperty("ifModelRate")
+            private String ifModelRate;
+
+            @JsonProperty("isMotorcade")
+            private String isMotorcade;
+
+            @JsonProperty("scoreRunId")
+            private String scoreRunId;
+
+            @JsonProperty("specialCarFlag")
+            private String specialCarFlag;
+
+            @JsonProperty("transferDate")
+            private String transferDate;
+
+            @JsonProperty("vehicleAlias")
+            private String vehicleAlias;
+        }
+
+        /* ================== OverlayPerson ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class OverlayPerson implements Serializable {
+
+            @JsonProperty("personnelAttribute")
+            private String personnelAttribute;
+
+            @JsonProperty("appliWithInsRelaship")
+            private String appliWithInsRelaship;
+
+            @JsonProperty("relationshipWithInsured")
+            private String relationshipWithInsured;
+
+            @JsonProperty("personnelInfoBase")
+            private PersonnelInfoBase personnelInfoBase;
+        }
+
+        /* ================== PersonnelInfoBase ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class PersonnelInfoBase implements Serializable {
+
+            @JsonProperty("personTypeDetailCode")
+            private String personTypeDetailCode;
+
+            @JsonProperty("personTypeOverseas")
+            private String personTypeOverseas;
+
+            @JsonProperty("vipMark")
+            private String vipMark;
+
+            @JsonProperty("person")
+            private Person person;
+        }
+
+        /* ================== Person ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class Person implements Serializable {
+
+            @JsonProperty("issuedAt")
+            private String issuedAt;
+
+            @JsonProperty("nation")
+            private String nation;
+
+            @JsonProperty("personnelName")
+            private String personnelName;
+
+            @JsonProperty("personnelCode")
+            private String personnelCode;
+
+            @JsonProperty("baseId")
+            private String baseId;
+
+            @JsonProperty("certificateType")
+            private String certificateType;
+
+            @JsonProperty("certificateNo")
+            private String certificateNo;
+
+            @JsonProperty("sexCode")
+            private String sexCode;
+
+            @JsonProperty("birthday")
+            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+            private String birthday;
+
+            @JsonProperty("personnelAge")
+            private String personnelAge;
+
+            @JsonProperty("address")
+            private String address;
+
+            @JsonProperty("positionn")
+            private String positionn;
+
+            @JsonProperty("mobileTelephone")
+            private String mobileTelephone;
+
+            @JsonProperty("email")
+            private String email;
+
+            @JsonProperty("postcode")
+            private String postcode;
+
+            @JsonProperty("vipMark")
+            private String vipMark;
+
+            @JsonProperty("effectedDate")
+            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+            private String effectedDate;
+
+            @JsonProperty("certType")
+            private String certType;
+
+            @JsonProperty("expiredDate")
+            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+            private String expiredDate;
+
+            @JsonProperty("isRuralOrUrban")
+            private String isRuralOrUrban;
+
+            @JsonProperty("idCardAddress")
+            private String idCardAddress;
+
+            @JsonProperty("nationalityType")
+            private String nationalityType;
+
+            @JsonProperty("workUnit")
+            private String workUnit;
+
+            @JsonProperty("certificateAddressAfter")
+            private String certificateAddressAfter;
+
+            @JsonProperty("annualIncome")
+            private String annualIncome;
+
+            @JsonProperty("other1Address")
+            private String other1Address;
+
+            @JsonProperty("other1ProvinceCode")
+            private String other1ProvinceCode;
+
+            @JsonProperty("other1CityCode")
+            private String other1CityCode;
+
+            @JsonProperty("other1AreaCountyCode")
+            private String other1AreaCountyCode;
+
+            @JsonProperty("other2Address")
+            private String other2Address;
+
+            @JsonProperty("other2ProvinceCode")
+            private String other2ProvinceCode;
+
+            @JsonProperty("other2CityCode")
+            private String other2CityCode;
+
+            @JsonProperty("other2AreaCountyCode")
+            private String other2AreaCountyCode;
+
+            @JsonProperty("certificateaddress")
+            private String certificateaddress;
+
+            @JsonProperty("certiProvinceCode")
+            private String certiProvinceCode;
+
+            @JsonProperty("certiCityCode")
+            private String certiCityCode;
+
+            @JsonProperty("certiAreaCode")
+            private String certiAreaCode;
+
+            @JsonProperty("homeAddress")
+            private String homeAddress;
+
+            @JsonProperty("homeProvinceCode")
+            private String homeProvinceCode;
+
+            @JsonProperty("homeCityCode")
+            private String homeCityCode;
+
+            @JsonProperty("homeAreaCountyCode")
+            private String homeAreaCountyCode;
+
+            @JsonProperty("homeAreaCode")
+            private String homeAreaCode;
+
+            @JsonProperty("homeTelephone")
+            private String homeTelephone;
+
+            @JsonProperty("driverLicenseExpirationDate")
+            private String driverLicenseExpirationDate;
+
+            @JsonProperty("drivingExpirationDate")
+            private String drivingExpirationDate;
+
+            @JsonProperty("certificateAddressId")
+            private String certificateAddressId;
+
+            @JsonProperty("homeAddressId")
+            private String homeAddressId;
+
+            @JsonProperty("idCardAddressId")
+            private String idCardAddressId;
+
+            @JsonProperty("other1AddressId")
+            private String other1AddressId;
+
+            @JsonProperty("other2AddressId")
+            private String other2AddressId;
+
+            @JsonProperty("emailId")
+            private String emailId;
+
+            @JsonProperty("mobileTelephoneId")
+            private String mobileTelephoneId;
+
+            @JsonProperty("homeTelephoneId")
+            private String homeTelephoneId;
+
+            @JsonProperty("officeTelephoneId")
+            private String officeTelephoneId;
+
+            @JsonProperty("amlId")
+            private String amlId;
+
+            @JsonProperty("teleNoOwnerIsSelfFlag")
+            private String teleNoOwnerIsSelfFlag;
+
+            @JsonProperty("phoneOwnerCertiType")
+            private String phoneOwnerCertiType;
+
+            @JsonProperty("phoneOwnerCertiNo")
+            private String phoneOwnerCertiNo;
+
+            @JsonProperty("phoneOwnerName")
+            private String phoneOwnerName;
+
+            @JsonProperty("idCardAccess")
+            private String idCardAccess;
+
+            @JsonProperty("longExpiredDate")
+            private String longExpiredDate;
+
+            @JsonProperty("bankCode")
+            private String bankCode;
+
+            @JsonProperty("bankAccount")
+            private String bankAccount;
+
+            @JsonProperty("department")
+            private String department;
+
+            @JsonProperty("marriedStatu")
+            private String marriedStatu;
+
+            @JsonProperty("applyYears")
+            private String applyYears;
+
+            @JsonProperty("mobileTelephoneMarkBecause")
+            private String mobileTelephoneMarkBecause;
+
+            @JsonProperty("invalidateFlag")
+            private String invalidateFlag;
+
+            @JsonProperty("fixedTelephoneMarkBecause")
+            private String fixedTelephoneMarkBecause;
+
+            @JsonProperty("driveLicenseType1")
+            private String driveLicenseType1;
+
+            @JsonProperty("bankAccountId")
+            private String bankAccountId;
+        }
+
+        /* ================== OverlayRatio ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class OverlayRatio implements Serializable {
+
+            @JsonProperty("linkId")
+            private String linkId;
+
+            @JsonProperty("ratio")
+            private String ratio;
+
+            @JsonProperty("discountValue")
+            private String discountValue;
+
+            @JsonProperty("dutyCode")
+            private String dutyCode;
+
+            @JsonProperty("factorCode")
+            private String factorCode;
+
+            @JsonProperty("factorValue")
+            private String factorValue;
+
+            @JsonProperty("ratioOd")
+            private String ratioOd;
+
+            @JsonProperty("ratioTp")
+            private String ratioTp;
+
+            @JsonProperty("ratioTheft")
+            private String ratioTheft;
+
+            @JsonProperty("ratioOther")
+            private String ratioOther;
+
+            @JsonProperty("ratiototal")
+            private String ratiototal;
+        }
+
+        /* ================== AgentDefine ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class AgentDefine implements Serializable {
+
+            @JsonProperty("agentCode")
+            private String agentCode;
+        }
+
+        /* ================== DepartmentDefine ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class DepartmentDefine implements Serializable {
+
+            @JsonProperty("departmentCode")
+            private String departmentCode;
+        }
+
+        /* ================== PolicyBase ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class PolicyBase implements Serializable {
+
+            @JsonProperty("agentCode")
+            private String agentCode;
+
+            @JsonProperty("agentName")
+            private String agentName;
+
+            @JsonProperty("agentPersonCode")
+            private String agentPersonCode;
+
+            @JsonProperty("agentPersonName")
+            private String agentPersonName;
+
+            @JsonProperty("agentLevelCode")
+            private String agentLevelCode;
+
+            @JsonProperty("transactionNo")
+            private String transactionNo;
+
+            @JsonProperty("thirdChannelSource")
+            private String thirdChannelSource;
+
+            @JsonProperty("departmentCode")
+            private String departmentCode;
+
+            @JsonProperty("planCodeName")
+            private String planCodeName;
+
+            @JsonProperty("productName")
+            private String productName;
+
+            @JsonProperty("insuranceBeginTime")
+            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+            private String insuranceBeginTime;
+
+            @JsonProperty("insuranceEndTime")
+            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+            private String insuranceEndTime;
+
+            @JsonProperty("planCode")
+            private String planCode;
+
+            @JsonProperty("productCode")
+            private String productCode;
+
+            @JsonProperty("applyPolicyNo")
+            private String applyPolicyNo;
+
+            @JsonProperty("lastPolicyNo")
+            private String lastPolicyNo;
+
+            @JsonProperty("realBusinessType")
+            private String realBusinessType;
+
+            @JsonProperty("businessType")
+            private String businessType;
+
+            @JsonProperty("businessTypeDetail")
+            private String businessTypeDetail;
+
+            @JsonProperty("targetType")
+            private String targetType;
+
+            @JsonProperty("planSeries")
+            private String planSeries;
+        }
+
+        /* ================== Target ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class TargetList implements Serializable {
+
+            @JsonProperty("targetType")
+            private String targetType;
+
+            @JsonProperty("relApplicant")
+            private String relApplicant;
+
+            @JsonProperty("relInsured")
+            private String relInsured;
+
+            @JsonProperty("personName")
+            private String personName;
+
+            @JsonProperty("address")
+            private String address;
+
+            @JsonProperty("certiType")
+            private String certiType;
+
+            @JsonProperty("certiCode")
+            private String certiCode;
+
+            @JsonProperty("gender")
+            private String gender;
+
+            @JsonProperty("mobileTelephone")
+            private String mobileTelephone;
+
+            @JsonProperty("dob")
+            private String dob;
+
+            @JsonProperty("vehicleTonnages")
+            private String vehicleTonnages;
+
+            @JsonProperty("vehicleLicenceCode")
+            private String vehicleLicenceCode;
+
+            @JsonProperty("vehicleFrameNo")
+            private String vehicleFrameNo;
+
+            @JsonProperty("vehicleSeats")
+            private String vehicleSeats;
+
+            @JsonProperty("longExpiredDate")
+            private String longExpiredDate;
+
+            @JsonProperty("isHaveSocial")
+            private String isHaveSocial;
+
+            @JsonProperty("age")
+            private String age;
+        }
+
+        /* ================== PolicyCoverage ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class PolicyCoverage implements Serializable {
+
+            @JsonProperty("dutyCode")
+            private String dutyCode;
+
+            @JsonProperty("dutyChineseName")
+            private String dutyChineseName;
+
+            @JsonProperty("insuredAmount")
+            private String insuredAmount;
+
+            @JsonProperty("dutyChoice")
+            private String dutyChoice;
+        }
+
+        /* ================== PolicyPerson ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class PolicyPerson implements Serializable {
+
+            @JsonProperty("personnelAttribute")
+            private String personnelAttribute;
+
+            @JsonProperty("appliWithInsRelaship")
+            private String appliWithInsRelaship;
+
+            @JsonProperty("relationshipWithInsured")
+            private String relationshipWithInsured;
+
+            @JsonProperty("personnelInfoBase")
+            private PersonnelInfoBase personnelInfoBase;
+        }
+
+        /* ================== SaleBusinessSource ================== */
+        @Data
+        @NoArgsConstructor
+        @AllArgsConstructor
+        public static class SaleBusinessSource implements Serializable {
+
+            @JsonProperty("saleGroupCode")
+            private String saleGroupCode;
+
+            @JsonProperty("saleGroupName")
+            private String saleGroupName;
+
+            @JsonProperty("businessSourceCode")
+            private String businessSourceCode;
+
+            @JsonProperty("assistantCode")
+            private String assistantCode;
+
+            @JsonProperty("assistant")
+            private String assistant;
+
+            @JsonProperty("saleAgentCode")
+            private String saleAgentCode;
+        }
+    }
+
+}

+ 24 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerGetNonConfigCoveragesRequest.java

@@ -0,0 +1,24 @@
+package com.jzg.quotation.ansheng.crawler.entity.request;
+
+
+import lombok.Data;
+
+@Data
+public class AnShengCrawlerGetNonConfigCoveragesRequest {
+
+    /** 部门编码 */
+    private String departmentCode;
+    /** 产品编码 */
+    private String productCode;
+    /** 方案编码 */
+    private String planCode;
+
+
+    public AnShengCrawlerGetNonConfigCoveragesRequest(String departmentCode,String planCode,String productCode){
+        this.departmentCode = departmentCode;
+        this.planCode = planCode;
+        this.productCode = productCode;
+    }
+
+
+}

+ 998 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerNonContractsDTO.java

@@ -0,0 +1,998 @@
+package com.jzg.quotation.ansheng.crawler.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 保单创建请求实体(外层 + 静态内部类)
+ * 注解说明:
+ *  - @Data (Lombok):自动生成 getter/setter/toString/equals/hashCode
+ *  - @JsonIgnoreProperties(ignoreUnknown = true):反序列化时忽略 JSON 中多余的字段,避免字段变动导致报错
+ *  - @JsonProperty("xxx"):显式绑定 JSON 字段名与 Java 属性名(驼峰一致,但保留注解以契合"使用注解"要求)
+ *
+ * 若项目使用 Fastjson,可将 @JsonProperty 替换为 @JSONField(name = "xxx");
+ * 若使用 Gson,可替换为 @SerializedName("xxx")。
+ */
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class AnShengCrawlerNonContractsDTO {
+
+    @JsonProperty("agentDefine")
+    private AgentDefine agentDefine;
+
+    @JsonProperty("departmentDefine")
+    private DepartmentDefine departmentDefine;
+
+    @JsonProperty("policyBase")
+    private PolicyBase policyBase;
+
+    @JsonProperty("policyAttachments")
+    private List<PolicyAttachment> policyAttachments;
+
+    @JsonProperty("targetList")
+    private List<Target> targetList;
+
+    @JsonProperty("policyCoverages")
+    private List<PolicyCoverage> policyCoverages;
+
+    @JsonProperty("policyPersons")
+    private List<PolicyPerson> policyPersons;
+
+    @JsonProperty("saleBusinessSource")
+    private SaleBusinessSource saleBusinessSource;
+
+    @JsonProperty("policyRatioList")
+    private List<Object> policyRatioList;
+
+    @JsonProperty("policyPayments")
+    private PolicyPayments policyPayments;
+
+    @JsonProperty("billInfoDetail")
+    private BillInfoDetail billInfoDetail;
+
+    @JsonProperty("overlayVehicle")
+    private OverlayVehicle overlayVehicle;
+
+    @JsonProperty("overlayRatios")
+    private List<OverlayRatio> overlayRatios;
+
+    /* ============================= 内部类 ============================= */
+
+    @Data
+    @AllArgsConstructor
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class AgentDefine {
+        @JsonProperty("agentCode")
+        private String agentCode;
+    }
+
+    @Data
+    @AllArgsConstructor
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class DepartmentDefine {
+        @JsonProperty("departmentCode")
+        private String departmentCode;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PolicyBase {
+        @JsonProperty("departmentCode")
+        private String departmentCode;
+        @JsonProperty("mainVersionNo")
+        private String mainVersionNo;
+        @JsonProperty("agentCode")
+        private String agentCode;
+        @JsonProperty("agentName")
+        private String agentName;
+        @JsonProperty("agentPersonCode")
+        private String agentPersonCode;
+        @JsonProperty("agentPersonName")
+        private String agentPersonName;
+        @JsonProperty("agentLevelCode")
+        private String agentLevelCode;
+        @JsonProperty("insuranceBeginTime")
+        private String insuranceBeginTime;
+        @JsonProperty("insuranceEndTime")
+        private String insuranceEndTime;
+        @JsonProperty("planCode")
+        private String planCode;
+        @JsonProperty("productCode")
+        private String productCode;
+        @JsonProperty("realBusinessType")
+        private String realBusinessType;
+        @JsonProperty("businessType")
+        private String businessType;
+        @JsonProperty("businessTypeDetail")
+        private String businessTypeDetail;
+        @JsonProperty("targetType")
+        private String targetType;
+        @JsonProperty("currencyCode")
+        private String currencyCode;
+        @JsonProperty("vehicleLicenceCode")
+        private String vehicleLicenceCode;
+        @JsonProperty("vehicleFrameNo")
+        private String vehicleFrameNo;
+        @JsonProperty("engineNo")
+        private String engineNo;
+        @JsonProperty("vehicleTonnages")
+        private String vehicleTonnages;
+        @JsonProperty("vehicleSeats")
+        private String vehicleSeats;
+        @JsonProperty("modelEnergyType")
+        private String modelEnergyType;
+        @JsonProperty("signTime")
+        private String signTime;
+        @JsonProperty("totalInsuredAmount")
+        private Integer totalInsuredAmount;
+        @JsonProperty("totalStandardPremium")
+        private BigDecimal totalStandardPremium;
+        @JsonProperty("totalActualPremium")
+        private BigDecimal totalActualPremium;
+        @JsonProperty("totalAgreePremium")
+        private BigDecimal totalAgreePremium;
+        @JsonProperty("totalActualSumPremium")
+        private BigDecimal totalActualSumPremium;
+        @JsonProperty("totalNetPremium")
+        private BigDecimal totalNetPremium;
+        @JsonProperty("addedValueTax")
+        private BigDecimal addedValueTax;
+        @JsonProperty("salesGroupCode")
+        private String salesGroupCode;
+        @JsonProperty("salesGroupName")
+        private String salesGroupName;
+    }
+
+    /** 附件列表为空数组,保留占位内部类 */
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PolicyAttachment {
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class Target {
+        @JsonProperty("targetType")
+        private String targetType;
+        @JsonProperty("relApplicant")
+        private String relApplicant;
+        @JsonProperty("relInsured")
+        private String relInsured;
+        @JsonProperty("personName")
+        private String personName;
+        @JsonProperty("certiType")
+        private String certiType;
+        @JsonProperty("certiCode")
+        private String certiCode;
+        @JsonProperty("gender")
+        private String gender;
+        @JsonProperty("mobileTelephone")
+        private String mobileTelephone;
+        @JsonProperty("dob")
+        private String dob;
+        @JsonProperty("occupationType")
+        private String occupationType;
+        @JsonProperty("isHaveSocial")
+        private String isHaveSocial;
+        @JsonProperty("accNation")
+        private String accNation;
+        @JsonProperty("longExpiredDate")
+        private String longExpiredDate;
+        @JsonProperty("vehicleLicenceCode")
+        private String vehicleLicenceCode;
+        @JsonProperty("vehicleFrameNo")
+        private String vehicleFrameNo;
+        @JsonProperty("engineNo")
+        private String engineNo;
+        @JsonProperty("isBeneficiary")
+        private Boolean isBeneficiary;
+        @JsonProperty("beneficiaryList")
+        private List<Object> beneficiaryList;
+        @JsonProperty("benefit")
+        private String benefit;
+        @JsonProperty("shebao")
+        private String shebao;
+        @JsonProperty("relationshipPersons")
+        private String relationshipPersons;
+        @JsonProperty("relationships")
+        private String relationships;
+        @JsonProperty("phoneOwnerCertiType")
+        private String phoneOwnerCertiType;
+        @JsonProperty("teleNoOwnerIsSelfFlag")
+        private String teleNoOwnerIsSelfFlag;
+        @JsonProperty("longTime")
+        private Boolean longTime;
+        @JsonProperty("certificateType")
+        private String certificateType;
+        @JsonProperty("certificateNo")
+        private String certificateNo;
+        @JsonProperty("sex")
+        private String sex;
+        @JsonProperty("age")
+        private String age;
+        @JsonProperty("birthday")
+        private String birthday;
+        @JsonProperty("nationality")
+        private String nationality;
+        @JsonProperty("mobileTelephones")
+        private String mobileTelephones;
+        @JsonProperty("start")
+        private String start;
+        @JsonProperty("personnelName")
+        private String personnelName;
+        @JsonProperty("vipMark")
+        private String vipMark;
+        @JsonProperty("personTypeOverseas")
+        private String personTypeOverseas;
+        @JsonProperty("homeAddrShow")
+        private String homeAddrShow;
+        @JsonProperty("groupCode")
+        private Object groupCode;
+        @JsonProperty("groupName")
+        private Object groupName;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PolicyCoverage {
+        @JsonProperty("dutyCode")
+        private String dutyCode;
+        @JsonProperty("insuredAmount")
+        private Integer insuredAmount;
+        @JsonProperty("totalActualPremium")
+        private BigDecimal totalActualPremium;
+        @JsonProperty("totalAgreePremium")
+        private BigDecimal totalAgreePremium;
+        @JsonProperty("totalNetPremium")
+        private BigDecimal totalNetPremium;
+        @JsonProperty("totalStandardPremium")
+        private BigDecimal totalStandardPremium;
+        @JsonProperty("addedValueTax")
+        private BigDecimal addedValueTax;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PolicyPerson {
+        @JsonProperty("personnelAttribute")
+        private String personnelAttribute;
+        @JsonProperty("personnelInfoBase")
+        private PersonnelInfoBase personnelInfoBase;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PersonnelInfoBase {
+        @JsonProperty("personTypeDetailCode")
+        private String personTypeDetailCode;
+        @JsonProperty("personTypeOverseas")
+        private String personTypeOverseas;
+        @JsonProperty("vipMark")
+        private String vipMark;
+        @JsonProperty("person")
+        private Person person;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class Person {
+        @JsonProperty("idCardMachineCode")
+        private String idCardMachineCode;
+        @JsonProperty("issuedAt")
+        private String issuedAt;
+        @JsonProperty("nation")
+        private String nation;
+        @JsonProperty("personnelName")
+        private String personnelName;
+        @JsonProperty("personnelCode")
+        private Object personnelCode;
+        @JsonProperty("baseId")
+        private String baseId;
+        @JsonProperty("certificateType")
+        private String certificateType;
+        @JsonProperty("certificateNo")
+        private String certificateNo;
+        @JsonProperty("sexCode")
+        private String sexCode;
+        @JsonProperty("birthday")
+        private String birthday;
+        @JsonProperty("personnelAge")
+        private Integer personnelAge;
+        @JsonProperty("address")
+        private String address;
+        @JsonProperty("positionn")
+        private String positionn;
+        @JsonProperty("mobileTelephone")
+        private String mobileTelephone;
+        @JsonProperty("email")
+        private String email;
+        @JsonProperty("postcode")
+        private String postcode;
+        @JsonProperty("vipMark")
+        private String vipMark;
+        @JsonProperty("certType")
+        private String certType;
+        @JsonProperty("isRuralOrUrban")
+        private String isRuralOrUrban;
+        @JsonProperty("idCardAddress")
+        private String idCardAddress;
+        @JsonProperty("nationalityType")
+        private String nationalityType;
+        @JsonProperty("workUnit")
+        private String workUnit;
+        @JsonProperty("annualIncome")
+        private String annualIncome;
+        @JsonProperty("other1Address")
+        private String other1Address;
+        @JsonProperty("other1ProvinceCode")
+        private String other1ProvinceCode;
+        @JsonProperty("other1CityCode")
+        private String other1CityCode;
+        @JsonProperty("other1AreaCountyCode")
+        private String other1AreaCountyCode;
+        @JsonProperty("other2Address")
+        private String other2Address;
+        @JsonProperty("other2ProvinceCode")
+        private String other2ProvinceCode;
+        @JsonProperty("other2CityCode")
+        private String other2CityCode;
+        @JsonProperty("other2AreaCountyCode")
+        private String other2AreaCountyCode;
+        @JsonProperty("certificateaddress")
+        private String certificateaddress;
+        @JsonProperty("homeAddress")
+        private String homeAddress;
+        @JsonProperty("homeAreaCode")
+        private String homeAreaCode;
+        @JsonProperty("homeTelephone")
+        private String homeTelephone;
+        @JsonProperty("driverLicenseExpirationDate")
+        private String driverLicenseExpirationDate;
+        @JsonProperty("drivingExpirationDate")
+        private String drivingExpirationDate;
+        @JsonProperty("certificateAddressId")
+        private String certificateAddressId;
+        @JsonProperty("homeAddressId")
+        private String homeAddressId;
+        @JsonProperty("idCardAddressId")
+        private String idCardAddressId;
+        @JsonProperty("other1AddressId")
+        private String other1AddressId;
+        @JsonProperty("other2AddressId")
+        private String other2AddressId;
+        @JsonProperty("emailId")
+        private String emailId;
+        @JsonProperty("mobileTelephoneId")
+        private String mobileTelephoneId;
+        @JsonProperty("homeTelephoneId")
+        private String homeTelephoneId;
+        @JsonProperty("officeTelephoneId")
+        private String officeTelephoneId;
+        @JsonProperty("amlId")
+        private String amlId;
+        @JsonProperty("teleNoOwnerIsSelfFlag")
+        private String teleNoOwnerIsSelfFlag;
+        @JsonProperty("phoneOwnerCertiType")
+        private String phoneOwnerCertiType;
+        @JsonProperty("phoneOwnerCertiNo")
+        private String phoneOwnerCertiNo;
+        @JsonProperty("phoneOwnerName")
+        private String phoneOwnerName;
+        @JsonProperty("idCardAccess")
+        private String idCardAccess;
+        @JsonProperty("longExpiredDate")
+        private String longExpiredDate;
+        @JsonProperty("bankCode")
+        private String bankCode;
+        @JsonProperty("bankAccount")
+        private String bankAccount;
+        @JsonProperty("department")
+        private String department;
+        @JsonProperty("marriedStatu")
+        private String marriedStatu;
+        @JsonProperty("applyYears")
+        private String applyYears;
+        @JsonProperty("mobileTelephoneMarkBecause")
+        private String mobileTelephoneMarkBecause;
+        @JsonProperty("invalidateFlag")
+        private String invalidateFlag;
+        @JsonProperty("fixedTelephoneMarkBecause")
+        private String fixedTelephoneMarkBecause;
+        @JsonProperty("driveLicenseType1")
+        private String driveLicenseType1;
+        @JsonProperty("bankAccountId")
+        private String bankAccountId;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class SaleBusinessSource {
+        @JsonProperty("saleGroupCode")
+        private String saleGroupCode;
+        @JsonProperty("saleGroupName")
+        private String saleGroupName;
+        @JsonProperty("businessSourceCode")
+        private String businessSourceCode;
+        @JsonProperty("assistantCode")
+        private String assistantCode;
+        @JsonProperty("assistant")
+        private String assistant;
+        @JsonProperty("saleAgentCode")
+        private String saleAgentCode;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PolicyPayments {
+        @JsonProperty("bankAccountNo")
+        private String bankAccountNo;
+        @JsonProperty("prepaidPassword")
+        private String prepaidPassword;
+        @JsonProperty("paymentPremiumTimes")
+        private Integer paymentPremiumTimes;
+        @JsonProperty("paymentMode")
+        private String paymentMode;
+        @JsonProperty("cheques")
+        private String cheques;
+        @JsonProperty("bankCode")
+        private String bankCode;
+        @JsonProperty("applicantAndPayerRelaType")
+        private String applicantAndPayerRelaType;
+        @JsonProperty("jiangSuRemark")
+        private String jiangSuRemark;
+        @JsonProperty("flatUnits")
+        private String flatUnits;
+        @JsonProperty("paymentBeginDate")
+        private String paymentBeginDate;
+        @JsonProperty("paymentEndDate")
+        private String paymentEndDate;
+        @JsonProperty("paymentPersonCode")
+        private String paymentPersonCode;
+        @JsonProperty("paymentPersonCertCode")
+        private String paymentPersonCertCode;
+        @JsonProperty("taxAmount")
+        private BigDecimal taxAmount;
+        @JsonProperty("netAmount")
+        private BigDecimal netAmount;
+        @JsonProperty("actualPremium")
+        private BigDecimal actualPremium;
+        @JsonProperty("accountType")
+        private String accountType;
+        @JsonProperty("paymentRate")
+        private String paymentRate;
+        @JsonProperty("realPaymentMode")
+        private String realPaymentMode;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class BillInfoDetail {
+        @JsonProperty("billPersonType")
+        private String billPersonType;
+        @JsonProperty("billCertNo")
+        private String billCertNo;
+        @JsonProperty("isBusinessBill")
+        private String isBusinessBill;
+        @JsonProperty("billMobilePhone")
+        private String billMobilePhone;
+        @JsonProperty("billCertType")
+        private String billCertType;
+        @JsonProperty("billType")
+        private String billType;
+        @JsonProperty("billEmail")
+        private String billEmail;
+        @JsonProperty("billTaxPayerType")
+        private String billTaxPayerType;
+        @JsonProperty("billPersonName")
+        private String billPersonName;
+        @JsonProperty("billBankAccount")
+        private String billBankAccount;
+        @JsonProperty("billApplantPhoneNo")
+        private String billApplantPhoneNo;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class OverlayVehicle {
+        @JsonProperty("linkId")
+        private String linkId;
+        @JsonProperty("targetId")
+        private String targetId;
+        @JsonProperty("ymIsbuyOrnot")
+        private String ymIsbuyOrnot;
+        @JsonProperty("ymBirthDate")
+        private String ymBirthDate;
+        @JsonProperty("ymElecBatteryType")
+        private String ymElecBatteryType;
+        @JsonProperty("marketDate")
+        private String marketDate;
+        @JsonProperty("vehicleCertificateNo")
+        private String vehicleCertificateNo;
+        @JsonProperty("vehicleCertificateType")
+        private String vehicleCertificateType;
+        @JsonProperty("vehiclePurchasePrice")
+        private String vehiclePurchasePrice;
+        @JsonProperty("modelsListedYear")
+        private String modelsListedYear;
+        @JsonProperty("platformId")
+        private String platformId;
+        @JsonProperty("vehicleColor")
+        private String vehicleColor;
+        @JsonProperty("theftproofEquipmentCode")
+        private String theftproofEquipmentCode;
+        @JsonProperty("isMortgage")
+        private String isMortgage;
+        @JsonProperty("isSpecialInsuranceVehicle")
+        private String isSpecialInsuranceVehicle;
+        @JsonProperty("vehicleVer")
+        private String vehicleVer;
+        @JsonProperty("groupCode")
+        private String groupCode;
+        @JsonProperty("standardName")
+        private String standardName;
+        @JsonProperty("tradeName")
+        private String tradeName;
+        @JsonProperty("tradeCode")
+        private String tradeCode;
+        @JsonProperty("totalVehicleWeight")
+        private String totalVehicleWeight;
+        @JsonProperty("seriesCode")
+        private String seriesCode;
+        @JsonProperty("modelIdCode")
+        private String modelIdCode;
+        @JsonProperty("seats")
+        private String seats;
+        @JsonProperty("rbCode")
+        private String rbCode;
+        @JsonProperty("noticeType")
+        private String noticeType;
+        @JsonProperty("otherEnergyTypeDesc")
+        private String otherEnergyTypeDesc;
+        @JsonProperty("madeDate")
+        private String madeDate;
+        @JsonProperty("exhaustCapability")
+        private String exhaustCapability;
+        @JsonProperty("noDamageYears")
+        private String noDamageYears;
+        @JsonProperty("brand")
+        private String brand;
+        @JsonProperty("modelCodeAlien")
+        private String modelCodeAlien;
+        @JsonProperty("carNameAlien")
+        private String carNameAlien;
+        @JsonProperty("tradeNameAlien")
+        private String tradeNameAlien;
+        @JsonProperty("brandAlien")
+        private String brandAlien;
+        @JsonProperty("deptNameAlien")
+        private String deptNameAlien;
+        @JsonProperty("checkVehicleInfo")
+        private CheckVehicleInfo checkVehicleInfo;
+        @JsonProperty("departmentCode")
+        private String departmentCode;
+        @JsonProperty("dbVehicleType")
+        private String dbVehicleType;
+        @JsonProperty("vehicleLicenceCode")
+        private String vehicleLicenceCode;
+        @JsonProperty("vehicleFrameNo")
+        private String vehicleFrameNo;
+        @JsonProperty("engineNo")
+        private String engineNo;
+        @JsonProperty("firstRegisterDate")
+        private String firstRegisterDate;
+        @JsonProperty("firstRegisterDateStr")
+        private String firstRegisterDateStr;
+        @JsonProperty("vehicleCertificateDate")
+        private String vehicleCertificateDate;
+        @JsonProperty("weigth")
+        private String weigth;
+        @JsonProperty("totalMass")
+        private String totalMass;
+        @JsonProperty("priceType")
+        private String priceType;
+        @JsonProperty("purchasePrice")
+        private String purchasePrice;
+        @JsonProperty("vehicleLossInsuredValue")
+        private String vehicleLossInsuredValue;
+        @JsonProperty("importFlag")
+        private String importFlag;
+        @JsonProperty("modelCode")
+        private String modelCode;
+        @JsonProperty("carName")
+        private String carName;
+        @JsonProperty("theftProof")
+        private String theftProof;
+        @JsonProperty("vehicleType")
+        private String vehicleType;
+        @JsonProperty("pureRange")
+        private String pureRange;
+        @JsonProperty("vehicleClass")
+        private String vehicleClass;
+        @JsonProperty("vehicleStyle")
+        private String vehicleStyle;
+        @JsonProperty("autoModelCode")
+        private String autoModelCode;
+        @JsonProperty("vehicleBrand")
+        private String vehicleBrand;
+        @JsonProperty("brandChnName")
+        private String brandChnName;
+        @JsonProperty("averageMile")
+        private String averageMile;
+        @JsonProperty("csTradeName")
+        private String csTradeName;
+        @JsonProperty("csTradeCode")
+        private String csTradeCode;
+        @JsonProperty("brandCode")
+        private String brandCode;
+        @JsonProperty("series")
+        private String series;
+        @JsonProperty("categoryName")
+        private String categoryName;
+        @JsonProperty("categoryCode")
+        private String categoryCode;
+        @JsonProperty("configType")
+        private String configType;
+        @JsonProperty("partInfo")
+        private String partInfo;
+        @JsonProperty("powerType")
+        private String powerType;
+        @JsonProperty("vehicleFgwCode")
+        private String vehicleFgwCode;
+        @JsonProperty("vehicleFgwName")
+        private String vehicleFgwName;
+        @JsonProperty("vehicleModelType")
+        private String vehicleModelType;
+        @JsonProperty("vehicleStyleDesc")
+        private String vehicleStyleDesc;
+        @JsonProperty("vehicleTypeName")
+        private String vehicleTypeName;
+        @JsonProperty("makeDate")
+        private String makeDate;
+        @JsonProperty("detailDesc")
+        private String detailDesc;
+        @JsonProperty("vehicleCategory")
+        private String vehicleCategory;
+        @JsonProperty("personnelName")
+        private String personnelName;
+        @JsonProperty("refitDesc")
+        private String refitDesc;
+        @JsonProperty("basicRateCode")
+        private String basicRateCode;
+        @JsonProperty("deptName")
+        private String deptName;
+        @JsonProperty("deptCode")
+        private String deptCode;
+        @JsonProperty("vehicleSeats")
+        private String vehicleSeats;
+        @JsonProperty("fuelType")
+        private String fuelType;
+        @JsonProperty("autoModelChnName")
+        private String autoModelChnName;
+        @JsonProperty("licenceTypeCode")
+        private String licenceTypeCode;
+        @JsonProperty("ecdemicVehicleFlag")
+        private String ecdemicVehicleFlag;
+        @JsonProperty("vehicleTonnages")
+        private Integer vehicleTonnages;
+        @JsonProperty("power")
+        private String power;
+        @JsonProperty("maxDesignSpeed")
+        private String maxDesignSpeed;
+        @JsonProperty("runCardCertificateDate")
+        private String runCardCertificateDate;
+        @JsonProperty("customerNegotiatePrice")
+        private String customerNegotiatePrice;
+        @JsonProperty("originalCustomerNegotiatePrice")
+        private String originalCustomerNegotiatePrice;
+        @JsonProperty("fleetNo")
+        private String fleetNo;
+        @JsonProperty("maker")
+        private String maker;
+        @JsonProperty("approvedCapacity")
+        private String approvedCapacity;
+        @JsonProperty("ineffectualDate")
+        private String ineffectualDate;
+        @JsonProperty("lastCheckDate")
+        private String lastCheckDate;
+        @JsonProperty("rejectDate")
+        private String rejectDate;
+        @JsonProperty("riskFlag")
+        private String riskFlag;
+        @JsonProperty("targetType")
+        private String targetType;
+        @JsonProperty("fleetRate")
+        private String fleetRate;
+        @JsonProperty("usageAttributeCode")
+        private String usageAttributeCode;
+        @JsonProperty("ownershipAttributeCode")
+        private String ownershipAttributeCode;
+        @JsonProperty("beneficiaryList")
+        private List<Object> beneficiaryList;
+        @JsonProperty("policyPricing")
+        private PolicyPricing policyPricing;
+        @JsonProperty("vehicleTax")
+        private VehicleTax vehicleTax;
+        @JsonProperty("checkVehicleCodeSecret")
+        private String checkVehicleCodeSecret;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class CheckVehicleInfo {
+        @JsonProperty("usageAttributeCode")
+        private String usageAttributeCode;
+        @JsonProperty("runRegionCode")
+        private String runRegionCode;
+        @JsonProperty("checkVehicleFlag")
+        private String checkVehicleFlag;
+        @JsonProperty("uploadCheckVehicleInfo")
+        private String uploadCheckVehicleInfo;
+        @JsonProperty("checkVehicleSituation")
+        private String checkVehicleSituation;
+        @JsonProperty("vehicleChecker")
+        private String vehicleChecker;
+        @JsonProperty("checkRecord")
+        private String checkRecord;
+        @JsonProperty("checkTime")
+        private String checkTime;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PolicyPricing {
+        @JsonProperty("usageAttributeCode")
+        private String usageAttributeCode;
+        @JsonProperty("ownershipAttributeCode")
+        private String ownershipAttributeCode;
+        @JsonProperty("nonclaimAdjust")
+        private String nonclaimAdjust;
+        @JsonProperty("claimAdjustLevel")
+        private String claimAdjustLevel;
+        @JsonProperty("lastyearStartDate")
+        private String lastyearStartDate;
+        @JsonProperty("lastyearEndDate")
+        private String lastyearEndDate;
+        @JsonProperty("partInfo")
+        private String partInfo;
+        @JsonProperty("isMortgage")
+        private String isMortgage;
+        @JsonProperty("isSpecialInsuranceVehicle")
+        private String isSpecialInsuranceVehicle;
+        @JsonProperty("claimRecordBizScoreSize")
+        private String claimRecordBizScoreSize;
+        @JsonProperty("loanVehicleFlag")
+        private String loanVehicleFlag;
+        @JsonProperty("injurySite")
+        private String injurySite;
+        @JsonProperty("transferFlag")
+        private String transferFlag;
+        @JsonProperty("searchSequenceNo")
+        private String searchSequenceNo;
+        @JsonProperty("dbVehicleAutoModelChnName")
+        private String dbVehicleAutoModelChnName;
+        @JsonProperty("refitDesc")
+        private String refitDesc;
+        @JsonProperty("lastYearIsTel")
+        private String lastYearIsTel;
+        @JsonProperty("reinsureFlag")
+        private String reinsureFlag;
+        @JsonProperty("rateFloatFlag")
+        private String rateFloatFlag;
+        @JsonProperty("ratioFluctuateType")
+        private String ratioFluctuateType;
+        @JsonProperty("repairFactory")
+        private String repairFactory;
+        @JsonProperty("dbVehicleWeigth")
+        private String dbVehicleWeigth;
+        @JsonProperty("riskScore")
+        private String riskScore;
+        @JsonProperty("riskScoreTwenty")
+        private String riskScoreTwenty;
+        @JsonProperty("algrId")
+        private String algrId;
+        @JsonProperty("riskScoreColor")
+        private String riskScoreColor;
+        @JsonProperty("scoreReason")
+        private String scoreReason;
+        @JsonProperty("scoreReasonLevel")
+        private String scoreReasonLevel;
+        @JsonProperty("scoreReasonLevel2")
+        private String scoreReasonLevel2;
+        @JsonProperty("scoreReasonLevel3")
+        private String scoreReasonLevel3;
+        @JsonProperty("highRiskFlag")
+        private String highRiskFlag;
+        @JsonProperty("effectReason")
+        private String effectReason;
+        @JsonProperty("dbVehicleVeiw")
+        private String dbVehicleVeiw;
+        @JsonProperty("lastYearCompanyId")
+        private String lastYearCompanyId;
+        @JsonProperty("chargeRateFinal")
+        private String chargeRateFinal;
+        @JsonProperty("rateType")
+        private String rateType;
+        @JsonProperty("priceRises")
+        private String priceRises;
+        @JsonProperty("underWriteRate")
+        private String underWriteRate;
+        @JsonProperty("autoRuleRatioOD")
+        private String autoRuleRatioOD;
+        @JsonProperty("autoRuleRatioTP")
+        private String autoRuleRatioTP;
+        @JsonProperty("autoRuleRatioTHEFT")
+        private String autoRuleRatioTHEFT;
+        @JsonProperty("autoRuleRatioOTHER")
+        private String autoRuleRatioOTHER;
+        @JsonProperty("underwriteRuleRatioOD")
+        private String underwriteRuleRatioOD;
+        @JsonProperty("underwriteRuleRatioTP")
+        private String underwriteRuleRatioTP;
+        @JsonProperty("underwriteRuleRatioTHEFT")
+        private String underwriteRuleRatioTHEFT;
+        @JsonProperty("underwriteRuleRatioOTHER")
+        private String underwriteRuleRatioOTHER;
+        @JsonProperty("tlType")
+        private String tlType;
+        @JsonProperty("autoFloatRatioOD")
+        private BigDecimal autoFloatRatioOD;
+        @JsonProperty("autoFloatRatioTp")
+        private String autoFloatRatioTp;
+        @JsonProperty("autoFloatRatioTheft")
+        private String autoFloatRatioTheft;
+        @JsonProperty("autoFloatRatioOther")
+        private String autoFloatRatioOther;
+        @JsonProperty("appointAreaCode")
+        private String appointAreaCode;
+        @JsonProperty("fdConfigId")
+        private String fdConfigId;
+        @JsonProperty("modelDiscount")
+        private String modelDiscount;
+        @JsonProperty("autoFloatHandingCost")
+        private BigDecimal autoFloatHandingCost;
+        @JsonProperty("modelrate")
+        private String modelrate;
+        @JsonProperty("advicediscount")
+        private String advicediscount;
+        @JsonProperty("dbVehicleBrand")
+        private String dbVehicleBrand;
+        @JsonProperty("dbVehicleTypeName")
+        private String dbVehicleTypeName;
+        @JsonProperty("usageLicenceName")
+        private String usageLicenceName;
+        @JsonProperty("vehicleTypeChiName")
+        private String vehicleTypeChiName;
+        @JsonProperty("autoFloatTargetRebate")
+        private String autoFloatTargetRebate;
+        @JsonProperty("riskFlag")
+        private String riskFlag;
+        @JsonProperty("dbExhaustCapability")
+        private String dbExhaustCapability;
+        @JsonProperty("dbVehicleSeats")
+        private String dbVehicleSeats;
+        @JsonProperty("dbVehicleTonnages")
+        private Integer dbVehicleTonnages;
+        @JsonProperty("dbVehicleValue")
+        private String dbVehicleValue;
+        @JsonProperty("ifModelRate")
+        private String ifModelRate;
+        @JsonProperty("isMotorcade")
+        private String isMotorcade;
+        @JsonProperty("scoreRunId")
+        private String scoreRunId;
+        @JsonProperty("specialCarFlag")
+        private String specialCarFlag;
+        @JsonProperty("transferDate")
+        private String transferDate;
+        @JsonProperty("vehicleAlias")
+        private String vehicleAlias;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class VehicleTax {
+        @JsonProperty("ownerName")
+        private String ownerName;
+        @JsonProperty("vehicleTaxAmount")
+        private String vehicleTaxAmount;
+        @JsonProperty("drivingLicenseAddress")
+        private String drivingLicenseAddress;
+        @JsonProperty("replacesPaysTaxArea")
+        private String replacesPaysTaxArea;
+        @JsonProperty("changeDate")
+        private String changeDate;
+        @JsonProperty("taxChangeReasonCodeAp")
+        private String taxChangeReasonCodeAp;
+        @JsonProperty("taxChangeRensonDescAp")
+        private String taxChangeRensonDescAp;
+        @JsonProperty("taxAmountFlag")
+        private String taxAmountFlag;
+        @JsonProperty("computeNo")
+        private String computeNo;
+        @JsonProperty("localOrEcdemic")
+        private String localOrEcdemic;
+        @JsonProperty("oldCarMark")
+        private String oldCarMark;
+        @JsonProperty("boroughAndCounty")
+        private String boroughAndCounty;
+        @JsonProperty("personTaxCode")
+        private String personTaxCode;
+        @JsonProperty("sumAnnualTaxDue")
+        private String sumAnnualTaxDue;
+        @JsonProperty("lastYearEndDate")
+        private String lastYearEndDate;
+        @JsonProperty("vehicleState")
+        private String vehicleState;
+        @JsonProperty("personCert")
+        private String personCert;
+        @JsonProperty("startDate")
+        private String startDate;
+        @JsonProperty("endDate")
+        private String endDate;
+        @JsonProperty("certDepartmentName")
+        private String certDepartmentName;
+        @JsonProperty("steerCardVehicleType")
+        private String steerCardVehicleType;
+        @JsonProperty("registerDate")
+        private String registerDate;
+        @JsonProperty("certificateDate")
+        private String certificateDate;
+        @JsonProperty("vehicleTaxAmountLast")
+        private String vehicleTaxAmountLast;
+        @JsonProperty("payTaxWay")
+        private String payTaxWay;
+        @JsonProperty("lastEndCert")
+        private String lastEndCert;
+        @JsonProperty("vehicleTaxAmountThis")
+        private String vehicleTaxAmountThis;
+        @JsonProperty("vehicleTaxAmountThisCheck")
+        private String vehicleTaxAmountThisCheck;
+        @JsonProperty("lateDay")
+        private String lateDay;
+        @JsonProperty("lateFeeAmount")
+        private String lateFeeAmount;
+        @JsonProperty("currentTaxStartDate")
+        private String currentTaxStartDate;
+        @JsonProperty("currentTaxEndDate")
+        private String currentTaxEndDate;
+        @JsonProperty("currentTaxUnitTypeCode")
+        private String currentTaxUnitTypeCode;
+        @JsonProperty("currentUnitRate")
+        private String currentUnitRate;
+        @JsonProperty("certDepartmentCode")
+        private String certDepartmentCode;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class OverlayRatio {
+        @JsonProperty("linkId")
+        private String linkId;
+        @JsonProperty("ratio")
+        private String ratio;
+        @JsonProperty("discountValue")
+        private String discountValue;
+        @JsonProperty("dutyCode")
+        private String dutyCode;
+        @JsonProperty("factorCode")
+        private String factorCode;
+        @JsonProperty("factorValue")
+        private String factorValue;
+        @JsonProperty("ratioOd")
+        private BigDecimal ratioOd;
+        @JsonProperty("ratioTp")
+        private BigDecimal ratioTp;
+        @JsonProperty("ratioTheft")
+        private BigDecimal ratioTheft;
+        @JsonProperty("ratioOther")
+        private BigDecimal ratioOther;
+        @JsonProperty("ratiototal")
+        private BigDecimal ratiototal;
+    }
+}
+

+ 15 - 9
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/request/AnShengCrawlerPaymentRequest.java

@@ -9,7 +9,10 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
+import java.util.Optional;
+import java.util.stream.Stream;
 
 @Data
 @AllArgsConstructor
@@ -43,16 +46,19 @@ public class AnShengCrawlerPaymentRequest {
         this.addH24PlanHandle = "0";
     }
 
-    public List<String> documentList(AnShengCrawlerOrder anShengCrawlerOrder){
+    public List<String> documentList(AnShengCrawlerOrder order) {
         List<String> list = new ArrayList<>();
-        if (StringUtils.isNotEmpty(anShengCrawlerOrder.getCiPolicyNo()) && StringUtils.isNotEmpty(anShengCrawlerOrder.getBiPolicyNo())) {
-            list.add(anShengCrawlerOrder.getCiPolicyNo());
-            list.add(anShengCrawlerOrder.getBiPolicyNo());
-        }else if (StringUtils.isNotEmpty(anShengCrawlerOrder.getCiPolicyNo()) && StringUtils.isEmpty(anShengCrawlerOrder.getBiPolicyNo())){
-            list.add(anShengCrawlerOrder.getCiPolicyNo());
-        } else if (StringUtils.isEmpty(anShengCrawlerOrder.getCiPolicyNo()) && StringUtils.isEmpty(anShengCrawlerOrder.getBiPolicyNo())){
-            list.add(anShengCrawlerOrder.getBiPolicyNo());
-        }
+        Optional.ofNullable(order)
+                .ifPresent(o -> {
+                    Stream.of(o.getCiPolicyNumber(), o.getBiPolicyNumber()
+                    ).filter(StringUtils::isNotEmpty).forEach(list::add);
+                    Optional.ofNullable(o.getNiInfos())
+                            .orElse(Collections.emptyList())
+                            .stream()
+                            .map(AnShengCrawlerOrder.NiInfo::getNiPolicyNumber)
+                            .filter(StringUtils::isNotEmpty)
+                            .forEach(list::add);
+                });
         return list;
     }
 

+ 37 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/response/AnShengCrawlerAutoResetTimeResponse.java

@@ -0,0 +1,37 @@
+package com.jzg.quotation.ansheng.crawler.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class AnShengCrawlerAutoResetTimeResponse implements Serializable,AnShengCrawlerBaseResponse {
+
+    private Integer code;
+
+    private String simpleMessage;
+
+    private String message;
+
+    private ResponseData data;
+
+    @Data
+    public static class ResponseData implements Serializable {
+
+        @JsonProperty("InsuranceBeginTimeSY")
+        private String insuranceBeginTimeSY;
+
+        @JsonProperty("InsuranceBeginTimeJQ")
+        private String insuranceBeginTimeJQ;
+
+        @JsonProperty("InsuranceEndTimeSY")
+        private String insuranceEndTimeSY;
+
+        @JsonProperty("InsuranceEndTimeJQ")
+        private String insuranceEndTimeJQ;
+
+        @JsonProperty("autoResetTimeFlag")
+        private String autoResetTimeFlag;
+    }
+}

+ 347 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/response/AnShengCrawlerCalculatePremiumNonApplyResponse.java

@@ -0,0 +1,347 @@
+package com.jzg.quotation.ansheng.crawler.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+public class AnShengCrawlerCalculatePremiumNonApplyResponse implements Serializable {
+
+    private Integer code;
+
+    @JsonProperty("simpleMessage")
+    private String simpleMessage;
+
+    private String message;
+
+    private DataDTO data;
+
+    @Data
+    public static class DataDTO implements Serializable {
+
+        private List<ContractDTO> contracts;
+
+        private Boolean tryCal;
+
+        private Boolean releaseMark;
+
+        @JsonProperty("resetCustomerNegotiatePrice")
+        private String resetCustomerNegotiatePrice;
+    }
+
+    /* ================== Contract ================== */
+
+    @Data
+    public static class ContractDTO implements Serializable {
+
+        private Integer page;
+        private Integer pageSize;
+
+        private PolicyBaseDTO policyBase;
+
+        private List<PolicyCoverageDTO> policyCoverages;
+
+        private Boolean flag;
+
+        @JsonProperty("hasNon")
+        private Boolean hasNon;
+
+        @JsonProperty("allAmountChangeFlag")
+        private String allAmountChangeFlag;
+
+        @JsonProperty("noVehicleNo")
+        private Boolean noVehicleNo;
+
+        @JsonProperty("noCarowner")
+        private Boolean noCarowner;
+
+        private List<?> riskInfo;
+
+        @JsonProperty("releaseMark")
+        private Boolean releaseMark;
+
+        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+        private String insuranceBeginTime;
+
+        @JsonProperty("haveCBDorODorCDA")
+        private Boolean haveCBDorODorCDA;
+
+        @JsonProperty("cancelPolicy")
+        private Boolean cancelPolicy;
+
+        @JsonProperty("returnPolicy")
+        private Boolean returnPolicy;
+
+        @JsonProperty("claimReturnBlackPolicy")
+        private Boolean claimReturnBlackPolicy;
+
+        @JsonProperty("businessInsureCa")
+        private Boolean businessInsureCa;
+
+        @JsonProperty("compulsoryInsureCa")
+        private Boolean compulsoryInsureCa;
+
+        @JsonProperty("productCode")
+        private String productCode;
+
+        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+        private String insuranceEndTime;
+
+        @JsonProperty("usageAttributeCode")
+        private String usageAttributeCode;
+
+        @JsonProperty("returnOrCancelPolicy")
+        private Boolean returnOrCancelPolicy;
+
+        @JsonProperty("planCode")
+        private String planCode;
+
+        @JsonProperty("commerialFlag")
+        private Boolean commerialFlag;
+
+        @JsonProperty("vehicleAge")
+        private Integer vehicleAge;
+    }
+
+    /* ================== PolicyBase ================== */
+
+    @Data
+    public static class PolicyBaseDTO implements Serializable {
+
+        private Integer page;
+        private Integer pageSize;
+
+        @JsonProperty("applyPolicyNo")
+        private String applyPolicyNo;
+
+        @JsonProperty("planCodeName")
+        private String planCodeName;
+
+        @JsonProperty("planCode")
+        private String planCode;
+
+        @JsonProperty("productCode")
+        private String productCode;
+
+        @JsonProperty("productName")
+        private String productName;
+
+        @JsonProperty("includeSubDep")
+        private Boolean includeSubDep;
+
+        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+        private String insuranceBeginTime;
+
+        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+        private String insuranceEndTime;
+
+        @JsonProperty("totalInsuredAmount")
+        private BigDecimal totalInsuredAmount;
+
+        @JsonProperty("totalStandardPremium")
+        private BigDecimal totalStandardPremium;
+
+        @JsonProperty("totalAgreePremium")
+        private BigDecimal totalAgreePremium;
+
+        @JsonProperty("totalActualPremium")
+        private BigDecimal totalActualPremium;
+
+        @JsonProperty("totalNetPremium")
+        private BigDecimal totalNetPremium;
+
+        @JsonProperty("addedValueTax")
+        private BigDecimal addedValueTax;
+
+        @JsonProperty("businessClass")
+        private String businessClass;
+
+        @JsonProperty("rateScale")
+        private Integer rateScale;
+
+        @JsonProperty("rateTwoScale")
+        private Integer rateTwoScale;
+
+        @JsonProperty("claimRecordBizSize")
+        private Integer claimRecordBizSize;
+
+        @JsonProperty("claimRecordSize")
+        private Integer claimRecordSize;
+
+        @JsonProperty("allClaimAmountBiz")
+        private Integer allClaimAmountBiz;
+
+        @JsonProperty("allClaimAmount")
+        private Integer allClaimAmount;
+
+        @JsonProperty("illegalInsuredCertFlag")
+        private Boolean illegalInsuredCertFlag;
+
+        @JsonProperty("immediateEffectFlag")
+        private String immediateEffectFlag;
+
+        @JsonProperty("isOverdue")
+        private Boolean isOverdue;
+
+        @JsonProperty("nMotorIncreServiceRatio")
+        private Integer nMotorIncreServiceRatio;
+
+        @JsonProperty("applicantAgeFlag")
+        private Boolean applicantAgeFlag;
+
+        @JsonProperty("insuranerAgeFlag")
+        private Boolean insuranerAgeFlag;
+
+        @JsonProperty("personnelAgeFlag")
+        private Boolean personnelAgeFlag;
+
+        @JsonProperty("compulsoryInsureFlag")
+        private Boolean compulsoryInsureFlag;
+
+        @JsonProperty("businessInsureFlag")
+        private Boolean businessInsureFlag;
+
+        @JsonProperty("minRatioMode")
+        private String minRatioMode;
+
+        @JsonProperty("factorScale")
+        private String factorScale;
+
+        @JsonProperty("shortTimeCoefficientShow")
+        private Boolean shortTimeCoefficientShow;
+    }
+
+    /* ================== PolicyCoverage ================== */
+
+    @Data
+    public static class PolicyCoverageDTO implements Serializable {
+
+        private Integer page;
+        private Integer pageSize;
+
+        @JsonProperty("dutyCode")
+        private String dutyCode;
+
+        @JsonProperty("dutyChineseName")
+        private String dutyChineseName;
+
+        private Integer seats;
+
+        @JsonProperty("premiumRate")
+        private BigDecimal premiumRate;
+
+        @JsonProperty("deductionAmount")
+        private BigDecimal deductionAmount;
+
+        private BigDecimal deductible;
+
+        @JsonProperty("medicalAmount")
+        private BigDecimal medicalAmount;
+
+        @JsonProperty("dieAmount")
+        private BigDecimal dieAmount;
+
+        @JsonProperty("propertyAmount")
+        private BigDecimal propertyAmount;
+
+        @JsonProperty("noFaultMedicalAmount")
+        private BigDecimal noFaultMedicalAmount;
+
+        @JsonProperty("noFaultDieAmount")
+        private BigDecimal noFaultDieAmount;
+
+        @JsonProperty("noFaultPropertyAmount")
+        private BigDecimal noFaultPropertyAmount;
+
+        @JsonProperty("allAmount")
+        private BigDecimal allAmount;
+
+        @JsonProperty("insuredAmount")
+        private BigDecimal insuredAmount;
+
+        @JsonProperty("totalStandardPremium")
+        private BigDecimal totalStandardPremium;
+
+        @JsonProperty("totalAgreePremium")
+        private BigDecimal totalAgreePremium;
+
+        @JsonProperty("totalActualPremium")
+        private BigDecimal totalActualPremium;
+
+        @JsonProperty("totalNetPremium")
+        private BigDecimal totalNetPremium;
+
+        @JsonProperty("addedValueTax")
+        private BigDecimal addedValueTax;
+
+        @JsonProperty("equipmentInsureAmount")
+        private BigDecimal equipmentInsureAmount;
+
+        @JsonProperty("newFlag")
+        private Boolean newFlag;
+
+        @JsonProperty("modifyFlag")
+        private Boolean modifyFlag;
+
+        @JsonProperty("calculateEndorsePremium")
+        private BigDecimal calculateEndorsePremium;
+
+        @JsonProperty("checkEndorsePremium")
+        private BigDecimal checkEndorsePremium;
+
+        @JsonProperty("checkTotalNetPremium")
+        private BigDecimal checkTotalNetPremium;
+
+        @JsonProperty("checkAddedValueTax")
+        private BigDecimal checkAddedValueTax;
+
+        private Boolean checked;
+
+        @JsonProperty("deductionRate")
+        private BigDecimal deductionRate;
+
+        @JsonProperty("serviceNum")
+        private String serviceNum;
+
+        private String mileage;
+
+        @JsonProperty("setMeal")
+        private String setMeal;
+
+        @JsonProperty("isTelpeson")
+        private String isTelpeson;
+
+        @JsonProperty("telPhone")
+        private String telPhone;
+
+        @JsonProperty("refundFlag")
+        private String refundFlag;
+
+        @JsonProperty("coverageNum")
+        private Integer coverageNum;
+
+        @JsonProperty("isShareSumDutyFlag")
+        private String isShareSumDutyFlag;
+
+        private String priority;
+
+        @JsonProperty("coverageCancelOrReturn")
+        private Boolean coverageCancelOrReturn;
+
+        @JsonProperty("coverageReturn")
+        private Boolean coverageReturn;
+
+        @JsonProperty("coverageCancel")
+        private Boolean coverageCancel;
+
+        @JsonProperty("claimCoverageReturn")
+        private Boolean claimCoverageReturn;
+
+        @JsonProperty("ariExpense")
+        private BigDecimal ariExpense;
+    }
+}

+ 279 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/response/AnShengCrawlerNonConfigCoveragesResponse.java

@@ -0,0 +1,279 @@
+package com.jzg.quotation.ansheng.crawler.entity.response;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class AnShengCrawlerNonConfigCoveragesResponse {
+
+    @JsonProperty("code")
+    private Integer code;
+
+    @JsonProperty("simpleMessage")
+    private String simpleMessage;
+
+    @JsonProperty("message")
+    private String message;
+
+    @JsonProperty("data")
+    private PolicyResponse data;
+
+
+    @Data
+    public static class PolicyResponse {
+
+        @JsonProperty("policyBase")
+        private PolicyBase policyBase;
+
+        @JsonProperty("productDefine")
+        private ProductDefine productDefine;
+
+        @JsonProperty("policyRatioList")
+        private List<?> policyRatioList;
+
+        @JsonProperty("policyCoverageList")
+        private List<PolicyCoverage> policyCoverageList;
+
+        @JsonProperty("versionNo")
+        private String versionNo;
+
+        @JsonProperty("workAreaList")
+        private List<?> workAreaList;
+
+        //================ policyBase 内部类 ================
+        @Data
+        public static class PolicyBase {
+            @JsonProperty("page")
+            private Integer page;
+
+            @JsonProperty("pageSize")
+            private Integer pageSize;
+
+            @JsonProperty("includeSubDep")
+            private Boolean includeSubDep;
+
+            @JsonProperty("insuranceBeginTime")
+            private String insuranceBeginTime;
+
+            @JsonProperty("insuranceEndTime")
+            private String insuranceEndTime;
+
+            @JsonProperty("businessClass")
+            private String businessClass;
+
+            @JsonProperty("rateScale")
+            private Integer rateScale;
+
+            @JsonProperty("rateTwoScale")
+            private Integer rateTwoScale;
+
+            @JsonProperty("claimRecordBizSize")
+            private Integer claimRecordBizSize;
+
+            @JsonProperty("claimRecordSize")
+            private Integer claimRecordSize;
+
+            @JsonProperty("allClaimAmountBiz")
+            private Integer allClaimAmountBiz;
+
+            @JsonProperty("allClaimAmount")
+            private Integer allClaimAmount;
+
+            @JsonProperty("illegalInsuredCertFlag")
+            private Boolean illegalInsuredCertFlag;
+
+            @JsonProperty("immediateEffectFlag")
+            private String immediateEffectFlag;
+
+            @JsonProperty("isOverdue")
+            private Boolean isOverdue;
+
+            @JsonProperty("applicantAgeFlag")
+            private Boolean applicantAgeFlag;
+
+            @JsonProperty("insuranerAgeFlag")
+            private Boolean insuranerAgeFlag;
+
+            @JsonProperty("personnelAgeFlag")
+            private Boolean personnelAgeFlag;
+
+            @JsonProperty("compulsoryInsureFlag")
+            private Boolean compulsoryInsureFlag;
+
+            @JsonProperty("businessInsureFlag")
+            private Boolean businessInsureFlag;
+
+            @JsonProperty("minRatioMode")
+            private String minRatioMode;
+
+            @JsonProperty("factorScale")
+            private String factorScale;
+
+            @JsonProperty("shortTimeCoefficientShow")
+            private Boolean shortTimeCoefficientShow;
+        }
+
+        //================ productDefine 内部类 ================
+        @Data
+        public static class ProductDefine {
+            @JsonProperty("createdBy")
+            private String createdBy;
+
+            @JsonProperty("createdDate")
+            private String createdDate;
+
+            @JsonProperty("updatedBy")
+            private String updatedBy;
+
+            @JsonProperty("updatedDate")
+            private String updatedDate;
+
+            @JsonProperty("page")
+            private Integer page;
+
+            @JsonProperty("pageSize")
+            private Integer pageSize;
+
+            @JsonProperty("planCode")
+            private String planCode;
+
+            @JsonProperty("productCode")
+            private String productCode;
+
+            @JsonProperty("productName")
+            private String productName;
+
+            @JsonProperty("needValidate")
+            private String needValidate;
+
+            @JsonProperty("orderId")
+            private String orderId;
+
+            @JsonProperty("productVersionNo")
+            private String productVersionNo;
+
+            @JsonProperty("productAlias")
+            private String productAlias;
+
+            @JsonProperty("id")
+            private String id;
+
+            @JsonProperty("dutyChoice")
+            private String dutyChoice;
+
+            @JsonProperty("checked")
+            private String checked;
+
+            @JsonProperty("stopPlanInsure")
+            private Boolean stopPlanInsure;
+
+            @JsonProperty("autoRenewal")
+            private Boolean autoRenewal;
+
+            @JsonProperty("returnMode")
+            private String returnMode;
+
+            @JsonProperty("rateForAXA")
+            private String rateForAXA;
+
+            @JsonProperty("shortPolicy")
+            private Boolean shortPolicy;
+
+            @JsonProperty("giveRisk")
+            private String giveRisk;
+
+            @JsonProperty("isCalculatePremium")
+            private String isCalculatePremium;
+
+            @JsonProperty("productFactory")
+            private Boolean productFactory;
+
+            @JsonProperty("calculateModeStr")
+            private String calculateModeStr;
+
+            @JsonProperty("useTemplates")
+            private String useTemplates;
+
+            @JsonProperty("haveAloneApplyPremission")
+            private Boolean haveAloneApplyPremission;
+
+            @JsonProperty("tpaClaims")
+            private Boolean tpaClaims;
+
+            @JsonProperty("printQuestionnaire")
+            private Boolean printQuestionnaire;
+
+            @JsonProperty("stopInsure")
+            private Boolean stopInsure;
+        }
+
+        //================ policyCoverageList 内部类 ================
+        @Data
+        public static class PolicyCoverage {
+            @JsonProperty("dutyDetailList")
+            private List<?> dutyDetailList;
+
+            @JsonProperty("isPrintShow")
+            private String isPrintShow;
+
+            @JsonProperty("displayNo")
+            private Integer displayNo;
+
+            @JsonProperty("printDesc")
+            private String printDesc;
+
+            @JsonProperty("printDescChinese")
+            private String printDescChinese;
+
+            @JsonProperty("dutyCode")
+            private String dutyCode;
+
+            @JsonProperty("dutyVersionAge")
+            private List<DutyVersionAge> dutyVersionAge;
+
+            @JsonProperty("dutyDesc")
+            private String dutyDesc;
+
+            @JsonProperty("dutyDescChinese")
+            private String dutyDescChinese;
+
+            @JsonProperty("dutyChineseName")
+            private String dutyChineseName;
+
+            @JsonProperty("productCode")
+            private String productCode;
+
+            @JsonProperty("mainCoverage")
+            private String mainCoverage;
+
+            @JsonProperty("dutyAbbreviation")
+            private String dutyAbbreviation;
+
+            @JsonProperty("benefitsCode")
+            private String benefitsCode;
+
+            // dutyVersionAge子内部类
+            @Data
+            public static class DutyVersionAge {
+                @JsonProperty("dutyType")
+                private String dutyType;
+
+                @JsonProperty("dutyCode")
+                private String dutyCode;
+
+                @JsonProperty("premiumRate")
+                private String premiumRate;
+
+                @JsonProperty("insuredAmountContent")
+                private String insuredAmountContent;
+
+                @JsonProperty("insuredAmount")
+                private Integer insuredAmount;
+            }
+        }
+    }
+
+}

+ 50 - 0
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/entity/response/AnShengCrawlerNonInsuranceResponse.java

@@ -0,0 +1,50 @@
+package com.jzg.quotation.ansheng.crawler.entity.response;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.ansheng.crawler.entity.po.QuotationListDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+public class AnShengCrawlerNonInsuranceResponse {
+
+    private BigDecimal fcxPrice;
+
+
+    private List<DutyPremiumDTO> dtoList;
+
+    private List<QuotationListDTO> quotationList;
+
+
+    @Data
+    public static class DutyPremiumDTO implements Serializable {
+
+        @JsonProperty("dutyCode")
+        private String dutyCode;
+
+        @JsonProperty("insuredAmount")
+        private BigDecimal insuredAmount;
+
+        @JsonProperty("totalActualPremium")
+        private BigDecimal totalActualPremium;
+
+        @JsonProperty("totalAgreePremium")
+        private BigDecimal totalAgreePremium;
+
+        @JsonProperty("totalNetPremium")
+        private BigDecimal totalNetPremium;
+
+        @JsonProperty("totalStandardPremium")
+        private BigDecimal totalStandardPremium;
+
+        /**
+         */
+        @JsonProperty("addedValueTax")
+        private BigDecimal addedValueTax = BigDecimal.ZERO;
+    }
+
+}

+ 147 - 27
tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/service/impl/AnShengCrawlerRequestImpl.java

@@ -1,20 +1,25 @@
 package com.jzg.quotation.ansheng.crawler.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import com.jzg.commons.constants.dict.InsOrderStatusEnum;
+import com.jzg.commons.entity.quote.vo.AccidentalDrivingVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.entity.quote.vo.aggregated.*;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.StringUtils;
 import com.jzg.quotation.ansheng.crawler.build.AnShengCrawlerApplyApplicationRequestBuild;
+import com.jzg.quotation.ansheng.crawler.build.AnShengCrawlerNonContractsBuild;
 import com.jzg.quotation.ansheng.crawler.build.AnShengCrawlerQuoteResultsVoBuild;
 import com.jzg.quotation.ansheng.crawler.component.AnShengCrawlerCacheComponent;
 import com.jzg.quotation.ansheng.crawler.component.AnShengCrawlerRequestComponent;
 import com.jzg.quotation.ansheng.crawler.constant.enums.DepartmentPlanCode;
 import com.jzg.quotation.ansheng.crawler.entity.po.AnShengCrawlerOrder;
+import com.jzg.quotation.ansheng.crawler.entity.po.QuotationListDTO;
 import com.jzg.quotation.ansheng.crawler.entity.request.*;
 import com.jzg.quotation.ansheng.crawler.entity.response.*;
 import com.jzg.quotation.ansheng.crawler.service.AnShengCrawlerLoginService;
@@ -37,6 +42,7 @@ import org.springframework.http.HttpHeaders;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
 
+import java.math.BigDecimal;
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
 import java.time.Year;
@@ -139,7 +145,7 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
         AnShengCrawlerSearchVehicleByVinResponse.DataDTO dataDTO = CarModelsFilterUtils.to(dataDTOS, quoteVo.getCarInfoVo());
         // 报价
         AnShengCrawlerCalculatePremiumApplyMessage crawlerCalculatePremiumApply = new AnShengCrawlerCalculatePremiumApplyMessage(quoteVo, dataDTO, userDetailResponse, departmentPlanCode, checkVehicleCodeSecretGenerate);
-        log.info("安盛报价参数:{}", JSONObject.toJSONString(crawlerCalculatePremiumApply));
+
         InsuranceContractRequest insuranceContractRequest = new  InsuranceContractRequest(crawlerCalculatePremiumApply);
         PureRiskPremiumQueryResponse premiumQueryResponse = anShengCrawlerRequestComponent.pureRiskPremiumQuery(insuranceContractRequest, httpHeaders);
         PureRiskPremiumQueryResponse.TargetsBean targetsBean = premiumQueryResponse.getData().getContracts().get(0).getTargets().get(0);
@@ -149,7 +155,16 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
             contract.getTargetList().get(0).setModelCode(modelCode);
             contract.getTargetList().get(0).setCarName(brandChnName);
         }
-        log.info("=============:{}", JSONObject.toJSONString(premiumQueryResponse));
+        AnShengCrawlerAutoResetTimeResponse anShengCrawlerAutoResetTimeResponse = anShengCrawlerRequestComponent.autoResetTime(crawlerCalculatePremiumApply, httpHeaders);
+        if (anShengCrawlerAutoResetTimeResponse.getCode() != 200){
+            throw new SystemException(anShengCrawlerAutoResetTimeResponse.getMessage());
+        }
+        if (wantRebuild(quoteVo,anShengCrawlerAutoResetTimeResponse)){
+            crawlerCalculatePremiumApply = new AnShengCrawlerCalculatePremiumApplyMessage(quoteVo, dataDTO, userDetailResponse, departmentPlanCode, checkVehicleCodeSecretGenerate);
+        }
+        AnShengCrawlerNonInsuranceResponse anShengCrawlerNonInsuranceResponse = nonInsurancePrice(quoteVo, userDetailResponse, insureAdd, httpHeaders, crawlerCalculatePremiumApply);
+        log.info("安盛报价参数:{}", JSONObject.toJSONString(crawlerCalculatePremiumApply));
+
         AnShengCrawlerCalculatePremiumApplyResponse calculatePremiumApply = anShengCrawlerRequestComponent.calculatePremiumApply(crawlerCalculatePremiumApply, httpHeaders);
         // 处理重复投保
         if (calculatePremiumApply.getMessage().contains("重复投保")) {
@@ -165,8 +180,9 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
         if (calculatePremiumApply.getCode() == 200) {
             // 缓存报价信息
             //  处理报价返回起止时间
+            AnShengCrawlerCalculatePremiumApplyMessage finalCrawlerCalculatePremiumApply = crawlerCalculatePremiumApply;
             calculatePremiumApply.getData().getContracts().forEach(v -> {
-                crawlerCalculatePremiumApply.getContracts().forEach(va -> {
+                finalCrawlerCalculatePremiumApply.getContracts().forEach(va -> {
                     AnShengCrawlerCalculatePremiumApplyMessage.ContractsDTO.PolicyBaseDTO policyBase = va.getPolicyBase();
                     if (StringUtils.equals(v.getPlanCode(), policyBase.getPlanCode())) {
                         policyBase.setInsuranceBeginTime(v.getInsuranceBeginTime());
@@ -175,15 +191,109 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
                 });
             });
             log.info("安盛报价返回数据:{}", JSONObject.toJSONString(calculatePremiumApply));
-            AnShengCrawlerApplyApplicationRequest autoSpecialPromiseRequest = AnShengCrawlerApplyApplicationRequestBuild.build(crawlerCalculatePremiumApply, calculatePremiumApply, userDetailResponse, compulsoryVersionNo,dataDTO.getBrandAutoModel().getBrand());
+            AnShengCrawlerApplyApplicationRequest autoSpecialPromiseRequest = AnShengCrawlerApplyApplicationRequestBuild.build(crawlerCalculatePremiumApply, calculatePremiumApply,
+                    userDetailResponse, compulsoryVersionNo,dataDTO.getBrandAutoModel().getBrand());
+            // 获取特别约定
+            AnShengCrawlerAutoSpecialPromiseResponse autoSpecialPromiseResponse = anShengCrawlerRequestComponent.autoSpecialPromise(autoSpecialPromiseRequest, httpHeaders);
+            Map<String, AnShengCrawlerAutoSpecialPromiseResponse.DataDTO> stringDataDTOMap = autoSpecialPromiseResponse.getData().stream().collect(Collectors.toMap(AnShengCrawlerAutoSpecialPromiseResponse.DataDTO::getPlanCode, x -> x));
+            autoSpecialPromiseRequest.getContracts().forEach(contract -> {
+                AnShengCrawlerAutoSpecialPromiseResponse.DataDTO promiseData = stringDataDTOMap.get(contract.getPolicyBase().getPlanCode());
+                contract.getPolicyBase().setAlterableSpecialPromise(promiseData.getAlterableSpecialPromise());
+                contract.setQuotationList(anShengCrawlerNonInsuranceResponse.getQuotationList());
+            });
+            autoSpecialPromiseRequest.setFex(anShengCrawlerNonInsuranceResponse);
+            log.info("==============",JSONObject.toJSONString(autoSpecialPromiseRequest));
             // 缓存数据
             anShengCrawlerCacheComponent.cacheQuoteRequest(ordersNo, autoSpecialPromiseRequest);
         }
         anShengCrawlerOrderService.saveRecordingTime(ordersNo,quoteVo.getCarInfoVo().getLicenseNo());
         // 构造返回参数
-        return AnShengCrawlerQuoteResultsVoBuild.buildQuoteResultsVo(ordersNo, quoteVo, calculatePremiumApply);
+        return AnShengCrawlerQuoteResultsVoBuild.buildQuoteResultsVo(ordersNo, quoteVo, calculatePremiumApply, anShengCrawlerNonInsuranceResponse.getFcxPrice());
+    }
+
+
+    public boolean wantRebuild(QuoteVo quoteVo,AnShengCrawlerAutoResetTimeResponse anShengCrawlerAutoResetTimeResponse){
+        boolean wantRebuild = false;
+        String insuranceBeginTimeJQ = anShengCrawlerAutoResetTimeResponse.getData().getInsuranceBeginTimeJQ();
+        if (Objects.nonNull(quoteVo.getCiRiskInfoVo()) && StringUtils.isNotEmpty(insuranceBeginTimeJQ) && !StringUtils.equals(quoteVo.getCiRiskInfoVo().getStartDate(),insuranceBeginTimeJQ)){
+            quoteVo.getCiRiskInfoVo().setStartDate(anShengCrawlerAutoResetTimeResponse.getData().getInsuranceBeginTimeJQ());
+            quoteVo.getCiRiskInfoVo().setEndDate(anShengCrawlerAutoResetTimeResponse.getData().getInsuranceEndTimeJQ());
+            wantRebuild = true;
+        }
+        String insuranceBeginTimeSY = anShengCrawlerAutoResetTimeResponse.getData().getInsuranceBeginTimeSY();
+        if (Objects.nonNull(quoteVo.getBiRiskInfoVo()) && StringUtils.isNotEmpty(insuranceBeginTimeSY) && !StringUtils.equals(quoteVo.getBiRiskInfoVo().getStartDate(),insuranceBeginTimeSY)){
+            quoteVo.getBiRiskInfoVo().setStartDate(anShengCrawlerAutoResetTimeResponse.getData().getInsuranceBeginTimeSY());
+            quoteVo.getBiRiskInfoVo().setEndDate(anShengCrawlerAutoResetTimeResponse.getData().getInsuranceEndTimeSY());
+            wantRebuild = true;
+        }
+        return wantRebuild;
+    }
+
+
+
+    public AnShengCrawlerNonInsuranceResponse nonInsurancePrice(QuoteVo quoteVo, AnShengCrawlerGetUserDetailResponse.DataDTO.AgentDefineDTO userDetailResponse, AnShengCrawlerInsureAddResponse.DataDTO insureAdd,
+                                                       HttpHeaders httpHeaders, AnShengCrawlerCalculatePremiumApplyMessage crawlerCalculatePremiumApply) {
+        AnShengCrawlerNonInsuranceResponse anShengCrawlerNonInsuranceResponse = new AnShengCrawlerNonInsuranceResponse();
+        List<AnShengCrawlerNonInsuranceResponse.DutyPremiumDTO> dtoList = new ArrayList<>();
+        BigDecimal nonPrice = BigDecimal.ZERO;
+        List<QuotationListDTO> quotationList = new ArrayList<>();
+        final int SUCCESS_CODE = 200;
+
+        if (CollectionUtil.isNotEmpty(quoteVo.getAccidentalDrivings())) {
+            for (AccidentalDrivingVo accidentalDriving : quoteVo.getAccidentalDrivings()) {
+                // 1.组装请求获取附加险
+                AnShengCrawlerGetNonConfigCoveragesRequest coveragesRequest = new AnShengCrawlerGetNonConfigCoveragesRequest(
+                        userDetailResponse.getDepartmentCode(),
+                        accidentalDriving.getParentProductCode(),
+                        accidentalDriving.getProductCode()
+                );
+                AnShengCrawlerNonConfigCoveragesResponse crawlerNonConfigCoveragesResponse =
+                        anShengCrawlerRequestComponent.getNonConfigCoverages(coveragesRequest, httpHeaders);
+
+                // 2.保费计算请求
+                AnShengCrawlerCalculatePremiumNonApplyRequest applyRequest = new AnShengCrawlerCalculatePremiumNonApplyRequest(
+                        crawlerNonConfigCoveragesResponse,
+                        userDetailResponse,
+                        accidentalDriving,
+                        quoteVo,
+                        insureAdd,
+                        crawlerCalculatePremiumApply
+                );
+                AnShengCrawlerCalculatePremiumNonApplyResponse nonApplyResponse = anShengCrawlerRequestComponent.calculatePremiumNonApply(applyRequest, httpHeaders);
+                // 响应校验
+                if (SUCCESS_CODE != nonApplyResponse.getCode()) {
+                    throw new SystemException(nonApplyResponse.getMessage());
+                }
+                List<AnShengCrawlerCalculatePremiumNonApplyResponse.ContractDTO> contracts = nonApplyResponse.getData().getContracts();
+                if (CollectionUtil.isEmpty(contracts)) {
+                    continue;
+                }
+                AnShengCrawlerCalculatePremiumNonApplyResponse.ContractDTO contract = contracts.get(0);
+                AnShengCrawlerCalculatePremiumNonApplyResponse.PolicyBaseDTO policyBase = contract.getPolicyBase();
+                BigDecimal totalAgreePremium = policyBase.getTotalAgreePremium();
+
+                // 对象转换,避免两次JSON来回序列化
+                QuotationListDTO item = JSONObject.parseObject(JSONObject.toJSONString(policyBase),QuotationListDTO.class);
+                quotationList.add(item);
+
+                accidentalDriving.setPremium(totalAgreePremium.toPlainString());
+                nonPrice = nonPrice.add(totalAgreePremium);
+                // 责任保费集合赋值
+                dtoList.addAll(JSONArray.parseArray(JSONArray.toJSONString(contract.getPolicyCoverages()), AnShengCrawlerNonInsuranceResponse.DutyPremiumDTO.class));
+            }
+        }
+        anShengCrawlerNonInsuranceResponse.setFcxPrice(nonPrice);
+        anShengCrawlerNonInsuranceResponse.setQuotationList(quotationList);
+        anShengCrawlerNonInsuranceResponse.setDtoList(dtoList);
+        return anShengCrawlerNonInsuranceResponse;
     }
 
+
+
+
+
+
+
     // 截取重复投保终保日期
     private static final Pattern DUPLICATE_END_TIME_PATTERN = Pattern.compile("终保日期 (\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2})");
 
@@ -205,34 +315,30 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
     @Override
     public UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) {
         final String ordersNo = underwritingVo.getOrder().getOrdersNo();
-
         // 获取报价信息
         AnShengCrawlerApplyApplicationRequest applicationRequest = anShengCrawlerCacheComponent.getQuoteResponse(ordersNo);
         // 获取图片上传信息
         List<AnShengCrawlerApplyApplicationRequest.ContractsDTO.PolicyAttachmentsDTO> imagesInfo = anShengCrawlerCacheComponent.getImagesInfo(underwritingVo.getOrder().getOrdersNo());
         // 请求头
         HttpHeaders httpHeaders = anShengCrawlerQuoteProcessService.getHttpHeaders(underwritingVo.getOrder().getAttributionInformationVo());
-        // 获取特别约定
-        AnShengCrawlerAutoSpecialPromiseResponse autoSpecialPromiseResponse = anShengCrawlerRequestComponent.autoSpecialPromise(applicationRequest, httpHeaders);
         // 核保规则
         AnShengCrawlerRuleCheckForSimpleResponse anShengCrawlerApplyApplicationResponse = anShengCrawlerRequestComponent.principiumRuleCheckForSimple(applicationRequest, httpHeaders);
-        Map<String, AnShengCrawlerAutoSpecialPromiseResponse.DataDTO> stringDataDTOMap = autoSpecialPromiseResponse.getData().stream().collect(Collectors.toMap(AnShengCrawlerAutoSpecialPromiseResponse.DataDTO::getPlanCode, x -> x));
         Map<String, AnShengCrawlerRuleCheckForSimpleResponse.DataDTO> ruleCheckForSimpleData = anShengCrawlerApplyApplicationResponse.getData().stream().collect(Collectors.toMap(AnShengCrawlerRuleCheckForSimpleResponse.DataDTO::getPlanCode, x -> x));
         // 核保加入上传的影像、特别约定信息
         applicationRequest.getContracts().forEach(contract -> {
-            // 特别约定
-            AnShengCrawlerAutoSpecialPromiseResponse.DataDTO promiseData = stringDataDTOMap.get(contract.getPolicyBase().getPlanCode());
-            // 核保规则
             AnShengCrawlerRuleCheckForSimpleResponse.DataDTO simpleData = ruleCheckForSimpleData.get(contract.getPolicyBase().getPlanCode());
-            contract.getPolicyBase().setAlterableSpecialPromise(promiseData.getAlterableSpecialPromise());
-            contract.setPolicyAttachments(new ArrayList<>());
             contract.getPolicyBase().setFirstTrialTaskNo(simpleData.getFirstTrialTaskNo());
             contract.getTargetList().get(0).setVehicleTax(applicationRequest.getContracts().get(0).getTargetList().get(0).getVehicleTax());
             contract.setPolicyAttachments(imagesInfo);
         });
+        Map<String, Object> stringObjectMap = BeanUtil.beanToMap(applicationRequest);
+        //   存在非车险时
+        if (!applicationRequest.getContracts().get(0).getQuotationList().isEmpty()){
+            stringObjectMap = AnShengCrawlerNonContractsBuild.build(applicationRequest,stringObjectMap);
+        }
         log.info("安盛核保参数:{}", JSONObject.toJSONString(applicationRequest));
         // 核保
-        AnShengCrawlerApplyApplicationResponse applyApplicationResponse = anShengCrawlerRequestComponent.applyApplication(applicationRequest, httpHeaders);
+        AnShengCrawlerApplyApplicationResponse applyApplicationResponse = anShengCrawlerRequestComponent.applyApplication(stringObjectMap, httpHeaders);
         // 投保订单号保存
         saveThePolicyNumber(ordersNo, applyApplicationResponse);
         UnderwritingResultsVo underwritingResultsVo = new UnderwritingResultsVo();
@@ -328,14 +434,16 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
         Optional.ofNullable(applyApplicationResponse.getData()).orElse(new ArrayList<>()).forEach(dataDTO -> {
             // 交强险
             if (DepartmentPlanCode.PLAN_105.getCode().equals(dataDTO.getPlanCode())) {
-                anShengCrawlerOrder.setCiPolicyNo(dataDTO.getApplyPolicyNo());
+                anShengCrawlerOrder.setCiPolicyNumber(dataDTO.getApplyPolicyNo());
                 // 商业险
             } else if (DepartmentPlanCode.PLAN_109.getCode().equals(dataDTO.getPlanCode()) || DepartmentPlanCode.PLAN_113.getCode().equals(dataDTO.getPlanCode())) {
-                anShengCrawlerOrder.setBiPolicyNo(dataDTO.getApplyPolicyNo());
+                anShengCrawlerOrder.setBiPolicyNumber(dataDTO.getApplyPolicyNo());
             } else {
                 String jy = StringUtils.isEmpty(dataDTO.getProductCode()) ? "" : dataDTO.getProductCode();
                 AnShengCrawlerOrder.NiInfo niInfo = new AnShengCrawlerOrder.NiInfo();
                 niInfo.setNiPolicyNo(jy);
+                niInfo.setProductCode(dataDTO.getProductCode());
+                niInfo.setNiPolicyNumber(dataDTO.getApplyPolicyNo());
                 niInfoList.add(niInfo);
             }
         });
@@ -477,23 +585,22 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
             // 2. 查询订单状态
             AnShengCrawlerComprehensiveQueryInsurenetRequest request = new AnShengCrawlerComprehensiveQueryInsurenetRequest(userDetail.getAgentCode(), userDetail.getDepartmentCode(), crawlerOrder.getOrderNo(), crawlerOrder.getRecordingTime(),orderStatusVo.getCarInfo().getLicenseNo());
             AnShengCrawlerComprehensiveQueryInsurenetResponse response = anShengCrawlerRequestComponent.comprehensiveQueryInsurenet(request, httpHeaders);
-
+            log.info("安盛状态更新返回数据:{}",JSONObject.toJSONString(response));
             if (response == null || response.getData() == null || response.getData().getList() == null) {
                 return resultVo;
             }
-            Set<String> targetPolicyNos = Stream.of(crawlerOrder.getCiPolicyNo(), crawlerOrder.getBiPolicyNo()).filter(StringUtils::isNotEmpty).collect(Collectors.toSet());
+            Set<String> targetPolicyNos = Stream.concat(Stream.of(crawlerOrder.getCiPolicyNumber(), crawlerOrder.getBiPolicyNumber()),
+                    CollectionUtil.emptyIfNull(crawlerOrder.getNiInfos()).stream().map(AnShengCrawlerOrder.NiInfo::getNiPolicyNumber)
+            ).filter(StringUtils::isNotEmpty).collect(Collectors.toSet());
             List<AnShengCrawlerComprehensiveQueryInsurenetResponse.DataDTO.ListDTO.PolicyConciseDetailsDTO> matchedDetails =
                     response.getData().getList().stream()
-                            .map(AnShengCrawlerComprehensiveQueryInsurenetResponse.DataDTO.ListDTO::getPolicyConciseDetails)
-                            .filter(Objects::nonNull)
+                            .map(AnShengCrawlerComprehensiveQueryInsurenetResponse.DataDTO.ListDTO::getPolicyConciseDetails).filter(Objects::nonNull)
                             .filter(details -> {
                                 Set<String> currentPolicyNos = details.stream()
                                         .map(AnShengCrawlerComprehensiveQueryInsurenetResponse.DataDTO.ListDTO.PolicyConciseDetailsDTO::getApplyPolicyNo)
                                         .collect(Collectors.toSet());
                                 return currentPolicyNos.equals(targetPolicyNos);
-                            })
-                            .findFirst()
-                            .orElse(null);
+                            }).findFirst().orElse(null);
             if (matchedDetails == null || matchedDetails.isEmpty()) {
                 return resultVo;
             }
@@ -522,17 +629,30 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
                     resultVo.setErrorMsg("");
                     for (AnShengCrawlerComprehensiveQueryInsurenetResponse.DataDTO.ListDTO.PolicyConciseDetailsDTO detail : matchedDetails) {
                         String planCode = detail.getPlanCode();
-                        if ("105".equals(planCode)) {
+                        if (DepartmentPlanCode.PLAN_105.getCode().equals(planCode)) {
                             resultVo.setJqPolicyno(detail.getPolicyNo());
                             resultVo.setJqApplyNo(detail.getApplyPolicyNo());
-                        } else if ("109".equals(planCode)) {
+                            crawlerOrder.setCiPolicyNo(detail.getPolicyNo());
+                        } else if (DepartmentPlanCode.PLAN_109.getCode().equals(planCode)) {
                             resultVo.setSyPolicyno(detail.getPolicyNo());
                             resultVo.setSyApplyNo(detail.getApplyPolicyNo());
-                        } else if ("P13".equals(planCode)) {
+                            crawlerOrder.setBiPolicyNo(detail.getPolicyNo());
+                        } else {
+                            List<AnShengCrawlerOrder.NiInfo> niInfos = crawlerOrder.getNiInfos();
+                            if (niInfos == null) {
+                                continue;
+                            }
                             resultVo.setJyPolicyno(detail.getPolicyNo());
                             resultVo.setJyApplyNo(detail.getApplyPolicyNo());
+                            for (AnShengCrawlerOrder.NiInfo niInfo : niInfos) {
+                                if (Objects.equals(detail.getProductCode(), niInfo.getProductCode())) {
+                                    niInfo.setNiPolicyNo(detail.getPolicyNo());
+                                    break;
+                                }
+                            }
                         }
                     }
+                    anShengCrawlerOrderService.saveAnShengCrawlerOrder(crawlerOrder);
                 } else if ("0".equals(baseMark)) {
                     String reason = queryFailure(targetPolicyNos, httpHeaders);
                     resultVo.setOrderStatus(InsOrderStatusEnum.AUDIT_FAIL);

+ 5 - 1
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/utils/BeanCopyUtil.java

@@ -7,6 +7,8 @@ import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
 import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
 import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -20,6 +22,7 @@ import java.time.format.DateTimeFormatter;
  */
 public final class BeanCopyUtil {
 
+    private static final Logger log = LoggerFactory.getLogger(BeanCopyUtil.class);
     private static final ObjectMapper OBJECT_MAPPER;
 
     static {
@@ -54,7 +57,8 @@ public final class BeanCopyUtil {
             String json = OBJECT_MAPPER.writeValueAsString(source);
             return OBJECT_MAPPER.readValue(json, clazz);
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error("对象进行深度赋值。报错",e);
+            log.error("source=[{}]", JsonUtils.toJsonString(source));
             throw new RuntimeException("对象深拷贝失败", e);
         }
     }

+ 1 - 1
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/build/HuaTaiCrawlerQuoteResultsVoBuild.java

@@ -38,7 +38,7 @@ public class HuaTaiCrawlerQuoteResultsVoBuild {
         quoteResultsVo.setCiEndDate(quoteResultsVo.getCiRiskInfoVo().getEndDate());
         // 商业险
         quoteResultsVo.setBiRiskInfoVo(buildBiRiskInfoVo(quoteResponseData, quoteVo));
-        if(quoteResultsVo.getBiRiskInfoVo() != null) {
+        if(quoteResultsVo.getBiRiskInfoVo() != null && StringUtils.isNotBlank(quoteResultsVo.getBiRiskInfoVo().getStartDate()) && StringUtils.isNotBlank(quoteResultsVo.getBiRiskInfoVo().getEndDate())) {
             quoteResultsVo.setBiStartDate(quoteResultsVo.getBiRiskInfoVo().getStartDate());
             // quoteResultsVo.setBiEndDate(quoteResultsVo.getBiRiskInfoVo().getEndDate());
             LocalDateTime dt = LocalDateTime.parse(quoteResultsVo.getBiRiskInfoVo().getStartDate(), DateTimeFormatter.ofPattern(DATE_FMT));

+ 28 - 4
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java

@@ -164,6 +164,9 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
     @Override
     @Transactional(rollbackFor = Exception.class)
     public HttpResult saveOrders(InsOrdersAdd ordersAdd) {
+        log.info("补录订单:ordersAdd=[{}]", JSONUtil.toJsonStr(ordersAdd));
+        ordersAdd.getFeeOrdersVo().setIsrecordByLeader(ordersAdd.getInsOrdersOtherInfo().isIsrecordByLeader());
+
         // 检查输入参数是否为空,如果为空则返回错误信息
         try {
             // 获取订单对象并设置引用编号
@@ -1716,6 +1719,26 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         return taxFactor;
     }
 
+
+    /**
+     * 根据补录费用 计算新的出口比例
+     *
+     * @author lipf
+     * @date 2026/7/20 14:27
+     */
+    private BigDecimal calExportByIsRecordByLeader(boolean isRecordByLeaders, BigDecimal export){
+        if(isRecordByLeaders){
+            if(export != null){
+                if(export.compareTo(new BigDecimal("1") ) > 0){
+                    return BigDecimalUtil.subtract(export,new BigDecimal("1"));
+                }else{
+                    return BigDecimal.ZERO;
+                }
+            }
+        }
+        return export;
+    }
+
     /**
      * 计算保单费用(应收/应付/手续费/跟单费/留点费/出口费等)。
      * 本方法为纯计算接口,不需要已有订单,直接根据保费和费用比例计算费用明细。
@@ -1726,7 +1749,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
      */
     @Override
     public HttpResult<InsFeeCalculateResponse> cvalculateFees(InsFeeCalculateRequest request) {
-
+        log.info("计算补录订单的费用:计算补录单费用=[{}]", JSONUtil.toJsonStr(request));
         if(request.getMobile().isEmpty()){
             return HttpResult.error("请选择业务员!");
         }
@@ -1743,9 +1766,10 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         BigDecimal jqAddThrow = nvl(request.getJqAddThrow());
         BigDecimal syAddThrow = nvl(request.getSyAddThrow());
         BigDecimal jyAddThrow = nvl(request.getJyAddThrow());
-        BigDecimal jqExport   = nvl(request.getJqExport());
-        BigDecimal syExport   = nvl(request.getSyExport());
-        BigDecimal jyExport   = nvl(request.getJyExport());
+        BigDecimal jqExport   = this.calExportByIsRecordByLeader(request.isIsrecordByLeader(),nvl(request.getJqExport()));
+        BigDecimal syExport   = this.calExportByIsRecordByLeader(request.isIsrecordByLeader(),nvl(request.getSyExport()));
+        BigDecimal jyExport   = this.calExportByIsRecordByLeader(request.isIsrecordByLeader(),nvl(request.getJyExport()));
+
         BigDecimal jqEKP      = nvl(request.getJqExportKeepPointRatio());
         BigDecimal syEKP      = nvl(request.getSyExportKeepPointRatio());
         BigDecimal jyEKP      = nvl(request.getJyExportKeepPointRatio());

+ 1 - 0
tenant/organization/src/main/java/com/jzg/organization/controller/UserAccountController.java

@@ -98,6 +98,7 @@ public class UserAccountController {
     @PostMapping("/getIncomeAndExpense")
     public HttpResult<List<IncomeAndExpenseVo>> getIncomeAndExpense(@RequestBody IncomeAndExpenseParam param){
         return HttpResult.ok(userAccountService.getIncomeAndExpense(param));
+        //return HttpResult.ok(userAccountService.getIncomeAndExpenseOld(param));
     }
 
     @Operation(summary = "添加用户钱包账户记录")

+ 10 - 0
tenant/organization/src/main/java/com/jzg/organization/mapper/SysAmountAuditingMapper.java

@@ -3,8 +3,10 @@ package com.jzg.organization.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jzg.commons.entity.dto.AmountAuditParam;
+import com.jzg.commons.entity.dto.IncomeAndExpenseParam;
 import com.jzg.commons.entity.po.SysAmountAuditing;
 import com.jzg.commons.entity.vo.AmountAuditVo;
+import com.jzg.commons.entity.vo.IncomeAndExpenseList;
 import org.apache.ibatis.annotations.Param;
 
 import java.math.BigDecimal;
@@ -68,6 +70,14 @@ public interface SysAmountAuditingMapper extends BaseMapper<SysAmountAuditing> {
      * @date 2026/7/17 10:24
      */
     BigDecimal queryPayingAmountSum();
+
+    /**
+     * 查询收支明细
+     *
+     * @author lipf
+     * @date 2026/7/20 15:46
+     */
+    List<IncomeAndExpenseList> getIncomeAndExpense(IncomeAndExpenseParam param);
 }
 
 

+ 11 - 1
tenant/organization/src/main/java/com/jzg/organization/service/SysAmountAuditingService.java

@@ -6,8 +6,9 @@ import com.jzg.commons.core.page.HttpResult;
 import com.jzg.commons.entity.dto.*;
 import com.jzg.commons.entity.po.SysAmountAuditing;
 import com.jzg.commons.entity.vo.AmountAuditVo;
-
+import com.jzg.commons.entity.vo.IncomeAndExpenseList;
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
 * @author dongxin
@@ -109,4 +110,13 @@ public interface SysAmountAuditingService extends IService<SysAmountAuditing> {
      * @date 2026/6/17 9:19
      */
     String exportMyPayment(AmountAuditParam param);
+
+    /**
+     * 查询收支明细
+     *
+     * @param param 查询条件 间(月份/时间段), 收支类型(全部/收入/支出) , 状态(全部/待审核/审核通过/审核驳回)
+     * @author lipf
+     * @date 2026/7/20 15:40
+     */
+    List<IncomeAndExpenseList> getIncomeAndExpense(IncomeAndExpenseParam param);
 }

+ 16 - 1
tenant/organization/src/main/java/com/jzg/organization/service/SysUserAccountService.java

@@ -51,9 +51,24 @@ public interface SysUserAccountService extends IService<SysUserAccount> {
      */
     SysUserWalletVo userWallet();
 
-
+    /**
+     * 查询业务员的收支记录
+     *
+     * @param param 时间(月份/时间段), 收支类型(全部/收入/支出) , 状态(全部/待审核/审核通过/审核驳回)
+     * @author lipf
+     * @date 2026/7/20 10:03
+     */
     List<IncomeAndExpenseVo> getIncomeAndExpense(IncomeAndExpenseParam param);
 
 
+    /**
+     * 查询业务员的收支记录 为了查询接口时使用
+     *
+     * @author lipf
+     * @date 2026/7/20 15:01
+     */
+    @Deprecated(since = "2026年7月20日15:02:00")
+    public List<IncomeAndExpenseVo> getIncomeAndExpenseOld(IncomeAndExpenseParam param);
+
 
 }

+ 5 - 3
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementServiceImpl.java

@@ -568,12 +568,14 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
 
     @Override
     public List<PtlAgreement> getContactAgreement(String companyId) {
-        return baseMapper.selectList(new LambdaQueryWrapper<PtlAgreement>()
-                .eq(PtlAgreement::getIsExternal,1)
-                .eq(PtlAgreement::getIsDelete,0)
+        List<PtlAgreement> ptlAgreements = baseMapper.selectList(new LambdaQueryWrapper<PtlAgreement>()
+                .eq(PtlAgreement::getIsExternal, 1)
+                .eq(PtlAgreement::getIsDelete, 0)
                 .le(PtlAgreement::getStartDate, LocalDateTime.now())
                 .ge(PtlAgreement::getEndDate, LocalDateTime.now())
                 .eq(PtlAgreement::getCompanyId, companyId));
+        log.info("获取保险公司[{}]的外部协议[{}]个", companyId,CollUtil.size(ptlAgreements));
+        return ptlAgreements;
     }
 
     @Override

+ 16 - 0
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysAmountAuditingServiceImpl.java

@@ -18,6 +18,7 @@ import com.jzg.commons.entity.po.SysUserAccount;
 import com.jzg.commons.entity.po.SysUserJzgInfo;
 import com.jzg.commons.entity.po.SysUserJzgInfoBankCard;
 import com.jzg.commons.entity.vo.AmountAuditVo;
+import com.jzg.commons.entity.vo.IncomeAndExpenseList;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.AssertionUtils;
 import com.jzg.commons.util.BigDecimalUtil;
@@ -504,6 +505,21 @@ public class SysAmountAuditingServiceImpl extends ServiceImpl<SysAmountAuditingM
                 "业务员收支明细-导出-"+suffix + Instant.now()
         );
     }
+
+    /**
+     * 查询收支明细
+     *
+     * @param param 查询条件 间(月份/时间段), 收支类型(全部/收入/支出) , 状态(全部/待审核/审核通过/审核驳回)
+     * @author lipf
+     * @date 2026/7/20 15:40
+     */
+    @Override
+    public List<IncomeAndExpenseList> getIncomeAndExpense(IncomeAndExpenseParam param) {
+        log.info("查询收支明细queryIncomeANdExpense:param=[{}]", JSONUtil.toJsonStr(param));
+        List<IncomeAndExpenseList>  incomeAndExpenseLists =  baseMapper.getIncomeAndExpense(param);
+        log.info("查询收支明细queryIncomeANdExpense:param=[{}],incomeAndExpenseLists.size()=[{}]",JSONUtil.toJsonStr(param), CollUtil.size(incomeAndExpenseLists));
+        return incomeAndExpenseLists;
+    }
 }
 
 

+ 145 - 24
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysUserAccountServiceImpl.java

@@ -10,10 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.entity.dto.*;
 import com.jzg.commons.entity.po.*;
-import com.jzg.commons.entity.vo.IncomeAndExpenseVo;
-import com.jzg.commons.entity.vo.SysUserAccountVo;
-import com.jzg.commons.entity.vo.SysUserWalletVo;
-import com.jzg.commons.entity.vo.UserAccountStatisVo;
+import com.jzg.commons.entity.vo.*;
 import com.jzg.commons.util.BigDecimalUtil;
 import com.jzg.organization.client.QuoteClient;
 import com.jzg.organization.mapper.SysAmountAuditingMapper;
@@ -21,6 +18,7 @@ import com.jzg.organization.mapper.SysUserAccountMapper;
 import com.jzg.organization.service.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -168,27 +166,29 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
         param.setUserId(sysUserJzgInfo.getUserId());
         List<InsFeeOrders> insFeeOrdersList = quoteClient.getInsFeeOrderByUserId(param);
         BigDecimal premium = BigDecimal.ZERO;
-        BigDecimal orderAmount = BigDecimal.ZERO;
-        for (InsFeeOrders insFeeOrders : insFeeOrdersList) {
-            premium = premium.add(insFeeOrders.getTotalPremium());
-            orderAmount = orderAmount.add(insFeeOrders.getTotalReceivablePremium());
-        }
+//        BigDecimal orderAmount = BigDecimal.ZERO;
+//        for (InsFeeOrders insFeeOrders : insFeeOrdersList) {
+//            premium = premium.add(insFeeOrders.getTotalPremium());
+//            orderAmount = orderAmount.add(insFeeOrders.getTotalReceivablePremium());
+//        }
         InsFeeOrdersParam distributionParam = new InsFeeOrdersParam();
         distributionParam.setDistributorId(sysUserJzgInfo.getId());
-        List<InsFeeOrders> distribuitonList = quoteClient.getInsFeeOrdersList(distributionParam);
-        BigDecimal distributionPremium = BigDecimal.ZERO;
-        for (InsFeeOrders insFeeOrders : distribuitonList) {
-            if (sysUserJzgInfo.getId().equals(insFeeOrders.getFirstDistributorId())) {
-                distributionPremium = distributionPremium.add(insFeeOrders.getFirstDistributionFee() != null ? insFeeOrders.getFirstDistributionFee() : BigDecimal.ZERO);
-            }
-            if (sysUserJzgInfo.getId().equals(insFeeOrders.getSecondDistributorId())) {
-                distributionPremium = distributionPremium.add(insFeeOrders.getSecondDistributionFee() != null ? insFeeOrders.getSecondDistributionFee() : BigDecimal.ZERO);
-            }
-            if (sysUserJzgInfo.getId().equals(insFeeOrders.getThirdDistributorId())) {
-                distributionPremium = distributionPremium.add(insFeeOrders.getThirdDistributionFee() != null ? insFeeOrders.getThirdDistributionFee() : BigDecimal.ZERO);
-            }
-        }
-        sysUserWalletVo.setTotalIncome(orderAmount.add(distributionPremium));
+//        List<InsFeeOrders> distribuitonList = quoteClient.getInsFeeOrdersList(distributionParam);
+//        BigDecimal distributionPremium = BigDecimal.ZERO;
+//        for (InsFeeOrders insFeeOrders : distribuitonList) {
+//            if (sysUserJzgInfo.getId().equals(insFeeOrders.getFirstDistributorId())) {
+//                distributionPremium = distributionPremium.add(insFeeOrders.getFirstDistributionFee() != null ? insFeeOrders.getFirstDistributionFee() : BigDecimal.ZERO);
+//            }
+//            if (sysUserJzgInfo.getId().equals(insFeeOrders.getSecondDistributorId())) {
+//                distributionPremium = distributionPremium.add(insFeeOrders.getSecondDistributionFee() != null ? insFeeOrders.getSecondDistributionFee() : BigDecimal.ZERO);
+//            }
+//            if (sysUserJzgInfo.getId().equals(insFeeOrders.getThirdDistributorId())) {
+//                distributionPremium = distributionPremium.add(insFeeOrders.getThirdDistributionFee() != null ? insFeeOrders.getThirdDistributionFee() : BigDecimal.ZERO);
+//            }
+//        }
+        // modify by lipf 2026年7月20日09:36:06 调整业务员累计收入的计算逻辑。直接从sys_user_account 表中获取
+        sysUserWalletVo.setTotalIncome(sysUserAccount.getSumAmount());
+        //sysUserWalletVo.setTotalIncome(orderAmount.add(distributionPremium));
         sysUserWalletVo.setSignPremium(premium);
         sysUserWalletVo.setOrderCount(String.valueOf(insFeeOrdersList.size()));
         List<SysUserJzgInfo> sysUserJzgInfoList = sysUserJzgInfoService.list(new LambdaQueryWrapper<SysUserJzgInfo>().eq(SysUserJzgInfo::getReferrerId, sysUserJzgInfo.getId()));
@@ -249,8 +249,129 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
         return sysUserWalletVo;
     }
 
+    /**
+     * 查询业务员的收支记录
+     *
+     * @param param 时间(月份/时间段), 收支类型(全部/收入/支出) , 状态(全部/待审核/审核通过/审核驳回)
+     * @author lipf
+     * @date 2026/7/20 10:03
+     */
+    @Override
+    public List<IncomeAndExpenseVo> getIncomeAndExpense(IncomeAndExpenseParam param){
+        log.info("查询收支明细记录:param=[{}]", JSONUtil.toJsonStr(param));
+        // 处理月份筛选参数
+        String createTimeStart = param.getCreateTimeStart();
+        String createTimeEnd = param.getCreateTimeEnd();
+        String userId = baseController.getUserId();
+        param.setUserId(userId);
+        param.setSystemCode(baseController.getSystemCode());
+        if (param.getMonth() != null && !param.getMonth().isEmpty()) {
+            // 如果传入了月份参数,计算该月的开始和结束时间
+            String monthStr = param.getMonth();
+            DateTimeFormatter monthFormatter = DateTimeFormatter.ofPattern("yyyy-MM");
+            YearMonth yearMonth = YearMonth.parse(monthStr, monthFormatter);
+            LocalDateTime monthStart = yearMonth.atDay(1).atStartOfDay();
+            LocalDateTime monthEnd = yearMonth.atEndOfMonth().atTime(23, 59, 59, 999999999);
+
+            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+            createTimeStart = monthStart.format(formatter);
+            createTimeEnd = monthEnd.format(formatter);
+            param.setCreateTimeStart(createTimeStart);
+            param.setCreateTimeEnd(createTimeEnd);
+        }
+
+        List<IncomeAndExpenseList> allRecords = sysAmountAuditingService.getIncomeAndExpense(param);
+        // 排序
+        allRecords.sort((a, b) -> {
+            if (a.getCreateTime() == null) return 1;
+            if (b.getCreateTime() == null) return -1;
+            return b.getCreateTime().compareTo(a.getCreateTime());
+        });
+
+        // 收支状态筛选(在排序后、分组前进行)
+//        if (param.getIncomeAndExpense() != null && !param.getIncomeAndExpense().isEmpty()) {
+//            allRecords = allRecords.stream()
+//                    .filter(record -> param.getIncomeAndExpense().equals(record.getIncomeAndExpense()))
+//                    .collect(Collectors.toList());
+//        }
+
+        // 按月份分组统计
+        Map<String, IncomeAndExpenseVo.IncomeAndExpense> monthSummaryMap = new TreeMap<>(Collections.reverseOrder());
+        for (IncomeAndExpenseList record : allRecords) {
+            if (record.getCreateTime() == null) continue;
+            // 获取月份(格式:yyyy-MM)
+            String month = record.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM"));
+
+            // 获取或创建月度汇总对象
+            IncomeAndExpenseVo.IncomeAndExpense summary = monthSummaryMap.get(month);
+            if (summary == null) {
+                summary = new IncomeAndExpenseVo.IncomeAndExpense();
+                summary.setMonth(month);
+                summary.setIncome(BigDecimal.ZERO);
+                summary.setExpense(BigDecimal.ZERO);
+                summary.setBalance(BigDecimal.ZERO);
+                monthSummaryMap.put(month, summary);
+            }
+
+            // 更新收入或支出
+            if ("0".equals(record.getIncomeAndExpense())) {
+                // 收入
+                summary.setIncome(BigDecimalUtil.add(summary.getIncome(),record.getAmount()));
+            } else {
+                // 支出
+                summary.setExpense(BigDecimalUtil.add(summary.getExpense(),record.getAmount()));
+            }
+
+            // 计算余额(收入 - 支出)
+            summary.setBalance(summary.getIncome().subtract(summary.getExpense()));
+        }
+
+        // 如果指定了月份筛选,只返回该月的数据
+        if (param.getMonth() != null && !param.getMonth().isEmpty()) {
+            List<IncomeAndExpenseVo> result = new ArrayList<>();
+            IncomeAndExpenseVo vo = new IncomeAndExpenseVo();
+            IncomeAndExpenseVo.IncomeAndExpense summary = monthSummaryMap.get(param.getMonth());
+            if (summary != null) {
+                vo.setIncomeAndExpense(summary);
+
+                // 筛选当前月份的明细记录
+                List<IncomeAndExpenseVo.IncomeAndExpenseList> monthRecords = allRecords.stream()
+                        .filter(record -> param.getMonth().equals(record.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM"))))
+                        .map(action->{
+                            IncomeAndExpenseVo.IncomeAndExpenseList a = new IncomeAndExpenseVo.IncomeAndExpenseList();
+                            BeanUtils.copyProperties(action,a);
+                            return a;
+                        })
+                        .collect(Collectors.toList());
+                vo.setIncomeAndExpenseList(monthRecords);
+                result.add(vo);
+            }
+            return result;
+        }
+
+        // 构建返回结果
+        List<IncomeAndExpenseVo> result = new ArrayList<>();
+        for (Map.Entry<String, IncomeAndExpenseVo.IncomeAndExpense> entry : monthSummaryMap.entrySet()) {
+            IncomeAndExpenseVo vo = new IncomeAndExpenseVo();
+            vo.setIncomeAndExpense(entry.getValue());
+
+            // 筛选当前月份的明细记录
+            List<IncomeAndExpenseVo.IncomeAndExpenseList> monthRecords = allRecords.stream()
+                    .filter(record -> entry.getKey().equals(record.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM"))))
+                    .map(action->{
+                        IncomeAndExpenseVo.IncomeAndExpenseList a = new IncomeAndExpenseVo.IncomeAndExpenseList();
+                        BeanUtils.copyProperties(action,a);
+                        return a;
+                    }).collect(Collectors.toList());
+            vo.setIncomeAndExpenseList(monthRecords);
+            result.add(vo);
+        }
+        Collections.reverse(result);
+        return result;
+    }
+
     @Override
-    public List<IncomeAndExpenseVo> getIncomeAndExpense(IncomeAndExpenseParam param) {
+    public List<IncomeAndExpenseVo> getIncomeAndExpenseOld(IncomeAndExpenseParam param) {
         log.info("查询收支明细记录:param=[{}]", JSONUtil.toJsonStr(param));
         // 获取个人中心信息
         String mobile = baseController.getUserName();

+ 81 - 0
tenant/organization/src/main/resources/mapper/SysAmountAuditingMapper.xml

@@ -263,4 +263,85 @@
     <select id="queryPayingAmountSum" resultType="java.math.BigDecimal">
         select sum(COALESCE(saa.amount, 0)) as payingAmountSum from sys_amount_auditing saa where saa.auditing_status = 0
     </select>
+    <!-- 查询收支明细 2026年7月20日15:47:35 -->
+    <select id="getIncomeAndExpense"
+            resultType="com.jzg.commons.entity.vo.IncomeAndExpenseList">
+        select
+        a.*
+        from
+        (
+        select
+        suacl.amount,
+        CASE
+        WHEN suacl.amount >= 0 THEN 0
+        -- 正数或0为收入
+        ELSE 1
+        -- 负数为支出
+        END AS incomeAndExpense,
+        '1' as status,
+        suacl.oper_type,
+        CASE
+        suacl.oper_type
+        WHEN 1 THEN '保单费用'
+        WHEN 2 THEN '保单提成'
+        WHEN 3 THEN '提现'
+        WHEN 4 THEN '提现驳回'
+        ELSE suacl.oper_type
+        END as remark,
+        saa.reject_reason,
+        saa.bank_name,
+        saa.bank_num as userName,
+        suacl.bank_card_no_to as bankCardNum,
+        suacl.user_id,
+        suacl.create_by,
+        suacl.create_time,
+        suacl.update_by,
+        suacl.update_time,
+        ioci.license_no
+        from
+        sys_user_account_change_log suacl
+        left join sys_amount_auditing saa on
+        suacl.related_amount_auditing_id = saa.id
+        left join ins_orders_car_info ioci on
+        suacl.related_order_id = ioci.order_no
+        where
+        suacl.system_code = #{systemCode}
+        union ALL
+        select
+        saa.amount,
+        1 as incomeAndExpense,
+        saa.auditing_status as status,
+        null as oper_type,
+        '拒绝付款' as remark,
+        saa.reject_reason,
+        saa.bank_name,
+        saa.bank_num as userName,
+        null as bankCardNum,
+        saa.user_id,
+        saa.create_by,
+        saa.create_time,
+        saa.update_by,
+        saa.update_time,
+        null as license_no
+        from
+        sys_amount_auditing saa
+        where
+        saa.system_code = #{systemCode}
+        and saa.auditing_status in (0, 2)  ) as a
+        <where>
+            a.user_id = #{userId}
+            <if test="status != null and status != ''">
+                and a.status= #{status}
+            </if>
+            <if test="incomeAndExpense != null and incomeAndExpense != ''">
+                and a.incomeAndExpense = #{incomeAndExpense}
+            </if>
+            <if test="createTimeStart != null and createTimeStart != ''">
+                and a.create_time &gt;= #{createTimeStart}
+            </if>
+            <if test="createTimeEnd != null and createTimeEnd != ''">
+                and a.create_time &lt;= #{createTimeEnd}
+            </if>
+        </where>
+    </select>
 </mapper>