浏览代码

Merge remote-tracking branch 'origin/master'

lixiaolong 3 月之前
父节点
当前提交
71e9f335e6
共有 64 个文件被更改,包括 807 次插入299 次删除
  1. 10 9
      authentication/src/main/java/com/jzg/config/JzgAuthenticationProvider.java
  2. 1 0
      authentication/src/main/java/com/jzg/controller/AuthController.java
  3. 19 0
      commons/pom.xml
  4. 6 0
      commons/src/main/java/com/jzg/commons/core/base/BaseController.java
  5. 2 0
      commons/src/main/java/com/jzg/commons/entity/finance/po/InsPlyIncomeOrder.java
  6. 11 1
      commons/src/main/java/com/jzg/commons/entity/finance/po/InsPlyIncomeVO.java
  7. 6 1
      commons/src/main/java/com/jzg/commons/entity/orders/po/InsFeeAudit.java
  8. 3 0
      commons/src/main/java/com/jzg/commons/entity/orders/po/InsOrders.java
  9. 3 0
      commons/src/main/java/com/jzg/commons/entity/po/InsFeeOrders.java
  10. 2 2
      commons/src/main/java/com/jzg/commons/entity/po/SysAmountAuditing.java
  11. 3 0
      commons/src/main/java/com/jzg/commons/entity/po/SysUserAccount.java
  12. 4 0
      commons/src/main/java/com/jzg/commons/exception/SystemException.java
  13. 1 2
      commons/src/main/java/com/jzg/commons/util/GsonUtils.java
  14. 1 0
      platform/src/main/java/com/jzg/service/impl/PtlInsAttributionTemplateServiceImpl.java
  15. 202 67
      tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/impl/ChengTaiApiRequestImpl.java
  16. 7 6
      tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java
  17. 1 2
      tenant/insurance/quotation-dadi/src/main/java/com/jzg/quotation/dadi/utils/DaDiAESUtils.java
  18. 23 10
      tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/component/HengBangCrawlerRequestComponent.java
  19. 3 0
      tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/constant/enums/RequestUrl.java
  20. 47 19
      tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/entity/request/HbCrawlerCalculationRequest.java
  21. 4 15
      tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/entity/response/HbCrawlerRecordResponse.java
  22. 15 17
      tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/service/Impl/HengBangCrawlerRequestImpl.java
  23. 3 3
      tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/utils/HengBangAESUtil.java
  24. 13 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/InsFeeOrderController.java
  25. 1 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java
  26. 2 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/CompanyFactory.java
  27. 7 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/mapper/InsFeeAuditMapper.java
  28. 10 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/mapper/InsFeeOrdersMapper.java
  29. 3 2
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/InsFeeAuditService.java
  30. 9 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/InsFeeOrdersService.java
  31. 3 2
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsFeeAuditServiceImpl.java
  32. 26 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsFeeOrdersServiceImpl.java
  33. 2 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java
  34. 1 1
      tenant/insurance/quotation-summary/src/main/resources/mapper/InsFeeAuditMapper.xml
  35. 14 0
      tenant/insurance/quotation-summary/src/main/resources/mapper/InsFeeOrdersMapper.xml
  36. 1 1
      tenant/insurance/quotation-summary/src/main/resources/mapper/SysQueryVehicleConfigMapper.xml
  37. 11 6
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/TKSimpleService.java
  38. 88 87
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/impl/TKQuotationBaseServiceImpl.java
  39. 2 2
      tenant/insurance/quotation-zhongan/pom.xml
  40. 15 0
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/component/ZiJinCrawlerRequestComponent.java
  41. 32 0
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/request/ZiJinCrawlerRecognizeCodesRequest.java
  42. 45 0
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/entity/response/ZiJinCrawlerRecognizeCodesResponse.java
  43. 2 0
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/enums/RequestUrl.java
  44. 1 0
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/enums/ResponseCode.java
  45. 21 2
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/service/impl/ZiJinCrawlerRequestImpl.java
  46. 0 0
      tenant/insurance/quotation-zijin/src/main/resources/js/auto.js
  47. 1 1
      tenant/insurance/quotation-zijin/src/main/resources/js/content.js
  48. 0 0
      tenant/insurance/quotation-zijin/src/main/resources/js/tsssss.js
  49. 10 0
      tenant/organization/src/main/java/com/jzg/organization/client/InsFeeOrdersClient.java
  50. 7 1
      tenant/organization/src/main/java/com/jzg/organization/controller/AppUserController.java
  51. 13 1
      tenant/organization/src/main/java/com/jzg/organization/controller/ReceivableController.java
  52. 6 6
      tenant/organization/src/main/java/com/jzg/organization/controller/UserAccountController.java
  53. 3 2
      tenant/organization/src/main/java/com/jzg/organization/mapper/SysUserJzgAppMapper.java
  54. 9 0
      tenant/organization/src/main/java/com/jzg/organization/service/ReceivableService.java
  55. 5 3
      tenant/organization/src/main/java/com/jzg/organization/service/SysUserAccountService.java
  56. 2 2
      tenant/organization/src/main/java/com/jzg/organization/service/SysUserJzgInfoService.java
  57. 20 4
      tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java
  58. 8 3
      tenant/organization/src/main/java/com/jzg/organization/service/impl/SysAmountAuditingServiceImpl.java
  59. 15 3
      tenant/organization/src/main/java/com/jzg/organization/service/impl/SysUserAccountServiceImpl.java
  60. 15 9
      tenant/organization/src/main/java/com/jzg/organization/service/impl/SysUserJzgAppServiceImpl.java
  61. 1 1
      tenant/organization/src/main/java/com/jzg/organization/service/impl/SysUserServiceImpl.java
  62. 0 1
      tenant/organization/src/main/resources/application.yml
  63. 3 1
      tenant/organization/src/main/resources/mapper/ReceivableMapper.xml
  64. 3 0
      tenant/organization/src/main/resources/mapper/SysUserJzgAppMapper.xml

+ 10 - 9
authentication/src/main/java/com/jzg/config/JzgAuthenticationProvider.java

