Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

wanghao 4 mesiacov pred
rodič
commit
4be850a9d8
23 zmenil súbory, kde vykonal 322 pridanie a 297 odobranie
  1. 4 31
      authentication/src/main/resources/application-dev.yml
  2. 2 23
      authentication/src/main/resources/application-prod.yml
  3. 21 0
      commons/src/main/java/com/jzg/commons/util/BigDecimalUtil.java
  4. 4 0
      consoleStatistics/src/main/resources/application-prod.yml
  5. 4 2
      gateway/src/main/resources/application-dev.yml
  6. 8 1
      gateway/src/main/resources/application-prod.yml
  7. 4 4
      partner/src/main/resources/application-dev.yml
  8. 2 1
      partner/src/main/resources/application-prod.yml
  9. 0 30
      platform/src/main/resources/application-dev.yml
  10. 2 29
      platform/src/main/resources/application-prod.yml
  11. 2 2
      tenant/costsorrule/src/main/resources/application-dev.yml
  12. 2 0
      tenant/costsorrule/src/main/resources/application-prod.yml
  13. 60 45
      tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/util/UploadUtil.java
  14. 69 45
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsFeeAuditServiceImpl.java
  15. 12 38
      tenant/insurance/quotation-summary/src/main/resources/application-dev.yaml
  16. 8 6
      tenant/insurance/quotation-summary/src/main/resources/application-prod.yaml
  17. 7 0
      tenant/organization/src/main/java/com/jzg/organization/controller/ReceivableController.java
  18. 7 0
      tenant/organization/src/main/java/com/jzg/organization/mapper/ReceivableMapper.java
  19. 8 0
      tenant/organization/src/main/java/com/jzg/organization/service/ReceivableService.java
  20. 22 5
      tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java
  21. 3 31
      tenant/organization/src/main/resources/application-dev.yml
  22. 1 1
      tenant/organization/src/main/resources/application-prod.yml
  23. 70 3
      tenant/organization/src/main/resources/mapper/ReceivableMapper.xml

+ 4 - 31
authentication/src/main/resources/application-dev.yml

@@ -2,8 +2,8 @@ spring:
   cloud:
     nacos:
       server-addr: 192.168.5.250:8848
-      username: nacos
-      password: nacos
+      username:
+      password:
       config:
         file-extension: yaml
         namespace: 9fceaca4-c1d2-4bb8-aac9-f64d4b7de73c
@@ -17,34 +17,7 @@ spring:
       - nacos:minio
 config:
   sso: 0
-seata:
-  enabled: true                                       # 启用Seata分布式事务
-  application-id: ${spring.application.name}          # 应用ID,使用spring应用名
-  tx-service-group: default_tx_group                  # 事务服务组名
-  enable-auto-data-source-proxy: true                 # 自动代理数据源(Seata会自动包装数据源)
-  registry:
-    type: nacos                                       # 注册中心类型:nacos(从Nacos发现Seata Server)
-    nacos:
-      server-addr: 192.168.5.250:8848                 # Nacos地址
-      namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759 # Nacos命名空间
-      group: SEATA_GROUP                              # 注册分组
-      username: nacos                                 # Nacos用户名
-      password: nacos                                 # Nacos密码
-      application: seata-server                       # Seata Server在Nacos的服务名
-      cluster: default                                # Seata集群名
-  config:
-    type: nacos                                       # 配置中心类型:nacos(从Nacos读取Seata配置)
-    nacos:
-      server-addr: 192.168.5.250:8848
-      namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
-      group: SEATA_GROUP
-      username: nacos
-      password: nacos
-      data-id: seata.properties                       # Nacos中的配置data-id
-  service:
-    vgroupMapping:
-      default_tx_group: default                       # 事务组映射到Seata Server集群(default集群)
-    disable-global-transaction: false                 # 不禁用全局事务
+
 wechat:
   open:
     properties:
@@ -54,4 +27,4 @@ wechat:
 feign:
   client:
     jzg-partner:
-      url: http://localhost:8087/
+      url: http://localhost:8087/

+ 2 - 23
authentication/src/main/resources/application-prod.yml

@@ -17,31 +17,10 @@ spring:
       - nacos:mysql
       - nacos:redisson
       - nacos:minio
+      - nacos:seata-server
 config:
   sso: 0
 
-#seata:
-#  enabled: true
-#  application-id: ${spring.application.name}
-#  # 事务组的名称,对应service.vgroupMapping.default_tx_group=xxx中配置的default_tx_group
-#  tx-service-group: default_tx_group
-#  # 配置事务组与集群的对应关系
-#  service:
-#    vgroup-mapping:
-#      # default_tx_group为事务组的名称,default为集群名称(与registry.conf中的一致)
-#      default_tx_group: default
-#    disable-global-transaction: false
-#  registry:
-#    type: nacos
-#    nacos:
-#      application: seata-server
-#      server-addr: 172.24.144.227:8848
-#      group: SEATA_GROUP
-#      namespace: f9ca025f-b5df-47a9-b3f6-15bcbad3ebd3
-#      username: nacos
-#      password: AnrNjNn6zCS3QdIy
-#      # registry.conf中,配置cluster名称
-#      cluster: default
 wechat:
   open:
     properties:
@@ -53,4 +32,4 @@ wechat:
 feign:
   client:
     jzg-partner:
-      url: http://172.24.144.227:8087/
+      url: http://172.24.144.227:8087/

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

@@ -1,7 +1,10 @@
 package com.jzg.commons.util;
 
