Explorar o código

Merge remote-tracking branch 'origin/dev_spt' into dev-xcq

# Conflicts:
#	sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/req/LogisticsReq.java
#	sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpLedgerLogisticsService.java
xucaiqin %!s(int64=2) %!d(string=hai) anos
pai
achega
20340ddcf4
Modificáronse 71 ficheiros con 3411 adicións e 167 borrados
  1. 15 1
      pom.xml
  2. 28 0
      sckw-auth/src/main/resources/bootstrap-xcq.yml
  3. 1 1
      sckw-auth/src/main/resources/bootstrap.yml
  4. 24 0
      sckw-gateway/src/main/resources/bootstrap-xcq.yml
  5. 1 1
      sckw-gateway/src/main/resources/bootstrap.yml
  6. 28 0
      sckw-modules/sckw-contract/src/main/resources/bootstrap-xcq.yml
  7. 1 1
      sckw-modules/sckw-contract/src/main/resources/bootstrap.yml
  8. 29 0
      sckw-modules/sckw-example/src/main/resources/bootstrap-xcq.yml
  9. 5 1
      sckw-modules/sckw-example/src/main/resources/bootstrap.yml
  10. 29 0
      sckw-modules/sckw-file/src/main/resources/bootstrap-xcq.yml
  11. 1 1
      sckw-modules/sckw-file/src/main/resources/bootstrap.yml
  12. 28 0
      sckw-modules/sckw-fleet/src/main/resources/bootstrap-xcq.yml
  13. 1 1
      sckw-modules/sckw-fleet/src/main/resources/bootstrap.yml
  14. 28 0
      sckw-modules/sckw-manage/src/main/resources/bootstrap-xcq.yml
  15. 1 1
      sckw-modules/sckw-manage/src/main/resources/bootstrap.yml
  16. 29 0
      sckw-modules/sckw-message/src/main/resources/bootstrap-xcq.yml
  17. 1 1
      sckw-modules/sckw-message/src/main/resources/bootstrap.yml
  18. 28 0
      sckw-modules/sckw-operation/src/main/resources/bootstrap-xcq.yml
  19. 29 0
      sckw-modules/sckw-order/src/main/resources/bootstrap-xcq.yml
  20. 1 1
      sckw-modules/sckw-order/src/main/resources/bootstrap.yml
  21. 115 6
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/KwpSettlementLogisticsController.java
  22. 47 6
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/KwpSettlementOfflineController.java
  23. 102 6
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/KwpSettlementTradeController.java
  24. 76 6
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/KwpSettlementWalletController.java
  25. 70 3
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementLogisticsMapper.java
  26. 13 3
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementOfflineMapper.java
  27. 20 3
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementWalletMapper.java
  28. 4 4
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/KwpSettlementLogistics.java
  29. 20 4
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/KwpSettlementOffline.java
  30. 4 4
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/KwpSettlementTrade.java
  31. 56 4
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/KwpSettlementWallet.java
  32. 16 5
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/constant/SettlementEnum.java
  33. 36 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/constant/SettlementWalletPayTypeEnum.java
  34. 2 2
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/LedgerTradeDto.java
  35. 174 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementLogisticsDto.java
  36. 80 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementLogisticsTrackDto.java
  37. 122 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementOfflineDto.java
  38. 142 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementTradeDto.java
  39. 80 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementTradeTrackDto.java
  40. 133 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementWalletDto.java
  41. 12 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/req/SettlementOfflineReq.java
  42. 51 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/req/SettlementReq.java
  43. 26 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/req/SettlementWalletReq.java
  44. 3 3
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/LedgerLogisticsVo.java
  45. 3 3
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/LedgerTradeVo.java
  46. 35 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/SettlementLogisticsStatusCountVo.java
  47. 35 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/SettlementLogisticsSumVo.java
  48. 160 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/SettlementLogisticsVo.java
  49. 102 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/SettlementOfflineVo.java
  50. 83 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/SettlementWalletVo.java
  51. 5 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpLedgerLogisticsService.java
  52. 179 3
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementLogisticsService.java
  53. 11 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementLogisticsTrackService.java
  54. 145 1
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementOfflineService.java
  55. 83 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementTradeService.java
  56. 11 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementTradeTrackService.java
  57. 215 3
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementWalletService.java
  58. 48 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/utils/CommonValidator.java
  59. 39 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/utils/PageMoreRes.java
  60. 24 0
      sckw-modules/sckw-payment/src/main/resources/bootstrap-pdy.yml
  61. 28 0
      sckw-modules/sckw-payment/src/main/resources/bootstrap-xcq.yml
  62. 1 1
      sckw-modules/sckw-payment/src/main/resources/bootstrap.yml
  63. 260 29
      sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementLogisticsMapper.xml
  64. 61 32
      sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementOfflineMapper.xml
  65. 80 22
      sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementWalletMapper.xml
  66. 29 0
      sckw-modules/sckw-product/src/main/resources/bootstrap-xcq.yml
  67. 1 1
      sckw-modules/sckw-product/src/main/resources/bootstrap.yml
  68. 29 0
      sckw-modules/sckw-system/src/main/resources/bootstrap-xcq.yml
  69. 1 1
      sckw-modules/sckw-system/src/main/resources/bootstrap.yml
  70. 29 0
      sckw-modules/sckw-transport/src/main/resources/bootstrap-xcq.yml
  71. 2 2
      sckw-modules/sckw-transport/src/main/resources/bootstrap.yml

+ 15 - 1
pom.xml

@@ -336,7 +336,21 @@
         </dependencies>
     </dependencyManagement>
 
-
+    <profiles>
+        <profile>
+            <id>pdy</id>
+            <properties>
+                <!-- 环境标识,需要与配置文件的名称相对应 -->
+                <profiles.active>pdy</profiles.active>
+                <nacos.server>10.10.10.230:8848</nacos.server>
+                <nacos.namespace>sckw_pdy</nacos.namespace>
+            </properties>
+            <activation>
+                <!-- 默认环境 -->
+                <activeByDefault>true</activeByDefault>
+            </activation>
+        </profile>
+    </profiles>
     <build>
         <pluginManagement>
             <plugins>

+ 28 - 0
sckw-auth/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,28 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 1 - 1
sckw-auth/src/main/resources/bootstrap.yml

@@ -5,7 +5,7 @@ spring:
   application:
     name: sckw-auth
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
 

+ 24 - 0
sckw-gateway/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,24 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr:  @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+

+ 1 - 1
sckw-gateway/src/main/resources/bootstrap.yml

@@ -9,5 +9,5 @@ spring:
     name: sckw-gateway
   profiles:
     # 环境配置
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
 

+ 28 - 0
sckw-modules/sckw-contract/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,28 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 1 - 1
sckw-modules/sckw-contract/src/main/resources/bootstrap.yml

@@ -5,7 +5,7 @@ spring:
   application:
     name: sckw-contract
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
     allow-circular-references: true

+ 29 - 0
sckw-modules/sckw-example/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,29 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 5 - 1
sckw-modules/sckw-example/src/main/resources/bootstrap.yml

@@ -5,7 +5,11 @@ spring:
   application:
     name: sckw-example
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
     allow-circular-references: true
+logging:
+  level:
+    root: debug
+    com.sckw.example: debug

+ 29 - 0
sckw-modules/sckw-file/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,29 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 1 - 1
sckw-modules/sckw-file/src/main/resources/bootstrap.yml

@@ -5,7 +5,7 @@ spring:
   application:
     name: sckw-file
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
     allow-circular-references: true

+ 28 - 0
sckw-modules/sckw-fleet/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,28 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 1 - 1
sckw-modules/sckw-fleet/src/main/resources/bootstrap.yml

@@ -5,7 +5,7 @@ spring:
   application:
     name: sckw-fleet
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
     allow-circular-references: true

+ 28 - 0
sckw-modules/sckw-manage/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,28 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 1 - 1
sckw-modules/sckw-manage/src/main/resources/bootstrap.yml

@@ -5,7 +5,7 @@ spring:
   application:
     name: sckw-system
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
     allow-circular-references: true

+ 29 - 0
sckw-modules/sckw-message/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,29 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 1 - 1
sckw-modules/sckw-message/src/main/resources/bootstrap.yml

@@ -5,7 +5,7 @@ spring:
   application:
     name: sckw-message
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
     allow-circular-references: true

+ 28 - 0
sckw-modules/sckw-operation/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,28 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 29 - 0
sckw-modules/sckw-order/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,29 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 1 - 1
sckw-modules/sckw-order/src/main/resources/bootstrap.yml

@@ -5,7 +5,7 @@ spring:
   application:
     name: sckw-order
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
     allow-circular-references: true

+ 115 - 6
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/KwpSettlementLogisticsController.java

@@ -1,13 +1,122 @@
 package com.sckw.payment.controller;
+
+import com.sckw.core.exception.BusinessException;
+import com.sckw.core.model.page.PageRes;
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.excel.utils.ExcelUtil;
+import com.sckw.payment.model.constant.LogisticsUnitType;
+import com.sckw.payment.model.dto.SettlementLogisticsDto;
+import com.sckw.payment.model.vo.req.SettlementReq;
+import com.sckw.payment.model.vo.res.SettlementLogisticsVo;
+import com.sckw.payment.service.KwpSettlementLogisticsService;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.Valid;
+import org.springframework.beans.BeanUtils;
+import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+import java.util.stream.Collectors;
+
 /**
-* 结算-物流订单
-*
-* @author xucaiqin
-*/
+ * 结算-物流订单
+ *
+ * @author Aick Spt
+ * @date 2023-07-18 16:34
+ */
 @RestController
-@RequestMapping("/kwp_settlement_logistics")
+@RequestMapping(name = "结算-物流运费订单", path = "/kwpSettlementLogistics")
 public class KwpSettlementLogisticsController {
-    
+
+    @Resource
+    private KwpSettlementLogisticsService kwpSettlementLogisticsService;
+
+    //   ========= 运费收款 承运方 =========
+    @PostMapping(name = "运费收款-物流订单列表", path = "pageListCollection")
+    public HttpResult pageSelectCollection(@RequestBody @Valid SettlementReq settlementReq) {
+        return HttpResult.ok(kwpSettlementLogisticsService.pageSelectCollection(settlementReq));
+    }
+
+    @PostMapping(name = "运费收款-物流订单各状态列表总数", path = "getCountListCollection")
+    public HttpResult getCountListCollection(@RequestBody @Valid SettlementReq settlementReq) {
+        return HttpResult.ok(kwpSettlementLogisticsService.getCountListCollection(settlementReq));
+    }
+
+    @PostMapping(name = "运费收款-根据条件导出物流订单表数据", path = "exportCollection")
+    public HttpResult exportCollection(HttpServletResponse response, @RequestBody @Valid SettlementReq settlementReq) {
+        List<SettlementLogisticsDto> list;
+        if (CollectionUtils.isEmpty(settlementReq.getIds()) && settlementReq.getPage() != 0 && settlementReq.getPageSize() != 0) {
+            //有page、pageSize,无ids
+            PageRes<SettlementLogisticsDto> pageResult = kwpSettlementLogisticsService.pageSelectCollection(settlementReq);
+            list = pageResult.getList();
+        } else if (CollectionUtils.isEmpty(settlementReq.getIds())) {
+            //无page、pageSize,无ids
+            list = kwpSettlementLogisticsService.selectList(LogisticsUnitType.CARRIER);
+        } else {
+            //有ids
+            list = kwpSettlementLogisticsService.selectList(settlementReq.getIds());
+        }
+        return this.export(response, list);
+    }
+
+    @GetMapping(name = "运费收款-物流订单详情", path = "detailCollection")
+    public HttpResult detailCollection(@RequestParam("id") Long id) {
+        return HttpResult.ok(kwpSettlementLogisticsService.detailCollection(id));
+    }
+
+
+    //   ========= 运费付款 托运方 =========
+    @PostMapping(name = "运费付款-物流订单列表", path = "pageListPayment")
+    public HttpResult pageSelectPayment(@RequestBody @Valid SettlementReq settlementReq) {
+        return HttpResult.ok(kwpSettlementLogisticsService.pageSelectPayment(settlementReq));
+    }
+
+    @PostMapping(name = "运费付款-物流订单各状态列表总数", path = "getCountListPayment")
+    public HttpResult getCountListPayment(@RequestBody @Valid SettlementReq settlementReq) {
+        return HttpResult.ok(kwpSettlementLogisticsService.getCountListPayment(settlementReq));
+    }
+
+    @PostMapping(name = "运费付款-根据条件导出物流订单表数据", path = "exportPayment")
+    public HttpResult exportPayment(HttpServletResponse response, @RequestBody @Valid SettlementReq settlementReq) {
+        List<SettlementLogisticsDto> list;
+        if (CollectionUtils.isEmpty(settlementReq.getIds()) && settlementReq.getPage() != 0 && settlementReq.getPageSize() != 0) {
+            //有page、pageSize,无ids
+            PageRes<SettlementLogisticsDto> pageResult = kwpSettlementLogisticsService.pageSelectPayment(settlementReq);
+            list = pageResult.getList();
+        } else if (CollectionUtils.isEmpty(settlementReq.getIds())) {
+            //无page、pageSize,无ids
+            list = kwpSettlementLogisticsService.selectList(LogisticsUnitType.SHIPPER);
+        } else {
+            //有ids
+            list = kwpSettlementLogisticsService.selectList(settlementReq.getIds());
+        }
+        return this.export(response, list);
+    }
+
+    @GetMapping(name = "物流订单详情", path = "detailPayment")
+    public HttpResult detailPayment(@RequestParam("id") Long id) {
+        return HttpResult.ok(kwpSettlementLogisticsService.detailPayment(id));
+    }
+
+    /**
+     * 导出
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 15:49
+     */
+    private HttpResult export(HttpServletResponse response, List<SettlementLogisticsDto> list) {
+        if (CollectionUtils.isEmpty(list)) {
+            return HttpResult.error("没有可导出的数据");
+        }
+        List<SettlementLogisticsVo> collect = list.stream().map(a -> {
+            SettlementLogisticsVo settlementLogisticsVo = new SettlementLogisticsVo();
+            BeanUtils.copyProperties(a, settlementLogisticsVo);
+            return settlementLogisticsVo;
+        }).collect(Collectors.toList());
+        ExcelUtil.downData(response, SettlementLogisticsVo.class, collect);
+        return null;
+    }
+
+
 }