@@ -248,22 +248,23 @@ public class JzgAuthenticationProvider implements AuthenticationProvider {
             }
 
             if(system.equals(SystemConstants.SYSTEM_JZG_APP.getCode())){
-                SysUserJzgApp jzgUserApp = sysUserJzgAppMapper.selectOne(new LambdaQueryWrapper<SysUserJzgApp>()
+                List<SysUserJzgApp> jzgUserApps = sysUserJzgAppMapper.selectList(new LambdaQueryWrapper<SysUserJzgApp>()
                         .eq(SysUserJzgApp::getUserId, weblogUser.getId())
                         .eq(SysUserJzgApp::getIsDelete,0));
                 // 如果用户存在,app信息为空,则创建app信息
-                if(Objects.isNull(jzgUserApp)){
-                    jzgUserApp = new SysUserJzgApp();
+                if(Objects.isNull(jzgUserApps)){
+                    SysUserJzgApp jzgUserApp = new SysUserJzgApp();
                     jzgUserApp.setUserId(weblogUser.getId());
                     jzgUserApp.setSystemCode("APP");
                     sysUserJzgAppMapper.insert(jzgUserApp);
                 }
-                if(Objects.isNull(jzgUserApp.getLastLoginTime())){
-                    isFirst = true;
-                }
-                //更新用户登录时间
-                jzgUserApp.setLastLoginTime(LocalDateTime.now());
-                sysUserJzgAppMapper.updateById(jzgUserApp);
+                // modify by lipf 2026年6月4日16:01:27 当用户属于多个租户的时候,在app端登录的时候,是不知道是哪个租户登录的。
+//                if(Objects.isNull(jzgUserApp.getLastLoginTime())){
+//                    isFirst = true;
+//                }
+//                //更新用户登录时间
+//                jzgUserApp.setLastLoginTime(LocalDateTime.now());
+//                sysUserJzgAppMapper.updateById(jzgUserApp);
             }else if(!system.equals(SystemConstants.SYSTEM_PLATFORM.getCode())){
                 SysUserJzgVo jzgUserInfo = sysUserService.getJzgUserInfo(weblogUser.getId(),system);
                 log.info("租户[{}]下用户[{}]不存在",system,weblogUser.getId());

+ 1 - 0
authentication/src/main/java/com/jzg/controller/AuthController.java

@@ -185,6 +185,7 @@ public class AuthController extends BaseController {
      * 返回:HttpResult 文本提示
      * 注意:验证码暂固定为 123456,存入 Redis,120 秒过期
      */
+    // TODO 发送验证吗的功能没有实现
     @GetMapping("sendSmsCode")
     @Operation(summary = "发送短信验证码")
     public HttpResult sendSmsCode(String mobile) {

+ 19 - 0
commons/pom.xml

@@ -136,6 +136,25 @@
             <artifactId>opentelemetry-api</artifactId>
             <version>1.41.0</version>
         </dependency>
+
+        <!--Gson 转化-->
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.9.1</version>
+            <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <artifactId>spring</artifactId>
+                    <groupId>*</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>c3p0</artifactId>
+                    <groupId>*</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
     </dependencies>
 
     <build>

+ 6 - 0
commons/src/main/java/com/jzg/commons/core/base/BaseController.java

@@ -187,6 +187,12 @@ public class BaseController {
         return systemCode;
     }
 
+    /**
+     * 获取登录用户所属的租户
+     *      手机端和网页端的systemCode 都可以通过这个获取
+     * @author lipf
+     * @date 2026/6/4 14:11
+     */
     public String getSystemCode(){
         String userSystemCode = this.getUserSystemCode();
         if(userSystemCode.equals("APP")){

+ 2 - 0
commons/src/main/java/com/jzg/commons/entity/finance/po/InsPlyIncomeOrder.java

@@ -5,6 +5,7 @@ import lombok.Data;
 import java.io.Serial;
 import java.io.Serializable;
 
+
 @Data
 public class InsPlyIncomeOrder implements Serializable {
 
@@ -20,6 +21,7 @@ public class InsPlyIncomeOrder implements Serializable {
      */
     private String orderNo;
 
+
     public InsPlyIncomeOrder(String id, String orderNo) {
         this.id = id;
         this.orderNo = orderNo;

+ 11 - 1
commons/src/main/java/com/jzg/commons/entity/finance/po/InsPlyIncomeVO.java

@@ -21,9 +21,19 @@ public class InsPlyIncomeVO implements Serializable {
      */
     private List<InsPlyIncomeOrder> insPlyIncomeOrders;
 
-    public InsPlyIncomeVO(Page insPlyIncomePage, List<InsPlyIncomeOrder> insPlyIncomeOrders){
+    /**
+     * 应收金额总计
+     */
+    private String allAmount;
+
+    public InsPlyIncomeVO(Page insPlyIncomePage, List<InsPlyIncomeOrder> insPlyIncomeOrders, String allAmount) {
         this.insPlyIncomePage = insPlyIncomePage;
         this.insPlyIncomeOrders = insPlyIncomeOrders;
+        this.allAmount = allAmount;
     }
 
+    public InsPlyIncomeVO(Page insPlyIncomePage, List<InsPlyIncomeOrder> insPlyIncomeOrders) {
+        this.insPlyIncomePage = insPlyIncomePage;
+        this.insPlyIncomeOrders = insPlyIncomeOrders;
+    }
 }

+ 6 - 1
commons/src/main/java/com/jzg/commons/entity/orders/po/InsFeeAudit.java

@@ -9,11 +9,13 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jzg.commons.core.base.BaseModel;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 /**
  * 订单审核表
- * @TableName ins_fee_audit
+ * ins_fee_audit
  */
+@EqualsAndHashCode(callSuper = true)
 @Data
 @Schema(description = "订单审核表")
 public class InsFeeAudit extends BaseModel {
@@ -34,6 +36,9 @@ public class InsFeeAudit extends BaseModel {
     @Schema(description = "审核人")
     private String auditUser;
 
+    @Schema(description = "租户代码")
+    private String systemCode;
+
     @Schema(description = "领取时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private LocalDateTime receiveTime;

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

@@ -22,6 +22,9 @@ public class InsOrders extends BaseModel {
     @TableId(value = "id", type = IdType.ASSIGN_ID)
     private String id;
 
+    @Schema(description = "租户代码")
+    private String systemCode;
+
     @Schema(description = "parentId")
     private String parentId;
 

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

@@ -25,6 +25,9 @@ public class InsFeeOrders {
     @TableId
     private String orderNo;
 
+    @Schema(description = "租户代码")
+    private String systemCode;
+
     @Schema(description = "协议id")
     private String agreementId;
 

+ 2 - 2
commons/src/main/java/com/jzg/commons/entity/po/SysAmountAuditing.java

@@ -114,8 +114,8 @@ public class SysAmountAuditing extends BaseModel {
     ){
         // 提现金额
         this.setAmount(applyWithdrawParam.getWithdrawAmount());
-        // 当前账户金额
-        this.setBalanceAmount(sysUserAccount.getSumAmount());
+        // 当前账户金额 modify by lipf 2026年6月3日16:55:06 账户中剩余的金额。 该金额 是没有扣除当前提现金额的金额
+        this.setBalanceAmount(sysUserAccount.getSumAmountUnpaid());
         // 提现用户
         this.setUserId(userId);
         // 银行卡卡号

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

@@ -40,6 +40,9 @@ public class SysUserAccount extends BaseModel {
     @Schema(description = "积分")
     private BigDecimal integral;
 
+    @Schema(description = "租户代码")
+    private String systemCode;
+
     public BigDecimal getSumAmount() {
         return Objects.requireNonNullElse(this.sumAmount, BigDecimal.ZERO);
     }

+ 4 - 0
commons/src/main/java/com/jzg/commons/exception/SystemException.java

@@ -1,8 +1,12 @@
 package com.jzg.commons.exception;
 
 
+import java.io.Serial;
+
 public class SystemException extends RuntimeException {
 
+    @Serial
+    private static final long serialVersionUID = 2382723461161144457L;
     private final String code;
 
     public SystemException(String message) {

+ 1 - 2
tenant/insurance/quotation-dadi/src/main/java/com/jzg/quotation/dadi/utils/GsonUtils.java → commons/src/main/java/com/jzg/commons/util/GsonUtils.java

@@ -1,7 +1,6 @@
-package com.jzg.quotation.dadi.utils;
+package com.jzg.commons.util;
 
 import com.alibaba.excel.support.cglib.beans.BeanMap;
-import com.alibaba.excel.util.StringUtils;
 import com.alibaba.fastjson.JSONArray;
 import com.google.common.collect.Maps;
 import com.google.gson.*;

+ 1 - 0
platform/src/main/java/com/jzg/service/impl/PtlInsAttributionTemplateServiceImpl.java

@@ -146,6 +146,7 @@ public class PtlInsAttributionTemplateServiceImpl extends ServiceImpl<PtlInsAttr
         log.info("获取协议属性信息:agreementId=[{}]",agreementId);
         PtlAgreement ptlAgreement = ptlAgreementService.getById(agreementId);
         AssertionUtils.isEmpty(ptlAgreement, "协议不存在");
+        log.info("agreementId=[{}],,,ptlAgreement=[{}]",agreementId, JSONUtil.toJsonStr(ptlAgreement));
 
         PtlAgreementAttribution ptlAgreementAttribution = agreementAttributionMapper.selectById(ptlAgreement.getAttributionId());
         AssertionUtils.isEmpty(ptlAgreementAttribution, "账号归属信息查询失败");

+ 202 - 67
tenant/insurance/quotation-chengtai/src/main/java/com/jzg/quotation/chengtai/api/service/impl/ChengTaiApiRequestImpl.java

@@ -39,6 +39,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.math.BigDecimal;
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.regex.Matcher;
@@ -130,11 +131,16 @@ public class ChengTaiApiRequestImpl implements ChengTaiApiRequest {
      */
     private String extractEndDate(PremiumCalculationResponse response) {
         String targetText = response.getHead().getErrorMessage();
-        Pattern pattern = Pattern.compile("终保日期 (\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2})");
+        Pattern pattern = Pattern.compile("终保日期[:\\s]+(\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}(?::\\d{2})?)");
         Matcher matcher = pattern.matcher(targetText);
         if (matcher.find()) {
             String dateStr = matcher.group(1);
-            return dateStr + ":00";
+            // 已经包含秒(以 :数字数字 结尾),不拼接
+            if (dateStr.length() == 16) {
+                return dateStr + ":00";
+            } else {
+                return dateStr;
+            }
         }
         return null;
     }
@@ -146,82 +152,211 @@ public class ChengTaiApiRequestImpl implements ChengTaiApiRequest {
      */
     private PremiumCalculationResponse getResponse(PremiumCalculationRequest premiumCalculationRequest, QuoteVo quoteVo,BigDecimal carActualValue,
                     ChengTaiApiParameters parameters, CarModelQueryResponse.vehicle vehicle, String apiUrl) throws Exception {
+        int index = 0;
+        PremiumCalculationResponse premiumCalculationResponse = new PremiumCalculationResponse();
+        String ciQuestion = null,biQuestion = null;
+        while(true) {
+            if(index >=5){
+                break;
+            }
+            premiumCalculationResponse = chengTaiRequestApiComponent.premiumCalculation(premiumCalculationRequest,apiUrl);
+            index++;
 
-        PremiumCalculationResponse premiumCalculationResponse = chengTaiRequestApiComponent.premiumCalculation(premiumCalculationRequest,apiUrl);
-        if (!premiumCalculationResponse.getHead().getErrorMessage().equals("成功")) {
-            /**
-             * 重复投保
-             */
-            // 获取新起保时间 终保时间
-            final String startDate = extractEndDate(premiumCalculationResponse);
-            String endDate;
-            if (startDate != null){
-                if (startDate.endsWith("00:00:00")) {
-                    endDate = TimeProcessing.minusOneSecondAfterYear(startDate);
-                } else {
-                    endDate = TimeProcessing.plusOneYearToString(startDate);
-                }
-                final String formatStartDate = startDate;
-                final String formatEndDate = endDate;
-                PremiumCalculationResponse finalPremiumCalculationResponse = premiumCalculationResponse;
-                if (quoteVo.getCiRiskInfoVo() != null && finalPremiumCalculationResponse.getHead().getErrorMessage().contains("交强")) {
-                    quoteVo.getCiRiskInfoVo().setStartDate(startDate);
-                    quoteVo.getCiRiskInfoVo().setEndDate(endDate);
+            // 如果返回出现问题
+            if (!premiumCalculationResponse.getHead().getResponseCode().equals("0000")){
+                // 是否是校验码有误
+                if(premiumCalculationResponse.getHead().getErrorMessage().contains("校验码有误")){
+                    if(Objects.nonNull(ciQuestion)){
+                        if(Objects.isNull(premiumCalculationResponse.getCompRisk())){
+                            premiumCalculationResponse.setCompRisk(new PremiumCalculationResponse.compRisk());
+                        }
+                        if(Objects.isNull(premiumCalculationResponse.getCompRisk().getBasePart())){
+                            premiumCalculationResponse.getCompRisk().setBasePart(new PremiumCalculationResponse.compRisk.basePart());
+                        }
+                        premiumCalculationResponse.getCompRisk().getBasePart().setQuestion(ciQuestion);
+                    }
+
+                    if(Objects.nonNull(biQuestion)){
+                        if(Objects.isNull(premiumCalculationResponse.getCommRisk())){
+                            premiumCalculationResponse.setCommRisk(new PremiumCalculationResponse.commRisk());
+                        }
+                        if(Objects.isNull(premiumCalculationResponse.getCommRisk().getBasePart())){
+                            premiumCalculationResponse.getCommRisk().setBasePart(new PremiumCalculationResponse.commRisk.basePart());
+                        }
+                        premiumCalculationResponse.getCommRisk().getBasePart().setQuestion(biQuestion);
+                    }
+                    break;
                 }
-                // 处理商业险的即时起保
-                if (quoteVo.getBiRiskInfoVo() != null) {
-                    if (!formatStartDate.endsWith("00:00:00")) {
-                        String start, end = "";
-                        end = TimeProcessing.tomorrowDateTime(formatEndDate);
-                        quoteVo.getBiRiskInfoVo().setStartDate(formatStartDate);
-                        quoteVo.getBiRiskInfoVo().setEndDate(end);
+            }
+
+            if (!premiumCalculationResponse.getHead().getErrorMessage().equals("成功")) {
+                /**
+                 * 重复投保
+                 */
+                // 获取新起保时间 终保时间
+                //判断出现两次起保日期
+                boolean hasTwoStartDates = premiumCalculationResponse.getHead().getErrorMessage() != null
+                        && premiumCalculationResponse.getHead().getErrorMessage().indexOf("起保日期") != -1          // 第一次出现
+                        && premiumCalculationResponse.getHead().getErrorMessage().indexOf("起保日期",
+                        premiumCalculationResponse.getHead().getErrorMessage().indexOf("起保日期") + 1) != -1; // 第二次出现
+
+                final String startDate = extractEndDate(premiumCalculationResponse);
+                String endDate;
+                if (startDate != null) {
+
+                    //如果出现起保日期两次 就是 交强商业都重复投保了
+                    if (hasTwoStartDates) {
+                        String jqEndDate, syEndDate = "";
+                        List<String> timeList = multipleStartDate(premiumCalculationResponse);
+                        for (int i = 0; i < timeList.size(); i++) {
+                            timeList.set(i, addOneYear(timeList.get(i)));
+                        }
+                        if (timeList.size() < 2) {
+                            throw new SystemException("处理重复投保时间异常");
+                        }
+                        if (timeList.get(0).endsWith("00:00:00")) {
+                            jqEndDate = TimeProcessing.minusOneSecondAfterYear(timeList.get(0));
+                        } else {
+                            jqEndDate = TimeProcessing.plusOneYearToString(timeList.get(0));
+                        }
+                        if (timeList.get(1).endsWith("00:00:00")) {
+                            syEndDate = TimeProcessing.minusOneSecondAfterYear(timeList.get(1));
+                        } else {
+                            syEndDate = TimeProcessing.plusOneYearToString(timeList.get(1));
+                        }
+                        String jqFinalEndDate = jqEndDate;
+                        String syFinalEndDate = syEndDate;
+                        if (quoteVo.getCiRiskInfoVo() != null) {
+                            quoteVo.getCiRiskInfoVo().setStartDate(timeList.get(0));
+                            quoteVo.getCiRiskInfoVo().setEndDate(jqFinalEndDate);
+                        }
+
+                        // 处理商业险的即时起保
+                        if (quoteVo.getBiRiskInfoVo() != null) {
+                            quoteVo.getBiRiskInfoVo().setStartDate(timeList.get(1));
+                            quoteVo.getBiRiskInfoVo().setEndDate(syFinalEndDate);
+                        }
                     } else {
-                        quoteVo.getBiRiskInfoVo().setStartDate(startDate);
-                        quoteVo.getBiRiskInfoVo().setEndDate(endDate);
+                        if (startDate.endsWith("00:00:00")) {
+                            endDate = TimeProcessing.minusOneSecondAfterYear(startDate);
+                        } else {
+                            endDate = TimeProcessing.plusOneYearToString(startDate);
+                        }
+                        final String formatStartDate = startDate;
+                        final String formatEndDate = endDate;
+                        PremiumCalculationResponse finalPremiumCalculationResponse = premiumCalculationResponse;
+
+                        if (quoteVo.getCiRiskInfoVo() != null && finalPremiumCalculationResponse.getHead().getErrorMessage().contains("交强")) {
+                            quoteVo.getCiRiskInfoVo().setStartDate(formatStartDate);
+                            quoteVo.getCiRiskInfoVo().setEndDate(formatEndDate);
+                        }
+
+                        // 处理商业险的即时起保
+                        if (quoteVo.getBiRiskInfoVo() != null && finalPremiumCalculationResponse.getHead().getErrorMessage().contains("商业险")) {
+                            quoteVo.getBiRiskInfoVo().setStartDate(formatStartDate);
+                            quoteVo.getBiRiskInfoVo().setEndDate(formatEndDate);
+                        }
                     }
+                    premiumCalculationRequest = new PremiumCalculationRequest(quoteVo, carActualValue, parameters, vehicle, null);
+
+                } else if (premiumCalculationResponse.getHead().getErrorMessage().contains("重复投保")) {
+                    throw new SystemException(premiumCalculationResponse.getHead().getErrorMessage());
+                }
+
+            }else{
+                // 转保车处理
+                ciQuestion = premiumCalculationResponse.getCompRisk() != null
+                        ? premiumCalculationResponse.getCompRisk().getBasePart().getQuestion()
+                        : null;
+                biQuestion = premiumCalculationResponse.getCommRisk() != null
+                        ? premiumCalculationResponse.getCommRisk().getBasePart().getQuestion()
+                        : null;
+                // 订单号
+                if (ciQuestion != null || biQuestion != null) {
+                    String orderNumber = premiumCalculationResponse.getCompRisk() != null
+                            ? premiumCalculationResponse.getCompRisk().getFtrno().getOrderNumber()
+                            : premiumCalculationResponse.getCommRisk().getFtrno().getOrderNumber();
+                    Map<String, String> bodyMap = new HashMap<>();
+                    if (Objects.nonNull(ciQuestion)) {
+                        bodyMap.put("jqImage", ciQuestion);
+                    }
+                    if (Objects.nonNull(biQuestion)) {
+                        bodyMap.put("syImage", biQuestion);
+                    }
+                    String sendBody = JSON.toJSONString(bodyMap);
+                    if (!"{}".equals(sendBody)) {
+                        String ocrStr = HttpUtil.sendPost("http://39.98.41.104:8088/getres", sendBody);
+                        CheckCodeResp resp = JSONUtil.toBean(ocrStr, CheckCodeResp.class);
+                        if(StringUtils.isNotEmpty(resp.getJqImageCode())){
+                            quoteVo.setCiTransferCode(resp.getJqImageCode().replace("0", "O"));
+                        }
+                        if(StringUtils.isNotEmpty(resp.getSyImageCode())){
+                            quoteVo.setBiTransferCode(resp.getSyImageCode().replace("0", "O"));
+                        }
+                        premiumCalculationRequest = new PremiumCalculationRequest(quoteVo, carActualValue, parameters, vehicle, orderNumber);
+
+                    }
+                }else{
+                    break;
                 }
-                premiumCalculationRequest = new PremiumCalculationRequest(quoteVo,carActualValue,parameters,vehicle,null);
-                premiumCalculationResponse = chengTaiRequestApiComponent.premiumCalculation(premiumCalculationRequest, apiUrl);
-            }
-        }
-        // 转保车处理
-        String ciQuestion = null;
-        String biQuestion = null;
-        if (premiumCalculationResponse.getCompRisk() != null && premiumCalculationResponse.getCompRisk().getBasePart() != null){
-            ciQuestion = premiumCalculationResponse.getCompRisk().getBasePart().getQuestion();
-        }
-        if (premiumCalculationResponse.getCommRisk() != null && premiumCalculationResponse.getCommRisk().getBasePart() != null){
-            biQuestion = premiumCalculationResponse.getCommRisk().getBasePart().getQuestion();
-        }
-        // 订单号
-        if (ciQuestion!= null || biQuestion != null) {
-            String orderNumber = premiumCalculationResponse.getCompRisk() != null
-                    ? premiumCalculationResponse.getCompRisk().getFtrno().getOrderNumber()
-                    : premiumCalculationResponse.getCommRisk().getFtrno().getOrderNumber();
-            Map<String, String> bodyMap = new HashMap<>();
-            if (Objects.nonNull(ciQuestion)) {
-                bodyMap.put("jqImage", ciQuestion);
             }
-            if (Objects.nonNull(biQuestion)) {
-                bodyMap.put("syImage", biQuestion);
+            //处理订单号
+            if( premiumCalculationResponse.getCompRisk() != null && premiumCalculationResponse.getCompRisk().getFtrno() != null){
+                premiumCalculationRequest.getBasePart().setOrderNumber(premiumCalculationResponse.getCompRisk().getFtrno().getOrderNumber());
             }
-            String sendBody = JSON.toJSONString(bodyMap);
-            if (!"{}".equals(sendBody)) {
-                // 获取图片中的二维码
-                String ocrStr = HttpUtil.sendPost("http://39.98.41.104:8088/getres", sendBody);
-                CheckCodeResp resp = JSONUtil.toBean(ocrStr, CheckCodeResp.class);
-                if(StringUtils.isNotEmpty(resp.getJqImageCode())){
-                     quoteVo.setCiTransferCode(resp.getJqImageCode().replace("0", "O"));
-                }
-                if(StringUtils.isNotEmpty(resp.getSyImageCode())){
-                      quoteVo.setBiTransferCode(resp.getSyImageCode().replace("0", "O"));
-                }
-                premiumCalculationRequest = new PremiumCalculationRequest(quoteVo,carActualValue,parameters,vehicle,orderNumber);
-                premiumCalculationResponse = chengTaiRequestApiComponent.premiumCalculation(premiumCalculationRequest, apiUrl);
+            if( premiumCalculationResponse.getCommRisk() != null && premiumCalculationResponse.getCommRisk().getFtrno() != null){
+                premiumCalculationRequest.getBasePart().setOrderNumber(premiumCalculationResponse.getCommRisk().getFtrno().getOrderNumber());
             }
         }
         return premiumCalculationResponse;
     }
+    private List<String> multipleStartDate(PremiumCalculationResponse response) {
+        List<String> timeList = new ArrayList<>();
+        if (response == null || response.getHead() == null) {
+            return timeList;
+        }
+
+        String errorMsg = response.getHead().getErrorMessage();
+        if (errorMsg == null || errorMsg.isEmpty()) {
+            return timeList;
+        }
+
+        // 正则匹配:起保日期 + 日期时间(兼容所有格式)
+        Pattern pattern = Pattern.compile("起保日期[\\s:]+([\\d\\s:-]+)");
+        Matcher matcher = pattern.matcher(errorMsg);
+
+        while (matcher.find() && timeList.size() < 2) {
+            String rawDate = matcher.group(1).trim();
+            String formattedDate = formatToStandardDateTime(rawDate);
+            timeList.add(formattedDate);
+        }
+
+        return timeList;
+    }
+    private String formatToStandardDateTime(String raw) {
+        if (raw == null || raw.isEmpty()) return "";
+
+        // 提取所有数字
+        List<String> nums = new ArrayList<>();
+        Matcher m = Pattern.compile("\\d+").matcher(raw);
+        while (m.find()) nums.add(m.group());
+
+        if (nums.size() < 3) return raw;
+
+        String ymd = nums.get(0) + "-" + nums.get(1) + "-" + nums.get(2);
+        String hh = nums.size() >= 4 ? nums.get(3) : "00";
+        String mm = nums.size() >= 5 ? nums.get(4) : "00";
+        String ss = nums.size() >= 6 ? nums.get(5) : "00";
+
+        return ymd + " " + hh + ":" + mm + ":" + ss;
+    }
+    private String addOneYear(String dateStr) {
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        LocalDateTime dateTime = LocalDateTime.parse(dateStr, formatter);
+        // 加 1 年
+        LocalDateTime nextYear = dateTime.plusYears(1);
+        return nextYear.format(formatter);
+    }
 
     @Override
     public UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) throws Exception {

+ 7 - 6
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/component/RequestComponent.java

@@ -6,7 +6,6 @@ import com.jzg.commons.constants.quote.enums.base.InsuranceEnum;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.config.WebClientConfig;
 import com.jzg.quotation.commons.entity.CookiesRequest;
-import com.jzg.quotation.commons.utils.HtEncryptDecryptUtils;
 import com.jzg.quotation.commons.utils.InsuranceLog;
 import com.jzg.quotation.commons.utils.RequestObjectConversion;
 import lombok.RequiredArgsConstructor;
@@ -14,10 +13,11 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.core.ParameterizedTypeReference;
 import org.springframework.core.io.buffer.DataBuffer;
 import org.springframework.core.io.buffer.DataBufferUtils;
-import org.springframework.http.*;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Component;
-import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
 import org.springframework.web.reactive.function.BodyInserters;
 import org.springframework.web.reactive.function.client.WebClient;
@@ -31,7 +31,8 @@ import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.nio.file.StandardOpenOption;
-import java.util.*;
+import java.util.Map;
+import java.util.Optional;
 import java.util.function.Consumer;
 import java.util.regex.Pattern;
 
@@ -689,11 +690,11 @@ public class RequestComponent {
             // 判断返回的字符串是否为有效的JSON格式
             if (isValidJson(responseBody)) {
                 result = JSON.parseObject(responseBody, responseClass);
-                InsuranceLog.infoLog(InsuranceEnum.XDCX.getPinyin(), "\t---------> URl: {} \t---------> 请求参数:{}", url, BodyInserters.fromValue(body));
-                InsuranceLog.infoLog(InsuranceEnum.XDCX.getPinyin(), "\t---------> 响应参数:{}", result);
             }else{
                 result = (Response)responseBody;
             }
+            InsuranceLog.infoLog(InsuranceEnum.XDCX.getPinyin(), "\t---------> URl: {} \t---------> 请求参数:{}", url, BodyInserters.fromValue(body));
+            InsuranceLog.infoLog(InsuranceEnum.XDCX.getPinyin(), "\t---------> 响应参数:{}", result);
             // 构建返回的ResponseEntity
             HttpHeaders responseHeaders = new HttpHeaders();
             responseHeaders.setContentType(MediaType.APPLICATION_JSON);

+ 1 - 2
tenant/insurance/quotation-dadi/src/main/java/com/jzg/quotation/dadi/utils/DaDiAESUtils.java

@@ -1,10 +1,9 @@
 package com.jzg.quotation.dadi.utils;
 
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
 import com.google.gson.JsonParser;
 import com.google.gson.JsonSyntaxException;
 import com.jzg.commons.text.CharsetKit;
+import com.jzg.commons.util.GsonUtils;
 
 import javax.crypto.Cipher;
 import javax.crypto.spec.SecretKeySpec;

+ 23 - 10
tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/component/HengBangCrawlerRequestComponent.java

@@ -5,12 +5,10 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.jzg.commons.constants.quote.enums.base.InsuranceEnum;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.component.RequestComponent;
 import com.jzg.quotation.commons.constant.CacheConstant;
 import com.jzg.quotation.commons.service.ExteriorUtilsRequest;
-import com.jzg.quotation.commons.utils.InsuranceLog;
 import com.jzg.quotation.commons.utils.RequestObjectConversion;
 import com.jzg.quotation.hengbang.crawler.constant.RequestConstant;
 import com.jzg.quotation.hengbang.crawler.constant.enums.RequestUrl;
@@ -25,13 +23,13 @@ import org.apache.commons.collections4.CollectionUtils;
 import org.redisson.api.RMap;
 import org.redisson.api.RedissonClient;
 import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.http.*;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatusCode;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Component;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
 import org.springframework.util.StringUtils;
-import org.springframework.web.client.RestTemplate;
-import org.springframework.web.reactive.function.BodyInserters;
 import org.springframework.web.reactive.function.client.WebClientResponseException;
 
 import javax.crypto.Cipher;
@@ -173,10 +171,15 @@ public class HengBangCrawlerRequestComponent {
         } catch (Exception e) {
             throw new SystemException("解密失败");
         }
-        HbCrawlerQueryCarRequest.CbitDataDTO cbitDataDTO = JSONObject.parseObject(plaintext).getJSONObject("carMappings")
-                .getJSONArray("cbitData")
-                .getJSONObject(0).toJavaObject(HbCrawlerQueryCarRequest.CbitDataDTO.class);
-        return cbitDataDTO;
+        log.info("解密结果:{}", plaintext);
+        if (JSONObject.parseObject(plaintext).getJSONObject("carMappings") != null) {
+            HbCrawlerQueryCarRequest.CbitDataDTO cbitDataDTO = JSONObject.parseObject(plaintext).getJSONObject("carMappings")
+                    .getJSONArray("cbitData")
+                    .getJSONObject(0).toJavaObject(HbCrawlerQueryCarRequest.CbitDataDTO.class);
+            return cbitDataDTO;
+        } else {
+            throw new SystemException("未查询到车辆信息");
+        }
     }
 
     /**
@@ -296,6 +299,7 @@ public class HengBangCrawlerRequestComponent {
             ObjectMapper mapper = new ObjectMapper();
             mapper.setSerializationInclusion(JsonInclude.Include.ALWAYS);
             String json = mapper.writeValueAsString(calculationRequest);
+            log.info("提交报价数据请求参数: {}", json);
             req.setHbEncD(HengBangAESUtil.encryptStr(json));
             HbCrawlerSaleInfoResponse response = requestComponent.toStringPost(RequestUrl.CALCULATION.getRequestUrl(hbCrawlerProperties.getBaseUrl()), req, RequestUrl.CALCULATION.getRequestDescription(), HbCrawlerSaleInfoResponse.class, headers);
             System.out.println(HengBangAESUtil.decryptStr(response.getHbEncD()));
@@ -323,6 +327,15 @@ public class HengBangCrawlerRequestComponent {
      * @param headers
      * @return
      */
+    public HbCrawlerProposalResponse carInsureItem(String plyappno, HttpHeaders headers) {
+        MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+        params.add("plyappno", plyappno);
+        requestComponent.get(RequestUrl.CARINSUREITEM.getRequestUrl(hbCrawlerProperties.getBaseUrl()), params, RequestUrl.CARINSUREITEM.getRequestDescription(), null, headers);
+        requestComponent.get(RequestUrl.CHARGINGPOSTS.getRequestUrl(hbCrawlerProperties.getBaseUrl()), params, RequestUrl.CHARGINGPOSTS.getRequestDescription(), null, headers);
+        requestComponent.get(RequestUrl.CARINSUREDEVICES.getRequestUrl(hbCrawlerProperties.getBaseUrl()), params, RequestUrl.CARINSUREDEVICES.getRequestDescription(), null, headers);
+        return proposal(plyappno, headers);
+    }
+
     public HbCrawlerProposalResponse proposal(String plyappno, HttpHeaders headers) {
         MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
         String encryptPlyappno;
@@ -395,7 +408,7 @@ public class HengBangCrawlerRequestComponent {
             log.error("恒邦calculation接口调用失败[{}]: {}", e.getStatusCode(), e.getResponseBodyAsString(StandardCharsets.UTF_8));
             if (e.getStatusCode().equals(HttpStatusCode.valueOf(500))) {
                 return JSONObject.parseObject(e.getResponseBodyAsString(StandardCharsets.UTF_8)).getString("detail");
-            } else  if (e.getStatusCode().equals(HttpStatusCode.valueOf(400))) {
+            } else if (e.getStatusCode().equals(HttpStatusCode.valueOf(400))) {
                 return JSONObject.parseObject(e.getResponseBodyAsString(StandardCharsets.UTF_8)).getString("title");
             } else {
                 throw new SystemException(e.getMessage());

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

@@ -22,6 +22,9 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
     FIND_SALE_INFO("/backstage/api/findSaleInformationNew", "查询归属信息"),
     DEPRECIATIONRATE("/backstage/api/coredblink/depreciationrate", "获取折旧价"),
     QUOTEIMMEDIATELY("/new-insure/api/carinsurenew/quoteimmediately", "生成投保单号"),
+    CARINSUREITEM("/new-insure/api/carinsurenew/carInsureItem", "校验投保单号"),
+    CHARGINGPOSTS("/new-insure/api/carinsurenew/chargingPosts", "校验投保单号"),
+    CARINSUREDEVICES("/new-insure/api/carinsurenew/carInsureDevices", "汽车保险设备"),
     CALCULATION("/new-insure/api/carinsurenew/calculation", "提交报价数据"),
     PROPOSAL("/new-insure/api/carinsurenew/proposal", "获取报价数据"),
 

+ 47 - 19
tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/entity/request/HbCrawlerCalculationRequest.java

@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
 import com.jzg.commons.entity.quote.vo.AccidentalDrivingVo;
 import com.jzg.commons.entity.quote.vo.KindInfoVo;
 import com.jzg.commons.entity.quote.vo.QuoteVo;
+import com.jzg.commons.entity.quote.vo.RiskInfoVo;
 import com.jzg.quotation.commons.utils.DateUtil;
 import com.jzg.quotation.hengbang.crawler.entity.response.HbCrawlerRecordResponse;
 import lombok.Data;
@@ -80,6 +81,11 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
         List<KindInfoVo> kindInfoVoList = quoteVo.getKindInfoVo();
         this.risktype = "0";
         this.begintimeBi = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
+        if (Objects.nonNull(quoteVo.getCiRiskInfoVo())) {
+            this.begintimeCi = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
+            this.begintimeAccident = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
+            this.risktype = "1";
+        }
         if (CollUtil.isNotEmpty(kindInfoVoList)) {
             this.epersonliabilityList = getEpersonliabilityList(kindInfoVoList);
             this.begintimeBi = DateUtil.toUtcDateTime(quoteVo.getBiRiskInfoVo().getStartDate());
@@ -89,11 +95,6 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
 //            this.begintimeBi = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
             this.epersonliabilityList = new ArrayList<>();
         }
-        if (Objects.nonNull(quoteVo.getCiRiskInfoVo())) {
-            this.begintimeCi = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
-            this.begintimeAccident = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
-            this.risktype = "1";
-        }
         this.plyappno = plyappno;
         this.ecarshiptaxPart = "投保人";
         this.taxonomyCode = "02";
@@ -101,11 +102,11 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
         this.endtimeBi = "";
         this.endtimeCi = "";
         this.expdisc = "";
-        this.accidentEpolicyFlag = "";
+        this.accidentEpolicyFlag = "Y";
         this.effectfLag = null;
         this.ecarChargingPosts = new ArrayList<>();
         this.carInsureDevices = new ArrayList<>();
-        this.accidentInsuranceList = getAccidentInsuranceList(quoteVo.getAccidentalDrivings());
+        this.accidentInsuranceList = getAccidentInsuranceList(quoteVo.getBiRiskInfoVo(), quoteVo.getAccidentalDrivings());
     }
 
     public List<EpersonliabilityDTO> getEpersonliabilityList(List<KindInfoVo> kindInfoVoList) {
@@ -122,31 +123,36 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
         return epersonliabilityDTOList;
     }
 
-    public List<AccidentInsuranceDTO> getAccidentInsuranceList(List<AccidentalDrivingVo> accidentalDrivings) {
+    public List<AccidentInsuranceDTO> getAccidentInsuranceList(RiskInfoVo biRiskInfoVo, List<AccidentalDrivingVo> accidentalDrivings) {
         if (accidentalDrivings == null || accidentalDrivings.isEmpty()) {
             return new ArrayList<>();
         }
         List<AccidentInsuranceDTO> accidentInsuranceList = new ArrayList<>();
         for (AccidentalDrivingVo vo : accidentalDrivings) {
-            accidentInsuranceList.add(convertToAccidentInsuranceDTO(vo));
+            accidentInsuranceList.add(convertToAccidentInsuranceDTO(biRiskInfoVo, vo));
         }
         return accidentInsuranceList;
     }
 
-    public static AccidentInsuranceDTO convertToAccidentInsuranceDTO(AccidentalDrivingVo vo) {
+    public static AccidentInsuranceDTO convertToAccidentInsuranceDTO(RiskInfoVo biRiskInfoVo, AccidentalDrivingVo vo) {
         AccidentInsuranceDTO dto = new AccidentInsuranceDTO();
         dto.setNonriskcode(vo.getProductCode().split("_")[1]);
         dto.setProgramcode(vo.getProductCode());
         dto.setProgramname(vo.getProductName());
+        dto.setBegintime(DateUtil.toUtcDateTime(biRiskInfoVo.getStartDate()));
+        dto.setEndtime(DateUtil.toUtcDateTime(biRiskInfoVo.getEndDate()));
         dto.setCompanycode("0107");
-        dto.setSuminsured(vo.getSumAmount());
-        dto.setSumgrosspremium(vo.getSumPremium());
+        dto.setRelationcarowner("a");
+        dto.setSuminsured("525000");
+        dto.setSumgrosspremium(vo.getPremium());
         dto.setIfdefault(true);
         dto.setBuynum(vo.getQuantity());
         dto.setGgriskprogramclauselist(getGgriskprogramclauseList(vo.getProductCode().split("_")[1], vo.getProductCode()));
         dto.setGgriskprogramdetailslist(getGgriskprogramdetailsList(vo.getProductCode().split("_")[1], vo.getProductCode()));
         dto.setGgriskprogramdeductiblelist(new ArrayList<>());
-        dto.setGgriskprogramparamlist(new ArrayList<>());
+        List<GgriskprogramparamlDTO> ggriskprogramparamlist = new ArrayList<>();
+        ggriskprogramparamlist.add(new GgriskprogramparamlDTO("2021-05-19T07:00:00.000+0000", "subsidy", "99.9", "0107_1119_003", "2021-05-19T07:00:00.000+0000", "1"));
+        dto.setGgriskprogramparamlist(ggriskprogramparamlist);
         return dto;
     }
 
@@ -219,10 +225,10 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
         detail1.setSerialno(1);
         detail1.setKindcode("1119066");
         detail1.setKindname("机动车辆驾乘意外伤害保险意外身故保险责任(2024款)");
-        detail1.setKindrate("0.225");
-        detail1.setKindunitinsured("30000");
-        detail1.setKindsuminsured("240000");
-        detail1.setKindunitpremium("6.75");
+        detail1.setKindrate("0.098");
+        detail1.setKindunitinsured("50000");
+        detail1.setKindsuminsured("250000");
+        detail1.setKindunitpremium("4.9");
         detail1.setKindgrosspremium("54");
         list.add(detail1);
 
@@ -322,13 +328,13 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
         private List<GgriskprogramclauseDTO> ggriskprogramclauselist;
         private List<Object> ggriskprogramdeductiblelist;
         private List<GgriskprogramdetailsDTO> ggriskprogramdetailslist;
-        private List<Object> ggriskprogramparamlist;
+        private List<GgriskprogramparamlDTO> ggriskprogramparamlist;
         private String familyinsureitem;
         private String gasinsureitem;
         private String risk1205field;
         private String risk1283items;
         private String drivingtype;
-        private String relationcarowner;
+        private String relationcarowner = "a";
     }
 
     @Data
@@ -347,6 +353,28 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
         private String serialno;
     }
 
+    @Data
+    public static class GgriskprogramparamlDTO implements Serializable {
+        @Serial
+        private static final long serialVersionUID = -9183755801236888529L;
+
+        private String createtime;
+        private String paramname;
+        private String paramvalue;
+        private String programcode;
+        private String updatetime;
+        private String validind;
+
+        public GgriskprogramparamlDTO(String createtime, String paramname, String paramvalue, String programcode, String updatetime, String validind) {
+            this.createtime = createtime;
+            this.updatetime = updatetime;
+            this.paramname = paramname;
+            this.paramvalue = paramvalue;
+            this.programcode = programcode;
+            this.validind = validind;
+        }
+    }
+
     @Data
     public static class GgriskprogramdetailsDTO implements Serializable {
         @Serial

+ 4 - 15
tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/entity/response/HbCrawlerRecordResponse.java

@@ -21,16 +21,6 @@ public class HbCrawlerRecordResponse extends HbBaseResponse {
     @Serial
     private static final long serialVersionUID = 7654321987612345678L;
 
-    /**
-     * 投保单号
-     */
-    private String plyappno;
-
-    /**
-     * 交强险验证码图片(base64)
-     */
-    private String checkcodeJqImg;
-
     /**
      * 商业险投保单号
      */
@@ -51,14 +41,13 @@ public class HbCrawlerRecordResponse extends HbBaseResponse {
      */
     private String checktypeSy;
 
-    /**
-     * 商业险验证码图片(base64)
-     */
-    private String checkcodeSyImg;
-
     /**
      * 交强险验证码
      */
     private String checkcodeJq;
 
+    /**
+     * 商业险验证码
+     */
+    private String checkcodeSy;
 }

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

@@ -84,7 +84,7 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
     }
 
     @Override
-  public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
+    public boolean detectLogin(DetectLoginRequest detectLoginRequest) {
         String username = detectLoginRequest.getUsername();
         String password = detectLoginRequest.getPassword();
         String authorization = hbCrawlerRequestComponent.getAuthorization(username);
@@ -151,19 +151,6 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
         HbCrawlerProposalResponse proposalResponse = null;
         // 脱保情况 重新赋值核心建议起保时间 二次报价
         if (errorMsg.contains("脱保")) {
-            calculationRequest.setOutofwarrantytype("N");
-            resJson = hbCrawlerRequestComponent.getCalculationResult(calculationRequest, headers);
-            errorMsg = JSONObject.parseObject(resJson).getString("message");
-            status = JSONObject.parseObject(resJson).getString("status");
-        }
-
-        if (errorMsg.contains("该车是转保车,请输入对应的转保验证码")) {
-            JSONObject resJsonObj = JSONObject.parseObject(resJson);
-            String responseBody = resJsonObj.getString("responseBody");
-            HbCrawlerRecordResponse recordResponse = JSONObject.parseObject(responseBody, HbCrawlerRecordResponse.class);
-            calculationRequest.setOutofwarrantytype("N");
-            calculationRequest.setTransferVehicle(recordResponse);
-
             resJson = hbCrawlerRequestComponent.getCalculationResult(calculationRequest, headers);
             errorMsg = JSONObject.parseObject(resJson).getString("message");
             status = JSONObject.parseObject(resJson).getString("status");
@@ -181,10 +168,21 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
             status = JSONObject.parseObject(resJson).getString("status");
         }
 
+        if (errorMsg.contains("该车是转保车,请输入对应的转保验证码")) {
+            JSONObject resJsonObj = JSONObject.parseObject(resJson);
+            String responseBody = resJsonObj.getString("responseBody");
+            HbCrawlerRecordResponse recordResponse = JSONObject.parseObject(responseBody, HbCrawlerRecordResponse.class);
+            calculationRequest.setTransferVehicle(recordResponse);
+
+            resJson = hbCrawlerRequestComponent.getCalculationResult(calculationRequest, headers);
+            errorMsg = JSONObject.parseObject(resJson).getString("message");
+            status = JSONObject.parseObject(resJson).getString("status");
+        }
+
         if (errorMsg.equals("成功")) {
             errorMsg = "成功";
             // 5.2 报价第三步,获取报价数据
-            proposalResponse = hbCrawlerRequestComponent.proposal(plyappno, headers);
+            proposalResponse = hbCrawlerRequestComponent.carInsureItem(plyappno, headers);
             HbCrawlerOrder hbCrawlerOrder = new HbCrawlerOrder();
             hbCrawlerOrder.setOrdersNo(quoteVo.getOrder().getOrdersNo());
             hbCrawlerOrder.setPlyappno(plyappno);
@@ -217,7 +215,7 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
         List<HbCrawlerCalculationRequest.AccidentInsuranceDTO> accidentList = new ArrayList<>();
         quoteVo.getAccidentalDrivings().stream()
                 .filter(e -> StrUtil.isNotEmpty(e.getProductCode()))
-                .forEach(e -> accidentList.add(HbCrawlerCalculationRequest.convertToAccidentInsuranceDTO(e)));
+                .forEach(e -> accidentList.add(HbCrawlerCalculationRequest.convertToAccidentInsuranceDTO(quoteVo.getBiRiskInfoVo(), e)));
         calculationRequest.setAccidentInsuranceList(accidentList);
     }
 
@@ -373,7 +371,7 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
                     String base64Str = imageDTO.getImageBase64Str();
                     if (base64Str.startsWith("http")) {
                         SysUploadFiles uploadFile = platformClient.getUploadFile(imageDTO.getImageId());
-                        base64Str =  minioUtils.getBase64Str(uploadFile.getBucketName(), uploadFile.getFileName());
+                        base64Str = minioUtils.getBase64Str(uploadFile.getBucketName(), uploadFile.getFileName());
                     }
                     fileBuff.add("data:image/jpeg;base64," + base64Str);
                     if (InsuranceImageEnum.C02.getCode().equals(insuranceImageVo.getImageCode())) {

文件差异内容过多而无法显示
+ 3 - 3
tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/utils/HengBangAESUtil.java


+ 13 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/InsFeeOrderController.java

@@ -11,6 +11,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 /**
@@ -60,6 +61,18 @@ public class InsFeeOrderController {
         return insFeeOrdersService.getInsFeeOrderByOrderNo(orderNo);
     }
 
+    /**
+     * 查询指定订单的应收总额
+     *
+     * @param orderNos 订单编号
+     * @author lipf
+     * @date 2026/6/4 10:17
+     */
+    @PostMapping("/queryAllTotalReceivablePremiumByOrderNo")
+    BigDecimal queryAllTotalReceivablePremiumByOrderNo(@RequestBody List<String> orderNos){
+        return insFeeOrdersService.queryAllTotalReceivablePremiumByOrderNo(orderNos);
+    }
+
     @Operation(summary = "修改权益可用金额")
     @PostMapping("updateAvailableAmount")
     public HttpResult updateOrders(@RequestBody RightsAmountUpdateDto rightsAmountUpdateDto) {

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

@@ -758,10 +758,10 @@ public class UnifyOrderManager {
     public HttpResult<String> mockUnderwited(@RequestBody OrderStatusVo orderStatusVo) throws Exception {
         log.info("模拟承保(跳过实际付款操作). orderStatusVo=[{}]", JSONUtil.toJsonStr(orderStatusVo));
         InsOrders insOrders = insOrdersService.getById(orderStatusVo.getOrder().getOrdersNo());
+        AssertionUtils.isFail(Objects.isNull(insOrders), "订单不存在");
         if (!"4".equals(insOrders.getOrderStatus())) {
             return HttpResult.error("只能对待缴费的订单进行模拟承保");
         }
-        AssertionUtils.isFail(Objects.isNull(insOrders), "订单不存在");
         HttpResult<EsmInsCompany> esmInsCompanyHttpResult = platformClient.findById(insOrders.getCompanyId());
         orderStatusVo.getOrder().setAgreementId(insOrders.getAgreementId());
         orderStatusVo.getOrder().setInsuranceCompanyCode(esmInsCompanyHttpResult.getData().getCompanyCode());

+ 2 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/factory/CompanyFactory.java

@@ -35,6 +35,7 @@ import org.springframework.util.ObjectUtils;
 
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 import java.util.stream.Collectors;
 
 /**
@@ -226,7 +227,7 @@ public class CompanyFactory {
         //设置归属信息
         HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution(clauseDataVo.getOrder()
                 .getAgreementId());
-        AssertionUtils.isFail(agreementAttribution.getCode() == 500, "获取协议属性失败");
+        AssertionUtils.isFail(agreementAttribution.getCode() == 500, Objects.toString(agreementAttribution.getMsg(),"获取协议信息异常"));
         Map<String, String> fieldMap = agreementAttribution.getData().getFields().stream()
                 .map(obj -> new JSONObject((Map<String, Object>) obj))  // 转换为 JSONObject
                 .collect(Collectors.toMap(

+ 7 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/mapper/InsFeeAuditMapper.java

@@ -12,11 +12,17 @@ import java.util.List;
 /**
 * @author dongxin
 * @description 针对表【ins_fee_audit(订单审核表)】的数据库操作Mapper
-* @createDate 2025-07-02 14:35:50
+* @date 2025-07-02 14:35:50
 * @Entity generator.domain.InsFeeAudit
 */
 public interface InsFeeAuditMapper extends BaseMapper<InsFeeAudit> {
 
+    /**
+     * 查询订单审核信息
+     *
+     * @author lipf
+     * @date 2026/6/3 17:48
+     */
     Page<FeeAuditVo> queryPage(Page page, @Param("param") FeeAuditParam param);
 
     List<FeeAuditVo> queryList(Page page, @Param("param") FeeAuditParam param);

+ 10 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/mapper/InsFeeOrdersMapper.java

@@ -6,6 +6,7 @@ import com.jzg.commons.entity.po.InsFeeOrders;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 @Mapper
@@ -19,4 +20,13 @@ public interface InsFeeOrdersMapper extends BaseMapper<InsFeeOrders> {
     List<InsFeeOrders> getInsFeeOrderAudit(String userId);
 
     List<InsFeeOrders> getInsFeeOrderByOrderNo(String orderNo);
+
+    /**
+     * 查询应收总额
+     *
+     * @author lipf
+     * @date 2026/6/4 10:22
+     */
+    BigDecimal queryAllTotalReceivablePremiumByOrderNo(@Param("orders") List<String> orders);
+
 }

+ 3 - 2
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/InsFeeAuditService.java

@@ -31,9 +31,10 @@ public interface InsFeeAuditService extends IService<InsFeeAudit> {
     /**
      * 新增待审核订单
      *
-     * @param orders
+     * @param orders 订单所属的租户
+     * @param systemCode 租户代码
      */
-    void feeAuditAdd(InsOrders orders);
+    void feeAuditAdd(InsOrders orders, String systemCode);
 
     /**
      * 根据订单号查询订单详情

+ 9 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/InsFeeOrdersService.java

@@ -26,4 +26,13 @@ public interface InsFeeOrdersService extends IService<InsFeeOrders> {
     HttpResult updateAvailableAmount(String orderNo,BigDecimal availableAmount);
 
     CostCalculateRespVO computedCostInfo(PtlAgreementCostRatioVo param);
+
+    /**
+     * 查询指定订单的应收总额
+     *
+     * @param orderNos 订单编号
+     * @author lipf
+     * @date 2026/6/4 10:17
+     */
+    BigDecimal queryAllTotalReceivablePremiumByOrderNo(List<String> orderNos);
 }

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

@@ -198,12 +198,12 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
                 feeAuditVo.setEquityAmount(BigDecimal.ZERO);
             }
         }
-
         return feeAuditVoList;
     }
 
     @Override
-    public void feeAuditAdd(InsOrders orders) {
+    public void feeAuditAdd(InsOrders orders, String systemCode) {
+        log.info("systemCode = [{}], feeAuditAdd: orders=[{}]",systemCode, JSONUtil.toJsonStr(orders));
         // 先检查是否已存在审核记录,避免重复INSERT导致主键冲突
         InsFeeAudit existing = this.getOne(new LambdaQueryWrapper<InsFeeAudit>().eq(InsFeeAudit::getOrderNo, orders.getId()));
         if (existing != null) {
@@ -219,6 +219,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         AgreementInfoVo agreementInfoVo = result.getData();
         AgreementVo agreementVo = agreementInfoVo.getAgreement();
         insFeeAudit.setAuditType(Integer.parseInt(agreementVo.getAuditType()));
+        insFeeAudit.setSystemCode(systemCode);
         if(agreementVo.getAuditType().equals("1")){ // 人工审核
             insFeeAudit.setAuditStatus(0);
         }else{ // 自动审核

+ 26 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsFeeOrdersServiceImpl.java

@@ -1,5 +1,7 @@
 package com.jzg.quotation.summary.service.impl;
 
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.collection.ListUtil;
 import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -394,4 +396,28 @@ public class InsFeeOrdersServiceImpl extends ServiceImpl<InsFeeOrdersMapper, Ins
         wrapper.eq(InsFeeOrders::getOrderNo, orderNo);
         return insFeeOrdersMapper.selectOne(wrapper);
     }
+
+    /**
+     * 查询指定订单的应收总额
+     *
+     * @param orderNos 订单编号
+     * @author lipf
+     * @date 2026/6/4 10:17
+     */
+    @Override
+    public BigDecimal queryAllTotalReceivablePremiumByOrderNo(List<String> orderNos) {
+        log.info("查询[{}]个订单的应付金额", CollUtil.size(orderNos));
+        if(CollUtil.isEmpty(orderNos)){
+            return BigDecimal.ZERO;
+        }
+        List<List<String>> split = ListUtil.split(orderNos, 3000);
+        BigDecimal initAmout = BigDecimal.ZERO;
+        for (List<String> orders : split) {
+            BigDecimal amount  = insFeeOrdersMapper.queryAllTotalReceivablePremiumByOrderNo(orders);
+            if (amount != null) {
+                initAmout = initAmout.add(amount);
+            }
+        }
+        return initAmout;
+    }
 }

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

@@ -1453,6 +1453,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
     @Override
     public void orderAfterUpdateOrderStatus(String orderNo, OrderStatusResultVo orderStatusResultVo) {
         // 检测主订单是否存在
+        String systemCode = baseController.getSystemCode();
         InsOrders insOrders = insOrdersMapper.selectOne(new LambdaQueryWrapper<InsOrders>().eq(InsOrders::getId, orderNo));
         AssertionUtils.isFail(Objects.isNull(insOrders), "订单不存在");
         InsOrdersCarInfo insOrdersCarInfo = insOrdersCarInfoMapper.selectById(insOrders.getId());
@@ -1488,7 +1489,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         }
         if (orderStatusResultVo.getOrderStatus().equals(InsOrderStatusEnum.UNDERWRITED)) {
             // 增加财务审核
-            insFeeAuditService.feeAuditAdd(insOrders);
+            insFeeAuditService.feeAuditAdd(insOrders,systemCode );
             // 将父订单的保司id 和名称更新
             InsOrders baseInsOrders = insOrdersMapper.selectOne(new LambdaQueryWrapper<InsOrders>().eq(InsOrders::getId, insOrders.getParentId()));
             baseInsOrders.setCompanyId(insOrders.getCompanyId());

+ 1 - 1
tenant/insurance/quotation-summary/src/main/resources/mapper/InsFeeAuditMapper.xml

@@ -79,7 +79,7 @@
         LEFT JOIN ins_orders_costs ioc on ioc.order_no = io.id AND ioc.is_delete=0
         LEFT JOIN ins_orders_external_policy ioep on ioep.order_no = io.id AND ioep.is_delete=0
         <where>
-            and ifa.is_delete=0
+            and ifa.is_delete=0 and ifa.system_code = #{param.systemCode}
             <choose>
                 <when test="param.receiveUser != null and param.receiveUser != ''">
                     and ifa.receive_user = #{param.receiveUser}

+ 14 - 0
tenant/insurance/quotation-summary/src/main/resources/mapper/InsFeeOrdersMapper.xml

@@ -80,4 +80,18 @@
             </if>
         </where>
     </select>
+
+    <!-- 查询应收订单总额 lipf 2026年6月4日10:22:57 -->
+    <select id="queryAllTotalReceivablePremiumByOrderNo" resultType="java.math.BigDecimal">
+        SELECT
+            sum(COALESCE(ifo.total_receivable_premium, 0))
+        from
+            ins_fee_orders ifo
+        <where>
+            ifo.order_no in
+            <foreach collection="orders" item="order" open="(" separator="," close=")">
+                #{order}
+            </foreach>
+        </where>
+    </select>
 </mapper>

+ 1 - 1
tenant/insurance/quotation-summary/src/main/resources/mapper/SysQueryVehicleConfigMapper.xml

@@ -9,7 +9,7 @@
     </sql>
 
     <select id="getByType" resultType="com.jzg.commons.entity.dto.SysQueryVehicleConfigDTO">
-        select <include refid="Base_Column_List"/>
+        select *
         from sys_query_vehicle_config c
         left join sys_query_vehicle_url u
         on c.id = u.config_id

+ 11 - 6
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/TKSimpleService.java

@@ -999,10 +999,10 @@ public class TKSimpleService {
             if (CollectionUtils.isEmpty(commonQuoteVo.getKindInfoVo())) {
                 flag.setCiFlag("0");
             }
-            // 无驾意险
-            if (CollectionUtils.isEmpty(commonQuoteVo.getAccidentalDrivings())) {
-                flag.setIsAccidentInsureFlag("0");
-            }
+            // 无驾意险,经测试这个值无驾意险的时候请求还是传1,不用改变
+            // if (CollectionUtils.isEmpty(commonQuoteVo.getAccidentalDrivings())) {
+            //     flag.setIsAccidentInsureFlag("0");
+            // }
         }
 
         // 其他参数
@@ -1117,8 +1117,9 @@ public class TKSimpleService {
         {
             // 同步驾意险, 系统有选择驾意险进行匹配覆盖(泰康要求必须有驾意险)
             Map<String, TKCarPlanInfo> carPlanInfoMap = Optional.ofNullable(preciseInitParam.getDriverAccidentVo().getCarPlanInfoList()).orElseGet(Collections::emptyList).stream().collect(Collectors.toMap(TKCarPlanInfo::getPlanCode, Function.identity()));
-            TKDriverAccidentVo driverAccidentVo = preciseInitParam.getDriverAccidentVo();
-            List<AccidentalDrivingVo> accidentalDrivings = commonQuoteVo.getAccidentalDrivings();
+            TKDriverAccidentVo driverAccidentVo = preciseInitParam.getDriverAccidentVo();// 泰康系统默认的驾意险信息
+            List<AccidentalDrivingVo> accidentalDrivings = commonQuoteVo.getAccidentalDrivings(); // 公司系统的驾意险参数
+            // 公司系统的驾意险参数为空证明没有选择驾意险
             if (CollectionUtils.isNotEmpty(accidentalDrivings)) {
                 for (AccidentalDrivingVo accidentalDriving : accidentalDrivings) {
                     if (carPlanInfoMap.isEmpty() || accidentalDriving.getRiskCode() == null) {
@@ -1130,6 +1131,10 @@ public class TKSimpleService {
                     driverAccidentVo.setQuoteAmountCN(tkCarPlanInfo.getPlanName());
                     driverAccidentVo.setPremium(new BigDecimal(tkCarPlanInfo.getSumPremium()));
                 }
+            } else {
+                driverAccidentVo.setIsSelect("0");
+                driverAccidentVo.setQuantity(0);
+                driverAccidentVo.setQuantityCname("不投保");
             }
         }
 

文件差异内容过多而无法显示
+ 88 - 87
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/impl/TKQuotationBaseServiceImpl.java


+ 2 - 2
tenant/insurance/quotation-zhongan/pom.xml

@@ -53,8 +53,8 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
-                    <source>14</source>
-                    <target>14</target>
+                    <source>15</source>
+                    <target>15</target>
                 </configuration>
             </plugin>
         </plugins>

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

@@ -254,6 +254,21 @@ public class ZiJinCrawlerRequestComponent {
         return post.getBody();
     }
 
+    /**
+     * 验证码(报价出现转保标志)
+     *
+     * @param ziJinCrawlerRecognizeCodesRequest
+     * @return ZiJinCrawlerRecognizeCodesResponse
+     */
+    public ZiJinCrawlerRecognizeCodesResponse recognizeCodes(List<ZiJinCrawlerRecognizeCodesRequest> ziJinCrawlerRecognizeCodesRequest) throws IOException {
+        //设置headers
+        HttpHeaders httpHeaders = setHttpHeaders();
+        String jsonString = JSON.toJSONString(ziJinCrawlerRecognizeCodesRequest);
+        log.info("ziJinCrawlerRecognizeCodesRequest请求参数的值:{}", jsonString);
+        ResponseEntity<ZiJinCrawlerRecognizeCodesResponse> post = requestComponent.post(RequestUrl.SKIP_SING.getRequestUrl(ziJinCrawlerProperties.getBaseUrl()), jsonString, ZiJinCrawlerRecognizeCodesResponse.class, httpHeaders);
+        return post.getBody();
+    }
+
     /**
      * 保存报价信息
      *

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

@@ -0,0 +1,32 @@
+package com.jzg.quotation.zijin.crawler.entity.request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 紫金保司验证码请求参数实体类
+ */
+@NoArgsConstructor
+@Data
+public class ZiJinCrawlerRecognizeCodesRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 7427030740879200532L;
+
+    /**
+     * 图片base64编码
+     */
+    @JsonProperty("base64")
+    private String base64;
+
+    /**
+     * 图片序列号
+     */
+    @JsonProperty("serialNo")
+    private String serialNo;
+
+}

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

@@ -0,0 +1,45 @@
+package com.jzg.quotation.zijin.crawler.entity.response;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @description:
+ * @author: wangrq
+ * @date: 2026/6/4 17:21
+ **/
+@NoArgsConstructor
+@Data
+public class ZiJinCrawlerRecognizeCodesResponse implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -5489561233132767139L;
+
+    @JsonProperty("rtnCode")
+    private String rtnCode;
+
+    @JsonProperty("rtnMsg")
+    private String rtnMsg;
+
+    @JsonProperty("results")
+    private Results results;
+
+    @NoArgsConstructor
+    @Data
+    public static class Results implements Serializable {
+
+        @Serial
+        private static final long serialVersionUID = -387691987089999421L;
+
+        @JsonProperty("serialNo")
+        private String serialNo;
+
+        @JsonProperty("result")
+        private String result;
+
+    }
+}

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

@@ -23,6 +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", "跳过转保标志"),
     SAVE_PROPOSAL_ORDER("/kscd-frontend/order/saveProposal", "保存投保单"),
     // 税务登记证号
     GET_TAX_REGISTRY_NUMBER("/temp/api/v1/insurance/public/taxInfo/getTaxRegistryNumber", "获取税务登记证号"),

+ 1 - 0
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/enums/ResponseCode.java

@@ -13,6 +13,7 @@ import lombok.Getter;
 public enum ResponseCode {
 
     R_0000("0000", "成功"),
+    R_0001("9980", "转保标志!"),
     R_Z00002("Z00002", "再次调用此接口确认");
 
     private final String code;

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

@@ -12,7 +12,6 @@ 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.commons.exception.SystemException;
-import com.jzg.commons.util.ObjectUtil;
 import com.jzg.quotation.commons.annotation.QuoteCrawlerService;
 import com.jzg.quotation.commons.client.PlatformClient;
 import com.jzg.quotation.commons.constant.InsuranceCode;
@@ -202,6 +201,17 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
             // 设置紫金财险爬虫订单号,后面保存到数据库中
             ziJinCrawlerQuotationResponse.setOrderNo(ziJinCrawlerGetOrderNoResponse.getOrderNo());
 
+            // 转保标志
+            if (ResponseCode.R_0001.getCode().equals(ziJinCrawlerQuotationResponse.getRtnCode())) {
+                if (ziJinCrawlerQuotationResponse.getBasePart() != null) {
+                    ZiJinCrawlerRecognizeCodesResponse ziJinCrawlerRecognizeCodesResponse = ziJinCrawlerRequestComponent.recognizeCodes(buildRecognizeCodesRequests(ziJinCrawlerQuotationResponse));
+                    log.info("ziJinCrawlerRecognizeCodesResponse参数的值:{}", JSON.toJSONString(ziJinCrawlerRecognizeCodesResponse));
+                    // 再次调用报价接口
+                    if (ResponseCode.R_0000.getCode().equals(ziJinCrawlerRecognizeCodesResponse.getRtnCode())) {
+                        ziJinCrawlerQuotationResponse = ziJinCrawlerRequestComponent.quotation(ziJinCrawlerQuotationRequest, headers);
+                    }
+                }
+            }
             // 4.0 处理报价失败
             if (!ResponseCode.R_0000.getCode().equals(ziJinCrawlerQuotationResponse.getRtnCode())) {
                 ziJinCrawlerOrderService.save(quoteVo, ziJinCrawlerQuotationResponse, false);
@@ -231,6 +241,15 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
         }
     }
 
+    private ArrayList<ZiJinCrawlerRecognizeCodesRequest> buildRecognizeCodesRequests(ZiJinCrawlerQuotationResponse ziJinCrawlerQuotationResponse) {
+        ArrayList<ZiJinCrawlerRecognizeCodesRequest> ziJinCrawlerRecognizeCodesRequests = new ArrayList<>();
+        ZiJinCrawlerRecognizeCodesRequest ziJinCrawlerRecognizeCodesRequest = new ZiJinCrawlerRecognizeCodesRequest();
+        ziJinCrawlerRecognizeCodesRequest.setBase64(ziJinCrawlerQuotationResponse.getBasePart().getQuestion());
+        ziJinCrawlerRecognizeCodesRequest.setSerialNo("question");
+        ziJinCrawlerRecognizeCodesRequests.add(ziJinCrawlerRecognizeCodesRequest);
+        return ziJinCrawlerRecognizeCodesRequests;
+    }
+
     /**
      * 核保
      *
@@ -1034,7 +1053,7 @@ public class ZiJinCrawlerRequestImpl implements ZiJinCrawlerRequest {
         CarInfoVo carInfoVo = quoteVo.getCarInfoVo();
 
         // 获取税务登记证号
-        String taxRegistryNumber = "";
+        String taxRegistryNumber = "91140100MAE72CK690";
         // try {
         //     ZiJinCrawlerGetTaxRegistryNumberResponse taxResponse = ziJinCrawlerRequestComponent.getTaxRegistryNumber(comCode, headers);
         //     if (taxResponse != null && StringUtils.hasLength(taxResponse.getData())) {

文件差异内容过多而无法显示
+ 0 - 0
tenant/insurance/quotation-zijin/src/main/resources/js/auto.js


+ 1 - 1
tenant/insurance/quotation-zijin/src/main/resources/js/content.js

@@ -1 +1 @@
-___content ="fyI0z7E7jY2CkcJmCEv9pRg73QvOr2ZN7hBoiBI9hdIBM8tvt6Qe850wRmo.lW0y40RLrX8KSEBrFvclREHplomQfhE9GrsXFqJo8_12_LAEAIrm9PG4KB_JLJ.g183AEHrlWewOMYlh_uPBevFbn7xxT5Pbvqt2vqEfSpqedNrdshoeVhncrwPZHn_XTxa16d_zDLL4yQ7";
+___content ="_hYQ6AavokJoelEcr.GeRau9ukUCvnxAejeXOVsqAfh28FWjXbBEv88GeZcKnM8wiUFA.fIx0Pfjsgy0kJCZWgTF7H7Qf39EnkQ8dbBgGdIdPeU.hb30zgA9Jzl_KG9IAQv5xGSMC.HSm4xPhK2SH0lWNuENucw64L3hNeA7xGHWsD3C3Tto_BJB3ajs4j6FlNsQoNvGHOG";

文件差异内容过多而无法显示
+ 0 - 0
tenant/insurance/quotation-zijin/src/main/resources/js/tsssss.js


+ 10 - 0
tenant/organization/src/main/java/com/jzg/organization/client/InsFeeOrdersClient.java

@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 /**
@@ -30,4 +31,13 @@ public interface InsFeeOrdersClient {
     @Operation(summary = "车险报价批量修改联系人等信息")
     HttpResult<String> updateOrdersBatch(@RequestBody BatchModifyVo batchModifyVo);
 
+    /**
+     * 查询指定订单的应收总额
+     *
+     * @param orderNos 订单编号
+     * @author lipf
+     * @date 2026/6/4 10:17
+     */
+    @PostMapping("/insFeeOrder/queryAllTotalReceivablePremiumByOrderNo")
+    BigDecimal queryAllTotalReceivablePremiumByOrderNo(@RequestBody List<String> orderNos);
 }

+ 7 - 1
tenant/organization/src/main/java/com/jzg/organization/controller/AppUserController.java

@@ -162,7 +162,13 @@ public class AppUserController extends BaseController {
         log.info("邀请码注册:param=[{}]", JSONUtil.toJsonStr(param));
         AssertionUtils.isSucceed(userService.validateSmsCode(param.getMobile(), param.getSmsCode()), "短信验证码不通过!");
         param.setToken(getToken());
-        return HttpResult.ok(userJzgAppService.invitationRegister(param));
+        try{
+            InvitationVo invitationVo = userJzgAppService.invitationRegister(param);
+            return HttpResult.ok(invitationVo);
+        }catch (Exception e){
+            log.info("邀请用户注册发生异常:param=[{}]", JSONUtil.toJsonStr(param),e);
+            return HttpResult.error(e.getMessage());
+        }
     }
 
     @Operation(summary = "分销员app扫码邀请")

+ 13 - 1
tenant/organization/src/main/java/com/jzg/organization/controller/ReceivableController.java

@@ -25,6 +25,7 @@ import org.springframework.web.multipart.MultipartFile;
 
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -369,11 +370,22 @@ public class ReceivableController {
         }
         Page<InsPlyIncome> data = receivableService.getPlatFormReceivableList(receivableQueryVo);
         List<InsPlyIncomeOrder> receivablePageIds = receivableService.getReceivablePageIds(receivableQueryVo);
-        return HttpResult.ok(new InsPlyIncomeVO(data, receivablePageIds));
+        //满足条件的的总的应收
+        BigDecimal totalReceivablePremium = null;
+        try{
+            List<String> orderNos = receivablePageIds.stream().map(InsPlyIncomeOrder::getOrderNo).distinct().toList();
+            totalReceivablePremium = receivableService.queryAllTotalReceivablePremium(orderNos);
+            totalReceivablePremium = totalReceivablePremium.setScale(2, RoundingMode.HALF_DOWN);
+        }catch (Exception e){
+            log.error("统计总的应收异常",e);
+        }
+        // receivablePageIds.stream().map(InsPlyIncomeOrder::getTotalReceivablePremium).reduce(BigDecimal.ZERO, BigDecimal::add);
+        return HttpResult.ok(new InsPlyIncomeVO(data, receivablePageIds, Objects.toString(totalReceivablePremium,"汇总金额异常")));
     }
 
     @PostMapping("/getPlatFormReceivableTotalAmount")
     @Operation(summary = "获取平台协议总金额")
+    @Deprecated(since = "2026-06-04")
     public HttpResult<BigDecimal> getPlatFormReceivableTotalAmount(@RequestBody ReceivableQueryVo receivableQueryVo){
         if (StrUtil.isBlank(receivableQueryVo.getQueryType())){
             receivableQueryVo.setQueryType("1");

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

@@ -2,6 +2,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.dto.IncomeAndExpenseParam;
@@ -26,12 +27,10 @@ public class UserAccountController {
 
     @Autowired
     private SysUserAccountService userAccountService;
-
     @Autowired
     private SysUserAccountIncomeLogService sysUserAccountIncomeLogService;
-//
-//    @Autowired
-//    private BaseController baseController;
+    @Autowired
+    private BaseController baseController;
 
     /**
      * 用户账户信息查询
@@ -40,8 +39,9 @@ public class UserAccountController {
      */
     @GetMapping(value = { "/accountGet"})
     @Operation(summary = "用户账户信息查询")
-    public HttpResult accountGet(String userId) {
-        return HttpResult.ok(userAccountService.queryByUserId(userId));
+    public HttpResult<SysUserAccount> accountGet(String userId) {
+        String systemCode = baseController.getSystemCode();
+        return HttpResult.ok(userAccountService.queryByUserId(userId,systemCode));
     }
 
     /**

+ 3 - 2
tenant/organization/src/main/java/com/jzg/organization/mapper/SysUserJzgAppMapper.java

@@ -22,10 +22,11 @@ public interface SysUserJzgAppMapper extends BaseMapper<SysUserJzgApp> {
 
     /**
      * 个人信息查询
-     * @param userName
+     * @param userName 用户名
+     * @param systemCode 租户代码
      * @return
      */
-    UserInfoVo userInfoGet(@Param("userName") String userName);
+    UserInfoVo userInfoGet(@Param("userName") String userName, @Param("systemCode") String systemCode);
 
     /**
      * 所在企业列表查询

+ 9 - 0
tenant/organization/src/main/java/com/jzg/organization/service/ReceivableService.java

@@ -405,4 +405,13 @@ public interface ReceivableService extends IService<InsPlyIncome> {
      * @return
      */
     boolean deleteSettlementById(String id);
+
+    /**
+     * 查询所有订单的应收总额
+     *
+     * @param orderNos 订单编号
+     * @author lipf
+     * @date 2026/6/4 10:15
+     */
+    BigDecimal queryAllTotalReceivablePremium(List<String> orderNos);
 }

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

@@ -16,16 +16,18 @@ import java.util.List;
 /**
 * @author dongxin
 * @description 针对表【sys_user_account(用户账户表)】的数据库操作Service
-* @createDate 2025-07-15 15:37:58
+* @date 2025-07-15 15:37:58
 */
 public interface SysUserAccountService extends IService<SysUserAccount> {
 
     /**
      * accountGet
-     * @param userId 用户唯一标识
+     *
+     * @param userId     用户唯一标识
+     * @param systemCode 租户代码
      * @return SysUserAccount
      */
-    SysUserAccount queryByUserId(String userId);
+    SysUserAccount queryByUserId(String userId, String systemCode);
 
     /**
      * 应付统计

+ 2 - 2
tenant/organization/src/main/java/com/jzg/organization/service/SysUserJzgInfoService.java

@@ -22,8 +22,8 @@ public interface SysUserJzgInfoService extends IService<SysUserJzgInfo> {
 
     /**
      * 通过userId查询用户信息
-     * @param userId
-     * @return
+     * @param userId 用户序号
+     * @return SysUserJzgInfo 不同租户下的用户信息
      */
     SysUserJzgInfo getUserByUserId(String userId);
 

+ 20 - 4
tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java

@@ -225,7 +225,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
     public List<InsPlyIncomeOrder> getReceivablePageIds(ReceivableQueryVo receivableQueryVo) {
         log.info("获取私有协议手续费应收列表的id集合。receivableQueryVo=[{}]", JSONUtil.toJsonStr(receivableQueryVo));
         // 设置page的searhCount 为false,则不会查询总数,会直接查询具体的值
-        Page<InsPlyIncome> page1 = new Page<>(1, 10000, false);
+        Page<InsPlyIncome> page1 = new Page<>(1, Integer.MAX_VALUE, false);
         Page<InsPlyIncome> page = baseMapper.getReceivablePage(page1, receivableQueryVo);
         List<InsPlyIncomeOrder> res = page.getRecords().stream()
                 .map(action -> new InsPlyIncomeOrder(action.getId(), action.getOrderNo())).toList();
@@ -257,8 +257,13 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
 //            log.info("应收数据的二次过滤. 逻辑条件必须是and或or");
 //            return HttpResult.error("逻辑条件必须是and或or");
 //        }
+
         List<InsPlyIncome> incomes =  baseMapper.queryIncomeDatasByOrderIds(orderNos,companyId);
         log.info("根据订单号和保司id查询出[{}]条记录。 orderNos =[{}],companyId=[{}]",CollUtil.size(incomes), JSONUtil.toJsonStr(orderNos), companyId);
+        // 需要查询未结算的数据 modify by lipf 2026年6月4日11:06:50
+        incomes = incomes.stream().filter(action->{
+            return "0".equals(action.getSettlementStatus());
+        }).toList();
         List<InsPlyIncome> filterIncomes = new ArrayList<>();
         if(CollUtil.isEmpty(incomeDataVO.getSearchList())){
             filterIncomes = incomes;
@@ -563,9 +568,9 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
                 String typeAttrName = Constant.ywyAttrTypeMap.get(typeAttr);
                 insPlyIncome.setTypeAttr(typeAttr);
                 insPlyIncome.setTypeAttrName(typeAttrName);
-                // 费用信息
-                List<InsFeeOrders> insFeeOrderByOrderNo = insFeeOrdersClient.getInsFeeOrderByOrderNo(insPlyIncome.getOrderNo());
-                insPlyIncome.setInsFeeOrders(CollUtil.getFirst(insFeeOrderByOrderNo));
+                // 费用信息, 这里添加费用,性能会很慢
+//                List<InsFeeOrders> insFeeOrderByOrderNo = insFeeOrdersClient.getInsFeeOrderByOrderNo(insPlyIncome.getOrderNo());
+//                insPlyIncome.setInsFeeOrders(CollUtil.getFirst(insFeeOrderByOrderNo));
 
                 String invoiceId = income2InvoceIdMap.get(insPlyIncome.getId());
                 insPlyIncome.setInvoiceStatusName(StrUtil.isEmpty(invoiceId)? "未开票":"已开票");
@@ -1368,6 +1373,17 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         return insPlyIncomeInvoiceSettlementMapper.deleteById(id) > 0;
     }
 
+    /**
+     * 查询所有订单的应收总额
+     *
+     * @param orderNos 订单编号
+     * @author lipf
+     * @date 2026/6/4 10:15
+     */
+    @Override
+    public BigDecimal queryAllTotalReceivablePremium(List<String> orderNos) {
+        return insFeeOrdersClient.queryAllTotalReceivablePremiumByOrderNo(orderNos);
+    }
 
     @Override
     @Transactional(rollbackFor = Exception.class)

+ 8 - 3
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysAmountAuditingServiceImpl.java

@@ -183,7 +183,8 @@ public class SysAmountAuditingServiceImpl extends ServiceImpl<SysAmountAuditingM
     public HttpResult<String> verifyAmount(AmountAuditEditParam param) {
         String userName = baseController.getUserName();
         String userId = baseController.getUserId();
-        log.info("用户开始进行付款操作。userName=[{}],param=[{}]",userName,JSONUtil.toJsonStr(param));
+        String systemCode = baseController.getSystemCode();
+        log.info("用户开始进行付款操作。userName=[{}],param=[{}]systemCode=[{}]",userName,JSONUtil.toJsonStr(param),systemCode);
         if(StrUtil.isEmpty(param.getAccountId())){
             return HttpResult.error("付款账户不能为空");
         }
@@ -209,9 +210,12 @@ public class SysAmountAuditingServiceImpl extends ServiceImpl<SysAmountAuditingM
                 audit.setPicId(param.getPicId());
                 audit.setVoucherId(param.getVoucherId());
                 audit.setAccountId(param.getAccountId());
+                audit.setPaymentTime(LocalDateTime.now());
+                audit.setAuditingTime(LocalDateTime.now());
+                audit.setAuditingUserId(userId);
                 this.updateById(audit);
                 // 更新用户账户
-                SysUserAccount userAccount = userAccountService.queryByUserId(audit.getUserId());
+                SysUserAccount userAccount = userAccountService.queryByUserId(audit.getUserId(),systemCode);
                 AssertionUtils.isFail(Objects.isNull(userAccount), "用户账户数据异常!");
                 AssertionUtils.isFail(audit.getAmount().compareTo(audit.getBalanceAmount()) > 0, "提现金额大于账户余额!");
 
@@ -295,6 +299,7 @@ public class SysAmountAuditingServiceImpl extends ServiceImpl<SysAmountAuditingM
     public HttpResult<String> applyWithdraw(ApplyWithdrawParam applyWithdrawParam) {
         String userName = baseController.getUserName();
         String userId = baseController.getUserId();
+        String systemCode = baseController.getSystemCode();
         log.info("业务员提交提现申请:userName=[{}],userId=[{}],applyWithdrawParam=[{}]",userId, userName, JSONUtil.toJsonStr(applyWithdrawParam));
         // 当前有处于待审核状态的提现申请的时候,不能再次提交提现申请 add by lipf,  2026年6月3日14:09:07
         List<SysAmountAuditing> auditings = baseMapper.queryPaymentByUserId(userId, 0);
@@ -306,7 +311,7 @@ public class SysAmountAuditingServiceImpl extends ServiceImpl<SysAmountAuditingM
             log.info("业务员[{}]提现提现金额不能为负值[{}]",userName, applyWithdrawParam.getWithdrawAmount());
             throw new SystemException("提现金额错误,请重新输入");
         }
-        SysUserAccount sysUserAccount = userAccountService.queryByUserId(userId);
+        SysUserAccount sysUserAccount = userAccountService.queryByUserId(userId,systemCode);
         AssertionUtils.isFail(Objects.isNull(sysUserAccount),"找不到用户账号");
 
         // sys_amount_auditing 表中的 balance_amount 字段,表示冻结的金额, 避免重复提现

+ 15 - 3
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysUserAccountServiceImpl.java

@@ -58,11 +58,20 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
     @Autowired
     private QuoteClient quoteClient;
 
+    /**
+     * 查询指定租户下,用户在系统中的账户信息
+     *
+     * @param systemCode 租户代码
+     * @param userId 用户序号
+     * @author lipf
+     * @date 2026/6/4 14:04
+     */
     @Override
-    public SysUserAccount queryByUserId(String userId) {
+    public SysUserAccount queryByUserId(String userId, String systemCode) {
         LambdaQueryWrapper<SysUserAccount> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(SysUserAccount::getUserId, userId);
         wrapper.eq(SysUserAccount::getIsDelete, 0);
+        wrapper.eq(SysUserAccount::getSystemCode, systemCode);
         return this.getOne(wrapper);
     }
 
@@ -88,11 +97,13 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
     public SysUserWalletVo userWallet() {
         // 获取个人中心信息
         String mobile = baseController.getUserName();
-        String systemCode = baseController.getAppSystemCode();
+        String systemCode = baseController.getSystemCode();
+        String userId  = baseController.getUserId();
+        log.info("查询用户的钱包信息:mobile=[{}], systemCode=[{}],userId=[{}]", mobile, systemCode, userId);
         SysUser sysUser = sysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getMobile, mobile));
         SysUserJzgInfo sysUserJzgInfo = sysUserJzgInfoService.getOne(new LambdaQueryWrapper<SysUserJzgInfo>().eq(SysUserJzgInfo::getUserId, sysUser.getId()).eq(SysUserJzgInfo::getSystemCode, systemCode));
         SysDept sysDept = sysDeptService.getById(sysUserJzgInfo.getDeptId());
-        SysUserAccount sysUserAccount = sysUserAccountService.queryByUserId(sysUser.getId());
+        SysUserAccount sysUserAccount = sysUserAccountService.queryByUserId(sysUser.getId(),systemCode);
         if (sysUserAccount == null) {
             sysUserAccount = new SysUserAccount();
             sysUserAccount.setUserId(sysUser.getId());
@@ -100,6 +111,7 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
             sysUserAccount.setSumAmountPaid(BigDecimal.ZERO);
             sysUserAccount.setSumAmountUnpaid(BigDecimal.ZERO);
             sysUserAccount.setIntegral(BigDecimal.ZERO);
+            sysUserAccount.setSystemCode(systemCode);
             sysUserAccountService.save(sysUserAccount);
         }
         return buildUserWalletVo(sysDept, sysUser, sysUserJzgInfo, sysUserAccount);

+ 15 - 9
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysUserJzgAppServiceImpl.java

@@ -93,7 +93,9 @@ public class SysUserJzgAppServiceImpl extends ServiceImpl<SysUserJzgAppMapper, S
 
     @Override
     public UserInfoVo userInfoGet(String userName) {
-        UserInfoVo infoVo = sysUserJzgAppMapper.userInfoGet(userName);
+        String systemCode = baseController.getSystemCode();
+        log.info("获取用户信息:systemCode=[{}],userName=[{}]", systemCode, userName);
+        UserInfoVo infoVo = sysUserJzgAppMapper.userInfoGet(userName,systemCode);
         infoVo.setHeadSculpture(MinioUtils.getPresignedObjectUrl("jzg", infoVo.getHeadSculpture()));
         // 获取身份信息
         LambdaQueryWrapper<SysUserJzgInfo> queryWrapper = new LambdaQueryWrapper<>();
@@ -218,7 +220,8 @@ public class SysUserJzgAppServiceImpl extends ServiceImpl<SysUserJzgAppMapper, S
     @Override
     @Transactional(rollbackFor = Exception.class)
     public InvitationVo invitationRegister(InvitationAddParam param) {
-        log.info("邀请码注册:param=[{}]", JSONUtil.toJsonStr(param));
+        String systemCode = baseController.getSystemCode();
+        log.info("邀请码注册:systemCode=[{}],param=[{}]", systemCode, JSONUtil.toJsonStr(param));
         try {
             InvitationVo invitationVo = new InvitationVo();
             // 获取邀请人信息
@@ -231,10 +234,10 @@ public class SysUserJzgAppServiceImpl extends ServiceImpl<SysUserJzgAppMapper, S
                 throw new SystemException("邀请人数据异常!");
             }
             SysDept dept = sysDeptMapper.selectById(yqirInfo.getDeptId());
-            AssertionUtils.isFail(Objects.isNull(yqrAppUser), "邀请人不存在");
+            AssertionUtils.isFail(Objects.isNull(dept), "邀请人所在部门不存在");
             invitationVo.setDeptName(dept.getName());
             invitationVo.setMobile(param.getMobile());
-            invitationVo.setSystemCode(yqrAppUser.getSystemCode());
+            invitationVo.setSystemCode(systemCode);
             LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
             queryWrapper.eq(SysUser::getMobile, param.getMobile())
                     .eq(SysUser::getIsDelete, 0);
@@ -251,7 +254,7 @@ public class SysUserJzgAppServiceImpl extends ServiceImpl<SysUserJzgAppMapper, S
                 // 创建app用户
                 SysUserJzgApp sysUserJzgApp = new SysUserJzgApp(sysUser);
                 sysUserJzgApp.setDeptId(yqrAppUser.getDeptId());
-                sysUserJzgApp.setSystemCode(yqrAppUser.getSystemCode());
+                sysUserJzgApp.setSystemCode(systemCode);
                 sysUserJzgApp.setReferrerId(yqrAppUser.getId());
                 sysUserJzgAppMapper.insert(sysUserJzgApp);
 
@@ -267,12 +270,12 @@ public class SysUserJzgAppServiceImpl extends ServiceImpl<SysUserJzgAppMapper, S
                 wrapper.eq(SysUserJzgApp::getUserId, user.getId())
                         .eq(SysUserJzgApp::getIsDelete, 0)
                         .eq(SysUserJzgApp::getIsEnable, 0)
-                        .eq(SysUserJzgApp::getSystemCode, yqrAppUser.getSystemCode());
+                        .eq(SysUserJzgApp::getSystemCode, systemCode);
                 SysUserJzgApp appUser = sysUserJzgAppMapper.selectOne(wrapper);
                 if (Objects.isNull(appUser)) {
                     SysUserJzgApp sysUserJzgApp = new SysUserJzgApp(user);
                     sysUserJzgApp.setDeptId(yqrAppUser.getDeptId());
-                    sysUserJzgApp.setSystemCode(yqrAppUser.getSystemCode());
+                    sysUserJzgApp.setSystemCode(systemCode);
                     sysUserJzgApp.setReferrerId(yqrAppUser.getId());
                     sysUserJzgAppMapper.insert(sysUserJzgApp);
                     // 增加推荐人关系
@@ -280,8 +283,11 @@ public class SysUserJzgAppServiceImpl extends ServiceImpl<SysUserJzgAppMapper, S
                     SysUserJzgInfo userInfo = new SysUserJzgInfo(yqirInfo, user);
                     sysUserJzgInfoService.save(userInfo);
                     userId = userInfo.getId();
+                    log.info("被邀请人在sys_user_jzg_app表中的序号是[{}]",userId);
                 } else {
-                    if (!appUser.getReferrerId().equals(yqrAppUser.getId())) {
+                    if (appUser.getReferrerId() !=null && !Objects.equals(appUser.getReferrerId(),yqrAppUser.getId())) {
+                        log.info("用户已被邀请注册.appUser.getReferrerId()=[{}],yqrAppUser.getId()=[{}].appUser=[{}],yqrAppUser=[{}]",
+                                appUser.getReferrerId(), yqrAppUser.getId(),JSONUtil.toJsonStr(appUser), JSONUtil.toJsonStr(yqrAppUser));
                         throw new SystemException("该用户已被邀请注册");
                     }
                     invitationVo.setIsJoined(1);
@@ -292,7 +298,7 @@ public class SysUserJzgAppServiceImpl extends ServiceImpl<SysUserJzgAppMapper, S
             return invitationVo;
         } catch (Exception e) {
             log.error("invitationRegister",e);
-            throw new SystemException("程序异常");
+            throw new SystemException(Objects.toString(e.getMessage(),"程序异常"));
         }
     }
 

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysUserServiceImpl.java

@@ -212,7 +212,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
                 SysUserJzgInfo userInfoJzgInfo = sysUserJzgInfoService.getUserByUserId(loginUserId);
                 jzgInfoId = userInfoJzgInfo.getId();
             }
-            log.info("jzgInfoId=[{}]", jzgInfoId);
+            log.info("查看成员下的业务员信息:成员的序号:jzgInfoId=[{}]", jzgInfoId);
             userInfoList = sysUserJzgInfoMapper.queryYwy(page, sysUserInfoListVo, systemCode, jzgInfoId
             );
         }else if("1".equals(sysUserInfoListVo.getIsMember())){

+ 0 - 1
tenant/organization/src/main/resources/application.yml

@@ -87,7 +87,6 @@ tenant:
     - ins_ply_income_invoice
     - ins_ply_income_invoice_settlement
     - esm_user_referrer
-    - sys_user_account
     - ins_ply_income_invoice_settlement_file
     - wechat_customer_service
     - wechat_customer_service_duty

+ 3 - 1
tenant/organization/src/main/resources/mapper/ReceivableMapper.xml

@@ -259,7 +259,9 @@
         LEFT JOIN ins_orders_risk ior2 ON ipi.order_no = ior2.order_no and ior2.risk_code = '0510'
         LEFT JOIN ins_orders_policy iop ON ipi.order_no = iop.order_no
         LEFT JOIN esm_ins_company eic on ipi.company_id = eic.id
-        WHERE 1=1 and ipi.settlement_status = '0' and ipi.is_delete  = 0
+        WHERE 1=1
+        -- and ipi.settlement_status = '0'  -- 已经结算的车辆,在应收订单里面,还需要能查询到
+        and ipi.is_delete  = 0
     </sql>
 
     <!--根据保司id和订单号进行过滤 2026年5月12日15:06:40  lipf  -->

+ 3 - 0
tenant/organization/src/main/resources/mapper/SysUserJzgAppMapper.xml

@@ -29,6 +29,9 @@
         LEFT JOIN sys_user sur on sur.id = suja.user_id
         <where>
             sujz.is_delete = 0 and sujz.is_enable = 0
+            <if test="systemCode != null and systemCode != ''">
+                and sujz.system_code = #{systemCode}
+            </if>
             <if test="userName != null and userName != ''">
                 and su.mobile = #{userName}
             </if>

部分文件因为文件数量过多而无法显示