+import cn.hutool.core.collection.CollUtil;
+
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.util.List;
 
 
 /**
@@ -29,6 +32,24 @@ public class BigDecimalUtil {
         return v1.add(v2);
     }
 
+    /**
+     * 将多个值进行相加
+     *
+     * @param items 要相加的值
+     * @author lipf
+     * @date 2026/6/6 10:22
+     */
+    public static BigDecimal add(List<BigDecimal> items){
+        if(CollUtil.isEmpty(items)) {
+            return BigDecimal.ZERO;
+        }
+        BigDecimal sum = BigDecimal.ZERO;
+        for (BigDecimal item : items) {
+            sum = sum.add(item);
+        }
+        return sum;
+    }
+
     /**
      * 提供精确的减法运算
      * @param v1 被减数

+ 4 - 0
consoleStatistics/src/main/resources/application-prod.yml

@@ -32,3 +32,7 @@ unionPay:
     publicKey: 0414bb7e9c3914bb65b85079b1dc6e1ca2a0ee04dd9bb55b2f8d31704a6dec0cca695739e128f9c931330e1c0f493be4d56244236434c9d344c4716ba64a4470ba
     privateKey: 24ebfde60aecb81214605050763926ec342c487859a8da57d5badcd3c1559336
 
+
+
+seata:
+  enabled: false

+ 4 - 2
gateway/src/main/resources/application-dev.yml

@@ -18,12 +18,14 @@ spring:
         import-check:
           enabled: false
         file-extension: yaml
-        namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
+        namespace: 9fceaca4-c1d2-4bb8-aac9-f64d4b7de73c
         group: DEFAULT_GROUP
       discovery:
-        namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
+        namespace: 9fceaca4-c1d2-4bb8-aac9-f64d4b7de73c
 
     gateway:
+      httpclient:
+        response-timeout: 120000
       routes:
         - id: auth_route
           uri: http://localhost:8081/

+ 8 - 1
gateway/src/main/resources/application-prod.yml

@@ -95,6 +95,7 @@ spring:
                   - /newCarJudgeRules/**
                   - /sysDistributionSetting/**
                   - /organization/wechat/**
+                  - /signIn/**
 
         - id: summary_route
           uri: http://172.24.144.227:9898/
@@ -106,11 +107,14 @@ spring:
                   - /supplementOrder/**
                   - /order/carModel/**
                   - /unify/**
+                  - /homepage/**
                   - /order/taskImages/**
                   - /order/qrCode/**
                   - /orderTrack/**
                   - /feeAudit/**
                   - /adjust/**
+                  - /rightsGrant/**
+                  - /insOrderRights/**
 
         - id: costsorrule_route
           uri: http://172.24.144.227:8085/
@@ -152,4 +156,7 @@ spring:
     redisson:
       address: redis://172.24.144.227:6379
       password: 123456
-      database: 0
+      database: 0
+
+seata:
+  enabled: false

+ 4 - 4
partner/src/main/resources/application-dev.yml

@@ -2,14 +2,14 @@ spring:
   cloud:
     nacos:
       server-addr: 192.168.5.250:8848
-      username:
-      password:
+      username: nacos
+      password: nacos
       config:
         file-extension: yaml
-        namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
+        namespace: 9fceaca4-c1d2-4bb8-aac9-f64d4b7de73c
         group: DEFAULT_GROUP
       discovery:
-        namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
+        namespace: 9fceaca4-c1d2-4bb8-aac9-f64d4b7de73c
   config:
     import:
       - nacos:mysql

+ 2 - 1
partner/src/main/resources/application-prod.yml

@@ -15,7 +15,8 @@ spring:
       - nacos:mysql
       - nacos:redisson
 
-
+seata:
+  enabled: false
 
 
 feign:

+ 0 - 30
platform/src/main/resources/application-dev.yml

@@ -23,33 +23,3 @@ config:
   sso: 1
 
 
-seata:
-  enabled: true                                       # 启用Seata分布式事务
-  application-id: ${spring.application.name}          # 应用ID,使用spring应用名
-  tx-service-group: default_tx_group                  # 事务服务组名
-  enable-auto-data-source-proxy: true                 # 自动代理数据源(Seata会自动包装数据源)
-  registry:
-    type: nacos                                       # 注册中心类型:nacos(从Nacos发现Seata Server)
-    nacos:
-      server-addr: 192.168.5.250:8848                 # Nacos地址
-      namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759 # Nacos命名空间
-      group: SEATA_GROUP                              # 注册分组
-      username: nacos                                 # Nacos用户名
-      password: nacos                                 # Nacos密码
-      application: seata-server                       # Seata Server在Nacos的服务名
-      cluster: default                                # Seata集群名
-  config:
-    type: nacos                                       # 配置中心类型:nacos(从Nacos读取Seata配置)
-    nacos:
-      server-addr: 192.168.5.250:8848
-      namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
-      group: SEATA_GROUP
-      username: nacos
-      password: nacos
-      data-id: seata.properties                       # Nacos中的配置data-id
-  service:
-    vgroupMapping:
-      default_tx_group: default                       # 事务组映射到Seata Server集群(default集群)
-    disable-global-transaction: false                 # 不禁用全局事务
-
-

+ 2 - 29
platform/src/main/resources/application-prod.yml

@@ -23,32 +23,5 @@ spring:
 config:
   sso: 1
 
-
-seata:
-  registry:
-    type: nacos                                       # 注册中心类型:nacos(从Nacos发现Seata Server)
-    nacos:
-      server-addr: 172.24.144.227:8848                # Nacos地址(生产环境)
-      namespace: f9ca025f-b5df-47a9-b3f6-15bcbad3ebd3 # Nacos命名空间(生产环境)
-      group: SEATA_GROUP                              # 注册分组
-      username: nacos                                 # Nacos用户名
-      password: AnrNjNn6zCS3QdIy                      # Nacos密码
-      application: seata-server                       # Seata Server在Nacos的服务名
-      cluster: default                                # Seata集群名
-  config:
-    type: nacos                                       # 配置中心类型:nacos(从Nacos读取Seata配置)
-    nacos:
-      server-addr: 172.24.144.227:8848
-      namespace: f9ca025f-b5df-47a9-b3f6-15bcbad3ebd3
-      group: SEATA_GROUP
-      username: nacos
-      password: AnrNjNn6zCS3QdIy
-      data-id: seata.properties                       # Nacos中的配置data-id
-  application-id: platform-service                    # 应用ID(生产环境固定名称)
-  tx-service-group: my_global_tx_group                # 事务服务组名(生产环境使用独立分组)
-  enable-auto-data-source-proxy: true                 # 自动代理数据源(Seata会自动包装数据源)
-  service:
-    vgroupMapping:
-      my_global_tx_group: default                     # 事务组映射到Seata Server集群(default集群)
-
-
+graylog:
+  host: 172.24.144.227

+ 2 - 2
tenant/costsorrule/src/main/resources/application-dev.yml

@@ -6,10 +6,10 @@ spring:
       password:
       config:
         file-extension: yaml
-        namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
+        namespace: 9fceaca4-c1d2-4bb8-aac9-f64d4b7de73c
         group: DEFAULT_GROUP
       discovery:
-        namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
+        namespace: 9fceaca4-c1d2-4bb8-aac9-f64d4b7de73c
   config:
     import:
       - nacos:mysql

+ 2 - 0
tenant/costsorrule/src/main/resources/application-prod.yml

@@ -17,3 +17,5 @@ spring:
       - nacos:minio
       - nacos:rocketmq
 
+seata:
+  enabled: false

+ 60 - 45
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/util/UploadUtil.java

@@ -3,6 +3,7 @@ package com.jzg.quotation.huatai.crawler.util;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.io.ByteArrayResource;
 import org.springframework.core.io.FileSystemResource;
 import org.springframework.http.*;
 import org.springframework.stereotype.Service;
@@ -70,74 +71,75 @@ public class UploadUtil {
 
     /**
      * 压缩图片并返回 Base64(对应 Python 中的 ys_photo)
+     * 【已改造】无文件创建、纯内存流、保留压缩、返回新base64
      */
     public String ysPhoto(String base64Image) throws Exception {
+        // 1. Base64 解码成字节数组
         byte[] imageBytes = Base64.getDecoder().decode(base64Image);
-        File tempDir = new File(imagesPath + "huatai/");
-        if (!tempDir.exists()) {
-            tempDir.mkdirs();
-        }
-        File zzFile = File.createTempFile(imagesPath + "huatai/" + "upload_temp_zz", ".jpg", tempDir);
-        try (FileOutputStream fos = new FileOutputStream(zzFile)) {
-            fos.write(imageBytes);
-        }
 
-        BufferedImage img = ImageIO.read(zzFile);
+        // 2. 从内存流直接读取图片(不创建文件)
+        ByteArrayInputStream bais = new ByteArrayInputStream(imageBytes);
+        BufferedImage img = ImageIO.read(bais);
+        bais.close();
+
         if (img == null) {
-            throw new IOException("无法读取图片: " + zzFile.getAbsolutePath());
+            throw new IOException("无法读取图片:字节流解析失败");
         }
+
+        // 3. 转 RGB 格式(去掉透明通道,原逻辑保留)
         BufferedImage rgbImg = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_RGB);
         rgbImg.createGraphics().drawImage(img, 0, 0, null);
 
