Browse Source

Merge remote-tracking branch 'origin/master'

lixiaolong 1 tháng trước cách đây
mục cha
commit
130bf95e3c
38 tập tin đã thay đổi với 599 bổ sung và 139 xóa
  1. 6 0
      commons/src/main/java/com/jzg/commons/entity/finance/po/InsPlyIncomeInvoiceSettlement.java
  2. 3 0
      commons/src/main/java/com/jzg/commons/entity/finance/vo/ReceivableQueryVo.java
  3. 5 0
      commons/src/main/java/com/jzg/commons/entity/finance/vo/SettlementReportQueryVo.java
  4. 65 0
      commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ExcelContent4PrivateFollow.java
  5. 15 13
      commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ExcelContent4PrivateSupervise.java
  6. 1 0
      commons/src/main/java/com/jzg/commons/entity/orders/po/InsOrdersCarInfo.java
  7. 7 0
      commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/QuoteEchoVo.java
  8. 1 1
      commons/src/main/java/com/jzg/commons/entity/scheme/vo/PtlSchemeSaveVo.java
  9. 11 2
      commons/src/main/java/com/jzg/commons/entity/vo/OrdersTrackVo.java
  10. 8 1
      commons/src/main/java/com/jzg/commons/util/OrderComponents.java
  11. 4 2
      tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/api/service/Impl/GuoRenApiRequestImpl.java
  12. 65 1
      tenant/insurance/quotation-hengbang/src/main/java/com/jzg/quotation/hengbang/crawler/service/Impl/HengBangCrawlerRequestImpl.java
  13. 21 10
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/aop/OrderOperationLogAspect.java
  14. 4 2
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java
  15. 14 34
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsFeeAuditServiceImpl.java
  16. 3 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java
  17. 14 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/orderstrack/InsOrdersTrackServiceImpl.java
  18. 52 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/userinfo/UserInfoServiceImpl.java
  19. 13 0
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/userinfo/UserInfoService.java
  20. 3 0
      tenant/insurance/quotation-summary/src/main/resources/application-dev.yaml
  21. 5 5
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/TKHttpAPIService.java
  22. 19 5
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/TKSimpleService.java
  23. 40 13
      tenant/insurance/quotation-taikang/src/main/java/com/jzg/quotation/taikang/crawler/service/impl/TKQuotationBaseServiceImpl.java
  24. 5 0
      tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/component/ZmCrawlerRequestComponent.java
  25. 26 4
      tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/entity/Request/ZmCrawlerQuotedPriceRequest.java
  26. 12 0
      tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/entity/Response/ZmCrawlerQuotedPriceResponse.java
  27. 35 9
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/component/ZiJinCrawlerRequestComponent.java
  28. 5 0
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/properties/ZiJinCrawlerProperties.java
  29. 2 13
      tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/util/RS6Item.java
  30. 16 3
      tenant/organization/src/main/java/com/jzg/organization/controller/ReceivableController.java
  31. 5 5
      tenant/organization/src/main/java/com/jzg/organization/excel/listener/InvoiceReceivbleExcel4PrivateListener.java
  32. 10 0
      tenant/organization/src/main/java/com/jzg/organization/mapper/InsPlyIncomeInvoiceSettlementMapper.java
  33. 12 1
      tenant/organization/src/main/java/com/jzg/organization/service/ReceivableService.java
  34. 53 4
      tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java
  35. 4 4
      tenant/organization/src/main/java/com/jzg/organization/service/impl/importincome/ImportIncomeServiceImpl.java
  36. 3 3
      tenant/organization/src/main/java/com/jzg/organization/service/importincome/ImportIncomeService.java
  37. 19 0
      tenant/organization/src/main/resources/mapper/InsPlyIncomeInvoiceSettlementMapper.xml
  38. 13 3
      tenant/organization/src/main/resources/mapper/ReceivableMapper.xml

+ 6 - 0
commons/src/main/java/com/jzg/commons/entity/finance/po/InsPlyIncomeInvoiceSettlement.java

