Преглед изворни кода

Merge remote-tracking branch 'origin/master'

Qchen пре 3 месеци
родитељ
комит
06a87463ba
100 измењених фајлова са 3117 додато и 1268 уклоњено
  1. 7 0
      authentication/src/main/java/com/jzg/entity/SysRolePerms.java
  2. 2 1
      authentication/src/main/java/com/jzg/mapper/SysRolePermsMapper.java
  3. 1 1
      authentication/src/main/java/com/jzg/mapper/SysUserMapper.java
  4. 2 1
      authentication/src/main/java/com/jzg/mapper/SysUserRoleMapper.java
  5. 17 13
      authentication/src/main/resources/mapper/SysRolePermsMapper.xml
  6. 1 1
      authentication/src/main/resources/mapper/SysSystemMapper.xml
  7. 35 27
      authentication/src/main/resources/mapper/SysUserMapper.xml
  8. 8 4
      authentication/src/main/resources/mapper/SysUserRoleMapper.xml
  9. 3 0
      commons/src/main/java/com/jzg/commons/core/base/BaseModel.java
  10. 122 0
      commons/src/main/java/com/jzg/commons/entity/account/po/SysUserAccountChangeLog.java
  11. 0 36
      commons/src/main/java/com/jzg/commons/entity/account/po/SysUserAccountIncomeLog.java
  12. 3 5
      commons/src/main/java/com/jzg/commons/entity/dto/AgreementRulesAddParam.java
  13. 8 5
      commons/src/main/java/com/jzg/commons/entity/dto/AgreementRulesEditParam.java
  14. 22 0
      commons/src/main/java/com/jzg/commons/entity/dto/RulesGroupParam.java
  15. 31 0
      commons/src/main/java/com/jzg/commons/entity/dto/YwyIOParam.java
  16. 4 0
      commons/src/main/java/com/jzg/commons/entity/po/PtlAgreementUndwrtRules.java
  17. 8 4
      commons/src/main/java/com/jzg/commons/entity/po/SysArea.java
  18. 7 0
      commons/src/main/java/com/jzg/commons/entity/po/SysOrganizationUserLink.java
  19. 3 0
      commons/src/main/java/com/jzg/commons/entity/po/SysUserJzgInfoBankCard.java
  20. 8 0
      commons/src/main/java/com/jzg/commons/entity/po/SysUserJzgInfoSalesman.java
  21. 8 1
      commons/src/main/java/com/jzg/commons/entity/quote/vo/base/LoginBase.java
  22. 7 0
      commons/src/main/java/com/jzg/commons/entity/report/po/ReportSearchConfiguration.java
  23. 7 0
      commons/src/main/java/com/jzg/commons/entity/report/po/ReportUploadExcelTask.java
  24. 6 0
      commons/src/main/java/com/jzg/commons/entity/system/po/SysSystemBusPerms.java
  25. 8 0
      commons/src/main/java/com/jzg/commons/entity/vo/AgreementRulesVo.java
  26. 6 0
      commons/src/main/java/com/jzg/commons/entity/vo/SysUserAccountVo.java
  27. 15 0
      commons/src/main/java/com/jzg/commons/util/BigDecimalUtil.java
  28. 17 13
      consoleStatistics/src/main/resources/mapper/ReportCompanyDataManageMapper.xml
  29. 180 163
      consoleStatistics/src/main/resources/mapper/ReportSearchConfigurationMapper.xml
  30. 38 27
      consoleStatistics/src/main/resources/mapper/ReportUploadExcelTaskMapper.xml
  31. 7 0
      partner/src/main/java/com/jzg/entity/PartnerRule.java
  32. 8 0
      partner/src/main/java/com/jzg/entity/PartnerUser.java
  33. 46 9
      partner/src/main/resources/mapper/PartnerAttributeMapper.xml
  34. 532 481
      partner/src/main/resources/mapper/PartnerUserMapper.xml
  35. 5 4
      partner/src/main/resources/mapper/SysPartnerAccountMapper.xml
  36. 7 0
      tenant/insurance/quotation-ansheng/src/main/java/com/jzg/quotation/ansheng/crawler/service/impl/AnShengCrawlerRequestImpl.java
  37. 7 0
      tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerRequestImpl.java
  38. 7 0
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/service/impl/ChengTaiCrawlerRequestImpl.java
  39. 12 2
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/client/OrgClient.java
  40. 9 0
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/entity/GetCaptchaRequest.java
  41. 3 0
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/service/QuotationCrawlerBaseService.java
  42. 7 0
      tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/service/impl/DaJiaCrawlerRequestImpl.java
  43. 8 0
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/build/GuoRenCrawlerQuoteResultsVoBuild.java
  44. 0 1
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/request/GuoRenCrawlerProposalNoSaveRequest.java
  45. 623 1
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/response/GuoRenCrawlerCalculationPremiumData.java
  46. 7 0
      tenant/insurance/quotation-guoshou/src/main/java/com/jzg/quotation/guoshou/crawler/service/Impl/GuoshouCrawlerRequestImpl.java
  47. 7 0
      tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/service/Impl/HengBangCrawlerRequestImpl.java
  48. 17 1
      tenant/insurance/quotation-huanong/src/main/java/com/jzg/quotation/huanong/crawler/entity/request/HuaNongCrawlerQuotedPriceRequestRequest.java
  49. 10 3
      tenant/insurance/quotation-huanong/src/main/java/com/jzg/quotation/huanong/crawler/service/impl/HuaNongCrawlerRequestImpl.java
  50. 5 4
      tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/component/HtCrawlerRequestComponent.java
  51. 43 42
      tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/entity/Request/HtCrawlerQuoteRequest.java
  52. 164 111
      tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/service/Impl/HuaTaiCrawlerRequestImpl.java
  53. 7 0
      tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/impl/RenBaoCrawlerRequestImpl.java
  54. 7 0
      tenant/insurance/quotation-renbaonew/src/main/java/com/jzg/quotation/renbaonew/crawler/service/impl/RenBaoNewCrawlerRequestImpl.java
  55. 7 0
      tenant/insurance/quotation-shenneng/src/main/java/com/jzg/quotation/shenneng/crawler/service/impl/ShenNengCrawlerRequestImpl.java
  56. 10 2
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java
  57. 34 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/CompanyFactory.java
  58. 44 28
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsFeeAuditServiceImpl.java
  59. 2 2
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/model/entity/TKDateInfo.java
  60. 0 2
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/TKHttpAPIService.java
  61. 25 14
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/impl/TKQuotationBaseServiceImpl.java
  62. 7 0
      tenant/insurance/quotation-taipingyang/src/main/java/com/jzg/quotation/taipingyang/crawler/service/impl/TaiPingYangCrawlerRequestImpl.java
  63. 1 1
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/component/TaiShanCrawlerRequestComponent.java
  64. 2 0
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/constant/enums/RequestUrl.java
  65. 4 2
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/request/TaiShanCrawlerLoginRequest.java
  66. 6 6
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/request/TaiShanCrawlerSmsCodeRequest.java
  67. 3 2
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/request/TaiShanCrawlerVerifyRequest.java
  68. 30 0
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/request/TaiShanExternalSendCodeRequest.java
  69. 2 0
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/response/TaiShanCrawlerSmsCodeResponse.java
  70. 43 0
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/response/TaiShanExternalSendCodeResponse.java
  71. 20 0
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/properties/ExteriorCaptchaProperties.java
  72. 9 0
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/service/TaiShanCrawlerQuoteProcessService.java
  73. 2 1
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/service/TaiShanCrawlerRequest.java
  74. 157 34
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/service/impl/TaiShanCrawlerQuoteProcessServiceImpl.java
  75. 8 1
      tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/service/impl/TaiShanCrawlerRequestImpl.java
  76. 7 0
      tenant/insurance/quotation-zhongan/src/main/java/com/jzg/quotation/zhongan/crawler/service/Impl/ZhongAnCrawlerRequestImpl.java
  77. 7 0
      tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/service/Impl/ZhongMeiCrawlerRequestImpl.java
  78. 63 0
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/build/ZiJinCrawlerQuoteRequestBuild.java
  79. 74 19
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/build/ZiJinCrawlerQuoteResultsVoBuild.java
  80. 115 37
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/build/ZiJinCrawlerSaveQuoteInfoRequestBuild.java
  81. 2 1
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/component/ZiJinCrawlerCacheComponent.java
  82. 19 1
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/component/ZiJinCrawlerRequestComponent.java
  83. 7 0
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/request/ZiJinCrawlerQueryOrderStatusRequest.java
  84. 1 1
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/request/ZiJinCrawlerQuotationRequest.java
  85. 54 0
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/request/ZiJinCrawlerUploadImageInfoListRequest.java
  86. 37 0
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/response/ZiJinCrawlerImageUploadInfoListResponse.java
  87. 3 2
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/enums/RequestUrl.java
  88. 2 1
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/service/ZiJinCrawlerOrderService.java
  89. 11 12
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/service/impl/ZiJinCrawlerOrderServiceImpl.java
  90. 43 126
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/service/impl/ZiJinCrawlerRequestImpl.java
  91. 7 0
      tenant/organization/src/main/java/com/jzg/organization/controller/AgreementRulesController.java
  92. 13 4
      tenant/organization/src/main/java/com/jzg/organization/controller/AmountAuditingController.java
  93. 27 2
      tenant/organization/src/main/java/com/jzg/organization/controller/UserAccountController.java
  94. 14 0
      tenant/organization/src/main/java/com/jzg/organization/mapper/InvAccountCardMapper.java
  95. 8 0
      tenant/organization/src/main/java/com/jzg/organization/mapper/PtlAgreementUndwrtRulesMapper.java
  96. 18 2
      tenant/organization/src/main/java/com/jzg/organization/mapper/SysUserAccountIncomeLogMapper.java
  97. 10 0
      tenant/organization/src/main/java/com/jzg/organization/mapper/SysUserJzgInfoBankCardMapper.java
  98. 10 0
      tenant/organization/src/main/java/com/jzg/organization/service/InvAccountCardService.java
  99. 8 0
      tenant/organization/src/main/java/com/jzg/organization/service/PtlAgreementUndwrtRulesService.java
  100. 9 4
      tenant/organization/src/main/java/com/jzg/organization/service/SysAmountAuditingService.java

+ 7 - 0
authentication/src/main/java/com/jzg/entity/SysRolePerms.java

@@ -1,6 +1,8 @@
 package com.jzg.entity;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
@@ -23,4 +25,9 @@ public class SysRolePerms {
 
     @TableField(exist = false)
     private String sysCode;
+
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
 }

+ 2 - 1
authentication/src/main/java/com/jzg/mapper/SysRolePermsMapper.java

@@ -3,6 +3,7 @@ package com.jzg.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jzg.entity.SysRolePerms;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -14,5 +15,5 @@ public interface SysRolePermsMapper extends BaseMapper<SysRolePerms> {
      * @param userId    用户id
      * @param systemId  租户编码
      */
-    List<SysRolePerms> getUserPerms(String userId, String systemId);
+    List<SysRolePerms> getUserPerms(@Param("userId") String userId, @Param("systemId") String systemId);
 }

+ 1 - 1
authentication/src/main/java/com/jzg/mapper/SysUserMapper.java

@@ -14,7 +14,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
      * @param userId 用户id
      * @param system 系统id
      */
-    public SysUserJzgVo getJzgUserInfo(String userId,String system);
+    public SysUserJzgVo getJzgUserInfo(@Param("userId") String userId,@Param("system") String system);
 
     /**
      * 获取用户信息

+ 2 - 1
authentication/src/main/java/com/jzg/mapper/SysUserRoleMapper.java

@@ -5,6 +5,7 @@ import com.jzg.entity.SysRolePerms;
 import com.jzg.entity.SysUserRole;
 import com.jzg.entity.vo.SysRoleDataPreVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -16,6 +17,6 @@ public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
      * @param userId    用户id
      * @return
      */
-    List<SysRoleDataPreVo> getUserRoleDataPre(String userId);
+    List<SysRoleDataPreVo> getUserRoleDataPre(@Param("userId") String userId);
 
 }

+ 17 - 13
authentication/src/main/resources/mapper/SysRolePermsMapper.xml

@@ -2,21 +2,25 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jzg.mapper.SysRolePermsMapper">
 
-
     <select id="getUserPerms" resultType="com.jzg.entity.SysRolePerms">
         SELECT
-            srp.*,
-            ss.sys_code
+        srp.*,
+        ss.sys_code
         FROM
-            sys_user su
-                INNER JOIN sys_user_role sur ON su.id = sur.user_id
-                INNER JOIN sys_role sr ON sr.id = sur.role_id
-                INNER JOIN sys_role_perms srp ON sur.role_id = srp.role_id
-                INNER JOIN sys_system ss ON ss.sys_code = sr.system_code
-        WHERE
-            su.id = #{userId}
-        AND ss.sys_code = #{systemId}
-
+        sys_user su
+        INNER JOIN sys_user_role sur ON su.id = sur.user_id AND sur.is_delete = 0
+        INNER JOIN sys_role sr ON sr.id = sur.role_id AND sr.is_delete = 0
+        INNER JOIN sys_role_perms srp ON sur.role_id = srp.role_id AND srp.is_delete = 0
+        INNER JOIN sys_system ss ON ss.sys_code = sr.system_code AND ss.is_delete = 0
+        <where>
+            AND su.is_delete = 0
+            <if test="userId != null">
+                AND su.id = #{userId}
+            </if>
+            <if test="systemId != null and systemId != ''">
+                AND ss.sys_code = #{systemId}
+            </if>
+        </where>
     </select>
 
-</mapper>
+</mapper>

+ 1 - 1
authentication/src/main/resources/mapper/SysSystemMapper.xml

@@ -42,6 +42,6 @@
                business_size,legal_name,create_by,
                create_time,update_by,update_time,
                is_delete
-        from sys_system
+        from sys_system where is_delete = 0
     </sql>
 </mapper>

+ 35 - 27
authentication/src/main/resources/mapper/SysUserMapper.xml

@@ -2,39 +2,47 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jzg.mapper.SysUserMapper">
 
-
+    <!-- 获取用户信息 -->
     <select id="getJzgUserInfo" resultType="com.jzg.entity.vo.SysUserJzgVo">
         SELECT
-            su.id,
-            su.username,
-            su.`password`,
-            su.salt,
-            su.mobile,
-            su.account_status,
-            suji.dept_id,
-            suji.NAME,
-            suji.work_number,
-            suf.file_name AS head_sculpture,
-            suji.province
+        su.id,
+        su.username,
+        su.`password`,
+        su.salt,
+        su.mobile,
+        su.account_status,
+        suji.dept_id,
+        suji.NAME,
+        suji.work_number,
+        suf.file_name AS head_sculpture,
+        suji.province
         FROM
-            sys_user su
-                LEFT JOIN sys_user_jzg_info suji ON su.id = suji.user_id
-                LEFT JOIN sys_upload_files suf ON su.head_sculpture = suf.id
-        WHERE
-            su.id = #{userId}
-        AND
-            suji.system_code = #{system}
+        sys_user su
+        LEFT JOIN sys_user_jzg_info suji ON su.id = suji.user_id AND suji.is_delete = 0
+        LEFT JOIN sys_upload_files suf ON su.head_sculpture = suf.id AND suf.is_delete = 0
+        <where>
+            and su.is_delete = 0
+            <if test="userId != null">
+                AND su.id = #{userId}
+            </if>
+            <if test="system != null and system != ''">
+                AND suji.system_code = #{system}
+            </if>
+        </where>
     </select>
 
+    <!-- 根据用户名/手机号查询 -->
     <select id="selectByUserName" resultType="com.jzg.entity.SysUser">
         SELECT
-            su.*
+        su.*
         FROM