-        File sbFile = File.createTempFile(imagesPath + "huatai/" + "upload_temp_sb", ".jpg", tempDir);
+        // 4. 【重点】内存流压缩,不写文件!
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ImageWriter writer = ImageIO.getImageWritersByFormatName("jpg").next();
         ImageWriteParam param = writer.getDefaultWriteParam();
+
+        // 保留压缩
         param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
         param.setCompressionQuality(0.4f);
-        try (FileImageOutputStream output = new FileImageOutputStream(sbFile)) {
-            writer.setOutput(output);
-            writer.write(null, new IIOImage(rgbImg, null, null), param);
-        } finally {
-            writer.dispose();
-        }
 
-        byte[] resultBytes;
-        try (FileInputStream fis = new FileInputStream(sbFile)) {
-            resultBytes = new byte[(int) sbFile.length()];
-            fis.read(resultBytes);
-        }
-        sbFile.delete();
-        tempDir.delete();
+        // 输出到内存流,不写文件
+        writer.setOutput(ImageIO.createImageOutputStream(baos));
+        writer.write(null, new IIOImage(rgbImg, null, null), param);
+
+        // 5. 清理
+        writer.dispose();
+        img.flush();
+        rgbImg.flush();
+
+        // 6. 压缩后的字节 -> 转 Base64 返回
+        byte[] resultBytes = baos.toByteArray();
+        baos.close();
+
         return Base64.getEncoder().encodeToString(resultBytes);
     }
 
     /**
      * 保存图片并返回尺寸和大小(对应 Python 中的 ys_photo_new)
+     * 【已改造】:不创建任何文件,纯流处理,解决服务器文件权限问题
      */
     public double[] ysPhotoNew(byte[] imageBytes, String imgName) throws Exception {
-        File tempDir = new File(imagesPath + "huatai/");
-        if (!tempDir.exists()) {
-            tempDir.mkdirs();
-        }
-        File originalFile = File.createTempFile(imagesPath + "huatai/" + "upload_temp_" + imgName, ".jpg", tempDir);
-        try (FileOutputStream fos = new FileOutputStream(originalFile)) {
-            fos.write(imageBytes);
-        }
+        // ===================== 1. 直接从字节数组读取图片(零文件) =====================
+        ByteArrayInputStream bais = new ByteArrayInputStream(imageBytes);
+        BufferedImage img = ImageIO.read(bais);
+        bais.close();
 
-        BufferedImage img = ImageIO.read(originalFile);
         if (img == null) {
-            throw new IOException("无法读取图片: " + originalFile.getAbsolutePath());
+            throw new IOException("无法读取图片:字节流解析失败");
         }
 
-        String width = "";
-        String height = "";
-
+        // ===================== 2. 处理透明通道(不变) =====================
         if (img.getColorModel().hasAlpha() || img.getType() == BufferedImage.TYPE_BYTE_INDEXED) {
             BufferedImage rgbImg = new BufferedImage(img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_RGB);
             rgbImg.createGraphics().drawImage(img, 0, 0, null);
             img = rgbImg;
         }
 
+        // ===================== 3. 缩放逻辑(你的原有逻辑,完全不变) =====================
+        String width = "";
+        String height = "";
+
         if (width != null && !width.isEmpty() || height != null && !height.isEmpty()) {
             int originalWidth = img.getWidth();
             int originalHeight = img.getHeight();
@@ -165,17 +167,21 @@ public class UploadUtil {
             img = resizedImg;
         }
 
-        File newFile = File.createTempFile(imagesPath + "huatai/" + imgName + "new", ".jpg", tempDir);
-        ImageIO.write(img, "jpg", newFile);
+        // ===================== 4. 【关键】纯流获取文件大小,不写磁盘 =====================
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ImageIO.write(img, "jpg", baos);
+        byte[] outputBytes = baos.toByteArray();
+        baos.close();
 
+        // 宽、高、大小(KB)—— 完全不需要文件
         int newWidth = img.getWidth();
         int newHeight = img.getHeight();
-        long fileSize = newFile.length();
-        double sizeKb = fileSize / 1024.0;
+        double sizeKb = outputBytes.length / 1024.0;
 
-        newFile.delete();
-        tempDir.delete();
+        // ===================== 5. 释放资源 =====================
+        img.flush();
 
+        // 返回和原来完全一样:[宽度,高度,大小KB]
         return new double[]{newWidth, newHeight, sizeKb};
     }
 
@@ -281,7 +287,7 @@ public class UploadUtil {
         double[] whSize = ysPhotoNew(originalBytes, filename);
         double fileSizeKb = whSize[2];
 
-        File uploadFile = new File(imagesPath + "huatai/" + filename + "new.jpg");
+        //File uploadFile = new File(imagesPath + "huatai/" + filename + "new.jpg");
 
         // 2. 上传文件
         HttpHeaders uploadHeaders = new HttpHeaders();
@@ -307,7 +313,16 @@ public class UploadUtil {
         String uploadUrl = "https://img-web.pc.ehuatai.com/app/ImgFileUpload/upload.do";
 
         MultiValueMap<String, Object> uploadBody = new LinkedMultiValueMap<>();
-        uploadBody.add("file", new FileSystemResource(uploadFile));
+        //uploadBody.add("file", new FileSystemResource(uploadFile));
+        // ByteArrayResource 代替 FileSystemResource,不需要创建文件
+        ByteArrayResource resource = new ByteArrayResource(originalBytes) {
+            @Override
+            public String getFilename() {
+                // 必须重写,否则上传文件名会为null
+                return filename + ".jpg";
+            }
+        };
+        uploadBody.add("file", resource);
         uploadBody.add("token", this.token);
         uploadBody.add("bucket", getUpdataValue("typeTreeNodeVo.bucket"));
         uploadBody.add("storageType", getUpdataValue("storageType"));

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

@@ -414,7 +414,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
             AssertionUtils.isFail(true, "订单已被"+audit.getReceiveUser()+"领取返回待审核订单列表!");
         }
         InsFeeOrders feeOrders = null;
-        SysUserAccount userAccount = null,distributor1 = null,distributor2 = null,distributor3 = null;
+        SysUserAccount userAccount = null;
         if(param.getAuditStatus().equals(1)){
             List<SysUserAccountIncomeLog> incomeLogs = new ArrayList<>();
             StateResult stateFailResult = auditStateListener.statusChange(AuditState.AuditStateEnum.SUCCESS_AUDIT,audit.getAuditStatus()+"");
@@ -447,7 +447,6 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
                 userAccount.setSumAmountUnpaid(feeOrders.getTotalReceivablePremium().add(userAccount.getSumAmount()));
             }
             orgClient.saveOrUpdate(userAccount);
-
             // 进入应收表
             List<String> orderNos = new ArrayList<>();
             orderNos.add(audit.getOrderNo());
@@ -455,42 +454,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
             requestData.put("orderNo",orderNos);
             HttpResult httpResult = orgClient.addReceivable(requestData);
             AssertionUtils.isFail(httpResult.getCode() == 500,"应收出错");
-
-            // 一级分销费用户进账
-            if (feeOrders.getFirstDistributorId() != null && feeOrders.getFirstDistributionFee().compareTo(BigDecimal.ZERO) > 0) {
-                HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getFirstDistributorId());
-                AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
-                SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
-                HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId());
-                AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
-                distributor1 = jzgAccountResult.getData();
-                verifySysAccount(distributor1,jzgInfo,feeOrders);
-            }
-            // 二级分销费用户进账
-            if (feeOrders.getSecondDistributorId() != null && feeOrders.getSecondDistributionFee().compareTo(BigDecimal.ZERO) > 0) {
-                HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getSecondDistributorId());
-                AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
-                SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
-                HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId());
-                AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
-                distributor2 = jzgAccountResult.getData();
-                verifySysAccount(distributor2,jzgInfo,feeOrders);
-            }
-            // 三级分销费用户进账
-            if (feeOrders.getThirdDistributorId() != null && feeOrders.getThirdDistributionFee().compareTo(BigDecimal.ZERO) > 0) {
-                HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getThirdDistributorId());
-                AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
-                SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
-                HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId());
-                AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
-                distributor3 = jzgAccountResult.getData();
-                verifySysAccount(distributor3,jzgInfo,feeOrders);
-            }
-            // 增加账户的金额记录
-            // modify by lipf, 2026年5月20日11:31:59 审核通过后,才需要 生成收入明细日志
-            List<SysUserAccountIncomeLog>builderIncomeLog = this.builderIncomeLog(param.getOrderNo(),feeOrders,userAccount,distributor1,distributor2,distributor3);
-            HttpResult result2 = orgClient.addUserAccountIncomeLog(builderIncomeLog);
-            AssertionUtils.isFail(result2.getCode() != 200,"账户记录添加失败,审核失败");
+            this.dealDistribution(feeOrders,userAccount);
         }else{
             log.info("订单审核驳回:param=[{}]", JSONUtil.toJsonStr(param));
             StateResult stateFailResult = auditStateListener.statusChange(AuditState.AuditStateEnum.FAIL_AUDIT,audit.getAuditStatus()+"");
@@ -512,6 +476,56 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         }
     }
 
