Переглянути джерело

Merge remote-tracking branch 'origin/master' into dev_jzg_lipf_v20260622

lipf 1 місяць тому
батько
коміт
cbb2fd480c
32 змінених файлів з 1199 додано та 360 видалено
  1. 6 4
      commons/src/main/java/com/jzg/commons/aop/aspect/OperatorTrajectoryAspect.java
  2. 3 0
      commons/src/main/java/com/jzg/commons/entity/dto/PtlAgreementCostAdd.java
  3. 2 2
      commons/src/main/java/com/jzg/commons/entity/dto/SysUserJzgInfoBankCardDto.java
  4. 11 0
      commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/QuoteResultsVo.java
  5. 4 4
      commons/src/main/java/com/jzg/commons/entity/scheme/vo/PtlSchemeSaveVo.java
  6. 15 0
      commons/src/main/java/com/jzg/commons/entity/vo/ChangeLogDetail.java
  7. 0 1
      commons/src/main/java/com/jzg/commons/util/BuildDescUtils.java
  8. 6 0
      platform/src/main/java/com/jzg/controller/AgreementAttributionController.java
  9. 8 0
      platform/src/main/java/com/jzg/service/PtlAgreementAttributionService.java
  10. 12 0
      platform/src/main/java/com/jzg/service/impl/PtlAgreementAttributionImpl.java
  11. 13 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java
  12. 757 203
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java
  13. 43 0
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/FlowIdUtil.java
  14. 3 2
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/build/TkCrawlerQuoteResultsBuild.java
  15. 6 4
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/TKHttpAPIService.java
  16. 8 8
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/TKSimpleService.java
  17. 2 2
      tenant/insurance/quotation-zhongan/src/main/java/com/jzg/quotation/zhongan/crawler/component/ZhongAnCrawlerRequestComponent.java
  18. 1 3
      tenant/insurance/quotation-zhongan/src/main/java/com/jzg/quotation/zhongan/crawler/entity/request/ZhongAnCrawlerApplyAccommodationRequest.java
  19. 31 7
      tenant/insurance/quotation-zhongan/src/main/java/com/jzg/quotation/zhongan/crawler/service/Impl/ZhongAnCrawlerRequestImpl.java
  20. 5 0
      tenant/organization/src/main/java/com/jzg/organization/client/OrgClient.java
  21. 4 0
      tenant/organization/src/main/java/com/jzg/organization/client/PlatformClient.java
  22. 2 2
      tenant/organization/src/main/java/com/jzg/organization/controller/PtlAgreementCostController.java
  23. 6 0
      tenant/organization/src/main/java/com/jzg/organization/controller/PtlAgreementDispatchController.java
  24. 3 0
      tenant/organization/src/main/java/com/jzg/organization/mapper/PtlAgreementDispatchAfterActionMapper.java
  25. 1 1
      tenant/organization/src/main/java/com/jzg/organization/service/PtlAgreementCostService.java
  26. 6 0
      tenant/organization/src/main/java/com/jzg/organization/service/PtlAgreementDispatchService.java
  27. 63 53
      tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementCostServiceImpl.java
  28. 66 13
      tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementDispatchServiceImpl.java
  29. 1 1
      tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementUndwrtRulesServiceImpl.java
  30. 83 44
      tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlSchemeServiceImpl.java
  31. 16 5
      tenant/organization/src/main/java/com/jzg/organization/service/impl/SysUserJzgInfoBankCardServiceImpl.java
  32. 12 0
      tenant/organization/src/main/resources/mapper/PtlAgreementDispatchAfterActionMapper.xml

+ 6 - 4
commons/src/main/java/com/jzg/commons/aop/aspect/OperatorTrajectoryAspect.java

@@ -219,18 +219,20 @@ public class OperatorTrajectoryAspect {
             return;
             return;
         }
         }
         com.jzg.commons.entity.po.OperatorTrajectory trajectory = new com.jzg.commons.entity.po.OperatorTrajectory();
         com.jzg.commons.entity.po.OperatorTrajectory trajectory = new com.jzg.commons.entity.po.OperatorTrajectory();
+        String userTokenString = baseController.getUserTokenString();
+        JSONObject userInfo = JSONObject.parseObject(userTokenString);
+        String systemCode = userInfo.getString("system");
         String trajectoryId = IdGenerate.nextId();
         String trajectoryId = IdGenerate.nextId();
         trajectory.setId(trajectoryId);
         trajectory.setId(trajectoryId);
         trajectory.setOperatorType(operatorTrajectory.type());
         trajectory.setOperatorType(operatorTrajectory.type());
-        trajectory.setSystemCode(baseController.getUserSystemCode());
+        trajectory.setSystemCode(systemCode);
         String className = point.getTarget().getClass().getName();
         String className = point.getTarget().getClass().getName();
         String methodName = point.getSignature().getName();
         String methodName = point.getSignature().getName();
         trajectory.setServiceTag(className + "." + methodName + "()");
         trajectory.setServiceTag(className + "." + methodName + "()");
         trajectory.setModuleName(operatorTrajectory.moduleName());
         trajectory.setModuleName(operatorTrajectory.moduleName());
         trajectory.setCreateTime(LocalDateTime.now());
         trajectory.setCreateTime(LocalDateTime.now());
-        String userName = baseController.getUserName();
-        trajectory.setCreateBy(userName);
-        trajectory.setCreateByName(userName);
+        trajectory.setCreateBy(userInfo.getString("username"));
+        trajectory.setCreateByName(userInfo.getString("name"));
         trajectory.setEntityName(Arrays.stream(operatorTrajectory.entityClass())
         trajectory.setEntityName(Arrays.stream(operatorTrajectory.entityClass())
                 .map(Class::getName).collect(Collectors.joining(",")));
                 .map(Class::getName).collect(Collectors.joining(",")));
         if(!Objects.isNull(obj)) {
         if(!Objects.isNull(obj)) {

+ 3 - 0
commons/src/main/java/com/jzg/commons/entity/dto/PtlAgreementCostAdd.java

@@ -2,6 +2,7 @@ package com.jzg.commons.entity.dto;
 
 
 
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jzg.commons.entity.po.PtlAgreementUndwrtRulesDictLabal;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.media.Schema;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
 import jakarta.validation.constraints.NotNull;
@@ -86,6 +87,8 @@ public class PtlAgreementCostAdd {
         @Schema(description = "操作符")
         @Schema(description = "操作符")
         private String operator;
         private String operator;
 
 
+        @Schema(description = "协议承保规则字典")
+        private List<PtlAgreementUndwrtRulesDictLabal> dictLabal;
 
 
     }
     }
 
 

+ 2 - 2
commons/src/main/java/com/jzg/commons/entity/dto/SysUserJzgInfoBankCardDto.java

@@ -1,6 +1,6 @@
 package com.jzg.commons.entity.dto;
 package com.jzg.commons.entity.dto;
 
 
-import com.jzg.commons.entity.po.SysUserJzgInfoBankCardRecord;
+import com.jzg.commons.entity.vo.ChangeLogDetail;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.Data;
 
 
@@ -91,5 +91,5 @@ public class SysUserJzgInfoBankCardDto implements Serializable {
     private String leaderName;
     private String leaderName;
 
 
     @Schema(description = "审核记录列表")
     @Schema(description = "审核记录列表")
-    private List<SysUserJzgInfoBankCardRecord> sysUserJzgInfoBankCardRecordList;
+    private List<ChangeLogDetail> sysUserJzgInfoBankCardRecordList;
 }
 }

+ 11 - 0
commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/QuoteResultsVo.java

@@ -8,6 +8,7 @@ import com.jzg.commons.entity.quote.vo.ExpenseFactor;
 import com.jzg.commons.entity.quote.vo.KindInfoVo;
 import com.jzg.commons.entity.quote.vo.KindInfoVo;
 import com.jzg.commons.entity.quote.vo.RiskInfoVo;
 import com.jzg.commons.entity.quote.vo.RiskInfoVo;
 import com.jzg.commons.entity.quote.vo.TaxInfoVo;
 import com.jzg.commons.entity.quote.vo.TaxInfoVo;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.AllArgsConstructor;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