+ 47 - 6
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/KwpSettlementOfflineController.java

@@ -1,13 +1,54 @@
 package com.sckw.payment.controller;
+
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.payment.model.vo.req.SettlementOfflineReq;
+import com.sckw.payment.model.vo.req.SettlementReq;
+import com.sckw.payment.service.KwpSettlementOfflineService;
+import jakarta.annotation.Resource;
+import jakarta.validation.Valid;
 import org.springframework.web.bind.annotation.*;
 
 /**
-* 下线结算记录(交易订单结算/物流订单结算)
-*
-* @author xucaiqin
-*/
+ * 结算-线下记录(交易订单结算/物流订单结算)
+ *
+ * @author Aick Spt
+ * @date 2023-07-20 11:42
+ */
 @RestController
-@RequestMapping("/kwp_settlement_offline")
+@RequestMapping(name = "结算-线下记录", path = "/kwpSettlementOffline")
 public class KwpSettlementOfflineController {
-    
+
+    @Resource
+    private KwpSettlementOfflineService kwpSettlementOfflineService;
+
+    //  =========  运费收款  =========
+
+    @PostMapping(name = "物流-线下付款(运费收款)记录-列表", path = "pageListLogisticsCollection")
+    public HttpResult pageListLogisticsCollection(@RequestBody @Valid SettlementOfflineReq settlementOfflineReq) {
+        return HttpResult.ok(kwpSettlementOfflineService.pageListLogisticsCollection(settlementOfflineReq));
+    }
+
+    @GetMapping(name = "物流-线下付款(运费收款)记录-详情", path = "detailLogisticsCollection")
+    public HttpResult detailLogisticsCollection(@RequestParam("id") Long id) {
+        return HttpResult.ok(kwpSettlementOfflineService.detailLogisticsCollection(id));
+    }
+
+    @GetMapping(name = "物流-线下付款(运费收款)记录-新增", path = "confirmLogisticsCollection")
+    public HttpResult confirmLogisticsCollection(@RequestParam("id") Long id, @RequestParam("price") Float price) {
+        return HttpResult.ok(kwpSettlementOfflineService.confirmLogisticsCollection(id, price));
+    }
+
+
+    //  =========  销售收款  =========
+
+    @PostMapping(name = "交易-线下付款(销售收款)记录-列表", path = "pageListTradeCollection")
+    public HttpResult pageListTradeCollection(@RequestBody @Valid SettlementOfflineReq settlementOfflineReq) {
+        return HttpResult.ok(kwpSettlementOfflineService.pageListTradeCollection(settlementOfflineReq));
+    }
+
+    @GetMapping(name = "交易-线下付款(销售收款)记录-新增",path = "confirmTradeCollection")
+    public HttpResult confirmTradeCollection(@RequestParam("id") Long id,@RequestParam("price") Float price){
+        return HttpResult.ok(kwpSettlementOfflineService.confirmTradeCollection(id,price));
+    }
+
 }

+ 102 - 6
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/KwpSettlementTradeController.java

@@ -1,13 +1,109 @@
 package com.sckw.payment.controller;
+
+import com.sckw.core.model.page.PageRes;
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.excel.utils.ExcelUtil;
+import com.sckw.payment.model.dto.SettlementTradeDto;
+import com.sckw.payment.model.vo.req.SettlementReq;
+import com.sckw.payment.model.vo.res.SettlementLogisticsVo;
+import com.sckw.payment.service.KwpSettlementTradeService;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.Valid;
+import org.springframework.beans.BeanUtils;
+import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+import java.util.stream.Collectors;
+
 /**
-* 结算-交易订单
-*
-* @author xucaiqin
-*/
+ * 结算-交易订单
+ *
+ * @author xucaiqin
+ */
 @RestController
-@RequestMapping("/kwp_settlement_trade")
+@RequestMapping(name = "结算-销售采购订单", path = "/kwpSettlementTrade")
 public class KwpSettlementTradeController {
-    
+
+    @Resource
+    private KwpSettlementTradeService kwpSettlementTradeService;
+
+    //   ========= 收款 销售 =========
+    @PostMapping(name = "收款-销售结算单列表", path = "pageListCollection")
+    public HttpResult pageListCollection(@RequestBody @Valid SettlementReq settlementReq) {
+        return HttpResult.ok(kwpSettlementTradeService.pageListCollection(settlementReq));
+    }
+
+    @GetMapping(name = "收款-销售结算单列表头部汇总数量", path = "getCountListCollection")
+    public HttpResult getCountListCollection(@RequestBody @Valid SettlementReq settlementReq) {
+        return HttpResult.ok(kwpSettlementTradeService.getCountListCollection(settlementReq));
+    }
+
+    @PostMapping(name = "收款-根据ids导出销售结算单列表", path = "exportCollection")
+    public HttpResult exportCollection(HttpServletResponse response, @RequestBody @Valid SettlementReq settlementReq) {
+        List<SettlementTradeDto> list;
+        if (CollectionUtils.isEmpty(settlementReq.getIds())) {
+            PageRes<SettlementTradeDto> pageResult = kwpSettlementTradeService.pageListCollection(settlementReq);
+            list = pageResult.getList();
+        } else {
+            list = kwpSettlementTradeService.selectList(settlementReq.getIds());
+        }
+        return this.export(response, list);
+    }
+
+    @GetMapping(name = "收款-销售结算订单详情", path = "detailCollection")
+    public HttpResult detailCollection(@RequestParam("id") Long id) {
+        return HttpResult.ok(kwpSettlementTradeService.detailCollection(id));
+    }
+
+
+    //   ========= 付款 采购 =========
+    @PostMapping(name = "付款-采购结算单列表", path = "pageListPayment")
+    public HttpResult pageListPayment(@RequestBody @Valid SettlementReq settlementReq) {
+        return HttpResult.ok(kwpSettlementTradeService.pageListPayment(settlementReq));
+    }
+
+    @GetMapping(name = "收款-物流结算订单列表头部汇总数量", path = "getCountListPayment")
+    public HttpResult getCountListPayment(@RequestBody @Valid SettlementReq settlementReq) {
+        return HttpResult.ok(kwpSettlementTradeService.getCountListPayment(settlementReq));
+    }
+
+    @PostMapping(name = "付款-根据ids导出采购结算单列表", path = "exportPayment")
+    public HttpResult exportPayment(HttpServletResponse response, @RequestBody @Valid SettlementReq settlementReq) {
+        List<SettlementTradeDto> list;
+        if (CollectionUtils.isEmpty(settlementReq.getIds())) {
+            PageRes<SettlementTradeDto> pageResult = kwpSettlementTradeService.pageListPayment(settlementReq);
+            list = pageResult.getList();
+        } else {
+            list = kwpSettlementTradeService.selectList(settlementReq.getIds());
+        }
+        return this.export(response, list);
+    }
+
+    @GetMapping(name = "付款-采购结算订单详情", path = "detailPayment")
+    public HttpResult detailPayment(@RequestParam("id") Long id) {
+        return HttpResult.ok(kwpSettlementTradeService.detailPayment(id));
+    }
+
+    /**
+     * 导出
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 15:49
+     */
+    private HttpResult export(HttpServletResponse response, List<SettlementTradeDto> list) {
+        if (CollectionUtils.isEmpty(list)) {
+            return HttpResult.error("没有可导出的数据");
+        }
+        List<SettlementLogisticsVo> collect = list.stream().map(a -> {
+            SettlementLogisticsVo settlementLogisticsVo = new SettlementLogisticsVo();
+            BeanUtils.copyProperties(a, settlementLogisticsVo);
+            return settlementLogisticsVo;
+        }).collect(Collectors.toList());
+        ExcelUtil.downData(response, SettlementLogisticsVo.class, collect);
+        return null;
+    }
+
+
 }

+ 76 - 6
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/controller/KwpSettlementWalletController.java

@@ -1,13 +1,83 @@
 package com.sckw.payment.controller;
+
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.payment.model.vo.req.SettlementReq;
+import com.sckw.payment.model.vo.req.SettlementWalletReq;
+import com.sckw.payment.service.KwpSettlementWalletService;
+import jakarta.annotation.Resource;
+import jakarta.validation.Valid;
 import org.springframework.web.bind.annotation.*;
 
 /**
-* 电子钱包结算记录(交易订单结算/物流订单结算)
-*
-* @author xucaiqin
-*/
+ * 结算-电子钱包结算记录(交易订单结算/物流订单结算)
+ *
+ * @author Aick Spt
+ * @date 2023-07-20 14:42
+ */
 @RestController
-@RequestMapping("/kwp_settlement_wallet")
+@RequestMapping(name = "结算-电子钱包结算记录", path = "/kwpSettlementWallet")
 public class KwpSettlementWalletController {
-    
+
+    //  =========  物流付款  =========
+
+    @Resource
+    private KwpSettlementWalletService kwpSettlementWalletService;
+
+    @PostMapping(name = "物流-电子钱包付款(货到付款)结算记录-列表", path = "pageListLogisticsPayment")
+    public HttpResult pageListLogisticsPayment(SettlementWalletReq settlementWalletReq) {
+        return HttpResult.ok(kwpSettlementWalletService.pageListLogisticsPayment(settlementWalletReq));
+    }
+
+    @GetMapping(name = "物流-电子钱包付款(货到付款)结算记录-详情", path = "detailLogisticsPayment")
+    public HttpResult detailLogisticsPayment(@RequestParam("id") Long id) {
+        return HttpResult.ok(kwpSettlementWalletService.detailLogisticsPayment(id));
+    }
+
+    /**
+     * @param id    结算单id
+     * @param price 本次付款金额
+     * @author Aick Spt
+     * @date 2023-07-25 09:55
+     */
+    @GetMapping(name = "物流-电子钱包付款(货到付款)结算记录-新增", path = "confirmLogisticsPayment")
+    public HttpResult confirmLogisticsPayment(@RequestParam("id") Long id, @RequestParam("price") Float price) {
+        return HttpResult.ok(kwpSettlementWalletService.confirmLogisticsPayment(id, price));
+    }
+
+
+
+    //  =========  销售收付款  =========
+    @PostMapping(name = "销售-付款记录列表(采购电子钱包结算记录)", path = "pageListTradePayment")
+    public HttpResult pageListTradePayment(SettlementWalletReq settlementWalletReq) {
+        return HttpResult.ok(kwpSettlementWalletService.pageListTradePayment(settlementWalletReq));
+    }
+
+    /**
+     * @param id    结算单id
+     * @param price 本次付款金额
+     * @author Aick Spt
+     * @date 2023-07-25 09:55
+     */
+    @GetMapping(name = "销售-付款确认-(新增电子钱包记录-采购货到付款)", path = "confirmTradePayment")
+    public HttpResult confirmTradePayment(@RequestParam("id") Long id, @RequestParam("price") Float price) {
+        return HttpResult.ok(kwpSettlementWalletService.confirmTradePayment(id, price));
+    }
+
+    @PostMapping(name = "销售-收款记录列表-预付款(电子钱包)", path = "pageListTradeCollection")
+    public HttpResult pageListTradeCollection(SettlementWalletReq settlementWalletReq) {
+        return HttpResult.ok(kwpSettlementWalletService.pageListTradeCollection(settlementWalletReq));
+    }
+
+    /**
+     * @param id    结算单id
+     * @param price 本次付款金额
+     * @author Aick Spt
+     * @date 2023-07-25 09:55
+     */
+    @GetMapping(name = "销售-收款确认-预付款(电子钱包)", path = "confirmTradeCollection")
+    public HttpResult confirmTradeCollection(@RequestParam("id") Long id, @RequestParam("price") Float price) {
+        return HttpResult.ok(kwpSettlementWalletService.confirmTradeCollection(id, price));
+    }
+
+
 }

+ 70 - 3
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementLogisticsMapper.java

@@ -2,13 +2,80 @@ package com.sckw.payment.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.payment.model.KwpSettlementLogistics;
+import com.sckw.payment.model.dto.SettlementLogisticsDto;
+import com.sckw.payment.model.vo.req.SettlementReq;
+import com.sckw.payment.model.vo.res.SettlementLogisticsSumVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
- * @author xucaiqin
- * @date 2023-07-10 16:42:20
+ * @author Aick Spt
+ * @date 2023-07-24 14:55
  */
-
 @Mapper
 public interface KwpSettlementLogisticsMapper extends BaseMapper<KwpSettlementLogistics> {
+
+    /**
+     * 运费收款-物流订单列表
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:21
+     */
+    List<SettlementLogisticsDto> pageSelectCollection(@Param("settlementReq") SettlementReq settlementReq);
+
+
+    SettlementLogisticsSumVo selectCollectionSum(@Param("settlementReq") SettlementReq settlementReq);
+
+
+    /**
+     * 运费收款-物流订单各状态列表总数
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:21
+     */
+    Long getCountListCollection(@Param("settlementReq") SettlementReq settlementReq);
+
+    /**
+     * 运费收款-物流订单详情
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:22
+     */
+    SettlementLogisticsDto detailCollection(@Param("id") Long id);
+
+
+    /**
+     * 运费付款-物流订单列表
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:23
+     */
+    List<SettlementLogisticsDto> pageSelectPayment(@Param("settlementReq") SettlementReq settlementReq);
+
+    /**
+     * 运费付款-物流订单各状态列表总数
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:23
+     */
+    Long getCountListPayment(@Param("settlementReq") SettlementReq settlementReq);
+
+    /**
+     * 运费付款-物流订单详情
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:24
+     */
+    SettlementLogisticsDto detailPayment(@Param("id") Long id);
+
+    /**
+     * 根据id查物流结算订单
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:24
+     */
+    List<SettlementLogisticsDto> selectIds(@Param("ids") List<Long> ids);
+    List<SettlementLogisticsDto> selectList(@Param("unitType") Integer unitType);
 }

+ 13 - 3
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementOfflineMapper.java