@@ -40,6 +40,12 @@ public class InsPlyIncomeInvoiceSettlement extends BaseModel {
     @Schema(description = "凭证")
     @Schema(description = "凭证")
     private List<String> voucherList;
     private List<String> voucherList;
 
 
+    @Schema(description = "租户代码")
+    private String systemCode;
+
+    @Schema(description = "对接人")
+    private String contactPerson;
+
     public InsPlyIncomeInvoiceSettlement(){
     public InsPlyIncomeInvoiceSettlement(){
 
 
     }
     }

+ 3 - 0
commons/src/main/java/com/jzg/commons/entity/finance/vo/ReceivableQueryVo.java

@@ -47,6 +47,9 @@ public class ReceivableQueryVo extends PageRequest {
     @Schema(description = "保险公司")
     @Schema(description = "保险公司")
     private String companyId;
     private String companyId;
 
 
+    @Schema(description = "保险公司和保险机构列表")
+    private List<String> companyIds;
+
     @Schema(description = "签单时间开始时间")
     @Schema(description = "签单时间开始时间")
     private String signingTimeStart;
     private String signingTimeStart;
 
 

+ 5 - 0
commons/src/main/java/com/jzg/commons/entity/finance/vo/SettlementReportQueryVo.java

@@ -13,6 +13,11 @@ import java.util.List;
 
 
 @Data
 @Data
 public class SettlementReportQueryVo extends PageRequest {
 public class SettlementReportQueryVo extends PageRequest {
+
+
+    @Schema(description = "是否结算完成, 10 结算完成,20 未结算完成")
+    private String isRemained;
+
     @Schema(description = "应收项/10车险20非车险30全部")
     @Schema(description = "应收项/10车险20非车险30全部")
     private String accountsReceivable;
     private String accountsReceivable;
 
 

+ 65 - 0
commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ExcelContent4PrivateFollow.java

@@ -0,0 +1,65 @@
+package com.jzg.commons.entity.finance.vo.importimcome;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 私有跟单费
+ * @author tz
+ * @description 应收查询VO
+ * @date 2024-06-26 10:49:31
+ */
+@EqualsAndHashCode
+@Data
+@Schema(description = "财务应收表")
+public class ExcelContent4PrivateFollow implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 6263862008363938379L;
+
+    @Schema(description = "车牌号")
+    @ExcelProperty(value = "车牌号", index = 0)
+    private String licenseNo;
+
+    @Schema(description = "交强险保单号")
+    @ExcelProperty(value = "交强险保单号", index = 1)
+    private String jqPolicyNo;
+
+    @Schema(description = "商业险保单号")
+    @ExcelProperty(value = "商业险保单号", index = 2)
+    private String syPolicyNo;
+
+    @Schema(description = "非车险保单号")
+    @ExcelProperty(value = "非车险保单号", index = 3)
+    private String jyPolicyNo;
+
+//    @Schema(description = "交强险手续费比例")
+//    @ExcelProperty(value = "交强险手续费比例(%)", index = 4)
+//    private String jqSuperviseCostsProportion;
+//
+    @Schema(description = "交强险跟单费比例")
+    @ExcelProperty(value = "交强险跟单费比例(%)", index = 4)
+    private String jqOtherCostsProportion;
+
+//    @Schema(description = "商业险手续费比例")
+//    @ExcelProperty(value = "商业险手续费比例(%)", index = 5)
+//    private String sySuperviseCostsProportion;
+
+    @Schema(description = "商业险跟单费比例")
+    @ExcelProperty(value = "商业险跟单费比例(%)", index = 5)
+    private String syOtherCostsProportion;
+
+
+//    @Schema(description = "非车险手续费比例")
+//    @ExcelProperty(value = "非车险手续费比例(%)", index = 6)
+//    private String jySuperviseCostsProportion;
+    @Schema(description = "非车险跟单费比例")
+    @ExcelProperty(value = "非车险跟单费比例(%)", index = 6)
+    private String jyOtherCostsProportion;
+
+}

+ 15 - 13
commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ExcelContent4Private.java → commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ExcelContent4PrivateSupervise.java

@@ -9,14 +9,16 @@ import java.io.Serial;
 import java.io.Serializable;
 import java.io.Serializable;
 
 
 /**
 /**
+ * 私有手续费
+ *
  * @author tz
  * @author tz
  * @description 应收查询VO
  * @description 应收查询VO
- * @createDate 2024-06-26 10:49:31
+ * @date 2024-06-26 10:49:31
  */
  */
 @EqualsAndHashCode
 @EqualsAndHashCode
 @Data
 @Data
 @Schema(description = "财务应收表")
 @Schema(description = "财务应收表")
-public class ExcelContent4Private implements Serializable {
+public class ExcelContent4PrivateSupervise implements Serializable {
 
 
     @Serial
     @Serial
     private static final long serialVersionUID = 6263862008363938379L;
     private static final long serialVersionUID = 6263862008363938379L;
@@ -41,26 +43,26 @@ public class ExcelContent4Private implements Serializable {
     @ExcelProperty(value = "交强险手续费比例(%)", index = 4)
     @ExcelProperty(value = "交强险手续费比例(%)", index = 4)
     private String jqSuperviseCostsProportion;
     private String jqSuperviseCostsProportion;
 
 
-    @Schema(description = "交强险跟单费比例")
-    @ExcelProperty(value = "交强险跟单费比例(%)", index = 5)
-    private String jqOtherCostsProportion;
+//    @Schema(description = "交强险跟单费比例")
+//    @ExcelProperty(value = "交强险跟单费比例(%)", index = 5)
+//    private String jqOtherCostsProportion;
 
 
 
 
     @Schema(description = "商业险手续费比例")
     @Schema(description = "商业险手续费比例")
-    @ExcelProperty(value = "商业险手续费比例(%)", index = 6)
+    @ExcelProperty(value = "商业险手续费比例(%)", index = 5)
     private String sySuperviseCostsProportion;
     private String sySuperviseCostsProportion;
 
 
-    @Schema(description = "商业险跟单费比例")
-    @ExcelProperty(value = "商业险跟单费比例(%)", index = 7)
-    private String syOtherCostsProportion;
+//    @Schema(description = "商业险跟单费比例")
+//    @ExcelProperty(value = "商业险跟单费比例(%)", index = 7)
+//    private String syOtherCostsProportion;
 
 
 
 
     @Schema(description = "非车险手续费比例")
     @Schema(description = "非车险手续费比例")
-    @ExcelProperty(value = "非车险手续费比例(%)", index = 8)
+    @ExcelProperty(value = "非车险手续费比例(%)", index = 6)
     private String jySuperviseCostsProportion;
     private String jySuperviseCostsProportion;
 
 
-    @Schema(description = "非车险跟单费比例")
-    @ExcelProperty(value = "非车险跟单费比例(%)", index = 9)
-    private String jyOtherCostsProportion;
+//    @Schema(description = "非车险跟单费比例")
+//    @ExcelProperty(value = "非车险跟单费比例(%)", index = 9)
+//    private String jyOtherCostsProportion;
 
 
 }
 }

+ 1 - 0
commons/src/main/java/com/jzg/commons/entity/orders/po/InsOrdersCarInfo.java

@@ -119,6 +119,7 @@ public class InsOrdersCarInfo extends BaseModel {
 
 
     @Schema(description = "过户日期")
     @Schema(description = "过户日期")
     @DiffProperty(name = "过户日期")
     @DiffProperty(name = "过户日期")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime transferDate;
     private LocalDateTime transferDate;
 
 
     @Schema(description = "是否过户")
     @Schema(description = "是否过户")

+ 7 - 0
commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/QuoteEchoVo.java

@@ -297,6 +297,13 @@ public class QuoteEchoVo extends QuoteVo {
     @Schema(description = "权益可用范围")
     @Schema(description = "权益可用范围")
     private String clientType;
     private String clientType;
 
 
+    @Schema(description = "是否是疑问订单")
+    private boolean isProblem;
+    @Schema(description = "疑问订单原因")
+    private String problemReason;
+    @Schema(description = "设为疑问订单的时间")
+    private LocalDateTime problemTime;
+
     @Schema(description = "权益信息")
     @Schema(description = "权益信息")
     private InsOrderRightsInfoVo insOrderRightsInfoVo;
     private InsOrderRightsInfoVo insOrderRightsInfoVo;
 
 

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

@@ -230,7 +230,7 @@ public class PtlSchemeSaveVo {
         result.append("包含");
         result.append("包含");
         for(int i=0;i<minArray.length;i++) {
         for(int i=0;i<minArray.length;i++) {
             int finalI = i;
             int finalI = i;
-            PtlAgreementUndwrtRulesDictLabal ptlAgreementUndwrtRulesDictLabal = ptlAgreementUndwrtRulesAttr.getDictLabal().stream()
+            PtlAgreementUndwrtRulesDictLabal ptlAgreementUndwrtRulesDictLabal = ptlAgreementProductCostsAttrLink.getDictLabal().stream()
                     .filter(x -> x.getCode().equals(minArray[finalI])).findAny().get();
                     .filter(x -> x.getCode().equals(minArray[finalI])).findAny().get();
             result.append(ptlAgreementUndwrtRulesDictLabal.getName());
             result.append(ptlAgreementUndwrtRulesDictLabal.getName());
         }
         }

+ 11 - 2
commons/src/main/java/com/jzg/commons/entity/vo/OrdersTrackVo.java

@@ -1,15 +1,24 @@
 package com.jzg.commons.entity.vo;
 package com.jzg.commons.entity.vo;
 
 
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
 import com.jzg.commons.core.base.BaseModel;
 import com.jzg.commons.core.base.BaseModel;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.Data;
 
 
+import java.io.Serial;
+
 @Data
 @Data
 @Schema(description = "订单轨迹列表VO")
 @Schema(description = "订单轨迹列表VO")
 public class OrdersTrackVo extends BaseModel {
 public class OrdersTrackVo extends BaseModel {
 
 
+    @Serial
+    private static final long serialVersionUID = 2737229802683155236L;
+
+    @Schema(description = "创建人姓名")
+    private String createByName;
+
+    @Schema(description = "更新人姓名")
+    private String updateByName;
+
     @Schema(description = "轨迹ID")
     @Schema(description = "轨迹ID")
     private String id;
     private String id;
 
 

+ 8 - 1
commons/src/main/java/com/jzg/commons/util/OrderComponents.java

@@ -14,6 +14,11 @@ public class OrderComponents {
         nameMap.put("costRatio.jqInletRatio","交强入口比例");
         nameMap.put("costRatio.jqInletRatio","交强入口比例");
         nameMap.put("costRatio.jqKeepPointRatio","交强留点比例");
         nameMap.put("costRatio.jqKeepPointRatio","交强留点比例");
 
 
+
+        nameMap.put("insFeeOrders.jqExportRatio","交强出口比例");
+        nameMap.put("insFeeOrders.syExportRatio","商业出口比例");
+        nameMap.put("insFeeOrders.jyExportRatio","驾意出口比例");
+
         nameMap.put("costRatio.syExportRatio","商业出口比例");
         nameMap.put("costRatio.syExportRatio","商业出口比例");
         nameMap.put("costRatio.syFollowRatio","商业跟单比例");
         nameMap.put("costRatio.syFollowRatio","商业跟单比例");
         nameMap.put("costRatio.syInletRatio","商业入口比例");
         nameMap.put("costRatio.syInletRatio","商业入口比例");
@@ -73,7 +78,9 @@ public class OrderComponents {
         nameMap.put("insCompanyVo[0].id","保司ID");
         nameMap.put("insCompanyVo[0].id","保司ID");
         nameMap.put("order.companyName","保司名称");
         nameMap.put("order.companyName","保司名称");
         nameMap.put("order.insuranceCompanyCode","保司ID");
         nameMap.put("order.insuranceCompanyCode","保司ID");
-
+        nameMap.put("isProblem","是否是疑问订单");
+        nameMap.put("problemReason","疑问订单原因");
+        nameMap.put("problemTime","设为疑问订单的时间");
         return nameMap;
         return nameMap;
     }
     }
 
 

+ 4 - 2
tenant/insurance/quotation-guoren/src/main/java/com/jzg/quotation/guoren/api/service/Impl/GuoRenApiRequestImpl.java

@@ -350,8 +350,10 @@ public class GuoRenApiRequestImpl implements GuoRenApiRequest {
 
 
         //查询投保单信息
         //查询投保单信息
         InsOrdersPolicy insOrdersPolicy = orderBase.getInsOrdersPolicy();
         InsOrdersPolicy insOrdersPolicy = orderBase.getInsOrdersPolicy();
-        insOrdersPolicy.setJqApplyNo(guoRenApiOrder.getJqApplyNo());
-        insOrdersPolicy.setSyApplyNo(guoRenApiOrder.getSyApplyNo());
+        if (guoRenApiOrder != null) {
+            insOrdersPolicy.setJqApplyNo(guoRenApiOrder.getJqApplyNo());
+            insOrdersPolicy.setSyApplyNo(guoRenApiOrder.getSyApplyNo());
+        }
 
 
         InsOrders insOrders = orderBase.getInsOrders();
         InsOrders insOrders = orderBase.getInsOrders();
         String url = getApiUrl(orderBase.getOrder().getInsuranceCompanyId());
         String url = getApiUrl(orderBase.getOrder().getInsuranceCompanyId());

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

@@ -11,6 +11,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
 import com.jzg.commons.constants.ProductsType;
 import com.jzg.commons.constants.ProductsType;
 import com.jzg.commons.constants.dict.InsOrderStatusEnum;
 import com.jzg.commons.constants.dict.InsOrderStatusEnum;
 import com.jzg.commons.constants.quote.enums.base.InsuranceImageEnum;
 import com.jzg.commons.constants.quote.enums.base.InsuranceImageEnum;
+import com.jzg.commons.entity.orders.po.InsOrders;
 import com.jzg.commons.entity.orders.po.InsOrdersCarUserInfo;
 import com.jzg.commons.entity.orders.po.InsOrdersCarUserInfo;
 import com.jzg.commons.entity.po.SysUploadFiles;
 import com.jzg.commons.entity.po.SysUploadFiles;
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
 import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
@@ -621,8 +622,71 @@ public class HengBangCrawlerRequestImpl implements HengBangCrawlerRequest {
         HttpHeaders headers = hbCrawlerRequestComponent.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
         HttpHeaders headers = hbCrawlerRequestComponent.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
         HengBangCrawlerConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(HengBangCrawlerConfigureParameters.class, attributionInformationVo.getConfigInfo());
         HengBangCrawlerConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(HengBangCrawlerConfigureParameters.class, attributionInformationVo.getConfigInfo());
 
 
+        OrderStatusResultVo orderStatusResultVo = new OrderStatusResultVo();
         HbCrawlerOrderStateResponse orderStateResponse = hbCrawlerRequestComponent.orderState(parameters.getLicenseNo(), parameters.getAppTime(), attributionInformationVo.getUsername(), headers);
         HbCrawlerOrderStateResponse orderStateResponse = hbCrawlerRequestComponent.orderState(parameters.getLicenseNo(), parameters.getAppTime(), attributionInformationVo.getUsername(), headers);
-        return null;
+        if (orderStateResponse == null || CollUtil.isEmpty(orderStateResponse.getContent())) {
+            return orderStatusResultVo;
+        }
+
+        // 获取订单信息
+        HbCrawlerOrder hbCrawlerOrder = hbCrawlerOrderService.findByOrdersNo(orderStatusVo.getOrder().getOrdersNo());
+        InsOrders insOrders = orderStatusVo.getInsOrders();
+
+        // 匹配交强和商业投保单的记录(按投保单号一一对应)
+        HbCrawlerOrderStateResponse.ContentDTO ciContent = orderStateResponse.getContent().stream()
+                .filter(item -> hbCrawlerOrder != null && StringUtils.hasLength(hbCrawlerOrder.getCiProposalNo()) && hbCrawlerOrder.getCiProposalNo().equals(item.getPROPOSALNO()))
+                .findFirst().orElse(null);
+        HbCrawlerOrderStateResponse.ContentDTO biContent = orderStateResponse.getContent().stream()
+                .filter(item -> hbCrawlerOrder != null && StringUtils.hasLength(hbCrawlerOrder.getBiProposalNo()) && hbCrawlerOrder.getBiProposalNo().equals(item.getPROPOSALNO()))
+                .findFirst().orElse(null);
+
+        // 获取交强和商业的保单号
+        String ciPolicyNo = ciContent != null ? ciContent.getPOLICYNO() : null;
+        String biPolicyNo = biContent != null ? biContent.getPOLICYNO() : null;
+        boolean ciHasPolicy = StringUtils.hasLength(ciPolicyNo);
+        boolean biHasPolicy = StringUtils.hasLength(biPolicyNo);
+
+        // 核保是否通过(待提核:-1;审核通过:1,3,5;下发修改:2;拒保:4;承保确认:6;初始状态:0)
+        boolean ciAuditPassed = ciContent != null && isAuditPassed(ciContent.getUNDERWRITESTATUS());
+        boolean biAuditPassed = biContent != null && isAuditPassed(biContent.getUNDERWRITESTATUS());
+
+        // 待核保状态 → 核保通过 → 待缴费(与API版逻辑保持一致)
+        if (insOrders != null && InsOrderStatusEnum.WAIT_AUDIT.getCode().equals(insOrders.getOrderStatus())) {
+            // 单交 / 单商 / 交商 任一核保通过即转为待缴费
+            boolean jqBoo = ciContent != null && biContent == null && ciAuditPassed;
+            boolean syBoo = biContent != null && ciContent == null && biAuditPassed;
+            boolean jqSyBoo = ciContent != null && biContent != null && ciAuditPassed && biAuditPassed;
+            if (jqBoo || syBoo || jqSyBoo) {
+                orderStatusResultVo.setOrderStatus(InsOrderStatusEnum.PAY_PENDING);
+                PaymentLinkVo paymentLinkVo = new PaymentLinkVo();
+                paymentLinkVo.setOrder(orderStatusVo.getOrder());
+                PaymentLinkResultsVo paymentLinkResultsVo = getPaymentLink(paymentLinkVo);
+                orderStatusResultVo.setPaymentLink(paymentLinkResultsVo.getPaymentLink());
+            }
+        }
+
+        // 保单号存在 → 已承保/已出单
+        if (ciHasPolicy || biHasPolicy) {
+            if (ciHasPolicy) {
+                orderStatusResultVo.setJqPolicyno(ciPolicyNo);
+                orderStatusResultVo.setJqApplyNo(hbCrawlerOrder.getCiProposalNo());
+            }
+            if (biHasPolicy) {
+                orderStatusResultVo.setSyPolicyno(biPolicyNo);
+                orderStatusResultVo.setSyApplyNo(hbCrawlerOrder.getBiProposalNo());
+            }
+            orderStatusResultVo.setOrderStatus(InsOrderStatusEnum.UNDERWRITED);
+        }
+
+        return orderStatusResultVo;
+    }
+
+    /**
+     * 核保是否通过
+     * 恒邦状态:待提核-1;审核通过1,3,5;下发修改2;拒保4;承保确认6;初始状态0
+     */
+    private boolean isAuditPassed(String underWriteStatus) {
+        return "1".equals(underWriteStatus) || "3".equals(underWriteStatus) || "5".equals(underWriteStatus);
     }
     }
 
 
 
 

+ 21 - 10
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/aop/OrderOperationLogAspect.java

@@ -86,6 +86,9 @@ public class OrderOperationLogAspect {
         Object result = null;
         Object result = null;
         // 创建 JSONConfig 并设置日期格式, 会把LocalDate 和LocalDateTime 都转换为 包含时分秒的格式(后续有了更好的办法再优化)
         // 创建 JSONConfig 并设置日期格式, 会把LocalDate 和LocalDateTime 都转换为 包含时分秒的格式(后续有了更好的办法再优化)
         JSONConfig jsonConfig = JSONConfig.create().setDateFormat("yyyy-MM-dd HH:mm:ss");
         JSONConfig jsonConfig = JSONConfig.create().setDateFormat("yyyy-MM-dd HH:mm:ss");
+        QuoteEchoVo detailVoOld;
+        QuoteEchoVo detailVoNew;
+        Map<String, List<String>> diffMap;
         switch (log.optType().getCode()){
         switch (log.optType().getCode()){
             // 创建订单
             // 创建订单
             case 0:
             case 0:
@@ -169,18 +172,21 @@ public class OrderOperationLogAspect {
             case 15:
             case 15:
                 logger.info("费用调整log.orderSpEl()=[{}]",log.orderSpEl());
                 logger.info("费用调整log.orderSpEl()=[{}]",log.orderSpEl());
                 PtlAgreementCostRatioVo vo = parser.parseExpression(log.orderSpEl()).getValue(context, PtlAgreementCostRatioVo.class);
                 PtlAgreementCostRatioVo vo = parser.parseExpression(log.orderSpEl()).getValue(context, PtlAgreementCostRatioVo.class);
-                QuoteEchoVo detailVoOld = insFeeAuditService.auditInfo(vo.getOrderNo());
+                detailVoOld = insFeeAuditService.auditInfo(vo.getOrderNo());
                 result = joinPoint.proceed();
                 result = joinPoint.proceed();
-                QuoteEchoVo detailVoNew = insFeeAuditService.auditInfo(vo.getOrderNo());
-                Map<String, List<String>> diffMap = JsonDiffUtil.compareJson(JSONUtil.toJsonStr(detailVoOld,jsonConfig), JSONUtil.toJsonStr(detailVoNew,jsonConfig), new HashSet<>());
+                detailVoNew = insFeeAuditService.auditInfo(vo.getOrderNo());
+                diffMap = JsonDiffUtil.compareJson(JSONUtil.toJsonStr(detailVoOld,jsonConfig), JSONUtil.toJsonStr(detailVoNew,jsonConfig), new HashSet<>());
                 this.saveCostInfo(result,log, vo,diffMap);
                 this.saveCostInfo(result,log, vo,diffMap);
                 break;
                 break;
             // 设为疑问订单
             // 设为疑问订单
             case 17:
             case 17:
                 logger.info("设置为疑问订单.log.orderSpEl()=[{}]",log.orderSpEl());
                 logger.info("设置为疑问订单.log.orderSpEl()=[{}]",log.orderSpEl());
                 QuestionOrder questionOrder = parser.parseExpression(log.orderSpEl()).getValue(context, QuestionOrder.class);
                 QuestionOrder questionOrder = parser.parseExpression(log.orderSpEl()).getValue(context, QuestionOrder.class);
+                detailVoOld = insFeeAuditService.auditInfo(questionOrder.getOrderNo());
                 result = joinPoint.proceed();
                 result = joinPoint.proceed();
-                this.updateToQuestionOrder(result,log, questionOrder);
+                detailVoNew = insFeeAuditService.auditInfo(questionOrder.getOrderNo());
+                diffMap = JsonDiffUtil.compareJson(JSONUtil.toJsonStr(detailVoOld,jsonConfig), JSONUtil.toJsonStr(detailVoNew,jsonConfig), new HashSet<>());
+                this.updateToQuestionOrder(result,log, questionOrder,diffMap);
                 break;
                 break;
         }
         }
         return result;
         return result;
@@ -192,14 +198,14 @@ public class OrderOperationLogAspect {
      * @author lipf
      * @author lipf
      * @date 2026/7/16 16:35
      * @date 2026/7/16 16:35
      */
      */
-    private void updateToQuestionOrder(Object result, OrderOperationLog log, QuestionOrder questionOrder) {
+    private void updateToQuestionOrder(Object result, OrderOperationLog log, QuestionOrder questionOrder,Map<String, List<String>> diffMap) {
         logger.info("设置为疑问订单。questionOrder=[{}]", JSONUtil.toJsonStr(questionOrder));
         logger.info("设置为疑问订单。questionOrder=[{}]", JSONUtil.toJsonStr(questionOrder));
         InsOrdersTrack track = new InsOrdersTrack();
         InsOrdersTrack track = new InsOrdersTrack();
         track.setModule(log.module());
         track.setModule(log.module());
         track.setSubModule(log.subModule());
         track.setSubModule(log.subModule());
         track.setOptType(log.optType().getCode());
         track.setOptType(log.optType().getCode());
         track.setOptContent(log.description());
         track.setOptContent(log.description());
-        track.setChangeAfter(JSONUtil.toJsonStr(questionOrder));
+        //track.setChangeAfter(JSONUtil.toJsonStr(questionOrder));
         track.setResult(JSONUtil.toJsonStr(result));
         track.setResult(JSONUtil.toJsonStr(result));
         InsOrders insOrders = orderService.getById(questionOrder.getOrderNo());
         InsOrders insOrders = orderService.getById(questionOrder.getOrderNo());
         if(insOrders != null){
         if(insOrders != null){
@@ -212,6 +218,7 @@ public class OrderOperationLogAspect {
         }
         }
         track.setStatus(1);
         track.setStatus(1);
         track.setOrderNo(questionOrder.getOrderNo());
         track.setOrderNo(questionOrder.getOrderNo());
+        this.fillBeforeAndAfter(diffMap, track);
         traceService.save(track);
         traceService.save(track);
 
 
     }
     }
@@ -276,6 +283,13 @@ public class OrderOperationLogAspect {
             track.setResult("要进行费用调整的订单不存在");
             track.setResult("要进行费用调整的订单不存在");
         }
         }
         track.setStatus(1);
         track.setStatus(1);
+        this.fillBeforeAndAfter(diffMap, track);
+        track.setOrderNo(orderNo);
+        track.setResult(JSONUtil.toJsonStr(result));
+        traceService.save(track);
+    }
+
+    private void fillBeforeAndAfter(Map<String, List<String>> diffMap, InsOrdersTrack track) {
         if(CollUtil.isNotEmpty(diffMap)){
         if(CollUtil.isNotEmpty(diffMap)){
             List<String> oldItems = new ArrayList<>();
             List<String> oldItems = new ArrayList<>();
             List<String> newItems = new ArrayList<>();
             List<String> newItems = new ArrayList<>();
@@ -292,11 +306,8 @@ public class OrderOperationLogAspect {
             track.setChangeBefore(String.join("\n", oldItems));
             track.setChangeBefore(String.join("\n", oldItems));
             track.setChangeAfter(String.join("\n", newItems));
             track.setChangeAfter(String.join("\n", newItems));
         }
         }
-
-        track.setOrderNo(orderNo);
-        track.setResult(JSONUtil.toJsonStr(result));
-        traceService.save(track);
     }
     }
+
     /**
     /**
      * 订单审核(通过/驳回)
      * 订单审核(通过/驳回)
      *
      *

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

@@ -968,11 +968,13 @@ public class UnifyOrderManager {
         orderStatusVo.setInsOrdersAccidentalDriving(insOrdersAccidentalDriving);
         orderStatusVo.setInsOrdersAccidentalDriving(insOrdersAccidentalDriving);
         OrderStatusResultVo orderStatusResultVo = orderStatusService.queryOrderState(orderStatusVo);
         OrderStatusResultVo orderStatusResultVo = orderStatusService.queryOrderState(orderStatusVo);
         log.info("订单状态orderStatusResultVo=[{}]", JSONUtil.toJsonStr(orderStatusResultVo));
         log.info("订单状态orderStatusResultVo=[{}]", JSONUtil.toJsonStr(orderStatusResultVo));
-
+        if (orderStatusResultVo == null) {
+            return HttpResult.ok("订单状态已更新");
+        }
         // 保存状态查询结果
         // 保存状态查询结果
         insOrdersService.orderAfterUpdateOrderStatus(orderStatusVo.getOrder().getOrdersNo(), orderStatusResultVo);
         insOrdersService.orderAfterUpdateOrderStatus(orderStatusVo.getOrder().getOrdersNo(), orderStatusResultVo);
         // 保存支付链接
         // 保存支付链接
-        insOrders.setPayLink(!TextUtils.isEmpty(orderStatusResultVo.getPaymentLink()) ? orderStatusResultVo.getPaymentLink() : insOrders.getPayLink());
+        insOrders.setPayLink((orderStatusResultVo != null && !TextUtils.isEmpty(orderStatusResultVo.getPaymentLink())) ? orderStatusResultVo.getPaymentLink() : insOrders.getPayLink());
         insOrdersQrcodeService.updateQrCode(insOrders);
         insOrdersQrcodeService.updateQrCode(insOrders);
         //////////////////////////////////////////新增营销抽奖活动////////////////////////////////////////////////
         //////////////////////////////////////////新增营销抽奖活动////////////////////////////////////////////////
         // 承保(客户)、出单(业务员)
         // 承保(客户)、出单(业务员)

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

@@ -49,6 +49,7 @@ import com.jzg.quotation.summary.mapper.InsFeeAuditMapper;
 import com.jzg.quotation.summary.mapper.InsOrderRightsMapper;
 import com.jzg.quotation.summary.mapper.InsOrderRightsMapper;
 import com.jzg.quotation.summary.mapper.InsOrderRightsPackageMapper;
 import com.jzg.quotation.summary.mapper.InsOrderRightsPackageMapper;
 import com.jzg.quotation.summary.service.*;
 import com.jzg.quotation.summary.service.*;
+import com.jzg.quotation.summary.service.userinfo.UserInfoService;
 import com.jzg.quotation.summary.state.AuditState;
 import com.jzg.quotation.summary.state.AuditState;
 import com.jzg.quotation.summary.state.listener.AuditStateListener;
 import com.jzg.quotation.summary.state.listener.AuditStateListener;
 import io.seata.spring.annotation.GlobalTransactional;
 import io.seata.spring.annotation.GlobalTransactional;
@@ -121,6 +122,8 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
 
 
     @Autowired
     @Autowired
     InsOrdersCarInfoService insOrdersCarInfoService;
     InsOrdersCarInfoService insOrdersCarInfoService;
+    @Autowired
+    private UserInfoService userInfoService;
 
 
     @Autowired
     @Autowired
     private AuditStateListener auditStateListener;
     private AuditStateListener auditStateListener;
@@ -177,8 +180,8 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
 //            feeAuditVo.setPartnerCompanySimplyName(allCompanyHierarchyPaths.get(Objects.toString(feeAuditVo.getPartnerCompanyId(),"")));
 //            feeAuditVo.setPartnerCompanySimplyName(allCompanyHierarchyPaths.get(Objects.toString(feeAuditVo.getPartnerCompanyId(),"")));
             feeAuditVo.setPartnerCompanySimplyName(feeAuditVo.getPartnerCompanyName());
             feeAuditVo.setPartnerCompanySimplyName(feeAuditVo.getPartnerCompanyName());
             // auditUser 非空时,判断是名称还是手机号
             // auditUser 非空时,判断是名称还是手机号
-            feeAuditVo.setAuditUser(getUserNameByMobile(feeAuditVo.getAuditUser()));
-            feeAuditVo.setCreateBy(getUserNameByMobile(feeAuditVo.getCreateBy()));
+            feeAuditVo.setAuditUser(userInfoService.getUserNameByMobile(feeAuditVo.getAuditUser()));
+            feeAuditVo.setCreateBy(userInfoService.getUserNameByMobile(feeAuditVo.getCreateBy()));
 
 
             // 循环每条数据,查询 ins_fee_orders 并计算权益金额
             // 循环每条数据,查询 ins_fee_orders 并计算权益金额
             // 查询订单的 ins_fee_orders 数据
             // 查询订单的 ins_fee_orders 数据
@@ -287,6 +290,15 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         log.debug("查看订单审核详情:orderNo=[{}], detailVo=[{}]",orderNo, JSONUtil.toJsonStr(detailVo));
         log.debug("查看订单审核详情:orderNo=[{}], detailVo=[{}]",orderNo, JSONUtil.toJsonStr(detailVo));
         InsFeeAudit audit = this.getById(orderNo);
         InsFeeAudit audit = this.getById(orderNo);
         detailVo.setAuditStatus(audit.getAuditStatus());
         detailVo.setAuditStatus(audit.getAuditStatus());
+        if(audit.getIsProblem() != null){
+            if(1 ==audit.getIsProblem()){
+                detailVo.setProblem(true);
+            }else if(0 ==audit.getIsProblem()){
+                detailVo.setProblem(false);
+            }
+        }
+        detailVo.setProblemTime(audit.getProblemTime());
+        detailVo.setProblemReason(audit.getProblemReason());
         return detailVo;
         return detailVo;
     }
     }
 
 
@@ -1220,36 +1232,4 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         return res.getRecords();
         return res.getRecords();
     }
     }
 
 
-
-    /**
-     * 根据用户手机号查询名称
-     * @param mobile
-     * @return
-     */
-    private String getUserNameByMobile(String mobile) {
-        if (StringUtils.isNotBlank(mobile)) {
-            // 国内手机号正则:1开头,第二位3-9,共11位数字
-            String mobileRegex = "^1[3-9]\\d{9}$";
-            if (ReUtil.contains(mobileRegex, mobile)) {
-                // auditUser 是手机号:先从 sys_user 表根据 mobile 查询数据
-                HttpResult<SysUser> sysUserResult = orgClient.getUserOnlyIdByMobile(mobile);
-                if (sysUserResult != null && sysUserResult.isSuccess() && sysUserResult.getData() != null) {
-                    SysUser sysUser = sysUserResult.getData();
-                    String userName = sysUser.getUsername();
-                    // 如果 sys_user 的 username 字段是手机号,则再去 sys_user_jzg_info 根据 user_id 查询数据,展示 name
-                    if (StringUtils.isNotBlank(userName) && userName.matches(mobileRegex)) {
-                        HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfo(sysUser.getId());
-                        if (jzgInfoResult != null && jzgInfoResult.isSuccess() && jzgInfoResult.getData() != null
-                                && StringUtils.isNotBlank(jzgInfoResult.getData().getName())) {
-                            return jzgInfoResult.getData().getName();
-                        }
-                    } else if (StringUtils.isNotBlank(userName)) {
-                        // 如果 sys_user 的 username 是名称,则直接展示
-                        return userName;
-                    }
-                }
-            }
-        }
-        return StrUtil.EMPTY;
-    }
 }
 }

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

@@ -1240,6 +1240,9 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
 
 
     @Override
     @Override
     public void orderAfterUpdateOrderStatus(String orderNo, OrderStatusResultVo orderStatusResultVo) {
     public void orderAfterUpdateOrderStatus(String orderNo, OrderStatusResultVo orderStatusResultVo) {
+        if (orderStatusResultVo == null) {
+            return;
+        }
         // 检测主订单是否存在
         // 检测主订单是否存在
         String systemCode = baseController.getSystemCode();
         String systemCode = baseController.getSystemCode();
         InsOrders insOrders = insOrdersMapper.selectOne(new LambdaQueryWrapper<InsOrders>().eq(InsOrders::getId, orderNo));
         InsOrders insOrders = insOrdersMapper.selectOne(new LambdaQueryWrapper<InsOrders>().eq(InsOrders::getId, orderNo));

+ 14 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersTrackServiceImpl.java → tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/orderstrack/InsOrdersTrackServiceImpl.java

@@ -1,4 +1,4 @@
-package com.jzg.quotation.summary.service.impl;
+package com.jzg.quotation.summary.service.impl.orderstrack;
 
 
 
 
 import cn.hutool.json.JSONUtil;
 import cn.hutool.json.JSONUtil;
@@ -8,8 +8,10 @@ import com.jzg.commons.entity.orders.po.InsOrdersTrack;
 import com.jzg.commons.entity.vo.OrdersTrackVo;
 import com.jzg.commons.entity.vo.OrdersTrackVo;
 import com.jzg.quotation.summary.mapper.InsOrdersTrackMapper;
 import com.jzg.quotation.summary.mapper.InsOrdersTrackMapper;
 import com.jzg.quotation.summary.service.InsOrdersTrackService;
 import com.jzg.quotation.summary.service.InsOrdersTrackService;
+import com.jzg.quotation.summary.service.userinfo.UserInfoService;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import java.util.List;
 import java.util.List;
@@ -25,10 +27,21 @@ public class InsOrdersTrackServiceImpl extends ServiceImpl<InsOrdersTrackMapper,
 
 
     private static final Logger log = LoggerFactory.getLogger(InsOrdersTrackServiceImpl.class);
     private static final Logger log = LoggerFactory.getLogger(InsOrdersTrackServiceImpl.class);
 
 
+    @Autowired
+    private UserInfoService userInfoService;
+
     @Override
     @Override
     public List<OrdersTrackVo> list(OrdersTrackParam param) {
     public List<OrdersTrackVo> list(OrdersTrackParam param) {
         log.info("查询订单轨迹:param=[{}]", JSONUtil.toJsonStr(param));
         log.info("查询订单轨迹:param=[{}]", JSONUtil.toJsonStr(param));
         List<OrdersTrackVo> ordersTrackVos = baseMapper.queryList(param);
         List<OrdersTrackVo> ordersTrackVos = baseMapper.queryList(param);
+        for (OrdersTrackVo ordersTrackVo : ordersTrackVos) {
+            String createBy = ordersTrackVo.getCreateBy();
+            String updateBy =  ordersTrackVo.getUpdateBy();
+            String createByName = userInfoService.getUserNameByMobile(createBy);
+            String updateByName = userInfoService.getUserNameByMobile(updateBy);
+            ordersTrackVo.setCreateByName(createByName);
+            ordersTrackVo.setUpdateByName(updateByName);
+        }
         return ordersTrackVos;
         return ordersTrackVos;
     }
     }
 }
 }

+ 52 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/userinfo/UserInfoServiceImpl.java

@@ -0,0 +1,52 @@
+package com.jzg.quotation.summary.service.impl.userinfo;
+
+import cn.hutool.core.util.ReUtil;
+import cn.hutool.core.util.StrUtil;
+import com.jzg.commons.core.page.HttpResult;
+import com.jzg.commons.entity.po.SysUser;
+import com.jzg.commons.entity.po.SysUserJzgInfo;
+import com.jzg.commons.util.StringUtils;
+import com.jzg.quotation.commons.client.OrgClient;
+import com.jzg.quotation.summary.service.userinfo.UserInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class UserInfoServiceImpl implements UserInfoService {
+
+
+    @Autowired
+    private OrgClient orgClient;
+
+    /**
+     * 根据用户手机号查询名称
+     * @param mobile
+     * @return
+     */
+    public String getUserNameByMobile(String mobile) {
+        if (StringUtils.isNotBlank(mobile)) {
+            // 国内手机号正则:1开头,第二位3-9,共11位数字
+            String mobileRegex = "^1[3-9]\\d{9}$";
+            if (ReUtil.contains(mobileRegex, mobile)) {
+                // auditUser 是手机号:先从 sys_user 表根据 mobile 查询数据
+                HttpResult<SysUser> sysUserResult = orgClient.getUserOnlyIdByMobile(mobile);
+                if (sysUserResult != null && sysUserResult.isSuccess() && sysUserResult.getData() != null) {
+                    SysUser sysUser = sysUserResult.getData();
+                    String userName = sysUser.getUsername();
+                    // 如果 sys_user 的 username 字段是手机号,则再去 sys_user_jzg_info 根据 user_id 查询数据,展示 name
+                    if (StringUtils.isNotBlank(userName) && userName.matches(mobileRegex)) {
+                        HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfo(sysUser.getId());
+                        if (jzgInfoResult != null && jzgInfoResult.isSuccess() && jzgInfoResult.getData() != null
+                                && StringUtils.isNotBlank(jzgInfoResult.getData().getName())) {
+                            return jzgInfoResult.getData().getName();
+                        }
+                    } else if (StringUtils.isNotBlank(userName)) {
+                        // 如果 sys_user 的 username 是名称,则直接展示
+                        return userName;
+                    }
+                }
+            }
+        }
+        return StrUtil.EMPTY;
+    }
+}

+ 13 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/userinfo/UserInfoService.java

@@ -0,0 +1,13 @@
+package com.jzg.quotation.summary.service.userinfo;
+
+public interface UserInfoService {
+
+
+    /**
+     * 根据用户手机号查询名称
+     *
+     * @param mobile
+     * @return
+     */
+     String getUserNameByMobile(String mobile);
+}

+ 3 - 0
tenant/insurance/quotation-summary/src/main/resources/application-dev.yaml

@@ -225,6 +225,9 @@ zijin:
     # 对接三方渠道验车链接接口
     # 对接三方渠道验车链接接口
     sendCheckCarLink: http://open.zking.com/api/v1/open/open-aggregate/auth/wanJiaYun/sendCheckCarLink
     sendCheckCarLink: http://open.zking.com/api/v1/open/open-aggregate/auth/wanJiaYun/sendCheckCarLink
 
 
+  crawler:
+    baseUrl: https://kscd.zking.com
+    cookie-path: https://test.baoxianzhanggui.com/ck-api/ck
 
 
 #    # 为接入方提供获取token服务
 #    # 为接入方提供获取token服务
 #    accessTokenUrl: https://open.zking.com/api/v1/public/token/getAccessToken
 #    accessTokenUrl: https://open.zking.com/api/v1/public/token/getAccessToken

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

@@ -938,7 +938,7 @@ public class TKHttpAPIService {
      *
      *
      * @return
      * @return
      */
      */
-    public TKEntranceFor000038Result entranceFor000038(String token, String tplatformId, String fromId, String orderId) {
+    public TKEntranceFor000038Result.Response entranceFor000038(String token, String tplatformId, String fromId, String orderId) {
         TKEntranceFor000038Param param = new TKEntranceFor000038Param();
         TKEntranceFor000038Param param = new TKEntranceFor000038Param();
         param.setChannelCode("OffWeb");
         param.setChannelCode("OffWeb");
         param.setTplatformId(tplatformId);
         param.setTplatformId(tplatformId);
@@ -952,12 +952,12 @@ public class TKHttpAPIService {
         param.setChannelEngages(new ArrayList<>());
         param.setChannelEngages(new ArrayList<>());
 
 
         TKEntranceFor000038Result.Response response = entranceForDecrypt(token, param, "000038", TKEntranceFor000038Result.Response.class);
         TKEntranceFor000038Result.Response response = entranceForDecrypt(token, param, "000038", TKEntranceFor000038Result.Response.class);
-        if (response.getStatus() != 1) {
-            throw new SystemException(response.getMessage());
-        }
+        // if (response.getStatus() != 1) {
+        //     throw new SystemException(response.getMessage());
+        // }
 
 
         checkResponseUnknownField(response);
         checkResponseUnknownField(response);
-        return response.getData();
+        return response;
     }
     }
 
 
 
 

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

@@ -1,5 +1,6 @@
 package com.jzg.quotation.taikang.crawler.service;
 package com.jzg.quotation.taikang.crawler.service;
 
 
+import com.alibaba.fastjson.JSONObject;
 import com.jzg.commons.entity.orders.po.InsOrdersCarUserInfo;
 import com.jzg.commons.entity.orders.po.InsOrdersCarUserInfo;
 import com.jzg.commons.entity.quote.vo.*;
 import com.jzg.commons.entity.quote.vo.*;
 
 
@@ -1184,24 +1185,37 @@ public class TKSimpleService {
      * @param insureInfo
      * @param insureInfo
      * @return
      * @return
      */
      */
-    public TKEntranceFor000038Result orderSubmit(TKLoginSession session, String mainOrderId, TKInsureInfo insureInfo) {
+    public TKEntranceFor000038Result.Response orderSubmit(TKLoginSession session, String mainOrderId, TKInsureInfo insureInfo) {
+        // 方法入口日志:打印订单号便于追踪整个核保提交流程
+        log.info("orderSubmit 开始执行,mainOrderId={}", mainOrderId);
+
+        // 从会话中提取调用保司接口所需的全局固定参数
         String tplatformId = session.getTplatformId();
         String tplatformId = session.getTplatformId();
         String tplatLoginKey = session.getTplatLoginKey();
         String tplatLoginKey = session.getTplatLoginKey();
         String fromId = session.getFromid();
         String fromId = session.getFromid();
         String token = session.getToken();
         String token = session.getToken();
+        log.info("orderSubmit 会话参数已就绪,mainOrderId={}, tplatformId={}, fromId={}", mainOrderId, tplatformId, fromId);
 
 
+        // 步骤1:调用 entranceFor000012(核保前置接口)
+        log.info("orderSubmit 开始调用 entranceFor000012,mainOrderId={}", mainOrderId);
         httpService.entranceFor000012(token, tplatformId, fromId, mainOrderId, insureInfo);
         httpService.entranceFor000012(token, tplatformId, fromId, mainOrderId, insureInfo);
+        log.info("orderSubmit entranceFor000012 调用完成,mainOrderId={}", mainOrderId);
 
 
+        // 步骤2:调用 preciseInitToVipQuote(核保报价接口),返回核保报价结果
+        log.info("orderSubmit 开始调用 preciseInitToVipQuote(核保),mainOrderId={}", mainOrderId);
         PreciseInitResult preciseQuoteResult = httpService.preciseInitToVipQuote(token, tplatformId, tplatLoginKey, mainOrderId, insureInfo);
         PreciseInitResult preciseQuoteResult = httpService.preciseInitToVipQuote(token, tplatformId, tplatLoginKey, mainOrderId, insureInfo);
+        log.info("orderSubmit preciseInitToVipQuote(核保)调用完成,preciseQuoteResult={}", JSONObject.toJSONString(preciseQuoteResult));
         if (preciseQuoteResult == null) {
         if (preciseQuoteResult == null) {
             throw new RuntimeException("HttpService#preciseInitToQuote (核保)失败!");
             throw new RuntimeException("HttpService#preciseInitToQuote (核保)失败!");
         }
         }
-        TKEntranceFor000038Result tkEntranceFor000038Result = httpService.entranceFor000038(token, tplatformId, fromId, mainOrderId);
-        // 为获取支付链接预处理 TODO
-        TKEntranceFor000021Result tkEntranceFor000021Result = httpService.entranceFor000021(token, fromId, mainOrderId);
 
 
-        TKEntranceFor000052Result tkEntranceFor000052Result = httpService.entranceFor000052(token, tkEntranceFor000038Result);
+        // 步骤3:调用 entranceFor000038,获取核保结果
+        log.info("orderSubmit 开始调用 entranceFor000038,mainOrderId={}", mainOrderId);
+        TKEntranceFor000038Result.Response tkEntranceFor000038Result = httpService.entranceFor000038(token, tplatformId, fromId, mainOrderId);
+        log.info("orderSubmit entranceFor000038 调用完成,tkEntranceFor000038Result={}", JSONObject.toJSONString(tkEntranceFor000038Result));
 
 
+        // 方法出口日志:标记整个流程执行结束
+        log.info("orderSubmit 执行完成,mainOrderId={}", mainOrderId);
         return tkEntranceFor000038Result;
         return tkEntranceFor000038Result;
     }
     }
 
 

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

@@ -43,6 +43,7 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
+import java.util.Objects;
 
 
 @QuoteCrawlerService(value = InsuranceCode.INSURANCE_TKIC)
 @QuoteCrawlerService(value = InsuranceCode.INSURANCE_TKIC)
 @RequiredArgsConstructor
 @RequiredArgsConstructor
@@ -174,6 +175,7 @@ public class TKQuotationBaseServiceImpl implements TKQuotationBaseService {
 
 
     @Override
     @Override
     public UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) {
     public UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) {
+        log.info("泰康开始处理核保流程,参数:{}", JSONObject.toJSONString(underwritingVo));
         AttributionInformationVo attributionInformationVo = underwritingVo.getOrder().getAttributionInformationVo();
         AttributionInformationVo attributionInformationVo = underwritingVo.getOrder().getAttributionInformationVo();
         TKLoginSession session = loginSession(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
         TKLoginSession session = loginSession(attributionInformationVo.getUsername(), attributionInformationVo.getPassword());
         PreciseInitResult preciseInitResult = redisCacheUtil.getPreciseInitResult(underwritingVo.getOrder().getOrdersNo());
         PreciseInitResult preciseInitResult = redisCacheUtil.getPreciseInitResult(underwritingVo.getOrder().getOrdersNo());
@@ -186,16 +188,45 @@ public class TKQuotationBaseServiceImpl implements TKQuotationBaseService {
         TKInsureInfo insureInfo = tkSimpleService.dataCreateInsureInfo(initProposalResult, insOrdersCarUserInfo);
         TKInsureInfo insureInfo = tkSimpleService.dataCreateInsureInfo(initProposalResult, insOrdersCarUserInfo);
         log.info("车主信息:{}", new Gson().toJson(insureInfo));
         log.info("车主信息:{}", new Gson().toJson(insureInfo));
         // # 车险投保单报价下单
         // # 车险投保单报价下单
-        TKEntranceFor000038Result tkEntranceFor000038Result = tkSimpleService.orderSubmit(session, preciseInitResult.getMainOrderId(), insureInfo);
+        TKEntranceFor000038Result.Response tkEntranceFor000038Result = tkSimpleService.orderSubmit(session, preciseInitResult.getMainOrderId(), insureInfo);
         UnderwritingResultsVo underwritingResultsVo = new UnderwritingResultsVo();
         UnderwritingResultsVo underwritingResultsVo = new UnderwritingResultsVo();
-        if (tkEntranceFor000038Result == null) {
-            underwritingResultsVo.setUnderwritingResult("核保失败");
+        if (tkEntranceFor000038Result == null || tkEntranceFor000038Result.getStatus() == 0) {
+            underwritingResultsVo.setUnderwritingResult("核保失败: " + Objects.requireNonNull(tkEntranceFor000038Result).getMessage());
             underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.AUDIT_FAIL);
             underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.AUDIT_FAIL);
             tkCrawlerOrderService.save(underwritingVo, underwritingResultsVo, preciseInitResult.getMainOrderId(), false);
             tkCrawlerOrderService.save(underwritingVo, underwritingResultsVo, preciseInitResult.getMainOrderId(), false);
             return underwritingResultsVo;
             return underwritingResultsVo;
         }
         }
-        // 核保通过
-        TKOrderData tkOrderData = tkEntranceFor000038Result.getData();
+
+        // 调用 entranceFor000021,为获取支付链接做预处理 TODO
+        log.info("orderSubmit 开始调用 entranceFor000021(支付链接预处理),mainOrderId={}", preciseInitResult.getMainOrderId());
+        TKEntranceFor000021Result tkEntranceFor000021Result = httpService.entranceFor000021(session.getToken(), session.getFromid(), preciseInitResult.getMainOrderId());
+        log.info("orderSubmit entranceFor000021 调用完成,tkEntranceFor000021Result={}", JSONObject.toJSONString(tkEntranceFor000021Result));
+
+        // 调用 entranceFor000052,基于核保结果做后续处理
+        log.info("orderSubmit 开始调用 entranceFor000052,mainOrderId={}", preciseInitResult.getMainOrderId());
+        TKEntranceFor000052Result tkEntranceFor000052Result = httpService.entranceFor000052(session.getToken(), tkEntranceFor000038Result.getData());
+        log.info("orderSubmit entranceFor000052 调用完成,tkEntranceFor000052Result={}", JSONObject.toJSONString(tkEntranceFor000052Result));
+
+        // 获取核保返回数据
+        TKOrderData tkOrderData = tkEntranceFor000038Result.getData().getData();
+
+        // 检查 resultType 判断核保是否自核通过(与Python逻辑一致)
+        String resultType = tkOrderData.getResultType();
+        if (!"自核通过".equals(resultType)) {
+            // 非自核通过,判定为人工核保或其他状态
+            String spResMsg = tkOrderData.getSpResMsg();
+            String checkReason = tkEntranceFor000038Result.getData().getCheckReason() != null
+                    ? tkEntranceFor000038Result.getData().getCheckReason().toString()
+                    : "";
+            String msg = (spResMsg != null && !spResMsg.isEmpty()) ? spResMsg : ("请联系运维人员处理" + checkReason);
+            underwritingResultsVo.setUnderwritingResult("人工审核返回:" + msg);
+            underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.AUDIT_FAIL);
+            tkCrawlerOrderService.save(underwritingVo, underwritingResultsVo, preciseInitResult.getMainOrderId(), true);
+            log.info("泰康核保流程结束(人工核保),结果:{}", JSONObject.toJSONString(underwritingResultsVo));
+            return underwritingResultsVo;
+        }
+
+        // 自核通过,继续处理
         // 核保成功,保单编号缓存
         // 核保成功,保单编号缓存
         redisCacheUtil.setCache(tkOrderData.getProposalNo(), underwritingVo.getOrder().getOrdersNo(), "HB");
         redisCacheUtil.setCache(tkOrderData.getProposalNo(), underwritingVo.getOrder().getOrdersNo(), "HB");
         // 保司订单号
         // 保司订单号
@@ -210,16 +241,12 @@ public class TKQuotationBaseServiceImpl implements TKQuotationBaseService {
         underwritingResultsVo.setUnderwritingResult("核保成功");
         underwritingResultsVo.setUnderwritingResult("核保成功");
         // 核保状态
         // 核保状态
         underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.PAY_PENDING);
         underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.PAY_PENDING);
-        // 验车标志,需要验车,需要上传影像
-        if ("1".equals(tkEntranceFor000038Result.getCheckCarFlag()) && "9".equals(tkEntranceFor000038Result.getData().getUnderWriteFlag())) {
-            buildCheckCar(tkEntranceFor000038Result, underwritingVo, preciseInitResult, underwritingResultsVo);
-        }
-        // 人工核保
-        if ("2".equals(tkOrderData.getCarCheckStatus())) {
-            underwritingResultsVo.setUnderwritingResult("人工审核返回:" + tkOrderData.getSpResMsg());
-            underwritingResultsVo.setUnderwritingStatus(InsOrderStatusEnum.AUDIT_FAIL);
+        // 验车标志,需要验车,需要上传影像(仅检查 checkCarFlag 是否为 1)
+        if ("1".equals(tkEntranceFor000038Result.getData().getCheckCarFlag())) {
+            buildCheckCar(tkEntranceFor000038Result.getData(), underwritingVo, preciseInitResult, underwritingResultsVo);
         }
         }
         tkCrawlerOrderService.save(underwritingVo, underwritingResultsVo, preciseInitResult.getMainOrderId(), true);
         tkCrawlerOrderService.save(underwritingVo, underwritingResultsVo, preciseInitResult.getMainOrderId(), true);
+        log.info("泰康核保流程结束,结果:{}", JSONObject.toJSONString(underwritingResultsVo));
         return underwritingResultsVo;
         return underwritingResultsVo;
     }
     }
 
 

+ 5 - 0
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/component/ZmCrawlerRequestComponent.java

@@ -160,6 +160,9 @@ public class ZmCrawlerRequestComponent {
             map.expire(Duration.ofMinutes(CacheConstant.ZHONGMEI_AUTHORIZATION_TIME));
             map.expire(Duration.ofMinutes(CacheConstant.ZHONGMEI_AUTHORIZATION_TIME));
             return authorizationMap.get(AUTHORIZATION);
             return authorizationMap.get(AUTHORIZATION);
         }
         }
+        if (authenticateResponse.getHead().getReturnCode().equals("-1") && authenticateResponse.getHead().getReturnMessage().contains("登录失败,用户名或者密码错误")) {
+            throw new SystemException(authenticateResponse.getHead().getReturnMessage());
+        }
         loginsNumber = loginsNumber - 1;
         loginsNumber = loginsNumber - 1;
         if (loginsNumber <= 0) {
         if (loginsNumber <= 0) {
             throw new SystemException(authenticateResponse.getHead().getReturnMessage());
             throw new SystemException(authenticateResponse.getHead().getReturnMessage());
@@ -259,6 +262,8 @@ public class ZmCrawlerRequestComponent {
      * @return
      * @return
      */
      */
     public Mono<ZmCrawlerNetpointQueryResponse> netpointQuery(ZmCrawlerNetpointQueryRequest modelQueryRequest) {
     public Mono<ZmCrawlerNetpointQueryResponse> netpointQuery(ZmCrawlerNetpointQueryRequest modelQueryRequest) {
+        InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
+                "爬虫网点查询",RequestUrl.NETPOINT_QUERY.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(modelQueryRequest));
         return requestComponent.postGbk(RequestUrl.NETPOINT_QUERY.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
         return requestComponent.postGbk(RequestUrl.NETPOINT_QUERY.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
                 Base64Tool.encode(JSONObject.toJSONString(modelQueryRequest)), ZmCrawlerNetpointQueryResponse.class,new HttpHeaders(),"网点查询");
                 Base64Tool.encode(JSONObject.toJSONString(modelQueryRequest)), ZmCrawlerNetpointQueryResponse.class,new HttpHeaders(),"网点查询");
     }
     }

+ 26 - 4
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/entity/Request/ZmCrawlerQuotedPriceRequest.java

@@ -425,7 +425,7 @@ public class ZmCrawlerQuotedPriceRequest extends BaseRequest {
                 PolicyCarDTO policyCar = new PolicyCarDTO(carInfoVo, actualValueResponse,fullCarDataDTO.getFullCarData());
                 PolicyCarDTO policyCar = new PolicyCarDTO(carInfoVo, actualValueResponse,fullCarDataDTO.getFullCarData());
                 this.policyCar = policyCar;
                 this.policyCar = policyCar;
 
 
-                ModelDetailsDTO modelDetails = new ModelDetailsDTO();
+                ModelDetailsDTO modelDetails = new ModelDetailsDTO(fullCarDataDTO);
                 this.modelDetails = modelDetails;
                 this.modelDetails = modelDetails;
 
 
                 this.violationBeanlist = new ArrayList<>();
                 this.violationBeanlist = new ArrayList<>();
@@ -634,6 +634,7 @@ public class ZmCrawlerQuotedPriceRequest extends BaseRequest {
                     this.carCheckTime = "";
                     this.carCheckTime = "";
                     this.carChecker = "";
                     this.carChecker = "";
                     this.carQueryCheckCode = "";
                     this.carQueryCheckCode = "";
+                    this.isrelief = fullCarData.getIsrelief();
                     this.carUseType = carInfoVo.getVehicleUseCode();
                     this.carUseType = carInfoVo.getVehicleUseCode();
                     this.engine = carInfoVo.getEngineNo();
                     this.engine = carInfoVo.getEngineNo();
                     this.issueDate = carInfoVo.getIssueDate() + " 00:00:00";
                     this.issueDate = carInfoVo.getIssueDate() + " 00:00:00";
@@ -832,6 +833,7 @@ public class ZmCrawlerQuotedPriceRequest extends BaseRequest {
                     this.energyTypes = fullCarData.getEnergyTypes();
                     this.energyTypes = fullCarData.getEnergyTypes();
                     this.fuelType = fullCarData.getFuelType();
                     this.fuelType = fullCarData.getFuelType();
                     this.localModelCode = fullCarData.getLocalModelCode();
                     this.localModelCode = fullCarData.getLocalModelCode();
+                    this.isrelief = fullCarData.getIsrelief();
                     this.modelCode = fullCarData.getLocalModelCode();
                     this.modelCode = fullCarData.getLocalModelCode();
                     this.newVehicleClassCode = fullCarData.getNewVehicleClassCode();
                     this.newVehicleClassCode = fullCarData.getNewVehicleClassCode();
                     this.originalPurchasePrice = fullCarData.getOriginalPurchasePrice();
                     this.originalPurchasePrice = fullCarData.getOriginalPurchasePrice();
@@ -937,13 +939,33 @@ public class ZmCrawlerQuotedPriceRequest extends BaseRequest {
 
 
                 public ModelDetailsDTO(ZmCrawlerModelQueryResponse.FullCarDataDTO fullCarDataDTO) {
                 public ModelDetailsDTO(ZmCrawlerModelQueryResponse.FullCarDataDTO fullCarDataDTO) {
                     ZmCrawlerModelQueryResponse.FullCarDataDTO.FullCarData fullCarData = fullCarDataDTO.getFullCarData();
                     ZmCrawlerModelQueryResponse.FullCarDataDTO.FullCarData fullCarData = fullCarDataDTO.getFullCarData();
+                    this.approvedLoad = fullCarData.getApprovedLoad();
+                    this.approvedPassengersCapacity = fullCarData.getApprovedPassengersCapacity();
                     this.brand = fullCarData.getModelName();
                     this.brand = fullCarData.getModelName();
+                    this.carAlias = fullCarData.getModelName();
+                    this.carType = fullCarData.getCarType();
+                    this.carYear = fullCarData.getCarYear();
+                    this.deptCode = fullCarDataDTO.getPlatFormCar().getDeptCode();
                     this.displacement = fullCarData.getDisplacement()/1000;
                     this.displacement = fullCarData.getDisplacement()/1000;
+                    this.fuelType = fullCarData.getFuelType();
                     this.grossMass = "--";
                     this.grossMass = "--";
-                    this.deptCode = fullCarDataDTO.getPlatFormCar().getDeptCode();
-                    this.platSeriesGroup = "--";
-                    this.modelCode = "--";
                     this.groupName = "--";
                     this.groupName = "--";
+                    this.localModelCode = fullCarData.getLocalModelCode();
+                    this.modelCode = "--";
+                    this.modelName = fullCarData.getModelName();
+                    this.newVehicleClass = fullCarData.getNewVehicleClass();
+                    this.platSeriesGroup = "--";
+                    this.power = fullCarData.getPower();
+                    this.purchasePrice = fullCarData.getPurchasePrice();
+                    this.remark = fullCarData.getRemark();
+                    this.series = fullCarData.getSeries();
+                    this.taxReliefFlag = fullCarData.getTaxReliefFlag();
+                    this.transmissionType = fullCarData.getTransmissionType();
+                    this.unladenMass = fullCarData.getUnladenMass();
+                    this.vehicleRisk = new VehicleRiskDTO();
+
+
+
                 }
                 }
 
 
                 @Data
                 @Data

+ 12 - 0
tenant/insurance/quotation-zhongmei/src/main/java/com/jzg/quotation/zhongmei/crawler/entity/Response/ZmCrawlerQuotedPriceResponse.java

@@ -1327,6 +1327,12 @@ public class ZmCrawlerQuotedPriceResponse extends BaseResponse {
                 @JsonProperty("deductionDueProportion")
                 @JsonProperty("deductionDueProportion")
                 private Double deductionDueProportion;
                 private Double deductionDueProportion;
 
 
+                @JsonProperty("deductionDueCode")
+                private String deductionDueCode;
+
+                @JsonProperty("deductionDueType")
+                private String deductionDueType;
+
                 @JsonProperty("documentNumber")
                 @JsonProperty("documentNumber")
                 private String documentNumber;
                 private String documentNumber;
 
 
@@ -1410,6 +1416,12 @@ public class ZmCrawlerQuotedPriceResponse extends BaseResponse {
                     @JsonProperty("deductionDueProportion")
                     @JsonProperty("deductionDueProportion")
                     private String deductionDueProportion;
                     private String deductionDueProportion;
 
 
+                    @JsonProperty("deductionDueCode")
+                    private String deductionDueCode;
+
+                    @JsonProperty("deductionDueType")
+                    private String deductionDueType;
+
                     @JsonProperty("exceedDate")
                     @JsonProperty("exceedDate")
                     private String exceedDate;
                     private String exceedDate;
 
 

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

@@ -9,7 +9,6 @@ import com.jzg.quotation.zijin.crawler.entity.response.*;
 import com.jzg.quotation.zijin.crawler.enums.RequestUrl;
 import com.jzg.quotation.zijin.crawler.enums.RequestUrl;
 import com.jzg.quotation.zijin.crawler.properties.ZiJinCrawlerProperties;
 import com.jzg.quotation.zijin.crawler.properties.ZiJinCrawlerProperties;
 import com.jzg.quotation.zijin.crawler.util.DESEncryption;
 import com.jzg.quotation.zijin.crawler.util.DESEncryption;
-import com.jzg.quotation.zijin.crawler.util.RS6Item;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.NotNull;
@@ -19,6 +18,7 @@ import org.springframework.stereotype.Component;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.LinkedMultiValueMap;
 import org.springframework.util.MultiValueMap;
 import org.springframework.util.MultiValueMap;
 import org.springframework.util.StringUtils;
 import org.springframework.util.StringUtils;
+import org.springframework.web.client.RestTemplate;
 
 
 import java.io.IOException;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.ArrayList;
@@ -39,13 +39,15 @@ public class ZiJinCrawlerRequestComponent {
     // 循环次数
     // 循环次数
     public static final int CIRCULATE_NUMBER = 3;
     public static final int CIRCULATE_NUMBER = 3;
 
 
-
     private final RequestComponent requestComponent;
     private final RequestComponent requestComponent;
 
 
     private final ZiJinCrawlerProperties ziJinCrawlerProperties;
     private final ZiJinCrawlerProperties ziJinCrawlerProperties;
 
 
     private final ExteriorUtilsRequest exteriorUtilsRequest;
     private final ExteriorUtilsRequest exteriorUtilsRequest;
 
 
+    // 用于调用Python外放接口获取Cookie
+    private final RestTemplate restTemplate = new RestTemplate();
+
     /**
     /**
      * 获取验证码
      * 获取验证码
      *
      *
@@ -513,15 +515,39 @@ public class ZiJinCrawlerRequestComponent {
 
 
     /**
     /**
      * 获取Cookie的值
      * 获取Cookie的值
+     * 通过调用Python外放接口获取Cookie
      *
      *
-     * @return String
-     * @throws IOException
+     * @return String Cookie字符串
+     * @throws IOException 如果获取Cookie时发生错误
      */
      */
-    public static String getCookie() throws IOException {
-        RS6Item rs6Item = RS6Item.createRS6Instance();
-        rs6Item.updata_js_rs6();
-        Map<String, String> cookies = rs6Item.updateCookies();
-        return rs6Item.convertJsonCookieToSemicolonFormat(cookies.toString());
+    public String getCookie() throws IOException {
+        String cookieUrl = ziJinCrawlerProperties.getCookiePath();
+        if (cookieUrl == null || cookieUrl.trim().isEmpty()) {
+            throw new IOException("紫金crawler.cookie-path未配置");
+        }
+        try {
+            ResponseEntity<String> response = restTemplate.getForEntity(cookieUrl, String.class);
+            String body = response.getBody();
+            if (body == null || body.trim().isEmpty()) {
+                throw new IOException("获取Cookie失败: Python接口返回空内容");
+            }
+            // 解析JSON响应,提取cookie字段
+            com.alibaba.fastjson2.JSONObject jsonObject = JSON.parseObject(body);
+            if (!jsonObject.getBooleanValue("ok")) {
+                throw new IOException("获取Cookie失败: Python接口返回ok=false");
+            }
+            String cookie = jsonObject.getString("cookie");
+            if (cookie == null || cookie.trim().isEmpty()) {
+                throw new IOException("获取Cookie失败: 响应中cookie字段为空");
+            }
+            log.info("紫金Cookie获取成功");
+            return cookie.trim();
+        } catch (IOException e) {
+            throw e;
+        } catch (Exception e) {
+            log.error("调用Python接口获取Cookie失败: {}", e.getMessage(), e);
+            throw new IOException("获取Cookie失败: " + e.getMessage(), e);
+        }
     }
     }
 
 
     /**
     /**

+ 5 - 0
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/properties/ZiJinCrawlerProperties.java

@@ -16,4 +16,9 @@ public class ZiJinCrawlerProperties {
 
 
     private String baseUrl;
     private String baseUrl;
 
 
+    /**
+     * 用 python 跑的外放接口获取Cookie
+     */
+    private String cookiePath;
+
 }
 }

+ 2 - 13
tenant/insurance/quotation-zijin/src/main/java/com/jzg/quotation/zijin/crawler/util/RS6Item.java

@@ -10,23 +10,12 @@ import org.apache.http.util.EntityUtils;
 import org.jsoup.Jsoup;
 import org.jsoup.Jsoup;
 import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Document;
 import org.jsoup.select.Elements;
 import org.jsoup.select.Elements;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.UncheckedIOException;
+import java.io.*;
 import java.nio.charset.StandardCharsets;
 import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.FileSystemException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.StandardCopyOption;
-import java.util.Arrays;
+import java.nio.file.*;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Map;
-import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.regex.Pattern;
 
 

+ 16 - 3
tenant/organization/src/main/java/com/jzg/organization/controller/ReceivableController.java

@@ -17,6 +17,7 @@ import com.jzg.commons.entity.orders.po.InsOrderAdjust;
 import com.jzg.commons.entity.po.EsmInsCompany;
 import com.jzg.commons.entity.po.EsmInsCompany;
 import com.jzg.commons.request.RequestSingleParam;
 import com.jzg.commons.request.RequestSingleParam;
 import com.jzg.commons.util.AssertionUtils;
 import com.jzg.commons.util.AssertionUtils;
+import com.jzg.organization.client.EsmInsCompanyClient;
 import com.jzg.organization.service.ReceivableService;
 import com.jzg.organization.service.ReceivableService;
 import com.jzg.quotation.summary.aop.aspect.OrderOperationLog;
 import com.jzg.quotation.summary.aop.aspect.OrderOperationLog;
 import com.jzg.quotation.summary.constants.QuoteNumberConstant;
 import com.jzg.quotation.summary.constants.QuoteNumberConstant;
@@ -55,6 +56,8 @@ public class ReceivableController {
     private ReceivableService receivableService;
     private ReceivableService receivableService;
     @Autowired
     @Autowired
     private BaseController baseController;
     private BaseController baseController;
+    @Autowired
+    private EsmInsCompanyClient esmInsCompanyClient;
 
 
     // 拉取已审核订单
     // 拉取已审核订单
 //    @PostMapping("pullAuditedOrder")
 //    @PostMapping("pullAuditedOrder")
@@ -147,7 +150,7 @@ public class ReceivableController {
     /**
     /**
      * 导入应收的模板
      * 导入应收的模板
      *
      *
-     * @param paramVO  10 表示私有协议 20 表示平台协议
+     * @param paramVO  10 表示私有协议 20 表示平台协议 11表示私有手续费 12 表示私有跟单费
      * @author lipf
      * @author lipf
      * @date 2026/8/3 10:23
      * @date 2026/8/3 10:23
      */
      */
@@ -484,7 +487,10 @@ public class ReceivableController {
             receivableQueryVo.setSigningTimeStart(DateUtil.format(LocalDate.parse(receivableQueryVo.getSigningTime()[0], DateTimeFormatter.ISO_DATE).atStartOfDay(), "yyyy-MM-dd HH:mm:ss"));
             receivableQueryVo.setSigningTimeStart(DateUtil.format(LocalDate.parse(receivableQueryVo.getSigningTime()[0], DateTimeFormatter.ISO_DATE).atStartOfDay(), "yyyy-MM-dd HH:mm:ss"));
             receivableQueryVo.setSigningTimeEnd(DateUtil.format(LocalDate.parse(receivableQueryVo.getSigningTime()[1], DateTimeFormatter.ISO_DATE).plusDays(1).atStartOfDay(), "yyyy-MM-dd HH:mm:ss"));
             receivableQueryVo.setSigningTimeEnd(DateUtil.format(LocalDate.parse(receivableQueryVo.getSigningTime()[1], DateTimeFormatter.ISO_DATE).plusDays(1).atStartOfDay(), "yyyy-MM-dd HH:mm:ss"));
         }
         }
-
+        if(StrUtil.isNotEmpty(receivableQueryVo.getCompanyId())){
+            HttpResult<List<String>> listHttpResult = esmInsCompanyClient.queryOwnAndSubCompandyIds(receivableQueryVo.getCompanyId());
+            receivableQueryVo.setCompanyIds(listHttpResult.getData());
+        }
         receivableQueryVo.setSystemCode(baseController.getSystemCode());
         receivableQueryVo.setSystemCode(baseController.getSystemCode());
         Page<InsPlyIncome> data = receivableService.getPlatFormReceivableList(receivableQueryVo);
         Page<InsPlyIncome> data = receivableService.getPlatFormReceivableList(receivableQueryVo);
         InsPlyIncomeVO vo = receivableService.getReceivablePageIds(receivableQueryVo);
         InsPlyIncomeVO vo = receivableService.getReceivablePageIds(receivableQueryVo);
@@ -820,7 +826,14 @@ public class ReceivableController {
     @Operation(summary = "对接人结算报表")
     @Operation(summary = "对接人结算报表")
     public HttpResult<Page<ReceiverSettlementReportDto>> receiverSettlementReport(@RequestBody SettlementReportQueryVo settlementReportQueryVo) {
     public HttpResult<Page<ReceiverSettlementReportDto>> receiverSettlementReport(@RequestBody SettlementReportQueryVo settlementReportQueryVo) {
         Page page = settlementReportQueryVo.getPage();
         Page page = settlementReportQueryVo.getPage();
-        return HttpResult.ok(receivableService.receiverSettlementReport(page,settlementReportQueryVo));
+        settlementReportQueryVo.setSettlementStartTime(settlementReportQueryVo.getStartTime());
+        settlementReportQueryVo.setSettlementEndTime(settlementReportQueryVo.getEndTime());
+        if(StrUtil.isEmpty(settlementReportQueryVo.getSettlementEndTime()) && StrUtil.isEmpty(settlementReportQueryVo.getSettlementStartTime()) )  {
+            return HttpResult.ok(receivableService.receiverSettlementReport(page,settlementReportQueryVo));
+        }else{
+            // 当勾选了结算时间后,需要反着进行查询
+            return HttpResult.ok(receivableService.receiverSettlementReportWithSettlemetnDate(page,settlementReportQueryVo));
+        }
     }
     }
 
 
     @PostMapping("exportReceiverSettlementReportExcel")
     @PostMapping("exportReceiverSettlementReportExcel")

+ 5 - 5
tenant/organization/src/main/java/com/jzg/organization/excel/listener/InvoiceReceivbleExcel4PrivateListener.java

@@ -2,18 +2,18 @@ package com.jzg.organization.excel.listener;
 
 
 import com.alibaba.excel.context.AnalysisContext;
 import com.alibaba.excel.context.AnalysisContext;
 import com.alibaba.excel.event.AnalysisEventListener;
 import com.alibaba.excel.event.AnalysisEventListener;
-import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Private;
+import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4PrivateSupervise;
 import lombok.Getter;
 import lombok.Getter;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
 @Getter
 @Getter
-public class InvoiceReceivbleExcel4PrivateListener extends AnalysisEventListener<ExcelContent4Private> {
-    private final List<ExcelContent4Private> dataList = new ArrayList<>();
+public class InvoiceReceivbleExcel4PrivateListener extends AnalysisEventListener<ExcelContent4PrivateSupervise> {
+    private final List<ExcelContent4PrivateSupervise> dataList = new ArrayList<>();
 
 
     @Override
     @Override
-    public void invoke(ExcelContent4Private data, AnalysisContext context) {
+    public void invoke(ExcelContent4PrivateSupervise data, AnalysisContext context) {
         dataList.add(data);
         dataList.add(data);
     }
     }
 
 
@@ -22,7 +22,7 @@ public class InvoiceReceivbleExcel4PrivateListener extends AnalysisEventListener
         System.out.println("Total rows: " + dataList.size());
         System.out.println("Total rows: " + dataList.size());
     }
     }
 
 
-    public List<ExcelContent4Private> getDataList() {
+    public List<ExcelContent4PrivateSupervise> getDataList() {
         return dataList;
         return dataList;
     }
     }
 }
 }

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

@@ -1,7 +1,9 @@
 package com.jzg.organization.mapper;
 package com.jzg.organization.mapper;
 
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jzg.commons.entity.finance.po.InsPlyIncomeInvoiceSettlement;
 import com.jzg.commons.entity.finance.po.InsPlyIncomeInvoiceSettlement;
+import com.jzg.commons.entity.finance.vo.SettlementReportQueryVo;
 import com.jzg.commons.entity.finance.vo.SettlementVo;
 import com.jzg.commons.entity.finance.vo.SettlementVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
@@ -23,4 +25,12 @@ public interface InsPlyIncomeInvoiceSettlementMapper extends BaseMapper<InsPlyIn
     @Select("select * from ins_ply_income_invoice_settlement ipiis where ipiis.invoice_id = #{invoiceId,jdbcType=VARCHAR} and ipiis.is_delete = 0 order by ipiis.create_time desc ")
     @Select("select * from ins_ply_income_invoice_settlement ipiis where ipiis.invoice_id = #{invoiceId,jdbcType=VARCHAR} and ipiis.is_delete = 0 order by ipiis.create_time desc ")
     List<InsPlyIncomeInvoiceSettlement> querySettlementRecent(@Param("invoiceId") String invoiceId);
     List<InsPlyIncomeInvoiceSettlement> querySettlementRecent(@Param("invoiceId") String invoiceId);
 
 
+    /**
+     * 根据结算时间查询结算记录
+     *
+     * @author lipf
+     * @date 2026/8/14 11:10
+     */
+    Page<InsPlyIncomeInvoiceSettlement> querySettlementBySettlementDate(Page page, @Param("vo") SettlementReportQueryVo vo);
+
 }
 }

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

@@ -331,6 +331,15 @@ public interface ReceivableService extends IService<InsPlyIncome> {
      */
      */
     Page<ReceiverSettlementReportDto> receiverSettlementReport(Page page,SettlementReportQueryVo settlementReportQueryVo);
     Page<ReceiverSettlementReportDto> receiverSettlementReport(Page page,SettlementReportQueryVo settlementReportQueryVo);
 
 
+    /**
+     * 对接人结算报表
+     *     结算时间不为空
+     *
+     * @author modify by lipf
+     * @date 2026/5/23 8:57
+     */
+    Page<ReceiverSettlementReportDto> receiverSettlementReportWithSettlemetnDate(Page page, SettlementReportQueryVo settlementReportQueryVo);
+
     void exportReceiverSettlementReportExcel(Page page,SettlementReportQueryVo settlementReportQueryVo);
     void exportReceiverSettlementReportExcel(Page page,SettlementReportQueryVo settlementReportQueryVo);
 
 
     /**
     /**
@@ -422,7 +431,7 @@ public interface ReceivableService extends IService<InsPlyIncome> {
     /**
     /**
      * 导入应收的模板
      * 导入应收的模板
      *
      *
-     * @param type  10 表示私有协议 20 表示平台协议
+     * @param type  10 表示私有协议 20 表示平台协议 11表示私有手续费 12 表示私有跟单费
      * @author lipf
      * @author lipf
      * @date 2026/8/3 10:23
      * @date 2026/8/3 10:23
      */
      */
@@ -535,4 +544,6 @@ public interface ReceivableService extends IService<InsPlyIncome> {
      * @param systemCode 租户代码
      * @param systemCode 租户代码
      */
      */
     void setDisableFlagForOtherReceivable(List<InsPlyIncome> records, String systemCode);
     void setDisableFlagForOtherReceivable(List<InsPlyIncome> records, String systemCode);
+
+
 }
 }

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

@@ -2453,7 +2453,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
     /**
     /**
      * 导出应收开票模板
      * 导出应收开票模板
      *
      *
-     * @param type  10 表示私有协议 20 表示平台协议
+     * @param type  10 表示私有协议 20 表示平台协议  11表示私有手续费 12 表示私有跟单费
      * @return String 导出时的提示信息
      * @return String 导出时的提示信息
      * @author lipf
      * @author lipf
      * @date 2026/8/3 10:23
      * @date 2026/8/3 10:23
@@ -2463,10 +2463,18 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         log.info("导出模板: type=[{}]",type);
         log.info("导出模板: type=[{}]",type);
         // List<InvoiceReceivableExportExcelVo4Private> emptyList = ListUtil.empty();
         // List<InvoiceReceivableExportExcelVo4Private> emptyList = ListUtil.empty();
 
 
-        if("10".equals(type)){
+        if("11".equals(type)){
             // 调用动态导出
             // 调用动态导出
             return exportBaseService.upLoadFile(
             return exportBaseService.upLoadFile(
-                    ExcelContent4Private.class,
+                    ExcelContent4PrivateSupervise.class,
+                    ListUtil.empty(),
+                    "应收开票-导出模板(私有)-" + Instant.now()
+            );
+        }
+        if("12".equals(type)){
+            // 调用动态导出
+            return exportBaseService.upLoadFile(
+                    ExcelContent4PrivateFollow.class,
                     ListUtil.empty(),
                     ListUtil.empty(),
                     "应收开票-导出模板(私有)-" + Instant.now()
                     "应收开票-导出模板(私有)-" + Instant.now()
             );
             );
@@ -2519,7 +2527,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         String userName = baseController.getUserName();
         String userName = baseController.getUserName();
         log.info("用户[{}]导入私有应设有文件",userName);
         log.info("用户[{}]导入私有应设有文件",userName);
 
 
-        List<ExcelContent4Private> excelContents = importIncomeService.parseImportExcel4Private(file);
+        List<ExcelContent4PrivateSupervise> excelContents = importIncomeService.parseImportExcel4Private(file);
         if (CollUtil.isEmpty(excelContents)){
         if (CollUtil.isEmpty(excelContents)){
             throw new SystemException("数据不能为空,导入失败");
             throw new SystemException("数据不能为空,导入失败");
         }
         }
@@ -6217,6 +6225,39 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         return val == null ? BigDecimal.ZERO : val;
         return val == null ? BigDecimal.ZERO : val;
     }
     }
 
 
+    /**
+     * 对接人结算报表
+     * 结算时间不为空
+     *
+     * @param page
+     * @param vo
+     * @author modify by lipf
+     * @date 2026/5/23 8:57
+     */
+    @Override
+    public Page<ReceiverSettlementReportDto> receiverSettlementReportWithSettlemetnDate(Page page, SettlementReportQueryVo vo) {
+        log.info("平台协议应收-结算报表-对接人结算报表查询。結算时间不为空 settlementReportQueryVo=[{}]", JSONUtil.toJsonStr(vo));
+        Page<InsPlyIncomeInvoiceSettlement> pageRes = insPlyIncomeInvoiceSettlementMapper.querySettlementBySettlementDate(page,vo);
+        List<InsPlyIncomeInvoiceSettlement> records = pageRes.getRecords();
+        Map<String, List<InsPlyIncomeInvoiceSettlement>> res =  records.stream()
+                .collect(Collectors.groupingBy(InsPlyIncomeInvoiceSettlement::getContactPerson));
+        Page<ReceiverSettlementReportDto> pagDto = new Page<>(page.getPages(), page.getSize());
+        List<ReceiverSettlementReportDto> dtos = new ArrayList<>();
+        for (String s : res.keySet()) {
+            ReceiverSettlementReportDto dto = new ReceiverSettlementReportDto();
+            dto.setReceiver(s);
+            List<InsPlyIncomeInvoiceSettlement> settlements = res.get(s);
+            BigDecimal diffAmount = settlements.stream().map(InsPlyIncomeInvoiceSettlement::getSettlementPaymentDifference).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
+            BigDecimal actualReceivedAmount = settlements.stream().map(InsPlyIncomeInvoiceSettlement::getActualReceivedAmount).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
+            dto.setSettledAmount(actualReceivedAmount.toString());
+            dto.setUnSettledAmount(BigDecimal.ZERO.toString());
+            dto.setTotalReceivable(BigDecimalUtil.add(diffAmount, actualReceivedAmount).toString());
+            dto.setTotalPaymentDifference(diffAmount);
+            dtos.add(dto);
+        }
+        pagDto.setRecords(dtos);
+        return pagDto;
+    }
 
 
     /**
     /**
      * 平台协议应收-结算报表-对接人结算报表查询
      * 平台协议应收-结算报表-对接人结算报表查询
@@ -6282,6 +6323,14 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
                     action.setUnSettledAmount(BigDecimalUtil.subtract(new BigDecimal(action.getTotalReceivable()),BigDecimal.ZERO).toString());
                     action.setUnSettledAmount(BigDecimalUtil.subtract(new BigDecimal(action.getTotalReceivable()),BigDecimal.ZERO).toString());
                 }
                 }
             }).toList();
             }).toList();
+            // 根据实际情况判断,是否计算完成
+            if(StrUtil.isNotEmpty(settlementReportQueryVo.getIsRemained())){
+                if("10".equals(settlementReportQueryVo.getIsRemained())){
+                    records = records.stream().filter(action-> "0".equals(action.getUnSettledAmount())).toList();
+                }else if("20".equals(settlementReportQueryVo.getIsRemained())){
+                    records = records.stream().filter(action-> !"0".equals(action.getUnSettledAmount())).toList();
+                }
+            }
             receiverSettlementReport.setRecords(records);
             receiverSettlementReport.setRecords(records);
         }
         }
         return receiverSettlementReport;
         return receiverSettlementReport;

+ 4 - 4
tenant/organization/src/main/java/com/jzg/organization/service/impl/importincome/ImportIncomeServiceImpl.java

@@ -9,7 +9,7 @@ import com.jzg.commons.constants.ProductsType;
 import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.core.page.HttpResult;
 import com.jzg.commons.core.page.HttpResult;
 import com.jzg.commons.entity.finance.po.InsPlyIncome;
 import com.jzg.commons.entity.finance.po.InsPlyIncome;
-import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Private;
+import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4PrivateSupervise;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportUpdateExcelResultVo;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportUpdateExcelResultVo;
 import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Platform;
 import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Platform;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportContentExt;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportContentExt;
@@ -119,7 +119,7 @@ public class ImportIncomeServiceImpl implements ImportIncomeService {
      * @date 2026/8/4 9:22
      * @date 2026/8/4 9:22
      */
      */
     @Override
     @Override
-    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4Private> excelContents) {
+    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4PrivateSupervise> excelContents) {
         log.info("为私有订单填充数据:excelContents.size=[{}]", CollUtil.size(excelContents));
         log.info("为私有订单填充数据:excelContents.size=[{}]", CollUtil.size(excelContents));
         return List.of();
         return List.of();
     }
     }
@@ -292,10 +292,10 @@ public class ImportIncomeServiceImpl implements ImportIncomeService {
      * @author lipf
      * @author lipf
      * @date 2026/8/4 9:07
      * @date 2026/8/4 9:07
      */
      */
-    public List<ExcelContent4Private> parseImportExcel4Private(MultipartFile file) {
+    public List<ExcelContent4PrivateSupervise> parseImportExcel4Private(MultipartFile file) {
         InvoiceReceivbleExcel4PrivateListener listener = new InvoiceReceivbleExcel4PrivateListener();
         InvoiceReceivbleExcel4PrivateListener listener = new InvoiceReceivbleExcel4PrivateListener();
         try (InputStream inputStream = file.getInputStream()) {
         try (InputStream inputStream = file.getInputStream()) {
-            EasyExcel.read(inputStream, ExcelContent4Private.class, listener)
+            EasyExcel.read(inputStream, ExcelContent4PrivateSupervise.class, listener)
                     .sheet()
                     .sheet()
                     .doRead();
                     .doRead();
             return listener.getDataList();
             return listener.getDataList();

+ 3 - 3
tenant/organization/src/main/java/com/jzg/organization/service/importincome/ImportIncomeService.java

@@ -1,7 +1,7 @@
 package com.jzg.organization.service.importincome;
 package com.jzg.organization.service.importincome;
 
 
 import com.jzg.commons.entity.finance.po.InsPlyIncome;
 import com.jzg.commons.entity.finance.po.InsPlyIncome;
-import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Private;
+import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4PrivateSupervise;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportUpdateExcelResultVo;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportUpdateExcelResultVo;
 import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Platform;
 import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Platform;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportContentExt;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportContentExt;
@@ -27,7 +27,7 @@ public interface ImportIncomeService {
      * @author lipf
      * @author lipf
      * @date 2026/8/4 9:22
      * @date 2026/8/4 9:22
      */
      */
-    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4Private> excelContents);
+    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4PrivateSupervise> excelContents);
 
 
     /**
     /**
      * 批量处理数据
      * 批量处理数据
@@ -60,7 +60,7 @@ public interface ImportIncomeService {
      * @author lipf
      * @author lipf
      * @date 2026/8/4 9:07
      * @date 2026/8/4 9:07
      */
      */
-    public List<ExcelContent4Private> parseImportExcel4Private(MultipartFile file);
+    public List<ExcelContent4PrivateSupervise> parseImportExcel4Private(MultipartFile file);
 
 
     /**
     /**
      * 解析并读取Excel中的内容
      * 解析并读取Excel中的内容

+ 19 - 0
tenant/organization/src/main/resources/mapper/InsPlyIncomeInvoiceSettlementMapper.xml

@@ -3,6 +3,11 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jzg.organization.mapper.InsPlyIncomeInvoiceSettlementMapper">
 <mapper namespace="com.jzg.organization.mapper.InsPlyIncomeInvoiceSettlementMapper">
+
+    <resultMap id="BaseResultMap" type="com.jzg.commons.entity.finance.po.InsPlyIncomeInvoiceSettlement">
+
+    </resultMap>
+
     <!-- 查询所有已结算记录的结算金额和回款差额的汇总值 lipf 2026年6月30日15:43:15  -->
     <!-- 查询所有已结算记录的结算金额和回款差额的汇总值 lipf 2026年6月30日15:43:15  -->
     <select id="querySettlementAndDiff" resultType="com.jzg.commons.entity.finance.vo.SettlementVo">
     <select id="querySettlementAndDiff" resultType="com.jzg.commons.entity.finance.vo.SettlementVo">
         select
         select
@@ -20,4 +25,18 @@
             </if>
             </if>
         </where>
         </where>
     </select>
     </select>
+    <!-- 根据结算日期查询结算记录 2026年8月14日11:28:34 lipf  -->
+    <select id="querySettlementBySettlementDate"  resultMap="BaseResultMap">
+        select  ipiis.*, ipii.contact_person  from
+        ins_ply_income_invoice_settlement ipiis
+        left join ins_ply_income_invoice ipii on
+        ipiis.invoice_id = ipii.id
+        <where>
+            ipii.invoice_type in (5, 6)
+            and ipiis.receive_payment_date &gt;= #{vo.settlementStartTime} and ipiis.receive_payment_date &lt;= #{vo.settlementEndTime}
+            <if test="vo.contactPerson != null and vo.contactPerson != ''">
+                and ipii.contact_person = #{vo.contactPerson}
+            </if>
+        </where>
+    </select>
 </mapper>
 </mapper>

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

@@ -377,9 +377,19 @@
         <if test="receivableQueryVo.licenseNo != null and receivableQueryVo.licenseNo != ''">
         <if test="receivableQueryVo.licenseNo != null and receivableQueryVo.licenseNo != ''">
             AND ipi.license_no LIKE CONCAT('%', #{receivableQueryVo.licenseNo}, '%')
             AND ipi.license_no LIKE CONCAT('%', #{receivableQueryVo.licenseNo}, '%')
         </if>
         </if>
-        <if test="receivableQueryVo.companyId != null and receivableQueryVo.companyId != ''">
-            AND (ipi.partner_company_id = #{receivableQueryVo.companyId} or ipi.company_id = #{receivableQueryVo.companyId})
-        </if>
+        <choose>
+            <when  test="receivableQueryVo.companyIds != null and receivableQueryVo.companyIds.size() > 0">
+                AND ipi.partner_company_id in
+                <foreach collection="receivableQueryVo.companyIds" item="companyId" open="(" close=")" separator=",">
+                    #{companyId}
+                </foreach>
+            </when>
+            <otherwise>
+                <if test="receivableQueryVo.companyId != null and receivableQueryVo.companyId != ''">
+                    AND (ipi.partner_company_id = #{receivableQueryVo.companyId} or ipi.company_id = #{receivableQueryVo.companyId})
+                </if>
+            </otherwise>
+        </choose>
         <if test="receivableQueryVo.businessSource != null and receivableQueryVo.businessSource != ''">
         <if test="receivableQueryVo.businessSource != null and receivableQueryVo.businessSource != ''">
             AND ipi.business_source = #{receivableQueryVo.businessSource}
             AND ipi.business_source = #{receivableQueryVo.businessSource}
         </if>
         </if>