-            sys_user su
-        WHERE
-        account_status = 1 AND is_delete = 0
-        <if test="username != null and username != ''">
-           AND (su.username = #{username} or su.mobile = #{username})
-        </if>
+        sys_user su
+        <where>
+            AND su.account_status = 1 AND su.is_delete = 0
+            <if test="username != null and username != ''">
+                AND (su.username = #{username} OR su.mobile = #{username})
+            </if>
+        </where>
     </select>
-</mapper>
+
+</mapper>

+ 8 - 4
authentication/src/main/resources/mapper/SysUserRoleMapper.xml

@@ -8,9 +8,13 @@
         *
         FROM
         sys_user_role sur
-        left join sys_role_data_pre srdp on sur.role_id = srdp.role_id
-        left join sys_role_data_pre_link srdpl on srdp.role_id = srdpl.role_id
-        WHERE
-        sur.user_id = #{userId}
+        left join sys_role_data_pre srdp on sur.role_id = srdp.role_id AND srdp.is_delete = 0
+        left join sys_role_data_pre_link srdpl on srdp.role_id = srdpl.role_id AND srdpl.is_delete = 0
+        <where>
+            AND sur.is_delete = 0
+            <if test="userId != null">
+                AND sur.user_id = #{userId}
+            </if>
+        </where>
     </select>
 </mapper>

+ 3 - 0
commons/src/main/java/com/jzg/commons/core/base/BaseModel.java

@@ -8,12 +8,15 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
+import java.io.Serial;
 import java.io.Serializable;
 import java.time.LocalDateTime;
 
 @Data
 public class BaseModel implements Serializable {
 
+    @Serial
+    private static final long serialVersionUID = -3245252772001957985L;
     @ExcelIgnore
     @Schema(description = "是否删除")
     @TableLogic

+ 122 - 0
commons/src/main/java/com/jzg/commons/entity/account/po/SysUserAccountChangeLog.java

@@ -0,0 +1,122 @@
+package com.jzg.commons.entity.account.po;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.jzg.commons.core.base.BaseModel;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.math.BigDecimal;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+
+/**
+ * 用户收入来源记录表
+ * 业务员账户变更记录表
+ * 记录账户中金额的每一次变更
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class SysUserAccountChangeLog extends BaseModel {
+
+    @Serial
+    private static final long serialVersionUID = 3689832570825862201L;
+    @ExcelProperty("序号")
+    private String id;
+
+    @ExcelProperty("租户代码")
+    @Schema(description = "租户代码")
+    private String systemCode;
+
+    @ExcelProperty("业务员姓名/手机号")
+    @Schema(description = "业务员登录手机号")
+    private String userName;
+
+
+    @ExcelIgnore
+    @Schema(description = "用户序号")
+    private String  userId;
+
+    @ExcelIgnore
+    @Schema(description = "jzg_info表的序号")
+    private String jzgInfoId;
+
+    @ExcelProperty("操作前金额")
+    @Schema(description = "操作前金额")
+    private BigDecimal amountBefore;
+
+    @ExcelProperty("金额")
+    @Schema(description = "相关金额")
+    private BigDecimal amount;
+
+
+
+//    在实际运行中,可能因为并发的问题,操作前的金额和操作后的金额,很难得到要给准确的值(如果非要得到金额,需要加锁,影响其他模块操作)
+//    @Schema(description = "操作后的金额")
+//    private BigDecimal amountAfter;
+
+    /**
+     * 操作类型 1 保单费用 2 保单提成 3. 提现
+     */
+    @ExcelIgnore
+    @Schema(description = "操作类型")
+    private int operType;
+
+    @ExcelProperty("操作类型")
+    @TableField(exist = false)
+    private String operTypeName;
+
+    @ExcelIgnore
+    private static Map<Integer,String> operTypeMap = new  HashMap<Integer,String>();
+    static {
+        operTypeMap.put(1,"保单费用");
+        operTypeMap.put(2,"保单提成");
+        operTypeMap.put(3,"提现");
+    }
+
+    public String getOperTypeName(){
+        return operTypeMap.getOrDefault(this.operType, Objects.toString(this.operType));
+    }
+
+    @ExcelProperty("关联订单ID")
+    @Schema(description = "关联订单ID")
+    private String relatedOrderId;
+
+
+    @ExcelIgnore
+    @Schema(description = "转出银行卡的序号")
+    private String bankCardIdTo;
+
+    @ExcelProperty("银行卡号")
+    @Schema(description = "转出银行卡的卡号")
+    private String bankCardNoTo;
+
+    @ExcelIgnore
+    @Schema(description = "转入银行卡的序号")
+    private String bankCardIdIn;
+
+    @ExcelIgnore
+    @Schema(description = "转入银行卡的卡号")
+    private String bankCardNoIn;
+
+    @ExcelProperty("备注")
+    @Schema(description = "备注")
+    private String remark;
+
+    public SysUserAccountChangeLog(){
+
+    }
+
+    public SysUserAccountChangeLog(String systemCode, String userId, String jzgInfoId){
+        this.systemCode = systemCode;
+        this.userId = userId;
+        this.jzgInfoId = jzgInfoId;
+    }
+
+}

+ 0 - 36
commons/src/main/java/com/jzg/commons/entity/account/po/SysUserAccountIncomeLog.java

@@ -1,36 +0,0 @@
-package com.jzg.commons.entity.account.po;
-
-import com.jzg.commons.core.base.BaseModel;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.io.Serial;
-import java.math.BigDecimal;
-
-
-/**
- * 用户收入来源记录表
- */
-@Data
-public class SysUserAccountIncomeLog extends BaseModel {
-
-    @Serial
-    private static final long serialVersionUID = 3689832570825862201L;
-    private String id;
-
-    @Schema(description = "用户id")
-    private String userId;
-
-    @Schema(description = "提现金额")
-    private BigDecimal amount;
-
-    @Schema(description = "账户余额")
-    private BigDecimal balanceAmount;
-
-    @Schema(description = "来源订单id")
-    private String orderId;
-
-    @Schema(description = "钱属性")
-    private int property;
-
-}

+ 3 - 5
commons/src/main/java/com/jzg/commons/entity/dto/AgreementRulesAddParam.java

@@ -2,13 +2,9 @@ package com.jzg.commons.entity.dto;
 
 import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttrLink;
 import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotEmpty;
 import jakarta.validation.constraints.NotNull;
-import jakarta.validation.constraints.Size;
 import lombok.Data;
 
-import java.time.LocalDateTime;
-import java.util.Date;
 import java.util.List;
 
 @Schema(description = "承保规则新增dto")
@@ -26,6 +22,8 @@ public class AgreementRulesAddParam {
     private String endTime;
 
     @Schema(description = "规则属性")
-    @NotEmpty(message = "规则属性不能为空")
     private List<PtlAgreementUndwrtRulesAttrLink> rulesAttrList;
+
+    @Schema(description = "规则属性分组(多条规则)")
+    private List<RulesGroupParam> rulesGroups;
 }

+ 8 - 5
commons/src/main/java/com/jzg/commons/entity/dto/AgreementRulesEditParam.java

@@ -2,7 +2,6 @@ package com.jzg.commons.entity.dto;
 
 import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttrLink;
 import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotEmpty;
 import jakarta.validation.constraints.NotNull;
 import lombok.Data;
 
@@ -12,10 +11,12 @@ import java.util.List;
 @Data
 public class AgreementRulesEditParam {
 
-    @NotNull(message = "承保规则id不能为空")
-    @Schema(description = "承保规则id")
+    @Schema(description = "承保规则id(单条模式)")
     private String id;
 
+    @Schema(description = "父规则ID(批量模式)")
+    private String parentId;
+
     @Schema(description = "协议id")
     @NotNull(message = "协议id不能为空")
     private String agreementId;
@@ -26,7 +27,9 @@ public class AgreementRulesEditParam {
     @Schema(description = "生效截止时间")
     private String endTime;
 
-    @Schema(description = "规则属性")
-    @NotEmpty(message = "规则属性不能为空")
+    @Schema(description = "规则属性(单条模式)")
     private List<PtlAgreementUndwrtRulesAttrLink> rulesAttrList;
+
+    @Schema(description = "规则属性分组(批量模式)")
+    private List<RulesGroupParam> rulesGroups;
 }

+ 22 - 0
commons/src/main/java/com/jzg/commons/entity/dto/RulesGroupParam.java

@@ -0,0 +1,22 @@
+package com.jzg.commons.entity.dto;
+
+import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttr;
+import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttrLink;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotEmpty;
+import lombok.Data;
+
+import java.util.List;
+
+@Schema(description = "规则属性分组")
+@Data
+public class RulesGroupParam {
+
+    @Schema(description = "并且规则属性")
+    @NotEmpty(message = "规则属性不能为空")
+    private List<PtlAgreementUndwrtRulesAttrLink> rulesAttrList;
+
+    @Schema(description = "费用属性")
+    private List<PtlAgreementUndwrtRulesAttr>  costsAttrLinks;
+
+}

+ 31 - 0
commons/src/main/java/com/jzg/commons/entity/dto/YwyIOParam.java

@@ -0,0 +1,31 @@
+package com.jzg.commons.entity.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.time.LocalDate;
+
+/**
+ * 业务员收支明细
+ *
+ * @author lipf
+ * @date 2026/6/8 16:58
+ */
+@Data
+public class YwyIOParam implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 1903539153842283194L;
+
+    @Schema(description = "开始日期")
+    private LocalDate beginDate;
+
+    @Schema(description = "结束日期")
+    private LocalDate endDate;
+
+    @Schema(description = "业务员的用户序号")
+    private String ywyUserId;
+
+
+}

+ 4 - 0
commons/src/main/java/com/jzg/commons/entity/po/PtlAgreementUndwrtRules.java

@@ -33,6 +33,10 @@ public class PtlAgreementUndwrtRules extends BaseModel {
     @Schema(description = "规则描述")
     private String ruleDescription;
 
+    /** 父规则ID */
+    @Schema(description = "父规则ID")
+    private String parentId;
+
     /** 显示顺序 */
     @Schema(description = "显示顺序")
     private Integer orderNum;

+ 8 - 4
commons/src/main/java/com/jzg/commons/entity/po/SysArea.java

@@ -1,9 +1,8 @@
 package com.jzg.commons.entity.po;
 
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -59,6 +58,11 @@ public class SysArea implements Serializable {
     @TableField(exist = false)
     private String allName;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 

+ 7 - 0
commons/src/main/java/com/jzg/commons/entity/po/SysOrganizationUserLink.java

@@ -1,8 +1,10 @@
 package com.jzg.commons.entity.po;
 
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
@@ -20,4 +22,9 @@ public class SysOrganizationUserLink implements Serializable {
 
     private String organizationId;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
 }

+ 3 - 0
commons/src/main/java/com/jzg/commons/entity/po/SysUserJzgInfoBankCard.java

@@ -8,6 +8,7 @@ import com.jzg.commons.util.idgen.IdGenerate;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
+import java.io.Serial;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 
@@ -19,6 +20,8 @@ import java.time.format.DateTimeFormatter;
 @Data
 @TableName("sys_user_jzg_info_bank_card")
 public class SysUserJzgInfoBankCard extends BaseModel {
+    @Serial
+    private static final long serialVersionUID = 8695063005869866551L;
     @TableId
     @Schema(description = "主键")
     private String id;

+ 8 - 0
commons/src/main/java/com/jzg/commons/entity/po/SysUserJzgInfoSalesman.java

@@ -1,8 +1,11 @@
 package com.jzg.commons.entity.po;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 /**
@@ -22,6 +25,11 @@ public class SysUserJzgInfoSalesman {
 
     private int partnerStatus;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
     public SysUserJzgInfoSalesman(){
 
     }

+ 8 - 1
commons/src/main/java/com/jzg/commons/entity/quote/vo/base/LoginBase.java

@@ -13,7 +13,14 @@ import lombok.NoArgsConstructor;
 @NoArgsConstructor
 @Data
 public class LoginBase {
-
+    /**
+     * 请求类型  1 api 2 python
+     */
+    private  String apiType;
+    /**
+     * 承保机构编码
+     */
+    private String companyCode;
     /**
      * 用户名
      */

+ 7 - 0
commons/src/main/java/com/jzg/commons/entity/report/po/ReportSearchConfiguration.java

@@ -1,7 +1,9 @@
 package com.jzg.commons.entity.report.po;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import java.io.Serializable;
 import java.util.Date;
@@ -79,6 +81,11 @@ public class ReportSearchConfiguration implements Serializable {
     @Schema(description = "创建用户id")
     private String createUserId;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
 
     @Override
     public boolean equals(Object that) {

+ 7 - 0
commons/src/main/java/com/jzg/commons/entity/report/po/ReportUploadExcelTask.java

@@ -1,7 +1,9 @@
 package com.jzg.commons.entity.report.po;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -96,6 +98,11 @@ public class ReportUploadExcelTask implements Serializable {
     @Schema(description = "导入时间")
     private Double uploadMinutes;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
 
     @Override
     public boolean equals(Object that) {

+ 6 - 0
commons/src/main/java/com/jzg/commons/entity/system/po/SysSystemBusPerms.java

@@ -1,7 +1,9 @@
 package com.jzg.commons.entity.system.po;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jzg.commons.entity.system.vo.SysSystemBusPermsVo;
 import com.jzg.commons.util.idgen.IdGenerate;
@@ -60,6 +62,10 @@ public class SysSystemBusPerms implements Serializable {
     @Schema(description = "账号互通")
     private Integer accountLinking;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
 
 
     public SysSystemBusPerms(SysSystemBusPermsVo sysSystemBusPermsVo) {

+ 8 - 0
commons/src/main/java/com/jzg/commons/entity/vo/AgreementRulesVo.java

@@ -1,6 +1,7 @@
 package com.jzg.commons.entity.vo;
 
 import com.jzg.commons.core.base.BaseModel;
+import com.jzg.commons.entity.dto.RulesGroupParam;
 import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesAttr;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
@@ -32,6 +33,10 @@ public class AgreementRulesVo extends BaseModel {
     @Schema(description = "规则描述")
     private String ruleDescription;
 
+    /** 父规则ID */
+    @Schema(description = "父规则ID")
+    private String parentId;
+
     /** 显示顺序 */
     @Schema(description = "显示顺序")
     private Integer orderNum;
@@ -42,4 +47,7 @@ public class AgreementRulesVo extends BaseModel {
     @Schema(description = "费用列表")
     private List<CostListVo> costVoList;
 
+    @Schema(description = "规则属性分组(多条规则)")
+    private List<RulesGroupParam> rulesGroups;
+
 }

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

@@ -4,18 +4,24 @@ import com.jzg.commons.core.base.BaseModel;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
+import java.io.Serial;
 import java.math.BigDecimal;
 
 @Schema(description = "用户账户表VO")
 @Data
 public class SysUserAccountVo extends BaseModel {
 
+    @Serial
+    private static final long serialVersionUID = 8151170244337531418L;
     @Schema(description = "主键")
     private String id;
 
     @Schema(description = "业务员姓名")
     private String name;
 
+    @Schema(description = "业务员序号")
+    private String userId;
+
     @Schema(description = "业务员手机号")
     private String mobile;
 

+ 15 - 0
commons/src/main/java/com/jzg/commons/util/BigDecimalUtil.java

@@ -20,6 +20,21 @@ public class BigDecimalUtil {
     // 私有构造器,防止被实例化
     private BigDecimalUtil() {}
 
+
+    public static BigDecimal abs(BigDecimal val) {
+        if (val == null) {
+            return BigDecimal.ZERO;
+        }
+        return val.abs();
+    }
+
+    public static BigDecimal negate(BigDecimal val) {
+        if (val == null) {
+            return BigDecimal.ZERO;
+        }
+        return val.negate();
+    }
+
     /**
      * 提供精确的加法运算
      * @param v1 被加数

+ 17 - 13
consoleStatistics/src/main/resources/mapper/ReportCompanyDataManageMapper.xml

@@ -15,9 +15,9 @@
                     SUM( fee.total_premium )
                 FROM
                     ins_orders io
-                        LEFT JOIN ins_fee_orders fee ON io.id = fee.order_no
+                        LEFT JOIN ins_fee_orders fee ON io.id = fee.order_no AND fee.is_delete = 0
                 WHERE
-                    io.company_id = b.company_id
+                    io.company_id = b.company_id AND io.is_delete = 0
             ) AS sumCompanyPremium,
             SUM( fee.total_premium ) AS sumPremium,
             SUM( CASE WHEN b.product_id = '0330' AND b.parent_id IS NULL THEN fee.total_premium ELSE 0 END ) AS djPremium,
@@ -40,7 +40,8 @@
                 FROM
                     ins_orders
                 WHERE
-                    entry_status IN ( 1, 2 ) UNION ALL
+                    entry_status IN ( 1, 2 ) AND is_delete = 0
+                UNION ALL
                 SELECT
                     id,
                     agreement_id,
@@ -56,10 +57,11 @@
                 WHERE
                     entry_status = 3
                   AND audit_status = 1
+                  AND is_delete = 0
             ) b
-                LEFT JOIN ptl_agreement ptl ON b.agreement_id = ptl.id
-                LEFT JOIN esm_ins_company eic ON eic.id = ptl.partner_company_id
-                LEFT JOIN ins_fee_orders fee ON b.id = fee.order_no
+                LEFT JOIN ptl_agreement ptl ON b.agreement_id = ptl.id AND ptl.is_delete = 0
+                LEFT JOIN esm_ins_company eic ON eic.id = ptl.partner_company_id AND eic.is_delete = 0
+                LEFT JOIN ins_fee_orders fee  ON b.id = fee.order_no AND fee.is_delete = 0
         GROUP BY
             b.company_id,
             b.company_name,
@@ -83,9 +85,9 @@
                     SUM( fee.total_premium )
                 FROM
                     ins_orders io
-                        LEFT JOIN ins_fee_orders fee ON io.id = fee.order_no
+                        LEFT JOIN ins_fee_orders fee ON io.id = fee.order_no AND fee.is_delete = 0
                 WHERE
-                    io.company_id = b.company_id
+                    io.company_id = b.company_id AND io.is_delete = 0
             ) AS sumCompanyPremium,
             SUM( fee.total_premium ) AS sumPremium,
             SUM( CASE WHEN b.product_id = '0330' AND b.parent_id IS NULL THEN fee.total_premium ELSE 0 END ) AS djPremium,
@@ -108,7 +110,8 @@
                 FROM
                     ins_orders
                 WHERE
-                    entry_status IN ( 1, 2 ) UNION ALL
+                    entry_status IN ( 1, 2 )  AND is_delete = 0
+                UNION ALL
                 SELECT
                     id,
                     agreement_id,
@@ -124,10 +127,11 @@
                 WHERE
                     entry_status = 3
                   AND audit_status = 1
+                  AND is_delete = 0
             ) b
-                LEFT JOIN ptl_agreement ptl ON b.agreement_id = ptl.id
-                LEFT JOIN esm_ins_company eic ON eic.id = ptl.partner_company_id
-                LEFT JOIN ins_fee_orders fee ON b.id = fee.order_no
+                LEFT JOIN ptl_agreement ptl ON b.agreement_id = ptl.id AND ptl.is_delete = 0
+                LEFT JOIN esm_ins_company eic ON eic.id = ptl.partner_company_id AND eic.is_delete = 0
+                LEFT JOIN ins_fee_orders fee ON b.id = fee.order_no AND fee.is_delete = 0
         GROUP BY
             b.company_id,
             b.company_name,
@@ -137,4 +141,4 @@
             b.company_id,
             ptl.partner_company_id
     </select>
-</mapper>
+</mapper>

+ 180 - 163
consoleStatistics/src/main/resources/mapper/ReportSearchConfigurationMapper.xml

@@ -3,113 +3,118 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jzg.console.mapper.ReportSearchConfigurationMapper">
+
     <select id="getSearchConfigurationList"
             resultType="com.jzg.commons.entity.report.dto.ReportSearchConfigurationDto">
         SELECT
-            b.search_key AS 'key',
-            b.search_name AS label,
-            b.show_type AS inputType,
-            CASE
-                WHEN (SELECT select_type FROM report_page_set_search_param
-                      WHERE report_configuration_id = a.report_configuration_id
-                        AND router_path_key = #{ routerPath }) IS NOT NULL THEN
-                (SELECT select_type FROM report_page_set_search_param
-                 WHERE report_configuration_id = a.report_configuration_id
-                   AND router_path_key = #{ routerPath })
-                ELSE a.select_type
-            END AS selectType,
-            b.search_sql AS searchSql,
-            b.id AS id,
-            a.show_flag AS showFlag,
-            CASE
-            WHEN (
-            SELECT COUNT(0)
-            FROM report_page_set_search_param
-            WHERE report_configuration_id = a.report_configuration_id
-            AND router_path_key = #{ routerPath }
-            ) > 0 THEN true
-            ELSE false
-            END AS defaultFlag,
-            CASE
-            WHEN (
-            SELECT COUNT(0)
-            FROM report_page_select_disable
-            WHERE report_configuration_id = a.report_configuration_id
-            AND router_path_key = #{ routerPath }
-            ) > 0 THEN true
-            ELSE false
-            END AS selectFlag,
-            false AS isShowDelIcon
+        b.search_key AS 'key',
+        b.search_name AS label,
+        b.show_type AS inputType,
+        CASE
+        WHEN (SELECT select_type FROM report_page_set_search_param
+        WHERE report_configuration_id = a.report_configuration_id
+        AND router_path_key = #{ routerPath } AND is_delete = 0) IS NOT NULL THEN
+        (SELECT select_type FROM report_page_set_search_param
+        WHERE report_configuration_id = a.report_configuration_id
+        AND router_path_key = #{ routerPath } AND is_delete = 0)
+        ELSE a.select_type
+        END AS selectType,
+        b.search_sql AS searchSql,
+        b.id AS id,
+        a.show_flag AS showFlag,
+        CASE
+        WHEN (
+        SELECT COUNT(0)
+        FROM report_page_set_search_param
+        WHERE report_configuration_id = a.report_configuration_id
+        AND router_path_key = #{ routerPath } AND is_delete = 0 ) > 0 THEN true
+        ELSE false
+        END AS defaultFlag,
+        CASE
+        WHEN (
+        SELECT COUNT(0)
+        FROM report_page_select_disable
+        WHERE report_configuration_id = a.report_configuration_id
+        AND router_path_key = #{ routerPath } AND is_delete = 0 ) > 0 THEN true
+        ELSE false
+        END AS selectFlag,
+        false AS isShowDelIcon
         FROM
-            report_page_set_search_param a
-        LEFT JOIN report_search_configuration b ON a.report_configuration_id = b.id
-         WHERE
-             a.router_path_key = 'common'
-        ORDER BY
-            a.sort
+        report_page_set_search_param a
+        LEFT JOIN report_search_configuration b
+        ON a.report_configuration_id = b.id AND b.is_delete = 0
+        <where>
+            AND a.is_delete = 0
+            <if test="routerPath != null and routerPath != ''">
+                AND a.router_path_key = 'common'
+            </if>
+        </where>
+        ORDER BY a.sort
     </select>
 
     <select id="selectDictListByCode" resultType="com.jzg.commons.entity.report.dto.ReportDictDto">
         SELECT
-            p.VALUE AS value,
-            p.label AS label
+        p.VALUE AS value,
+        p.label AS label
         FROM
-            sys_dict p
-            LEFT JOIN sys_dict_type c ON p.type_code = c.dict_code
-        WHERE
-            c.dict_code = #{distCode}
-        ORDER BY
-            p.sort
+        sys_dict p
+        LEFT JOIN sys_dict_type c ON p.type_code = c.dict_code AND c.is_delete = 0
+        <where>
+            AND p.is_delete = 0
+            <if test="distCode != null and distCode != ''">
+                AND c.dict_code = #{distCode}
+            </if>
+        </where>
+        ORDER BY p.sort
     </select>
+
     <select id="getSecondLevelAreaList" resultType="com.jzg.commons.entity.po.SysArea">
-        SELECT
-            *
-        FROM
-            sys_area
-        WHERE
-            `level` IN (1,2)
+        SELECT *
+        FROM sys_area
+        <where>
+            AND is_delete = 0
+            AND `level` IN (1,2)
+        </where>
     </select>
+
     <select id="getDeptListByUserId" resultType="com.jzg.commons.entity.po.SysDept">
-        SELECT
-            *
-        FROM
-            sys_dept
-        WHERE
-            system_code =(
-                SELECT
-                    sys_code
-                FROM
-                    sys_system
-                WHERE
-                    user_id = #{userId}
+        SELECT *
+        FROM sys_dept
+        <where>
+            AND is_delete = 0
+            AND system_code = (
+            SELECT sys_code
+            FROM sys_system
+            WHERE user_id = #{userId}
+            AND is_delete = 0
             )
-        order by id
+        </where>
+        ORDER BY id
     </select>
+
     <select id="queryCompanyListByUserId" resultType="com.jzg.commons.entity.report.dto.ReportDictDto">
         SELECT
-            id AS VALUE,
-	        NAME AS label
-        FROM
-            esm_ins_company
-        WHERE
-            id IN (
-                SELECT
-                    bus_id
-                FROM
-                    sys_system_bus_perms_link
-                WHERE
-                    perms_id =(
-                        SELECT
-                            p.id
-                        FROM
-                            sys_system_bus_perms p
-                            LEFT JOIN sys_system ss ON p.system_code = ss.sys_code
-                        WHERE
-                            ss.user_id = #{userId}
-                    )
-                    AND bus_code = 'quoteCompany'
+        id AS VALUE,
+        NAME AS label
+        FROM esm_ins_company
+        <where>
+            AND is_delete = 0
+            AND id IN (
+            SELECT bus_id
+            FROM sys_system_bus_perms_link
+            WHERE is_delete = 0
+            AND bus_code = 'quoteCompany'
+            AND perms_id = (
+            SELECT p.id
+            FROM sys_system_bus_perms p
+            LEFT JOIN sys_system ss ON p.system_code = ss.sys_code AND ss.is_delete = 0
+            WHERE p.is_delete = 0
+            AND ss.user_id = #{userId}
+            )
             )
+        </where>
     </select>
+
     <select id="getPartnerCompanyListByCompanyId" resultType="com.jzg.commons.entity.report.dto.ReportDictDto">
         WITH RECURSIVE company_hierarchy AS (
             SELECT
@@ -117,90 +122,93 @@
                 name,
                 parent_id,
                 1 AS level
-            FROM
-               esm_ins_company
-            WHERE
-                id = #{companyId}
-                AND is_delete = 0
+            FROM esm_ins_company
+            WHERE id = #{companyId}
+              AND is_delete = 0
             UNION ALL
-                SELECT
-                    c.id,
-                    c.name,
-                    c.parent_id,
-                    ch.level + 1 AS level
-                FROM
-                   esm_ins_company c
-                   INNER JOIN  company_hierarchy ch ON c.parent_id = ch.id
-                WHERE
-                   c.is_delete = 0
-                   AND ch.level <![CDATA[< ]]>  3
+            SELECT
+                c.id,
+                c.name,
+                c.parent_id,
+                ch.level + 1 AS level
+            FROM esm_ins_company c
+                     INNER JOIN company_hierarchy ch ON c.parent_id = ch.id
+            WHERE c.is_delete = 0
+              AND ch.level <![CDATA[< ]]> 3
         )
         SELECT
-            id as value,
-            name as label,
+            id AS value,
+            name AS label,
             parent_id,
             level
-        FROM
-        company_hierarchy
-        WHERE
-        level = 3;
+        FROM company_hierarchy
+        WHERE level = 3
     </select>
+
     <select id="getSearchDefaultList"
             resultType="com.jzg.commons.entity.report.dto.ReportSearchConfigurationDto">
         SELECT
-            b.search_key AS 'key',
-            b.search_name AS label,
-            b.show_type AS inputType,
-            b.select_type AS selectType,
-            b.search_sql AS searchSql,
-            b.id AS id,
-            a.show_flag AS showFlag,
-            true  as   defaultFlag,
-            true  as  selectFlag,
-            false AS isShowDelIcon
-        FROM
-            report_page_set_search_param a
-                LEFT JOIN report_search_configuration b ON a.report_configuration_id = b.id
-        WHERE
-            a.router_path_key = #{ routerKey }
-        ORDER BY
-            a.sort
+        b.search_key AS 'key',
+        b.search_name AS label,
+        b.show_type AS inputType,
+        b.select_type AS selectType,
+        b.search_sql AS searchSql,
+        b.id AS id,
+        a.show_flag AS showFlag,
+        true AS defaultFlag,
+        true AS selectFlag,
+        false AS isShowDelIcon
+        FROM report_page_set_search_param a
+        LEFT JOIN report_search_configuration b
+        ON a.report_configuration_id = b.id
+        AND b.is_delete = 0
+        <where>
+            AND a.is_delete = 0
+            <if test="routerKey != null and routerKey != ''">
+                AND a.router_path_key = #{ routerKey }
+            </if>
+        </where>
+        ORDER BY a.sort
     </select>
 
-    <select id="getUserIdByUserName"
-            resultType="java.lang.String">
-        SELECT
-            id
-        FROM
-            sys_user
-        WHERE
-            mobile = #{ userId }
+    <select id="getUserIdByUserName" resultType="java.lang.String">
+        SELECT id
+        FROM sys_user
+        <where>
+            AND is_delete = 0
+            AND account_status = 1
+            <if test="userId != null and userId != ''">
+                AND mobile = #{ userId }
+            </if>
+        </where>
     </select>
 
     <select id="getUserByUserId" resultType="java.lang.String">
-        SELECT
-            sys_code
-        FROM
-            sys_system
-        WHERE
-            user_id = (
-                SELECT
-                    id
-                FROM
-                    sys_user
-                WHERE
-                    mobile = #{ userId }
-                )
+        SELECT sys_code
+        FROM sys_system
+        <where>
+            AND is_delete = 0
+            AND user_id = (
+            SELECT id
+            FROM sys_user
+            WHERE is_delete = 0
+            AND account_status = 1
+            AND mobile = #{ userId }
+            )
+        </where>
     </select>
 
     <select id="getUserByPhone" resultType="java.lang.String">
-        SELECT
-            sys_code
-        FROM
-            sys_system
-        WHERE
-            user_id =  #{ userId }
+        SELECT sys_code
+        FROM sys_system
+        <where>
+            AND is_delete = 0
+            <if test="userId != null">
+                AND user_id = #{userId}
+            </if>
+        </where>
     </select>
+
     <select id="getUserListBySystemCode" resultType="com.jzg.commons.entity.report.dto.UserTreeDto">
         WITH RECURSIVE org_hierarchy AS (
             SELECT
@@ -215,10 +223,12 @@
                 CAST(o.id AS CHAR) AS org_path
             FROM sys_organization o
                      LEFT JOIN sys_user_jzg_info u ON o.manager_id = u.id AND u.is_delete = 0
-            WHERE o.system_code = #{systemCode}
-              AND o.is_delete = 0
+            WHERE o.is_delete = 0
+              AND o.system_code = #{systemCode}
               AND u.id != 'admin'
+
         UNION ALL
+
         SELECT
             o.id AS org_id,
             o.name AS org_name,
@@ -232,10 +242,10 @@
         FROM sys_organization o
                  INNER JOIN org_hierarchy oh ON o.dept_id = oh.org_id
                  LEFT JOIN sys_user_jzg_info u ON o.manager_id = u.id AND u.is_delete = 0
-        WHERE o.system_code = #{systemCode}
-          AND o.is_delete = 0
+        WHERE o.is_delete = 0
+          AND o.system_code = #{systemCode}
           AND u.id != 'admin'
-       )
+        )
         SELECT DISTINCT
             p.id as id,
             p.name as name,
@@ -273,9 +283,12 @@
                      0 AS is_manager,
                      oh.org_path AS hierarchy_path
                  FROM sys_organization_user_link ul
-                          INNER JOIN sys_user_jzg_info u ON ul.user_id = u.id AND u.is_delete = 0
+                          INNER JOIN sys_user_jzg_info u
+                                     ON ul.user_id = u.id
+                                         AND u.is_delete = 0
                           INNER JOIN org_hierarchy oh ON ul.organization_id = oh.org_id
                  WHERE ul.user_id != CAST(oh.manager_id AS CHAR)
+                   AND ul.is_delete = 0
 
                  UNION ALL
                  SELECT
@@ -313,12 +326,16 @@
                      oh.org_path AS hierarchy_path,
                      oh.parent_org_id
                      FROM sys_organization_user_link ul
-                     INNER JOIN sys_user_jzg_info u ON ul.user_id = u.id AND u.is_delete = 0
+                     INNER JOIN sys_user_jzg_info u
+                     ON ul.user_id = u.id
+                     AND u.is_delete = 0
                      INNER JOIN org_hierarchy oh ON ul.organization_id = oh.org_id
-                     WHERE ul.user_id != CAST(oh.manager_id AS CHAR) AND oh.parent_org_id IS NOT NULL
+                     WHERE ul.user_id != CAST(oh.manager_id AS CHAR)
+                     AND oh.parent_org_id IS NOT NULL
+                     AND ul.is_delete = 0
                      ) sub
                      INNER JOIN org_hierarchy oh ON sub.parent_org_id = oh.org_id
              ) p
         ORDER BY p.hierarchy_path, p.is_manager DESC;
     </select>
-</mapper>
+</mapper>

+ 38 - 27
consoleStatistics/src/main/resources/mapper/ReportUploadExcelTaskMapper.xml

@@ -1,39 +1,50 @@
 <?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.ReportUploadExcelTaskMapper">
+
+    <!-- 根据用户ID更新已读状态 -->
     <update id="updateStatusByUserId">
-        update  report_upload_excel_task
-        set  read_status =1
-        where upload_user_id =#{userId}
-        and read_status=0
+        update report_upload_excel_task
+        set read_status = 1
+        <where>
+            and is_delete = 0
+            and upload_user_id = #{userId}
+            and read_status = 0
+        </where>
     </update>
 
+    <!-- 分页查询任务列表 -->
     <select id="getPageTaskList" resultType="com.jzg.commons.entity.report.dto.ReportUploadExcelTaskDto">
-         select
-             *
-         from
-             report_upload_excel_task
-         <where>
-             <if test="vo.uploadUserId !=null and vo.uploadUserId !=''">
-                 AND  upload_user_id  =#{ vo.uploadUserId }
-             </if>
-             <if test="vo.taskStatus !=null">
-                 AND   task_status  =#{ vo.taskStatus }
-             </if>
-             <if test="vo.readStatus !=null">
-                 AND  read_status  =#{ vo.readStatus }
-             </if>
-         </where>
-          order by  upload_date desc
+        select
+        *
+        from
+        report_upload_excel_task
+        <where>
+            and is_delete = 0
+            <if test="vo.uploadUserId != null and vo.uploadUserId != ''">
+                AND upload_user_id = #{vo.uploadUserId}
+            </if>
+            <if test="vo.taskStatus != null">
+                AND task_status = #{vo.taskStatus}
+            </if>
+            <if test="vo.readStatus != null">
+                AND read_status = #{vo.readStatus}
+            </if>
+        </where>
+        order by upload_date desc
     </select>
+
+    <!-- 查询未读消息数量 -->
     <select id="getTaskMessageNoReadCount" resultType="java.lang.Integer">
         select
-            count(0)
+        count(0)
         from
-            report_upload_excel_task
-        where
-            upload_user_id  =#{ userId }
-            and
-            read_status = 0
+        report_upload_excel_task
+        <where>
+            and is_delete = 0
+            AND upload_user_id = #{userId}
+            AND read_status = 0
+        </where>
     </select>
-</mapper>
+
+</mapper>

+ 7 - 0
partner/src/main/java/com/jzg/entity/PartnerRule.java

@@ -1,6 +1,8 @@
 package com.jzg.entity;
 
 
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.jzg.commons.core.base.PartnerBaseModel;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
@@ -43,4 +45,9 @@ public class PartnerRule extends PartnerBaseModel {
     @Schema(description = "购买保级金额")
     private BigDecimal fallAmount;
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
 }

+ 8 - 0
partner/src/main/java/com/jzg/entity/PartnerUser.java

@@ -1,9 +1,11 @@
 package com.jzg.entity;
 
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.jzg.commons.core.base.PartnerBaseModel;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
@@ -96,4 +98,10 @@ public class PartnerUser extends PartnerBaseModel {
     private boolean first;
 
 
+    @ExcelIgnore
+    @Schema(description = "是否删除")
+    @TableLogic
+    private Integer isDelete;
+
+
 }

+ 46 - 9
partner/src/main/resources/mapper/PartnerAttributeMapper.xml

@@ -20,7 +20,6 @@
         <collection property="requirement" column="id=id" select="selectRequirement" />
     </resultMap>
 
-
     <resultMap id="partner_attribute" type="com.jzg.entity.PartnerAttribute">
         <result property="id" column="id"/>
         <result property="min" column="min"/>
@@ -36,28 +35,66 @@
         <result property="taskDays" column="task_days"/>
     </resultMap>
 
+    <!-- 查询全部规则 -->
     <select id="queryAll" resultMap="BaseMapper">
-        select id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,strategy,kh_days,fall_tick,fall_amount,system_code from partner_rule
+        select
+        id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,
+        strategy,kh_days,fall_tick,fall_amount,system_code
+        from partner_rule
+        <where>
+            AND is_delete = 0
+        </where>
     </select>
 
-
+    <!-- 根据等级查询 -->
     <select id="selectByGrade" resultMap="BaseMapper">
-        select id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,strategy,kh_days,fall_tick,fall_amount from partner_rule where grade = #{grade}
+        select
+        id, upgrade, relegation, grade_name, grade, appraise, rel_satisfy,
+        strategy,kh_days,fall_tick,fall_amount
+        from partner_rule
+        <where>
+            AND is_delete = 0
+            <if test="grade != null">
+                AND grade = #{grade}
+            </if>
+        </where>
     </select>
 
 
+    <!-- 查询周期 -->
     <select id="selectCycle" resultMap="partner_attribute">
-        select id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days from partner_attribute where type = 1 and rule_id = #{id}
+        select
+        id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days
+        from partner_attribute
+        <where>
+            AND is_delete = 0
+            AND type = 1
+            AND rule_id = #{id}
+        </where>
     </select>
 
-
+    <!-- 查询策略 -->
     <select id="selectStrategy" resultMap="partner_attribute">
-        select id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days from partner_attribute where type = 3 and rule_id = #{id}
+        select
+        id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days
+        from partner_attribute
+        <where>
+            AND is_delete = 0
+            AND type = 3
+            AND rule_id = #{id}
+        </where>
     </select>
 
+    <!-- 查询要求 -->
     <select id="selectRequirement" resultMap="partner_attribute">
-        select id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days from partner_attribute where type = 2 and rule_id = #{id}
+        select
+        id,min,max,satisfy,rule_id,requirement,strategy,cycle,type,checked,fixed_days,task_days
+        from partner_attribute
+        <where>
+            AND is_delete = 0
+            AND type = 2
+            AND rule_id = #{id}
+        </where>
     </select>
 
-
 </mapper>

Разлика између датотеке није приказан због своје велике величине
+ 532 - 481
partner/src/main/resources/mapper/PartnerUserMapper.xml


+ 5 - 4
partner/src/main/resources/mapper/SysPartnerAccountMapper.xml

@@ -22,8 +22,9 @@
             a.create_time as "createTime",
             a.history_fee as "historyFee",
             a.cash_fee as "cashFee"
-        from sys_partner_account a
+        from partner_partner_account a
         <where>
+            a.is_delete = 0
             <if test="userId !=null and userId !=''">
                 AND a.user_id =#{userId}
             </if>
@@ -74,10 +75,10 @@
             COALESCE(SUM(CASE WHEN 1=1 THEN history_fee END), 0) AS transferAmount,
             COALESCE(SUM(CASE WHEN 1=1 THEN expired_amount END), 0) AS expiredAmount,
             COALESCE(SUM(CASE WHEN 1=1 THEN cash_fee - expired_amount END), 0) AS unreportedAmount,
-            (SELECT COALESCE(cash_fee, 0) FROM sys_partner_account WHERE user_id = #{userId}) AS cashFee,
-            (SELECT COALESCE(history_fee, 0) FROM sys_partner_account WHERE user_id = #{userId} ) AS historyFee
+            (SELECT COALESCE(cash_fee, 0) FROM partner_partner_account WHERE user_id = #{userId} ) AS cashFee,
+            (SELECT COALESCE(history_fee, 0) FROM partner_partner_account WHERE user_id = #{userId} ) AS historyFee
         FROM partner_partner_account
-        WHERE user_id = #{userId}
+        WHERE user_id = #{userId} and is_delete = 0
     </select>
 
 </mapper>

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

@@ -24,6 +24,8 @@ import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.component.DistributedLockComponent;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.commons.utils.TimeProcessing;
 import lombok.RequiredArgsConstructor;
@@ -58,6 +60,11 @@ public class AnShengCrawlerRequestImpl implements AnShengCrawlerRequest {
         anShengCrawlerLoginService.login(loginBase.getUsername(), loginBase.getPassword());
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         String username = detectLoginRequest.getUsername();

+ 7 - 0
tenant/insurance/quotation-bohai/src/main/java/com/jzg/quotation/bohai/crawler/service/impl/BoHaiCrawlerRequestImpl.java

@@ -29,6 +29,8 @@ import com.jzg.quotation.bohai.crawler.util.PythonExecutor;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.bohai.crawler.build.BoHaiCrawlerQuoteResultsVoBuild;
 import com.jzg.quotation.bohai.crawler.component.BoHaiCrawlerRequestComponent;
@@ -99,6 +101,11 @@ public class BoHaiCrawlerRequestImpl implements BoHaiCrawlerRequest {
         boHaiCrawlerQuoteProcessService.login(loginBase.getUsername(), loginBase.getPassword());
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
   public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         return boHaiCrawlerQuoteProcessService.detectLogin(detectLoginRequest);

+ 7 - 0
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/crawler/service/impl/ChengTaiCrawlerRequestImpl.java

@@ -26,6 +26,8 @@ import com.jzg.quotation.chengtai.crawler.utils.ZipImageExample;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.service.ExteriorUtilsRequest;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.commons.utils.TimeProcessing;
@@ -59,6 +61,11 @@ public class ChengTaiCrawlerRequestImpl implements ChengTaiCrawlerRequest {
         }
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public QuoteResultsVo quote(QuoteVo quoteVo) throws Exception {
 

+ 12 - 2
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/client/OrgClient.java

@@ -2,7 +2,7 @@ package com.jzg.quotation.commons.client;
 
 import com.alibaba.fastjson.JSONObject;
 import com.jzg.commons.core.page.HttpResult;
-import com.jzg.commons.entity.account.po.SysUserAccountIncomeLog;
+import com.jzg.commons.entity.account.po.SysUserAccountChangeLog;
 import com.jzg.commons.entity.agreement.dispatch.dto.PtlAgreementDispatchAfterAction;
 import com.jzg.commons.entity.agreement.dispatch.vo.PtlAgreementDispatchVo;
 import com.jzg.commons.entity.dto.CostAgreementParam;
@@ -207,5 +207,15 @@ public interface OrgClient {
      * 添加用户账户收入记录
      */
     @PostMapping(value = "/userAccount/addUserAccountIncomeLog")
-    HttpResult addUserAccountIncomeLog(@RequestBody List<SysUserAccountIncomeLog> incomeLogs);
+    HttpResult addUserAccountIncomeLog(@RequestBody List<SysUserAccountChangeLog> incomeLogs);
+
+    /**
+     * 添加用户钱包账户记录
+     *
+     * @param changeLog 用户钱包记录
+     * @author lipf
+     * @date 2026/6/8 10:17
+     */
+    @PostMapping("/userAccount/addUserAccountChangeLog")
+    HttpResult<String> addUserAccountChangeLog(@RequestBody SysUserAccountChangeLog changeLog);
 }

+ 9 - 0
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/entity/GetCaptchaRequest.java

@@ -19,6 +19,15 @@ public class GetCaptchaRequest implements Serializable {
 
     @Serial
     private static final long serialVersionUID = 327592537421379864L;
+
+    /**
+     * 请求类型  1 api 2 python
+     */
+    private  String apiType;
+    /**
+     * 承保机构编码
+     */
+    private String companyCode;
     /**
      * 用户名
      */

+ 3 - 0
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/service/QuotationCrawlerBaseService.java

@@ -3,6 +3,8 @@ package com.jzg.quotation.commons.service;
 
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 
 
 /**
@@ -19,4 +21,5 @@ public interface QuotationCrawlerBaseService extends QuotationBaseService {
      */
     void login(LoginBase loginBase);
 
+    GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest);
 }

+ 7 - 0
tenant/insurance/quotation-dajia/src/main/java/com/jzg/quotation/dajia/crawler/service/impl/DaJiaCrawlerRequestImpl.java

@@ -11,6 +11,8 @@ import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.commons.utils.TimeProcessing;
@@ -101,6 +103,11 @@ public class DaJiaCrawlerRequestImpl implements DaJiaCrawlerRequest {
         daJiaCrawlerQuoteProcessService.login(loginBase.getUsername(), loginBase.getPassword());
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         return daJiaCrawlerQuoteProcessService.detectLogin(detectLoginRequest);

+ 8 - 0
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/build/GuoRenCrawlerQuoteResultsVoBuild.java

@@ -40,14 +40,22 @@ public final class GuoRenCrawlerQuoteResultsVoBuild {
                 .map(String::valueOf)
                 .orElse("0");
 
+        String bcPremium = Optional.ofNullable(calculationPremium.getBc())
+                .map(GuoRenCrawlerCalculationPremiumData.BcDTO::getPrpTmain)
+                .map(GuoRenCrawlerCalculationPremiumData.BcDTO.PrpTMainDTO::getNoCarPremium)
+                .map(String::valueOf)
+                .orElse("0");
+
         String vvTax = Optional.ofNullable(calculationPremium.getCi())
                 .map(GuoRenCrawlerCalculationPremiumData.CiDTO::getPrpTcarshipTax)
                 .map(GuoRenCrawlerCalculationPremiumData.CiDTO.PrpTcarshipTaxDTO::getSumPayTax)
                 .map(String::valueOf)
                 .orElse("0");
 
+
         quoteResultsVo.getCosts().setCiPremium(ciPremium);
         quoteResultsVo.getCosts().setBiPremium(biPremium); // 注意这里CI和BI保费相同
+        quoteResultsVo.getCosts().setNiPremium(bcPremium);
         quoteResultsVo.getCosts().setVvTax(vvTax);
         quoteResultsVo.setQuoteStatusEnum(InsOrderStatusEnum.WAIT_AUDIT);
 

+ 0 - 1
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/request/GuoRenCrawlerProposalNoSaveRequest.java

@@ -31,7 +31,6 @@ public class GuoRenCrawlerProposalNoSaveRequest implements Serializable {
 
     public GuoRenCrawlerProposalNoSaveRequest(QuoteVo quoteVo, GuoRenCrawlerCalculationPremiumData guoRenCrawlerCalculationPremiumData, GuoRenCrawlerCalculationPremiumRequest calculationPremiumRequest) {
         this.bc = calculationPremiumRequest.getBc();
-        this.bc.setPrpTmain(guoRenCrawlerCalculationPremiumData.getBc().getPrpTmain());
         this.bc.getPrpTmain().setCaptcha("");
         this.bc.getPrpTmain().setEProposalFlag("1");
         this.basePartVo = calculationPremiumRequest.getBasePartVo();

+ 623 - 1
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/crawler/entity/response/GuoRenCrawlerCalculationPremiumData.java

@@ -5,8 +5,8 @@ import com.jzg.quotation.guoren.crawler.entity.dto.CiInsureDemandDTO;
 import com.jzg.quotation.guoren.crawler.entity.dto.PrptengageListDTO;
 import lombok.Data;
 import lombok.NoArgsConstructor;
-import com.jzg.quotation.guoren.crawler.entity.dto.PrpTMainDTO;
 
+import java.io.Serial;
 import java.util.List;
 
 /**
@@ -3574,6 +3574,628 @@ public class GuoRenCrawlerCalculationPremiumData extends GuoRenCrawlerBaseRespon
         @JsonProperty("prpTengiNeerList")
         private List<?> prpTengiNeerList;
 
+
+
+        @NoArgsConstructor
+        @Data
+        public class PrpTMainDTO {
+
+            @Serial
+            private static final long serialVersionUID = -1506154526496095056L;
+
+
+            @JsonProperty("agreementNo")
+            private String agreementNo;
+
+            @JsonProperty("project")
+            private String project;
+
+            @JsonProperty("cooprOutlets")
+            private String cooprOutlets;
+
+            @JsonProperty("commissionerNo")
+            private String commissionerNo;
+
+            @JsonProperty("comName")
+            private String comName;
+
+            @JsonProperty("handler1Name")
+            private String handler1Name;
+
+            @JsonProperty("agentName")
+            private String agentName;
+
+            @JsonProperty("unitMaintenanceName")
+            private String unitMaintenanceName;
+
+            @JsonProperty("unitMaintenanceType1Name")
+            private String unitMaintenanceType1Name;
+
+            @JsonProperty("channeltypeoneName")
+            private String channeltypeoneName;
+
+            @JsonProperty("unitMaintenanceType2Name")
+            private String unitMaintenanceType2Name;
+
+            @JsonProperty("channeltypetwoName")
+            private String channeltypetwoName;
+
+            /**
+             * 1 诉讼 2 裁决
+             */
+            @JsonProperty("argueSolution")
+            private String argueSolution;
+
+            @JsonProperty("arbitboardName")
+            private String arbitboardName;
+
+            @JsonProperty("isExpressProtectionFlag")
+            private String isExpressProtectionFlag;
+
+            /**
+             * 电子投保单标识 1 电子投保单  0 传统投保单
+             */
+            @JsonProperty("eProposalFlag")
+            private String eProposalFlag;
+
+            @JsonProperty("appliFactorFlag")
+            private String appliFactorFlag;
+
+            @JsonProperty("insuredFactorFlag")
+            private String insuredFactorFlag;
+
+            @JsonProperty("handler1Code")
+            private String handler1Code;
+
+            @JsonProperty("channeltypeone")
+            private String channeltypeone;
+
+            @JsonProperty("channeltypetwo")
+            private String channeltypetwo;
+
+            @JsonProperty("classIdentifier")
+            private String classIdentifier;
+
+            @JsonProperty("unitMaintenanceCode")
+            private String unitMaintenanceCode;
+
+            @JsonProperty("unitmainTenanceType1")
+            private String unitmainTenanceType1;
+
+            @JsonProperty("unitmainTenanceType2")
+            private String unitmainTenanceType2;
+
+            @JsonProperty("isStandard")
+            private String isStandard;
+
+            @JsonProperty("uwELRrel1")
+            private String uwELRrel1;
+
+            @JsonProperty("uwELRrel2")
+            private String uwELRrel2;
+
+            @JsonProperty("templateName")
+            private String templateName;
+
+            @JsonProperty("templateNo")
+            private String templateNo;
+
+            @JsonProperty("deGentType")
+            private String deGentType;
+
+            @JsonProperty("saleProfessionalNum")
+            private String saleProfessionalNum;
+
+            @JsonProperty("lifeAgentName")
+            private String lifeAgentName;
+
+            @JsonProperty("lifeAgentCode")
+            private String lifeAgentCode;
+
+            @JsonProperty("internetFlag")
+            private String internetFlag;
+
+            @JsonProperty("internetPlatform")
+            private String internetPlatform;
+
+            @JsonProperty("internetSource")
+            private String internetSource;
+
+            @JsonProperty("platformCategory")
+            private String platformCategory;
+
+            @JsonProperty("fcAgentCode")
+            private String fcAgentCode;
+
+            @JsonProperty("fcAgentName")
+            private String fcAgentName;
+
+            @JsonProperty("fcAgreementNo")
+            private String fcAgreementNo;
+
+            @JsonProperty("fcAgreementNoName")
+            private String fcAgreementNoName;
+
+            @JsonProperty("fcBusinessNature")
+            private String fcBusinessNature;
+
+            @JsonProperty("fcHandler1Code")
+            private String fcHandler1Code;
+
+            @JsonProperty("fcHandler1Name")
+            private String fcHandler1Name;
+
+            @JsonProperty("fcSaleProfessionalNum")
+            private String fcSaleProfessionalNum;
+
+            @JsonProperty("fclifeAgentName")
+            private String fclifeAgentName;
+
+            @JsonProperty("comCode")
+            private String comCode;
+
+            @JsonProperty("businessNature")
+            private String businessNature;
+
+            @JsonProperty("agentCode")
+            private String agentCode;
+
+            @JsonProperty("agentCanalCode")
+            private String agentCanalCode;
+
+            @JsonProperty("serviceStrategy")
+            private String serviceStrategy;
+
+            @JsonProperty("cooprOutletsNo")
+            private String cooprOutletsNo;
+
+            @JsonProperty("saleName")
+            private String saleName;
+
+            @JsonProperty("remark")
+            private String remark;
+
+            @JsonProperty("amlCode")
+            private String amlCode;
+
+            @JsonProperty("operateDate")
+            private String operateDate;
+
+            @JsonProperty("policySort")
+            private String policySort;
+
+            @JsonProperty("serviceLabelName")
+            private String serviceLabelName;
+
+            @JsonProperty("uniteBusinessFlag")
+            private Integer uniteBusinessFlag;
+
+            @JsonProperty("noCarFlag")
+            private Integer noCarFlag;
+
+            @JsonProperty("goodCodes")
+            private List<?> goodCodes;
+
+            @JsonProperty("noCarPremium")
+            private Integer noCarPremium;
+
+            @JsonProperty("certiNo")
+            private String certiNo;
+
+            @JsonProperty("certino1")
+            private String certino1;
+
+            @JsonProperty("business")
+            private Object business;
+
+            @JsonProperty("operatorCode")
+            private String operatorCode;
+
+            @JsonProperty("signDate")
+            private String signDate;
+
+            @JsonProperty("loginComCode")
+            private String loginComCode;
+
+            @JsonProperty("noCarCodes")
+            private String noCarCodes;
+
+            @JsonProperty("cooprOutletsName")
+            private String cooprOutletsName;
+
+            @JsonProperty("proposalNo")
+            private String proposalNo;
+
+            @JsonProperty("renewalFlag")
+            private String renewalFlag;
+
+            @JsonProperty("classCode")
+            private String classCode;
+
+            @JsonProperty("riskCode")
+            private String riskCode;
+
+            @JsonProperty("contractNo")
+            private String contractNo;
+
+            @JsonProperty("printNo")
+            private String printNo;
+
+            @JsonProperty("language")
+            private String language;
+
+            @JsonProperty("policyType")
+            private String policyType;
+
+            @JsonProperty("appliCode")
+            private String appliCode;
+
+            @JsonProperty("appliName")
+            private String appliName;
+
+            @JsonProperty("appliAddress")
+            private String appliAddress;
+
+            @JsonProperty("insuredCode")
+            private String insuredCode;
+
+            @JsonProperty("insuredName")
+            private String insuredName;
+
+            @JsonProperty("insuredAddress")
+            private String insuredAddress;
+
+
+            @JsonProperty("startDate")
+            private String startDate;
+
+            @JsonProperty("startHour")
+            private Integer startHour;
+
+            @JsonProperty("startMinute")
+            private Integer startMinute;
+
+            @JsonProperty("endMinute")
+            private Integer endMinute;
+
+            @JsonProperty("endDate")
+            private String endDate;
+
+            @JsonProperty("endHour")
+            private Integer endHour;
+
+            @JsonProperty("pureRate")
+            private Integer pureRate;
+
+            @JsonProperty("disRate")
+            private Integer disRate;
+
+            @JsonProperty("disCount")
+            private Double disCount;
+
+            @JsonProperty("currency")
+            private String currency;
+
+            @JsonProperty("sumAmount")
+            private Integer sumAmount;
+
+            @JsonProperty("sumPremium")
+            private Double sumPremium;
+
+            @JsonProperty("sumSubprem")
+            private Integer sumSubprem;
+
+            @JsonProperty("sumQuantity")
+            private Integer sumQuantity;
+
+            @JsonProperty("judicalCode")
+            private String judicalCode;
+
+            @JsonProperty("judicalScope")
+            private String judicalScope;
+
+            @JsonProperty("autoTransRenewFlag")
+            private String autoTransRenewFlag;
+
+
+            @JsonProperty("makeCom")
+            private String makeCom;
+
+            @JsonProperty("operateSite")
+            private String operateSite;
+
+
+            @JsonProperty("handlerCode")
+            private String handlerCode;
+
+
+            @JsonProperty("approverCode")
+            private String approverCode;
+
+            @JsonProperty("underWriteCode")
+            private String underWriteCode;
+
+            @JsonProperty("underWriteName")
+            private String underWriteName;
+
+
+            @JsonProperty("inputDate")
+            private String inputDate;
+
+            @JsonProperty("inputHour")
+            private Integer inputHour;
+
+            @JsonProperty("statiSticSym")
+            private String statiSticSym;
+
+
+            @JsonProperty("coinsFlag")
+            private String coinsFlag;
+
+            @JsonProperty("reinsFlag")
+            private String reinsFlag;
+
+            @JsonProperty("allinsFlag")
+            private String allinsFlag;
+
+            @JsonProperty("underwriteFlag")
+            private String underwriteFlag;
+
+            @JsonProperty("othFlag")
+            private String othFlag;
+
+            @JsonProperty("disRate1")
+            private Integer disRate1;
+
+            @JsonProperty("businessFlag")
+            private String businessFlag;
+
+            @JsonProperty("updaterCode")
+            private String updaterCode;
+
+            @JsonProperty("updateDate")
+            private String updateDate;
+
+            @JsonProperty("upDateHour")
+            private String upDateHour;
+
+            @JsonProperty("shareHolderFlag")
+            private String shareHolderFlag;
+
+            @JsonProperty("inquiryNo")
+            private String inquiryNo;
+
+            @JsonProperty("payMode")
+            private String payMode;
+
+            @JsonProperty("policyNo")
+            private String policyNo;
+
+            @JsonProperty("visaCode")
+            private String visaCode;
+
+            @JsonProperty("manualType")
+            private String manualType;
+
+            @JsonProperty("businessKind")
+            private String businessKind;
+
+            @JsonProperty("businessClass")
+            private String businessClass;
+
+            @JsonProperty("manualFlag")
+            private String manualFlag;
+
+            @JsonProperty("businessRemark1")
+            private String businessRemark1;
+
+            @JsonProperty("businessRemark2")
+            private String businessRemark2;
+
+            @JsonProperty("domesticFlag")
+            private String domesticFlag;
+
+            @JsonProperty("ventureFlag")
+            private String ventureFlag;
+
+            @JsonProperty("bidFlag")
+            private String bidFlag;
+
+            @JsonProperty("agriFlag")
+            private String agriFlag;
+
+            @JsonProperty("agriNature")
+            private String agriNature;
+
+            @JsonProperty("groupPurchaseFlag")
+            private String groupPurchaseFlag;
+
+            @JsonProperty("productCode")
+            private String productCode;
+
+            @JsonProperty("payMethod")
+            private String payMethod;
+
+            @JsonProperty("immeValiFlag")
+            private String immeValiFlag;
+
+            @JsonProperty("lifeManageComCode")
+            private String lifeManageComCode;
+
+            @JsonProperty("lifeChannelType")
+            private String lifeChannelType;
+
+            @JsonProperty("lifeSalecomCode")
+            private String lifeSalecomCode;
+
+            @JsonProperty("lifeAppcontNo")
+            private String lifeAppcontNo;
+
+            @JsonProperty("saleMobile")
+            private String saleMobile;
+
+            @JsonProperty("isPersonal")
+            private String isPersonal;
+
+            @JsonProperty("subRiskCode")
+            private String subRiskCode;
+
+            @JsonProperty("ePolicySort")
+            private String ePolicySort;
+
+            @JsonProperty("policyUrl")
+            private String policyUrl;
+
+            @JsonProperty("captcha")
+            private String captcha;
+
+            @JsonProperty("eFlag")
+            private String eFlag;
+
+            @JsonProperty("uploadTime")
+            private String uploadTime;
+
+            @JsonProperty("businessNatureNew")
+            private String businessNatureNew;
+
+            @JsonProperty("groupBuySize")
+            private Integer groupBuySize;
+
+            @JsonProperty("businessMark")
+            private String businessMark;
+
+            @JsonProperty("mainBankName")
+            private String mainBankName;
+
+            @JsonProperty("otherBankName")
+            private String otherBankName;
+
+            @JsonProperty("sumnoTaxPremium")
+            private Double sumnoTaxPremium;
+
+            @JsonProperty("sumTaxFee")
+            private Double sumTaxFee;
+
+            @JsonProperty("linkerName")
+            private String linkerName;
+
+            @JsonProperty("linkerMobile")
+            private String linkerMobile;
+
+            @JsonProperty("linkerAddress")
+            private String linkerAddress;
+
+            @JsonProperty("dataSourceCode")
+            private String dataSourceCode;
+
+            @JsonProperty("policySequenceNo")
+            private String policySequenceNo;
+
+            @JsonProperty("underwritSequenceNo")
+            private String underwritSequenceNo;
+
+            @JsonProperty("infoManagerFlag")
+            private String infoManagerFlag;
+
+            @JsonProperty("teamCode")
+            private String teamCode;
+
+            @JsonProperty("teamName")
+            private String teamName;
+
+            @JsonProperty("teamTypeId")
+            private String teamTypeId;
+
+            @JsonProperty("teamTypeIdName")
+            private String teamTypeIdName;
+
+            @JsonProperty("teamTypeTwo")
+            private String teamTypeTwo;
+
+            @JsonProperty("teamTypeTwoName")
+            private String teamTypeTwoName;
+
+            @JsonProperty("teamTypeThree")
+            private String teamTypeThree;
+
+            @JsonProperty("teamTypeThreeName")
+            private String teamTypeThreeName;
+
+            @JsonProperty("customerGroupName")
+            private String customerGroupName;
+
+            @JsonProperty("businessNatureOne")
+            private String businessNatureOne;
+
+            @JsonProperty("businessNatureOneName")
+            private String businessNatureOneName;
+
+            @JsonProperty("businessNatureThree")
+            private String businessNatureThree;
+
+            @JsonProperty("businessNatureTwo")
+            private String businessNatureTwo;
+
+            @JsonProperty("businessNatureTwoName")
+            private String businessNatureTwoName;
+
+            @JsonProperty("businessNaturethreeName")
+            private String businessNaturethreeName;
+
+            @JsonProperty("feeandDiscountFlag")
+            private Integer feeandDiscountFlag;
+
+            @JsonProperty("saleChange")
+            private Double saleChange;
+
+            @JsonProperty("oaFlowNumber")
+            private String oaFlowNumber;
+
+            @JsonProperty("upDateTime")
+            private String upDateTime;
+
+            @JsonProperty("underWriteendTime")
+            private String underWriteendTime;
+
+            @JsonProperty("answer")
+            private String answer;
+
+            @JsonProperty("orderNo")
+            private String orderNo;
+
+            @JsonProperty("simpleOrderFlag")
+            private String simpleOrderFlag;
+
+            @JsonProperty("hisOrderNo")
+            private String hisOrderNo;
+
+            @JsonProperty("startDateFlag")
+            private String startDateFlag;
+
+            @JsonProperty("saleGentType")
+            private String saleGentType;
+
+            @JsonProperty("demandNo")
+            private String demandNo;
+
+            @JsonProperty("correction_applicant")
+            private String correctionApplicant;
+
+
+            @JsonProperty("firstProposalDate")
+            private String firstProposalDate;
+
+            @JsonProperty("isbatchProposalNo")
+            private String isbatchProposalNo;
+
+            @JsonProperty("carsonlyid")
+            private String carsonlyid;
+
+            @JsonProperty("flag")
+            private String flag;
+
+        }
+
         @NoArgsConstructor
         @Data
         public static class PrpTitemCarDTO {

+ 7 - 0
tenant/insurance/quotation-guoshou/src/main/java/com/jzg/quotation/guoshou/crawler/service/Impl/GuoshouCrawlerRequestImpl.java

@@ -16,6 +16,8 @@ import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.client.OrgClient;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.guoshou.crawler.component.GsCrawlerLoginComponent;
 import com.jzg.quotation.guoshou.crawler.component.GsCrawlerRequestComponent;
@@ -71,6 +73,11 @@ public class GuoshouCrawlerRequestImpl implements GuoshouCrawlerRequest {
 
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         String username = detectLoginRequest.getUsername();

+ 7 - 0
tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/service/Impl/HengBangCrawlerRequestImpl.java

@@ -25,6 +25,8 @@ import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.client.PlatformClient;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.commons.utils.DateTimeUtil;
@@ -83,6 +85,11 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
         hbCrawlerRequestComponent.authenticate(loginBase.getUsername(), loginBase.getPassword(), RequestConstant.REQUEST_NUMBER);
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         String username = detectLoginRequest.getUsername();

+ 17 - 1
tenant/insurance/quotation-huanong/src/main/java/com/jzg/quotation/huanong/crawler/entity/request/HuaNongCrawlerQuotedPriceRequestRequest.java

@@ -4,6 +4,7 @@ import cn.hutool.core.codec.Base64;
 import com.alibaba.fastjson2.annotation.JSONField;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.commons.entity.quote.vo.*;
+import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.utils.TimeProcessing;
 import com.jzg.quotation.huanong.crawler.constant.enums.JiaYiXianProduct;
 import com.jzg.quotation.huanong.crawler.entity.HuaNongCrawlerConfigureParameters;
@@ -228,6 +229,21 @@ public class HuaNongCrawlerQuotedPriceRequestRequest implements HuaNongHeadReque
             // 险种:根据车型查询返回的 energyTypes 判断是否新能源车(0=燃油,4=其他混动,其他=新能源)
             String energyTypes = carModelDTO != null && carModelDTO.getFullCarData() != null ? carModelDTO.getFullCarData().getEnergyTypes() : null;
             boolean isNewEnergy = energyTypes != null && !"0".equals(energyTypes) && !"4".equals(energyTypes);
+            List<KindInfoVo> kindInfoVos = quoteVo.getKindInfoVo();
+            if(kindInfoVos != null && kindInfoVos.size() >0){
+                kindInfoVos.forEach(kind->{
+                    kind.setUnitAmount(kind.getAmount());
+                    if(kind.getKindCode().equals("D4")){
+                        String seatCount = quoteVo.getCarInfoVo().getSeatCount();
+                        if(seatCount.isEmpty()){
+                            throw new SystemException("未填写座位数信息");
+                        }
+                        kind.setAmount((Integer.parseInt(seatCount)-1) * Integer.parseInt(kind.getAmount())+"");
+                        kind.setQuantity(Integer.parseInt(seatCount)-1+"");
+                    }
+                });
+            }
+
             this.contract = ContractDTO.build(quoteVo.getCiRiskInfoVo(), quoteVo.getBiRiskInfoVo(), quoteVo.getKindInfoVo(), quoteVo.getInsuredPersonInfo(), isNewEnergy);
             // 人员
             this.customer = CustomerDTO.build(quoteVo.getPolicyHolderInfo(), quoteVo.getInsuredPersonInfo(), quoteVo.getOwnersInfo(), this.saleInfo.agentCode, this.saleInfo.comCode);
@@ -2896,7 +2912,7 @@ public class HuaNongCrawlerQuotedPriceRequestRequest implements HuaNongHeadReque
                     this.vat = 0;
                     this.vatChg = 0;
                     this.calculateFlag1 = "";
-                    this.choosed = false;
+                    this.choosed = true;
                     this.notDeductibleFlag = false;
                     this.optNotDeductibleFlag = 0;
                     this.ductibleRate = "";

+ 10 - 3
tenant/insurance/quotation-huanong/src/main/java/com/jzg/quotation/huanong/crawler/service/impl/HuaNongCrawlerRequestImpl.java

@@ -13,6 +13,8 @@ import com.jzg.commons.entity.quote.vo.identify.ReinsuranceCaptchaVo;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.commons.service.ExteriorUtilsRequest;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
@@ -63,6 +65,11 @@ public class HuaNongCrawlerRequestImpl implements HuaNongCrawlerRequest {
         huaNongCrawlerQuoteProcessService.login(loginBase.getUsername(), loginBase.getPassword(), null, true);
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         String username = detectLoginRequest.getUsername();
@@ -331,13 +338,13 @@ public class HuaNongCrawlerRequestImpl implements HuaNongCrawlerRequest {
 
         response = processDuplicateInsurance(request, response, httpHeaders);
 
-        boolean stillDuplicate = hasDuplicateInsurance(response);
+        /*boolean stillDuplicate = hasDuplicateInsurance(response);
         if (stillDuplicate) {
             log.info("第一次重试后仍存在重复投保,日期向后推迟一天进行第二次重试");
             response = processDuplicateInsuranceWithOneMoreDay(request, response, httpHeaders);
-        }
+        }*/
 
-        return checkAndHandleRemainingDuplicate(response, false);
+        return checkAndHandleRemainingDuplicate(response, true);
     }
 
     private HuaNongCrawlerQuotedPriceResponse processDuplicateInsurance(

+ 5 - 4
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/component/HtCrawlerRequestComponent.java

@@ -15,6 +15,7 @@ import com.jzg.quotation.huatai.crawler.entity.dto.LoginDTO;
 import com.jzg.quotation.huatai.crawler.properties.HuaTaiCrawlerProperties;
 import com.jzg.quotation.commons.utils.HtEncryptDecryptUtils;
 import com.jzg.quotation.huatai.crawler.util.CookieUtils;
+import com.jzg.quotation.huatai.crawler.util.CryptoUtil;
 import com.jzg.quotation.huatai.crawler.util.HuaTaiCryptUtil;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -156,8 +157,8 @@ public class HtCrawlerRequestComponent {
         log.info("huatai_cookie:{}", cookie);
         ResponseEntity<HtCrawlerCarQueryResponse> carQueryResponseEntity = requestComponent.objectPostWithProxy(RequestUrl.CAR_QUERY.getRequestUrl(huaTaiCrawlerProperties.getBaseUrl()), htCrawlerCarQueryRequest, HtCrawlerCarQueryResponse.class, headers, proxyHostName, proxyPort);
         HtCrawlerCarQueryResponse carQueryResponse = carQueryResponseEntity.getBody();
-        String decryptKey = HuaTaiCryptUtil.RSADecrypt(carQueryResponse.getAccessToken());
-        String decryptData = HuaTaiCryptUtil.AESDecrypt(carQueryResponse.getData(), decryptKey);
+        String decryptKey = CryptoUtil.rsaDecrypt(carQueryResponse.getAccessToken());
+        String decryptData = CryptoUtil.aesDecrypt(carQueryResponse.getData(), decryptKey);
         System.out.println("carQueryResponse::"+JSONObject.parseObject(decryptData, HtCrawlerCarQueryResponse.DataDTO.class).toString());
         return JSONObject.parseObject(decryptData, HtCrawlerCarQueryResponse.DataDTO.class);
     }
@@ -186,8 +187,8 @@ public class HtCrawlerRequestComponent {
         headers.add("Referer", "https://cspxp.pc.ehuatai.com/htcsp/VehicleInfoEntryAction.do?cmd=saveOneStept");
         ResponseEntity<HtCrawlerQuoteResponse> responseEntity = requestComponent.objectPostWithProxy(RequestUrl.QUOTE_PRICE.getRequestUrl(huaTaiCrawlerProperties.getBaseUrl()), htCrawlerQuoteRequest, HtCrawlerQuoteResponse.class, headers, proxyHostName, proxyPort);
         HtCrawlerQuoteResponse quoteResponse = responseEntity.getBody();
-        String decryptKey = HuaTaiCryptUtil.RSADecrypt(quoteResponse.getAccessToken());
-        String decryptData = HuaTaiCryptUtil.AESDecrypt(quoteResponse.getData(), decryptKey);
+        String decryptKey = CryptoUtil.rsaDecrypt(quoteResponse.getAccessToken());
+        String decryptData = CryptoUtil.aesDecrypt(quoteResponse.getData(), decryptKey);
         log.info("HtCrawlerQuoteResponse:{}",JSONObject.toJSONString(quoteResponse));
         return decryptData;
     }

+ 43 - 42
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/entity/Request/HtCrawlerQuoteRequest.java

@@ -35,8 +35,8 @@ public class HtCrawlerQuoteRequest implements Serializable {
     @Serial
     private static final long serialVersionUID = -3648463870224027622L;
 
-    public HtCrawlerQuoteRequest(QuoteVo quoteVo, String mealid, String basePartJSON) {
-        DataDTO dataDTO = new DataDTO(quoteVo, mealid, basePartJSON);
+    public HtCrawlerQuoteRequest(QuoteVo quoteVo, String mealid, String basePartJSON, String personalInsuredJSON) {
+        DataDTO dataDTO = new DataDTO(quoteVo, mealid, basePartJSON, personalInsuredJSON);
         ObjectMapper objectMapper = new ObjectMapper();
         Map<String, Object> dataMap = objectMapper.convertValue(dataDTO, new TypeReference<Map<String, Object>>() {});
 
@@ -68,7 +68,7 @@ public class HtCrawlerQuoteRequest implements Serializable {
         @Serial
         private static final long serialVersionUID = 3131283514749202563L;
 
-        public DataDTO(QuoteVo quoteVo, String mealid, String basePartJSON) {
+        public DataDTO(QuoteVo quoteVo, String mealid, String basePartJSON, String personalInsuredJSON) {
             RiskInfoVo ciRiskInfoVo = quoteVo.getCiRiskInfoVo();
             RiskInfoVo biRiskInfoVo = quoteVo.getBiRiskInfoVo();
             VehicleAndVesselTaxVo taxVo = quoteVo.getVehicleAndVesselTaxVo();
@@ -164,7 +164,7 @@ public class HtCrawlerQuoteRequest implements Serializable {
             this.SYxinxi = "0";
             this.PiLing = "0";
             this.pilingFlag = "2";
-            this.personalInsuredJSON = "";
+            this.personalInsuredJSON = personalInsuredJSON;
             this.relationno_bi = "";
             this.promotesaleplanid = "";
             this.disfeeregmaxbi = "";
@@ -511,32 +511,32 @@ public class HtCrawlerQuoteRequest implements Serializable {
         public static class PersonalInsuredDTO implements Serializable {
             @Serial
             private static final long serialVersionUID = 1729064286503004418L;
-            private String butouflag;
+            private String butouflag = "";
             private String amount;
             private String car_limitloadperson;
-            private String isInsuredPassenger;
+            private String isInsuredPassenger = "0";
             private String productcode;
             private String productname;
             private String mealcode;
             private String mealname;
             private String startdate;
             private String enddate;
-            private String num;
+            private String num = "1";
             private String premium;
             private String formationJudiciary;
-            private String argueJudiciary;
-            private String newCarSalesProvince;
-            private String newCarSalesCity;
-            private String newCarSalesDistrict;
-            private String buildYear;
-            private String xiangxiAddress;
-            private String postalCode;
-            private String bulidTypeCode;
-            private String bulidTypeQiTaMes;
-            private String provinceName;
-            private String cityName;
-            private String regionName;
-            private String isInsuredSizesFlag;
+            private String argueJudiciary = "";
+            private String newCarSalesProvince = "";
+            private String newCarSalesCity = "";
+            private String newCarSalesDistrict = "";
+            private String buildYear = "";
+            private String xiangxiAddress = "";
+            private String postalCode = "";
+            private String bulidTypeCode = "";
+            private String bulidTypeQiTaMes = "";
+            private String provinceName = "";
+            private String cityName = "";
+            private String regionName = "";
+            private String isInsuredSizesFlag = "0";
             private List<PerinsuredDTO> perinsuredList;
 
             @Data
@@ -544,34 +544,35 @@ public class HtCrawlerQuoteRequest implements Serializable {
                 @Serial
                 private static final long serialVersionUID = 4914844581040597499L;
                 private String productcode;
-                private String mark;
+                private String mark = "1";
                 private String insuredname;
                 private String certitype;
                 private String certicode;
                 private String age;
                 private String gender;
-                private String perProWithCarStartDate;
+                private String perProWithCarStartDate = "";
+                private String perProWithCarEndDate = "";
                 private String relation;
-                private String job;
-                private String parentcode;
-                private String parentname;
-                private String parametercode;
-                private String parametername;
-                private String codecode;
-                private String codecname;
-                private String risktype;
-                private String jobtype;
-                private String customerno;
-                private String workname;
-                private String workphone;
-                private String yearmoney;
-                private String workaddress;
-                private String otherphone;
-                private String otheraddress;
-                private String mobile;
-                private String urgentname;
-                private String urgentmobile;
-                private String nationality;
+                private String job = "";
+                private String parentcode = "";
+                private String parentname = "";
+                private String parametercode = "";
+                private String parametername = "";
+                private String codecode = "";
+                private String codecname = "";
+                private String risktype = "";
+                private String jobtype = "";
+                private String customerno = "";
+                private String workname = "";
+                private String workphone = "";
+                private String yearmoney = "";
+                private String workaddress = "";
+                private String otherphone = "";
+                private String otheraddress = "";
+                private String mobile = "";
+                private String urgentname = "";
+                private String urgentmobile = "";
+                private String nationality = "CHN";
             }
         }
 

+ 164 - 111
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/service/Impl/HuaTaiCrawlerRequestImpl.java

@@ -5,18 +5,24 @@ import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.jzg.commons.constants.ProductsType;
 import com.jzg.commons.constants.dict.InsOrderStatusEnum;
+import com.jzg.commons.core.page.HttpResult;
+import com.jzg.commons.entity.po.jyxSetting;
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
 import com.jzg.commons.entity.quote.vo.CarInfoVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.entity.quote.vo.aggregated.*;
+import com.jzg.commons.entity.vo.JyxConfigVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.StringUtils;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
+import com.jzg.quotation.commons.client.PlatformClient;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.commons.entity.quote.vo.base.OrderBase;
 import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.commons.utils.HtEncryptDecryptUtils;
@@ -68,6 +74,7 @@ import java.security.cert.X509Certificate;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
+import java.util.concurrent.atomic.AtomicReference;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -89,6 +96,8 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
 
     private final HtCrawlerOrderService htCrawlerOrderService;
 
+    private final PlatformClient platformClient;
+
     @Value("${huatai.api.username}")
     private String username;
 
@@ -98,8 +107,6 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
     @Value("${huatai.api.comcode}")
     private String comcode;
 
-    private String basePartJSON = "";
-
     // 特殊账号列表
     private final List<String> specialUsers = Arrays.asList(
             "EA27000180", "EA27000401", "EA27000098", "EA27000076",
@@ -107,7 +114,7 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
             "EA27000381", "EA27000394", "XN9279003"
     );
 
-    private final ObjectMapper objectMapper = new ObjectMapper();
+    private static final ObjectMapper objectMapper = new ObjectMapper();
 
     private Map<String, Object> gsInfo = new HashMap<>();
 
@@ -122,6 +129,11 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
 
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
   public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         String username = detectLoginRequest.getUsername();
@@ -426,6 +438,8 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
     @NotNull
     private Result2 getResult2(QuoteVo quoteVo, int retryCount, int maxRetries, boolean success, Result result, String quotationNo, LoginDTO loginDTO, Map<String, Object> gsInfo, String cookie, HtCrawlerQuoteResponse.DataDTO quoteResponseData, AttributionInformationVo attributionInformationVo) {
         HttpHeaders headers2;
+        String basePartJSON = "";
+        String personalInsuredJSONString = "";
         String fcPrice = "";
         while (retryCount < maxRetries && !success) {
             try {
@@ -457,11 +471,97 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
                 String mealid = "";
                 if (mealidMatcher.find()) {
                     mealid = mealidMatcher.group(1);
-                    System.out.println("mealid::"+mealid);
+                    System.out.println("mealid::" + mealid);
                 }
 
                 //报价第二步
-                HtCrawlerQuoteRequest htCrawlerQuoteRequest = new HtCrawlerQuoteRequest(quoteVo, mealid, basePartJSON);
+                //如果有驾意险
+                List<Map<String, Object>> personalInsuredJSON = new ArrayList<>();
+                List<Map<String, Object>> perinsuredList = new ArrayList<>();
+                if (quoteVo.getAccidentalDrivings() != null && !quoteVo.getAccidentalDrivings().isEmpty()) {
+                    AtomicReference<jyxSetting> setting = new AtomicReference<>(new jyxSetting());
+                    AtomicReference<JyxConfigVo> jyxConfigVo = new AtomicReference<>(new JyxConfigVo());
+                    quoteVo.getAccidentalDrivings().forEach(drivingDTO -> {
+                        // 查询jyx_config表,拿到总保额和总保费
+                        HttpResult<JyxConfigVo> jyxConfigVoHttpResult = platformClient.jyxConfigGetById(drivingDTO.getId());
+                        jyxConfigVo.set(jyxConfigVoHttpResult.getData());
+                        setting.set(jyxConfigVo.get().getSettingList().stream()
+                                .filter(s -> s.getSeats() == Integer.parseInt(quoteVo.getCarInfoVo().getSeatCount()))
+                                .findFirst()
+                                .orElse(null));
+                        String productCode = jyxConfigVo.get().getParentProductCode();
+                        Map<String, Object> insuredInfo = new HashMap<>();
+                        //insuredInfo.put("allQuantity", "");
+                        //insuredInfo.put("planName", "");
+                        insuredInfo.put("productcode", StringUtils.isEmpty(productCode) ? "E007" : productCode);
+                        insuredInfo.put("mark", "1");
+                        insuredInfo.put("insuredname", quoteVo.getInsuredPersonInfo().getName());
+                        insuredInfo.put("certitype", "01");
+                        insuredInfo.put("certicode", quoteVo.getInsuredPersonInfo().getIdentifyNumber());
+                        insuredInfo.put("age", quoteVo.getInsuredPersonInfo().getBirthday().substring(0, 10));//quoteVo.getInsuredPersonInfo().getAge()
+                        insuredInfo.put("gender", quoteVo.getInsuredPersonInfo().getGender());
+                        insuredInfo.put("perProWithCarStartDate", "");
+                        insuredInfo.put("perProWithCarEndDate", "");
+                        insuredInfo.put("relation", quoteVo.getOwnersInfo().getName().equals(quoteVo.getInsuredPersonInfo().getName()) ? "00" : "99");
+                        insuredInfo.put("job", "");
+                        insuredInfo.put("parentcode", "");
+                        insuredInfo.put("parentname", "");
+                        insuredInfo.put("parametercode", "");
+                        insuredInfo.put("parametername", "");
+                        insuredInfo.put("codecode", "");
+                        insuredInfo.put("codecname", "");
+                        insuredInfo.put("risktype", "");
+                        insuredInfo.put("jobtype", "");
+                        insuredInfo.put("customerno", "");
+                        insuredInfo.put("workname", "");
+                        insuredInfo.put("workphone", "");
+                        insuredInfo.put("yearmoney", "");
+                        insuredInfo.put("workaddress", "");
+                        insuredInfo.put("otherphone", "");
+                        insuredInfo.put("otheraddress", "");
+                        insuredInfo.put("mobile", "");
+                        insuredInfo.put("urgentname", "");
+                        insuredInfo.put("urgentmobile", "");
+                        insuredInfo.put("nationality", "CHN");
+
+                        perinsuredList.add(insuredInfo);
+                    });
+                    Map<String, Object> accidentalDriving = new HashMap<>();
+                    accidentalDriving.put("butouflag", "");
+                    accidentalDriving.put("amount", setting.get().getCoverage() == null ? "" : setting.get().getCoverage().toString().replace(".00", ""));
+                    accidentalDriving.put("car_limitloadperson", StringUtils.isBlank(String.valueOf(setting.get().getSeats())) ? "" : setting.get().getSeats());
+                    accidentalDriving.put("isInsuredPassenger", "");
+                    accidentalDriving.put("productcode", jyxConfigVo.get().getParentProductCode());
+                    accidentalDriving.put("productname", "");//"“百万驾乘”意外伤害保险"
+                    accidentalDriving.put("mealcode", jyxConfigVo.get().getProductCode());//jyxConfigVo.get().getProductCode()
+                    accidentalDriving.put("mealname", "");//jyxConfigVo.get().getProductName()  //"经济款"
+                    accidentalDriving.put("startdate", quoteVo.getCiRiskInfoVo().getStartDate());
+                    accidentalDriving.put("enddate", quoteVo.getCiRiskInfoVo().getStartDate().replace("2026", "2027"));//quoteVo.getCiRiskInfoVo().getEndDate()
+                    accidentalDriving.put("num", "1");
+                    accidentalDriving.put("premium", setting.get().getPremium() == null ? "" : setting.get().getPremium().toString().replace(".00", ".0"));
+                    accidentalDriving.put("formationJudiciary", "");
+                    accidentalDriving.put("argueJudiciary", "");
+                    accidentalDriving.put("newCarSalesProvince", "");
+                    accidentalDriving.put("newCarSalesCity", "");
+                    accidentalDriving.put("newCarSalesDistrict", "");
+                    accidentalDriving.put("buildYear", "");
+                    accidentalDriving.put("xiangxiAddress", "");
+                    accidentalDriving.put("postalCode", "");
+                    accidentalDriving.put("bulidTypeCode", "");
+                    accidentalDriving.put("bulidTypeQiTaMes", "");
+                    accidentalDriving.put("provinceName", "");
+                    accidentalDriving.put("cityName", "");
+                    accidentalDriving.put("regionName", "");
+                    accidentalDriving.put("isInsuredSizesFlag", "0");
+                    accidentalDriving.put("perinsuredList", perinsuredList);
+                    accidentalDriving.put("car_limitloadperson", quoteVo.getCarInfoVo().getSeatCount());
+                    accidentalDriving.put("startdate", quoteVo.getCiRiskInfoVo().getStartDate());
+                    accidentalDriving.put("enddate", quoteVo.getCiRiskInfoVo().getEndDate());
+                    personalInsuredJSON.add(accidentalDriving);
+
+                    personalInsuredJSONString = JSONObject.toJSONString(personalInsuredJSON);
+                }
+                HtCrawlerQuoteRequest htCrawlerQuoteRequest = new HtCrawlerQuoteRequest(quoteVo, mealid, basePartJSON, personalInsuredJSONString);
                 headers2 = new HttpHeaders();
                 headers2.add(HtRequestConstant.COOKIE, cookie);
                 headers2.add("Accept", "*/*");
@@ -476,39 +576,38 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
                 headers2.add("X-Requested-With", "XMLHttpRequest");
 
                 String decryptData = htCrawlerRequestComponent.quote(htCrawlerQuoteRequest, headers2);
-                //System.out.println("decryptData::HtCrawlerQuoteResponse::"+decryptData);
-                if(decryptData.contains("errrorFlag") && decryptData.contains("carChange")) {//请修改新车购置价
+                if (decryptData.contains("errrorFlag") && decryptData.contains("carChange")) {//请修改新车购置价
                     //重新获取车型
                     //throw new RuntimeException("请修改新车购置价/重新获取车型");
                     retryCount = maxRetries + 1;
                     HtCrawlerQuoteResponse.DataErrDTO dataErr = JSONObject.parseObject(decryptData, HtCrawlerQuoteResponse.DataErrDTO.class);
-                    throw new RuntimeException("报价失败:"+dataErr.getErroeInfo().substring(dataErr.getErroeInfo().indexOf("中国")));
+                    throw new RuntimeException("报价失败:" + dataErr.getErroeInfo().substring(dataErr.getErroeInfo().indexOf("中国")));
                 }
 
-                if(decryptData.contains("erroeInfo") && decryptData.contains("投保查询校验信息不存在或已经校验成功")) {
+                if (decryptData.contains("erroeInfo") && decryptData.contains("投保查询校验信息不存在或已经校验成功")) {
                     //投保查询校验信息不存在或已经校验成功
                     //throw new RuntimeException("投保查询校验信息不存在或已经校验成功");
                     retryCount = maxRetries + 1;
                     HtCrawlerQuoteResponse.DataErrDTO dataErr = JSONObject.parseObject(decryptData, HtCrawlerQuoteResponse.DataErrDTO.class);
-                    throw new RuntimeException("报价失败:"+dataErr.getErroeInfo().substring(dataErr.getErroeInfo().indexOf("中国")));
+                    throw new RuntimeException("报价失败:" + dataErr.getErroeInfo().substring(dataErr.getErroeInfo().indexOf("中国")));
                 }
 
-                if(decryptData.contains("erroeInfo") && decryptData.contains("起保日期必须在当前日期的30天范围内")) {
+                if (decryptData.contains("erroeInfo") && decryptData.contains("起保日期必须在当前日期的30天范围内")) {
                     //投保查询校验信息不存在或已经校验成功
                     //throw new RuntimeException("起保日期必须在当前日期的30天范围内");
                     retryCount = maxRetries + 1;
                     HtCrawlerQuoteResponse.DataErrDTO dataErr = JSONObject.parseObject(decryptData, HtCrawlerQuoteResponse.DataErrDTO.class);
-                    throw new RuntimeException("报价失败:"+dataErr.getErroeInfo().substring(dataErr.getErroeInfo().indexOf("中国")));
+                    throw new RuntimeException("报价失败:" + dataErr.getErroeInfo().substring(dataErr.getErroeInfo().indexOf("中国")));
                 }
                 //晋AB8H22存在有效交强险保单,请核实保期进入续保期后再进行投保。
                 //{"erroeInfo":"投保业务:投保业务:中国银保信交强险平台友情提示:号牌号码“晋AB8H22”的保单发生重复投保,与其重复投保的本公司的保单信息如下:车架号 LGWEF4A54HF017616;发动机号 1725032719;地区 山西。","erroeType":"01","errrorFlag":"true"}
-                if(decryptData.contains("erroeInfo") && decryptData.contains("发生重复投保") && !decryptData.contains("终保日期")) {
+                if (decryptData.contains("erroeInfo") && decryptData.contains("发生重复投保") && !decryptData.contains("终保日期")) {
                     retryCount = maxRetries + 1;
                     HtCrawlerQuoteResponse.DataErrDTO dataErr = JSONObject.parseObject(decryptData, HtCrawlerQuoteResponse.DataErrDTO.class);
-                    throw new RuntimeException("报价失败:"+dataErr.getErroeInfo().substring(dataErr.getErroeInfo().indexOf("中国")));
+                    throw new RuntimeException("报价失败:" + dataErr.getErroeInfo().substring(dataErr.getErroeInfo().indexOf("中国")));
                 }
 
-                if((decryptData.contains("erroeInfo") && decryptData.contains("发生重复投保") && decryptData.contains("终保日期")) || decryptData.contains("录入的校验码有误")) {
+                if ((decryptData.contains("erroeInfo") && decryptData.contains("发生重复投保") && decryptData.contains("终保日期")) || decryptData.contains("录入的校验码有误")) {
                     HtCrawlerQuoteResponse.DataErrDTO dataErrDTO = JSONObject.parseObject(decryptData, HtCrawlerQuoteResponse.DataErrDTO.class);
                     //{
                     //    "erroeInfo" : "投保业务:投保业务:中国银保信交强险平台友情提示:号牌号码“晋AQ93G8”的保单发生重复投保,与其重复投保的其它公司的保单信息如下:投保确认码 02HBIC140025061888945034991892;保单号 H070503080120250028429;起保日期 2025-06-03 18:49;终保日期 2026-06-03 18:49;号牌号码 晋AQ93G8;号牌种类 02;车架号 LSVCH6A43DN070172;发动机号 U01490;地区 山西。",
@@ -521,7 +620,7 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
 
                     if (matcher.find()) {
                         String endDate = matcher.group(1).trim();
-                        String startDate = endDate+":00";
+                        String startDate = endDate + ":00";
                         quoteVo.getCiRiskInfoVo().setStartDate(startDate);
                         try {
                             LocalDateTime dateTime = LocalDateTime.parse(
@@ -542,102 +641,51 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
                     }
                 }
 
-                if(decryptData.contains("erroeInfo")) {
+                if (decryptData.contains("erroeInfo")) {
                     //投保查询校验信息不存在或已经校验成功
                     //throw new RuntimeException("投保查询校验信息不存在或已经校验成功");
-                    HtCrawlerQuoteResponse.DataErrDTO dataErr = JSONObject.parseObject(decryptData, HtCrawlerQuoteResponse.DataErrDTO.class);
-                    throw new RuntimeException("报价失败:"+dataErr.getErroeInfo().substring(dataErr.getErroeInfo().indexOf("中国")));
+                    Map<String, Object> dataErr = JSONObject.parseObject(decryptData, Map.class);
+                    throw new RuntimeException("报价失败:" + dataErr.get("erroeInfo").toString());
                 }
 
-                quoteResponseData = getDataDTO(quoteVo, decryptData, mealid, headers2);
+                quoteResponseData = getDataDTO(quoteVo, decryptData, mealid, headers2, basePartJSON, personalInsuredJSONString);
 
-                if(quoteResponseData.getApplicationdto() != null) {
+                if (quoteResponseData.getApplicationdto() != null) {
                     success = true;
 
                     // 调用非车险保费接口
-                    //HttpHeaders fcHeaders = new HttpHeaders();
-                    //fcHeaders.add(HtRequestConstant.COOKIE, cookie);
-                    //fcHeaders.add("Accept", "*/*");
-                    //fcHeaders.add("Accept-Language", "zh-CN,zh;q=0.9");
-                    //fcHeaders.add("Connection", "keep-alive");
-                    //fcHeaders.add("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
-                    //fcHeaders.add("Origin", "https://cspxp.pc.ehuatai.com");
-                    //fcHeaders.add("Referer", "https://cspxp.pc.ehuatai.com/htcsp/VehicleInfoEntryAction.do?cmd=saveOneStept");
-                    //fcHeaders.add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36");
-                    //fcHeaders.add("X-Requested-With", "XMLHttpRequest");
-//
-                    //MultiValueMap<String, String> fcData = new LinkedMultiValueMap<>();
-//
-                    //List<Map<String, Object>> personalInsuredJSON = new ArrayList<>();
-                    //List<Map<String, Object>> perinsuredList = new ArrayList<>();
-                    ////String productcode = accidentalDriving.get("productcode") != null ? accidentalDriving.get("productcode").toString() : "";
-//
-                    //Map<String, Object> insuredInfo = new HashMap<>();
-                    //insuredInfo.put("allQuantity", "");
-                    //insuredInfo.put("planName", "");
-                    //insuredInfo.put("productcode", "E007");//StringUtils.isEmpty(productcode) ? "E007" : productcode
-                    //insuredInfo.put("mark", "1");
-                    //insuredInfo.put("insuredname", quoteVo.getInsuredPersonInfo().getName());
-                    //insuredInfo.put("certitype", "01");
-                    //insuredInfo.put("certicode", quoteVo.getInsuredPersonInfo().getIdentifyNumber());
-                    //insuredInfo.put("age", quoteVo.getInsuredPersonInfo().getAge());
-                    //insuredInfo.put("gender", quoteVo.getInsuredPersonInfo().getGender());
-                    //insuredInfo.put("perProWithCarStartDate", "");
-                    //insuredInfo.put("perProWithCarEndDate", "");
-                    //insuredInfo.put("relation", quoteVo.getOwnersInfo().getName().equals(quoteVo.getInsuredPersonInfo().getIdentifyNumber()) ? "00" : "99");
-                    //insuredInfo.put("job", "");
-                    //insuredInfo.put("parentcode", "");
-                    //insuredInfo.put("parentname", "");
-                    //insuredInfo.put("parametercode", "");
-                    //insuredInfo.put("parametername", "");
-                    //insuredInfo.put("codecode", "");
-                    //insuredInfo.put("codecname", "");
-                    //insuredInfo.put("risktype", "");
-                    //insuredInfo.put("jobtype", "");
-                    //insuredInfo.put("customerno", "");
-                    //insuredInfo.put("workname", "");
-                    //insuredInfo.put("workphone", "");
-                    //insuredInfo.put("yearmoney", "");
-                    //insuredInfo.put("workaddress", "");
-                    //insuredInfo.put("otherphone", "");
-                    //insuredInfo.put("otheraddress", "");
-                    //insuredInfo.put("mobile", "");
-                    //insuredInfo.put("urgentname", "");
-                    //insuredInfo.put("urgentmobile", "");
-                    //insuredInfo.put("nationality", "CHN");
-//
-                    //perinsuredList.add(insuredInfo);
-                    //Map<String, Object> accidentalDriving = new HashMap<>();
-                    //accidentalDriving.put("perinsuredList", perinsuredList);
-                    //accidentalDriving.put("car_limitloadperson", quoteVo.getCarInfoVo().getSeatCount());
-                    //accidentalDriving.put("startdate", quoteVo.getCiRiskInfoVo().getStartDate());
-                    //accidentalDriving.put("enddate", quoteVo.getCiRiskInfoVo().getEndDate());
-                    //personalInsuredJSON.add(accidentalDriving);
-//
-                    //String personalInsuredJSONStr = JSONObject.toJSONString(personalInsuredJSON);
-                    //fcData.add("personalInsuredJSON", personalInsuredJSONStr);
-                    //fcData.add("noCarProductMes", "");
-                    //fcData.add("quotationNo", quotationNo);
-                    //fcData.add("comCode", attributionInformationVo.getConfigInfo().get("comCode").toString());
-                    //fcData.add("handToCount43T3_903", "");
-                    //fcData.add("isCheckFlag", "1");
-//
-                    //HttpEntity<MultiValueMap<String, String>> fcRequestEntity = new HttpEntity<>(fcData, fcHeaders);
-//
-                    //ResponseEntity<String> fcResponse = getRestTemplate().postForEntity(
-                    //        "https://cspxp.pc.ehuatai.com/htcsp/QuotedPriceAction.do?cmd=getNoCarPreimum",
-                    //        fcRequestEntity,
-                    //        String.class
-                    //);
-//
-                    //JSONObject fcResponseJson = JSONObject.parseObject(fcResponse.getBody());
-                    //System.out.println("fcResponseJson"+JSONObject.toJSONString(fcResponseJson));
-                    //fcPrice = fcResponseJson.getString("premium");
-//
-                    //if (fcPrice == null || fcPrice.isEmpty()) {
-                    //    String fcMessage = fcResponseJson.getString("errormes");
-                    //    System.out.println("非车险保费获取失败: " + fcMessage);
-                    //}
+                    if (quoteVo.getAccidentalDrivings() != null && quoteVo.getAccidentalDrivings().size() > 0) {
+
+                        HttpHeaders fcHeaders = new HttpHeaders();
+                        fcHeaders.add(HtRequestConstant.COOKIE, cookie);
+                        fcHeaders.add("Accept", "*/*");
+                        fcHeaders.add("Accept-Language", "zh-CN,zh;q=0.9");
+                        fcHeaders.add("Connection", "keep-alive");
+                        fcHeaders.add("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+                        fcHeaders.add("Origin", "https://cspxp.pc.ehuatai.com");
+                        fcHeaders.add("Referer", "https://cspxp.pc.ehuatai.com/htcsp/VehicleInfoEntryAction.do?cmd=saveOneStept");
+                        fcHeaders.add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36");
+                        fcHeaders.add("X-Requested-With", "XMLHttpRequest");
+
+                        MultiValueMap<String, String> fcData = new LinkedMultiValueMap<>();
+                        fcData.add("noCarProductMes", personalInsuredJSONString);
+                        fcData.add("quotationNo", quotationNo);
+                        fcData.add("comCode", attributionInformationVo.getConfigInfo().get("comCode").toString());
+                        fcData.add("handToCount43T3_903", "");
+                        fcData.add("isCheckFlag", "1");
+
+                        HttpEntity<MultiValueMap<String, String>> fcRequestEntity = new HttpEntity<>(fcData, fcHeaders);
+
+                        ResponseEntity<String> fcResponse = getRestTemplate().postForEntity(
+                                "https://cspxp.pc.ehuatai.com/htcsp/QuotedPriceAction.do?cmd=getNoCarPreimum",
+                                fcRequestEntity,
+                                String.class
+                        );
+                        System.out.println("fcResponse.getBody()::" + fcResponse.getBody());
+                        Map<String, Object> res = objectMapper.readValue(fcResponse.getBody(), HashMap.class);
+
+                        fcPrice = res.get("premium") == null ? "" : res.get("premium").toString();
+                    }
                 } else {
                     retryCount++;
                     System.out.println("quoteResponseData.getApplicationdto() 为 null,第 " + retryCount + " 次重试...");
@@ -687,7 +735,7 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
     }
 
     @NotNull
-    private HtCrawlerQuoteResponse.DataDTO getDataDTO(QuoteVo quoteVo, String decryptData, String mealid, HttpHeaders headers2) throws Exception {
+    private HtCrawlerQuoteResponse.DataDTO getDataDTO(QuoteVo quoteVo, String decryptData, String mealid, HttpHeaders headers2, String basePartJSON, String personalInsuredJSONString) throws Exception {
         HtCrawlerQuoteResponse.DataDTO quoteResponseData;
         HtCrawlerQuoteRequest htCrawlerQuoteRequest;
         quoteResponseData = JSONObject.parseObject(decryptData, HtCrawlerQuoteResponse.DataDTO.class);
@@ -699,7 +747,7 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
             String riskfalg = "0".equals(querrysequenceno.substring(0, 1)) ? "0" : "1";//.equals(querrysequenceno) ? "0" : "1"
 
             basePartJSON = "[{'riskfalg':'"+riskfalg+"','checktype':2,'querysequenceno':'"+querrysequenceno+"','checkcode':'"+autocheckcode+"','answer':''}]";
-            htCrawlerQuoteRequest = new HtCrawlerQuoteRequest(quoteVo, mealid, basePartJSON);
+            htCrawlerQuoteRequest = new HtCrawlerQuoteRequest(quoteVo, mealid, basePartJSON, personalInsuredJSONString);
             decryptData = htCrawlerRequestComponent.quote(htCrawlerQuoteRequest, headers2);
             System.out.println("quoteResponseData:1:"+JSONObject.toJSONString(decryptData));
             quoteResponseData = JSONObject.parseObject(decryptData, HtCrawlerQuoteResponse.DataDTO.class);
@@ -715,9 +763,9 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
             HtCrawlerQuoteResponse.DataDTO.BasePartDTOListDTO.BasePartDTO basePartDTO1 = quoteResponseData.getBasepartdtolist().getBasepartdto().get(1);
             String querrysequenceno1 = basePartDTO1.getQuerrysequenceno();
             String autocheckcode1 = basePartDTO1.getAutocheckcode();
-            String basePartJSON = "[{'riskfalg':'0','checktype':2,'querysequenceno':'"+querrysequenceno1+"','checkcode':'"+autocheckcode1+"','answer':''}," +
+            basePartJSON = "[{'riskfalg':'0','checktype':2,'querysequenceno':'"+querrysequenceno1+"','checkcode':'"+autocheckcode1+"','answer':''}," +
                                    "{'riskfalg':'1','checktype':2,'querysequenceno':'"+querrysequenceno+"','checkcode':'"+autocheckcode+"','answer':''}]";
-            htCrawlerQuoteRequest = new HtCrawlerQuoteRequest(quoteVo, mealid, basePartJSON);
+            htCrawlerQuoteRequest = new HtCrawlerQuoteRequest(quoteVo, mealid, basePartJSON, personalInsuredJSONString);
             decryptData = htCrawlerRequestComponent.quote(htCrawlerQuoteRequest, headers2);
             System.out.println("quoteResponseData:2:"+JSONObject.toJSONString(decryptData));
             quoteResponseData = JSONObject.parseObject(decryptData, HtCrawlerQuoteResponse.DataDTO.class);
@@ -732,10 +780,10 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
             HtCrawlerQuoteResponse.DataDTO.BasePartDTOListDTO.BasePartDTO basePartDTO2 = quoteResponseData.getBasepartdtolist().getBasepartdto().get(1);
             String querrysequenceno2 = basePartDTO2.getQuerrysequenceno();
             String autocheckcode2 = basePartDTO2.getAutocheckcode();
-            String basePartJSON = "[{'riskfalg':'0','checktype':2,'querysequenceno':'"+querrysequenceno1+"','checkcode':'"+autocheckcode1+"','answer':''}," +
+            basePartJSON = "[{'riskfalg':'0','checktype':2,'querysequenceno':'"+querrysequenceno1+"','checkcode':'"+autocheckcode1+"','answer':''}," +
                                    "{'riskfalg':'1','checktype':2,'querysequenceno':'"+querrysequenceno+"','checkcode':'"+autocheckcode+"','answer':''}," +
                                    "{'riskfalg':'2','checktype':2,'querysequenceno':'"+querrysequenceno2+"','checkcode':'"+autocheckcode2+"','answer':''}]";
-            htCrawlerQuoteRequest = new HtCrawlerQuoteRequest(quoteVo, mealid, basePartJSON);
+            htCrawlerQuoteRequest = new HtCrawlerQuoteRequest(quoteVo, mealid, basePartJSON, personalInsuredJSONString);
             decryptData = htCrawlerRequestComponent.quote(htCrawlerQuoteRequest, headers2);
             System.out.println("quoteResponseData:3:"+JSONObject.toJSONString(decryptData));
             quoteResponseData = JSONObject.parseObject(decryptData, HtCrawlerQuoteResponse.DataDTO.class);
@@ -1346,6 +1394,11 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
     }
 
     public static void main(String[] args) throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+        map.put("accessToken", "fhEhAev4XHQyX7jQddYAURPArSOq5RSaE/nNtCu7mXC+APlSBeIzPHX3TJJULnROwnHkUhYy/M1PsXldVq0ZhMPs9pCB3Um1V3xcjVacYMer6k59s3I/np35FCAg7p/f6V0GPTX2kA0ZW0qZGE0xbiJtlxSwJ4ORNC0E/o0K6dY=");
+        map.put("data", "OqQ0kxg3UWV18BXBVcNrAsdB2CCMMO39VgAq7YQGnLpb9A9Gppj9GxjG4c9VNdX5M9zRYYWWscj5KYWEIWWkeAkzkt8oWkmI/VYuMikExadzN1IpMrdIKIkhJRd4R7UD");
+        decrypt(map);
 //        String token="Wr6ZGWsDqfdccgGXUBkCzMgySSw/ORJj6ZJfBqhEmmz6ku//ZQaYpUDN6/95kOYFolfIGogncftA/k4PeRKtMe5RvifZgesN6HZFm4tZNssod/XQR4lESSSeJN67i3kTda2BYkMJDVCbNMp3nUkuYoxtqthkWKoBaA1wk5fYkdk=";
 //        String data="vdWlTgo4OLFgkDJoTjBy3nMWXugJwXB/QA777snMrLMy9ruEqWXYCwDq0HBizp/dbnrU8A2whRpJLXhDrkcS1omgdDUPnhu7EoI06wV267Dtw9bJc1JUky6O5DdRRGioq5isZeXjQbFr2YhbIaxa33G30JdgH365wL963lSSr97WMFRij7elYm9HxGrnqjJ3LBcQxlsOj9Xdi+wHSEZuH/C7xO8qOVWWLaAS78uPjbyfmsfl3dXsAGTldxQ1dl8q6BKTr38qfRQdAcoKFNsEid8Gt01nzG3NmwvfAL0xQu7mzbqpdywla6JFGmtxrdmF2ImfNBvRp7cAf4g7A1UhJDOYNZO2dNC6Irhn2sDM5vRYEfvcG03O1+Zaq6AxSazAI/whs772/IUsKiYlsAt/DE02afl6K7pZBXloAEmIoj9/CWAyOfFNBSnyEPFd3Qf9O9eFFiy+B2snJ7e4izaBDadMsB9ByglraMvyzhcPL3fmmFdfv8wM66gv6Ch8nARXU7GlKNiM35aP+627QPc5UMy7HkIB89/TTqamMMJgqgU=";
 
@@ -1430,7 +1483,7 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
         return makeInputData;
     }
 
-    public Map<String, Object> decrypt(Map<String, Object> x) throws Exception {
+    public static Map<String, Object> decrypt(Map<String, Object> x) throws Exception {
         String accessToken = (String) x.get("accessToken");
         String data = (String) x.get("data");
         String aesKey = CryptoUtil.rsaDecrypt(accessToken);

+ 7 - 0
tenant/insurance/quotation-renbao/src/main/java/com/jzg/quotation/renbao/crawler/service/impl/RenBaoCrawlerRequestImpl.java

@@ -8,6 +8,8 @@ import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.renbao.crawler.component.RenBaoCrawlerRequestComponent;
 import com.jzg.quotation.renbao.crawler.constant.enums.ClauseTypeEnum;
 import com.jzg.quotation.renbao.crawler.entity.dto.PrpCinsuredsDTO;
@@ -38,6 +40,11 @@ public class RenBaoCrawlerRequestImpl implements RenBaoCrawlerRequest {
 
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
   public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         String username = detectLoginRequest.getUsername();

+ 7 - 0
tenant/insurance/quotation-renbaonew/src/main/java/com/jzg/quotation/renbaonew/crawler/service/impl/RenBaoNewCrawlerRequestImpl.java

@@ -10,6 +10,8 @@ import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.renbaonew.crawler.component.RenBaoNewCrawlerCacheComponent;
 import com.jzg.quotation.renbaonew.crawler.component.RenBaoNewCrawlerRequestComponent;
@@ -66,6 +68,11 @@ public class RenBaoNewCrawlerRequestImpl implements RenBaoNewCrawlerRequest {
         getTokenService.getToken(loginBase.getUsername(), loginBase.getPassword());
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         return getTokenService.detectLogin(detectLoginRequest);

+ 7 - 0
tenant/insurance/quotation-shenneng/src/main/java/com/jzg/quotation/shenneng/crawler/service/impl/ShenNengCrawlerRequestImpl.java

@@ -6,6 +6,8 @@ import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.shenneng.crawler.service.ShenNengCrawlerLoginService;
 import com.jzg.quotation.shenneng.crawler.service.ShenNengCrawlerRequest;
 import lombok.RequiredArgsConstructor;
@@ -22,6 +24,11 @@ public class ShenNengCrawlerRequestImpl implements ShenNengCrawlerRequest {
         shenNengCrawlerLoginService.login(loginBase.getUsername(), loginBase.getPassword());
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         return shenNengCrawlerLoginService.detectLogin(detectLoginRequest);

+ 10 - 2
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java

@@ -40,6 +40,7 @@ import com.jzg.quotation.commons.client.PlatformClient;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
 import com.jzg.quotation.commons.entity.GetCaptchaRequest;
 import com.jzg.quotation.commons.service.QuotationBaseService;
+import com.jzg.quotation.commons.service.QuotationCrawlerBaseService;
 import com.jzg.quotation.commons.utils.SnowFlakeUtil;
 import com.jzg.quotation.guoren.crawler.service.GuoRenCrawlerRequest;
 import com.jzg.quotation.summary.aop.AuditVerification;
@@ -1001,14 +1002,21 @@ public class UnifyOrderManager {
     @PostMapping("guoRenlogin")
     @Operation(summary = "国任登录")
     public HttpResult guoRenlogin(@RequestBody LoginBase loginBase) {
-        guoRenCrawlerRequest.login(loginBase);
+//        guoRenCrawlerRequest.login(loginBase);
+//        return HttpResult.ok();
+
+        QuotationCrawlerBaseService loginService = companyFactory.getLoginService(loginBase);
+
+        loginService.login(loginBase);
         return HttpResult.ok();
     }
 
     @PostMapping("getGuoRenCaptcha")
     @Operation(summary = "国任登录验证码")
     public HttpResult getGuoRenCaptcha(@RequestBody GetCaptchaRequest sendCaptchaRequest) {
-        return HttpResult.ok(guoRenCrawlerRequest.getCaptcha(sendCaptchaRequest));
+        QuotationCrawlerBaseService captchaService = companyFactory.getCaptchaService(sendCaptchaRequest);
+        //return HttpResult.ok(guoRenCrawlerRequest.getCaptcha(sendCaptchaRequest));
+        return HttpResult.ok(captchaService.getCaptcha(sendCaptchaRequest));
     }
 
     @PostMapping("/detectLogin")

+ 34 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/CompanyFactory.java

@@ -10,12 +10,14 @@ import com.jzg.commons.entity.orders.po.*;
 import com.jzg.commons.entity.po.EsmInsCompany;
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
 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.AssertionUtils;
 import com.jzg.quotation.commons.client.PlatformClient;
 import com.jzg.commons.constants.quote.enums.base.ApiType;
 import com.jzg.commons.entity.quote.vo.orders.InsOrdersVo;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
 import com.jzg.quotation.commons.service.QuotationApiBaseService;
 import com.jzg.quotation.commons.service.QuotationBaseService;
 import com.jzg.quotation.commons.service.QuotationCrawlerBaseService;
@@ -115,6 +117,38 @@ public class CompanyFactory {
         return service;
     }
 
+
+    public QuotationCrawlerBaseService getCaptchaService(GetCaptchaRequest sendCaptchaRequest) {
+        // 获取service
+        QuotationCrawlerBaseService service = getQuotationBaseInfo(Integer.parseInt(sendCaptchaRequest.getApiType()), sendCaptchaRequest.getCompanyCode());
+
+        return service;
+    }
+
+    public QuotationCrawlerBaseService getLoginService(LoginBase loginBase) {
+        // 获取service
+        QuotationCrawlerBaseService service = getQuotationBaseInfo(Integer.parseInt(loginBase.getApiType()), loginBase.getCompanyCode());
+
+        return service;
+    }
+
+
+    private QuotationCrawlerBaseService getQuotationBaseInfo(int apiType, String insuranceCode) {
+        log.info("quotationCrawlerBaseServiceMap参数的值:{}", com.alibaba.fastjson.JSON.toJSONString(quotationCrawlerBaseServiceMap));
+
+        String s = extractEnglishChars(insuranceCode);
+        QuotationCrawlerBaseService quotationApiBaseService = null;
+        String s1 = s + apiType;
+        if (ApiType.API_2.getCode() == apiType) {
+            quotationApiBaseService = quotationCrawlerBaseServiceMap.get(s1);
+        }
+        if (!ObjectUtils.isEmpty(quotationApiBaseService)) {
+            return quotationApiBaseService;
+        }
+        log.error("报价类型出错,请联系管理员:apiType=[{}],insuranceCode=[{}]", apiType, insuranceCode);
+        throw new SystemException("报价类型出错,请联系管理员处理。");
+    }
+
     /**
      * 获取保司实体
      *

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

@@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.core.base.StateResult;
 import com.jzg.commons.core.page.HttpResult;
-import com.jzg.commons.entity.account.po.SysUserAccountIncomeLog;
+import com.jzg.commons.entity.account.po.SysUserAccountChangeLog;
 import com.jzg.commons.entity.dto.CostCalculateRespVO;
 import com.jzg.commons.entity.dto.FeeAuditParam;
 import com.jzg.commons.entity.dto.VerifyOrderParam;
@@ -28,6 +28,7 @@ import com.jzg.commons.entity.vo.*;
 import com.jzg.commons.exception.ServiceException;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.AssertionUtils;
+import com.jzg.commons.util.BigDecimalUtil;
 import com.jzg.commons.util.PDFUtil;
 import com.jzg.commons.util.StringUtils;
 import com.jzg.commons.util.idgen.IdGenerate;
@@ -46,6 +47,7 @@ import com.jzg.quotation.summary.mapper.InsOrderRightsPackageMapper;
 import com.jzg.quotation.summary.service.*;
 import com.jzg.quotation.summary.state.AuditState;
 import com.jzg.quotation.summary.state.listener.AuditStateListener;
+import io.seata.spring.annotation.GlobalTransactional;
 import lombok.RequiredArgsConstructor;
 import org.hibernate.validator.internal.util.stereotypes.Lazy;
 import org.redisson.api.RBucket;
@@ -385,10 +387,19 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         insOrdersService.updateById(orders);
     }
 
+    /**
+     * 费用审核通过
+     *      费用审核通过后,会给业务员账号打钱
+     *
+     * @author lipf
+     * @date 2026/6/8 9:08
+     */
     @Override
+    @GlobalTransactional(rollbackFor = Exception.class)
     public void verifyOrder(VerifyOrderParam param) {
         String systemCode = baseController.getSystemCode();
-        log.info("审核订单.systemCode=[{}], param=[{}]",systemCode, JSONUtil.toJsonStr(param));
+        String userId = baseController.getUserId();
+        log.info("订单费用审核.systemCode=[{}], param=[{}]",systemCode, JSONUtil.toJsonStr(param));
         InsFeeAudit audit = this.getById(param.getOrderNo());
         if(audit == null){
             throw new ServiceException("要审核的订单不存在");
@@ -415,8 +426,9 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         }
         InsFeeOrders feeOrders = null;
         SysUserAccount userAccount = null;
+        String jzgInfoId = null;
         if(param.getAuditStatus().equals(1)){
-            List<SysUserAccountIncomeLog> incomeLogs = new ArrayList<>();
+            List<SysUserAccountChangeLog> incomeLogs = new ArrayList<>();
             StateResult stateFailResult = auditStateListener.statusChange(AuditState.AuditStateEnum.SUCCESS_AUDIT,audit.getAuditStatus()+"");
             audit.setAuditStatus(stateFailResult.getCurrentState());
 
@@ -435,17 +447,22 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
                 AssertionUtils.isFail(true, "权益券下发失败");
             }
             if(Objects.isNull(userAccount)){
+                log.info("订单费用审核时,检查到租户[{}]下的账号[{}]不存在",systemCode,sysUserResult.getData().getId());
                 userAccount = new SysUserAccount();
                 // 新建账户
                 userAccount.setId(IdGenerate.nextId());
                 userAccount.setUserId(sysUserResult.getData().getId());
-                userAccount.setSumAmount(feeOrders.getTotalReceivablePremium());
-                userAccount.setSumAmountUnpaid(feeOrders.getTotalReceivablePremium());
                 userAccount.setSystemCode(systemCode);
-            }else{
-                userAccount.setSumAmount(feeOrders.getTotalReceivablePremium().add(userAccount.getSumAmount()));
-                userAccount.setSumAmountUnpaid(feeOrders.getTotalReceivablePremium().add(userAccount.getSumAmount()));
             }
+            BigDecimal sumAmount = userAccount.getSumAmount();
+            BigDecimal amount = feeOrders.getTotalReceivablePremium();
+
+            SysUserAccountChangeLog changeLog = new SysUserAccountChangeLog(systemCode, userId,jzgInfoId);
+            changeLog.setAmount(amount);
+            changeLog.setAmountBefore(sumAmount);
+
+            userAccount.setSumAmount(BigDecimalUtil.add(feeOrders.getTotalReceivablePremium(),userAccount.getSumAmount()));
+            userAccount.setSumAmountUnpaid(BigDecimalUtil.add(feeOrders.getTotalReceivablePremium(), userAccount.getSumAmount()));
             orgClient.saveOrUpdate(userAccount);
             // 进入应收表
             List<String> orderNos = new ArrayList<>();
@@ -520,7 +537,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         }
         // 增加账户的金额记录
         // modify by lipf, 2026年5月20日11:31:59 审核通过后,才需要 生成收入明细日志
-        List<SysUserAccountIncomeLog>builderIncomeLog = this.builderIncomeLog(feeOrders.getOrderNo(),feeOrders,userAccount,distributor1,distributor2,distributor3);
+        List<SysUserAccountChangeLog>builderIncomeLog = this.builderIncomeLog(feeOrders.getOrderNo(),feeOrders,userAccount,distributor1,distributor2,distributor3);
         HttpResult result2 = orgClient.addUserAccountIncomeLog(builderIncomeLog);
         AssertionUtils.isFail(result2.getCode() != 200,"账户记录添加失败,审核失败");
     }
@@ -643,7 +660,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
      * @param distributor3  3级分销人员
      * @return
      */
-    private List<SysUserAccountIncomeLog> builderIncomeLog(String orderNo,
+    private List<SysUserAccountChangeLog> builderIncomeLog(String orderNo,
                                                            InsFeeOrders feeOrders,
                                                            SysUserAccount userAccount,
                                                            SysUserAccount distributor1,
@@ -651,47 +668,46 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
                                                            SysUserAccount distributor3){
         log.info("生成收入明细日志:feeOrders=[{}],userAccount=[{}],distributor1=[{}],distributor2=[{}],distributor3=[{}]",
                 JSONUtil.toJsonStr(feeOrders), JSONUtil.toJsonStr(userAccount), JSONUtil.toJsonStr(distributor1), JSONUtil.toJsonStr(distributor2), JSONUtil.toJsonStr(distributor3));
-        List<SysUserAccountIncomeLog> incomeLogs = new ArrayList<>();
+        List<SysUserAccountChangeLog> incomeLogs = new ArrayList<>();
         // 出口费用
-        SysUserAccountIncomeLog exportIncomeLog = new SysUserAccountIncomeLog();
-        exportIncomeLog.setOrderId(orderNo);
+        SysUserAccountChangeLog exportIncomeLog = new SysUserAccountChangeLog();
+        exportIncomeLog.setRelatedOrderId(orderNo);
         exportIncomeLog.setUserId(userAccount.getUserId());
         exportIncomeLog.setAmount(feeOrders.getJqExportPremium().add(feeOrders.getSyExportPremium()).add(feeOrders.getJyExportPremium()));
-        exportIncomeLog.setProperty(1);
-        exportIncomeLog.setBalanceAmount(userAccount.getSumAmount());
-
+        //exportIncomeLog.setProperty(1);
+        exportIncomeLog.setAmountBefore(userAccount.getSumAmount());
         incomeLogs.add(exportIncomeLog);
 
         // 1级分销费
         if (feeOrders.getFirstDistributorId() != null && feeOrders.getFirstDistributionFee().compareTo(BigDecimal.ZERO) > 0) {
-            SysUserAccountIncomeLog distributor1IncomeLog = new SysUserAccountIncomeLog();
-            distributor1IncomeLog.setOrderId(orderNo);
+            SysUserAccountChangeLog distributor1IncomeLog = new SysUserAccountChangeLog();
+            distributor1IncomeLog.setRelatedOrderId(orderNo);
             distributor1IncomeLog.setUserId(distributor1.getUserId());
             distributor1IncomeLog.setAmount(feeOrders.getFirstDistributionFee());
-            distributor1IncomeLog.setProperty(2);
-            distributor1IncomeLog.setBalanceAmount(userAccount.getSumAmount());
+            //distributor1IncomeLog.setProperty(2);
+            distributor1IncomeLog.setAmountBefore(userAccount.getSumAmount());
             incomeLogs.add(distributor1IncomeLog);
         }
 
         // 2级分销费
         if (feeOrders.getSecondDistributorId() != null && feeOrders.getSecondDistributionFee().compareTo(BigDecimal.ZERO) > 0) {
-            SysUserAccountIncomeLog distributor2IncomeLog = new SysUserAccountIncomeLog();
-            distributor2IncomeLog.setOrderId(orderNo);
+            SysUserAccountChangeLog distributor2IncomeLog = new SysUserAccountChangeLog();
+            distributor2IncomeLog.setRelatedOrderId(orderNo);
             distributor2IncomeLog.setUserId(distributor2.getUserId());
             distributor2IncomeLog.setAmount(feeOrders.getFirstDistributionFee());
-            distributor2IncomeLog.setProperty(2);
-            distributor2IncomeLog.setBalanceAmount(userAccount.getSumAmount());
+            //distributor2IncomeLog.setProperty(2);
+            distributor2IncomeLog.setAmountBefore(userAccount.getSumAmount());
             incomeLogs.add(distributor2IncomeLog);
         }
 
         // 3级分销费
         if (feeOrders.getThirdDistributorId() != null && feeOrders.getThirdDistributionFee().compareTo(BigDecimal.ZERO) > 0) {
-            SysUserAccountIncomeLog distributor3IncomeLog = new SysUserAccountIncomeLog();
-            distributor3IncomeLog.setOrderId(orderNo);
+            SysUserAccountChangeLog distributor3IncomeLog = new SysUserAccountChangeLog();
+            distributor3IncomeLog.setRelatedOrderId(orderNo);
             distributor3IncomeLog.setUserId(distributor3.getUserId());
             distributor3IncomeLog.setAmount(feeOrders.getFirstDistributionFee());
-            distributor3IncomeLog.setProperty(2);
-            distributor3IncomeLog.setBalanceAmount(userAccount.getSumAmount());
+            //distributor3IncomeLog.setProperty(2);
+            distributor3IncomeLog.setAmountBefore(userAccount.getSumAmount());
             incomeLogs.add(distributor3IncomeLog);
         }
         return incomeLogs;

+ 2 - 2
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/model/entity/TKDateInfo.java

@@ -21,11 +21,11 @@ public class TKDateInfo extends UnknownFieldEntity {
      */
     private String enrollDate;
     /**
-     * 商业险初始开始日期
+     * 交强险初始开始日期
      */
     private String initStartDateBZ;
     /**
-     * 交强险初始开始日期
+     * 商业险初始开始日期
      */
     private String initStartDateCI;
     /**

+ 0 - 2
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/TKHttpAPIService.java

@@ -688,8 +688,6 @@ public class TKHttpAPIService {
     public PreciseInitResult preciseInitToQuote(String token, PreciseInitParam param) {
         HttpHeaders httpHeaders = new HttpHeaders();
         httpHeaders.add("tkCarRequestToken", token);
-        // httpHeaders.add("carinsurflowid", "carInsur1780302178294459227");
-        // httpHeaders.add("carinsurorderid", param.getOrderID());
 
         StringResponse response = client.request(HttpURL.preciseInit, param, httpHeaders, StringResponse.class);
 

+ 25 - 14
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/impl/TKQuotationBaseServiceImpl.java

@@ -16,6 +16,9 @@ import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.client.PlatformClient;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
+import com.jzg.quotation.commons.utils.DateTimeUtil;
 import com.jzg.quotation.taikang.crawler.ConvertUtil;
 import com.jzg.quotation.taikang.crawler.cache.RedisCacheUtil;
 import com.jzg.quotation.taikang.crawler.client.AESDecryptor;
@@ -35,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 
 import java.io.File;
 import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -112,6 +116,11 @@ public class TKQuotationBaseServiceImpl implements TKQuotationBaseService {
 
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public QuoteResultsVo quote(QuoteVo commonQuoteVo) {
         CarInfoVo commonCarInfoVo = commonQuoteVo.getCarInfoVo();
@@ -581,25 +590,27 @@ public class TKQuotationBaseServiceImpl implements TKQuotationBaseService {
         // todo: 保司返回的时间与报价时选的投保时间不一致(发现保司报价页面时间不能自由选择,投保开始时间会延后,导致保单结束时间也会延后),所以这里将保司返回的时间设置为报价时选的投保时间
         // 交强险
         RiskInfoVo riskInfoVo1 = new RiskInfoVo();
-        // riskInfoVo1.setStartDate(DateTimeUtils.convertToDateTime(date.getJqStartDate(), date.getJqStartHour(), date.getJqStartMinute()));
-        // riskInfoVo1.setEndDate(DateTimeUtils.convertToDateTime(date.getJqEndDate(), date.getJqEndHour(), date.getJqEndMinute()));
-        riskInfoVo1.setStartDate(commonQuoteVo.getCiRiskInfoVo().getStartDate());
-        riskInfoVo1.setEndDate(commonQuoteVo.getCiRiskInfoVo().getEndDate());
+        LocalDateTime jyStart = DateTimeUtil.parseLocalDateTime(date.getInitStartDateBZ(), DateTimeUtil.DATETIME_PATTERN_EXT1);
+        riskInfoVo1.setStartDate(DateTimeUtil.getStartTimeOfDayStr(jyStart, DateTimeUtil.DATETIME_PATTERN));
+        riskInfoVo1.setEndDate(DateTimeUtils.convertToDateTime(date.getJqEndDate(), date.getJqEndHour(), date.getJqEndMinute()));
         quoteResultsVo.setCiRiskInfoVo(riskInfoVo1);
 
         // 商业险
-        RiskInfoVo riskInfoVo2 = new RiskInfoVo();
-        // riskInfoVo2.setStartDate(DateTimeUtils.convertToDateTime(date.getSyStartDate(), date.getSyStartHour(), date.getSyStartMinute()));
-        // riskInfoVo2.setEndDate(DateTimeUtils.convertToDateTime(date.getSyEndDate(), date.getSyEndHour(), date.getSyEndMinute()));
-        riskInfoVo2.setStartDate(commonQuoteVo.getBiRiskInfoVo() == null ? commonQuoteVo.getCiRiskInfoVo().getStartDate() : commonQuoteVo.getBiRiskInfoVo().getStartDate());
-        riskInfoVo2.setEndDate(commonQuoteVo.getBiRiskInfoVo() == null ? commonQuoteVo.getCiRiskInfoVo().getEndDate() : commonQuoteVo.getBiRiskInfoVo().getEndDate());
-        quoteResultsVo.setBiRiskInfoVo(riskInfoVo2);
+        if (commonQuoteVo.getBiRiskInfoVo() != null) {
+            RiskInfoVo riskInfoVo2 = new RiskInfoVo();
+            LocalDateTime syStart = DateTimeUtil.parseLocalDateTime(date.getInitStartDateCI(), DateTimeUtil.DATETIME_PATTERN_EXT1);
+            riskInfoVo2.setStartDate(DateTimeUtil.getStartTimeOfDayStr(syStart, DateTimeUtil.DATETIME_PATTERN));
+            riskInfoVo2.setEndDate(DateTimeUtils.convertToDateTime(date.getSyEndDate(), date.getSyEndHour(), date.getSyEndMinute()));
+            quoteResultsVo.setBiRiskInfoVo(riskInfoVo2);
+        }
 
         // 驾意险
-        RiskInfoVo riskInfoVo3 = new RiskInfoVo();
-        riskInfoVo3.setStartDate(DateTimeUtils.convertToDateTime(date.getJcbStartDate(), date.getJcbStartHour(), date.getJcbStartMinute()));
-        riskInfoVo3.setEndDate(DateTimeUtils.convertToDateTime(date.getJcbEndDate(), date.getJcbEndHour(), date.getJcbEndMinute()));
-        quoteResultsVo.setJyRiskInfoVo(riskInfoVo3);
+        if (commonQuoteVo.getAccidentalDrivings() != null) {
+            RiskInfoVo riskInfoVo3 = new RiskInfoVo();
+            riskInfoVo3.setStartDate(DateTimeUtils.convertToDateTime(date.getJcbStartDate(), date.getJcbStartHour(), date.getJcbStartMinute()));
+            riskInfoVo3.setEndDate(DateTimeUtils.convertToDateTime(date.getJcbEndDate(), date.getJcbEndHour(), date.getJcbEndMinute()));
+            quoteResultsVo.setJyRiskInfoVo(riskInfoVo3);
+        }
 
         // 商业险险种信息
         List<TKCiKindsVo> ciKindsVo = preciseInitResult.getCiKindsVo();

+ 7 - 0
tenant/insurance/quotation-taipingyang/src/main/java/com/jzg/quotation/taipingyang/crawler/service/impl/TaiPingYangCrawlerRequestImpl.java

@@ -7,6 +7,8 @@ import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.CookiesRequest;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.taipingyang.crawler.component.TaiPingYangCrawlerRequestComponent;
 import com.jzg.quotation.taipingyang.crawler.entity.request.TaiPingYangCrawlerCarInfoRequest;
@@ -34,6 +36,11 @@ public class TaiPingYangCrawlerRequestImpl implements TaiPingYangCrawlerRequest
 
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         return taiPingYangCrawlerQuoteProcessService.detectLogin(detectLoginRequest);

+ 1 - 1
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/component/TaiShanCrawlerRequestComponent.java

@@ -157,7 +157,7 @@ public class TaiShanCrawlerRequestComponent {
      * @return
      */
     public TaiShanCrawlerLoginResponse login(TaiShanCrawlerLoginRequest request, HttpHeaders headers) {
-        TaiShanCrawlerLoginResponse response = post(RequestUrl.CONFIRM, request, TaiShanCrawlerLoginResponse.class, headers);
+        TaiShanCrawlerLoginResponse response = post(RequestUrl.AUTHENTICATE, request, TaiShanCrawlerLoginResponse.class, headers);
         return response;
     }
 

+ 2 - 0
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/constant/enums/RequestUrl.java

@@ -10,6 +10,8 @@ public enum RequestUrl {
     HUAKUAI("/api_prod/auth/api/base/base_anji/get", "获取滑块验证码"),
     CHECK("/api_prod/auth/api/base/base_anji/check", "滑块校验"),
 
+    // 登录认证
+    AUTHENTICATE("/api_prod/auth/api/authenticate", "登录认证"),
 
     // 车辆相关
     CAR("/api_prod/ins/api/search/vehicle", "车型查询"),

+ 4 - 2
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/request/TaiShanCrawlerLoginRequest.java

@@ -37,9 +37,11 @@ public class TaiShanCrawlerLoginRequest implements Serializable {
         StringBuffer aesSb = new StringBuffer();
         aesSb.append(token + "---");
         aesSb.append(aesRes);
-        String captchaVerification = TaiShanCrawlerUtils.aesEncrypt(aesSb.toString(), secretKey);
+        //String captchaVerification = TaiShanCrawlerUtils.aesEncrypt(aesSb.toString(), secretKey);
+        String captchaVerification = "";
         this.username = loginBase.getUsername();
-        this.password = TaiShanCrawlerUtils.desEncrypt(loginBase.getPassword(),"chdAdmin");
+        //this.password = TaiShanCrawlerUtils.desEncrypt(loginBase.getPassword(),"chdAdmin");
+        this.password = loginBase.getPassword();
         this.rememberMe = true;
         this.smsCode = loginBase.getCaptcha();
         this.code = captchaVerification;

+ 6 - 6
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/request/TaiShanCrawlerSmsCodeRequest.java

@@ -1,6 +1,5 @@
 package com.jzg.quotation.taishan.crawler.entity.request;
 
-import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.jzg.quotation.taishan.crawler.entity.response.TaiShanCrawlerVerifyResponse;
 import com.jzg.quotation.taishan.crawler.util.TaiShanCrawlerUtils;
@@ -30,11 +29,12 @@ public class TaiShanCrawlerSmsCodeRequest implements Serializable {
     public TaiShanCrawlerSmsCodeRequest(TaiShanCrawlerVerifyResponse verifyResponse, List<Integer> integers, List<Integer> sizeList, String password, String username){
         int x = integers.get(0);
         int width = sizeList.get(0);
-        int t = 310 * x / width;
-        JSONObject pointJson = new JSONObject();
-        pointJson.put("x", x);
-        pointJson.put("y", 5);
-        String encryptedPointJson = TaiShanCrawlerUtils.aesEncrypt(pointJson.toJSONString(), verifyResponse.getRepData().getSecretKey());
+        // 参考Python实现:t = 310 * t / setSize_imgWidth (浮点除法)
+        double t = 310.0 * x / width;
+        // 参考Python实现:point_json = '{"x":'+str(t)+',"y":5}'
+        // 手动拼接字符串,确保与Python格式完全一致,避免JSONObject序列化差异
+        String pointJsonStr = "{\"x\":" + t + ",\"y\":5}";
+        String encryptedPointJson = TaiShanCrawlerUtils.aesEncrypt(pointJsonStr, verifyResponse.getRepData().getSecretKey());
         String crtm = TaiShanCrawlerUtils.desEncrypt(password,"chdAdmin");
         this.captchaVO = new CaptchaVODTO(encryptedPointJson, verifyResponse.getRepData().getToken());
         this.userId = username;

+ 3 - 2
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/request/TaiShanCrawlerVerifyRequest.java

@@ -19,11 +19,12 @@ public class TaiShanCrawlerVerifyRequest implements Serializable {
     @JsonProperty("clientUid")
     private String clientUid;
     @JsonProperty("ts")
-    private double ts;
+    private long ts;
 
     public TaiShanCrawlerVerifyRequest(String clientUid) {
         this.captchaType = "blockPuzzle";
         this.clientUid = clientUid;
-        this.ts = System.currentTimeMillis() / 1000.0;
+        // 参考Python实现:int(time.time() * 1000) 毫秒级整数时间戳
+        this.ts = System.currentTimeMillis();
     }
 }

+ 30 - 0
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/request/TaiShanExternalSendCodeRequest.java

@@ -0,0 +1,30 @@
+package com.jzg.quotation.taishan.crawler.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 外部发送验证码请求
+ */
+@NoArgsConstructor
+@AllArgsConstructor
+@Data
+public class TaiShanExternalSendCodeRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    @JsonProperty("check")
+    private String check;
+
+    @JsonProperty("username")
+    private String username;
+
+    @JsonProperty("pwd")
+    private String pwd;
+}

+ 2 - 0
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/response/TaiShanCrawlerSmsCodeResponse.java

@@ -14,6 +14,8 @@ public class TaiShanCrawlerSmsCodeResponse implements Serializable, TaiShanCrawl
     @Serial
     private static final long serialVersionUID = 0157577267035300221620L;
 
+    @JsonProperty("code")
+    private String code;
 
     @JsonProperty("repCode")
     private String repCode;

+ 43 - 0
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/entity/response/TaiShanExternalSendCodeResponse.java

@@ -0,0 +1,43 @@
+package com.jzg.quotation.taishan.crawler.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 外部发送验证码响应
+ */
+@NoArgsConstructor
+@Data
+public class TaiShanExternalSendCodeResponse implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    @JsonProperty("message")
+    private String message;
+
+    @JsonProperty("code")
+    private Integer code;
+
+    @JsonProperty("data")
+    private DataDTO data;
+
+    @NoArgsConstructor
+    @AllArgsConstructor
+    @Data
+    public static class DataDTO {
+        @JsonProperty("token")
+        private String token;
+
+        @JsonProperty("secretKey")
+        private String secretKey;
+
+        @JsonProperty("pointJson")
+        private String pointJson;
+    }
+}

+ 20 - 0
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/properties/ExteriorCaptchaProperties.java

@@ -0,0 +1,20 @@
+package com.jzg.quotation.taishan.crawler.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * 外部验证码接口配置属性
+ * 从 Nacos 配置中读取
+ */
+@Component
+@ConfigurationProperties(prefix = "exterior.api.sendcode")
+@Data
+public class ExteriorCaptchaProperties {
+
+    /**
+     * 验证码服务
+     */
+    private String url;
+}

+ 9 - 0
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/service/TaiShanCrawlerQuoteProcessService.java

@@ -2,6 +2,8 @@ package com.jzg.quotation.taishan.crawler.service;
 
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import org.springframework.http.HttpHeaders;
 
 /**
@@ -10,6 +12,13 @@ import org.springframework.http.HttpHeaders;
  * @date: 2025年9月17日16:28:40
  **/
 public interface TaiShanCrawlerQuoteProcessService {
+    /**
+     * 获取验证码
+     *
+     * @param sendCaptchaRequest 获取验证码请求
+     * @return 验证码响应
+     */
+    GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest);
 
     /**
      * 登录

+ 2 - 1
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/service/TaiShanCrawlerRequest.java

@@ -1,5 +1,6 @@
 package com.jzg.quotation.taishan.crawler.service;
 
+import com.jzg.quotation.commons.service.GetCaptchaBaseService;
 import com.jzg.quotation.commons.service.QuotationCrawlerBaseService;
 
 /**
@@ -7,6 +8,6 @@ import com.jzg.quotation.commons.service.QuotationCrawlerBaseService;
  * @author:
  * @date:
  **/
-public interface TaiShanCrawlerRequest extends QuotationCrawlerBaseService {
+public interface TaiShanCrawlerRequest extends QuotationCrawlerBaseService, GetCaptchaBaseService {
 
 }

+ 157 - 34
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/service/impl/TaiShanCrawlerQuoteProcessServiceImpl.java

@@ -4,21 +4,30 @@ import com.alibaba.fastjson.JSON;
 import com.jzg.commons.constants.quote.enums.base.ExpenseRequestUrl;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.commons.entity.quote.vo.identify.SliderCaptchaVo;
+import com.jzg.commons.util.StringUtils;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.service.ExteriorUtilsRequest;
 import com.jzg.quotation.taishan.crawler.component.TaiShanCrawlerCacheComponent;
 import com.jzg.quotation.taishan.crawler.component.TaiShanCrawlerRequestComponent;
+import com.jzg.quotation.commons.component.RequestComponent;
 import com.jzg.quotation.taishan.crawler.entity.request.TaiShanCrawlerLoginRequest;
 import com.jzg.quotation.taishan.crawler.entity.request.TaiShanCrawlerSmsCodeRequest;
 import com.jzg.quotation.taishan.crawler.entity.request.TaiShanCrawlerVerifyRequest;
+import com.jzg.quotation.taishan.crawler.entity.request.TaiShanExternalSendCodeRequest;
 import com.jzg.quotation.taishan.crawler.entity.response.TaiShanCrawlerLoginResponse;
 import com.jzg.quotation.taishan.crawler.entity.response.TaiShanCrawlerSmsCodeResponse;
 import com.jzg.quotation.taishan.crawler.entity.response.TaiShanCrawlerVerifyResponse;
+import com.jzg.quotation.taishan.crawler.entity.response.TaiShanExternalSendCodeResponse;
+import com.jzg.quotation.taishan.crawler.properties.ExteriorCaptchaProperties;
 import com.jzg.quotation.taishan.crawler.service.TaiShanCrawlerQuoteProcessService;
 import com.jzg.quotation.taishan.crawler.util.TaiShanCrawlerUtils;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.http.util.TextUtils;
 import org.springframework.http.HttpHeaders;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 
 import java.nio.charset.StandardCharsets;
@@ -45,31 +54,117 @@ public class TaiShanCrawlerQuoteProcessServiceImpl implements TaiShanCrawlerQuot
 
     private final ExteriorUtilsRequest exteriorUtilsRequest;
 
+    private final RequestComponent requestComponent;
+
+    private final ExteriorCaptchaProperties exteriorCaptchaProperties;
+
     // 登陆次数
     public static final int LOGINS_NUMBER = 3;
 
+//    @Override
+//    public void sendCode(String username, String password) {
+//        HttpHeaders httpHeaders = new HttpHeaders();
+//        getVerifyHeader(httpHeaders);
+//        // 获取滑块验证码
+//        Map<String, String> map = uuid();
+//        TaiShanCrawlerVerifyRequest verifyRequest = new TaiShanCrawlerVerifyRequest(map.get("slider"));
+//        log.info("verifyRequest参数的值:{}", JSON.toJSONString(verifyRequest));
+//
+//        TaiShanCrawlerVerifyResponse verifyResponse = taiShanCrawlerRequestComponent.crawlerVerify(verifyRequest, httpHeaders);
+//        log.info("verifyResponse参数的值:{}", JSON.toJSONString(verifyResponse));
+//        // 滑块验证码识别
+//        TaiShanCrawlerVerifyResponse.RepDataDTO repData = verifyResponse.getRepData();
+//        List<Integer> integers = exteriorUtilsRequest.sliderCaptchaIdentify(ExpenseRequestUrl.SLIDER_IDENTIFY, new SliderCaptchaVo(repData.getOriginalImageBase64(), repData.getJigsawImageBase64()));
+//        // 获取图片的宽高
+//        List<Integer> sizeList = TaiShanCrawlerUtils.getImageSizeFromBase64(repData.getOriginalImageBase64());
+//        // 获取验证码
+//        TaiShanCrawlerSmsCodeRequest smsCodeRequest = new TaiShanCrawlerSmsCodeRequest(verifyResponse, integers, sizeList, password, username);
+//        log.info("smsCodeRequest参数的值:{}", JSON.toJSONString(smsCodeRequest));
+//        TaiShanCrawlerSmsCodeResponse smsCodeResponse = taiShanCrawlerRequestComponent.crawlerCheck(smsCodeRequest, httpHeaders);
+//        log.info("smsCodeResponse参数的值:{}", JSON.toJSONString(smsCodeResponse));
+//
+//        // 缓存登录信息
+//        Map<String, Object> tokenMap = new HashMap<>();
+//        tokenMap.put("token", smsCodeResponse.getRepData().getToken());
+//        tokenMap.put("secretKey", verifyResponse.getRepData().getSecretKey());
+//        tokenMap.put("pointJson", smsCodeResponse.getRepData().getPointJson());
+//        log.info("TaiShan-tokenMap参数的值:{}", JSON.toJSONString(tokenMap));
+//        taiShanCrawlerCacheComponent.cacheToken(username, tokenMap);
+//    }
+
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        log.info("开始获取泰山账号验证码");
+
+        GetCaptchaResponse getCaptchaResponse = new GetCaptchaResponse();
+        if(sendCaptchaRequest != null){
+            String username = sendCaptchaRequest.getUsername();
+            String password = sendCaptchaRequest.getPassword();
+
+            if(StringUtils.isNotBlank(username) && StringUtils.isNotBlank(password)){
+                // 调用外部发送验证码接口(URL从Nacos配置读取)
+                TaiShanExternalSendCodeRequest externalRequest = new TaiShanExternalSendCodeRequest("", username, password);
+                log.info("externalSendCodeRequest参数的值:{}", JSON.toJSONString(externalRequest));
+
+                String sendCodeUrl = exteriorCaptchaProperties.getUrl();
+                log.info("外部发送验证码接口URL:{}", sendCodeUrl);
+
+                // 使用代码中已有的 requestComponent.post 方法
+                HttpHeaders externalHeaders = new HttpHeaders();
+                ResponseEntity<String> externalResponseEntity = requestComponent.post(sendCodeUrl, JSON.toJSONString(externalRequest), String.class, externalHeaders);
+                String externalResponseBody = externalResponseEntity.getBody();
+                log.info("外部发送验证码接口响应内容:{}", externalResponseBody);
+                TaiShanExternalSendCodeResponse externalResponse = JSON.parseObject(externalResponseBody, TaiShanExternalSendCodeResponse.class);
+                log.info("externalSendCodeResponse参数的值:{}", JSON.toJSONString(externalResponse));
+
+                // 从外部响应中获取数据并缓存
+                TaiShanExternalSendCodeResponse.DataDTO externalData = externalResponse.getData();
+                Map<String, Object> tokenMap = new HashMap<>();
+                tokenMap.put("token", externalData.getToken());
+                tokenMap.put("secretKey", externalData.getSecretKey());
+                tokenMap.put("pointJson", externalData.getPointJson());
+                log.info("TaiShan-tokenMap参数的值(从外部接口获取):{}", JSON.toJSONString(tokenMap));
+                taiShanCrawlerCacheComponent.cacheToken(username, tokenMap);
+
+                getCaptchaResponse.setIdentifyId(externalData.getToken());
+            }
+        }
+
+        return getCaptchaResponse;
+    }
+
+
+
     @Override
     public void sendCode(String username, String password) {
-        HttpHeaders httpHeaders = new HttpHeaders();
-        getVerifyHeader(httpHeaders);
-        // 获取滑块验证码
-        Map<String, String> map = uuid();
-        TaiShanCrawlerVerifyRequest verifyRequest = new TaiShanCrawlerVerifyRequest(map.get("slider"));
-        TaiShanCrawlerVerifyResponse verifyResponse = taiShanCrawlerRequestComponent.crawlerVerify(verifyRequest, httpHeaders);
-        // 滑块验证码识别
-        TaiShanCrawlerVerifyResponse.RepDataDTO repData = verifyResponse.getRepData();
-        List<Integer> integers = exteriorUtilsRequest.sliderCaptchaIdentify(ExpenseRequestUrl.SLIDER_IDENTIFY, new SliderCaptchaVo(repData.getOriginalImageBase64(), repData.getJigsawImageBase64()));
-        // 获取图片的宽高
-        List<Integer> sizeList = TaiShanCrawlerUtils.getImageSizeFromBase64(repData.getOriginalImageBase64());
-        // 获取验证码
-        TaiShanCrawlerSmsCodeRequest smsCodeRequest = new TaiShanCrawlerSmsCodeRequest(verifyResponse, integers, sizeList, password, username);
-        TaiShanCrawlerSmsCodeResponse smsCodeResponse = taiShanCrawlerRequestComponent.crawlerCheck(smsCodeRequest, httpHeaders);
-
-        // 缓存登录信息
+        // 调用外部发送验证码接口(URL从Nacos配置读取)
+        TaiShanExternalSendCodeRequest externalRequest = new TaiShanExternalSendCodeRequest("", username, password);
+        log.info("externalSendCodeRequest参数的值:{}", JSON.toJSONString(externalRequest));
+
+        String sendCodeUrl = exteriorCaptchaProperties.getUrl();
+        log.info("外部发送验证码接口URL:{}", sendCodeUrl);
+        
+        // 使用代码中已有的 requestComponent.post 方法
+        HttpHeaders externalHeaders = new HttpHeaders();
+        ResponseEntity<String> externalResponseEntity = requestComponent.post(sendCodeUrl, JSON.toJSONString(externalRequest), String.class, externalHeaders);
+        String externalResponseBody = externalResponseEntity.getBody();
+        log.info("外部发送验证码接口响应内容:{}", externalResponseBody);
+        TaiShanExternalSendCodeResponse externalResponse = JSON.parseObject(externalResponseBody, TaiShanExternalSendCodeResponse.class);
+        log.info("externalSendCodeResponse参数的值:{}", JSON.toJSONString(externalResponse));
+
+//        if (externalResponse == null || externalResponse.getCode() != 200) {
+//            String message = externalResponse != null ? externalResponse.getMessage() : "未知错误";
+//            log.warn("外部发送验证码接口调用失败,错误信息:{}", message);
+//            throw new RuntimeException("外部发送验证码失败:" + message);
+//        }
+
+        // 从外部响应中获取数据并缓存
+        TaiShanExternalSendCodeResponse.DataDTO externalData = externalResponse.getData();
         Map<String, Object> tokenMap = new HashMap<>();
-        tokenMap.put("token", smsCodeResponse.getRepData().getToken());
-        tokenMap.put("secretKey", verifyResponse.getRepData().getSecretKey());
-        tokenMap.put("pointJson", smsCodeResponse.getRepData().getPointJson());
+        tokenMap.put("token", externalData.getToken());
+        tokenMap.put("secretKey", externalData.getSecretKey());
+        tokenMap.put("pointJson", externalData.getPointJson());
+        log.info("TaiShan-tokenMap参数的值(从外部接口获取):{}", JSON.toJSONString(tokenMap));
         taiShanCrawlerCacheComponent.cacheToken(username, tokenMap);
     }
 
@@ -79,40 +174,66 @@ public class TaiShanCrawlerQuoteProcessServiceImpl implements TaiShanCrawlerQuot
      */
     @Override
     public void login(LoginBase loginBase) {
+        log.info("泰山-login");
         HttpHeaders httpHeaders = new HttpHeaders();
         getVerifyHeader(httpHeaders);
 
         Map<String, Object> tokenMap = taiShanCrawlerCacheComponent.getToken(loginBase.getUsername());
+        log.info("泰山-tokenMap参数的值:{}", JSON.toJSONString(tokenMap));
+
         TaiShanCrawlerLoginRequest loginRequest = new TaiShanCrawlerLoginRequest(loginBase,tokenMap);
+        log.info("TaiShan-loginRequest参数的值:{}", JSON.toJSONString(loginRequest));
         TaiShanCrawlerLoginResponse loginResponse = taiShanCrawlerRequestComponent.login(loginRequest, httpHeaders);
         log.info("TaiShan-loginResponse参数的值:{}", JSON.toJSONString(loginResponse));
         if(loginResponse.getCode().equals("200")){
             String authorization = loginResponse.getResult().getIdToken();
+            log.info("TaiShan-Username参数的值:{}", JSON.toJSONString(loginBase.getUsername()));
+            log.info("TaiShan-authorization参数的值:{}", JSON.toJSONString(authorization));
             taiShanCrawlerCacheComponent.cacheAuthorization(loginBase.getUsername(), authorization);
         }
     }
 
     @Override
     public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
+        log.info("泰山-detectLogin");
         String username = detectLoginRequest.getUsername();
-        String password = detectLoginRequest.getPassword();
-        LoginBase loginBase = new LoginBase();
-        loginBase.setUsername(username);
-        loginBase.setPassword(password);
-
-        HttpHeaders httpHeaders = new HttpHeaders();
-        getVerifyHeader(httpHeaders);
-
+        String token = null;
         Map<String, Object> tokenMap = taiShanCrawlerCacheComponent.getToken(username);
-        TaiShanCrawlerLoginRequest loginRequest = new TaiShanCrawlerLoginRequest(loginBase,tokenMap);
-        TaiShanCrawlerLoginResponse loginResponse = taiShanCrawlerRequestComponent.login(loginRequest, httpHeaders);
-        if(loginResponse.getCode().equals("200")){
-            String authorization = loginResponse.getResult().getIdToken();
-            taiShanCrawlerCacheComponent.cacheAuthorization(loginBase.getUsername(), authorization);
+        if(tokenMap !=null && !tokenMap.isEmpty()){
+            token = (String) tokenMap.get("token");
         }
-        return true;
+        return StringUtils.hasText(token);
+
+
+//        log.info("TaiShan-detectLoginRequest参数的值:{}", JSON.toJSONString(detectLoginRequest));
+//        String username = detectLoginRequest.getUsername();
+//        String password = detectLoginRequest.getPassword();
+//        LoginBase loginBase = new LoginBase();
+//        loginBase.setUsername(username);
+//        loginBase.setPassword(password);
+//        log.info("TaiShan-loginBase参数的值:{}", JSON.toJSONString(loginBase));
+//
+//        HttpHeaders httpHeaders = new HttpHeaders();
+//        getVerifyHeader(httpHeaders);
+//
+//        sendCode(username, password);
+//
+//        Map<String, Object> tokenMap = taiShanCrawlerCacheComponent.getToken(username);
+//        log.info("TaiShan-tokenMap参数的值:{}", JSON.toJSONString(tokenMap));
+
+
+//        TaiShanCrawlerLoginRequest loginRequest = new TaiShanCrawlerLoginRequest(loginBase,tokenMap);
+//        TaiShanCrawlerLoginResponse loginResponse = taiShanCrawlerRequestComponent.login(loginRequest, httpHeaders);
+//        log.info("TaiShan-loginResponse参数的值:{}", JSON.toJSONString(loginResponse));
+//        if(loginResponse.getCode().equals("200")){
+//            String authorization = loginResponse.getResult().getIdToken();
+//            //缓存登录的信息
+//            taiShanCrawlerCacheComponent.cacheAuthorization(loginBase.getUsername(), authorization);
+//        }
+//        return true;
     }
 
+
     private void getVerifyHeader(HttpHeaders httpHeaders) {
         httpHeaders.set(HttpHeaders.ACCEPT, "application/json, text/plain, */*");
         httpHeaders.set(HttpHeaders.ACCEPT_LANGUAGE, "zh-CN,zh;q=0.9");
@@ -174,7 +295,9 @@ public class TaiShanCrawlerQuoteProcessServiceImpl implements TaiShanCrawlerQuot
      */
     @Override
     public HttpHeaders getHeaders(String username, String comCode) {
-        String authorization = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI1ODI0MjEiLCJhdXRoIjoiUk9MRV9CVVNJTkVTUyIsInBhc3N3b3JkX2V4cGlyZSI6MTUsImV4cCI6MTc4MTY4NzIzMn0.ldWz9TMY4AJ75VE0Bk1mkzAXPC9jJNMIWL82n0kGHrBwASgGvBxO3fe7orHbCIowt0athoRn1zA9m5ZNnO7olg";
+        //String authorization = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI1ODI0MjEiLCJhdXRoIjoiUk9MRV9CVVNJTkVTUyIsInBhc3N3b3JkX2V4cGlyZSI6MTUsImV4cCI6MTc4MTY4NzIzMn0.ldWz9TMY4AJ75VE0Bk1mkzAXPC9jJNMIWL82n0kGHrBwASgGvBxO3fe7orHbCIowt0athoRn1zA9m5ZNnO7olg";
+
+        String authorization = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI1ODI0MjEiLCJhdXRoIjoiUk9MRV9CVVNJTkVTUyIsInBhc3N3b3JkX2V4cGlyZSI6MTIsImV4cCI6MTc4MTk0MDMyMX0.rsR8yMmSsB5iOstJSToswargqTCFB5He37UydrlK_lKFsHVqtBL-EOAgls4YL4nKWvRtbSxxY6HZRczHFG0iRw";
         HttpHeaders httpHeaders = new HttpHeaders();
         
         httpHeaders.set("Accept", "application/json, text/plain, */*");

+ 8 - 1
tenant/insurance/quotation-taishan/src/main/java/com/jzg/quotation/taishan/crawler/service/impl/TaiShanCrawlerRequestImpl.java

@@ -12,6 +12,8 @@ import com.jzg.commons.entity.quote.vo.aggregated.*;
 import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.taishan.crawler.build.TaiShanCrawlerQuoteRequestVoBuild;
 import com.jzg.quotation.taishan.crawler.build.TaiShanCrawlerQuoteResultsVoBuild;
@@ -61,7 +63,10 @@ public class TaiShanCrawlerRequestImpl implements TaiShanCrawlerRequest {
 
     public static final int CIRCULATE_NUMBER = 3;
 
-
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return taiShanCrawlerQuoteProcessService.getCaptcha(sendCaptchaRequest);
+    }
     /**
      * 登录
      *
@@ -558,4 +563,6 @@ public class TaiShanCrawlerRequestImpl implements TaiShanCrawlerRequest {
         }
         return downloadPolicyResultVo;
     }
+
+
 }

+ 7 - 0
tenant/insurance/quotation-zhongan/src/main/java/com/jzg/quotation/zhongan/crawler/service/Impl/ZhongAnCrawlerRequestImpl.java

@@ -22,6 +22,8 @@ import com.jzg.commons.entity.quote.vo.base.LoginBase;
 import com.jzg.commons.entity.quote.vo.base.OrderBase;
 import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.zhongan.crawler.build.ZhongAnCrawlerQuoteResultsVoBuild;
@@ -643,4 +645,9 @@ public class ZhongAnCrawlerRequestImpl implements ZhongAnCrawlerRequest {
     public void login(LoginBase loginBase) {
 
     }
+
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
 }

+ 7 - 0
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/service/Impl/ZhongMeiCrawlerRequestImpl.java

@@ -13,6 +13,8 @@ import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.constant.CacheConstant;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.zhongmei.api.constant.TransCode;
@@ -66,6 +68,11 @@ public class ZhongMeiCrawlerRequestImpl implements ZhongMeiCrawlerRequest {
         zmCrawlerRequestComponent.authenticate(loginBase.getUsername(), loginBase.getPassword(), ZmCrawlerRequestComponent.REQUEST_NUMBER);
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         String username = detectLoginRequest.getUsername();

+ 63 - 0
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/build/ZiJinCrawlerQuoteRequestBuild.java

@@ -0,0 +1,63 @@
+package com.jzg.quotation.zijin.crawler.build;
+
+import com.jzg.commons.util.StringUtils;
+import com.jzg.quotation.zijin.crawler.entity.request.ZiJinCrawlerQuotationRequest;
+import com.jzg.quotation.zijin.crawler.entity.request.ZiJinCrawlerRecognizeCodesRequest;
+import com.jzg.quotation.zijin.crawler.entity.response.ZiJinCrawlerQuotationResponse;
+import com.jzg.quotation.zijin.crawler.entity.response.ZiJinCrawlerRecognizeCodesResponse;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @description: 紫金财险爬虫报价“转保标志”再次报价构建器
+ * @author: wangrq
+ * @date: 2026/6/6 16:05
+ **/
+@Slf4j
+public class ZiJinCrawlerQuoteRequestBuild {
+
+    /**
+     * 构建识别码请求
+     *
+     * @param ziJinCrawlerQuotationResponse
+     * @return
+     */
+    public static ArrayList<ZiJinCrawlerRecognizeCodesRequest> buildRecognizeCodesRequests(ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
+        ArrayList<ZiJinCrawlerRecognizeCodesRequest> ziJinCrawlerRecognizeCodesRequests = new ArrayList<>();
+        if (StringUtils.isNotEmpty(ziJinCrawlerQuotationResponse.getBasePart().getQuestion())) {
+            ZiJinCrawlerRecognizeCodesRequest ziJinCrawlerRecognizeCodesRequest = new ZiJinCrawlerRecognizeCodesRequest();
+            ziJinCrawlerRecognizeCodesRequest.setBase64(ziJinCrawlerQuotationResponse.getBasePart().getQuestion());
+            ziJinCrawlerRecognizeCodesRequest.setSerialNo("question");
+            ziJinCrawlerRecognizeCodesRequests.add(ziJinCrawlerRecognizeCodesRequest);
+        }
+        if (StringUtils.isNotEmpty(ziJinCrawlerQuotationResponse.getBasePart().getQuestionCI())) {
+            ZiJinCrawlerRecognizeCodesRequest ziJinCrawlerRecognizeCodesRequest = new ZiJinCrawlerRecognizeCodesRequest();
+            ziJinCrawlerRecognizeCodesRequest.setBase64(ziJinCrawlerQuotationResponse.getBasePart().getQuestionCI());
+            ziJinCrawlerRecognizeCodesRequest.setSerialNo("questionCI");
+            ziJinCrawlerRecognizeCodesRequests.add(ziJinCrawlerRecognizeCodesRequest);
+        }
+        return ziJinCrawlerRecognizeCodesRequests;
+    }
+
+    /**
+     * 重新报价
+     * @param ziJinCrawlerRecognizeCodesResponse
+     * @param ziJinCrawlerQuotationRequest
+     */
+    public static void buildReQuote(ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse, ZiJinCrawlerRecognizeCodesResponse ziJinCrawlerRecognizeCodesResponse, ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest) {
+        List<ZiJinCrawlerRecognizeCodesResponse.Results> results = ziJinCrawlerRecognizeCodesResponse.getResults();
+        for (ZiJinCrawlerRecognizeCodesResponse.Results result : results) {
+            if ("question".equals(result.getSerialNo())) {
+                ziJinCrawlerQuotationRequest.getBaseInfo().setAnswer(result.getResult());
+                ziJinCrawlerQuotationRequest.getBaseInfo().setDemandNo(ziJinCrawlerQuotationResponse.getBasePart().getDemandNo());
+            }
+            if ("questionCI".equals(result.getSerialNo())) {
+                ziJinCrawlerQuotationRequest.getBaseInfo().setAnswerCI(result.getResult());
+                ziJinCrawlerQuotationRequest.getBaseInfo().setDemandNoCI(ziJinCrawlerQuotationResponse.getBasePart().getDemandNoCI());
+            }
+        }
+    }
+
+}

+ 74 - 19
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/build/ZiJinCrawlerQuoteResultsVoBuild.java

@@ -259,20 +259,68 @@ public class ZiJinCrawlerQuoteResultsVoBuild {
             return scoreVo;
         }
         ZiJinCrawlerQuotationResponse.PriceInfoList priceInfo = priceInfoList.get(0);
-        JSONArray scoreArray = new JSONArray();
+        ZiJinCrawlerQuotationResponse.CiProfitDetailData ciProfitDetailData = ziJinCrawlerQuotationResponse.getCiProfitDetailData();
 
         scoreVo.setJqLossRation(priceInfo.getLrRecomAdjust());
         scoreVo.setSyLossRation(priceInfo.getLrRecom());
 
+        JSONArray scoreArray = new JSONArray();
+        // 商业险定价信息
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "自主定价系数")
+                .fluentPut("scoreKey", "uwRel")
+                .fluentPut("score", priceInfo.getUwRel()));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "交通违法系数")
+                .fluentPut("scoreKey", "chanRel")
+                .fluentPut("score", priceInfo.getChanRel()));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "无赔款优惠系数")
+                .fluentPut("scoreKey", "nonclaimAdjuct")
+                .fluentPut("score", ciProfitDetailData != null ? ciProfitDetailData.getNonclaimAdjuct() : ""));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "无赔款优待等级")
+                .fluentPut("scoreKey", "claimAdjustLevel")
+                .fluentPut("score", ciProfitDetailData != null ? ciProfitDetailData.getClaimAdjustLevel() : ""));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "连续承保年数")
+                .fluentPut("scoreKey", "insureYears")
+                .fluentPut("score", ciProfitDetailData != null ? ciProfitDetailData.getInsureYears() : null));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "连续承保期间出险次数")
+                .fluentPut("scoreKey", "claimTimes")
+                .fluentPut("score", ciProfitDetailData  != null ? ciProfitDetailData.getClaimTimes() : null));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "总折扣")
+                .fluentPut("scoreKey", "initialELR")
+                .fluentPut("score", priceInfo.getInitialELR()));
+        scoreVo.setScoreJson(scoreArray);
+
         // 定价评分
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "标费含NCD预期赔付率")
+                .fluentPut("scoreKey", "ncdBpremELR")
+                .fluentPut("score", priceInfo.getNcdBpremELR()));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "商业险赔付率")
+                .fluentPut("scoreKey", "lrRecom")
+                .fluentPut("score", priceInfo.getLrRecom()));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "交强险赔付率")
+                .fluentPut("scoreKey", "lrRecomAdjust")
+                .fluentPut("score", priceInfo.getLrRecomAdjust()));
         scoreArray.add(new JSONObject()
                 .fluentPut("scoreName", "交强险预测评分")
                 .fluentPut("scoreKey", "revPredScoreAdjust")
                 .fluentPut("score", priceInfo.getRevPredScoreAdjust()));
         scoreArray.add(new JSONObject()
-                .fluentPut("scoreName", "商业险预测评分")
+                .fluentPut("scoreName", "交强险预测评分")
+                .fluentPut("scoreKey", "revPredScoreAdjust")
+                .fluentPut("score", priceInfo.getRevPredScoreAdjust()));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "交强险不浮动原因")
                 .fluentPut("scoreKey", "revPredScore")
-                .fluentPut("score", priceInfo.getRevPredScore()));
+                .fluentPut("score", null));
         scoreArray.add(new JSONObject()
                 .fluentPut("scoreName", "车辆核保分")
                 .fluentPut("scoreKey", "underwrite01")
@@ -281,22 +329,6 @@ public class ZiJinCrawlerQuoteResultsVoBuild {
                 .fluentPut("scoreName", "律商新能源评分")
                 .fluentPut("scoreKey", "evScore")
                 .fluentPut("score", priceInfo.getEvScore()));
-        scoreArray.add(new JSONObject()
-                .fluentPut("scoreName", "标费含NCD预期赔付率")
-                .fluentPut("scoreKey", "ncdBpremELR")
-                .fluentPut("score", priceInfo.getNcdBpremELR()));
-        scoreArray.add(new JSONObject()
-                .fluentPut("scoreName", "交强险赔付率")
-                .fluentPut("scoreKey", "lrRecomAdjust")
-                .fluentPut("score", priceInfo.getLrRecomAdjust()));
-        scoreArray.add(new JSONObject()
-                .fluentPut("scoreName", "商业险赔付率")
-                .fluentPut("scoreKey", "lrRecom")
-                .fluentPut("score", priceInfo.getLrRecom()));
-        scoreArray.add(new JSONObject()
-                .fluentPut("scoreName", "商业险手续费")
-                .fluentPut("scoreKey", "handFeeBi")
-                .fluentPut("score", priceInfo.getUwRel()));
         scoreVo.setScoreJson(scoreArray);
 
         // 车慧达定价信息
@@ -325,6 +357,29 @@ public class ZiJinCrawlerQuoteResultsVoBuild {
                 .fluentPut("scoreKey", "carLoadTranche")
                 .fluentPut("score", priceInfo.getCarLoadTranche()));
         scoreVo.setScoreJson(scoreArray);
+
+        // 影响因子
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "NCD")// 升费因子名称
+                .fluentPut("scoreKey", "effectValueUPOne")
+                .fluentPut("score", priceInfo.getEffectValueUPOne()));// 因子比例
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "性别年龄")
+                .fluentPut("scoreKey", "effectValueUPTwo")
+                .fluentPut("score", priceInfo.getEffectValueUPTwo()));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "车牌")
+                .fluentPut("scoreKey", "effectValueUPThree")
+                .fluentPut("score", priceInfo.getEffectValueUPThree()));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "是否投保医保外用药")
+                .fluentPut("scoreKey", "effectValueDownFour")
+                .fluentPut("score", priceInfo.getEffectValueDownFour()));
+        scoreArray.add(new JSONObject()
+                .fluentPut("scoreName", "平台分")
+                .fluentPut("scoreKey", "effectValueDownFive")
+                .fluentPut("score", priceInfo.getEffectValueDownFive()));
+        scoreVo.setScoreJson(scoreArray);
         return scoreVo;
     }
 }

+ 115 - 37
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/build/ZiJinCrawlerSaveQuoteInfoRequestBuild.java

@@ -2,15 +2,15 @@ package com.jzg.quotation.zijin.crawler.build;
 
 import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
-import com.jzg.commons.util.StringUtils;
 import com.jzg.quotation.zijin.api.constant.enums.RiskCodeEnum;
+import com.jzg.quotation.zijin.crawler.component.ZiJinCrawlerCacheComponent;
 import com.jzg.quotation.zijin.crawler.entity.request.ZiJinCrawlerQuotationRequest;
-import com.jzg.quotation.zijin.crawler.entity.request.ZiJinCrawlerRecognizeCodesRequest;
 import com.jzg.quotation.zijin.crawler.entity.request.ZiJinCrawlerSaveQuoteInfoRequest;
 import com.jzg.quotation.zijin.crawler.entity.response.ZiJinCrawlerQuotationResponse;
 import com.jzg.quotation.zijin.crawler.util.ConvertUtil;
+import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.jetbrains.annotations.NotNull;
+import org.springframework.stereotype.Component;
 import org.springframework.util.ObjectUtils;
 
 import java.util.*;
@@ -20,9 +20,113 @@ import java.util.*;
  * @author:
  * @date:
  **/
+@Component
+@RequiredArgsConstructor
 @Slf4j
 public class ZiJinCrawlerSaveQuoteInfoRequestBuild {
 
+    private final ZiJinCrawlerCacheComponent ziJinCrawlerCacheComponent;
+
+    /**
+     * 构建保存报价信息请求对象
+     *
+     * @return 构建完成的保存报价信息请求对象
+     */
+    public ZiJinCrawlerSaveQuoteInfoRequest buildSaveQuoteInfoRequest(QuoteVo quoteVo, ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest, ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
+        ZiJinCrawlerSaveQuoteInfoRequest ziJinCrawlerSaveQuoteInfoRequest = new ZiJinCrawlerSaveQuoteInfoRequest();
+
+        // 设置代理人代码
+        ziJinCrawlerSaveQuoteInfoRequest.setAgentCode(ziJinCrawlerQuotationRequest.getBaseInfo().getAgentCode());
+
+        // 设置订单ID
+        ziJinCrawlerSaveQuoteInfoRequest.setOrderId(ziJinCrawlerQuotationResponse.getOrderId());
+
+        // 设置订单号
+        ziJinCrawlerSaveQuoteInfoRequest.setOrderNo(ziJinCrawlerQuotationResponse.getOrderNo());
+
+        // 设置基础信息
+        ziJinCrawlerSaveQuoteInfoRequest.setBaseInfo(buildSaveBaseInfo(quoteVo, ziJinCrawlerQuotationRequest, ziJinCrawlerQuotationResponse));
+
+        // 设置车主信息
+        ziJinCrawlerSaveQuoteInfoRequest.setCarOwnerInfo(buildSaveCarOwnerInfo(quoteVo, ziJinCrawlerQuotationRequest));
+
+        // 设置车险附加险信息列表
+        ziJinCrawlerSaveQuoteInfoRequest.setCarPolicySubInfoList(buildSaveCarPolicySubInfo(ziJinCrawlerQuotationRequest));
+
+        // 设置附加险列表
+        ziJinCrawlerSaveQuoteInfoRequest.setAttachRiskList(new ArrayList<>());
+
+        // 设置 投保人/被保人 列表
+        ziJinCrawlerSaveQuoteInfoRequest.setInsuredList(buildSaveInsuredList(quoteVo, ziJinCrawlerQuotationRequest));
+
+        // 设置险别明细列表
+        ziJinCrawlerSaveQuoteInfoRequest.setItemKindList(buildSaveItemKindList(ziJinCrawlerQuotationResponse));
+
+        // 设置收费信息列表
+        ziJinCrawlerSaveQuoteInfoRequest.setChargingInfoList(new ArrayList<>());
+
+        // 设置订单来源
+        ziJinCrawlerSaveQuoteInfoRequest.setOrderOrigin("KSCD_PROD");
+
+        // 设置产品代码
+        ziJinCrawlerSaveQuoteInfoRequest.setProductCode("CAR20190517");
+
+        // 设置产品名称
+        ziJinCrawlerSaveQuoteInfoRequest.setProductName("机动车保险");
+
+        // 设置提交信息
+        ziJinCrawlerSaveQuoteInfoRequest.setSubmitInfo(new HashMap<>());
+
+        // 设置车船税减免信息
+        ziJinCrawlerSaveQuoteInfoRequest.setTaxRelifInfo(buildSaveTaxRelifInfo(ziJinCrawlerQuotationResponse));
+
+        // 设置终端ID
+        ziJinCrawlerSaveQuoteInfoRequest.setTerminalId("KSCD");
+
+        // 设置终端类型
+        ziJinCrawlerSaveQuoteInfoRequest.setTerminalIdType("Vue-PC");
+
+        // 设置投保标识
+        ziJinCrawlerSaveQuoteInfoRequest.setInsuranceSign("0");
+
+        // 设置车辆信息
+        ziJinCrawlerSaveQuoteInfoRequest.setVehicleInfo(buildVehicleInfo(ziJinCrawlerQuotationRequest, ziJinCrawlerQuotationResponse));
+
+        // 设置车辆设备保费列表
+        ziJinCrawlerSaveQuoteInfoRequest.setCarDevicePremiumDtoList(new ArrayList<>());
+
+        // 设置约定列表
+        ziJinCrawlerSaveQuoteInfoRequest.setEngageList(new ArrayList<>());
+
+        // 设置附件文件列表
+        ziJinCrawlerSaveQuoteInfoRequest.setItemFileDataList(buildSaveFileDataList(ziJinCrawlerQuotationResponse));
+
+        // 设置订单附加信息
+        ziJinCrawlerSaveQuoteInfoRequest.setOrderAttachInfo(buildSaveOrderAttachInfo(quoteVo, ziJinCrawlerQuotationRequest));
+
+        // 设置是否包含子机构
+        ziJinCrawlerSaveQuoteInfoRequest.setIsIncludeSubCom(1);
+
+        return ziJinCrawlerSaveQuoteInfoRequest;
+    }
+
+    /**
+     * 构建保存报价信息请求的附件文件列表
+     *
+     * @param ziJinCrawlerQuotationResponse
+     * @return
+     */
+    private List<ZiJinCrawlerSaveQuoteInfoRequest.ItemFileData> buildSaveFileDataList(ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
+        // 获取图片上传信息
+        List<ZiJinCrawlerSaveQuoteInfoRequest.ItemFileData.FileInfo> imagesInfoList = ziJinCrawlerCacheComponent.getImagesInfo(ziJinCrawlerQuotationResponse.getOrderNo());
+        return Optional.ofNullable(ziJinCrawlerQuotationResponse.getItemKindList()).orElseGet(Collections::emptyList).stream().map(itemKindListDTO ->
+                ZiJinCrawlerSaveQuoteInfoRequest.ItemFileData.builder()
+                        .riskCode(itemKindListDTO.getRiskCode())
+                        .fileList(imagesInfoList)
+                        .build()
+        ).toList();
+    }
+
     /**
      * 构建保存报价信息的订单附加信息
      *
@@ -30,7 +134,7 @@ public class ZiJinCrawlerSaveQuoteInfoRequestBuild {
      * @param ziJinCrawlerQuotationRequest
      * @return
      */
-    public static ZiJinCrawlerSaveQuoteInfoRequest.OrderAttachInfo buildSaveOrderAttachInfo(QuoteVo quoteVo, ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest) {
+    private ZiJinCrawlerSaveQuoteInfoRequest.OrderAttachInfo buildSaveOrderAttachInfo(QuoteVo quoteVo, ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest) {
         return ZiJinCrawlerSaveQuoteInfoRequest.OrderAttachInfo.builder()
                 .carAppliRelation("1")
                 .carInsuredRelation("1")
@@ -53,7 +157,7 @@ public class ZiJinCrawlerSaveQuoteInfoRequestBuild {
      * @param ziJinCrawlerQuotationResponse 报价结果
      * @return 保存报价信息的车辆信息
      */
-    public static ZiJinCrawlerSaveQuoteInfoRequest.VehicleInfo buildVehicleInfo(ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest, ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
+    private ZiJinCrawlerSaveQuoteInfoRequest.VehicleInfo buildVehicleInfo(ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest, ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
         ZiJinCrawlerQuotationRequest.VehicleInfo carInfo = ziJinCrawlerQuotationRequest.getVehicleInfo();
         // 计算使用年限
         int useYears = 0;
@@ -129,7 +233,7 @@ public class ZiJinCrawlerSaveQuoteInfoRequestBuild {
      * @param ziJinCrawlerQuotationResponse
      * @return
      */
-    public static ZiJinCrawlerSaveQuoteInfoRequest.TaxRelifInfo buildSaveTaxRelifInfo(ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
+    private ZiJinCrawlerSaveQuoteInfoRequest.TaxRelifInfo buildSaveTaxRelifInfo(ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
         if (ziJinCrawlerQuotationResponse.getCarShipTax() == null) {
             return null;
         }
@@ -192,8 +296,7 @@ public class ZiJinCrawlerSaveQuoteInfoRequestBuild {
      * @param ziJinCrawlerQuotationResponse
      * @return
      */
-    @NotNull
-    public static List<ZiJinCrawlerSaveQuoteInfoRequest.ItemKindInfo> buildSaveItemKindList(ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
+    private List<ZiJinCrawlerSaveQuoteInfoRequest.ItemKindInfo> buildSaveItemKindList(ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
         List<ZiJinCrawlerSaveQuoteInfoRequest.ItemKindInfo> itemKindList = new ArrayList<>();
         if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(ziJinCrawlerQuotationResponse.getItemKindList())) {
             for (ZiJinCrawlerQuotationResponse.ItemKindList kind : ziJinCrawlerQuotationResponse.getItemKindList()) {
@@ -222,8 +325,7 @@ public class ZiJinCrawlerSaveQuoteInfoRequestBuild {
      * @param ziJinCrawlerQuotationRequest
      * @return
      */
-    @NotNull
-    public static List<ZiJinCrawlerSaveQuoteInfoRequest.InsuredInfo> buildSaveInsuredList(QuoteVo quoteVo, ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest) {
+    private List<ZiJinCrawlerSaveQuoteInfoRequest.InsuredInfo> buildSaveInsuredList(QuoteVo quoteVo, ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest) {
         // 投保人
         CustomerInfoVo policyHolderInfo = quoteVo.getPolicyHolderInfo();
         String addr = policyHolderInfo.getAddr();
@@ -289,8 +391,7 @@ public class ZiJinCrawlerSaveQuoteInfoRequestBuild {
      * @param ziJinCrawlerQuotationRequest
      * @return
      */
-    @NotNull
-    public static List<ZiJinCrawlerSaveQuoteInfoRequest.CarPolicySubInfo> buildSaveCarPolicySubInfo(ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest) {
+    private List<ZiJinCrawlerSaveQuoteInfoRequest.CarPolicySubInfo> buildSaveCarPolicySubInfo(ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest) {
         List<ZiJinCrawlerSaveQuoteInfoRequest.CarPolicySubInfo> carPolicySubInfoList = new ArrayList<>();
         if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(ziJinCrawlerQuotationRequest.getCarPolicySubInfoList())) {
             for (ZiJinCrawlerQuotationRequest.CarPolicySubInfoList subInfo : ziJinCrawlerQuotationRequest.getCarPolicySubInfoList()) {
@@ -319,7 +420,7 @@ public class ZiJinCrawlerSaveQuoteInfoRequestBuild {
      * @param ziJinCrawlerQuotationRequest
      * @return
      */
-    public static ZiJinCrawlerSaveQuoteInfoRequest.CarOwnerInfo buildSaveCarOwnerInfo(QuoteVo quoteVo, ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest) {
+    private ZiJinCrawlerSaveQuoteInfoRequest.CarOwnerInfo buildSaveCarOwnerInfo(QuoteVo quoteVo, ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest) {
         return ZiJinCrawlerSaveQuoteInfoRequest.CarOwnerInfo.builder()
                 .customerAmlPropReqDtoList(new ArrayList<>())
                 .carOwner(ziJinCrawlerQuotationRequest.getCarOwnerInfo().getCarOwner())
@@ -337,7 +438,7 @@ public class ZiJinCrawlerSaveQuoteInfoRequestBuild {
      * @param ziJinCrawlerQuotationRequest  报价参数
      * @param ziJinCrawlerQuotationResponse 报价返回对象
      */
-    public static ZiJinCrawlerSaveQuoteInfoRequest.BaseInfo buildSaveBaseInfo(QuoteVo quoteVo, ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest, ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
+    private ZiJinCrawlerSaveQuoteInfoRequest.BaseInfo buildSaveBaseInfo(QuoteVo quoteVo, ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest, ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
         Double sumPremium = 0.0;
         Double sumPremiumCI = ziJinCrawlerQuotationResponse.getPlanList().stream().filter(plan -> RiskCodeEnum.TRAFFIC_CODE.equals(plan.getRiskCode())).mapToDouble(ZiJinCrawlerQuotationResponse.PlanList::getPlanFee).findFirst().orElse(0.0);
         return ZiJinCrawlerSaveQuoteInfoRequest.BaseInfo.builder()
@@ -410,27 +511,4 @@ public class ZiJinCrawlerSaveQuoteInfoRequestBuild {
                 .build();
     }
 
-    /**
-     * 构建识别码请求
-     *
-     * @param ziJinCrawlerQuotationResponse
-     * @return
-     */
-    public static ArrayList<ZiJinCrawlerRecognizeCodesRequest> buildRecognizeCodesRequests(ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
-        ArrayList<ZiJinCrawlerRecognizeCodesRequest> ziJinCrawlerRecognizeCodesRequests = new ArrayList<>();
-        if (StringUtils.isNotEmpty(ziJinCrawlerQuotationResponse.getBasePart().getQuestion())) {
-            ZiJinCrawlerRecognizeCodesRequest ziJinCrawlerRecognizeCodesRequest = new ZiJinCrawlerRecognizeCodesRequest();
-            ziJinCrawlerRecognizeCodesRequest.setBase64(ziJinCrawlerQuotationResponse.getBasePart().getQuestion());
-            ziJinCrawlerRecognizeCodesRequest.setSerialNo("question");
-            ziJinCrawlerRecognizeCodesRequests.add(ziJinCrawlerRecognizeCodesRequest);
-        }
-        if (StringUtils.isNotEmpty(ziJinCrawlerQuotationResponse.getBasePart().getQuestionCI())) {
-            ZiJinCrawlerRecognizeCodesRequest ziJinCrawlerRecognizeCodesRequest = new ZiJinCrawlerRecognizeCodesRequest();
-            ziJinCrawlerRecognizeCodesRequest.setBase64(ziJinCrawlerQuotationResponse.getBasePart().getQuestionCI());
-            ziJinCrawlerRecognizeCodesRequest.setSerialNo("questionCI");
-            ziJinCrawlerRecognizeCodesRequests.add(ziJinCrawlerRecognizeCodesRequest);
-        }
-        return ziJinCrawlerRecognizeCodesRequests;
-    }
-
 }

+ 2 - 1
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/component/ZiJinCrawlerCacheComponent.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import com.jzg.quotation.zijin.crawler.entity.request.ZiJinCrawlerSaveQuoteInfoRequest;
+import com.jzg.quotation.zijin.crawler.entity.request.ZiJinCrawlerUploadImageInfoListRequest;
 import com.jzg.quotation.zijin.crawler.entity.response.ZiJinCrawlerSaveResponse;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -116,7 +117,7 @@ public class ZiJinCrawlerCacheComponent {
      * @param orderNo 订单号
      * @param dataDTOS 图片信息
      */
-    public void cacheImagesInfo(String orderNo, List<ZiJinCrawlerSaveQuoteInfoRequest.ItemFileData.FileInfo> dataDTOS) {
+    public void cacheImagesInfo(String orderNo, List<ZiJinCrawlerUploadImageInfoListRequest.ItemFileDataListDTO> dataDTOS) {
         String responseStr = JSONObject.toJSONString(dataDTOS);
         redissonClient.getBucket(IMAGES_INFO + orderNo).set(responseStr, Duration.ofDays(IMAGES_INFO_TIME));
     }

+ 19 - 1
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/component/ZiJinCrawlerRequestComponent.java

@@ -341,6 +341,23 @@ public class ZiJinCrawlerRequestComponent {
         return responseEntity.getBody();
     }
 
+    /**
+     * 上传影像件列表
+     *
+     * @param headers
+     * @return ZiJinCrawlerImageUploadResponse
+     */
+    public ZiJinCrawlerImageUploadInfoListResponse uploadImageInfoList(ZiJinCrawlerUploadImageInfoListRequest ziJinCrawlerUploadImageInfoListRequest, HttpHeaders headers) throws Exception {
+        //设置headers
+        HttpHeaders httpHeaders = setHttpHeaders();
+
+        String jsonString = JSON.toJSONString(ziJinCrawlerUploadImageInfoListRequest);
+        log.info("ziJinCrawlerUploadImageInfoListRequest请求参数的值:{}", jsonString);
+        ResponseEntity<ZiJinCrawlerImageUploadInfoListResponse> responseEntity = requestComponent.post(RequestUrl.UPLOAD_IMAGE_INFO_LIST.getRequestUrl(ziJinCrawlerProperties.getBaseUrl()), jsonString, ZiJinCrawlerImageUploadInfoListResponse.class, httpHeaders);
+        return responseEntity.getBody();
+    }
+
+
 
     /**
      * 获取支付链接
@@ -368,7 +385,7 @@ public class ZiJinCrawlerRequestComponent {
      */
     public ZiJinCrawlerQueryOrderStatusResponse queryOrderStatus(ZiJinCrawlerQueryOrderStatusRequest ziJinCrawlerQueryOrderStatusRequest, HttpHeaders headers) throws IOException {
         //设置headers
-        HttpHeaders httpHeaders = setHttpHeaders1();
+        HttpHeaders httpHeaders = setHttpHeaders();
 
         String jsonString = JSON.toJSONString(ziJinCrawlerQueryOrderStatusRequest);
         log.info("ziJinCrawlerQueryOrderStatusRequest请求参数的值:{}", jsonString);
@@ -512,6 +529,7 @@ public class ZiJinCrawlerRequestComponent {
         headers.set("sec-ch-ua-mobile", "?0");
         headers.set("sec-ch-ua-platform", "\"Windows\"");
         headers.set("x-csrf-token", "CrwLEmSfUevAb8PcN7kXff-I");
+        headers.set("content-type", "application/json");
         return headers;
     }
 

+ 7 - 0
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/request/ZiJinCrawlerQueryOrderStatusRequest.java

@@ -77,4 +77,11 @@ public class ZiJinCrawlerQueryOrderStatusRequest implements Serializable {
     @JsonProperty("orderOrigin")
     @JSONField(ordinal = 8)
     private String orderOrigin;
+
+    /**
+     * 许可证号:传车牌号
+     */
+    @JsonProperty("licenseNo")
+    @JSONField(ordinal = 9)
+    private String licenseNo;
 }

+ 1 - 1
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/request/ZiJinCrawlerQuotationRequest.java

@@ -353,7 +353,7 @@ public class ZiJinCrawlerQuotationRequest implements Serializable {
         private String renewalFlag;
 
         /**
-         *
+         * 续保标志
          */
         @JsonProperty("renewalFlagCI")
         private String renewalFlagCI;

+ 54 - 0
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/request/ZiJinCrawlerUploadImageInfoListRequest.java

@@ -0,0 +1,54 @@
+package com.jzg.quotation.zijin.crawler.entity.request;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.quotation.zijin.api.entity.request.UploadFileRequest;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @description:
+ * @author:
+ * @date:
+ **/
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+public class ZiJinCrawlerUploadImageInfoListRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 5189448987075578164L;
+
+    @JsonProperty("itemFileDataList")
+    private List<ItemFileDataListDTO> itemFileDataList;
+
+    @JsonProperty("orderId")
+    private String orderId;
+
+
+    @NoArgsConstructor
+    @Data
+    @Builder
+    public static class ItemFileDataListDTO implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = -8088228995799949015L;
+
+        @JsonProperty("fileId")
+        private String fileId;
+
+        @JsonProperty("fileType")
+        private String fileType;
+
+        public ItemFileDataListDTO(String fileId, String fileType) {
+            this.fileId = fileId;
+            this.fileType = fileType;
+        }
+    }
+}

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

@@ -0,0 +1,37 @@
+package com.jzg.quotation.zijin.crawler.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @description: 紫金财险爬虫影像上传列表响应实体类
+ * @author:
+ * @date:
+ **/
+@Data
+public class ZiJinCrawlerImageUploadInfoListResponse implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -7410523311993599009L;
+
+    /**
+     * 响应状态码
+     */
+    @JsonProperty("rtnCode")
+    private String rtnCode;
+
+    /**
+     * 响应状态描述
+     */
+    @JsonProperty("rtnMsg")
+    private String rtnMsg;
+
+    /**
+     * 影像ID
+     */
+    @JsonProperty("recoFailedImageIdList")
+    private String recoFailedImageIdList;
+}

+ 3 - 2
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/enums/RequestUrl.java

@@ -23,8 +23,8 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
     GET_ACTUAL_VALUE("/api/v1/insurance/public/vehicle-proposal/vehicleModel/getActualValue", "获取车辆实际价值"),
     PRICE("/api/v1/vehicle/proposal-process/premium-calculation", "计算保费"),
     SAVE_QUOTE_INFORMATION("/dpgateway/insurance-order/order/save", "保存报价信息"),
-    // 报价提示转保标志,紫金系统调用该接口自动输入验证码跳过转保标志继续报价(二维码是报价接口失败返回:basePart.question)
-    SKIP_SING("/egg/controller/common/recognizeCodes", "跳过转保标志"),
+    // 报价提示转保标志,紫金系统调用该接口自动输入验证码跳过转保标志继续报价
+    SKIP_SING("/egg/controller/common/recognizeCodes", "转保标志"),
     SAVE_PROPOSAL_ORDER("/kscd-frontend/order/saveProposal", "保存投保单"),
     // 税务登记证号
     GET_TAX_REGISTRY_NUMBER("/temp/api/v1/insurance/public/taxInfo/getTaxRegistryNumber", "获取税务登记证号"),
@@ -32,6 +32,7 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
     UNDERWRITING("/kscd-frontend/carAutoUnderwriting", "核保"),
     //上传影像
     UPLOAD_IMAGE("/dpgateway/insurance-order/carInsurance/uploadFile", "上传影像"),
+    UPLOAD_IMAGE_INFO_LIST("/dpgateway/insurance-order/carInsurance/uploadImageInfoList", "上传影像列表"),
     // 支付链接
     QRCODE("/api/v1/insurance/public/paymentApplication/pushMessage", "支付二维码"),
     // 查询订单状态

+ 2 - 1
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/service/ZiJinCrawlerOrderService.java

@@ -3,6 +3,7 @@ package com.jzg.quotation.zijin.crawler.service;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.quotation.zijin.crawler.entity.po.ZiJinCrawlerOrder;
 import com.jzg.quotation.zijin.crawler.entity.response.ZiJinCrawlerQuotationResponse;
+import com.jzg.quotation.zijin.crawler.entity.response.ZiJinCrawlerSaveProposalResponse;
 
 /**
  * @description: 紫金财险爬虫订单服务
@@ -17,7 +18,7 @@ public interface ZiJinCrawlerOrderService {
      * @param ziJinCrawlerQuotationResponse
      * @param success
      */
-    void save(QuoteVo quoteVo, ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse, boolean success);
+    void save(QuoteVo quoteVo, ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse, ZiJinCrawlerSaveProposalResponse ziJinCrawlerSaveProposalResponse, String orderId, boolean success);
 
     /**
      * 根据系统内部订单号查询紫金财险爬虫订单

+ 11 - 12
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/service/impl/ZiJinCrawlerOrderServiceImpl.java

@@ -3,6 +3,7 @@ package com.jzg.quotation.zijin.crawler.service.impl;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.quotation.zijin.crawler.entity.po.ZiJinCrawlerOrder;
 import com.jzg.quotation.zijin.crawler.entity.response.ZiJinCrawlerQuotationResponse;
+import com.jzg.quotation.zijin.crawler.entity.response.ZiJinCrawlerSaveProposalResponse;
 import com.jzg.quotation.zijin.crawler.repository.ZiJinCrawlerOrderRepository;
 import com.jzg.quotation.zijin.crawler.service.ZiJinCrawlerOrderService;
 import lombok.RequiredArgsConstructor;
@@ -23,29 +24,27 @@ public class ZiJinCrawlerOrderServiceImpl implements ZiJinCrawlerOrderService {
 
     /**
      * 保存紫金财险爬虫订单
+     *
      * @param quoteVo
      * @param ziJinCrawlerQuotationResponse
      * @param success
      */
     @Override
-    public void save(QuoteVo quoteVo, ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse, boolean success) {
+    public void save(QuoteVo quoteVo, ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse, ZiJinCrawlerSaveProposalResponse ziJinCrawlerSaveProposalResponse, String orderId, boolean success) {
         ZiJinCrawlerOrder order = new ZiJinCrawlerOrder();
         order.setOrdersNo(quoteVo.getOrder().getOrdersNo());
         order.setOrderNo(ziJinCrawlerQuotationResponse.getOrderNo());
-        /*order.setOrderNo(ziJinCrawlerQuotationResponse.getData().getBusUniqueId());
-        order.setBusUniqueId(ziJinCrawlerQuotationResponse.getData().getBusUniqueId());
+        order.setBusUniqueId(orderId);
         order.setQuoteSuccess(success);
-
-        if (ziJinCrawlerQuotationResponse.getData().getTrafficPolicy() != null) {
-            order.setCiApplyNo(ziJinCrawlerQuotationResponse.getData().getTrafficPolicy().getApplicationNo());
-            order.setCiPremium(ziJinCrawlerQuotationResponse.getData().getTrafficPolicy().getPremium());
+        if (success && ziJinCrawlerSaveProposalResponse != null) {
+            order.setCiApplyNo(ziJinCrawlerSaveProposalResponse.getData().getProposalNoCI());
+            order.setCiPolicyNo(ziJinCrawlerSaveProposalResponse.getData().getPolicyNoCI());
+            // order.setCiPremium(ziJinCrawlerQuotationResponse.getData().getTrafficPolicy().getPremium());
+            order.setSyApplyNo(ziJinCrawlerSaveProposalResponse.getData().getProposalNo());
+            order.setBiPolicyNo(ziJinCrawlerSaveProposalResponse.getData().getPolicyNo());
+            // order.setBiPremium(ziJinCrawlerQuotationResponse.getData().getBusinessPolicy().getPremium());
         }
 
-        if (ziJinCrawlerQuotationResponse.getData().getBusinessPolicy() != null) {
-            order.setSyApplyNo(ziJinCrawlerQuotationResponse.getData().getBusinessPolicy().getApplicationNo());
-            order.setBiPremium(ziJinCrawlerQuotationResponse.getData().getBusinessPolicy().getPremium());
-        }*/
-
         order.setCreateTime(LocalDateTime.now());
         order.setUpdateTime(LocalDateTime.now());
         if (!success) {

+ 43 - 126
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/service/impl/ZiJinCrawlerRequestImpl.java

@@ -13,12 +13,16 @@ import com.jzg.commons.entity.quote.vo.base.OrderBase;
 import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
-import com.jzg.quotation.commons.client.PlatformClient;
 import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.DetectLoginRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaRequest;
+import com.jzg.quotation.commons.entity.GetCaptchaResponse;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
+import com.jzg.quotation.commons.utils.DateTimeUtil;
 import com.jzg.quotation.zijin.api.constant.enums.MotorVehicleInsuranceEnum;
 import com.jzg.quotation.zijin.api.constant.enums.RiskCodeEnum;
+import com.jzg.quotation.zijin.api.entity.request.UploadImageInfoListRequest;
+import com.jzg.quotation.zijin.crawler.build.ZiJinCrawlerQuoteRequestBuild;
 import com.jzg.quotation.zijin.crawler.build.ZiJinCrawlerQuoteResultsVoBuild;
 import com.jzg.quotation.zijin.crawler.build.ZiJinCrawlerSaveQuoteInfoRequestBuild;
 import com.jzg.quotation.zijin.crawler.component.ZiJinBuildingAttributionInformation;
@@ -33,7 +37,6 @@ import com.jzg.quotation.zijin.crawler.service.ZiJinCrawlerOrderService;
 import com.jzg.quotation.zijin.crawler.service.ZiJinCrawlerQuoteProcessService;
 import com.jzg.quotation.zijin.crawler.service.ZiJinCrawlerRequest;
 import com.jzg.quotation.zijin.crawler.util.Base64ImageExtractor;
-import com.jzg.quotation.zijin.crawler.util.RS6Item;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
@@ -72,7 +75,7 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
 
     private final ZiJinCrawlerQuoteProcessService ziJinCrawlerQuoteProcessService;
 
-    private final PlatformClient platformClient;
+    private final ZiJinCrawlerSaveQuoteInfoRequestBuild ziJinCrawlerSaveQuoteInfoRequestBuild;
 
 
     /**
@@ -85,6 +88,11 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
         ziJinCrawlerQuoteProcessService.login(loginBase.getUsername(), loginBase.getPassword());
     }
 
+    @Override
+    public GetCaptchaResponse getCaptcha(GetCaptchaRequest sendCaptchaRequest) {
+        return null;
+    }
+
     @Override
     public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         return ziJinCrawlerQuoteProcessService.detectLogin(detectLoginRequest);
@@ -206,32 +214,23 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
             // 转保标志
             if (ResponseCode.R_0001.getCode().equals(ziJinCrawlerQuotationResponse.getRtnCode())) {
                 if (ziJinCrawlerQuotationResponse.getBasePart() != null) {
-                    ZiJinCrawlerRecognizeCodesResponse ziJinCrawlerRecognizeCodesResponse = ziJinCrawlerRequestComponent.recognizeCodes(ZiJinCrawlerSaveQuoteInfoRequestBuild.buildRecognizeCodesRequests(ziJinCrawlerQuotationResponse), headers);
+                    ZiJinCrawlerRecognizeCodesResponse ziJinCrawlerRecognizeCodesResponse = ziJinCrawlerRequestComponent.recognizeCodes(ZiJinCrawlerQuoteRequestBuild.buildRecognizeCodesRequests(ziJinCrawlerQuotationResponse), headers);
                     log.info("ziJinCrawlerRecognizeCodesResponse参数的值:{}", JSON.toJSONString(ziJinCrawlerRecognizeCodesResponse));
-                    // 再次调用报价接口
+                    // 验证码通过后再次调用报价接口
                     if (ResponseCode.R_0000.getCode().equals(ziJinCrawlerRecognizeCodesResponse.getRtnCode())) {
-                        List<ZiJinCrawlerRecognizeCodesResponse.Results> results = ziJinCrawlerRecognizeCodesResponse.getResults();
-                        for (ZiJinCrawlerRecognizeCodesResponse.Results result : results) {
-                            if ("question".equals(result.getSerialNo())) {
-                                ziJinCrawlerQuotationRequest.getBaseInfo().setAnswer(result.getResult());
-                            }
-                            if ("questionCI".equals(result.getSerialNo())) {
-                                ziJinCrawlerQuotationRequest.getBaseInfo().setAnswerCI(result.getResult());
-                            }
-                            ziJinCrawlerQuotationRequest.getBaseInfo().setRenewalFlagCI("1");
-                        }
+                        ZiJinCrawlerQuoteRequestBuild.buildReQuote(ziJinCrawlerQuotationResponse, ziJinCrawlerRecognizeCodesResponse, ziJinCrawlerQuotationRequest);
                         ziJinCrawlerQuotationResponse = ziJinCrawlerRequestComponent.quotation(ziJinCrawlerQuotationRequest, headers);
                     }
                 }
             }
             // 4.0 处理报价失败
             if (!ResponseCode.R_0000.getCode().equals(ziJinCrawlerQuotationResponse.getRtnCode())) {
-                ziJinCrawlerOrderService.save(quoteVo, ziJinCrawlerQuotationResponse, false);
+                ziJinCrawlerOrderService.save(quoteVo, ziJinCrawlerQuotationResponse, null, ziJinCrawlerQuotationRequest.getOrderId(), false);
                 return ZiJinCrawlerQuoteResultsVoBuild.buildQuoteFailResultsVo(ziJinCrawlerQuotationResponse);
             } else {
                 // 报价成功
                 // 保存报价信息
-                ZiJinCrawlerSaveQuoteInfoRequest ziJinCrawlerSaveQuoteInfoRequest = buildSaveQuoteInfoRequest(quoteVo, ziJinCrawlerQuotationRequest, ziJinCrawlerQuotationResponse);
+                ZiJinCrawlerSaveQuoteInfoRequest ziJinCrawlerSaveQuoteInfoRequest = ziJinCrawlerSaveQuoteInfoRequestBuild.buildSaveQuoteInfoRequest(quoteVo, ziJinCrawlerQuotationRequest, ziJinCrawlerQuotationResponse);
                 log.info("ziJinCrawlerSaveQuoteInfoRequest参数的值:{}", JSON.toJSONString(ziJinCrawlerSaveQuoteInfoRequest));
                 ZiJinCrawlerSaveQuoteInfoResponse ziJinCrawlerSaveQuoteInfoResponse = ziJinCrawlerRequestComponent.saveQuoteInformation(ziJinCrawlerSaveQuoteInfoRequest, headers);
                 log.info("ziJinCrawlerSaveQuoteInfoResponse参数的值:{}", JSON.toJSONString(ziJinCrawlerSaveQuoteInfoResponse));
@@ -244,7 +243,7 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
                 ZiJinCrawlerSaveProposalResponse ziJinCrawlerSaveProposalResponse = ziJinCrawlerRequestComponent.saveProposal(ziJinCrawlerSaveProposalRequest, headers);
                 log.info("ziJinCrawlerSaveProposalResponse参数的值:{}", JSON.toJSONString(ziJinCrawlerSaveProposalResponse));
 
-                ziJinCrawlerOrderService.save(quoteVo, ziJinCrawlerQuotationResponse, true);
+                ziJinCrawlerOrderService.save(quoteVo, ziJinCrawlerQuotationResponse, ziJinCrawlerSaveProposalResponse, ziJinCrawlerQuotationRequest.getOrderId(), true);
                 return ZiJinCrawlerQuoteResultsVoBuild.buildQuoteResultsVo(quoteVo.getOrder().getOrdersNo(), quoteVo, ziJinCrawlerQuotationResponse);
             }
         } catch (Exception e) {
@@ -269,7 +268,7 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
 
         ZiJinCrawlerUnderwritingResponse ziJinCrawlerUnderwritingResponse = null;
         try {
-            ZiJinCrawlerUnderwritingRequest ziJinCrawlerUnderwritingRequest = new ZiJinCrawlerUnderwritingRequest("KSCD_PROD", ziJinCrawlerOrder.getOrdersNo());
+            ZiJinCrawlerUnderwritingRequest ziJinCrawlerUnderwritingRequest = new ZiJinCrawlerUnderwritingRequest("KSCD_PROD", ziJinCrawlerOrder.getOrderNo());
             // 核保
             ziJinCrawlerUnderwritingResponse = ziJinCrawlerRequestComponent.underwriting(ziJinCrawlerUnderwritingRequest, headers);
             log.info("ziJinCrawlerUnderwritingResponse参数的值:{}", JSON.toJSONString(ziJinCrawlerUnderwritingResponse));
@@ -381,7 +380,7 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
             }
 
             // 单个上传影像
-            List<ZiJinCrawlerSaveQuoteInfoRequest.ItemFileData.FileInfo> dataDTOS = new ArrayList<>();
+            List<ZiJinCrawlerUploadImageInfoListRequest.ItemFileDataListDTO> dataDTOS = new ArrayList<>();
 
             for (InsuranceImageVo insuranceImageVo : insuranceUploadImageVo.getImageVoList()) {
                 if (insuranceImageVo == null) {
@@ -403,24 +402,21 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
 
                 // 构建上传影像文件请求参数
                 ZiJinCrawlerImageUploadRequest ziJinCrawlerImageUploadRequest = new ZiJinCrawlerImageUploadRequest();
-
                 // 根据图片格式动态设置MIME类型
                 String imageName = imageDTO.getImageName();
                 String mimeType = Base64ImageExtractor.getImageMimeType(imageName);
                 ziJinCrawlerImageUploadRequest.setFileBase64(mimeType + imageDTO.getImageBase64Str());
                 ziJinCrawlerImageUploadRequest.setFileName(imageName);
-
                 // 设置文件类型,转换为紫金对应的文件类型
                 String fileType = getFileTypeByImageCode(insuranceImageVo.getImageCode());
                 ziJinCrawlerImageUploadRequest.setFileType(fileType);
                 ziJinCrawlerImageUploadRequest.setOrderNo(ziJinCrawlerOrder.getOrderNo());
-
                 ZiJinCrawlerImageUploadResponse ziJinCrawlerImageUploadResponse = ziJinCrawlerRequestComponent.uploadImage(ziJinCrawlerImageUploadRequest, headers);
                 log.info("影像上传响应,订单号:{},响应:{}", ziJinCrawlerOrder.getOrderNo(), JSON.toJSONString(ziJinCrawlerImageUploadResponse));
 
                 if ("0000".equals(ziJinCrawlerImageUploadResponse.getRtnCode())) {
 
-                    ZiJinCrawlerSaveQuoteInfoRequest.ItemFileData.FileInfo fileInfo = ZiJinCrawlerSaveQuoteInfoRequest.ItemFileData.FileInfo.builder()
+                    ZiJinCrawlerUploadImageInfoListRequest.ItemFileDataListDTO fileInfo = ZiJinCrawlerUploadImageInfoListRequest.ItemFileDataListDTO.builder()
                             .fileId(ziJinCrawlerImageUploadResponse.getFileId())
                             .fileType(fileType)
                             .build();
@@ -429,7 +425,6 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
 
                     log.info("影像上传成功,订单号:{},影像编码:{},影像ID:{}", ziJinCrawlerOrder.getOrderNo(), insuranceImageVo.getImageCode(), ziJinCrawlerImageUploadResponse.getFileId());
                 } else {
-
                     String errorMsg = String.format("影像上传失败,订单号:%s,影像编码:%s,错误码:%s,错误信息:%s", ziJinCrawlerOrder.getOrderNo(), insuranceImageVo.getImageCode(), ziJinCrawlerImageUploadResponse.getRtnCode(), ziJinCrawlerImageUploadResponse.getRtnMsg());
                     log.error(errorMsg);
                     throw new RuntimeException(errorMsg);
@@ -440,6 +435,10 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
                 return;
             }
 
+            ZiJinCrawlerUploadImageInfoListRequest ziJinCrawlerUploadImageInfoListRequest = new ZiJinCrawlerUploadImageInfoListRequest(dataDTOS, ziJinCrawlerOrder.getBusUniqueId());
+            // 保存影像信息
+            ziJinCrawlerRequestComponent.uploadImageInfoList(ziJinCrawlerUploadImageInfoListRequest, headers);
+
             // 缓存影像信息
             ziJinCrawlerCacheComponent.cacheImagesInfo(ziJinCrawlerOrder.getOrderNo(), dataDTOS);
 
@@ -456,19 +455,19 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
      * @return 文件类型
      */
     private String getFileTypeByImageCode(String imageCode) {
-        if (!StringUtils.hasLength(imageCode)) {
-            return "9";
-        }
         switch (imageCode) {
             case "C01":
-                return "9";
             case "D01":
                 return "56";
             case "C02":
             case "D02":
+            case "C03":
+            case "D03":
+            case "C04":
+            case "D04":
                 return "53";
             default:
-                return "9";
+                return "";
         }
     }
 
@@ -495,12 +494,13 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
             // 设置请求参数
             ziJinCrawlerQueryOrderStatusRequest.setOrderStatus(new String[]{});
             ziJinCrawlerQueryOrderStatusRequest.setOrderNo(ziJinCrawlerOrder.getOrderNo());
-            ziJinCrawlerQueryOrderStatusRequest.setUpdateTimeBegin("");
-            ziJinCrawlerQueryOrderStatusRequest.setUpdateTimeEnd("");
+            ziJinCrawlerQueryOrderStatusRequest.setLicenseNo(orderStatusVo.getCarInfo().getLicenseNo());
+            ziJinCrawlerQueryOrderStatusRequest.setUpdateTimeBegin(DateTimeUtil.getLocalDateStr());
+            ziJinCrawlerQueryOrderStatusRequest.setUpdateTimeEnd(DateTimeUtil.getLocalDateStr());
             ziJinCrawlerQueryOrderStatusRequest.setPageNum(1);
             ziJinCrawlerQueryOrderStatusRequest.setPageSize(10);
             ziJinCrawlerQueryOrderStatusRequest.setProductCodeList(new String[]{});
-            ziJinCrawlerQueryOrderStatusRequest.setOrderOrigin("KSCD_PROD,FH_PROD,DP_WXMP,DP_ZYB,RENEWAL_PROD,DP_ZNCD,SHHTB_B");
+            ziJinCrawlerQueryOrderStatusRequest.setOrderOrigin("KSCD_PROD,FH_PROD,DP_WXMP,DP_ZYB,RENEWAL_PROD,DP_ZNCD,SHHTB_B,QYYGTB");
 
             ZiJinCrawlerQueryOrderStatusResponse ziJinCrawlerQueryOrderStatusResponse = ziJinCrawlerRequestComponent.queryOrderStatus(ziJinCrawlerQueryOrderStatusRequest, headers);
             log.info("ziJinCrawlerQueryOrderStatusResponse对象的值:{}", JSON.toJSONString(ziJinCrawlerQueryOrderStatusResponse));
@@ -513,6 +513,10 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
                 orderStatusEnum = InsOrderStatusEnum.valueOf("ORDER_CLOSE");
                 orderStatus = orderStatusEnum.getCode();
             }
+            if ("9".equals(orderStatus)) {
+                orderStatusEnum = InsOrderStatusEnum.valueOf("AUDIT_FAIL");
+                orderStatus = orderStatusEnum.getCode();
+            }
             OrderStatusResultVo orderStatusResultVo = new OrderStatusResultVo();
             // 将订单状态转换为枚举类型
             orderStatusResultVo.setOrderStatus(orderStatusEnum);
@@ -802,11 +806,15 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
         baseInfo.setHanderCode("214003263");
         baseInfo.setHanderName("程涛");
         baseInfo.setDemandNo("01ZKIC140026051910017933666448");
-        baseInfo.setDemandNoCI("01ZKIC140026051910017933666448");// 这个先放开看行不
+        if (quoteVo.getBiRiskInfoVo() != null) {
+            baseInfo.setDemandNoCI("01ZKIC140026051910017933666448");// 这个先放开看行不
+        }
         // 经测试:燃油: 单交设为2,交三设为0
         baseInfo.setCalculateFlag(quoteVo.getBiRiskInfoVo() == null ? "2" : "0");
-        // 经测试:燃油:单交设为"",交三设为1
+        // 经测试:燃油:单交设为"",交三设为1?。 这个是续保标志,延顺日期的时候设置为1(完了测试一下)
         baseInfo.setRenewalFlag(quoteVo.getBiRiskInfoVo() == null ? "" : "1");
+        // 经测试:燃油:单交设为"",交三设为1?。 这个是续保标志,延顺日期的时候设置为1(完了测试一下)
+        baseInfo.setRenewalFlagCI(quoteVo.getBiRiskInfoVo() == null ? "" : "1");
         return baseInfo;
     }
 
@@ -1122,7 +1130,6 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
                 item.setUnitAmount(kindItem.getUnitAmount());
                 item.setServiceTimes(kindItem.getServiceTimes());
                 item.setQuantity(ObjectUtils.isEmpty(kindItem.getQuantity()) ? null : Integer.parseInt(kindItem.getQuantity()));
-                item.setDeductibleRate(ObjectUtils.isEmpty(kindItem.getDeductibleRate()) ? null : Integer.parseInt(kindItem.getDeductibleRate()));
                 itemKindList.add(item);
             }
         }
@@ -1731,97 +1738,7 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
         return profitDataList;
     }
 
-    /**
-     * 构建保存报价信息请求对象
-     *
-     * @return 构建完成的保存报价信息请求对象
-     */
-    private ZiJinCrawlerSaveQuoteInfoRequest buildSaveQuoteInfoRequest(QuoteVo quoteVo, ZiJinCrawlerQuotationRequest ziJinCrawlerQuotationRequest, ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
-        ZiJinCrawlerSaveQuoteInfoRequest ziJinCrawlerSaveQuoteInfoRequest = new ZiJinCrawlerSaveQuoteInfoRequest();
-
-        // 设置代理人代码
-        ziJinCrawlerSaveQuoteInfoRequest.setAgentCode(ziJinCrawlerQuotationRequest.getBaseInfo().getAgentCode());
-
-        // 设置订单ID
-        ziJinCrawlerSaveQuoteInfoRequest.setOrderId(ziJinCrawlerQuotationResponse.getOrderId());
-
-        // 设置订单号
-        ziJinCrawlerSaveQuoteInfoRequest.setOrderNo(ziJinCrawlerQuotationResponse.getOrderNo());
-
-        // 设置基础信息
-        ziJinCrawlerSaveQuoteInfoRequest.setBaseInfo(ZiJinCrawlerSaveQuoteInfoRequestBuild.buildSaveBaseInfo(quoteVo, ziJinCrawlerQuotationRequest, ziJinCrawlerQuotationResponse));
-
-        // 设置车主信息
-        ziJinCrawlerSaveQuoteInfoRequest.setCarOwnerInfo(ZiJinCrawlerSaveQuoteInfoRequestBuild.buildSaveCarOwnerInfo(quoteVo, ziJinCrawlerQuotationRequest));
 
-        // 设置车险附加险信息列表
-        ziJinCrawlerSaveQuoteInfoRequest.setCarPolicySubInfoList(ZiJinCrawlerSaveQuoteInfoRequestBuild.buildSaveCarPolicySubInfo(ziJinCrawlerQuotationRequest));
 
-        // 设置附加险列表
-        ziJinCrawlerSaveQuoteInfoRequest.setAttachRiskList(new ArrayList<>());
 
-        // 设置 投保人/被保人 列表
-        ziJinCrawlerSaveQuoteInfoRequest.setInsuredList(ZiJinCrawlerSaveQuoteInfoRequestBuild.buildSaveInsuredList(quoteVo, ziJinCrawlerQuotationRequest));
-
-        // 设置险别明细列表
-        ziJinCrawlerSaveQuoteInfoRequest.setItemKindList(ZiJinCrawlerSaveQuoteInfoRequestBuild.buildSaveItemKindList(ziJinCrawlerQuotationResponse));
-
-        // 设置收费信息列表
-        ziJinCrawlerSaveQuoteInfoRequest.setChargingInfoList(new ArrayList<>());
-
-        // 设置订单来源
-        ziJinCrawlerSaveQuoteInfoRequest.setOrderOrigin("KSCD_PROD");
-
-        // 设置产品代码
-        ziJinCrawlerSaveQuoteInfoRequest.setProductCode("CAR20190517");
-
-        // 设置产品名称
-        ziJinCrawlerSaveQuoteInfoRequest.setProductName("机动车保险");
-
-        // 设置提交信息
-        ziJinCrawlerSaveQuoteInfoRequest.setSubmitInfo(new HashMap<>());
-
-        // 设置车船税减免信息
-        ziJinCrawlerSaveQuoteInfoRequest.setTaxRelifInfo(ZiJinCrawlerSaveQuoteInfoRequestBuild.buildSaveTaxRelifInfo(ziJinCrawlerQuotationResponse));
-
-        // 设置终端ID
-        ziJinCrawlerSaveQuoteInfoRequest.setTerminalId("KSCD");
-
-        // 设置终端类型
-        ziJinCrawlerSaveQuoteInfoRequest.setTerminalIdType("Vue-PC");
-
-        // 设置投保标识
-        ziJinCrawlerSaveQuoteInfoRequest.setInsuranceSign("0");
-
-        // 设置车辆信息
-        ziJinCrawlerSaveQuoteInfoRequest.setVehicleInfo(ZiJinCrawlerSaveQuoteInfoRequestBuild.buildVehicleInfo(ziJinCrawlerQuotationRequest, ziJinCrawlerQuotationResponse));
-
-        // 设置车辆设备保费列表
-        ziJinCrawlerSaveQuoteInfoRequest.setCarDevicePremiumDtoList(new ArrayList<>());
-
-        // 设置约定列表
-        ziJinCrawlerSaveQuoteInfoRequest.setEngageList(new ArrayList<>());
-
-        // 设置附件文件列表
-        ziJinCrawlerSaveQuoteInfoRequest.setItemFileDataList(buildSaveFileDataList(ziJinCrawlerQuotationResponse));
-
-        // 设置订单附加信息
-        ziJinCrawlerSaveQuoteInfoRequest.setOrderAttachInfo(ZiJinCrawlerSaveQuoteInfoRequestBuild.buildSaveOrderAttachInfo(quoteVo, ziJinCrawlerQuotationRequest));
-
-        // 设置是否包含子机构
-        ziJinCrawlerSaveQuoteInfoRequest.setIsIncludeSubCom(1);
-
-        return ziJinCrawlerSaveQuoteInfoRequest;
-    }
-
-    private List<ZiJinCrawlerSaveQuoteInfoRequest.ItemFileData> buildSaveFileDataList(ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
-        // 获取图片上传信息
-        List<ZiJinCrawlerSaveQuoteInfoRequest.ItemFileData.FileInfo> imagesInfoList = ziJinCrawlerCacheComponent.getImagesInfo(ziJinCrawlerQuotationResponse.getOrderNo());
-        return Optional.ofNullable(ziJinCrawlerQuotationResponse.getItemKindList()).orElseGet(Collections::emptyList).stream().map(itemKindListDTO ->
-                ZiJinCrawlerSaveQuoteInfoRequest.ItemFileData.builder()
-                        .riskCode(itemKindListDTO.getRiskCode())
-                        .fileList(imagesInfoList)
-                        .build()
-        ).toList();
-    }
 }

+ 7 - 0
tenant/organization/src/main/java/com/jzg/organization/controller/AgreementRulesController.java

@@ -67,6 +67,13 @@ public class AgreementRulesController extends BaseController {
         return HttpResult.ok(agreementRulesService.deleteById(id)? "删除成功":"删除失败");
     }
 
+    @Operation(summary = "根据父ID查询规则列表")
+    @GetMapping("/rulesListByParentId")
+    public HttpResult<List<AgreementRulesVo>> rulesListByParentId(String parentId) {
+        List<AgreementRulesVo> rulesVos = agreementRulesService.queryListByParentId(parentId);
+        return HttpResult.ok(rulesVos);
+    }
+
     @Operation(summary = "获取承保规则明细")
     @GetMapping("getRuleInfo")
     public HttpResult getRuleInfo(String ruleId){

+ 13 - 4
tenant/organization/src/main/java/com/jzg/organization/controller/AmountAuditingController.java

@@ -4,10 +4,7 @@ import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.core.page.HttpResult;
-import com.jzg.commons.entity.dto.AmountAuditEditParam;
-import com.jzg.commons.entity.dto.AmountAuditParam;
-import com.jzg.commons.entity.dto.AmountAuditRejectParam;
-import com.jzg.commons.entity.dto.ApplyWithdrawParam;
+import com.jzg.commons.entity.dto.*;
 import com.jzg.commons.entity.vo.AmountAuditVo;
 import com.jzg.organization.service.SysAmountAuditingService;
 import io.swagger.v3.oas.annotations.Operation;
@@ -122,6 +119,18 @@ public class AmountAuditingController extends BaseController {
         return HttpResult.ok(amountAuditVoPage);
     }
 
+    /**
+     * 导出业务员收支明细
+     *
+     * @author lipf
+     * @date 2026/6/8 18:52
+     */
+    @PostMapping("/exportYwyIORecs")
+    @Operation(summary = "导出业务员收支明细")
+    public HttpResult<String> exportYwyIORecs(@RequestBody YwyIOParam ywyIOParam) {
+        return HttpResult.ok(sysAmountAuditingService.exportYwyIORecs(ywyIOParam));
+    }
+
     @PostMapping("/myPaymentTotalWithdrawalAmount")
     @Operation(summary = "我的付款提现金额总计")
     public HttpResult<String> myPaymentTotalWithdrawalAmount(@RequestBody AmountAuditParam param){

+ 27 - 2
tenant/organization/src/main/java/com/jzg/organization/controller/UserAccountController.java

@@ -4,7 +4,7 @@ package com.jzg.organization.controller;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.core.page.HttpResult;
-import com.jzg.commons.entity.account.po.SysUserAccountIncomeLog;
+import com.jzg.commons.entity.account.po.SysUserAccountChangeLog;
 import com.jzg.commons.entity.dto.IncomeAndExpenseParam;
 import com.jzg.commons.entity.dto.SysUserAccountPageParam;
 import com.jzg.commons.entity.dto.SysUserAccountParam;
@@ -15,11 +15,13 @@ import com.jzg.organization.service.SysUserAccountIncomeLogService;
 import com.jzg.organization.service.SysUserAccountService;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
+@Slf4j
 @Tag(name="用户账户接口")
 @RestController
 @RequestMapping("/userAccount")
@@ -95,8 +97,31 @@ public class UserAccountController {
 
     @Operation(summary = "添加用户钱包账户记录")
     @PostMapping("/addUserAccountIncomeLog")
-    public HttpResult addUserAccountIncomeLog(@RequestBody List<SysUserAccountIncomeLog> incomeLogs){
+    public HttpResult addUserAccountIncomeLog(@RequestBody List<SysUserAccountChangeLog> incomeLogs){
         return HttpResult.ok(sysUserAccountIncomeLogService.saveBatch(incomeLogs));
     }
 
+
+    /**
+     * 添加用户钱包账户记录
+     *
+     * @param changeLog 用户钱包记录
+     * @author lipf
+     * @date 2026/6/8 10:17
+     */
+    @Operation(summary = "添加用户钱包账户记录")
+    @PostMapping("/addUserAccountChangeLog")
+    public HttpResult<String> addUserAccountChangeLog(@RequestBody SysUserAccountChangeLog changeLog){
+        try{
+           boolean save = sysUserAccountIncomeLogService.save(changeLog);
+            if(save){
+                return HttpResult.ok("保存业务员账号明细成功");
+            }
+            return HttpResult.error();
+        }catch (Exception e){
+            log.error("保存业务员账号明细异常", e);
+            return HttpResult.error(e.getMessage());
+        }
+    }
+
 }

+ 14 - 0
tenant/organization/src/main/java/com/jzg/organization/mapper/InvAccountCardMapper.java

@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jzg.commons.entity.account.vo.AccountCardVo;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
 * @author dongxin
 * @description 针对表【inv_account_card(账户信息表)】的数据库操作Mapper
@@ -29,6 +31,18 @@ public interface InvAccountCardMapper extends BaseMapper<InvAccountCard> {
      * @return
      */
     AccountCardVo queryById(@Param("id") String id);
+
+    /**
+     * 查询业务员提现银行卡信息
+     *
+     * @param systemCode 租户代码
+     * @param accountId 银行卡号
+     * @author lipf
+     * @date 2026/6/8 15:14
+     */
+    List<InvAccountCard> queryByAccountId(@Param("accountId") String accountId,
+                                          @Param("systemCode") String systemCode);
+
 }
 
 

+ 8 - 0
tenant/organization/src/main/java/com/jzg/organization/mapper/PtlAgreementUndwrtRulesMapper.java

@@ -22,6 +22,14 @@ public interface PtlAgreementUndwrtRulesMapper extends BaseMapper<PtlAgreementUn
      * @return List<AgreementRulesVo>
      */
     List<AgreementRulesVo> queryList(@Param("agreementId") String agreementId);
+
+    /**
+     * 根据父ID查询规则列表
+     *
+     * @param parentId 父规则ID
+     * @return List<AgreementRulesVo>
+     */
+    List<AgreementRulesVo> queryListByParentId(@Param("parentId") String parentId);
 }
 
 

+ 18 - 2
tenant/organization/src/main/java/com/jzg/organization/mapper/SysUserAccountIncomeLogMapper.java

@@ -1,9 +1,25 @@
 package com.jzg.organization.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.jzg.commons.entity.account.po.SysUserAccountIncomeLog;
+import com.jzg.commons.entity.account.po.SysUserAccountChangeLog;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+import java.time.LocalDate;
+import java.util.List;
 
 @Mapper
-public interface SysUserAccountIncomeLogMapper extends BaseMapper<SysUserAccountIncomeLog> {
+public interface SysUserAccountIncomeLogMapper extends BaseMapper<SysUserAccountChangeLog> {
+
+    /**
+     * 查询业务员收支明细
+     *
+     * @param ywyUserId 业务员序号
+     * @param beginDate 开始日期
+     * @param endDate 结束日期
+     * @author lipf
+     * @date 2026/6/8 17:25
+     */
+    @Select("select * from sys_user_account_change_log a where a.user_id = #{ywyUserId} and a.create_time >= #{beginDate} and a.create_time < #{endDate} and a.is_delete = 0 order by a.create_time desc")
+    List<SysUserAccountChangeLog> queryYwyIORecs(String ywyUserId, LocalDate beginDate, LocalDate endDate);
 }

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

@@ -22,4 +22,14 @@ public interface SysUserJzgInfoBankCardMapper extends BaseMapper<SysUserJzgInfoB
      */
     Page<SysUserJzgInfoBankCardDto> getBankCardPageList (Page<SysUserJzgInfoBankCardVo> page, @Param("sysUserJzgInfoBankCardVo") SysUserJzgInfoBankCardVo sysUserJzgInfoBankCardVo);
 
+    /**
+     * 根据银行卡号查询银行卡的信息
+     *
+     * @param bankCardNum 银行卡号
+     * @param systemCode  租户代码
+     * @author lipf
+     * @date 2026/6/8 16:22
+     */
+    List<SysUserJzgInfoBankCard> queryBankCardBybankCardNum(@Param("bankCardNum") String bankCardNum,
+                                                            @Param("systemCode") String systemCode);
 }

+ 10 - 0
tenant/organization/src/main/java/com/jzg/organization/service/InvAccountCardService.java

@@ -8,6 +8,8 @@ import com.jzg.commons.entity.account.po.InvAccountCard;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.jzg.commons.entity.account.vo.AccountCardVo;
 
+import java.util.List;
+
 /**
 * @author dongxin
 * @description 针对表【inv_account_card(账户信息表)】的数据库操作Service
@@ -55,4 +57,12 @@ public interface InvAccountCardService extends IService<InvAccountCard> {
      * @param param
      */
     void cardEdit(AccountCardEditParam param);
+
+    /**
+     * 根据银行卡账号查询银行卡信息
+     *
+     * @author lipf
+     * @date 2026/6/8 15:12
+     */
+    List<InvAccountCard> queryByAccountId(String accountId, String systemCode);
 }

+ 8 - 0
tenant/organization/src/main/java/com/jzg/organization/service/PtlAgreementUndwrtRulesService.java

@@ -45,6 +45,14 @@ public interface PtlAgreementUndwrtRulesService extends IService<PtlAgreementUnd
      */
     AgreementRulesVo rulesGet(String ruleId);
 
+    /**
+     * 根据父ID查询规则列表
+     *
+     * @param parentId 父规则ID
+     * @return List<AgreementRulesVo> 协议规则列表
+     */
+    List<AgreementRulesVo> queryListByParentId(String parentId);
+
     /**
      * 删除承保规则
      * @param id

+ 9 - 4
tenant/organization/src/main/java/com/jzg/organization/service/SysAmountAuditingService.java

@@ -3,10 +3,7 @@ package com.jzg.organization.service;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.jzg.commons.core.page.HttpResult;
-import com.jzg.commons.entity.dto.AmountAuditEditParam;
-import com.jzg.commons.entity.dto.AmountAuditParam;
-import com.jzg.commons.entity.dto.AmountAuditRejectParam;
-import com.jzg.commons.entity.dto.ApplyWithdrawParam;
+import com.jzg.commons.entity.dto.*;
 import com.jzg.commons.entity.po.SysAmountAuditing;
 import com.jzg.commons.entity.vo.AmountAuditVo;
 
@@ -96,4 +93,12 @@ public interface SysAmountAuditingService extends IService<SysAmountAuditing> {
      * @return
      */
     String exportAuditList(AmountAuditParam param);
+
+    /**
+     * 导出业务员收入支出明显
+     * param ywyIOParam 导出条件, 包含开始日期,结束日期
+     * @return
+     */
+    String exportYwyIORecs(YwyIOParam ywyIOParam);
+
 }

Неке датотеке нису приказане због велике количине промена