+    /**
+     * 分销逻辑处理 (抽取原来的方法)
+     *      根据分销逻辑更新业务员账户的金额信息
+     *
+     * @param feeOrders 订单费用
+     * @param userAccount 业务员账户信息
+     * @author lipf
+     * @date 2026/6/6 10:49
+     */
+    private void dealDistribution(InsFeeOrders feeOrders, SysUserAccount userAccount){
+        log.info("处理分销逻辑。 feeOrders=[{}],userAccount=[{}]", JSONUtil.toJsonStr(feeOrders), JSONUtil.toJsonStr(userAccount));
+        SysUserAccount distributor1 = null,distributor2 = null,distributor3 = null;
+        // 一级分销费用户进账
+        if (feeOrders.getFirstDistributorId() != null && feeOrders.getFirstDistributionFee().compareTo(BigDecimal.ZERO) > 0) {
+            HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getFirstDistributorId());
+            AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
+            SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
+            HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId());
+            AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
+            distributor1 = jzgAccountResult.getData();
+            updateSysAccount(distributor1,jzgInfo,feeOrders);
+        }
+        // 二级分销费用户进账
+        if (feeOrders.getSecondDistributorId() != null && feeOrders.getSecondDistributionFee().compareTo(BigDecimal.ZERO) > 0) {
+            HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getSecondDistributorId());
+            AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
+            SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
+            HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId());
+            AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
+            distributor2 = jzgAccountResult.getData();
+            updateSysAccount(distributor2,jzgInfo,feeOrders);
+        }
+        // 三级分销费用户进账
+        if (feeOrders.getThirdDistributorId() != null && feeOrders.getThirdDistributionFee().compareTo(BigDecimal.ZERO) > 0) {
+            HttpResult<SysUserJzgInfo> jzgInfoResult = orgClient.getUserInfoById(feeOrders.getThirdDistributorId());
+            AssertionUtils.isFail(jzgInfoResult.getCode() != 200,"获取用户失败!");
+            SysUserJzgInfo jzgInfo = jzgInfoResult.getData();
+            HttpResult<SysUserAccount> jzgAccountResult = orgClient.accountGet(jzgInfo.getUserId());
+            AssertionUtils.isFail(jzgAccountResult.getCode() != 200,"获取用户账户失败!");
+            distributor3 = jzgAccountResult.getData();
+            updateSysAccount(distributor3,jzgInfo,feeOrders);
+        }
+        // 增加账户的金额记录
+        // modify by lipf, 2026年5月20日11:31:59 审核通过后,才需要 生成收入明细日志
+        List<SysUserAccountIncomeLog>builderIncomeLog = this.builderIncomeLog(feeOrders.getOrderNo(),feeOrders,userAccount,distributor1,distributor2,distributor3);
+        HttpResult result2 = orgClient.addUserAccountIncomeLog(builderIncomeLog);
+        AssertionUtils.isFail(result2.getCode() != 200,"账户记录添加失败,审核失败");
+    }
+
+
     /**
      * 处理订单关联的权益信息(将权益处理的逻辑抽取到一个单独的方法里面)
      *
@@ -629,10 +643,15 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
      * @param distributor3  3级分销人员
      * @return
      */