@@ -150,6 +151,16 @@ public class QuoteResultsVo implements Serializable {
      */
      */
     private String quoteTime;
     private String quoteTime;
 
 
+    /**
+     * 权益的
+     */
+
+    @Schema(description = "车主权益1:开启,0:关闭")
+    private String ownerRights;
+
+    @Schema(description = "PC端还是APP端可用1:PC,2:APP,3:PC+APP")
+    private String clientType;
+
     /**
     /**
      * 评分VO
      * 评分VO
      */
      */

+ 4 - 4
commons/src/main/java/com/jzg/commons/entity/scheme/vo/PtlSchemeSaveVo.java

@@ -78,7 +78,7 @@ public class PtlSchemeSaveVo {
     }
     }
 
 
     public PtlSchemeSaveVo(PtlScheme ptlScheme,PtlSchemeInfo ptlSchemeInfo,
     public PtlSchemeSaveVo(PtlScheme ptlScheme,PtlSchemeInfo ptlSchemeInfo,
-                           List<PtlSchemeInsuranceVo> insurances,List<PtlSchemeInsuranceDrivingIntention> drivingIntentionList,
+                           List<PtlSchemeInsuranceVo> insurances, List<PtlSchemeInsuranceDrivingIntention> drivingList,
                            List<PtlSchemeRulesAttrLink> rulesAttrLinks,List<PtlAgreementUndwrtRulesAttr> agreementRulesVo){
                            List<PtlSchemeRulesAttrLink> rulesAttrLinks,List<PtlAgreementUndwrtRulesAttr> agreementRulesVo){
         if(Objects.isNull(ptlScheme))
         if(Objects.isNull(ptlScheme))
         {
         {
@@ -99,8 +99,8 @@ public class PtlSchemeSaveVo {
             scheme.schemeInsuranceList.add(insurance);
             scheme.schemeInsuranceList.add(insurance);
         });
         });
         //处理驾意险
         //处理驾意险
-        drivingIntentionList.stream().filter(drivingIntention -> drivingIntention.getSchemeInfoId().equals(ptlSchemeInfo.getId())).forEach(drivingIntention -> {
-            scheme.drivingIntentionList.add(drivingIntention);
+        drivingList.stream().filter(drivingIntention -> drivingIntention.getSchemeInfoId().equals(ptlSchemeInfo.getId())).forEach(drivingIntention -> {
+            scheme.drivingList.add(drivingIntention);
         });
         });
         //处理规则
         //处理规则
         rulesAttrLinks.stream().filter(link -> link.getSchemeId().equals(this.id)).forEach(link->{
         rulesAttrLinks.stream().filter(link -> link.getSchemeId().equals(this.id)).forEach(link->{
@@ -276,7 +276,7 @@ public class PtlSchemeSaveVo {
     public List<PtlSchemeInsuranceDrivingIntention> getPtlSchemeInsuranceDrivingIntentionList(){
     public List<PtlSchemeInsuranceDrivingIntention> getPtlSchemeInsuranceDrivingIntentionList(){
         List<PtlSchemeInsuranceDrivingIntention> ptlSchemeInsuranceDrivingIntentionList = new ArrayList<>();
         List<PtlSchemeInsuranceDrivingIntention> ptlSchemeInsuranceDrivingIntentionList = new ArrayList<>();
         for (Scheme scheme : schemeList) {
         for (Scheme scheme : schemeList) {
-            scheme.getDrivingIntentionList().forEach(drivingIntention -> {
+            scheme.getDrivingList().forEach(drivingIntention -> {
                 PtlSchemeInsuranceDrivingIntention ptlSchemeInsuranceDrivingIntention = new PtlSchemeInsuranceDrivingIntention();
                 PtlSchemeInsuranceDrivingIntention ptlSchemeInsuranceDrivingIntention = new PtlSchemeInsuranceDrivingIntention();
                 ptlSchemeInsuranceDrivingIntention.setId(IdGenerate.nextId());
                 ptlSchemeInsuranceDrivingIntention.setId(IdGenerate.nextId());
                 ptlSchemeInsuranceDrivingIntention.setSchemeInfoId(scheme.getId());
                 ptlSchemeInsuranceDrivingIntention.setSchemeInfoId(scheme.getId());

+ 15 - 0
commons/src/main/java/com/jzg/commons/entity/vo/ChangeLogDetail.java

@@ -26,6 +26,12 @@ public class ChangeLogDetail implements Serializable {
     @Schema(name = "审核说明")
     @Schema(name = "审核说明")
     private String content;
     private String content;
 
 
+    @Schema(name = "银行卡ID")
+    private String bankCardId;
+
+    @Schema(name = "id")
+    private String id;
+
     public ChangeLogDetail(){
     public ChangeLogDetail(){
 
 
     }
     }
@@ -37,4 +43,13 @@ public class ChangeLogDetail implements Serializable {
         this.content = content;
         this.content = content;
     }
     }
 
 
+    public ChangeLogDetail(String title, LocalDateTime time, Boolean show, String content, String bankCardId, String id) {
+        this.title = title;
+        this.time = time;
+        this.show = show;
+        this.content = content;
+        this.bankCardId = bankCardId;
+        this.id = id;
+    }
+
 }
 }

+ 0 - 1
commons/src/main/java/com/jzg/commons/util/BuildDescUtils.java

@@ -24,7 +24,6 @@ public class BuildDescUtils {
             if (ptlAgreementUndwrtRulesAttr == null) {
             if (ptlAgreementUndwrtRulesAttr == null) {
                 continue;
                 continue;
             }
             }
-            ptlAgreementUndwrtRulesAttr.setDictLabal(link.getDictLabal());
 
 
             String attrType = ptlAgreementUndwrtRulesAttr.getAttrType();
             String attrType = ptlAgreementUndwrtRulesAttr.getAttrType();
 
 

+ 6 - 0
platform/src/main/java/com/jzg/controller/AgreementAttributionController.java

@@ -56,6 +56,12 @@ public class AgreementAttributionController extends BaseController {
         return agreementAttributionService.getAgreementAttribution(id);
         return agreementAttributionService.getAgreementAttribution(id);
     }
     }
 
 
+    @Operation(summary = "批量查询保险公司账号接口", description = "批量查询保险公司账号接口")
+    @PostMapping(value = "/getAgreementAttributionByIds")
+    public HttpResult<List<PtlAgreementAttribution>> getAgreementAttributionByIds(@RequestBody List<String> ids) {
+        return HttpResult.ok(agreementAttributionService.getAgreementAttributionByIds(ids));
+    }
+
     @Operation(summary = "查询保险公司账号列表接口", description = "查询保险公司账号列表接口")
     @Operation(summary = "查询保险公司账号列表接口", description = "查询保险公司账号列表接口")
     @PostMapping(value = "/getAgreementAttributionList")
     @PostMapping(value = "/getAgreementAttributionList")
     public HttpResult getActivityList(@RequestBody PtlAgreementAttributionQueryVo ptlAgreementAttributionQueryVo) {
     public HttpResult getActivityList(@RequestBody PtlAgreementAttributionQueryVo ptlAgreementAttributionQueryVo) {

+ 8 - 0
platform/src/main/java/com/jzg/service/PtlAgreementAttributionService.java

@@ -16,6 +16,14 @@ public interface PtlAgreementAttributionService extends IService<PtlAgreementAtt
 
 
     HttpResult<PtlAgreementAttribution> getAgreementAttribution(String id);
     HttpResult<PtlAgreementAttribution> getAgreementAttribution(String id);
 
 
+    /**
+     * 批量查询保险公司账号
+     *
+     * @param ids 账号id集合
+     * @return 账号列表
+     */
+    List<PtlAgreementAttribution> getAgreementAttributionByIds(List<String> ids);
+
     /**
     /**
      * 查询保险公司账号列表接口
      * 查询保险公司账号列表接口
      *
      *

+ 12 - 0
platform/src/main/java/com/jzg/service/impl/PtlAgreementAttributionImpl.java

@@ -1,5 +1,6 @@
 package com.jzg.service.impl;
 package com.jzg.service.impl;
 
 
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -23,8 +24,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
+import java.util.Collections;
 import java.util.List;
 import java.util.List;
 import java.util.Objects;
 import java.util.Objects;
+import java.util.stream.Collectors;
 
 
 /**
 /**
  * @author quchen
  * @author quchen
@@ -77,6 +80,15 @@ public class PtlAgreementAttributionImpl extends ServiceImpl<PtlAgreementAttribu
         return HttpResult.ok("",ptlAgreementAttribution);
         return HttpResult.ok("",ptlAgreementAttribution);
     }
     }
 
 
+    @Override
+    public List<PtlAgreementAttribution> getAgreementAttributionByIds(List<String> ids) {
+        if (ids == null || ids.isEmpty()) {
+            return Collections.emptyList();
+        }
+        List<String> distinctIds = ids.stream().filter(StrUtil::isNotBlank).distinct().collect(Collectors.toList());
+        return listByIds(distinctIds);
+    }
+
 
 
     @Override
     @Override
     public Page<PtlAgreementAttribution> getAgreementAttributionList(Page page, PtlAgreementAttributionQueryVo ptlAgreementAttributionQueryVo) {
     public Page<PtlAgreementAttribution> getAgreementAttributionList(Page page, PtlAgreementAttributionQueryVo ptlAgreementAttributionQueryVo) {

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

@@ -38,6 +38,7 @@ import com.jzg.commons.entity.quote.vo.underwriting.SpecialAppointmentsVo;
 import com.jzg.commons.entity.rights.dto.InsOrderRightsDto;
 import com.jzg.commons.entity.rights.dto.InsOrderRightsDto;
 import com.jzg.commons.entity.rights.dto.InsOrderRightsInfoDto;
 import com.jzg.commons.entity.rights.dto.InsOrderRightsInfoDto;
 import com.jzg.commons.entity.rights.dto.InsOrderRightsPackageDto;
 import com.jzg.commons.entity.rights.dto.InsOrderRightsPackageDto;
+import com.jzg.commons.entity.system.vo.SysSystemBusPermsVo;
 import com.jzg.commons.entity.vo.CompanyClauseVo;
 import com.jzg.commons.entity.vo.CompanyClauseVo;
 import com.jzg.commons.entity.vo.InsCompanyClauseVo;
 import com.jzg.commons.entity.vo.InsCompanyClauseVo;
 import com.jzg.commons.entity.vo.LotteryCountVO;
 import com.jzg.commons.entity.vo.LotteryCountVO;
@@ -58,6 +59,7 @@ import com.jzg.quotation.summary.aop.QuoteVerification;
 import com.jzg.quotation.summary.aop.aspect.OrderOperationLog;
 import com.jzg.quotation.summary.aop.aspect.OrderOperationLog;
 import com.jzg.quotation.summary.async.AsyncGetPayLink;
 import com.jzg.quotation.summary.async.AsyncGetPayLink;
 import com.jzg.quotation.summary.classifier.QuoteInfoParameterFilling;
 import com.jzg.quotation.summary.classifier.QuoteInfoParameterFilling;
+import com.jzg.quotation.summary.client.EsmInsCompanyClient;
 import com.jzg.quotation.summary.client.LocalLivingClient;
 import com.jzg.quotation.summary.client.LocalLivingClient;
 import com.jzg.quotation.summary.client.UnifiedAccountClient;
 import com.jzg.quotation.summary.client.UnifiedAccountClient;
 import com.jzg.quotation.summary.constants.QuoteNumberConstant;
 import com.jzg.quotation.summary.constants.QuoteNumberConstant;
@@ -186,6 +188,9 @@ public class UnifyOrderManager {
     @Autowired
     @Autowired
     private UnifiedAccountClient unifiedAccountClient;
     private UnifiedAccountClient unifiedAccountClient;
 
 
+    @Autowired
+    private EsmInsCompanyClient esmInsCompanyClient;
+
     @Autowired
     @Autowired
     private ObjectMapper objectMapper;
     private ObjectMapper objectMapper;
 
 
@@ -355,6 +360,13 @@ public class UnifyOrderManager {
                 });
                 });
             }
             }
 
 
+            // 权益权限
+            HttpResult<SysSystemBusPermsVo> sysSystemBusPermsVoHttpResult = esmInsCompanyClient.getBusPerms(baseController.getSystemCode());
+            if (sysSystemBusPermsVoHttpResult.getCode() == 200) {
+                quoteResultsVo.setOwnerRights(String.valueOf(sysSystemBusPermsVoHttpResult.getData().getOwnerRights()));
+                quoteResultsVo.setClientType(String.valueOf(sysSystemBusPermsVoHttpResult.getData().getClientType()));
+            }
+
             log.info("报价返回:{}", JSON.toJSONString(quoteResultsVo));
             log.info("报价返回:{}", JSON.toJSONString(quoteResultsVo));
 
 
         } catch (Exception e) {
         } catch (Exception e) {
@@ -874,7 +886,7 @@ public class UnifyOrderManager {
         try {
         try {
             quoteService.uploadImage(insuranceUploadImageVo);
             quoteService.uploadImage(insuranceUploadImageVo);
         }catch (Exception e){
         }catch (Exception e){
-            throw new SystemException("影像上传异常,请检查影像");
+            throw new SystemException("影像上传异常,请检查影像是否上传或影像是否清晰");
         }
         }
         return HttpResult.ok();
         return HttpResult.ok();
     }
     }

Різницю між файлами не показано, бо вона завелика
+ 757 - 203
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java


+ 43 - 0
tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/FlowIdUtil.java

@@ -0,0 +1,43 @@
+package com.jzg.quotation.taikang.crawler;
+
+import java.util.concurrent.ThreadLocalRandom;
+
+/**
+ * 生成 carInsurFlowId 的工具类
+ * <p>
+ * 对应前端 Python 代码:
+ * <pre>
+ * headers['carInsurFlowId'] = 'carInsur' + str(int(time.time()*1000)) + str(random.randint(100000, 999999))
+ * </pre>
+ * 即:固定前缀 "carInsur" + 当前时间戳(毫秒) + 6 位随机数(100000~999999)
+ */
+public class FlowIdUtil {
+
+    /** 固定前缀,与前端保持一致 */
+    private static final String PREFIX = "carInsur";
+
+    /** 随机数最小值(含),对应 Python random.randint(100000, 999999) 的下界 */
+    private static final int RANDOM_MIN = 100000;
+
+    /** 随机数上界(不含),配合 nextInt(origin, bound) 实现含 100000、含 999999 */
+    private static final int RANDOM_MAX = 1000000;
+
+    /**
+     * 生成一个 carInsurFlowId
+     * <p>
+     * 格式:carInsur + 13 位毫秒时间戳 + 6 位随机数
+     * 示例:carInsur1780302178294459227
+     *
+     * @return 生成的 carInsurFlowId 字符串
+     */
+    public static String generateCarInsurFlowId() {
+        // 1. 当前时间戳(毫秒),等价于 Python 的 int(time.time() * 1000)
+        long timestamp = System.currentTimeMillis();
+        // 2. 生成 100000~999999 的随机数,等价于 Python 的 random.randint(100000, 999999)
+        //    ThreadLocalRandom.current().nextInt(origin, bound) 返回 [origin, bound) 范围内的随机数
+        //    所以 [100000, 1000000) 即 100000~999999
+        int randomNum = ThreadLocalRandom.current().nextInt(RANDOM_MIN, RANDOM_MAX);
+        // 3. 拼接:carInsur + 时间戳 + 随机数
+        return PREFIX + timestamp + randomNum;
+    }
+}

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

@@ -65,10 +65,11 @@ public class TkCrawlerQuoteResultsBuild {
             errorMessage = ((List<?>) other.getMessageBZ()).get(0) + "\n" + ((List<?>) other.getMessageBZ()).get(1);
             errorMessage = ((List<?>) other.getMessageBZ()).get(0) + "\n" + ((List<?>) other.getMessageBZ()).get(1);
         } else
         } else
 
 
-        // 初始化有提示跳过,应该属于警告信息(目前只遇到选择的三者险是300万,初始化依然提示:规则管控提示$商业三者险保额请选择300万以上),后续看是否有其他情况影响报价,如果出现其他情况,对这个提示单独处理放行
+        // 报价阶段:与Python代码一致,只在quoteFlag=='quote'(保司要求继续报价/规则管控)或premium为空(未返回保费)时才判失败
+        // 其他情况下的notice(如"规则管控提示$车损不符合政策")属于警告信息,不影响报价成功
         if (!initFlag && preciseInitResult.getPremium() == null) {
         if (!initFlag && preciseInitResult.getPremium() == null) {
             errorMessage = other.getNotice();
             errorMessage = other.getNotice();
-        } else if (!initFlag && other.getNotice() != null && !other.getNotice().isEmpty()) {
+        } else if (!initFlag && preciseInitResult.getFlag() != null && "quote".equals(preciseInitResult.getFlag().getQuoteFlag())) {
             errorMessage = other.getNotice();
             errorMessage = other.getNotice();
         }
         }
 
 

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

@@ -6,6 +6,7 @@ import com.jzg.commons.entity.quote.vo.QuoteVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.taikang.crawler.CodeUtil;
 import com.jzg.quotation.taikang.crawler.CodeUtil;
+import com.jzg.quotation.taikang.crawler.FlowIdUtil;
 import com.jzg.quotation.taikang.crawler.JsonUtil;
 import com.jzg.quotation.taikang.crawler.JsonUtil;
 import com.jzg.quotation.taikang.crawler.client.*;
 import com.jzg.quotation.taikang.crawler.client.*;
 import com.jzg.quotation.taikang.crawler.model.TKLoginSession;
 import com.jzg.quotation.taikang.crawler.model.TKLoginSession;
@@ -300,7 +301,7 @@ public class TKHttpAPIService {
 
 
         HttpHeaders httpHeaders = new HttpHeaders();
         HttpHeaders httpHeaders = new HttpHeaders();
         httpHeaders.add("tkcarrequesttoken", token);
         httpHeaders.add("tkcarrequesttoken", token);
-        httpHeaders.add("carInsurFlowId", "carInsur1778568776607661015");
+        httpHeaders.add("carInsurFlowId", FlowIdUtil.generateCarInsurFlowId());
         httpHeaders.add("carInsurOrderId", orderId);
         httpHeaders.add("carInsurOrderId", orderId);
 
 
         StringResponse response = client.request(HttpURL.agentQuery, param, httpHeaders, StringResponse.class);
         StringResponse response = client.request(HttpURL.agentQuery, param, httpHeaders, StringResponse.class);
@@ -548,7 +549,7 @@ public class TKHttpAPIService {
     public SaveBasicInfoResult saveBasicInfo(String token, SaveBasicInfoParam param) {
     public SaveBasicInfoResult saveBasicInfo(String token, SaveBasicInfoParam param) {
         HttpHeaders httpHeaders = new HttpHeaders();
         HttpHeaders httpHeaders = new HttpHeaders();
         httpHeaders.add("tkCarRequestToken", token);
         httpHeaders.add("tkCarRequestToken", token);
-        httpHeaders.add("carinsurflowid", "carInsur1780310645869550725");
+        httpHeaders.add("carinsurflowid", FlowIdUtil.generateCarInsurFlowId());
         httpHeaders.add("carinsurorderid", param.getOrderID());
         httpHeaders.add("carinsurorderid", param.getOrderID());
 
 
         SaveBasicInfoResult.Response response = client.request(HttpURL.saveBasicInfo, param, httpHeaders, SaveBasicInfoResult.Response.class);
         SaveBasicInfoResult.Response response = client.request(HttpURL.saveBasicInfo, param, httpHeaders, SaveBasicInfoResult.Response.class);
@@ -590,7 +591,7 @@ public class TKHttpAPIService {
         param.setTplatLoginKey(tplatLoginKey);
         param.setTplatLoginKey(tplatLoginKey);
         HttpHeaders httpHeaders = new HttpHeaders();
         HttpHeaders httpHeaders = new HttpHeaders();
         httpHeaders.add("tkCarRequestToken", token);
         httpHeaders.add("tkCarRequestToken", token);
-        httpHeaders.add("carinsurflowid", "carInsur1780302178294459227");
+        httpHeaders.add("carinsurflowid", FlowIdUtil.generateCarInsurFlowId());
         httpHeaders.add("carinsurorderid", orderId);
         httpHeaders.add("carinsurorderid", orderId);
         StringResponse response = client.request(HttpURL.preciseInit, param, httpHeaders, StringResponse.class);
         StringResponse response = client.request(HttpURL.preciseInit, param, httpHeaders, StringResponse.class);
         checkResponseUnknownField(response);
         checkResponseUnknownField(response);
@@ -612,6 +613,7 @@ public class TKHttpAPIService {
         param.setChgOwnerInfo(TKChgOwnerInfo);
         param.setChgOwnerInfo(TKChgOwnerInfo);
 
 
         HttpHeaders httpHeaders = new HttpHeaders();
         HttpHeaders httpHeaders = new HttpHeaders();
+        httpHeaders.add("carinsurflowid", FlowIdUtil.generateCarInsurFlowId());
         httpHeaders.add("tkCarRequestToken", token);
         httpHeaders.add("tkCarRequestToken", token);
 
 
         PreciseInitResult.Response response = client.request(HttpURL.preciseInit, param, httpHeaders, PreciseInitResult.Response.class);
         PreciseInitResult.Response response = client.request(HttpURL.preciseInit, param, httpHeaders, PreciseInitResult.Response.class);
@@ -1193,7 +1195,7 @@ public class TKHttpAPIService {
 
 
         HttpHeaders httpHeaders = new HttpHeaders();
         HttpHeaders httpHeaders = new HttpHeaders();
         httpHeaders.add("tkCarRequestToken", token);
         httpHeaders.add("tkCarRequestToken", token);
-        httpHeaders.add("carInsurFlowId", "carInsur1778568776607661015");
+        httpHeaders.add("carInsurFlowId", FlowIdUtil.generateCarInsurFlowId());
         httpHeaders.add("carInsurOrderId", orderId);
         httpHeaders.add("carInsurOrderId", orderId);
         Object response = client.request(HttpURL.carCheckUploadFileSubmit, param, httpHeaders, Object.class);
         Object response = client.request(HttpURL.carCheckUploadFileSubmit, param, httpHeaders, Object.class);
         log.info("上传影像提交完成,响应: {}", JSONObject.toJSONString(response));
         log.info("上传影像提交完成,响应: {}", JSONObject.toJSONString(response));

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

@@ -960,10 +960,6 @@ public class TKSimpleService {
                 TKFlag::new
                 TKFlag::new
         );
         );
         flag.setVipWeekFlag("0");
         flag.setVipWeekFlag("0");
-        // flag.setQuoteLinkageFlag("0"); //解决选择三者险300万进行报价时,依然提示:规则管控提示$商业三者险保额请选择300万以上问题,测试正常,不行完了放开
-        // flag.setInstantInsureBZAllowed("0");//解决选择三者险300万进行报价时,依然提示:规则管控提示$商业三者险保额请选择300万以上问题,测试正常,不行完了放开
-        // flag.setPriceDifferFlag("0");//解决选择三者险300万进行报价时,依然提示:规则管控提示$商业三者险保额请选择300万以上问题,测试正常,不行完了放开
-
         // 无商业险时设置商业险标志为"0"
         // 无商业险时设置商业险标志为"0"
         if (CollectionUtils.isEmpty(commonQuoteVo.getKindInfoVo())) {
         if (CollectionUtils.isEmpty(commonQuoteVo.getKindInfoVo())) {
             flag.setCiFlag("0");
             flag.setCiFlag("0");
@@ -979,6 +975,9 @@ public class TKSimpleService {
         other.setChannelCode("OffWeb");
         other.setChannelCode("OffWeb");
         other.setMessageBZ("");
         other.setMessageBZ("");
         other.setMessageCI("");
         other.setMessageCI("");
+        // 清空初始化阶段返回的规则管控提示(如JB-SX-05商业三者险保额提示),与Python代码self.data['other']['notice'] = ''一致
+        // 该提示属于警告信息,不应阻断报价流程;若不清空,保司接口会原样回传,导致buildQuoteFailResultsVo误判为报价失败
+        other.setNotice("");
         other.setPriceDifferFlag("0");
         other.setPriceDifferFlag("0");
 
 
         // 获取时间参数对象(保司系统已初始化,无需创建)
         // 获取时间参数对象(保司系统已初始化,无需创建)
@@ -1047,14 +1046,15 @@ public class TKSimpleService {
                 .forEach(commonBiKindInfoVo -> {
                 .forEach(commonBiKindInfoVo -> {
                     TKCiKindsVo tkCiKindVo = tkCiKindsVoMap.get(commonBiKindInfoVo.getKindCode());
                     TKCiKindsVo tkCiKindVo = tkCiKindsVoMap.get(commonBiKindInfoVo.getKindCode());
                     tkCiKindVo.setIsSelect("1");
                     tkCiKindVo.setIsSelect("1");
-                    String quantity = commonBiKindInfoVo.getQuantity();
-                    if (StringUtils.isNotBlank(quantity)) {
-                        tkCiKindVo.setQuantity(Integer.parseInt(quantity));
-                    }
                     // 机动车损失险(101)的金额由保司系统返回,前端传的值不准确,使用保司已有的金额,无需覆盖
                     // 机动车损失险(101)的金额由保司系统返回,前端传的值不准确,使用保司已有的金额,无需覆盖
                     if (KIND_CODE_VEHICLE_DAMAGE.equals(commonBiKindInfoVo.getKindCode())) {
                     if (KIND_CODE_VEHICLE_DAMAGE.equals(commonBiKindInfoVo.getKindCode())) {
+                        tkCiKindVo.setQuoteAmountCN(ConvertUtil.simpleConvert(tkCiKindVo.getQuoteAmount().toString()));
                         return;
                         return;
                     }
                     }
+                    String quantity = commonBiKindInfoVo.getQuantity();
+                    if (StringUtils.isNotBlank(quantity)) {
+                        tkCiKindVo.setQuantity(Integer.parseInt(quantity));
+                    }
                     String amount = commonBiKindInfoVo.getAmount();
                     String amount = commonBiKindInfoVo.getAmount();
                     if (StringUtils.isBlank(amount)) {
                     if (StringUtils.isBlank(amount)) {
                         log.warn("商业险险种[{}]金额为空,跳过金额设置", commonBiKindInfoVo.getKindCode());
                         log.warn("商业险险种[{}]金额为空,跳过金额设置", commonBiKindInfoVo.getKindCode());

+ 2 - 2
tenant/insurance/quotation-zhongan/src/main/java/com/jzg/quotation/zhongan/crawler/component/ZhongAnCrawlerRequestComponent.java

@@ -273,8 +273,8 @@ public class ZhongAnCrawlerRequestComponent {
 
 
     public String markCompleted(ZhongAnCrawlerMarkRequest markRequest, HttpHeaders headers) {
     public String markCompleted(ZhongAnCrawlerMarkRequest markRequest, HttpHeaders headers) {
         InsuranceLog.infoLog(InsuranceEnum.ZAPA.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
         InsuranceLog.infoLog(InsuranceEnum.ZAPA.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
-                "众安爬虫影像提交接口",RequestUrl.MARK_COMPLETED.getRequestUrl(zhongAnCrawlerProperties.getBaseUrl()), JSON.toJSONString(markRequest));
-        return requestComponent.formDataString(RequestUrl.MARK_COMPLETED.getRequestUrl(zhongAnCrawlerProperties.getBaseUrl()), markRequest, headers,"影像提交");
+                "众安爬虫核保提交",RequestUrl.MARK_COMPLETED.getRequestUrl(zhongAnCrawlerProperties.getBaseUrl()), JSON.toJSONString(markRequest));
+        return requestComponent.formDataString(RequestUrl.MARK_COMPLETED.getRequestUrl(zhongAnCrawlerProperties.getBaseUrl()), markRequest, headers,"核保提交");
     }
     }
 
 
     public ZhongAnCrawlerPolicyListResponse policyList(ZhongAnCrawlerPolicyListRequest policyListRequest, HttpHeaders headers) {
     public ZhongAnCrawlerPolicyListResponse policyList(ZhongAnCrawlerPolicyListRequest policyListRequest, HttpHeaders headers) {

+ 1 - 3
tenant/insurance/quotation-zhongan/src/main/java/com/jzg/quotation/zhongan/crawler/entity/request/ZhongAnCrawlerApplyAccommodationRequest.java

@@ -58,7 +58,7 @@ public class ZhongAnCrawlerApplyAccommodationRequest {
     @JsonProperty("flag")
     @JsonProperty("flag")
     private String flag;
     private String flag;
 
 
-    public ZhongAnCrawlerApplyAccommodationRequest(Long id, String quoteId, String identityNo, String orderNo, ZhongAnCrawlerConfigureParameters parameters) {
+    public ZhongAnCrawlerApplyAccommodationRequest(Long id, String quoteId, String identityNo, String orderNo, Map<String, String> fileMap,ZhongAnCrawlerConfigureParameters parameters) {
         this.id = id;
         this.id = id;
         this.quoteId = quoteId;
         this.quoteId = quoteId;
         this.phoneNo = "";
         this.phoneNo = "";
@@ -66,8 +66,6 @@ public class ZhongAnCrawlerApplyAccommodationRequest {
         this.auditStatus = "1";
         this.auditStatus = "1";
         this.identityNo = identityNo;
         this.identityNo = identityNo;
         this.orderNo = orderNo;
         this.orderNo = orderNo;
-        Map<String, String> fileMap = new HashMap<>();
-        fileMap.put("version","2");
         this.fileMap = fileMap;
         this.fileMap = fileMap;
         this.location = "";
         this.location = "";
         this.flowId = parameters.getFlowId();
         this.flowId = parameters.getFlowId();

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

@@ -424,18 +424,29 @@ public class ZhongAnCrawlerRequestImpl implements ZhongAnCrawlerRequest {
         ZhongAnCrawlerQueryAccommodationRequest queryAccommodationRequest = new ZhongAnCrawlerQueryAccommodationRequest(zhongAnCrawlerOrder.getQuoteId(), parameters);
         ZhongAnCrawlerQueryAccommodationRequest queryAccommodationRequest = new ZhongAnCrawlerQueryAccommodationRequest(zhongAnCrawlerOrder.getQuoteId(), parameters);
         ZhongAnCrawlerQueryAccommodationResponse queryAccommodationResponse = zhongAnCrawlerRequestComponent.queryAccommodation(queryAccommodationRequest, headers);
         ZhongAnCrawlerQueryAccommodationResponse queryAccommodationResponse = zhongAnCrawlerRequestComponent.queryAccommodation(queryAccommodationRequest, headers);
         boolean queryAccommodation = queryAccommodationResponse.getSuccess();
         boolean queryAccommodation = queryAccommodationResponse.getSuccess();
+        Map<String, String> fileMap = new HashMap<>();
         for (InsuranceImageVo insuranceImageVo : insuranceUploadImageVo.getImageVoList()) {
         for (InsuranceImageVo insuranceImageVo : insuranceUploadImageVo.getImageVoList()) {
             //C01行驶证正面,C02车主身份证正面,D01行驶证反面 D02 车主身份证反面
             //C01行驶证正面,C02车主身份证正面,D01行驶证反面 D02 车主身份证反面
             switch (insuranceImageVo.getImageCode()) {
             switch (insuranceImageVo.getImageCode()) {
                 case "C01" -> {
                 case "C01" -> {
                     String imageType = "6";
                     String imageType = "6";
                     InsuranceImageVo.ImageDTO imageDTO = insuranceImageVo.getImageBase64List().get(0);
                     InsuranceImageVo.ImageDTO imageDTO = insuranceImageVo.getImageBase64List().get(0);
-                    extracted(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                    if (!queryAccommodation) {
+                        extracted(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                    } else {
+                       ZhongAnCrawlerAccommodationUploadResponse accommodationUpload = accommodationUpload(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                        fileMap.put("6", accommodationUpload.getValue().getDatas().getAttachment());
+                    }
                 }
                 }
                 case "C02" -> {
                 case "C02" -> {
                     String imageType = "4";
                     String imageType = "4";
                     InsuranceImageVo.ImageDTO imageDTO = insuranceImageVo.getImageBase64List().get(0);
                     InsuranceImageVo.ImageDTO imageDTO = insuranceImageVo.getImageBase64List().get(0);
-                    extracted(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                    if (!queryAccommodation) {
+                        extracted(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                    } else {
+                       ZhongAnCrawlerAccommodationUploadResponse accommodationUploadResponse = accommodationUpload(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                       fileMap.put("4", accommodationUploadResponse.getValue().getDatas().getAttachment());
+                    }
                 }
                 }
                 case "D01" -> {
                 case "D01" -> {
                     String imageType = "7";
                     String imageType = "7";
@@ -443,7 +454,8 @@ public class ZhongAnCrawlerRequestImpl implements ZhongAnCrawlerRequest {
                     if (!queryAccommodation) {
                     if (!queryAccommodation) {
                         extracted(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
                         extracted(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
                     } else {
                     } else {
-                        accommodationUpload(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                        ZhongAnCrawlerAccommodationUploadResponse accommodationUploadResponse = accommodationUpload(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                        fileMap.put("7", accommodationUploadResponse.getValue().getDatas().getAttachment());
                     }
                     }
                 }
                 }
                 case "D02" -> {
                 case "D02" -> {
@@ -452,7 +464,8 @@ public class ZhongAnCrawlerRequestImpl implements ZhongAnCrawlerRequest {
                     if (!queryAccommodation) {
                     if (!queryAccommodation) {
                         extracted(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
                         extracted(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
                     } else {
                     } else {
-                        accommodationUpload(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                        ZhongAnCrawlerAccommodationUploadResponse accommodationUploadResponse = accommodationUpload(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                        fileMap.put("3", accommodationUploadResponse.getValue().getDatas().getAttachment());
                     }
                     }
 
 
                 }
                 }
@@ -460,11 +473,21 @@ public class ZhongAnCrawlerRequestImpl implements ZhongAnCrawlerRequest {
                     String imageType = "99";
                     String imageType = "99";
                     List<InsuranceImageVo.ImageDTO> imageBase64List = insuranceImageVo.getImageBase64List();
                     List<InsuranceImageVo.ImageDTO> imageBase64List = insuranceImageVo.getImageBase64List();
                     for (InsuranceImageVo.ImageDTO imageDTO : imageBase64List) {
                     for (InsuranceImageVo.ImageDTO imageDTO : imageBase64List) {
-                        accommodationUpload(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                        ZhongAnCrawlerAccommodationUploadResponse accommodationUploadResponse = accommodationUpload(parameters, headers, zhongAnCrawlerOrder, imageType, imageDTO);
+                        fileMap.put("99", accommodationUploadResponse.getValue().getDatas().getAttachment());
                     }
                     }
                 }
                 }
             }
             }
-
+        }
+        if (queryAccommodation) {
+            fileMap.put("version","2");
+            Long id = queryAccommodationResponse.getValue().getDatas().getAccommodation().getId();
+            String identityNo = queryAccommodationResponse.getValue().getDatas().getAccommodation().getIdentityNo();
+            ZhongAnCrawlerApplyAccommodationRequest applyAccommodationRequest = new ZhongAnCrawlerApplyAccommodationRequest(id, zhongAnCrawlerOrder.getQuoteId(), identityNo, zhongAnCrawlerOrder.getOrderNo(), fileMap, parameters);
+            ZhongAnCrawlerApplyAccommodationResponse applyAccommodationResponse = zhongAnCrawlerRequestComponent.applyAccommodation(applyAccommodationRequest, headers);
+            if (applyAccommodationResponse.getSuccess()) {
+                log.info("通融提交成功");
+            }
         }
         }
     }
     }
 
 
@@ -494,12 +517,13 @@ public class ZhongAnCrawlerRequestImpl implements ZhongAnCrawlerRequest {
         }
         }
     }
     }
 
 
-    private void accommodationUpload (ZhongAnCrawlerConfigureParameters parameters, HttpHeaders headers, ZhongAnCrawlerOrder zhongAnCrawlerOrder, String imageType, InsuranceImageVo.ImageDTO imageDTO) {
+    private ZhongAnCrawlerAccommodationUploadResponse accommodationUpload (ZhongAnCrawlerConfigureParameters parameters, HttpHeaders headers, ZhongAnCrawlerOrder zhongAnCrawlerOrder, String imageType, InsuranceImageVo.ImageDTO imageDTO) {
         ZhongAnCrawlerAccommodationUploadRequest accommodationUploadRequest = new ZhongAnCrawlerAccommodationUploadRequest(imageType, imageDTO, zhongAnCrawlerOrder.getOrderNo(), parameters);
         ZhongAnCrawlerAccommodationUploadRequest accommodationUploadRequest = new ZhongAnCrawlerAccommodationUploadRequest(imageType, imageDTO, zhongAnCrawlerOrder.getOrderNo(), parameters);
         ZhongAnCrawlerAccommodationUploadResponse accommodationUploadResponse = zhongAnCrawlerRequestComponent.accommodationUpload(accommodationUploadRequest, headers);
         ZhongAnCrawlerAccommodationUploadResponse accommodationUploadResponse = zhongAnCrawlerRequestComponent.accommodationUpload(accommodationUploadRequest, headers);
         if (accommodationUploadResponse.getSuccess()) {
         if (accommodationUploadResponse.getSuccess()) {
             log.info("影像" + imageType + ":上传成功");
             log.info("影像" + imageType + ":上传成功");
         }
         }
+        return accommodationUploadResponse;
     }
     }
 
 
     public byte[] convert(String filePath) throws IOException {
     public byte[] convert(String filePath) throws IOException {

+ 5 - 0
tenant/organization/src/main/java/com/jzg/organization/client/OrgClient.java

@@ -6,11 +6,16 @@ import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
 
 
+import java.util.List;
+
 @FeignClient(name="${spring.application.name:jzg-organization}")
 @FeignClient(name="${spring.application.name:jzg-organization}")
 public interface OrgClient {
 public interface OrgClient {
 
 
     @PostMapping("/ptlAgreementDispatch/getAgreementDispatch")
     @PostMapping("/ptlAgreementDispatch/getAgreementDispatch")
     HttpResult getAgreementDispatch(@RequestBody PtlAgreementDispatchQuery ptlAgreementDispatchQuery);
     HttpResult getAgreementDispatch(@RequestBody PtlAgreementDispatchQuery ptlAgreementDispatchQuery);
 
 
+    @PostMapping("/ptlAgreementDispatch/getAgreementDispatchByCompanyIds")
+    HttpResult getAgreementDispatchByCompanyIds(@RequestBody List<String> companyIds);
+
 
 
 }
 }

+ 4 - 0
tenant/organization/src/main/java/com/jzg/organization/client/PlatformClient.java

@@ -29,6 +29,10 @@ public interface PlatformClient {
     @PostMapping(value = "/manager/attribution/getAgreementAttribution2")
     @PostMapping(value = "/manager/attribution/getAgreementAttribution2")
     public HttpResult<PtlAgreementAttribution> getAgreementAttribution2(@RequestParam(value = "id") String id);
     public HttpResult<PtlAgreementAttribution> getAgreementAttribution2(@RequestParam(value = "id") String id);
 
 
+    @Operation(summary = "批量查询保险公司账号接口", description = "批量查询保险公司账号接口")
+    @PostMapping(value = "/manager/attribution/getAgreementAttributionByIds")
+    public HttpResult<List<PtlAgreementAttribution>> getAgreementAttributionByIds(@RequestBody List<String> ids);
+
     /**
     /**
      * 特别约定列表查询
      * 特别约定列表查询
      */
      */

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

@@ -120,8 +120,8 @@ public class PtlAgreementCostController {
     @PostMapping("copyCost")
     @PostMapping("copyCost")
     public HttpResult copyCost(@RequestBody PtlAgreementCostCopyParam costCopyParam){
     public HttpResult copyCost(@RequestBody PtlAgreementCostCopyParam costCopyParam){
         try{
         try{
-            List<String> newCostIds = ptlAgreementCostService.costCopy(costCopyParam);
-            return HttpResult.ok(newCostIds);
+             return ptlAgreementCostService.costCopy(costCopyParam);
+
         }catch (Exception e){
         }catch (Exception e){
             return HttpResult.error("复制费用异常:"+e.getMessage());
             return HttpResult.error("复制费用异常:"+e.getMessage());
         }
         }

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

@@ -40,6 +40,12 @@ public class PtlAgreementDispatchController {
         return HttpResult.ok(ptlAgreementDispatchService.getAgreementDispatch(ptlAgreementDispatchQuery));
         return HttpResult.ok(ptlAgreementDispatchService.getAgreementDispatch(ptlAgreementDispatchQuery));
     }
     }
 
 
+    @PostMapping("getAgreementDispatchByCompanyIds")
+    @Operation(summary= "批量获取协议调度")
+    public HttpResult<PtlAgreementDispatchVo> getAgreementDispatchByCompanyIds(@RequestBody List<String> companyIds){
+        return HttpResult.ok(ptlAgreementDispatchService.getAgreementDispatchByCompanyIds(companyIds));
+    }
+
     /**
     /**
      * 添加协议调度
      * 添加协议调度
      * @author lipf modify by lipf
      * @author lipf modify by lipf

+ 3 - 0
tenant/organization/src/main/java/com/jzg/organization/mapper/PtlAgreementDispatchAfterActionMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jzg.commons.entity.agreement.dispatch.dto.PtlAgreementDispatchAction;
 import com.jzg.commons.entity.agreement.dispatch.dto.PtlAgreementDispatchAction;
 import com.jzg.commons.entity.agreement.dispatch.dto.PtlAgreementDispatchAfterAction;
 import com.jzg.commons.entity.agreement.dispatch.dto.PtlAgreementDispatchAfterAction;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 
 import java.util.List;
 import java.util.List;
 
 
@@ -12,4 +13,6 @@ import java.util.List;
 public interface PtlAgreementDispatchAfterActionMapper extends BaseMapper<PtlAgreementDispatchAfterAction> {
 public interface PtlAgreementDispatchAfterActionMapper extends BaseMapper<PtlAgreementDispatchAfterAction> {
 
 
     public List<PtlAgreementDispatchAfterAction> getAfterActions(String companyId);
     public List<PtlAgreementDispatchAfterAction> getAfterActions(String companyId);
+
+    public List<PtlAgreementDispatchAfterAction> getAfterActionsByCompanyIds(@Param("companyIds") List<String> companyIds);
 }
 }

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

@@ -62,7 +62,7 @@ public interface PtlAgreementCostService extends IService<PtlAgreementCost> {
     /**
     /**
      * 复制费用
      * 复制费用
      */
      */
-    List<String> costCopy(PtlAgreementCostCopyParam costCopyParam);
+    HttpResult costCopy(PtlAgreementCostCopyParam costCopyParam);
 
 
     /**
     /**
      * 批量修改协议费用有效期
      * 批量修改协议费用有效期

+ 6 - 0
tenant/organization/src/main/java/com/jzg/organization/service/PtlAgreementDispatchService.java

@@ -49,6 +49,12 @@ public interface PtlAgreementDispatchService extends IService<PtlAgreementDispat
      */
      */
     public PtlAgreementDispatchVo getAgreementDispatch(PtlAgreementDispatchQuery ptlAgreementDispatchQuery);
     public PtlAgreementDispatchVo getAgreementDispatch(PtlAgreementDispatchQuery ptlAgreementDispatchQuery);
 
 
+    /**
+     * 批量获取多个保司的协议调度信息(公共字典只查一次,消除逐保司重复的耗时查询)
+     * @param companyIds 保司id集合
+     */
+    public PtlAgreementDispatchVo getAgreementDispatchByCompanyIds(List<String> companyIds);
+
     /**
     /**
      * 根据调度id 获取调度动作
      * 根据调度id 获取调度动作
      * @param dispatchIds
      * @param dispatchIds

+ 63 - 53
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementCostServiceImpl.java

@@ -393,66 +393,76 @@ public class PtlAgreementCostServiceImpl extends ServiceImpl<PtlAgreementCostMap
 
 
     @GlobalTransactional
     @GlobalTransactional
     @Override
     @Override
-    public List<String> costCopy(PtlAgreementCostCopyParam costCopyParam) {
+    public HttpResult costCopy(PtlAgreementCostCopyParam costCopyParam) {
         List<String> newCostId = new ArrayList<>();
         List<String> newCostId = new ArrayList<>();
         List<String> costIds = costCopyParam.getCostIds();
         List<String> costIds = costCopyParam.getCostIds();
+        StringBuilder errMsg = new StringBuilder();
         costIds.forEach(oldCostId-> {
         costIds.forEach(oldCostId-> {
             PtlAgreementCost ptlAgreementCost = ptlAgreementCostMapper.selectById(oldCostId);
             PtlAgreementCost ptlAgreementCost = ptlAgreementCostMapper.selectById(oldCostId);
-            List<PtlAgreementCostType> ptlAgreementCostTypes = ptlAgreementCostTypeMapper.selectList(new LambdaQueryWrapper<PtlAgreementCostType>()
-                    .eq(PtlAgreementCostType::getPtlAgreementCostId, ptlAgreementCost.getId()));
-            List<PtlAgreementCostRule> ptlAgreementCostRules = ptlAgreementCostRuleMapper.selectList(new LambdaQueryWrapper<PtlAgreementCostRule>()
-                    .eq(PtlAgreementCostRule::getPtlAgreementCostId, ptlAgreementCost.getId()));
-
-            // 调整数据 进行copy
-            String costId = IdGenerate.nextId();
-            ptlAgreementCost.setId(costId);
-            ptlAgreementCost.setCoverRuleId(costCopyParam.getCoverRuleId());
-            ptlAgreementCost.setPtlAgreementId(costCopyParam.getAgreementId());
-            ptlAgreementCost.setCostDescribe("复制的费用:" + ptlAgreementCost.getCostDescribe());
-            ptlAgreementCost.setCreateTime(LocalDateTime.now());
-            ptlAgreementCost.setUpdateTime(LocalDateTime.now());
-            ptlAgreementCost.setProductId(costCopyParam.getProductId());
-            ptlAgreementCost.setProductName(costCopyParam.getProductName());
-            // 复制的费用为待审核
-            ptlAgreementCost.setApproved(0);
-
-
-            List<PtlAgreementCostType> newPtlAgreementCostTypes = ptlAgreementCostTypes.stream()
-                    .filter(item -> {
-                        String productId = costCopyParam.getProductId();
-                        // 单交剔除 CostType = 商业险
-                        if ("0330".equals(productId)) {
-                            return !"商业险".equals(item.getCostType());
-                        }
-                        // 单商剔除 CostType = 交强险
-                        if ("034001".equals(productId)) {
-                            return !"交强险".equals(item.getCostType());
-                        }
-                        // 单三剔除 CostType = 交强险
-                        if ("034002".equals(productId)) {
-                            return !"交强险".equals(item.getCostType());
-                        }
-                        return true;
-                    })
-                    .peek(item -> {
-                        // 给留存的元素赋值字段
-                        item.setId(IdGenerate.nextId());
-                        item.setPtlAgreementCostId(costId);
-                    })
-                    .collect(Collectors.toList());
-
-            ptlAgreementCostRules.forEach(item->{
-                item.setId(IdGenerate.nextId());
-                item.setPtlAgreementCostId(costId);
-            });
+            if(ptlAgreementCost != null){
+                List<PtlAgreementCostType> ptlAgreementCostTypes = ptlAgreementCostTypeMapper.selectList(new LambdaQueryWrapper<PtlAgreementCostType>()
+                        .eq(PtlAgreementCostType::getPtlAgreementCostId, ptlAgreementCost.getId()));
+                List<PtlAgreementCostRule> ptlAgreementCostRules = ptlAgreementCostRuleMapper.selectList(new LambdaQueryWrapper<PtlAgreementCostRule>()
+                        .eq(PtlAgreementCostRule::getPtlAgreementCostId, ptlAgreementCost.getId()));
+
+                // 调整数据 进行copy
+                String costId = IdGenerate.nextId();
+                ptlAgreementCost.setId(costId);
+                ptlAgreementCost.setCoverRuleId(costCopyParam.getCoverRuleId());
+                ptlAgreementCost.setPtlAgreementId(costCopyParam.getAgreementId());
+                ptlAgreementCost.setCostDescribe("复制的费用:" + ptlAgreementCost.getCostDescribe());
+                ptlAgreementCost.setCreateTime(LocalDateTime.now());
+                ptlAgreementCost.setUpdateTime(LocalDateTime.now());
+                if(costCopyParam.getProductId() != null && !costCopyParam.getProductId().isEmpty()){
+                    ptlAgreementCost.setProductId(costCopyParam.getProductId());
+                }
+                if(costCopyParam.getProductName() != null && !costCopyParam.getProductName().isEmpty()){
+                    ptlAgreementCost.setProductName(costCopyParam.getProductName());
+                }
+
+                // 复制的费用为待审核
+                ptlAgreementCost.setApproved(0);
+                List<PtlAgreementCostType> newPtlAgreementCostTypes = ptlAgreementCostTypes.stream()
+                        .filter(item -> {
+                            String productId = costCopyParam.getProductId();
+                            // 单交剔除 CostType = 商业险
+                            if ("0330".equals(productId)) {
+                                return !"商业险".equals(item.getCostType());
+                            }
+                            // 单商剔除 CostType = 交强险
+                            if ("034001".equals(productId)) {
+                                return !"交强险".equals(item.getCostType());
+                            }
+                            // 单三剔除 CostType = 交强险
+                            if ("034002".equals(productId)) {
+                                return !"交强险".equals(item.getCostType());
+                            }
+                            return true;
+                        })
+                        .peek(item -> {
+                            // 给留存的元素赋值字段
+                            item.setId(IdGenerate.nextId());
+                            item.setPtlAgreementCostId(costId);
+                        })
+                        .collect(Collectors.toList());
+
+                ptlAgreementCostRules.forEach(item->{
+                    item.setId(IdGenerate.nextId());
+                    item.setPtlAgreementCostId(costId);
+                });
+
+                ptlAgreementCostMapper.insert(ptlAgreementCost);
+                ptlAgreementCostTypeMapper.insert(newPtlAgreementCostTypes);
+                ptlAgreementCostRuleMapper.insert(ptlAgreementCostRules);
+                newCostId.add(ptlAgreementCost.getId());
+
+            }else{
+                errMsg.append("costId为"+oldCostId+"的费用信息已被删除");
+            }
 
 
-            ptlAgreementCostMapper.insert(ptlAgreementCost);
-            ptlAgreementCostTypeMapper.insert(newPtlAgreementCostTypes);
-            ptlAgreementCostRuleMapper.insert(ptlAgreementCostRules);
-            newCostId.add(ptlAgreementCost.getId());
 
 
         });
         });
-        return newCostId;
+        return HttpResult.ok(errMsg.toString(),newCostId);
     }
     }
 
 
     @Override
     @Override

+ 66 - 13
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlAgreementDispatchServiceImpl.java

@@ -116,11 +116,31 @@ public class PtlAgreementDispatchServiceImpl extends ServiceImpl<PtlAgreementDis
 
 
     @Override
     @Override
     public PtlAgreementDispatchVo getAgreementDispatch(PtlAgreementDispatchQuery ptlAgreementDispatchQuery) {
     public PtlAgreementDispatchVo getAgreementDispatch(PtlAgreementDispatchQuery ptlAgreementDispatchQuery) {
-        log.info("获取协议调度. ptlAgreementDispatchQuery=[{}]", JSONUtil.toJsonStr(ptlAgreementDispatchQuery));
+        if (ptlAgreementDispatchQuery == null || StrUtil.isBlank(ptlAgreementDispatchQuery.getCompanyId())) {
+            return new PtlAgreementDispatchVo();
+        }
+        return buildDispatchVos(Collections.singletonList(ptlAgreementDispatchQuery.getCompanyId()));
+    }
+
+    /**
+     * 批量获取多个保司的协议调度信息(公共字典/全表查询只执行一次,避免逐保司重复查询;账号查询批量一次完成,消除嵌套串行 RPC)
+     *
+     * @param companyIds 保司id集合
+     */
+    public PtlAgreementDispatchVo getAgreementDispatchByCompanyIds(List<String> companyIds) {
+        if (CollUtil.isEmpty(companyIds)) {
+            return new PtlAgreementDispatchVo();
+        }
+        return buildDispatchVos(companyIds);
+    }
+
+    private PtlAgreementDispatchVo buildDispatchVos(List<String> companyIds) {
+        log.info("批量获取协议调度. companyIds=[{}]", JSONUtil.toJsonStr(companyIds));
+        PtlAgreementDispatchVo dispatchVos = new PtlAgreementDispatchVo();
+        // 一次查询所有保司的调度(公共字典只查一次)
         List<PtlAgreementDispatch> ptlAgreementDispatches = baseMapper.selectList(new LambdaQueryWrapper<PtlAgreementDispatch>()
         List<PtlAgreementDispatch> ptlAgreementDispatches = baseMapper.selectList(new LambdaQueryWrapper<PtlAgreementDispatch>()
-                .eq(PtlAgreementDispatch::getCompanyId, ptlAgreementDispatchQuery.getCompanyId())
+                .in(PtlAgreementDispatch::getCompanyId, companyIds)
                 .orderByAsc(PtlAgreementDispatch::getCreateTime));
                 .orderByAsc(PtlAgreementDispatch::getCreateTime));
-        PtlAgreementDispatchVo dispatchVos = new PtlAgreementDispatchVo();
         List<String> dispatchIds = ptlAgreementDispatches.stream().map(PtlAgreementDispatch::getId).collect(Collectors.toList());
         List<String> dispatchIds = ptlAgreementDispatches.stream().map(PtlAgreementDispatch::getId).collect(Collectors.toList());
         if (!dispatchIds.isEmpty()) {
         if (!dispatchIds.isEmpty()) {
             List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList = ptlAgreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
             List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList = ptlAgreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
@@ -140,8 +160,9 @@ public class PtlAgreementDispatchServiceImpl extends ServiceImpl<PtlAgreementDis
             }).toList();
             }).toList();
             // 获取所有保司的动作
             // 获取所有保司的动作
             List<PtlAgreementDispatchAction> ptlAgreementDispatchActions = actionMapper.getActions(dispatchIds);
             List<PtlAgreementDispatchAction> ptlAgreementDispatchActions = actionMapper.getActions(dispatchIds);
-            // 获取保司的报价失败之后的动作
-            List<PtlAgreementDispatchAfterAction> afterActions = afterActionMapper.getAfterActions(ptlAgreementDispatchQuery.getCompanyId());
+            // 获取保司的报价失败之后的动作(按 companyId 分组复用)
+            Map<String, List<PtlAgreementDispatchAfterAction>> afterActionsByCompany = afterActionMapper.getAfterActionsByCompanyIds(companyIds).stream()
+                    .collect(Collectors.groupingBy(PtlAgreementDispatchAfterAction::getCompanyId));
             int index = 1;
             int index = 1;
             // add by lipf, 对协议配置中的字典序号进行转义 2026年5月20日16:43:34
             // add by lipf, 对协议配置中的字典序号进行转义 2026年5月20日16:43:34
             List<PtlAgreementUndwrtRulesDictLabal> ptlAgreementUndwrtRulesDictLabals = baseMapper.queryAllDictLabal();
             List<PtlAgreementUndwrtRulesDictLabal> ptlAgreementUndwrtRulesDictLabals = baseMapper.queryAllDictLabal();
@@ -160,6 +181,28 @@ public class PtlAgreementDispatchServiceImpl extends ServiceImpl<PtlAgreementDis
                     ));
                     ));
             Map<String, PtlAreaLicense> areaLicenseMap = ptlAreaLicenseService.queryAllAreaLicenseMap();
             Map<String, PtlAreaLicense> areaLicenseMap = ptlAreaLicenseService.queryAllAreaLicenseMap();
 
 
+            // ===== 收集所有 change_bs_account 动作的 accountId,批量查询一次(消除串行 RPC) =====
+            List<String> accountIds = new ArrayList<>();
+            for (PtlAgreementDispatchAction action : ptlAgreementDispatchActions) {
+                if ("change_bs_account".equals(action.getActionCode()) && action.getActionJson() != null
+                        && StrUtil.isNotBlank(action.getActionJson().getString("accountId"))) {
+                    accountIds.add(action.getActionJson().getString("accountId"));
+                }
+            }
+            Map<String, PtlAgreementAttribution> attributionById = new HashMap<>();
+            if (!accountIds.isEmpty()) {
+                try {
+                    HttpResult<List<PtlAgreementAttribution>> batchRes = platformClient.getAgreementAttributionByIds(accountIds);
+                    if (batchRes.getCode() == 200 && batchRes.getData() != null) {
+                        for (PtlAgreementAttribution attr : batchRes.getData()) {
+                            attributionById.put(attr.getId(), attr);
+                        }
+                    }
+                } catch (Exception e) {
+                    log.warn("批量查询保司账号异常", e);
+                }
+            }
+
             Map<String,String> operatorMap = new HashMap<>();
             Map<String,String> operatorMap = new HashMap<>();
             operatorMap.put("1","包含");
             operatorMap.put("1","包含");
             operatorMap.put("2","小于");
             operatorMap.put("2","小于");
@@ -243,11 +286,22 @@ public class PtlAgreementDispatchServiceImpl extends ServiceImpl<PtlAgreementDis
                                 String accountId = action.getActionJson().getString("accountId");
                                 String accountId = action.getActionJson().getString("accountId");
                                 // 你的 Objects.nonNull 判断依然有效且非常规范
                                 // 你的 Objects.nonNull 判断依然有效且非常规范
                                 if (Objects.nonNull(accountId)) {
                                 if (Objects.nonNull(accountId)) {
-                                    HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution2(accountId);
-                                    if (agreementAttribution.getCode() == 200) {
-                                        PtlAgreementAttribution data = agreementAttribution.getData();
+                                    PtlAgreementAttribution data = attributionById.get(accountId);
+                                    if (data != null) {
                                         action.getActionJson().put("userName", data.getUsername());
                                         action.getActionJson().put("userName", data.getUsername());
                                         action.getActionJson().put("companyName", data.getInsCompanyName());
                                         action.getActionJson().put("companyName", data.getInsCompanyName());
+                                    } else {
+                                        // 批量未覆盖时回退单次查询,保证兼容
+                                        try {
+                                            HttpResult<PtlAgreementAttribution> agreementAttribution = platformClient.getAgreementAttribution2(accountId);
+                                            if (agreementAttribution.getCode() == 200 && agreementAttribution.getData() != null) {
+                                                PtlAgreementAttribution d = agreementAttribution.getData();
+                                                action.getActionJson().put("userName", d.getUsername());
+                                                action.getActionJson().put("companyName", d.getInsCompanyName());
+                                            }
+                                        } catch (Exception e) {
+                                            log.warn("查询保司账号[{}]异常", accountId, e);
+                                        }
                                     }
                                     }
                                 }
                                 }
                             }
                             }
@@ -258,7 +312,7 @@ public class PtlAgreementDispatchServiceImpl extends ServiceImpl<PtlAgreementDis
                 dispatchVos.getDispatchVos().add(vo);
                 dispatchVos.getDispatchVos().add(vo);
             }
             }
 
 
-            for(PtlAgreementDispatchAfterAction afterAction : afterActions){
+            for(PtlAgreementDispatchAfterAction afterAction : afterActionsByCompany.values().stream().flatMap(List::stream).collect(Collectors.toList())){
                 SysDict sysDict = afterActionsDicts.stream().filter(x -> x.getValue().equals(afterAction.getActionCode())).findFirst().orElse(null);
                 SysDict sysDict = afterActionsDicts.stream().filter(x -> x.getValue().equals(afterAction.getActionCode())).findFirst().orElse(null);
                 if(sysDict == null){
                 if(sysDict == null){
                     afterAction.setActionName("未知动作");
                     afterAction.setActionName("未知动作");
@@ -276,14 +330,13 @@ public class PtlAgreementDispatchServiceImpl extends ServiceImpl<PtlAgreementDis
                         // change_bs_account 更换保司账号
                         // change_bs_account 更换保司账号
                         HttpResult<PtlAgreementAttribution> agreementAttribution = esmInsCompanyClient.getAgreementAttribution(afterAction.getActionJson().get("accountId").toString());
                         HttpResult<PtlAgreementAttribution> agreementAttribution = esmInsCompanyClient.getAgreementAttribution(afterAction.getActionJson().get("accountId").toString());
                         if(agreementAttribution.getCode() == 200){
                         if(agreementAttribution.getCode() == 200){
-                            PtlAgreementAttribution data = agreementAttribution.getData();
-                            afterAction.getActionJson().put("userName",data.getUsername());
-                            afterAction.getActionJson().put("companyName",data.getInsCompanyName());
+                            afterAction.getActionJson().put("userName",agreementAttribution.getData().getUsername());
+                            afterAction.getActionJson().put("companyName",agreementAttribution.getData().getInsCompanyName());
                         }
                         }
                     }
                     }
                 }
                 }
             }
             }
-            dispatchVos.setAfterActions(afterActions);
+            dispatchVos.setAfterActions(afterActionsByCompany.values().stream().flatMap(List::stream).collect(Collectors.toList()));
         }
         }
 
 
 
 

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

@@ -107,8 +107,8 @@ public class PtlAgreementUndwrtRulesServiceImpl extends ServiceImpl<PtlAgreement
                             vo.setIsValid(1);  // 已失效
                             vo.setIsValid(1);  // 已失效
                         }
                         }
                     }));
                     }));
-                    rulesVo.setCostVoList(allCostVos);
                 }
                 }
+                rulesVo.setCostVoList(allCostVos);
             }
             }
         }
         }
         return rulesVos;
         return rulesVos;

+ 83 - 44
tenant/organization/src/main/java/com/jzg/organization/service/impl/PtlSchemeServiceImpl.java

@@ -21,6 +21,7 @@ import com.jzg.commons.entity.agreement.dispatch.vo.ValidateDispatchRuleVo;
 import com.jzg.commons.entity.agreement.po.PtlAgreementAttribution;
 import com.jzg.commons.entity.agreement.po.PtlAgreementAttribution;
 import com.jzg.commons.entity.costs.vo.ValidateSchemeRuleVo;
 import com.jzg.commons.entity.costs.vo.ValidateSchemeRuleVo;
 import com.jzg.commons.entity.po.*;
 import com.jzg.commons.entity.po.*;
+import com.jzg.commons.entity.quote.vo.CarInfoVo;
 import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
 import com.jzg.commons.entity.quote.vo.CustomerInfoVo;
 import com.jzg.commons.entity.quote.vo.SalespersonInfoVo;
 import com.jzg.commons.entity.quote.vo.SalespersonInfoVo;
 import com.jzg.commons.entity.scheme.po.*;
 import com.jzg.commons.entity.scheme.po.*;
@@ -419,6 +420,8 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
      */
      */
     @Override
     @Override
     public List<PtlAgreementInsCompanyVo> ruleFilterCompany(SchemeRuleFilterVo schemeRuleFilterVo) {
     public List<PtlAgreementInsCompanyVo> ruleFilterCompany(SchemeRuleFilterVo schemeRuleFilterVo) {
+        // 参数过滤
+        schemeRuleFilterValidateParam(schemeRuleFilterVo);
         String userSystemCode = baseController.getUserSystemCode();
         String userSystemCode = baseController.getUserSystemCode();
         String systemCode = baseController.getSystemCode();
         String systemCode = baseController.getSystemCode();
         log.info("租户匹配保司以及保司下的协议等信息。 schemeRuleFilterVo=[{}],userSystemCode=[{}],systemCode=[{}]", JSONUtil.toJsonStr(schemeRuleFilterVo), userSystemCode, systemCode);
         log.info("租户匹配保司以及保司下的协议等信息。 schemeRuleFilterVo=[{}],userSystemCode=[{}],systemCode=[{}]", JSONUtil.toJsonStr(schemeRuleFilterVo), userSystemCode, systemCode);
@@ -435,6 +438,32 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
         //   3. 关联账号必须可用 (useStatus == "0") 且可报价 (quoteStatus == "0")
         //   3. 关联账号必须可用 (useStatus == "0") 且可报价 (quoteStatus == "0")
         // 过滤后如果某保司没有任何有效协议,会被下面的 removeIf 自动排除
         // 过滤后如果某保司没有任何有效协议,会被下面的 removeIf 自动排除
         if (CollUtil.isNotEmpty(companyList)) {
         if (CollUtil.isNotEmpty(companyList)) {
+            // 1. 收集所有需要校验的归属账号 id(去重)
+            List<String> attributionIds = companyList.stream()
+                    .flatMap(c -> Optional.ofNullable(c.getAgreements()).orElse(Collections.emptyList()).stream())
+                    .map(PtlAgreement::getAttributionId)
+                    .filter(StrUtil::isNotBlank)
+                    .distinct()
+                    .collect(Collectors.toList());
+
+            // 2. 并行批量查询归属账号,构建 id -> 账号信息 索引(避免逐协议串行 RPC)
+            Map<String, PtlAgreementAttribution> attributionMap;
+            if (CollUtil.isNotEmpty(attributionIds)) {
+                attributionMap = attributionIds.parallelStream().collect(HashMap::new, (map, id) -> {
+                    try {
+                        HttpResult<PtlAgreementAttribution> res = platformClient.getAgreementAttribution2(id);
+                        if (res.getCode() == 200 && res.getData() != null) {
+                            map.put(id, res.getData());
+                        }
+                    } catch (Exception e) {
+                        log.warn("批量查询协议归属账号[{}]异常,默认保留", id, e);
+                    }
+                }, HashMap::putAll);
+            } else {
+                attributionMap = Collections.emptyMap();
+            }
+
+            // 3. 基于索引做协议 + 账号状态过滤(无远程调用)
             for (EsmInsCompany company : companyList) {
             for (EsmInsCompany company : companyList) {
                 List<PtlAgreement> agreements = company.getAgreements();
                 List<PtlAgreement> agreements = company.getAgreements();
                 if (CollUtil.isEmpty(agreements)) {
                 if (CollUtil.isEmpty(agreements)) {
@@ -447,21 +476,14 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
                         // 归属账号状态
                         // 归属账号状态
                         .filter(agreement -> {
                         .filter(agreement -> {
                             String attributionId = agreement.getAttributionId();
                             String attributionId = agreement.getAttributionId();
-                            if (attributionId == null || attributionId.isEmpty()) {
+                            if (StrUtil.isBlank(attributionId)) {
                                 return true; // 没有关联账号,不做账号校验
                                 return true; // 没有关联账号,不做账号校验
                             }
                             }
-                            try {
-                                com.jzg.commons.core.page.HttpResult<PtlAgreementAttribution> res =
-                                        platformClient.getAgreementAttribution2(attributionId);
-                                if (res.getCode() != 200 || res.getData() == null) {
-                                    return true; // 查不到账号信息,默认保留
-                                }
-                                PtlAgreementAttribution attr = res.getData();
-                                return "0".equals(attr.getUseStatus()) && "0".equals(attr.getQuoteStatus());
-                            } catch (Exception e) {
-                                log.warn("查询协议[{}]的归属账号异常,默认保留", agreement.getId(), e);
-                                return true;
+                            PtlAgreementAttribution attr = attributionMap.get(attributionId);
+                            if (attr == null) {
+                                return true; // 查不到账号信息,默认保留
                             }
                             }
+                            return "0".equals(attr.getUseStatus()) && "0".equals(attr.getQuoteStatus());
                         })
                         })
                         .collect(Collectors.toList());
                         .collect(Collectors.toList());
                 company.setAgreements(validAgreements);
                 company.setAgreements(validAgreements);
@@ -495,21 +517,22 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
 
 
         List<PtlSchemeRulesAttrLink> ptlSchemeRulesAttrLinks = ptlSchemeRulesAttrLinkMapper.selectList(new LambdaQueryWrapper<PtlSchemeRulesAttrLink>().in(PtlSchemeRulesAttrLink::getSchemeId, ptlSchemeIds));
         List<PtlSchemeRulesAttrLink> ptlSchemeRulesAttrLinks = ptlSchemeRulesAttrLinkMapper.selectList(new LambdaQueryWrapper<PtlSchemeRulesAttrLink>().in(PtlSchemeRulesAttrLink::getSchemeId, ptlSchemeIds));
 
 
-        // 将规则根据schemeId聚合转换成Map
-//        Map<String, List<PtlSchemeRulesAttrLink>> ptlSchemeRulesAttrLinkMap = ptlSchemeRulesAttrLinks.stream()
-//                .collect(Collectors.groupingBy(PtlSchemeRulesAttrLink::getSchemeId));
-
         ValidateSchemeRuleVo validateSchemeRuleVo = new ValidateSchemeRuleVo();
         ValidateSchemeRuleVo validateSchemeRuleVo = new ValidateSchemeRuleVo();
         validateSchemeRuleVo.builderQuoteVo(schemeRuleFilterVo, redissonClient);
         validateSchemeRuleVo.builderQuoteVo(schemeRuleFilterVo, redissonClient);
         validateSchemeRuleVo.setAttrLinks(ptlSchemeRulesAttrLinks);
         validateSchemeRuleVo.setAttrLinks(ptlSchemeRulesAttrLinks);
         HttpResult<List<String>> esmInsCompanyHttpResult = costsRuleClient.validateSchemeRule(validateSchemeRuleVo);
         HttpResult<List<String>> esmInsCompanyHttpResult = costsRuleClient.validateSchemeRule(validateSchemeRuleVo);
         List<String> insSchemeIds = esmInsCompanyHttpResult.getData();
         List<String> insSchemeIds = esmInsCompanyHttpResult.getData();
+        if (CollUtil.isEmpty(insSchemeIds)) {
+            AssertionUtils.isFail(true, "没有可报价的保险公司");
+        }
+        // 用 HashSet 提升 contains 查找效率(O(1))
+        Set<String> insSchemeIdSet = new HashSet<>(insSchemeIds);
         //开始过滤保险公司
         //开始过滤保险公司
         //1.过滤方案
         //1.过滤方案
-        ptlSchemes.removeIf(ptlScheme -> !insSchemeIds.contains(ptlScheme.getId()));
-        List<String> companyIds = ptlSchemes.stream().map(ptlScheme -> ptlScheme.getCompanyId()).collect(Collectors.toList());
+        ptlSchemes.removeIf(ptlScheme -> !insSchemeIdSet.contains(ptlScheme.getId()));
+        Set<String> companyIdSet = ptlSchemes.stream().map(PtlScheme::getCompanyId).collect(Collectors.toSet());
         // 移除不匹配方案的保司,以及空协议的保司
         // 移除不匹配方案的保司,以及空协议的保司
-        companyList.removeIf(company -> !companyIds.contains(company.getId()) || CollUtil.isEmpty(company.getAgreements()));
+        companyList.removeIf(company -> !companyIdSet.contains(company.getId()) || CollUtil.isEmpty(company.getAgreements()));
         List<PtlAgreementInsCompanyVo> resVo = new ArrayList<>();
         List<PtlAgreementInsCompanyVo> resVo = new ArrayList<>();
         companyList.forEach(company -> {
         companyList.forEach(company -> {
             PtlAgreementInsCompanyVo vo = new PtlAgreementInsCompanyVo();
             PtlAgreementInsCompanyVo vo = new PtlAgreementInsCompanyVo();
@@ -521,28 +544,14 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
 
 
         ValidateDispatchRuleVo dispatchRuleVos = new ValidateDispatchRuleVo();
         ValidateDispatchRuleVo dispatchRuleVos = new ValidateDispatchRuleVo();
         dispatchRuleVos.setQuoteVo(validateSchemeRuleVo.getQuoteVo());
         dispatchRuleVos.setQuoteVo(validateSchemeRuleVo.getQuoteVo());
-        //2.协议调度规则数据拼接
-        String finalSystemCode = systemCode;
-        companyList.forEach(company -> {
-            PtlAgreementDispatchQuery query = new PtlAgreementDispatchQuery();
-            query.setCompanyId(company.getId());
-            HttpResult agreementDispatch = orgClient.getAgreementDispatch(query);
-            if (agreementDispatch.getCode() == 200) {
-                ObjectMapper mapper = new ObjectMapper();
-                List<PtlAgreementDispatchVo.DispatchVo> vos = new ArrayList<>();
-                Map<String, Object> data = (Map<String, Object>) agreementDispatch.getData();
-
-                Object dispatchVosObj = data.get("dispatchVos");
-                if (dispatchVosObj instanceof List) {
-                    List<Map<String, Object>> dispatchVos = (List<Map<String, Object>>) dispatchVosObj;
-                    for (Map<String, Object> map : dispatchVos) {
-                        PtlAgreementDispatchVo.DispatchVo obj = mapper.convertValue(map, PtlAgreementDispatchVo.DispatchVo.class);
-                        vos.add(obj);
-                    }
-                }
-
-                // 根据section 分组 进行拆分 规则
-                for (PtlAgreementDispatchVo.DispatchVo vo : vos) {
+        //2.协议调度规则数据拼接(一次批量查询所有保司,避免逐保司重复的全表/字典查询与串行 RPC)
+        List<String> allCompanyIds = companyList.stream().map(EsmInsCompany::getId).collect(Collectors.toList());
+        try {
+            HttpResult agreementDispatch = orgClient.getAgreementDispatchByCompanyIds(allCompanyIds);
+            if (agreementDispatch != null && agreementDispatch.getCode() == 200 && agreementDispatch.getData() != null) {
+                PtlAgreementDispatchVo dispatchVoResult = new ObjectMapper().convertValue(agreementDispatch.getData(), PtlAgreementDispatchVo.class);
+                List<ValidateDispatchRuleVo.DispatchAttrVo> dispatchAttrVos = new ArrayList<>();
+                for (PtlAgreementDispatchVo.DispatchVo vo : dispatchVoResult.getDispatchVos()) {
                     List<PtlAgreementDispatchRulesAttrLink> attrLinks = vo.getAttrLinks();
                     List<PtlAgreementDispatchRulesAttrLink> attrLinks = vo.getAttrLinks();
                     Map<String, List<PtlAgreementDispatchRulesAttrLink>> grouped = attrLinks.stream().collect(Collectors.groupingBy(link -> Optional.ofNullable(link.getSection()).orElse("0"), LinkedHashMap::new, Collectors.toList()));
                     Map<String, List<PtlAgreementDispatchRulesAttrLink>> grouped = attrLinks.stream().collect(Collectors.groupingBy(link -> Optional.ofNullable(link.getSection()).orElse("0"), LinkedHashMap::new, Collectors.toList()));
                     ValidateDispatchRuleVo.DispatchAttrVo dispatchAttrVo = new ValidateDispatchRuleVo.DispatchAttrVo();
                     ValidateDispatchRuleVo.DispatchAttrVo dispatchAttrVo = new ValidateDispatchRuleVo.DispatchAttrVo();
@@ -550,20 +559,36 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
                     dispatchAttrVo.setDispatchName(vo.getDispatchName());
                     dispatchAttrVo.setDispatchName(vo.getDispatchName());
                     dispatchAttrVo.setCompanyId(vo.getCompanyId());
                     dispatchAttrVo.setCompanyId(vo.getCompanyId());
                     dispatchAttrVo.setSectionGroups(grouped);
                     dispatchAttrVo.setSectionGroups(grouped);
-                    dispatchRuleVos.getDispatchAttrVos().add(dispatchAttrVo);
+                    dispatchAttrVos.add(dispatchAttrVo);
                 }
                 }
+                dispatchRuleVos.getDispatchAttrVos().addAll(dispatchAttrVos);
             }
             }
-        });
+        } catch (Exception e) {
+            log.warn("批量查询协议调度异常", e);
+        }
 //
 //
         // 3. 校验调度数据
         // 3. 校验调度数据
         HttpResult httpResult = costsRuleClient.validateDispatchRule(dispatchRuleVos);
         HttpResult httpResult = costsRuleClient.validateDispatchRule(dispatchRuleVos);
         if (httpResult.getCode() == 200) {
         if (httpResult.getCode() == 200) {
             // 返回了调度id  通过调度id 查询动作
             // 返回了调度id  通过调度id 查询动作
             List<PtlAgreementDispatchVo.DispatchVo> agreementDispatchAction = ptlAgreementDispatchService.getAgreementDispatchAction((List<String>) httpResult.getData());
             List<PtlAgreementDispatchVo.DispatchVo> agreementDispatchAction = ptlAgreementDispatchService.getAgreementDispatchAction((List<String>) httpResult.getData());
+            // 构建 保司id -> DispatchVo 索引(companyId 可能为逗号分隔的多保司)
+            Map<String, PtlAgreementDispatchVo.DispatchVo> dispatchByCompany = new HashMap<>();
+            for (PtlAgreementDispatchVo.DispatchVo dispatch : agreementDispatchAction) {
+                if (dispatch.getCompanyId() == null) {
+                    continue;
+                }
+                for (String cid : dispatch.getCompanyId().split(",")) {
+                    String trimCid = cid.trim();
+                    if (!trimCid.isEmpty()) {
+                        dispatchByCompany.put(trimCid, dispatch);
+                    }
+                }
+            }
             // 如果动作中存在替换协议则 保司标志置为调度
             // 如果动作中存在替换协议则 保司标志置为调度
             resVo.forEach(company -> {
             resVo.forEach(company -> {
                 company.setIsDispatch(0);
                 company.setIsDispatch(0);
-                PtlAgreementDispatchVo.DispatchVo ptlAgreementDispatchVo = agreementDispatchAction.stream().filter(x -> x.getCompanyId().contains(company.getId())).findFirst().orElse(null);
+                PtlAgreementDispatchVo.DispatchVo ptlAgreementDispatchVo = dispatchByCompany.get(company.getId());
                 if (ptlAgreementDispatchVo != null) {
                 if (ptlAgreementDispatchVo != null) {
                     PtlAgreementDispatchAction action1 = ptlAgreementDispatchVo.getActions().stream().filter(action -> action.getActionCode().equals(ActionEnum.SPECIFY_AGREEMENT.getCode())).findFirst().orElse(null);
                     PtlAgreementDispatchAction action1 = ptlAgreementDispatchVo.getActions().stream().filter(action -> action.getActionCode().equals(ActionEnum.SPECIFY_AGREEMENT.getCode())).findFirst().orElse(null);
                     if (action1 != null) {
                     if (action1 != null) {
@@ -605,6 +630,20 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
         }
         }
         return resVo;
         return resVo;
     }
     }
+    /**
+     *  报价公司过滤入参统一校验
+     * @param schemeRuleFilterVo 请求参数
+     */
+    private void schemeRuleFilterValidateParam(SchemeRuleFilterVo schemeRuleFilterVo) {
+        AssertionUtils.isEmpty(schemeRuleFilterVo, "查询保司过滤规则:入参schemeRuleFilterVo不能为空");
+        AssertionUtils.isEmpty(schemeRuleFilterVo.getProductId(), "产品ID productId不能为空");
+        CarInfoVo carInfo = schemeRuleFilterVo.getCarInfo();
+        AssertionUtils.isEmpty(carInfo, "车辆信息carInfo不能为空");
+        AssertionUtils.isEmpty(carInfo.getEnergyTypeCode(), "车辆能源类型energyTypeCode不能为空");
+        AssertionUtils.isEmpty(carInfo.getCarNatureCode(), "车辆使用性质carNatureCode不能为空");
+        AssertionUtils.isEmpty(carInfo.getCarKindCode(), "车辆种类carKindCode不能为空");
+    }
+
 
 
     @Override
     @Override
     public SchemeResultVo getSchemeResult(String companyId, String productId, String seatCount,String energyType,String vehicleType,String carnature) {
     public SchemeResultVo getSchemeResult(String companyId, String productId, String seatCount,String energyType,String vehicleType,String carnature) {

+ 16 - 5
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysUserJzgInfoBankCardServiceImpl.java

@@ -13,6 +13,7 @@ import com.jzg.commons.entity.dto.SysUserJzgInfoBankCardDto;
 import com.jzg.commons.entity.po.SysUploadFiles;
 import com.jzg.commons.entity.po.SysUploadFiles;
 import com.jzg.commons.entity.po.SysUserJzgInfoBankCard;
 import com.jzg.commons.entity.po.SysUserJzgInfoBankCard;
 import com.jzg.commons.entity.po.SysUserJzgInfoBankCardRecord;
 import com.jzg.commons.entity.po.SysUserJzgInfoBankCardRecord;
+import com.jzg.commons.entity.vo.ChangeLogDetail;
 import com.jzg.commons.entity.vo.SysUserJzgInfoBankCardVo;
 import com.jzg.commons.entity.vo.SysUserJzgInfoBankCardVo;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.exception.SystemException;
 import com.jzg.commons.util.MinioUtils;
 import com.jzg.commons.util.MinioUtils;
@@ -28,10 +29,7 @@ import org.springframework.stereotype.Service;
 
 
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatter;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
+import java.util.*;
 import java.util.function.Function;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
@@ -119,7 +117,15 @@ public class SysUserJzgInfoBankCardServiceImpl extends ServiceImpl<SysUserJzgInf
             List<SysUserJzgInfoBankCardRecord> sysUserJzgInfoBankCardRecordList = sysUserJzgInfoBankCardRecordMapper
             List<SysUserJzgInfoBankCardRecord> sysUserJzgInfoBankCardRecordList = sysUserJzgInfoBankCardRecordMapper
                     .selectList(new LambdaQueryWrapper<SysUserJzgInfoBankCardRecord>()
                     .selectList(new LambdaQueryWrapper<SysUserJzgInfoBankCardRecord>()
                             .eq(SysUserJzgInfoBankCardRecord::getBankCardId, sysUserJzgInfoBankCardDto.getId()));
                             .eq(SysUserJzgInfoBankCardRecord::getBankCardId, sysUserJzgInfoBankCardDto.getId()));
-            sysUserJzgInfoBankCardDto.setSysUserJzgInfoBankCardRecordList(sysUserJzgInfoBankCardRecordList);
+            List<ChangeLogDetail> changeLogDetailList = new ArrayList<>();
+            int size = sysUserJzgInfoBankCardRecordList.size();
+            for (int i = 0; i < size; i++) {
+                SysUserJzgInfoBankCardRecord action = sysUserJzgInfoBankCardRecordList.get(i);
+                // 只有最后一条记录按实际状态设置,前面的记录默认展示为成功
+                boolean show = i < size - 1 || action.getStatus().equals("1");
+                changeLogDetailList.add(new ChangeLogDetail(action.getDescription(), action.getCreateTime(), show, action.getRemark(), action.getBankCardId(), action.getId()));
+            }
+            sysUserJzgInfoBankCardDto.setSysUserJzgInfoBankCardRecordList(changeLogDetailList);
             // 填充最新的驳回日期和驳回原因
             // 填充最新的驳回日期和驳回原因
             if(CollUtil.isNotEmpty(sysUserJzgInfoBankCardRecordList)){
             if(CollUtil.isNotEmpty(sysUserJzgInfoBankCardRecordList)){
                 // 过滤出状态=2的驳回记录,并按创建时间 倒序排列
                 // 过滤出状态=2的驳回记录,并按创建时间 倒序排列
@@ -173,6 +179,11 @@ public class SysUserJzgInfoBankCardServiceImpl extends ServiceImpl<SysUserJzgInf
 
 
     @Override
     @Override
     public boolean setDefaultCard(SysUserJzgInfoBankCardVo sysUserJzgInfoBankCardVo) {
     public boolean setDefaultCard(SysUserJzgInfoBankCardVo sysUserJzgInfoBankCardVo) {
+        SysUserJzgInfoBankCard bankCard = sysUserJzgInfoBankCardMapper.selectById(sysUserJzgInfoBankCardVo.getId());
+        if (bankCard.getAuditStatus() != 1) {
+            throw new SystemException("该银行卡未审核通过");
+        }
+
         // 1. 将该用户所有银行卡取消默认(批量更新,避免逐条 updateById 受 FieldStrategy 影响)
         // 1. 将该用户所有银行卡取消默认(批量更新,避免逐条 updateById 受 FieldStrategy 影响)
         LambdaUpdateWrapper<SysUserJzgInfoBankCard> cancelWrapper = new LambdaUpdateWrapper<>();
         LambdaUpdateWrapper<SysUserJzgInfoBankCard> cancelWrapper = new LambdaUpdateWrapper<>();
         cancelWrapper.eq(SysUserJzgInfoBankCard::getUserInfoId, sysUserJzgInfoBankCardVo.getUserId())
         cancelWrapper.eq(SysUserJzgInfoBankCard::getUserInfoId, sysUserJzgInfoBankCardVo.getUserId())

+ 12 - 0
tenant/organization/src/main/resources/mapper/PtlAgreementDispatchAfterActionMapper.xml

@@ -21,4 +21,16 @@
         </where>
         </where>
     </select>
     </select>
 
 
+    <select id="getAfterActionsByCompanyIds" resultMap="ActionMap">
+        select *
+        from ptl_agreement_dispatch_after_action
+        <where>
+            is_delete = 0
+            and company_id IN
+            <foreach collection="companyIds" item="cid" open="(" separator="," close=")">
+                #{cid}
+            </foreach>
+        </where>
+    </select>
+
 </mapper>
 </mapper>

Деякі файли не було показано, через те що забагато файлів було змінено