@@ -2,13 +2,23 @@ package com.sckw.payment.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.payment.model.KwpSettlementOffline;
+import com.sckw.payment.model.dto.SettlementOfflineDto;
+import com.sckw.payment.model.vo.req.SettlementOfflineReq;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
- * @author xucaiqin
- * @date 2023-07-10 16:42:19
+ *
+ * @author Aick Spt
+ * @date 2023-07-25 10:44
  */
-
 @Mapper
 public interface KwpSettlementOfflineMapper extends BaseMapper<KwpSettlementOffline> {
+    List<SettlementOfflineDto> pageListLogisticsCollection(SettlementOfflineReq settlementOfflineReq);
+
+    SettlementOfflineDto detailLogisticsCollection(@Param("id") Long id);
+
+    Integer confirmLogisticsCollection(@Param("id") Long id,@Param("price") Float price);
 }

+ 20 - 3
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/dao/KwpSettlementWalletMapper.java

@@ -1,14 +1,31 @@
 package com.sckw.payment.dao;
 
+import java.util.List;
+
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.sckw.payment.model.KwpSettlementWallet;
+import com.sckw.payment.model.dto.SettlementWalletDto;
+import com.sckw.payment.model.vo.req.SettlementWalletReq;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 /**
- * @author xucaiqin
- * @date 2023-07-10 16:42:20
+ * @author Aick Spt
+ * @date 2023-07-25 11:01
  */
 
 @Mapper