-    private List<SysUserAccountIncomeLog> builderIncomeLog(String orderNo,InsFeeOrders feeOrders,SysUserAccount userAccount,SysUserAccount distributor1,
-                                                           SysUserAccount distributor2, SysUserAccount distributor3){
+    private List<SysUserAccountIncomeLog> builderIncomeLog(String orderNo,
+                                                           InsFeeOrders feeOrders,
+                                                           SysUserAccount userAccount,
+                                                           SysUserAccount distributor1,
+                                                           SysUserAccount distributor2,
+                                                           SysUserAccount distributor3){
+        log.info("生成收入明细日志:feeOrders=[{}],userAccount=[{}],distributor1=[{}],distributor2=[{}],distributor3=[{}]",
+                JSONUtil.toJsonStr(feeOrders), JSONUtil.toJsonStr(userAccount), JSONUtil.toJsonStr(distributor1), JSONUtil.toJsonStr(distributor2), JSONUtil.toJsonStr(distributor3));
         List<SysUserAccountIncomeLog> incomeLogs = new ArrayList<>();
-
         // 出口费用
         SysUserAccountIncomeLog exportIncomeLog = new SysUserAccountIncomeLog();
         exportIncomeLog.setOrderId(orderNo);
@@ -678,11 +697,16 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         return incomeLogs;
     }
 
-
-
-    // 验证用户账户
-    public void verifySysAccount(SysUserAccount userAccount, SysUserJzgInfo jzgInfo, InsFeeOrders feeOrders) {
+    /**
+     * 更新分销账户的金额
+     *
+     * @author lipf
+     * @date 2026/6/6 11:20
+     */
+    void updateSysAccount(SysUserAccount userAccount, SysUserJzgInfo jzgInfo, InsFeeOrders feeOrders) {
         if (Objects.isNull(userAccount)) {
+            userAccount = new SysUserAccount();
+            userAccount.setSystemCode(jzgInfo.getSystemCode());
             userAccount.setUserId(jzgInfo.getUserId());
             userAccount.setSumAmount(feeOrders.getFirstDistributionFee());
             userAccount.setSumAmountUnpaid(feeOrders.getFirstDistributionFee());

+ 12 - 38
tenant/insurance/quotation-summary/src/main/resources/application-dev.yaml

@@ -6,10 +6,10 @@ spring:
       password: nacos
       config:
         file-extension: yaml
-        namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
+        namespace: 9fceaca4-c1d2-4bb8-aac9-f64d4b7de73c
         group: DEFAULT_GROUP
       discovery:
-        namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
+        namespace: 9fceaca4-c1d2-4bb8-aac9-f64d4b7de73c
   config:
     import:
       - nacos:mysql
@@ -18,6 +18,8 @@ spring:
       - nacos:mongodb
       - nacos:identify
       - nacos:crawler-config
+      - nacos:rocketmq
+      - nacos:seata-server
   data:
     redis:
       host: 192.168.5.250
@@ -26,34 +28,6 @@ spring:
       database: 0
 
 
-seata:
-  enabled: true                                       # 启用Seata分布式事务
-  application-id: ${spring.application.name}          # 应用ID,使用spring应用名
-  tx-service-group: default_tx_group                  # 事务服务组名
-  enable-auto-data-source-proxy: true                 # 自动代理数据源(Seata会自动包装数据源)
-  registry:
-    type: nacos                                       # 注册中心类型:nacos(从Nacos发现Seata Server)
-    nacos:
-      server-addr: 192.168.5.250:8848                 # Nacos地址
-      namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759 # Nacos命名空间
-      group: SEATA_GROUP                              # 注册分组
-      username: nacos                                 # Nacos用户名
-      password: nacos                                 # Nacos密码
-      application: seata-server                       # Seata Server在Nacos的服务名
-      cluster: default                                # Seata集群名
-  config:
-    type: nacos                                       # 配置中心类型:nacos(从Nacos读取Seata配置)
-    nacos:
-      server-addr: 192.168.5.250:8848
-      namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
-      group: SEATA_GROUP
-      username: nacos
-      password: nacos
-      data-id: seata.properties                       # Nacos中的配置data-id
-  service:
-    vgroupMapping:
-      default_tx_group: default                       # 事务组映射到Seata Server集群(default集群)
-
 #百度图片识别API
 baidu:
   clientId: xG9M8tSjNvYPwSTNavM0ELlD
@@ -62,9 +36,9 @@ baidu:
   vehicle: https://aip.baidubce.com/rest/2.0/ocr/v1/vehicle_license
   idcard: https://aip.baidubce.com/rest/2.0/ocr/v1/idcard
 
-data-scope:
-  tables:
-    - sys_organization_user_link
+#data-scope:
+#  tables:
+#    - sys_organization_user_link
 
 
 image:
@@ -73,7 +47,7 @@ image:
 
 # 支付码相关配置
 qrcode:
-  genAddress: https://tennat.baoxianzhanggui.com/api/order/qrCode/index
+  genAddress: http://127.0.0.1:8001/order/qrCode/index
   imageSrc: http://127.0.0.1:8001/template/
 
 
@@ -165,12 +139,12 @@ huatai:
     sourceCode: '016'
     #    baseUrl: https://gears.pc.ehuatai.com:9003/interFaces/common/AutoInsuranceQuotation.do
     baseUrl: https://hound_t.pc.ehuatai.com/third/interFaces/common/AutoInsuranceQuotation.do
-    selfPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBOtXf1T/no13LOuy5ti+/d+SADHns8hAv3+LjhDFsQRbHk3tHhnUNX7I8b25576AVmgraefS7jnpyB299f58PK8WkWZN+UB6pcyEpktrtqO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oHNXFGqOtxdMiUOuqx19HwNb4gOXZ1WdjWJwSmqC6ZP6OgxKIotCHJwe826Q/w8wIDAQAB
-    huaTaiKey: e1YF83DYB8sj7gEr8M
+    huaTaiKey: AdOdn409KE6Z9XvFsJ
     key: kFl5aiHALbZ6TMTqQDxghMMC
-    tokenUrl: https://vehpxy.pc.ehuatai.com/testsign
+    tokenUrl: https://vehpxy.pc.ehuatai.com/sign
     username: "UE27017723VPN01"
     password: "Dhbx135....."
     comcode: "9270901-营业部代理业务一部"

+ 8 - 6
tenant/insurance/quotation-summary/src/main/resources/application-prod.yaml

@@ -18,6 +18,8 @@ spring:
       - nacos:mongodb
       - nacos:identify
       - nacos:crawler-config
+      - nacos:rocketmq
+      - nacos:seata-server
 
 #百度图片识别API
 baidu:
@@ -130,12 +132,12 @@ huatai:
     sourceCode: '016'
     #    baseUrl: https://gears.pc.ehuatai.com:9003/interFaces/common/AutoInsuranceQuotation.do
     baseUrl: https://hound_t.pc.ehuatai.com/third/interFaces/common/AutoInsuranceQuotation.do
-    selfPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBOtXf1T/no13LOuy5ti+/d+SADHns8hAv3+LjhDFsQRbHk3tHhnUNX7I8b25576AVmgraefS7jnpyB299f58PK8WkWZN+UB6pcyEpktrtqOnKcaQSTbkQzaseCW4sCRdoea0alzSXUuXC2FN0pHAE3JkT07e5doX3IHas2GJAkwIDAQAB
-    selfPrivateKey: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAME61d/VP+ejXcs67Lm2L7935IAMeezyEC/f4uOEMWxBFseTe0eGdQ1fsjxvbnnvoBWaCtp59LuOenIHb31/nw8rxaRZk35QHqlzISmS2u2o6cpxpBJNuRDNqx4JbiwJF2h5rRqXNJdS5cLYU3SkcATcmRPTt7l2hfcgdqzYYkCTAgMBAAECgYAwAAWRDNBLInHyQjj8CR3jWk0Q4giHq7oJqnwaOIRud9zIxwIgym3ZXKRSDvxKn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K5agA/CiuODy7LnzM5QK9aVSCw7k0r8EeGpHcYRdLYZM0vXVFK2gIQctFemK4c6sg5p0Bn1LNRbJG7rgMMEA/OxcF6vyQahhFtPVtAQwc+dT0PV51QJBANd66rfTuxSRvIC/RE4W6iqzed2YZtx+0kd7KiN78Y4X6spposFCH4ALf4jUeRRXZAm+Qu71cq21m2GsQZ8bZdMCQQC096ilZXEjmEuvopQR3JvPbgAF+MtItusyDDsMR1CWwXq9XGMmxi6GhFY7r7C8b40j1IchVAEY5BcwxJwfjql7AkAp5QYZs5reBu/FgGqBXEcvAjIheW4WVLoBl9q7h2+RlujZbexs8rQ5KwMi0VyxLcSPeGR/HU2spHCPbvRbQPJtAkBANK4tIHSnwFz6D6ChRbgyPEDd3YuiXOPNefFpRdQd6L93d9Pl6eKP71v5CTiXYqyczcaz2G4bOrHPp7IMsD0JAkBO/q3ZMT+Nj2jdMn2AR1h+ngn38JnK46PznU0WoRPx72YoWbLxvaGWpu8scZAhpYeq/n+52NHFfu8ayDRNWjP2
     huaTaiPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCYyF2SBNzLOP5N5fFW2T2eQ5+iaI5wVpsedu+UY290TVuG152tkdtSuTXsx+8BKnd79/PF966/2aSP4EUm7vD9kvQUnX2EDUiMooorGvDTRxoHNXFGqOtxdMiUOuqx19HwNb4gOXZ1WdjWJwSmqC6ZP6OgxKIotCHJwe826Q/w8wIDAQAB
-    huaTaiKey: e1YF83DYB8sj7gEr8M
+    huaTaiKey: AdOdn409KE6Z9XvFsJ
     key: kFl5aiHALbZ6TMTqQDxghMMC
-    tokenUrl: https://vehpxy.pc.ehuatai.com/testsign
+    tokenUrl: https://vehpxy.pc.ehuatai.com/sign
     username: "UE27017723VPN01"
     password: "Dhbx135....."
     comcode: "9270901-营业部代理业务一部"
@@ -248,7 +250,7 @@ feign:
     jzg-partner:
       url: http://172.24.144.227:8087/
     jeecg-boot:
-      url: http://172.24.144.227:8082/jeecg-boot
+      url: https://life.baoxianzhanggui.com/locallive-pro-java
 # 和生活服务平台约定的appkey、appSeCret,用于获取token
 live:
   service:
@@ -258,4 +260,4 @@ live:
 localLive:
   base-url: http://192.168.1.108:8082/jeecg-boot
   app-key: _N7dxVy3UJQUNwvacEHUFPzZ63kGwSx1OxXablRXJ9g
-  app-secret: UByV_498NU1unnr3b0hvQtIKbRyIj0HGCkZXxxgzwAU
+  app-secret: UByV_498NU1unnr3b0hvQtIKbRyIj0HGCkZXxxgzwAU

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

@@ -551,6 +551,13 @@ public class ReceivableController {
         return HttpResult.ok(receivableService.platformSettlementExcel(page,settlementQueryVo));
     }
 
+    @PostMapping("/followSettlementExcel")
+    @Operation(summary = "跟单费用结算记录")
+    public HttpResult<Page<ExportSuperviseSettlementExcelDto>> followSettlementExcel(@RequestBody SettlementQueryVo settlementQueryVo) {
+        Page page = settlementQueryVo.getPage();
+        return HttpResult.ok(receivableService.followSettlementExcel(page,settlementQueryVo));
+    }
+
     @DeleteMapping("/deleteSettlementById/{id}")
     @Operation(summary = "删除结算记录")
     public HttpResult<Boolean> deleteSettlementById(@PathVariable String id) {

+ 7 - 0
tenant/organization/src/main/java/com/jzg/organization/mapper/ReceivableMapper.java

@@ -98,6 +98,13 @@ public interface ReceivableMapper extends BaseMapper<InsPlyIncome> {
      */
     Page<ExportSuperviseSettlementExcelDto> platformSettlementExcelDtos(Page page,@Param("settlementQueryVo") SettlementQueryVo settlementQueryVo);
 
+    /**
+     * 获取平台结算记录列表
+     * @param settlementQueryVo
+     * @return
+     */
+    Page<ExportSuperviseSettlementExcelDto> followSettlementExcelDtos(Page page,@Param("settlementQueryVo") SettlementQueryVo settlementQueryVo);
+
     /**
      * 获取应收结算记录明细列表
      * @param settlementQueryVo

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

@@ -442,4 +442,12 @@ public interface ReceivableService extends IService<InsPlyIncome> {
      * @return
      */
     HttpResult<String> followInvoiceAndSettlement(FollowInvoiceAndSettlementVo settlementVo);
+
+    /**
+     * 跟单费用结算记录
+     * @param page
+     * @param settlementQueryVo
+     * @return
+     */
+    Page<ExportSuperviseSettlementExcelDto> followSettlementExcel(Page page, SettlementQueryVo settlementQueryVo);
 }

+ 22 - 5
tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java

@@ -657,7 +657,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         // 2. 数据库校验:是否已存在开票记录
         Integer count = baseMapper.invoicingCheck(invoicingVo);
         if (count > 0) {
-            log.info("数据库已存在开票记录,直接禁止");
+            log.info("数据库已存在开票记录,直接禁止开票");
             return false;
         }
 
@@ -830,7 +830,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
             log.info("开票异常.invoicingVo=[{}]",JSONUtil.toJsonStr(invoicingVo), e);
             // 回滚事务
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-            return null;
+            throw new ServiceException(Objects.toString(e.getMessage(),"开票异常"));
         }
     }
 
@@ -844,9 +844,9 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         if(invoicingVo == null){
             throw new ServiceException("无法开票,开票参数为空");
         }
-        if(StrUtil.isEmpty(invoicingVo.getInvoiceNo())){
-            throw new ServiceException("发票号不能为空");
-        }
+//        if(StrUtil.isEmpty(invoicingVo.getInvoiceNo())){
+//            throw new ServiceException("发票号不能为空");
+//        }
     }
 
     @Override
@@ -2703,6 +2703,23 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         return exportSuperviseSettlementExcelDtos;
     }
 
+    /**
+     * 跟单协议结算记录
+     *
+     * @param settlementQueryVo 查询条件
+     * @return Page<ExportSuperviseSettlementExcelDto>
+     */
+    @Override
+    public Page<ExportSuperviseSettlementExcelDto> followSettlementExcel(Page page, SettlementQueryVo settlementQueryVo) {
+        log.info("查询平台结算记录:settlementQueryVo=[{}]", JSONUtil.toJsonStr(settlementQueryVo));
+        // 设置空条件
+        setNoneCondition(settlementQueryVo);
+        Page<ExportSuperviseSettlementExcelDto> exportSuperviseSettlementExcelDtos = baseMapper.followSettlementExcelDtos(page, settlementQueryVo);
+        // 补充、转换列表的数据
+        supplementaryListData(exportSuperviseSettlementExcelDtos);
+        return exportSuperviseSettlementExcelDtos;
+    }
+
     /**
      * 设置空条件
      * @param settlementQueryVo

+ 3 - 31
tenant/organization/src/main/resources/application-dev.yml

@@ -6,49 +6,21 @@ spring:
       password:
       config:
         file-extension: yaml
-        namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
+        namespace: 9fceaca4-c1d2-4bb8-aac9-f64d4b7de73c
         group: DEFAULT_GROUP
       discovery:
-        namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
+        namespace: 9fceaca4-c1d2-4bb8-aac9-f64d4b7de73c
   config:
     import:
       - nacos:mysql
       - nacos:redisson
       - nacos:minio
       - nacos:rocketmq
+      - nacos:seata-server
 
 config:
   sso: 1
 
-seata:
-  enabled: true                                       # 启用Seata分布式事务
-  application-id: ${spring.application.name}          # 应用ID,使用spring应用名
-  tx-service-group: default_tx_group                  # 事务服务组名
-  enable-auto-data-source-proxy: true                 # 自动代理数据源(Seata会自动包装数据源)
-  registry:
-    type: nacos                                       # 注册中心类型:nacos(从Nacos发现Seata Server)
-    nacos:
-      server-addr: 192.168.5.250:8848                 # Nacos地址
-      namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759 # Nacos命名空间
-      group: SEATA_GROUP                              # 注册分组
-      username: nacos                                 # Nacos用户名
-      password: nacos                                 # Nacos密码
-      application: seata-server                       # Seata Server在Nacos的服务名
-      cluster: default                                # Seata集群名
-  config:
-    type: nacos                                       # 配置中心类型:nacos(从Nacos读取Seata配置)
-    nacos:
-      server-addr: 192.168.5.250:8848
-      namespace: 353f8f05-4d2c-4a17-b64d-b678408f5759
-      group: SEATA_GROUP
-      username: nacos
-      password: nacos
-      data-id: seata.properties                       # Nacos中的配置data-id
-  service:
-    vgroupMapping:
-      default_tx_group: default                       # 事务组映射到Seata Server集群(default集群)
-    disable-global-transaction: false                 # 不禁用全局事务
-
 feign:
   client:
     quotation-summary:

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

@@ -16,6 +16,7 @@ spring:
       - nacos:redisson
       - nacos:minio
       - nacos:rocketmq
+      - nacos:seata-server
 
 config:
   sso: 1
@@ -31,4 +32,3 @@ unionPay:
     bankCardVerifyUrl: https://test-api-open.chinaums.com/v1/datacenter/smartverification/encrypted/bankcard/verify
     publicKey: 0414bb7e9c3914bb65b85079b1dc6e1ca2a0ee04dd9bb55b2f8d31704a6dec0cca695739e128f9c931330e1c0f493be4d56244236434c9d344c4716ba64a4470ba
     privateKey: 24ebfde60aecb81214605050763926ec342c487859a8da57d5badcd3c1559336
-

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

@@ -608,7 +608,7 @@
         AND ipii.is_delete = 0
         AND ipi.is_delete = 0
         AND io.is_delete = 0
-        AND agree.is_delete = 0
+<!--        AND agree.is_delete = 0 modify by lipf 2026年6月6日14:53:23   解决协议被删除后,相关的开票信息,结算信息查询不出来的问题 -->
         <if test="settlementQueryVo.settlementIds != null and settlementQueryVo.settlementIds != ''">
             AND ipiis.id IN
             <foreach collection="settlementQueryVo.settlementIds" item="settlementId" open="(" separator="," close=")">
@@ -658,6 +658,73 @@
         order by ipiis.create_time desc
     </select>
 
+    <select id="followSettlementExcelDtos" resultType="com.jzg.commons.entity.finance.dto.ExportSuperviseSettlementExcelDto">
+        SELECT
+        ipiis.id AS settlementId,
+        -- 拼接需要合并的字段,DISTINCT 去重,SEPARATOR '、' 用顿号分隔
+        GROUP_CONCAT(DISTINCT ipiis.invoice_id SEPARATOR ',') AS invoiceId,
+        GROUP_CONCAT(DISTINCT ipii.company_id SEPARATOR ',') AS company_id,
+        GROUP_CONCAT(DISTINCT eic.name SEPARATOR ',') AS company_name,
+        GROUP_CONCAT(DISTINCT ipii.invoice_type SEPARATOR ',') AS invoice_type,
+        GROUP_CONCAT(DISTINCT ipii.invoice_party SEPARATOR ',') AS invoice_party,
+        GROUP_CONCAT(DISTINCT ipii.tax_point SEPARATOR ',') AS tax_point,
+        -- 金额/日期这类同一settlementId相同的字段,直接取任意一个即可
+        MAX(ipiis.actual_received_amount) AS actual_received_amount,
+        MAX(ipiis.receive_payment_date) AS receive_payment_date,
+        MAX(ipiis.create_by) AS create_by,
+        MAX(ipiis.create_time) AS create_time
+        FROM ins_ply_income_invoice_settlement ipiis
+        LEFT JOIN ins_ply_income_invoice ipii ON ipii.id = ipiis.invoice_id AND ipii.is_delete = 0
+        LEFT JOIN ins_ply_follow_invoice_link link ON link.invoice_id = ipiis.invoice_id AND link.is_delete = 0
+        LEFT JOIN ins_fee_follow_order fo ON fo.id = link.follow_id AND fo.is_delete = 0
+        LEFT JOIN esm_ins_company eic ON ipii.company_id = eic.id  AND eic.is_delete = 0
+        WHERE 1 = 1
+        <if test="settlementQueryVo.settlementIds != null and settlementQueryVo.settlementIds != ''">
+            AND ipiis.id IN
+            <foreach collection="settlementQueryVo.settlementIds" item="settlementId" open="(" separator="," close=")">
+                #{settlementId}
+            </foreach>
+        </if>
+        <if test="settlementQueryVo.invoiceTypes != null and settlementQueryVo.invoiceTypes != ''">
+            AND ipii.invoice_type IN
+            <foreach collection="settlementQueryVo.invoiceTypes" item="invoiceType" open="(" separator="," close=")">
+                #{invoiceType}
+            </foreach>
+        </if>
+        <if test="settlementQueryVo.companyId != null and settlementQueryVo.companyId != ''">
+            and io.company_id = #{settlementQueryVo.companyId}
+        </if>
+        <if test="settlementQueryVo.invoiceParty != null and settlementQueryVo.invoiceParty != ''">
+            and ipii.invoice_party = #{settlementQueryVo.invoiceParty}
+        </if>
+        <if test="settlementQueryVo.invoiceRiskType != null and settlementQueryVo.invoiceRiskType != ''">
+            and ipii.invoice_risk_type = #{settlementQueryVo.invoiceRiskType}
+        </if>
+        <if test="settlementQueryVo.status != null and settlementQueryVo.status != ''">
+            and ipii.status = #{settlementQueryVo.status}
+        </if>
+        <if test="settlementQueryVo.settlementPerson != null and settlementQueryVo.settlementPerson != ''">
+            and ipiis.create_by = #{settlementQueryVo.settlementPerson}
+        </if>
+        <if test="settlementQueryVo.invoiceId != null and settlementQueryVo.invoiceId != ''">
+            AND ipiis.invoice_id = #{settlementQueryVo.invoiceId}
+        </if>
+        <if test="settlementQueryVo.settlementId != null and settlementQueryVo.settlementId != ''">
+            AND ipiis.id = #{settlementQueryVo.settlementId}
+        </if>
+        <if test="settlementQueryVo.settlementDateStart != null and settlementQueryVo.settlementDateStart != ''">
+            and ipiis.create_time >= date(#{settlementQueryVo.settlementDateStart})
+        </if>
+        <if test="settlementQueryVo.settlementDateEndStr != null and settlementQueryVo.settlementDateEndStr != ''">
+            and ipiis.create_time &lt;= date(#{settlementQueryVo.settlementDateEndStr})
+        </if>
+        <if test="settlementQueryVo.settlementId != null and settlementQueryVo.settlementId != ''">
+            AND ipiis.id = #{settlementQueryVo.settlementId}
+        </if>
+        GROUP BY ipiis.id
+        order by ipiis.create_time desc
+    </select>
+
 <!--    <select id="getSuperviseSettlementExcelDtos" resultType="com.jzg.commons.entity.finance.dto.ExportSuperviseSettlementExcelDto">-->
 <!--        select-->
 <!--            ipiis.id as settlementId,-->
@@ -1131,6 +1198,7 @@
         SELECT count(id) AS count
         FROM ins_ply_income_invoice_link
         <where>
+            is_delete = 0
             <if test="invoicingVo.incomeIds != null and invoicingVo.incomeIds.size > 0">
                 AND income_id IN
                 <foreach collection="invoicingVo.incomeIds"
@@ -1195,8 +1263,7 @@
             eic.name_simple as companyNameSimple,
             sum( ipiis.actual_received_amount ) AS actual_received_amount,
             ipii.status,
-            ipii.payment_reason,
-            ipiis.settlementPaymentReason
+            ipii.payment_reason
         FROM
             ins_ply_income_invoice ipii
                 LEFT JOIN ins_ply_income_invoice_settlement ipiis ON ipii.id = ipiis.invoice_id