-public interface KwpSettlementWalletMapper extends BaseMapper<KwpSettlementWallet> {
+public interface KwpSettlementWalletMapper  extends BaseMapper<KwpSettlementWallet> {
+
+    /**
+     * 运费付款-物流订单列表
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:23
+     */
+    List<SettlementWalletDto> pageListLogisticsPayment(@Param("settlementWalletReq") SettlementWalletReq settlementWalletReq);
+
+    SettlementWalletDto detailLogisticsPayment(@Param("id") Long id);
+
+    Integer confirmLogisticsPayment(@Param("id") Long id, @Param("price") Float price);
 }

+ 4 - 4
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/KwpSettlementLogistics.java

@@ -73,25 +73,25 @@ public class KwpSettlementLogistics {
     private String remark;
 
     /**
-     * 对账审核人名称
+     * 对账托运方财务联系人
      */
     @TableField(value = "audit_user")
     private String auditUser;
 
     /**
-     * 对账审核人电话
+     * 对账托运方财务联系人电话
      */
     @TableField(value = "audit_phone")
     private String auditPhone;
 
     /**
-     * 对账完成人名称
+     * 对账承运方财务联系人
      */
     @TableField(value = "success_user")
     private String successUser;
 
     /**
-     * 对账完成人电话
+     * 对账承运方财务联系人电话
      */
     @TableField(value = "success_phone")
     private String successPhone;

+ 20 - 4
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/KwpSettlementOffline.java

@@ -11,13 +11,10 @@ import lombok.Setter;
 import lombok.ToString;
 
 /**
+ * 线下结算记录(交易订单结算/物流订单结算)
  * @author xucaiqin
  * @date 2023-07-10 16:42:19
  */
-
-/**
- * 下线结算记录(交易订单结算/物流订单结算)
- */
 @Getter
 @Setter
 @ToString
@@ -151,4 +148,23 @@ public class KwpSettlementOffline {
      */
     @TableField(value = "del_flag")
     private Integer delFlag;
+
+    /**
+     * 结算单类型 1-物流 2-贸易
+     */
+    @TableField(value = "order_type")
+    private Integer orderType;
+
+    /**
+     * 待付金额
+     */
+    @TableField(value = "topay_price")
+    private BigDecimal topayPrice;
+
+    /**
+     * 付款附件
+     */
+    @TableField(value = "url")
+    private String url;
+
 }

+ 4 - 4
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/KwpSettlementTrade.java

@@ -70,25 +70,25 @@ public class KwpSettlementTrade {
     private LocalDateTime receiptTime;
 
     /**
-     * 对账审核人名称
+     * 对账采购财务联系人名称
      */
     @TableField(value = "audit_user")
     private String auditUser;
 
     /**
-     * 对账审核人电话
+     * 对账采购财务联系人电话
      */
     @TableField(value = "audit_phone")
     private String auditPhone;
 
     /**
-     * 对账完成人名称
+     * 对账销售财务联系人名称
      */
     @TableField(value = "success_user")
     private String successUser;
 
     /**
-     * 对账完成人电话
+     * 对账销售财务联系人电话
      */
     @TableField(value = "success_phone")
     private String successPhone;

+ 56 - 4
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/KwpSettlementWallet.java

@@ -11,13 +11,11 @@ import lombok.Setter;
 import lombok.ToString;
 
 /**
+ * 电子钱包结算记录(交易订单结算/物流订单结算)
+ *
  * @author xucaiqin
  * @date 2023-07-10 16:42:20
  */
-
-/**
- * 电子钱包结算记录(交易订单结算/物流订单结算)
- */
 @Getter
 @Setter
 @ToString
@@ -88,4 +86,58 @@ public class KwpSettlementWallet {
      */
     @TableField(value = "del_flag")
     private Integer delFlag;
+    private String settlementId;
+    private String orderType;
+    private String channel;
+    private String payTime;
+    private String payPrice;
+    private String topayPrice;
+
+    public String getTopayPrice() {
+        return topayPrice;
+    }
+
+    public void setTopayPrice(String topayPrice) {
+        this.topayPrice = topayPrice;
+    }
+
+    public String getPayPrice() {
+        return payPrice;
+    }
+
+    public void setPayPrice(String payPrice) {
+        this.payPrice = payPrice;
+    }
+
+    public String getPayTime() {
+        return payTime;
+    }
+
+    public void setPayTime(String payTime) {
+        this.payTime = payTime;
+    }
+
+    public String getChannel() {
+        return channel;
+    }
+
+    public void setChannel(String channel) {
+        this.channel = channel;
+    }
+
+    public String getOrderType() {
+        return orderType;
+    }
+
+    public void setOrderType(String orderType) {
+        this.orderType = orderType;
+    }
+
+    public String getSettlementId() {
+        return settlementId;
+    }
+
+    public void setSettlementId(String settlementId) {
+        this.settlementId = settlementId;
+    }
 }

+ 16 - 5
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/constant/SettlementEnum.java

@@ -8,11 +8,10 @@ package com.sckw.payment.model.constant;
  * @date 2023-07-11 12:00:52
  */
 public enum SettlementEnum {
-    SAVE(1, "已保存"),
-    TO_LEDGER(2, "待对账"),
-    LEDGERED(3, "已对账"),
-    SUCCESS(4, "已完成"),
-    BACK(5, "已退回");
+    WAITING_PAYMENT(1, "待结算"),
+    PARTIAL_PAYMENT(2, "部分结算"),
+    ALL_PAYMENT(3, "全部结算");
+
     private int status;
     private String desc;
 
@@ -36,4 +35,16 @@ public enum SettlementEnum {
     public void setDesc(String desc) {
         this.desc = desc;
     }
+
+    // 添加静态方法,根据 status 获取对应的 desc
+    public static String getStatusDesc(int status) {
+        for (SettlementEnum settlementEnum : values()) {
+            if (settlementEnum.getStatus() == status) {
+                return settlementEnum.getDesc();
+            }
+        }
+        return null; // 可根据实际需求返回默认值或其他处理
+    }
+
+
 }

+ 36 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/constant/SettlementWalletPayTypeEnum.java

@@ -0,0 +1,36 @@
+package com.sckw.payment.model.constant;
+
+/**
+ * Desc: 暂不明确是否使用
+ * @author Aick Spt
+ * @date 2023-07-20 08:35
+ */
+public enum SettlementWalletPayTypeEnum {
+    ADVANCE_PAYMENT(1, "预付款"),
+    CASH_ON_DELIVERY(2, "货到付款");
+//    OFFLINE_PAYMENT(3, "线下付款");
+
+    private int status;
+    private String desc;
+
+    SettlementWalletPayTypeEnum(int status, String desc) {
+        this.status = status;
+        this.desc = desc;
+    }
+
+    public int getStatus() {
+        return status;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    public void setDesc(String desc) {
+        this.desc = desc;
+    }
+}

+ 2 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/LedgerTradeDto.java

@@ -76,12 +76,12 @@ public class LedgerTradeDto implements ILedger {
     private BigDecimal actualPrice;
 
     /**
-     * 对账审核人电话
+     * 对账采购财务联系人电话
      */
     private String auditPhone;
 
     /**
-     * 对账审核人名称
+     * 对账采购财务联系人名称
      */
     private String auditUser;
 

+ 174 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementLogisticsDto.java

@@ -0,0 +1,174 @@
+package com.sckw.payment.model.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author Aick Spt
+ * @date 2023-07-18 17:33
+ */
+@Getter
+@Setter
+public class SettlementLogisticsDto {
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 物流订单对账id
+     */
+    private Long lLedgerId;
+
+    /**
+     * 结算单编号
+     */
+    private String slOrderNo;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 对账金额
+     */
+    private BigDecimal totalPrice;
+
+    /**
+     * 已收账款
+     */
+    private BigDecimal actualPrice;
+
+    /**
+     * 预计收款日期
+     */
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date receiptTime;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 对账托运方财务联系人
+     */
+    private String auditUser;
+
+    /**
+     * 对账托运方财务联系人电话
+     */
+    private String auditPhone;
+
+    /**
+     * 对账承运方财务联系人
+     */
+    private String successUser;
+
+    /**
+     * 对账承运方财务联系人电话
+     */
+    private String successPhone;
+
+    /**
+     * 状态(1待结算2部分结算3全部结算)
+     */
+    private Integer status;
+
+    private String statusText;
+
+    /**
+     * 创建人
+     */
+    private Long createBy;
+
+    /**
+     * 创建人名称
+     */
+    private String createByText;
+
+    /**
+     * 创建时间
+     */
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private Long updateBy;
+
+    /**
+     * 更新人名称
+     */
+    private String updateByText;
+
+    /**
+     * 更新时间
+     */
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 是否删除(0未删除,1删除)
+     */
+    private Integer delFlag;
+
+    // Getters and Setters
+
+    /**
+     * 对账单名称
+     */
+    private String ledgerName;
+
+
+    /**
+     * 交易方式
+     */
+    private Integer ledgerTrading;
+
+    /**
+     * 对账单编号
+     */
+    private String lLedgerNo;
+
+    /**
+     * 客户企业类型
+     */
+    private Integer unitType;
+
+    /**
+     * 客户名称
+     */
+    private String customerName;
+
+
+    /**
+     * 实际应收还款
+     */
+    private BigDecimal ledgerSettlePrice;
+
+    /**
+     * 剩余待还款
+     */
+    private BigDecimal residuePrice;
+
+    /**
+     * 附件
+     */
+    private String attachmentUrl;
+
+}

+ 80 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementLogisticsTrackDto.java

@@ -0,0 +1,80 @@
+package com.sckw.payment.model.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import java.util.Date;
+
+/**
+ * 结算-物流订单-状态信息
+ * @author Aick Spt
+ * @date 2023-07-20 12:38
+ */
+@Getter
+@Setter
+public class SettlementLogisticsTrackDto {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 物流订单结算id
+     */
+    private Long settlementId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 用户状态(0正常、1已锁)
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private Long createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 是否删除(0未删除,1删除)
+     */
+    private Integer delFlag;
+
+    // 添加构造函数,getter和setter方法,以及其他业务逻辑方法(根据需要)
+
+    @Override
+    public String toString() {
+        return "SettlementLogisticsTrackDto{" +
+                "id=" + id +
+                ", settlementId=" + settlementId +
+                ", remark='" + remark + '\'' +
+                ", status=" + status +
+                ", createBy=" + createBy +
+                ", createTime=" + createTime +
+                ", updateBy=" + updateBy +
+                ", updateTime=" + updateTime +
+                ", delFlag=" + delFlag +
+                '}';
+    }
+}

+ 122 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementOfflineDto.java

@@ -0,0 +1,122 @@
+package com.sckw.payment.model.dto;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author Administrator
+ * @date 2023-07-19 11:54
+ */
+@Getter
+@Setter
+public class SettlementOfflineDto {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 企业类型
+     */
+    private Long entId;
+
+    /**
+     * 结算id(交易订单结算/物流订单结算)
+     */
+    private Long settlementId;
+
+    /**
+     * 结算单类型 1-物流 2-贸易
+     */
+    private Byte orderType;
+
+    /**
+     * 付款日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date payTime;
+
+    /**
+     * 付款金额
+     */
+    private BigDecimal payPrice;
+
+    /**
+     * 待付金额
+     */
+    private BigDecimal topayPrice;
+
+    /**
+     * 付款附件
+     */
+    private String url;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 状态:0正常/1锁定
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private Long createBy;
+    private String createByText;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private Long updateBy;
+    private String updateByText;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 删除标识(0正常/1删除)
+     */
+    private Integer delFlag;
+
+    // 添加构造函数,getter和setter方法,以及其他业务逻辑方法(根据需要)
+
+    @Override
+    public String toString() {
+        return "SettlementOfflineDto{" +
+                "id=" + id +
+                ", entId=" + entId +
+                ", settlementId=" + settlementId +
+                ", orderType=" + orderType +
+                ", payTime=" + payTime +
+                ", payPrice=" + payPrice +
+                ", topayPrice=" + topayPrice +
+                ", url='" + url + '\'' +
+                ", remark='" + remark + '\'' +
+                ", status=" + status +
+                ", createBy=" + createBy +
+                ", createTime=" + createTime +
+                ", updateBy=" + updateBy +
+                ", updateTime=" + updateTime +
+                ", delFlag=" + delFlag +
+                '}';
+    }
+
+}
+

+ 142 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementTradeDto.java

@@ -0,0 +1,142 @@
+package com.sckw.payment.model.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 结算-交易订单
+ * @author Aick Spt
+ * @date 2023-07-20 12:26
+ */
+@Getter
+@Setter
+public class SettlementTradeDto {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 交易订单对账id
+     */
+    private Long tLedgerId;
+
+    /**
+     * 结算单编号
+     */
+    private String stOrderNo;
+
+    /**
+     * 结算单名称
+     */
+    private String name;
+
+    /**
+     * 总应收/元
+     */
+    private BigDecimal totalPrice;
+
+    /**
+     * 已收款/元
+     */
+    private BigDecimal actualPrice;
+
+    /**
+     * 预计收款日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date receiptTime;
+
+    /**
+     * 对账采购财务联系人名称
+     */
+    private String auditUser;
+
+    /**
+     * 对账采购财务联系人电话
+     */
+    private String auditPhone;
+
+    /**
+     * 对账销售财务联系人名称
+     */
+    private String successUser;
+
+    /**
+     * 对账销售财务联系人电话
+     */
+    private String successPhone;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 状态(待回款、部分回款、全部回款、回退)
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private Long createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 是否删除(0未删除,1删除)
+     */
+    private Integer delFlag;
+
+    // 添加构造函数,getter和setter方法,以及其他业务逻辑方法(根据需要)
+
+    @Override
+    public String toString() {
+        return "SettlementTradeDto{" +
+                "id=" + id +
+                ", entId=" + entId +
+                ", tLedgerId=" + tLedgerId +
+                ", stOrderNo='" + stOrderNo + '\'' +
+                ", name='" + name + '\'' +
+                ", totalPrice=" + totalPrice +
+                ", actualPrice=" + actualPrice +
+                ", receiptTime=" + receiptTime +
+                ", auditUser='" + auditUser + '\'' +
+                ", auditPhone='" + auditPhone + '\'' +
+                ", successUser='" + successUser + '\'' +
+                ", successPhone='" + successPhone + '\'' +
+                ", remark='" + remark + '\'' +
+                ", status=" + status +
+                ", createBy=" + createBy +
+                ", createTime=" + createTime +
+                ", updateBy=" + updateBy +
+                ", updateTime=" + updateTime +
+                ", delFlag=" + delFlag +
+                '}';
+    }
+}

+ 80 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementTradeTrackDto.java

@@ -0,0 +1,80 @@
+package com.sckw.payment.model.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import java.util.Date;
+
+/**
+ * 结算-交易订单-状态信息
+ * @author Aick Spt
+ * @date 2023-07-20 12:30
+ */
+@Getter
+@Setter
+public class SettlementTradeTrackDto {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 交易订单结算id
+     */
+    private Long settlementId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 用户状态(0正常、1已锁)
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private Long createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 是否删除(0未删除,1删除)
+     */
+    private Integer delFlag;
+
+    // 添加构造函数,getter和setter方法,以及其他业务逻辑方法(根据需要)
+
+    @Override
+    public String toString() {
+        return "SettlementTradeTrackDto{" +
+                "id=" + id +
+                ", settlementId=" + settlementId +
+                ", remark='" + remark + '\'' +
+                ", status=" + status +
+                ", createBy=" + createBy +
+                ", createTime=" + createTime +
+                ", updateBy=" + updateBy +
+                ", updateTime=" + updateTime +
+                ", delFlag=" + delFlag +
+                '}';
+    }
+}

+ 133 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementWalletDto.java

@@ -0,0 +1,133 @@
+package com.sckw.payment.model.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import java.util.Date;
+
+/**
+ * 电子钱包结算记录(交易订单结算/物流订单结算)
+ * @author Aick Spt
+ * @date 2023-07-20 14:54
+ */
+@Getter
+@Setter
+public class SettlementWalletDto {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 企业类型
+     */
+    private Long entId;
+
+    /**
+     * 结算id(交易订单结算/物流订单结算)
+     */
+    private Long settlementId;
+
+    /**
+     * 1-物流 2-交易
+     */
+    private Integer orderType;
+
+    /**
+     * 线上渠道 1-huifu
+     */
+    private Integer channel;
+
+    /**
+     * 回款时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date payTime;
+
+    /**
+     * 金额
+     */
+    private Double payPrice;
+
+    /**
+     * 剩余待付金额
+     */
+    private Double topayPrice;
+
+    /**
+     * 类型(0付款、1退款)
+     */
+    private Integer type;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 状态(0扣款、1结算、2异常、)
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private Long createBy;
+
+    /**
+     * 创建人名称
+     */
+    private String createByText;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private Long updateBy;
+
+    /**
+     * 更新人名称
+     */
+    private String updateByText;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 是否删除(0未删除,1删除)
+     */
+    private Integer delFlag;
+
+    // 添加构造函数,getter和setter方法,以及其他业务逻辑方法(根据需要)
+
+    @Override
+    public String toString() {
+        return "SettlementWalletDto{" +
+                "id=" + id +
+                ", entId=" + entId +
+                ", settlementId=" + settlementId +
+                ", orderType=" + orderType +
+                ", channel=" + channel +
+                ", payTime=" + payTime +
+                ", payPrice=" + payPrice +
+                ", topayPrice=" + topayPrice +
+                ", type=" + type +
+                ", remark='" + remark + '\'' +
+                ", status=" + status +
+                ", createBy=" + createBy +
+                ", createTime=" + createTime +
+                ", updateBy=" + updateBy +
+                ", updateTime=" + updateTime +
+                ", delFlag=" + delFlag +
+                '}';
+    }
+}

+ 12 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/req/SettlementOfflineReq.java

@@ -0,0 +1,12 @@
+package com.sckw.payment.model.vo.req;
+
+import com.sckw.core.model.vo.BasePara;
+
+/**
+ * @author Aick Spt
+ * @date 2023-07-24 16:52
+ */
+public class SettlementOfflineReq extends BasePara {
+
+
+}

+ 51 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/req/SettlementReq.java

@@ -0,0 +1,51 @@
+package com.sckw.payment.model.vo.req;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.sckw.core.model.vo.BasePara;
+import com.sckw.payment.model.constant.SettlementEnum;
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serial;
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * @author Aick Spt
+ * @date 2023-07-18 11:29
+ */
+@Getter
+@Setter
+public class SettlementReq extends BasePara {
+//    @Serial
+//    private static final long serialVersionUID = 5328731681168692784L;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+//    @NotNull(message = "创建时间开始日期不能为空")
+    private LocalDateTime startCreateTime;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+//    @NotNull(message = "创建时间结束日期不能为空")
+    private LocalDateTime endCreateTime;
+
+        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+//    @NotNull(message = "预计回款开始日期不能为空")
+    private LocalDateTime startReceiptTime;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+//    @NotNull(message = "预计回款结束日期不能为空")
+    private LocalDateTime endReceiptTime;
+
+    /**
+     * @see SettlementEnum
+     */
+    private Integer status;
+
+
+    private List<Long> ids;
+}

+ 26 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/req/SettlementWalletReq.java

@@ -0,0 +1,26 @@
+package com.sckw.payment.model.vo.req;
+
+import com.sckw.core.model.vo.BasePara;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author Aick Spt
+ * @date 2023-07-24 16:52
+ */
+@Getter
+@Setter
+public class SettlementWalletReq extends BasePara {
+
+    /**
+     * 交易方式
+     */
+    private Integer trading;
+
+    /**
+     * 支付方式
+     */
+    private Integer payType;
+
+
+}

+ 3 - 3
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/LedgerLogisticsVo.java

@@ -113,13 +113,13 @@ public class LedgerLogisticsVo {
 
 
 //    /**
-//     * 对账审核人电话
+//     * 对账托运方财务联系人电话
 //     */
-//    @ExcelProperty(value = "对账审核人电话")
+//    @ExcelProperty(value = "对账托运方财务联系人电话")
 //    private String auditPhone;
 
     /**
-     * 对账审核人名称
+     * 对账托运方财务联系人
      */
     @ExcelProperty(value = "提交人")
     private String auditUser;

+ 3 - 3
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/LedgerTradeVo.java

@@ -98,9 +98,9 @@ public class LedgerTradeVo {
     private BigDecimal actualPrice;
 
 //    /**
-//     * 对账审核人电话
+//     * 对账采购财务联系人电话
 //     */
-//    @ExcelProperty(value = "对账审核人电话")
+//    @ExcelProperty(value = "对账采购财务联系人电话")
 //    private String auditPhone;
     /**
      * 客户联系人
@@ -120,7 +120,7 @@ public class LedgerTradeVo {
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime receiptTime;
     /**
-     * 对账审核人名称
+     * 对账采购财务联系人名称
      */
     @ExcelProperty(value = "提交人")
     private String auditUser;

+ 35 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/SettlementLogisticsStatusCountVo.java

@@ -0,0 +1,35 @@
+package com.sckw.payment.model.vo.res;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author Aick Spt
+ * @date 2023-07-21 14:44
+ */
+@Getter
+@Setter
+public class SettlementLogisticsStatusCountVo {
+
+    /**
+     * 全部数据
+     */
+    public Long allCount;
+
+    /**
+     * 待结算数据
+     */
+    public Long waitingPaymentCount;
+
+    /**
+     * 部分结算数据
+     */
+    public Long partialPaymentCount;
+
+    /**
+     * 全部结算数据
+     */
+    public Long allPaymentCount;
+
+
+}

+ 35 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/SettlementLogisticsSumVo.java

@@ -0,0 +1,35 @@
+package com.sckw.payment.model.vo.res;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author Aick Spt
+ * @date 2023-07-26 08:52
+ */
+@Getter
+@Setter
+public class SettlementLogisticsSumVo {
+
+    /**
+     * 实际应收
+     */
+    public double actualReceivable;
+
+    /**
+     * 当前收款
+     */
+    public double currentReceipt;
+
+    /**
+     * 剩余待收款
+     */
+    public double remainingReceivables;
+
+
+    /**
+     * 合计
+     */
+    public Long total;
+
+}

+ 160 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/SettlementLogisticsVo.java

@@ -0,0 +1,160 @@
+package com.sckw.payment.model.vo.res;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.sckw.excel.annotation.ExcelContext;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author Aick Spt
+ * @date 2023-07-21 15:28
+ */
+@Getter
+@Setter
+@ExcelContext(fileName = "物流结算订单列表", sheetName = "物流结算订单列表")
+public class SettlementLogisticsVo {
+
+    /**
+     * 主键
+     */
+    @ExcelProperty(value = "主键")
+    private Long id;
+
+    /**
+     * 结算单编号
+     */
+    @ExcelProperty(value = "结算单编号")
+    private String slOrderNo;
+
+    /**
+     * 名称
+     */
+    @ExcelProperty(value = "名称")
+    private String name;
+
+    /**
+     * 对账金额
+     */
+    @ExcelProperty(value = "对账金额")
+    private BigDecimal totalPrice;
+
+    /**
+     * 已收账款
+     */
+    @ExcelProperty(value = "已收账款")
+    private BigDecimal actualPrice;
+
+    /**
+     * 预计收款日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ExcelProperty(value = "预计收款日期")
+    private Date receiptTime;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remark;
+
+    /**
+     * 对账托运方财务联系人
+     */
+    @ExcelProperty(value = "对账托运方财务联系人")
+    private String auditUser;
+
+    /**
+     * 对账托运方财务联系人电话
+     */
+    @ExcelProperty(value = "对账托运方财务联系人电话")
+    private String auditPhone;
+
+    /**
+     * 对账承运方财务联系人
+     */
+    @ExcelProperty(value = "对账承运方财务联系人")
+    private String successUser;
+
+    /**
+     * 对账承运方财务联系人电话
+     */
+    @ExcelProperty(value = "对账承运方财务联系人电话")
+    private String successPhone;
+
+
+    @ExcelProperty(value = "状态")
+    private String statusText;
+
+    /**
+     * 创建人名称
+     */
+    @ExcelProperty(value = "创建人名称")
+    private String createByText;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ExcelProperty(value = "创建时间")
+    private Date createTime;
+
+
+    /**
+     * 更新人名称
+     */
+    @ExcelProperty(value = "更新人名称")
+    private String updateByText;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ExcelProperty(value = "更新时间")
+    private Date updateTime;
+
+
+    /**
+     * 对账单名称
+     */
+    @ExcelProperty(value = "对账单名称")
+    private String ledgerName;
+
+
+    /**
+     * 交易方式
+     */
+    @ExcelProperty(value = "交易方式")
+    private Integer ledgerTrading;
+
+    /**
+     * 对账单编号
+     */
+    @ExcelProperty(value = "对账单编号")
+    private String lLedgerNo;
+
+
+    /**
+     * 客户名称
+     */
+    @ExcelProperty(value = "客户名称")
+    private String customerName;
+
+
+    /**
+     * 实际应收还款
+     */
+    @ExcelProperty(value = "实际应收还款")
+    private BigDecimal ledgerSettlePrice;
+
+    /**
+     * 剩余待还款
+     */
+    @ExcelProperty(value = "剩余待还款")
+    private BigDecimal residuePrice;
+
+
+}

+ 102 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/SettlementOfflineVo.java

@@ -0,0 +1,102 @@
+package com.sckw.payment.model.vo.res;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author Aick Spt
+ * @date 2023-07-24 16:45
+ */
+@Getter
+@Setter
+public class SettlementOfflineVo {
+
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 企业类型
+     */
+    private Long entId;
+
+    /**
+     * 结算id(交易订单结算/物流订单结算)
+     */
+    private Long settlementId;
+
+    /**
+     * 结算单类型 1-物流 2-贸易
+     */
+    private Byte orderType;
+
+    /**
+     * 付款日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date payTime;
+
+    /**
+     * 付款金额
+     */
+    private BigDecimal payPrice;
+
+    /**
+     * 待付金额
+     */
+    private BigDecimal topayPrice;
+
+    /**
+     * 付款附件
+     */
+    private String url;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 状态:0正常/1锁定
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private Long createBy;
+    private String createByText;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新人
+     */
+    private Long updateBy;
+    private String updateByText;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 删除标识(0正常/1删除)
+     */
+    private Integer delFlag;
+
+    // 添加构造函数,getter和setter方法,以及其他业务逻辑方法(根据需要)
+
+
+}

+ 83 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/vo/res/SettlementWalletVo.java

@@ -0,0 +1,83 @@
+package com.sckw.payment.model.vo.res;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @author Aick Spt
+ * @date 2023-07-24 16:45
+ */
+@Getter
+@Setter
+public class SettlementWalletVo {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+
+    /**
+     * 线上渠道 1-huifu
+     */
+    private Integer channel;
+
+    /**
+     * 回款时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date payTime;
+
+    /**
+     * 金额
+     */
+    private Double payPrice;
+
+    /**
+     * 剩余待付金额
+     */
+    private Double topayPrice;
+
+    /**
+     * 类型(1预付款、2货到付款)
+     */
+    private Integer type;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+    /**
+     * 创建人名称
+     */
+    private String createByText;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新人名称
+     */
+    private String updateByText;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 是否删除(0未删除,1删除)
+     */
+    private Integer delFlag;
+
+
+}

+ 5 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpLedgerLogisticsService.java

@@ -9,6 +9,11 @@ import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.utils.IdWorker;
 import com.sckw.core.utils.OrderGenerateUtils;
 import com.sckw.core.utils.StringTimeUtil;
+import com.sckw.payment.dao.KwpLedgerLogisticsMapper;
+import com.sckw.payment.model.KwpLedgerLogistics;
+import com.sckw.payment.model.KwpLedgerLogisticsTrack;
+import com.sckw.payment.model.KwpLedgerLogisticsUnit;
+import com.sckw.payment.model.KwpSettlementLogistics;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.payment.dao.KwpLedgerLogisticsMapper;
 import com.sckw.payment.model.*;

+ 179 - 3
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementLogisticsService.java

@@ -1,21 +1,197 @@
 package com.sckw.payment.service;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.model.page.PageRes;
 import com.sckw.payment.dao.KwpSettlementLogisticsMapper;
+import com.sckw.payment.model.KwpLedgerTradeTrack;
 import com.sckw.payment.model.KwpSettlementLogistics;
+import com.sckw.payment.model.constant.LedgerTrackEnum;
+import com.sckw.payment.model.constant.SettlementEnum;
+import com.sckw.payment.model.dto.LedgerTradeDto;
+import com.sckw.payment.model.dto.SettlementLogisticsDto;
+import com.sckw.payment.model.vo.req.SettlementReq;
+import com.sckw.payment.model.vo.res.SettlementLogisticsStatusCountVo;
+import com.sckw.payment.model.vo.res.SettlementLogisticsSumVo;
+import com.sckw.payment.utils.CommonValidator;
+import com.sckw.payment.utils.PageMoreRes;
 import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.ss.formula.functions.T;
+import org.jetbrains.annotations.NotNull;
 import org.springframework.stereotype.Service;
 
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+
 /**
- * @author xucaiqin
+ * @author Aick Spt
  * @date 2023-07-10 16:38:36
  */
 @AllArgsConstructor
 @Service
+@Slf4j
 public class KwpSettlementLogisticsService {
     private final KwpSettlementLogisticsMapper settlementLogisticsMapper;
 
-    public void save(KwpSettlementLogistics kwpSettlementLogistics) {
-        settlementLogisticsMapper.insert(kwpSettlementLogistics);
+//    public SettlementLogisticsStatusCountVo getCountList() {
+//        SettlementLogisticsStatusCountVo settlementLogisticsStatusCountVos = new SettlementLogisticsStatusCountVo();
+//        LambdaQueryWrapper<KwpSettlementLogistics> wrapper = new LambdaQueryWrapper<>();
+//
+//        settlementLogisticsStatusCountVos.setAllCount(settlementLogisticsMapper.selectCount(wrapper));
+//
+//        wrapper.eq(KwpSettlementLogistics::getStatus, SettlementEnum.WAITING_PAYMENT.getStatus());//待结算
+//        settlementLogisticsStatusCountVos.setWaitingPaymentCount(settlementLogisticsMapper.selectCount(wrapper));
+//
+//        wrapper.clear();
+//        wrapper.eq(KwpSettlementLogistics::getStatus, SettlementEnum.PARTIAL_PAYMENT.getStatus());//部分结算
+//        settlementLogisticsStatusCountVos.setPartialPaymentCount(settlementLogisticsMapper.selectCount(wrapper));
+//
+//        wrapper.clear();
+//        wrapper.eq(KwpSettlementLogistics::getStatus, SettlementEnum.ALL_PAYMENT.getStatus());//全部结算
+//        settlementLogisticsStatusCountVos.setAllPaymentCount(settlementLogisticsMapper.selectCount(wrapper));
+//
+//        return settlementLogisticsStatusCountVos;
+//    }
+
+    /**
+     * 运费收款-物流订单各状态列表总数
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:21
+     */
+    public SettlementLogisticsStatusCountVo getCountListCollection(SettlementReq settlementReq) {
+        SettlementLogisticsStatusCountVo settlementLogisticsStatusCountVos = new SettlementLogisticsStatusCountVo();
+        //总
+        settlementReq.setStatus(null);
+        settlementLogisticsStatusCountVos.setAllCount(settlementLogisticsMapper.getCountListCollection(settlementReq));
+
+        //待结算
+        settlementReq.setStatus(SettlementEnum.WAITING_PAYMENT.getStatus());
+        settlementLogisticsStatusCountVos.setWaitingPaymentCount(settlementLogisticsMapper.getCountListCollection(settlementReq));
+
+        //部分结算
+        settlementReq.setStatus(SettlementEnum.PARTIAL_PAYMENT.getStatus());
+        settlementLogisticsStatusCountVos.setPartialPaymentCount(settlementLogisticsMapper.getCountListCollection(settlementReq));
+
+        //全部结算
+        settlementReq.setStatus(SettlementEnum.ALL_PAYMENT.getStatus());
+        settlementLogisticsStatusCountVos.setAllPaymentCount(settlementLogisticsMapper.getCountListCollection(settlementReq));
+
+        return settlementLogisticsStatusCountVos;
+    }
+
+    /**
+     * 运费付款-物流订单各状态列表总数
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:23
+     */
+    public SettlementLogisticsStatusCountVo getCountListPayment(SettlementReq settlementReq) {
+        SettlementLogisticsStatusCountVo settlementLogisticsStatusCountVos = new SettlementLogisticsStatusCountVo();
+        //总
+        settlementReq.setStatus(null);
+        settlementLogisticsStatusCountVos.setAllCount(settlementLogisticsMapper.getCountListPayment(settlementReq));
+
+        //待结算
+        settlementReq.setStatus(SettlementEnum.WAITING_PAYMENT.getStatus());
+        settlementLogisticsStatusCountVos.setWaitingPaymentCount(settlementLogisticsMapper.getCountListPayment(settlementReq));
+
+        //部分结算
+        settlementReq.setStatus(SettlementEnum.PARTIAL_PAYMENT.getStatus());
+        settlementLogisticsStatusCountVos.setPartialPaymentCount(settlementLogisticsMapper.getCountListPayment(settlementReq));
+
+        //全部结算
+        settlementReq.setStatus(SettlementEnum.ALL_PAYMENT.getStatus());
+        settlementLogisticsStatusCountVos.setAllPaymentCount(settlementLogisticsMapper.getCountListPayment(settlementReq));
+
+        return settlementLogisticsStatusCountVos;
+    }
+
+    /**
+     * 运费收款-物流订单列表
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:21
+     */
+    public PageMoreRes<SettlementLogisticsDto> pageSelectCollection(SettlementReq settlementReq) {
+        CommonValidator.isValidCoexisting(settlementReq.getStartCreateTime(), settlementReq.getEndCreateTime(), "");
+        CommonValidator.isValidCoexisting(settlementReq.getStartReceiptTime(), settlementReq.getEndReceiptTime(), "预计收款开始和结束时间");
+
+        PageHelper.startPage(settlementReq.getPage(), settlementReq.getPageSize());
+        List<SettlementLogisticsDto> kwpLedgerLogisticsList = settlementLogisticsMapper.pageSelectCollection(settlementReq);
+        SettlementLogisticsSumVo settlementLogisticsSum = settlementLogisticsMapper.selectCollectionSum(settlementReq);
+
+        // 对查询结果进行处理,转换 status 到 desc
+        return new PageMoreRes<>(getSettlementLogisticsDtoPageRes(kwpLedgerLogisticsList), settlementLogisticsSum);
+    }
+
+
+    /**
+     * 运费付款-物流订单列表
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:23
+     */
+    public PageRes<SettlementLogisticsDto> pageSelectPayment(SettlementReq settlementReq) {
+        CommonValidator.isValidCoexisting(settlementReq.getStartCreateTime(), settlementReq.getEndCreateTime(), "");
+        CommonValidator.isValidCoexisting(settlementReq.getStartReceiptTime(), settlementReq.getEndReceiptTime(), "预计付款开始和结束时间");
+
+        PageHelper.startPage(settlementReq.getPage(), settlementReq.getPageSize());
+        List<SettlementLogisticsDto> kwpLedgerLogisticsList = settlementLogisticsMapper.pageSelectPayment(settlementReq);
+
+        // 对查询结果进行处理,转换 status 到 desc
+        return new PageRes<>(getSettlementLogisticsDtoPageRes(kwpLedgerLogisticsList));
+    }
+
+    @NotNull
+    private PageInfo<SettlementLogisticsDto> getSettlementLogisticsDtoPageRes(List<SettlementLogisticsDto> kwpLedgerLogisticsList) {
+        for (SettlementLogisticsDto entity : kwpLedgerLogisticsList) {
+            entity.setStatusText(SettlementEnum.getStatusDesc(entity.getStatus()));
+            entity.setResiduePrice(entity.getLedgerSettlePrice().subtract(entity.getActualPrice()));
+            entity.setCreateByText("创建人名称");
+            entity.setUpdateByText("更新人名称");
+        }
+        return new PageInfo<>(kwpLedgerLogisticsList);
+    }
+
+
+    /**
+     * 运费收款-物流订单详情
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:22
+     */
+    public SettlementLogisticsDto detailCollection(Long id) {
+        return settlementLogisticsMapper.detailCollection(id);
+    }
+
+    /**
+     * 运费付款-物流订单详情
+     *
+     * @author Aick Spt
+     * @date 2023-07-24 16:24
+     */
+    public SettlementLogisticsDto detailPayment(Long id) {
+        return settlementLogisticsMapper.detailPayment(id);
+    }
+
+
+    /**
+     * 根据id查物流结算订单
+     *
+     * @param ids 物流结算订单集合List<Long>
+     * @author Aick Spt
+     * @date 2023-07-21 16:16
+     */
+    public List<SettlementLogisticsDto> selectList(List<Long> ids) {
+        return settlementLogisticsMapper.selectIds(ids);
+    }
+    public List<SettlementLogisticsDto> selectList(Integer unitType) {
+        return settlementLogisticsMapper.selectList(unitType);
     }
 
 }

+ 11 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementLogisticsTrackService.java

@@ -1,5 +1,7 @@
 package com.sckw.payment.service;
 
+import com.sckw.payment.dao.KwpSettlementLogisticsTrackMapper;
+import com.sckw.payment.model.KwpSettlementLogisticsTrack;
 import org.springframework.stereotype.Service;
 /**
  * @author xucaiqin
@@ -9,4 +11,13 @@ import org.springframework.stereotype.Service;
 @Service
 public class KwpSettlementLogisticsTrackService  {
 
+    private final KwpSettlementLogisticsTrackMapper settlementLogisticsTrackMapper;
+
+    public KwpSettlementLogisticsTrackService(KwpSettlementLogisticsTrackMapper settlementLogisticsTrackMapper) {
+        this.settlementLogisticsTrackMapper = settlementLogisticsTrackMapper;
+    }
+
+    public void save(KwpSettlementLogisticsTrack kwpSettlementLogisticsTrack) {
+        settlementLogisticsTrackMapper.insert(kwpSettlementLogisticsTrack);
+    }
 }

+ 145 - 1
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementOfflineService.java

@@ -1,12 +1,156 @@
 package com.sckw.payment.service;
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.model.page.PageRes;
+import com.sckw.core.utils.IdWorker;
+import com.sckw.payment.dao.KwpSettlementOfflineMapper;
+import com.sckw.payment.model.KwpSettlementOffline;
+import com.sckw.payment.model.constant.SettlementWalletPayTypeEnum;
+import com.sckw.payment.model.dto.SettlementOfflineDto;
+import com.sckw.payment.model.vo.req.SettlementOfflineReq;
+import com.sckw.payment.model.vo.req.SettlementReq;
+import com.sckw.payment.model.vo.res.SettlementOfflineVo;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
 /**
  * @author xucaiqin
  * @date 2023-07-10 16:38:36
  */
-
+@AllArgsConstructor
 @Service
+@Slf4j
 public class KwpSettlementOfflineService {
 
+    private final KwpSettlementOfflineMapper settlementOfflineMapper;
+
+    /**
+     * 物流-线下付款(运费收款)记录-列表
+     * @author Aick Spt
+     * @date 2023-07-26 17:15
+     */
+    public PageRes<SettlementOfflineVo> pageListLogisticsCollection(SettlementOfflineReq settlementOfflineReq) {
+//        //todo 查询缓存,获取客户企业id
+//        String keywords = settlementReq.getKeywords();
+//        if (StringUtils.isNotBlank(keywords)) {
+//            System.out.println("关键之:" + keywords);
+//        }
+        PageHelper.startPage(settlementOfflineReq.getPage(), settlementOfflineReq.getPageSize());
+
+        List<SettlementOfflineDto> settlementOfflineLogisticsList = settlementOfflineMapper.pageListLogisticsCollection(settlementOfflineReq);
+
+        if (CollectionUtils.isEmpty(settlementOfflineLogisticsList)) {
+            return new PageRes<>(new PageInfo<>());
+        }
+
+        for (SettlementOfflineDto entity : settlementOfflineLogisticsList) {
+            entity.setCreateByText("创建人名称");
+            entity.setUpdateByText("更新人名称");
+        }
+
+        //指定返回值
+        List<SettlementOfflineVo> collect = settlementOfflineLogisticsList.stream().map(a -> {
+            SettlementOfflineVo settlementOfflineVo = new SettlementOfflineVo();
+            BeanUtils.copyProperties(a, settlementOfflineVo);
+            return settlementOfflineVo;
+        }).collect(Collectors.toList());
+
+        return new PageRes<>(new PageInfo<>(collect));
+    }
+
+
+    /**
+     * 结算-物流-线下付款(运费收款)记录-详情
+     *
+     * @param id 结算物流订单id
+     * @author Aick Spt
+     * @date 2023-07-19 09:11
+     */
+    public SettlementOfflineDto detailLogisticsCollection(Long id) {
+        return settlementOfflineMapper.detailLogisticsCollection(id);
+    }
+
+    /**
+     * 物流-线下付款(运费收款)记录-新增
+     *
+     * @param id    结算单id
+     * @param price 付款金额
+     * @return InsertId
+     * @author Aick Spt
+     * @date 2023-07-20 14:23
+     */
+    public Integer confirmLogisticsCollection(Long id, Float price) {
+        log.info("接收到数据,开始物流-物流-线下付款(运费收款)记录-新增,待完善");
+        //todo 待完善
+        //先查询出结算单情况
+
+        //检查结算单状态和所差金额
+
+        //对比金额
+
+        //累加入库结算单
+
+        //新增电子钱包结算记录
+        KwpSettlementOffline kwpSettlementOffline = new KwpSettlementOffline();
+        kwpSettlementOffline.setId(new IdWorker(1).nextId());
+
+        //todo 待完善
+        settlementOfflineMapper.insert(kwpSettlementOffline);
+        return settlementOfflineMapper.confirmLogisticsCollection(id, price);
+    }
+
+    public PageRes<SettlementOfflineVo> pageListTradeCollection(SettlementOfflineReq settlementOfflineReq) {
+        //        //todo 查询缓存,获取客户企业id
+//        String keywords = settlementReq.getKeywords();
+//        if (StringUtils.isNotBlank(keywords)) {
+//            System.out.println("关键之:" + keywords);
+//        }
+        PageHelper.startPage(settlementOfflineReq.getPage(), settlementOfflineReq.getPageSize());
+
+        List<SettlementOfflineDto> settlementOfflineLogisticsList = settlementOfflineMapper.pageListLogisticsCollection(settlementOfflineReq);
+        for (SettlementOfflineDto entity : settlementOfflineLogisticsList) {
+            entity.setCreateByText("创建人名称");
+            entity.setUpdateByText("更新人名称");
+        }
+
+        if (CollectionUtils.isEmpty(settlementOfflineLogisticsList)) {
+            return new PageRes<>(new PageInfo<>());
+        }
+
+        //指定返回值
+        List<SettlementOfflineVo> collect = settlementOfflineLogisticsList.stream().map(a -> {
+            SettlementOfflineVo settlementOfflineVo = new SettlementOfflineVo();
+            BeanUtils.copyProperties(a, settlementOfflineVo);
+            return settlementOfflineVo;
+        }).collect(Collectors.toList());
+
+        return new PageRes<>(new PageInfo<>(collect));
+    }
+
+    public Integer confirmTradeCollection(Long id, Float price) {
+        log.info("接收到数据,开始物流-物流-线下付款(销售收款)记录-新增,待完善");
+        //todo 待完善
+        //先查询出结算单情况
+
+        //检查结算单状态和所差金额
+
+        //对比金额
+
+        //累加入库结算单
+
+        //新增电子钱包结算记录
+        KwpSettlementOffline kwpSettlementOffline = new KwpSettlementOffline();
+        kwpSettlementOffline.setId(new IdWorker(1).nextId());
+
+        //todo 待完善
+        settlementOfflineMapper.insert(kwpSettlementOffline);
+        return settlementOfflineMapper.confirmLogisticsCollection(id, price);
+    }
 }

+ 83 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementTradeService.java

@@ -1,10 +1,20 @@
 package com.sckw.payment.service;
 
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.model.page.PageRes;
 import com.sckw.payment.dao.KwpSettlementTradeMapper;
 import com.sckw.payment.model.KwpSettlementTrade;
+import com.sckw.payment.model.constant.SettlementEnum;
+import com.sckw.payment.model.dto.SettlementLogisticsDto;
+import com.sckw.payment.model.dto.SettlementTradeDto;
+import com.sckw.payment.model.dto.SettlementWalletDto;
+import com.sckw.payment.model.vo.req.SettlementReq;
+import com.sckw.payment.model.vo.res.SettlementLogisticsStatusCountVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * @author xucaiqin
  * @date 2023-07-10 16:38:36
@@ -17,4 +27,77 @@ public class KwpSettlementTradeService {
     public void save(KwpSettlementTrade kwpSettlementTrade) {
         settlementTradeMapper.insert(kwpSettlementTrade);
     }
+
+    public PageRes<SettlementTradeDto> pageListCollection(SettlementReq settlementReq) {
+//        //todo 查询缓存,获取客户企业id
+//        String keywords = settlementReq.getKeywords();
+//        if (StringUtils.isNotBlank(keywords)) {
+//            System.out.println("关键之:" + keywords);
+//        }
+//        PageHelper.startPage(settlementReq.getPage(), settlementReq.getPageSize());
+//
+//        List<SettlementLogisticsDto> kwpLedgerLogisticsList = settlementOfflineMapper.pageSelect(settlementReq);
+//
+//        return new PageRes<>(new PageInfo<>(kwpLedgerLogisticsList));
+        return new PageRes<>(new PageInfo<>());
+    }
+
+    public SettlementLogisticsStatusCountVo getCountListCollection(SettlementReq settlementReq) {
+        SettlementLogisticsStatusCountVo settlementLogisticsStatusCountVos = new SettlementLogisticsStatusCountVo();
+        //总
+//        settlementReq.setStatus(null);
+//        settlementLogisticsStatusCountVos.setAllCount(settlementLogisticsMapper.getCountListCollection(settlementReq));
+//
+//        //待结算
+//        settlementReq.setStatus(SettlementEnum.WAITING_PAYMENT.getStatus());
+//        settlementLogisticsStatusCountVos.setWaitingPaymentCount(settlementLogisticsMapper.getCountListCollection(settlementReq));
+//
+//        //部分结算
+//        settlementReq.setStatus(SettlementEnum.PARTIAL_PAYMENT.getStatus());
+//        settlementLogisticsStatusCountVos.setPartialPaymentCount(settlementLogisticsMapper.getCountListCollection(settlementReq));
+//
+//        //全部结算
+//        settlementReq.setStatus(SettlementEnum.ALL_PAYMENT.getStatus());
+//        settlementLogisticsStatusCountVos.setAllPaymentCount(settlementLogisticsMapper.getCountListCollection(settlementReq));
+
+        return settlementLogisticsStatusCountVos;
+    }
+
+
+    public List<SettlementTradeDto> selectList(List<Long> ids) {
+        return null;
+    }
+
+    /**
+     * 结算-物流订单详情
+     *
+     * @param id 结算物流订单id
+     * @author Aick Spt
+     * @date 2023-07-19 09:11
+     */
+    public SettlementTradeDto detailCollection(Long id) {
+        return null;
+    }
+
+    public PageRes<SettlementTradeDto> pageListPayment(SettlementReq settlementReq) {
+//        //todo 查询缓存,获取客户企业id
+//        String keywords = settlementReq.getKeywords();
+//        if (StringUtils.isNotBlank(keywords)) {
+//            System.out.println("关键之:" + keywords);
+//        }
+//        PageHelper.startPage(settlementReq.getPage(), settlementReq.getPageSize());
+//
+//        List<SettlementLogisticsDto> kwpLedgerLogisticsList = settlementOfflineMapper.pageSelect(settlementReq);
+//
+//        return new PageRes<>(new PageInfo<>(kwpLedgerLogisticsList));
+        return new PageRes<>(new PageInfo<>());
+    }
+
+    public SettlementLogisticsStatusCountVo getCountListPayment(SettlementReq settlementReq) {
+        return null;
+    }
+
+    public SettlementTradeDto detailPayment(Long id) {
+        return null;
+    }
 }

+ 11 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementTradeTrackService.java

@@ -1,5 +1,7 @@
 package com.sckw.payment.service;
 
+import com.sckw.payment.dao.KwpSettlementTradeTrackMapper;
+import com.sckw.payment.model.KwpSettlementTradeTrack;
 import org.springframework.stereotype.Service;
 /**
  * @author xucaiqin
@@ -9,4 +11,13 @@ import org.springframework.stereotype.Service;
 @Service
 public class KwpSettlementTradeTrackService  {
 
+    private final KwpSettlementTradeTrackMapper settlementTradeTrackMapper;
+
+    public KwpSettlementTradeTrackService(KwpSettlementTradeTrackMapper settlementTradeTrackMapper) {
+        this.settlementTradeTrackMapper = settlementTradeTrackMapper;
+    }
+
+    public void save(KwpSettlementTradeTrack kwpSettlementTradeTrack) {
+        settlementTradeTrackMapper.insert(kwpSettlementTradeTrack);
+    }
 }

+ 215 - 3
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementWalletService.java

@@ -1,13 +1,225 @@
 package com.sckw.payment.service;
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.exception.BusinessException;
+import com.sckw.core.model.page.PageRes;
+import com.sckw.core.utils.IdWorker;
+import com.sckw.payment.dao.KwpSettlementWalletMapper;
+import com.sckw.payment.model.KwpSettlementWallet;
+import com.sckw.payment.model.constant.SettlementEnum;
+import com.sckw.payment.model.constant.SettlementWalletPayTypeEnum;
+import com.sckw.payment.model.dto.SettlementLogisticsDto;
+import com.sckw.payment.model.dto.SettlementWalletDto;
+import com.sckw.payment.model.vo.req.SettlementWalletReq;
+import com.sckw.payment.model.vo.res.SettlementWalletVo;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
 
 /**
- * @author xucaiqin
- * @date 2023-07-10 16:38:36
+ * @author Aick Spt
+ * @date 2023-07-20 14:55
  */
-
+@AllArgsConstructor
 @Service
+@Slf4j
 public class KwpSettlementWalletService {
 
+    private final KwpSettlementWalletMapper settlementWalletMapper;
+
+    private final KwpSettlementLogisticsService kwpSettlementLogisticsService;
+
+    /**
+     * 物流-电子钱包付款(货到付款)结算记录-列表
+     *
+     * @author Aick Spt
+     * @date 2023-07-26 16:43
+     */
+    public PageRes<SettlementWalletVo> pageListLogisticsPayment(SettlementWalletReq settlementWalletReq) {
+//        //todo 查询缓存,获取客户企业id
+//        String keywords = settlementReq.getKeywords();
+//        if (StringUtils.isNotBlank(keywords)) {
+//            System.out.println("关键之:" + keywords);
+//        }
+        PageHelper.startPage(settlementWalletReq.getPage(), settlementWalletReq.getPageSize());
+        settlementWalletReq.setPayType(SettlementWalletPayTypeEnum.CASH_ON_DELIVERY.getStatus());//只筛选 货到付款
+        List<SettlementWalletDto> settlementWalletLogisticsList = settlementWalletMapper.pageListLogisticsPayment(settlementWalletReq);
+
+        if (CollectionUtils.isEmpty(settlementWalletLogisticsList)) {
+            return new PageRes<>(new PageInfo<>());
+        }
+
+        for (SettlementWalletDto entity : settlementWalletLogisticsList) {
+            entity.setCreateByText("创建人名称");
+            entity.setUpdateByText("更新人名称");
+        }
+
+        //指定返回值
+        List<SettlementWalletVo> collect = settlementWalletLogisticsList.stream().map(a -> {
+            SettlementWalletVo settlementWalletVo = new SettlementWalletVo();
+            BeanUtils.copyProperties(a, settlementWalletVo);
+            return settlementWalletVo;
+        }).collect(Collectors.toList());
+
+        return new PageRes<>(new PageInfo<>(collect));
+    }
+
+
+    /**
+     * 结算-物流订单详情
+     *
+     * @param id 结算物流订单id
+     * @author Aick Spt
+     * @date 2023-07-19 09:11
+     */
+    public SettlementWalletDto detailLogisticsPayment(Long id) {
+        return settlementWalletMapper.detailLogisticsPayment(id);
+    }
+
+    /**
+     * 物流-电子钱包付款(货到付款)结算记录-新增
+     *
+     * @param id    结算单id
+     * @param price 付款金额
+     * @return InsertId
+     * @author Aick Spt
+     * @date 2023-07-20 14:23
+     */
+    public Integer confirmLogisticsPayment(Long id, Float price) {
+        log.info("接收到数据,开始物流-电子钱包付款(货到付款)结算记录-新增,待完善");
+        //todo 待完善
+        //先查询出结算单情况
+        SettlementLogisticsDto settlementLogistics = kwpSettlementLogisticsService.detailPayment(id);
+        log.info(String.valueOf(settlementLogistics));
+        //检查结算单状态和所差金额
+        if (settlementLogistics == null) {
+            log.error("非法请求,查无数据:" + id);
+            throw new BusinessException("非法请求运费结算参数ID");
+        }
+        if (settlementLogistics.getStatus() == SettlementEnum.ALL_PAYMENT.getStatus()) {
+            log.error("非法请求,该订单已结算完成:" + id);
+            throw new BusinessException("该订单已结算完成,无法操作");
+        }
+
+        //对比金额
+
+        //累加入库结算单
+
+        //扣费电子钱包
+
+        //新增电子钱包结算记录
+        KwpSettlementWallet kwpSettlementWallet = new KwpSettlementWallet();
+        kwpSettlementWallet.setId(new IdWorker(1).nextId());
+        //todo 待完善
+        settlementWalletMapper.insert(kwpSettlementWallet);
+        return settlementWalletMapper.confirmLogisticsPayment(id, price);
+    }
+
+    public PageRes<SettlementWalletVo> pageListTradePayment(SettlementWalletReq settlementWalletReq) {
+//        //todo 查询缓存,获取客户企业id
+//        String keywords = settlementReq.getKeywords();
+//        if (StringUtils.isNotBlank(keywords)) {
+//            System.out.println("关键之:" + keywords);
+//        }
+        PageHelper.startPage(settlementWalletReq.getPage(), settlementWalletReq.getPageSize());
+
+        List<SettlementWalletDto> settlementWalletLogisticsList = settlementWalletMapper.pageListLogisticsPayment(settlementWalletReq);
+        for (SettlementWalletDto entity : settlementWalletLogisticsList) {
+            entity.setCreateByText("创建人名称");
+            entity.setUpdateByText("更新人名称");
+        }
+
+        if (CollectionUtils.isEmpty(settlementWalletLogisticsList)) {
+            return new PageRes<>(new PageInfo<>());
+        }
+
+        //指定返回值
+        List<SettlementWalletVo> collect = settlementWalletLogisticsList.stream().map(a -> {
+            SettlementWalletVo settlementWalletVo = new SettlementWalletVo();
+            BeanUtils.copyProperties(a, settlementWalletVo);
+            return settlementWalletVo;
+        }).collect(Collectors.toList());
+
+        return new PageRes<>(new PageInfo<>(collect));
+    }
+
+
+    public Integer confirmTradePayment(Long id, Float price) {
+        log.info("接收到数据,开始物流-销售-付款确认-(新增电子钱包记录-采购货到付款)-新增,待完善");
+        //todo 待完善
+        //先查询出结算单情况
+
+        //检查结算单状态和所差金额
+
+        //对比金额
+
+        //累加入库结算单
+
+        //扣费电子钱包
+
+        //新增电子钱包结算记录
+        KwpSettlementWallet kwpSettlementWallet = new KwpSettlementWallet();
+        kwpSettlementWallet.setId(new IdWorker(1).nextId());
+        //todo 待完善
+        settlementWalletMapper.insert(kwpSettlementWallet);
+        return settlementWalletMapper.confirmLogisticsPayment(id, price);
+    }
+
+    public PageRes<SettlementWalletVo> pageListTradeCollection(SettlementWalletReq settlementWalletReq) {
+//        //todo 查询缓存,获取客户企业id
+//        String keywords = settlementReq.getKeywords();
+//        if (StringUtils.isNotBlank(keywords)) {
+//            System.out.println("关键之:" + keywords);
+//        }
+        PageHelper.startPage(settlementWalletReq.getPage(), settlementWalletReq.getPageSize());
+
+        List<SettlementWalletDto> settlementWalletLogisticsList = settlementWalletMapper.pageListLogisticsPayment(settlementWalletReq);
+        for (SettlementWalletDto entity : settlementWalletLogisticsList) {
+            entity.setCreateByText("创建人名称");
+            entity.setUpdateByText("更新人名称");
+        }
+
+        if (CollectionUtils.isEmpty(settlementWalletLogisticsList)) {
+            return new PageRes<>(new PageInfo<>());
+        }
+
+        //指定返回值
+        List<SettlementWalletVo> collect = settlementWalletLogisticsList.stream().map(a -> {
+            SettlementWalletVo settlementWalletVo = new SettlementWalletVo();
+            BeanUtils.copyProperties(a, settlementWalletVo);
+            return settlementWalletVo;
+        }).collect(Collectors.toList());
+
+        return new PageRes<>(new PageInfo<>(collect));
+    }
+
+
+    public Integer confirmTradeCollection(Long id, Float price) {
+        log.info("接收到数据,开始物流-销售-收款确认-预付款(电子钱包)-新增,待完善");
+        //todo 待完善
+        //先查询出结算单情况
+
+        //检查结算单状态和所差金额
+
+        //对比金额
+
+        //累加入库结算单
+
+        //扣费电子钱包
+
+        //新增电子钱包结算记录
+        KwpSettlementWallet kwpSettlementWallet = new KwpSettlementWallet();
+        kwpSettlementWallet.setId(new IdWorker(1).nextId());
+        //todo 待完善
+        settlementWalletMapper.insert(kwpSettlementWallet);
+        return settlementWalletMapper.confirmLogisticsPayment(id, price);
+    }
 }
+

+ 48 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/utils/CommonValidator.java

@@ -0,0 +1,48 @@
+package com.sckw.payment.utils;
+
+import com.sckw.core.exception.BusinessException;
+import org.apache.commons.lang3.StringUtils;
+
+import java.time.LocalDateTime;
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+
+/**
+ * @author Aick Spt
+ * @date 2023-07-20 17:18
+ */
+public class CommonValidator {
+
+    // 时间格式的正则表达式
+    private static final String TIME_PATTERN = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}";
+
+    /**
+     * 判断时间段的开始时间和结束时间是否同时存在或同时不存在,且格式为 yyyy-MM-dd HH:mm:ss
+     *
+     * @param startTime 时间段的开始时间
+     * @param endTime   时间段的结束时间
+     * @return 如果格式正确且同时存在返回 true,否则返回 false
+     * @author Aick Spt
+     * @date 2023-07-20 17:19
+     */
+    public static boolean isValidTimeRange(String startTime, String endTime) {
+        // 使用正则表达式匹配时间格式
+        if (StringUtils.isBlank(startTime) && StringUtils.isBlank(endTime)) {
+            return true;
+        }
+        Pattern pattern = Pattern.compile(TIME_PATTERN);
+        Matcher startMatcher = pattern.matcher(startTime);
+        Matcher endMatcher = pattern.matcher(endTime);
+
+        // 检查开始时间和结束时间是否同时存在,并且格式符合要求
+        return startMatcher.matches() && endMatcher.matches();
+    }
+
+    public static void isValidCoexisting(LocalDateTime startCreateTime, LocalDateTime endCreateTime, String msg) {
+        if (!((startCreateTime == null && endCreateTime == null) || (startCreateTime != null && endCreateTime != null))) {
+            throw new BusinessException("请正确填写" + (StringUtils.isNotBlank(msg) ? msg : "开始和结束时间"));
+        }
+    }
+
+
+}

+ 39 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/utils/PageMoreRes.java

@@ -0,0 +1,39 @@
+package com.sckw.payment.utils;
+
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.model.page.PageRes;
+import com.sckw.payment.model.vo.res.SettlementLogisticsSumVo;
+
+import java.util.List;
+
+/**
+ * 返回的分页数据中,有额外需要返回的参数
+ *
+ * @author Aick Spt
+ * @date 2023-07-25 17:31
+ */
+public class PageMoreRes<T> extends PageRes<T> {
+
+    /**
+     * 更多其余数据
+     */
+    public SettlementLogisticsSumVo otherList;
+
+
+    public void setOtherList(SettlementLogisticsSumVo otherList) {
+        this.otherList = otherList;
+    }
+
+
+    public SettlementLogisticsSumVo getOtherList() {
+        return otherList;
+    }
+
+    public PageMoreRes(PageInfo<T> pageInfo, SettlementLogisticsSumVo otherList) {
+        super(pageInfo);
+        this.otherList = otherList;
+    }
+
+
+
+}

+ 24 - 0
sckw-modules/sckw-payment/src/main/resources/bootstrap-pdy.yml

@@ -0,0 +1,24 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: 10.10.10.230:8848
+        # 命名空间
+        namespace: sckw_pdy
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: 10.10.10.230:8848
+        # 配置文件格式
+        file-extension: yaml
+        # 命名空间
+        namespace: sckw_pdy
+        # 共享配置
+        group: sckw-service-platform
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 28 - 0
sckw-modules/sckw-payment/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,28 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 1 - 1
sckw-modules/sckw-payment/src/main/resources/bootstrap.yml

@@ -5,7 +5,7 @@ spring:
   application:
     name: sckw-payment
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
     allow-circular-references: true

+ 260 - 29
sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementLogisticsMapper.xml

@@ -1,33 +1,264 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.sckw.payment.dao.KwpSettlementLogisticsMapper">
-  <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementLogistics">
-    <!--@mbg.generated-->
-    <!--@Table kwp_settlement_logistics-->
-    <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="ent_id" jdbcType="BIGINT" property="entId" />
-    <result column="l_ledger_id" jdbcType="BIGINT" property="lLedgerId" />
-    <result column="sl_order_no" jdbcType="VARCHAR" property="slOrderNo" />
-    <result column="name" jdbcType="VARCHAR" property="name" />
-    <result column="total_price" jdbcType="DECIMAL" property="totalPrice" />
-    <result column="actual_price" jdbcType="DECIMAL" property="actualPrice" />
-    <result column="receipt_time" jdbcType="TIMESTAMP" property="receiptTime" />
-    <result column="remark" jdbcType="VARCHAR" property="remark" />
-    <result column="audit_user" jdbcType="VARCHAR" property="auditUser" />
-    <result column="audit_phone" jdbcType="VARCHAR" property="auditPhone" />
-    <result column="success_user" jdbcType="VARCHAR" property="successUser" />
-    <result column="success_phone" jdbcType="VARCHAR" property="successPhone" />
-    <result column="status" jdbcType="INTEGER" property="status" />
-    <result column="create_by" jdbcType="BIGINT" property="createBy" />
-    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
-    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
-    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    <!--@mbg.generated-->
-    id, ent_id, l_ledger_id, sl_order_no, `name`, total_price, actual_price, receipt_time, 
-    remark, audit_user, audit_phone, success_user, success_phone, `status`, create_by, 
-    create_time, update_by, update_time, del_flag
-  </sql>
+    <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementLogistics">
+        <!--@mbg.generated-->
+        <!--@Table kwp_settlement_logistics-->
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="ent_id" jdbcType="BIGINT" property="entId"/>
+        <result column="l_ledger_id" jdbcType="BIGINT" property="lLedgerId"/>
+        <result column="sl_order_no" jdbcType="VARCHAR" property="slOrderNo"/>
+        <result column="name" jdbcType="VARCHAR" property="name"/>
+        <result column="total_price" jdbcType="DECIMAL" property="totalPrice"/>
+        <result column="actual_price" jdbcType="DECIMAL" property="actualPrice"/>
+        <result column="receipt_time" jdbcType="TIMESTAMP" property="receiptTime"/>
+        <result column="remark" jdbcType="VARCHAR" property="remark"/>
+        <result column="audit_user" jdbcType="VARCHAR" property="auditUser"/>
+        <result column="audit_phone" jdbcType="VARCHAR" property="auditPhone"/>
+        <result column="success_user" jdbcType="VARCHAR" property="successUser"/>
+        <result column="success_phone" jdbcType="VARCHAR" property="successPhone"/>
+        <result column="status" jdbcType="INTEGER" property="status"/>
+        <result column="create_by" jdbcType="BIGINT" property="createBy"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="update_by" jdbcType="BIGINT" property="updateBy"/>
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,
+        ent_id,
+        l_ledger_id,
+        sl_order_no,
+        name,
+        total_price,
+        actual_price,
+        receipt_time,
+        remark,
+        audit_user,
+        audit_phone,
+        success_user,
+        success_phone,
+        status,
+        create_by,
+        create_time,
+        update_by,
+        update_time,
+        del_flag
+    </sql>
+
+    <sql id="Join_Column_List">
+        s.id,
+        s.ent_id        as entId,
+        s.l_ledger_id   as lLedgerId,
+        s.sl_order_no   as slOrderNo,
+        s.name,
+        s.total_price   as totalPrice,
+        s.actual_price  as actualPrice,
+        s.receipt_time  as receiptTime,
+        s.remark,
+        s.audit_user    as auditUser,
+        s.audit_phone   as auditPhone,
+        s.success_user  as successUser,
+        s.success_phone as successPhone,
+        s.status,
+        s.create_by     as createBy,
+        s.create_time   as createTime,
+        s.update_by     as updateBy,
+        s.update_time   as updateTime,
+        s.del_flag      as delFlag
+    </sql>
+
+
+    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+        <!--@mbg.generated-->
+        select
+        <include refid="Base_Column_List"/>
+        from kwp_settlement_logistics
+        where id = #{id,jdbcType=BIGINT}
+    </select>
+
+    <!--  连表筛选准备  -->
+    <sql id="settlementLogisticsSelect">
+        select l.name       as ledgerName,
+               l.l_ledger_no  as lLedgerNo,
+               l.trading      as ledgerTrading,
+               l.settle_price as ledgerSettlePrice,
+                l.url          as attachmentUrl,
+
+               lu.unit_type   as unitType,
+               lu.firm_name   as CustomerName,
+
+        <include refid="Join_Column_List"/>
+        from kwp_settlement_logistics s
+                 left join kwp_ledger_logistics l on s.l_ledger_id = l.id
+                 left join kwp_ledger_logistics_unit lu on s.l_ledger_id = lu.l_ledger_id
+    </sql>
+    <!--  连表筛选准备  -->
+    <sql id="settlementLogisticsSelectSum">
+        select count(l.id)                                    total,
+               sum(l.settle_price)                         as actualReceivable,
+               sum(s.actual_price)                         as currentReceipt
+        from kwp_settlement_logistics s
+                 left join kwp_ledger_logistics l on s.l_ledger_id = l.id
+                 left join kwp_ledger_logistics_unit lu on s.l_ledger_id = lu.l_ledger_id
+    </sql>
+
+    <!--  根据连表,查询条件准备  -->
+    <sql id="settlementLogisticsSelectWhere">
+        <if test="settlementReq.status != null">
+            and s.status = #{settlementReq.status}
+        </if>
+
+        <if test="settlementReq.startCreateTime != null and settlementReq.endCreateTime != null">
+            and s.create_time between #{settlementReq.startCreateTime,jdbcType=TIMESTAMP} and #{settlementReq.endCreateTime,jdbcType=TIMESTAMP}
+        </if>
+        <if test="settlementReq.startReceiptTime != null and settlementReq.endReceiptTime != null">
+            and s.receipt_time between #{settlementReq.startReceiptTime,jdbcType=TIMESTAMP} and #{settlementReq.endReceiptTime,jdbcType=TIMESTAMP}
+        </if>
+
+        <if test="settlementReq.keywords != null and settlementReq.keywords != ''">
+            and ( l.l_ledger_no like concat('%'
+                 , #{settlementReq.keywords}
+                 , '%')
+                )
+        </if>
+    </sql>
+
+
+    <!-- 结算运费收款(承运方)-物流订单列表  -->
+    <select id="pageSelectCollection" resultType="com.sckw.payment.model.dto.SettlementLogisticsDto">
+        <include refid="settlementLogisticsSelect"/>
+        <where>
+            lu.unit_type = 1
+              and l.del_flag = 0
+              and s.del_flag = 0
+              and lu.del_flag = 0
+            <include refid="settlementLogisticsSelectWhere"/>
+        </where>
+        order by s.update_time desc
+    </select>
+
+    <!--  结算运费收款(承运方)-物流订单列表合计  -->
+    <select id="selectCollectionSum" resultType="com.sckw.payment.model.vo.res.SettlementLogisticsSumVo">
+        select a.*, (a.actualReceivable - a.currentReceipt) AS remainingReceivables From (
+        <include refid="settlementLogisticsSelectSum"/>
+        <where>
+            lu.unit_type = 1
+              and l.del_flag = 0
+              and s.del_flag = 0
+              and lu.del_flag = 0
+            <include refid="settlementLogisticsSelectWhere"/>
+        </where>
+        ) a
+    </select>
+
+    <!-- 结算运费收款(承运方)-物流订单列表头部汇总数  -->
+    <select id="getCountListCollection" resultType="java.lang.Long">
+        select count(s.id) as num
+        from kwp_settlement_logistics s
+                 left join kwp_ledger_logistics l on s.l_ledger_id = l.id
+                 left join kwp_ledger_logistics_unit lu on s.l_ledger_id = lu.l_ledger_id
+        <where>
+            lu.unit_type = 1
+              and l.del_flag = 0
+              and s.del_flag = 0
+              and lu.del_flag = 0
+            <include refid="settlementLogisticsSelectWhere"/>
+        </where>
+    </select>
+
+    <!--  根据结算(承运方)物流订单id查详情   -->
+    <select id="detailCollection" parameterType="java.lang.Long" resultType="com.sckw.payment.model.dto.SettlementLogisticsDto">
+        select l.name         as ledgerName,
+               l.l_ledger_no  as lLedgerNo,
+               l.trading      as ledgerTrading,
+               l.settle_price as ledgerSettlePrice,
+        l.url          as attachmentUrl,
+
+               lu.unit_type   as unitType,
+               lu.firm_name   as CustomerName,
+        <include refid="Join_Column_List"/>
+        from kwp_settlement_logistics s
+                 left join kwp_ledger_logistics l on s.l_ledger_id = l.id
+                 left join kwp_ledger_logistics_unit lu on s.l_ledger_id = lu.l_ledger_id
+        where s.id = #{id,jdbcType=BIGINT}
+          and lu.unit_type = 1
+    </select>
+
+
+
+    <!-- 结算运费付款(托运方)-物流订单列表  -->
+    <select id="pageSelectPayment" resultType="com.sckw.payment.model.dto.SettlementLogisticsDto">
+        <include refid="settlementLogisticsSelect"/>
+        <where>
+            lu.unit_type = 2
+              and l.del_flag = 0
+              and s.del_flag = 0
+              and lu.del_flag = 0
+            <include refid="settlementLogisticsSelectWhere"/>
+        </where>
+        order by s.update_time desc
+    </select>
+
+    <!-- 结算运费付款(托运方)-物流订单列表头部汇总数  -->
+    <select id="getCountListPayment" resultType="java.lang.Long">
+        select count(s.id) as num
+        from kwp_settlement_logistics s
+                 left join kwp_ledger_logistics l on s.l_ledger_id = l.id
+                 left join kwp_ledger_logistics_unit lu on s.l_ledger_id = lu.l_ledger_id
+        <where>
+            lu.unit_type = 2
+              and l.del_flag = 0
+              and s.del_flag = 0
+              and lu.del_flag = 0
+            <include refid="settlementLogisticsSelectWhere"/>
+        </where>
+    </select>
+
+    <!-- 根据结算(托运方)物流订单id查详情   -->
+    <select id="detailPayment" parameterType="java.lang.Long" resultType="com.sckw.payment.model.dto.SettlementLogisticsDto">
+        select l.name         as ledgerName,
+               l.l_ledger_no  as lLedgerNo,
+               l.trading      as ledgerTrading,
+               l.settle_price as ledgerSettlePrice,
+               l.url          as attachmentUrl,
+
+               lu.unit_type   as unitType,
+               lu.firm_name   as CustomerName,
+        <include refid="Join_Column_List"/>
+        from kwp_settlement_logistics s
+                 left join kwp_ledger_logistics l on s.l_ledger_id = l.id
+                 left join kwp_ledger_logistics_unit lu on s.l_ledger_id = lu.l_ledger_id
+        where s.id = #{id,jdbcType=BIGINT}
+          and lu.unit_type = 2
+    </select>
+
+
+    <!--  根据多个结算运费收款(线下收款)物流订单id查订单,用于导出   -->
+    <select id="selectIds" resultType="com.sckw.payment.model.dto.SettlementLogisticsDto">
+        <include refid="settlementLogisticsSelect"/>
+        <where>
+            lu.unit_type = 2
+            and l.del_flag = 0
+            and s.del_flag = 0
+            and lu.del_flag = 0
+              and s.id in
+            <foreach collection="ids" item="id" close=")" open="(" separator=",">
+                #{id,jdbcType=BIGINT}
+            </foreach>
+        </where>
+        order by s.update_time desc
+    </select>
+
+    <select id="selectList" resultType="com.sckw.payment.model.dto.SettlementLogisticsDto">
+        <include refid="settlementLogisticsSelect"/>
+        <where>
+            lu.unit_type = #{unitType,jdbcType=INTEGER}
+              and l.del_flag = 0
+              and s.del_flag = 0
+              and lu.del_flag = 0
+        </where>
+        order by s.update_time desc
+    </select>
 </mapper>

+ 61 - 32
sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementOfflineMapper.xml

@@ -1,36 +1,65 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.sckw.payment.dao.KwpSettlementOfflineMapper">
-  <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementOffline">
-    <!--@mbg.generated-->
-    <!--@Table kwp_settlement_offline-->
-    <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="ent_id" jdbcType="BIGINT" property="entId" />
-    <result column="settlement_id" jdbcType="BIGINT" property="settlementId" />
-    <result column="coll_ent_id" jdbcType="BIGINT" property="collEntId" />
-    <result column="coll_firm_name" jdbcType="VARCHAR" property="collFirmName" />
-    <result column="coll_price" jdbcType="DECIMAL" property="collPrice" />
-    <result column="coll_time" jdbcType="TIMESTAMP" property="collTime" />
-    <result column="coll_user_id" jdbcType="BIGINT" property="collUserId" />
-    <result column="coll_urls" jdbcType="VARCHAR" property="collUrls" />
-    <result column="pay_ent_id" jdbcType="BIGINT" property="payEntId" />
-    <result column="pay_firm_name" jdbcType="VARCHAR" property="payFirmName" />
-    <result column="pay_price" jdbcType="DECIMAL" property="payPrice" />
-    <result column="pay_time" jdbcType="TIMESTAMP" property="payTime" />
-    <result column="pay_user_id" jdbcType="BIGINT" property="payUserId" />
-    <result column="pay_urls" jdbcType="VARCHAR" property="payUrls" />
-    <result column="remark" jdbcType="VARCHAR" property="remark" />
-    <result column="status" jdbcType="INTEGER" property="status" />
-    <result column="create_by" jdbcType="BIGINT" property="createBy" />
-    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
-    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
-    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    <!--@mbg.generated-->
-    id, ent_id, settlement_id, coll_ent_id, coll_firm_name, coll_price, coll_time, coll_user_id, 
-    coll_urls, pay_ent_id, pay_firm_name, pay_price, pay_time, pay_user_id, pay_urls, 
-    remark, `status`, create_by, create_time, update_by, update_time, del_flag
-  </sql>
+    <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementOffline">
+        <!--@mbg.generated-->
+        <!--@Table kwp_settlement_offline-->
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="ent_id" jdbcType="BIGINT" property="entId"/>
+        <result column="settlement_id" jdbcType="BIGINT" property="settlementId"/>
+        <result column="order_type" jdbcType="TINYINT" property="orderType"/>
+        <result column="pay_time" jdbcType="TIMESTAMP" property="payTime"/>
+        <result column="pay_price" jdbcType="DECIMAL" property="payPrice"/>
+        <result column="topay_price" jdbcType="DECIMAL" property="topayPrice"/>
+        <result column="url" jdbcType="VARCHAR" property="url"/>
+        <result column="remark" jdbcType="VARCHAR" property="remark"/>
+        <result column="status" jdbcType="INTEGER" property="status"/>
+        <result column="create_by" jdbcType="BIGINT" property="createBy"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="update_by" jdbcType="BIGINT" property="updateBy"/>
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
+    </resultMap>
+
+
+    <sql id="Base_Column_List">
+        <!--@mbg.generated-->
+        id,
+        ent_id,
+        settlement_id,
+        order_type,
+        pay_time,
+        pay_price,
+        topay_price,
+        url,
+        remark,
+        `status`,
+        create_by,
+        create_time,
+        update_by,
+        update_time,
+        del_flag
+    </sql>
+
+    <!-- 物流-线下付款(运费收款)记录-列表 -->
+    <select id="pageListLogisticsCollection" resultType="com.sckw.payment.model.dto.SettlementOfflineDto">
+        select
+        <include refid="Base_Column_List"/>
+        FROM kwp_settlement_offline
+        <where>
+            order_type = 1
+        </where>
+    </select>
+
+    <select id="detailLogisticsCollection" resultType="com.sckw.payment.model.dto.SettlementOfflineDto">
+        select
+        <include refid="Base_Column_List"/>
+        FROM kwp_settlement_offline
+        <where>
+            order_type = 1
+        </where>
+    </select>
+
+    <select id="confirmLogisticsCollection" resultType="java.lang.Integer">
+    </select>
 </mapper>

+ 80 - 22
sckw-modules/sckw-payment/src/main/resources/mapper/KwpSettlementWalletMapper.xml

@@ -1,26 +1,84 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.sckw.payment.dao.KwpSettlementWalletMapper">
-  <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementWallet">
-    <!--@mbg.generated-->
-    <!--@Table kwp_settlement_wallet-->
-    <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="ent_id" jdbcType="BIGINT" property="entId" />
-    <result column="order_id" jdbcType="BIGINT" property="orderId" />
-    <result column="wallet_id" jdbcType="BIGINT" property="walletId" />
-    <result column="price" jdbcType="DECIMAL" property="price" />
-    <result column="type" jdbcType="INTEGER" property="type" />
-    <result column="remark" jdbcType="VARCHAR" property="remark" />
-    <result column="status" jdbcType="INTEGER" property="status" />
-    <result column="create_by" jdbcType="BIGINT" property="createBy" />
-    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-    <result column="update_by" jdbcType="BIGINT" property="updateBy" />
-    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
-    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
-  </resultMap>
-  <sql id="Base_Column_List">
-    <!--@mbg.generated-->
-    id, ent_id, order_id, wallet_id, price, `type`, remark, `status`, create_by, create_time, 
-    update_by, update_time, del_flag
-  </sql>
+    <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementWallet">
+        <!--@mbg.generated-->
+        <!--@Table kwp_settlement_wallet-->
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="ent_id" jdbcType="BIGINT" property="entId"/>
+        <result column="settlement_id" jdbcType="BIGINT" property="settlementId"/>
+        <result column="order_type" jdbcType="INTEGER" property="orderType"/>
+        <result column="channel" jdbcType="BOOLEAN" property="channel"/>
+        <result column="pay_time" jdbcType="TIMESTAMP" property="payTime"/>
+        <result column="pay_price" jdbcType="DECIMAL" property="payPrice"/>
+        <result column="topay_price" jdbcType="DECIMAL" property="topayPrice"/>
+        <result column="type" jdbcType="INTEGER" property="type"/>
+        <result column="remark" jdbcType="VARCHAR" property="remark"/>
+        <result column="status" jdbcType="INTEGER" property="status"/>
+        <result column="create_by" jdbcType="BIGINT" property="createBy"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="update_by" jdbcType="BIGINT" property="updateBy"/>
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,
+        ent_id,
+        settlement_id,
+        order_type,
+        channel,
+        pay_time,
+        pay_price,
+        topay_price,
+        `type`,
+        remark,
+        `status`,
+        create_by,
+        create_time,
+        update_by,
+        update_time,
+        del_flag
+    </sql>
+
+
+    <sql id="Join_Column_List">
+        w.id,
+        w.ent_id,
+        w.settlement_id,
+        w.order_type,
+        w.channel,
+        w.pay_time,
+        w.pay_price,
+        w.topay_price,
+        w.`type`,
+        w.remark,
+        w.`status`,
+        w.create_by,
+        w.create_time,
+        w.update_by,
+        w.update_time,
+        w.del_flag
+    </sql>
+
+    <select id="pageListLogisticsPayment" resultType="com.sckw.payment.model.dto.SettlementWalletDto">
+        select
+        <include refid="Join_Column_List"/>
+        from kwp_settlement_wallet w
+        <where>
+            w.type = #{settlementWalletReq.payType}
+        </where>
+        order by w.update_time desc
+    </select>
+
+    <select id="detailLogisticsPayment" resultType="com.sckw.payment.model.dto.SettlementWalletDto">
+        select
+        <include refid="Base_Column_List"/>
+        from kwp_settlement_wallet
+        where id = #{id,jdbcType=BIGINT}
+    </select>
+
+    <select id="confirmLogisticsPayment" resultType="java.lang.Integer">
+        insert into kwp_settlement_wallet ( <include refid="Base_Column_List"/>) value ();
+    </select>
 </mapper>

+ 29 - 0
sckw-modules/sckw-product/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,29 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 1 - 1
sckw-modules/sckw-product/src/main/resources/bootstrap.yml

@@ -5,7 +5,7 @@ spring:
   application:
     name: sckw-product
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
     allow-circular-references: true

+ 29 - 0
sckw-modules/sckw-system/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,29 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 1 - 1
sckw-modules/sckw-system/src/main/resources/bootstrap.yml

@@ -5,7 +5,7 @@ spring:
   application:
     name: sckw-system
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
     allow-circular-references: true

+ 29 - 0
sckw-modules/sckw-transport/src/main/resources/bootstrap-xcq.yml

@@ -0,0 +1,29 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: @nacos.server@
+        # 命名空间
+        namespace: @nacos.namespace@
+        # 共享配置
+        group: sckw-service-platform
+        # 配置文件格式
+        file-extension: yaml
+        shared-configs:
+          - data-id: sckw-common.yml
+            group: sckw-common
+            refresh: true
+
+        #可以读多个配置文件  需要在同一个命名空间下面可以是不同的组
+        extension-configs:
+          - dataId: sckw-common.yml
+            group: sckw-service-platform
+            refresh: true

+ 2 - 2
sckw-modules/sckw-transport/src/main/resources/bootstrap.yml

@@ -5,7 +5,7 @@ spring:
   application:
     name: sckw-transport
   profiles:
-    active: ${DEPLOY_MODE:dev}
+    active: @profiles.active@
   main:
     allow-bean-definition-overriding: true
-    allow-circular-references: true
+    allow-circular-references: true