#2 4.2版本迭代

Обединени
18349259710 обедини 150 ревизии от 17358629955/test във 17358629955/dist преди 1 година
променени са 100 файла, в които са добавени 3528 реда и са изтрити 438 реда
  1. 2 0
      .gitignore
  2. 1 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/DictEnum.java
  3. 4 4
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/filter/RequestCheckFilter.java
  4. 4 4
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/AddressTypeEnum.java
  5. 113 53
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CarWaybillEnum.java
  6. 7 1
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/page/PageHelperUtil.java
  7. 4 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/DateUtils.java
  8. 29 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/StringUtils.java
  9. 1 1
      sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/easyexcel/ExcelImportListener.java
  10. 0 151
      sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/utils/EasyExcelUtil.java
  11. 8 0
      sckw-common/sckw-common-redis/src/main/java/com/sckw/redis/constant/RedisConstant.java
  12. 20 0
      sckw-gateway/src/main/resources/bootstrap-lfdc.yml
  13. 14 4
      sckw-modules-api/sckw-manage-api/src/main/java/com/sckw/manage/api/RemoteManageService.java
  14. 152 0
      sckw-modules-api/sckw-manage-api/src/main/java/com/sckw/manage/api/model/dto/res/LineFreightAddressRes.java
  15. 34 0
      sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/dubbo/RemoteTradeOrderAmountService.java
  16. 11 0
      sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/dubbo/TradeOrderInfoService.java
  17. 39 0
      sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/model/AddressActualAmountParam.java
  18. 6 0
      sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/model/AddressInfoDetail.java
  19. 90 0
      sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/model/OrderAddressDetailRes.java
  20. 47 0
      sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/model/UpdateAddressActualAmountParam.java
  21. 53 0
      sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/model/UpdateAddressEntrustAmountParam.java
  22. 7 3
      sckw-modules-api/sckw-payment-api/src/main/java/com/sckw/payment/api/model/constant/ChannelEnum.java
  23. 66 0
      sckw-modules-api/sckw-payment-api/src/main/java/com/sckw/payment/api/model/dto/WalletVo.java
  24. 2 0
      sckw-modules-api/sckw-product-api/src/main/java/com/sckw/product/api/dubbo/GoodsInfoService.java
  25. 20 0
      sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/RemoteTransportLineFreightRateService.java
  26. 5 23
      sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/TransportRemoteService.java
  27. 1 1
      sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/TransportRemoteStatisticsService.java
  28. 6 1
      sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/model/dto/AcceptCarriageLogisticsOrderDto.java
  29. 0 13
      sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/model/dto/AddressResDTO.java
  30. 2 0
      sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/model/vo/LogisticsOrderVO.java
  31. 0 25
      sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/model/vo/RWaybillOrderVo.java
  32. 3 3
      sckw-modules/pom.xml
  33. 1 1
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/controller/KwcCarrierController.java
  34. 1 7
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/controller/KwcCheckedController.java
  35. 1 1
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/controller/KwcContractSaleController.java
  36. 1 1
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/controller/KwcPurchaseController.java
  37. 15 9
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/CommonBusinessService.java
  38. 4 6
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/KwcContractLogisticsGoodsService.java
  39. 5 1
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/operateService/KwcContractLogisticsService.java
  40. 5 1
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/operateService/KwcContractTradeService.java
  41. 1 1
      sckw-modules/sckw-example/src/main/java/com/sckw/example/controller/TestController.java
  42. 2 2
      sckw-modules/sckw-example/src/main/java/com/sckw/example/service/TransportService.java
  43. 3 3
      sckw-modules/sckw-file/src/main/java/com/sckw/file/controller/KwfFileController.java
  44. 2 2
      sckw-modules/sckw-file/src/main/java/com/sckw/file/service/FileService.java
  45. 5 5
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfDriverService.java
  46. 14 18
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckReportService.java
  47. 19 13
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckService.java
  48. 3 3
      sckw-modules/sckw-fleet/src/main/resources/mapper/KwfDriverMapper.xml
  49. 80 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/controller/KwmLineFreightRateController.java
  50. 15 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/dao/KwmLineFreightRateMapper.java
  51. 49 2
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/dubbo/RemoteManageServiceImpl.java
  52. 115 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/entity/KwmLineFreightRate.java
  53. 75 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/AddLineFreightRateParam.java
  54. 37 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/ChooseLineFreightRateParam.java
  55. 54 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/ExportLineFreightRateParam.java
  56. 21 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/LineFreightRateFindListParam.java
  57. 5 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/QueryByEntReqVo.java
  58. 57 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/SelectLineFreightRateParam.java
  59. 82 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/UpdateLineFreightRateParam.java
  60. 61 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/res/LineFreightRateDetail.java
  61. 53 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/res/LineFreightRateExport.java
  62. 38 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/res/LineFreightRateFindListResVO.java
  63. 86 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/res/LineFreightRateListResVO.java
  64. 0 3
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/CommonBusinessService.java
  65. 43 41
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmAddressService.java
  66. 4 6
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateApplyService.java
  67. 3 3
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateManageService.java
  68. 361 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmLineFreightRateService.java
  69. 0 3
      sckw-modules/sckw-operation/src/main/java/com/sckw/operation/service/BannerService.java
  70. 88 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/controller/KwoTradeOrderController.java
  71. 25 4
      sckw-modules/sckw-order/src/main/java/com/sckw/order/controller/KwoTradeOrderStatisticsController.java
  72. 87 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/controller/TradeOrderManageController.java
  73. 2 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/dao/KwoTradeOrderAddressMapper.java
  74. 18 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/dao/KwoTradeOrderAmountMapper.java
  75. 98 2
      sckw-modules/sckw-order/src/main/java/com/sckw/order/dao/KwoTradeOrderMapper.java
  76. 148 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/dubbo/RemoteTradeOrderAmountServiceImpl.java
  77. 15 7
      sckw-modules/sckw-order/src/main/java/com/sckw/order/dubbo/TradeOrderInfoServiceImpl.java
  78. 10 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/enums/OrderStatusEnum.java
  79. 7 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/KwoTradeOrderAddress.java
  80. 60 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/KwoTradeOrderAmount.java
  81. 23 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/LoadAddressDTO.java
  82. 86 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/OperatorTOrderListStsConditionDTO.java
  83. 155 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/OrderListResDTO.java
  84. 50 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/OrderStsInfoDTO.java
  85. 35 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/TradeOrderAppStatisticParamDTO.java
  86. 25 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/TradeOrderContractParamDTO.java
  87. 105 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/TradeOrderListSelectDTO.java
  88. 55 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/TradeOrderStatementListParamDTO.java
  89. 24 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/UnloadAddressDTO.java
  90. 47 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/WorkbenchOrderStsDTO.java
  91. 56 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/WorkbenchPurchaseDTO.java
  92. 13 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/AcceptanceOrderParam.java
  93. 17 2
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/AddressInfo.java
  94. 24 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/OperatorTOrderContractParam.java
  95. 35 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/OperatorTOrderExportQueryVO.java
  96. 39 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/OperatorTOrderListQueryVO.java
  97. 81 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/OperatorTOrderStsQueryVO.java
  98. 3 3
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/PurchaseOrderDraftParam.java
  99. 0 1
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/PurchaseOrderParam.java
  100. 25 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/TradeOrderAppStatisticParam.java

+ 2 - 0
.gitignore

@@ -25,3 +25,5 @@ hs_err_pid*
 ### logs目录 ###
 logs
 
+.flattened-pom.xml
+

+ 1 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/DictEnum.java

@@ -80,6 +80,7 @@ public enum DictEnum {
     CHARGING_TYPE_1("charging_type", "1", "按装货量") ,
     CHARGING_TYPE_2("charging_type", "2", "按卸货量") ,
     CHARGING_TYPE_3("charging_type", "3", "按车次"),
+    CHARGING_TYPE_4("charging_type", "4", "按线路"),
     SIGNING_WAY_1("signing_way", "1", "线上签约"),
     SIGNING_WAY_2("signing_way", "2", "线下签约"),
     TRANSPORT_DEMAND_STATUS_0("transport_demand_status", "0","已保存"),

+ 4 - 4
sckw-common/sckw-common-core/src/main/java/com/sckw/core/filter/RequestCheckFilter.java

@@ -40,12 +40,12 @@ public class RequestCheckFilter implements Filter {
     CustomConfig customConfig;
 
     /**
-     * 直接放行不需要校验token的请求
+     * 直接放行不需要校验Access-Token的请求
      */
     private static final List<String> EXCLUDEPATH = new ArrayList<>();
 
     /**
-     * 直接放行不需要校验token的请求
+     * 直接放行不需要校验Access-Special的请求
      */
     private static final List<String> IMPORT_PASS_PATH = new ArrayList<>();
 
@@ -67,8 +67,8 @@ public class RequestCheckFilter implements Filter {
             EXCLUDEPATH.addAll(Arrays.asList(links.split(Global.COMMA)));
         }
 
-        String importLinks = customConfig.getSpecialLinks();
-        if (StringUtils.isNotBlank(importLinks)) {
+        String specialLinks = customConfig.getSpecialLinks();
+        if (StringUtils.isNotBlank(specialLinks)) {
             IMPORT_PASS_PATH.addAll(Arrays.asList(links.split(Global.COMMA)));
         }
 //        String withoutLinks = customConfig.getWithoutLinks();

+ 4 - 4
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/AddressDefaultTypeEnum.java → sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/AddressTypeEnum.java

@@ -8,7 +8,7 @@ import lombok.Getter;
  * @date 2023/6/15
  */
 @Getter
-public enum AddressDefaultTypeEnum {
+public enum AddressTypeEnum {
 
     //普通
     NO(0, ""),
@@ -23,13 +23,13 @@ public enum AddressDefaultTypeEnum {
 
     private final String name;
 
-    AddressDefaultTypeEnum(int code, String name){
+    AddressTypeEnum(int code, String name){
         this.code = code;
         this.name = name;
     }
 
-    public static AddressDefaultTypeEnum getName(int code){
-        for (AddressDefaultTypeEnum addressDefaultTypeEnum : values()) {
+    public static AddressTypeEnum getName(int code){
+        for (AddressTypeEnum addressDefaultTypeEnum : values()) {
             if (addressDefaultTypeEnum.getCode() == code) {
                 return addressDefaultTypeEnum;
             }

+ 113 - 53
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/CarWaybillEnum.java

@@ -5,68 +5,73 @@ import java.util.List;
 
 /**
  * @author lfdc
- * @description 车辆运单状态枚举
+ * @desc 车辆运单状态枚举
  * @date 2023-07-14 14:07:23
  */
 public enum CarWaybillEnum {
     /**
      * 待接单
      */
-    PENDING_ORDER(1, "pendingOrder", "1", "待接单"),
+    PENDING_ORDER(101, "pendingOrder", "101", "待接单", "已指派"),
     /**
-     * 待出车
+     * 已撤销
      */
-    PENDING_VEHICLE(2, "pendingVehicle", "2", "待出车"),
+    REVOKED(102, "revoked", "102", "撤回", "撤回"),
     /**
-     * 已出车
+     * 拒接单
      */
-    EXIT_COMPLETED(3, "exitCompleted", "3", "已出车"),
+    REJECT_ORDER(103, "rejectOrder", "103", "拒接单", "拒接单"),
     /**
-     * 到达装货点
+     * 出车-待出车
      */
-    WAIT_LOADING(4, "waitLoading", "4", "到达装货点"),
+    PENDING_VEHICLE(201, "pendingVehicle", "201", "待出车", "确认接单"),
     /**
-     * 已装货
+     * 出车-拒出车
      */
-    COMPLETION_LOADING(5, "completionLoading", "5", "已装货"),
+    REFUSE_TRAFFIC(202, "refuseTraffic", "202", "拒出车", "拒出车"),
     /**
-     * 到达卸货点
+     * 出车-已出车
      */
-    WAIT_UNLOADING(6, "waitUnloading", "6", "到达卸货点"),
+    EXIT_COMPLETED(203, "exitCompleted", "203", "已出车", "确认出车"),
     /**
-     * 已卸货
+     * 装货-到达装货点
      */
-    COMPLETION_UNLOADING(7, "completionUnloading", "7", "已卸货"),
+    WAIT_LOADING(301, "waitLoading", "301", "到达装货点", "到达装货点"),
     /**
-     * 已核-通过
+     * 装货-已装货
      */
-    APPROVAL_PASS(8, "approvalPass", "8", "审核通过"),
+    COMPLETION_LOADING(302, "completionLoading", "302", "已装货", "确认装货"),
     /**
-     * 拒接单
+     * 卸货-到达卸货点
      */
-    REJECT_ORDER(9, "rejectOrder", "9", "拒接单"),
+    WAIT_UNLOADING(401, "waitUnloading", "401", "到达卸货点", "到达卸货点"),
     /**
-     * 拒出车
+     * 卸货-已卸货
      */
-    REFUSE_TRAFFIC(10, "refuseTraffic", "10", "拒出车"),
+    COMPLETION_UNLOADING(402, "completionUnloading", "402", "已卸货", "确认卸货"),
     /**
-     * 已撤销
+     * 审核-待
+     */
+    APPROVAL_TREAT(501, "approvalTreat", "501", "待审核", "待审核"),
+    /**
+     * 审核-通过
      */
-    REVOKED(11, "revoked", "11", "撤回"),
+    APPROVAL_PASS(502, "approvalPass", "502", "审核通过", "审核通过"),
     /**
-     * 已核单-不通过[审核不通过]
+     * 审核-驳回
      */
-    APPROVAL_NO_PASS(12, "revoked", "12", "核单驳回"),
+    APPROVAL_NO_PASS(503, "revoked", "503", "核单驳回", "核单驳回"),
     /**
-     * 单证更新审核中
+     * 审核-单证更新审核中
      */
-    APPROVAL_IN(13, "approvalIn", "13", "单证更新审核中"),
+    APPROVAL_IN(504, "approvalIn", "504", "单证更新审核中", "单证更新审核中"),
     ;
 
     private final Integer code;
     private final String value;
     private final String status;
     private final String destination;
+    private final String alias;
 
     public Integer getCode() {
         return code;
@@ -80,14 +85,19 @@ public enum CarWaybillEnum {
         return status;
     }
 
+    public String getAlias() {
+        return alias;
+    }
+
     public String getDestination() {
         return destination;
     }
 
-    CarWaybillEnum(Integer code, String value, String status, String destination) {
+    CarWaybillEnum(Integer code, String value, String status, String destination, String alias) {
         this.code = code;
         this.value = value;
         this.status = status;
+        this.alias = alias;
         this.destination = destination;
     }
 
@@ -118,6 +128,15 @@ public enum CarWaybillEnum {
         return null;
     }
 
+    public static String getAlias(Integer code) {
+        for (CarWaybillEnum waybillEnum : CarWaybillEnum.values()) {
+            if (waybillEnum.getCode().equals(code)) {
+                return waybillEnum.getAlias();
+            }
+        }
+        return null;
+    }
+
     public static List<Integer> getCodes() {
         List<Integer> codes = new ArrayList<>();
         for (CarWaybillEnum waybillEnum : CarWaybillEnum.values()) {
@@ -141,15 +160,53 @@ public enum CarWaybillEnum {
      * @date 2023/8/2
      **/
     public static boolean changeDriver(int code) {
-        if (code == CarWaybillEnum.COMPLETION_UNLOADING.getCode()
-                || code == CarWaybillEnum.APPROVAL_PASS.getCode()
-                || code == CarWaybillEnum.REJECT_ORDER.getCode()
-                || code == CarWaybillEnum.REFUSE_TRAFFIC.getCode()
-                || code == CarWaybillEnum.REVOKED.getCode()
-                || code == CarWaybillEnum.APPROVAL_NO_PASS.getCode()) {
-            return false;
-        }
-        return true;
+        return code != CarWaybillEnum.COMPLETION_UNLOADING.getCode()
+                && code != CarWaybillEnum.APPROVAL_PASS.getCode()
+                && code != CarWaybillEnum.REJECT_ORDER.getCode()
+                && code != CarWaybillEnum.REFUSE_TRAFFIC.getCode()
+                && code != CarWaybillEnum.REVOKED.getCode()
+                && code != CarWaybillEnum.APPROVAL_NO_PASS.getCode();
+    }
+
+    /**
+     * @param code 状态码
+     * @desc 是否可以变更司机
+     * @author zk
+     * @date 2023/8/2
+     **/
+    public static boolean arriveLocation(int code) {
+        return code == CarWaybillEnum.EXIT_COMPLETED.getCode()
+                || code == CarWaybillEnum.WAIT_LOADING.getCode()
+                || code == CarWaybillEnum.COMPLETION_LOADING.getCode()
+                || code == CarWaybillEnum.WAIT_UNLOADING.getCode()
+                || code == CarWaybillEnum.COMPLETION_UNLOADING.getCode();
+    }
+
+    /**
+     * @param code 状态码
+     * @desc 是否可以变更司机
+     * @author zk
+     * @date 2023/8/2
+     **/
+    public static boolean arriveLoading(int code) {
+        return code == CarWaybillEnum.WAIT_LOADING.getCode()
+                || code == CarWaybillEnum.COMPLETION_LOADING.getCode()
+                || code == CarWaybillEnum.WAIT_UNLOADING.getCode()
+                || code == CarWaybillEnum.COMPLETION_UNLOADING.getCode()
+                || code == CarWaybillEnum.APPROVAL_TREAT.getCode()
+                || code == CarWaybillEnum.APPROVAL_NO_PASS.getCode();
+    }
+
+    /**
+     * @param code 状态码
+     * @desc 是否可以变更司机
+     * @author zk
+     * @date 2023/8/2
+     **/
+    public static boolean editTicket(int code) {
+        return code == CarWaybillEnum.APPROVAL_TREAT.getCode()
+                || code == CarWaybillEnum.APPROVAL_NO_PASS.getCode()
+                || code == CarWaybillEnum.APPROVAL_IN.getCode() ;
     }
 
     /**
@@ -159,28 +216,31 @@ public enum CarWaybillEnum {
      * @date 2023/8/2
      **/
     public static boolean changeTruck(int code) {
-        if (code == CarWaybillEnum.PENDING_ORDER.getCode()
-                || code == CarWaybillEnum.PENDING_VEHICLE.getCode()) {
-            return true;
-        }
-        return false;
+        return code == CarWaybillEnum.PENDING_ORDER.getCode()
+                || code == CarWaybillEnum.PENDING_VEHICLE.getCode();
     }
 
     /**
-     * 获取编码以及注释
-     *
-     * @return
+     * 运单状态
+     * @return 状态集
      */
-    public static String getCodeAndDestination() {
-        StringBuilder sb = new StringBuilder();
-        for (CarWaybillEnum value : CarWaybillEnum.values()) {
-            sb.append(value.getCode()+":").append(value.destination).append(";");
-        }
-        return sb.toString();
+    public static List<Integer> initWaybillStatusV1() {
+        List<Integer> statuses = new ArrayList<>();
+        //statuses.add(CarWaybillEnum.PENDING_ORDER.getCode());
+        statuses.add(CarWaybillEnum.PENDING_VEHICLE.getCode());
+        statuses.add(CarWaybillEnum.EXIT_COMPLETED.getCode());
+        return statuses;
     }
 
-    public static void main(String[] args) {
-        String codeAndDestination = getCodeAndDestination();
-        System.out.println(codeAndDestination);
+    /**
+     * 运单状态
+     * @return 状态集
+     */
+    public static List<Integer> initWaybillStatusV2() {
+        List<Integer> statuses = new ArrayList<>();
+        statuses.add(CarWaybillEnum.PENDING_ORDER.getCode());
+        statuses.add(CarWaybillEnum.PENDING_VEHICLE.getCode());
+        statuses.add(CarWaybillEnum.EXIT_COMPLETED.getCode());
+        return statuses;
     }
 }

+ 7 - 1
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/page/PageHelperUtil.java

@@ -8,6 +8,7 @@ import java.util.List;
 
 /**
  * MyBatis 分页查询助手
+ *
  * @author zk
  * @date Nov 24, 2018
  */
@@ -73,7 +74,12 @@ public class PageHelperUtil {
         pageResult.setPage(pageInfo.getPageNum());
         pageResult.setPageSize(pageInfo.getPageSize());
         pageResult.setSize(pageInfo.getTotal());
-        pageResult.setPages(pageInfo.getPages());
+//        pageResult.setPages((int)(pageResult.getSize() + pageResult.getPageSize() - 1) / pageResult.getPageSize());
+        if (pageResult.getPageSize() < 1) {
+            pageResult.setPages((int) ((pageResult.getSize() + pageResult.getPageSize()) < 1 ? 0 : (pageResult.getSize() + pageResult.getPageSize() - 1)));
+        }else {
+            pageResult.setPages((int) ((pageResult.getSize() + pageResult.getPageSize()) < 1 ? 0 : (pageResult.getSize() + pageResult.getPageSize() - 1)) / pageResult.getPageSize());
+        }
         pageResult.setList(pageInfo.getList());
         return pageResult;
     }

+ 4 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/DateUtils.java

@@ -46,6 +46,10 @@ public class DateUtils extends DateUtil {
 
     public static String FORMAT10 = "yyyy-MM";
 
+    public static String FORMAT11 = "MM-dd HH:mm";
+
+    public static String FORMAT12 = "yy-MM";
+
     public static int THIRTEEN = 13;
 
     /**

+ 29 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/StringUtils.java

@@ -656,6 +656,28 @@ public class StringUtils {
         return ret.toString();
     }
 
+    /**
+     * 分字符串拼接
+     *
+     * @param list 字符串数组
+     * @return 拼接字符串 "," 分割
+     */
+    public static String stringListSpliceToString(List<String> list) {
+        StringBuilder sb = new StringBuilder();
+        if (CollectionUtils.isEmpty(list)) {
+            return null;
+        }
+        for (int i = 0; i < list.size(); i++) {
+            if (i != (list.size() - 1)) {
+                sb.append(list.get(i).trim()).append(";");
+            } else {
+                sb.append(list.get(i).trim());
+            }
+        }
+        return sb.toString();
+    }
+
+
     /**
      * 替换字符串${xxxx}
      *
@@ -816,6 +838,13 @@ public class StringUtils {
     }
 
     public static void main(String[] args) {
+        String s = stringListSpliceToString(new ArrayList<>() {{
+            add("张三");
+            add("李四");
+            add("aaaa");
+            add("bbbb");
+            add("cccc");
+        }});
         Map<String, Object> param = new HashMap<>(Global.NUMERICAL_SIXTEEN);
         param.put("account", "17358629955");
         param.put("pwd", "123456");

+ 1 - 1
sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/easyexcel/ExcelImportListener.java

@@ -31,7 +31,7 @@ public class ExcelImportListener extends AnalysisEventListener<Object> {
         String validMsg = ValidDataUtil.valid(data);
         if (validMsg != null) {
             //+1行(实际中excel中第几行的数据)
-            int rowIndex = context.readRowHolder().getRowIndex() + 1;
+            int rowIndex = context.readRowHolder().getRowIndex() + 4;
             String errorMsg = "第" + rowIndex + "行数据有误," + validMsg;
             errorList.add(errorMsg);
         } else {

+ 0 - 151
sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/utils/EasyExcelUtil.java

@@ -1,151 +0,0 @@
-package com.sckw.excel.utils;
-
-
-import com.alibaba.excel.EasyExcel;
-import com.alibaba.excel.ExcelWriter;
-import com.alibaba.excel.support.ExcelTypeEnum;
-import com.alibaba.excel.write.metadata.WriteSheet;
-import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
-import com.alibaba.fastjson.JSON;
-import com.sckw.core.web.response.HttpResult;
-import com.sckw.excel.config.easyexcel.CustomCellWriteHandler;
-import com.sckw.excel.config.easyexcel.ExcelListener;
-import com.sckw.excel.config.easyexcel.RequestHolder;
-import com.sckw.excel.config.easyexcel.SheetExcelData;
-import jakarta.servlet.ServletOutputStream;
-import jakarta.servlet.http.HttpServletResponse;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpStatus;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.time.LocalDate;
-import java.util.List;
-
-/**
- * Excel工具类
- * @author LengFaQiang
- * @Created 2019-7-18 18:01:53
- **/
-@Slf4j
-public class EasyExcelUtil {
-    /**
-     * 读取单个sheet的excel文件
-     * @param excel 文件
-     * @param t 实体类型
-     * @param headRowNumber 头行数
-     * @return
-     * @throws Exception
-     */
-    public static <T> List<T> readSingleExcel(MultipartFile excel, T t, int headRowNumber) throws IOException {
-        return EasyExcel.read(excel.getInputStream(), t.getClass(), new ExcelListener())
-                .sheet().headRowNumber(headRowNumber).doReadSync();
-    }
-
-
-    /**
-     * 导出文件
-     * 导出模板时,tList传一个空list即可
-     * @param tList 数据集
-     * @param tClass 数据类型
-     * @param <T>
-     * @throws IOException
-     */
-    public static <T> void writeSingleExcel(String fileName,String sheetName, List<T> tList, Class tClass) throws IOException{
-        HttpServletResponse response = RequestHolder.getResponse();
-        try (ServletOutputStream outputStream = response.getOutputStream()){
-            setResponse(fileName, response);
-            EasyExcel.write(outputStream, tClass).autoCloseStream(Boolean.FALSE)
-                    .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
-                    .registerWriteHandler(new CustomCellWriteHandler())
-                    .sheet(sheetName)
-                    .doWrite(tList);
-        } catch (Exception e) {
-            errorWrite(response, e);
-        }
-    }
-
-    /**
-     * 导出多sheet
-     * @param fileName 文件名
-     * @param sheetExcelDataList sheet对象
-     * @throws IOException
-     */
-    public static void writeMultiExcel(String fileName, List<SheetExcelData> sheetExcelDataList) throws IOException{
-        HttpServletResponse response = RequestHolder.getResponse();
-        ServletOutputStream outputStream = response.getOutputStream();
-        setResponse(fileName, response);
-        ExcelWriter excelWriter = EasyExcel.write(outputStream).autoCloseStream(false).build();
-        try {
-            for (int i = 0,length = sheetExcelDataList.size(); i < length; i++) {
-                WriteSheet writeSheet = EasyExcel.writerSheet(i+1, sheetExcelDataList.get(i).getSheetName())
-                        .head(sheetExcelDataList.get(i).getTClass())
-                        .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build();
-                excelWriter.write(sheetExcelDataList.get(i).getDataList(), writeSheet);
-            }
-        } catch (Exception e) {
-            errorWrite(response, e);
-        }finally {
-            // 刷新流,不加这句话,下载文件损坏打不开
-            outputStream.flush();
-            // outputStream.close();
-            if(excelWriter != null){
-                // 千万别忘记finish关闭流
-                excelWriter.finish();
-            }
-        }
-    }
-
-    /**
-     * 无对象导出
-     * @param fileName
-     * @param headList
-     * @param dataList
-     * @throws IOException
-     */
-    public static void writeWithoutModel(String fileName, List<List<String>> headList,List<List<Object>> dataList) throws IOException{
-        HttpServletResponse response = RequestHolder.getResponse();
-        try (ServletOutputStream outputStream = response.getOutputStream()){
-            setResponse(fileName, response);
-            // 这里 需要指定写用哪个class去写,然后写到第一个sheet,名字为模板 然后文件流会自动关闭
-            EasyExcel.write(outputStream).head(headList).sheet("模板").registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).doWrite(dataList);
-        } catch (Exception e) {
-            errorWrite(response, e);
-        }
-    }
-
-    /**
-     * 导出错误
-     * @param response
-     * @param e
-     * @throws IOException
-     */
-    private static void errorWrite(HttpServletResponse response, Exception e) throws IOException {
-        // 重置response
-        response.reset();
-        log.error(e.getMessage(), e);
-        response.setContentType("application/json");
-        response.setCharacterEncoding("utf-8");
-        response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
-        response.getWriter().println(JSON.toJSONString(HttpResult.error(com.sckw.core.web.constant.HttpStatus.GLOBAL_EXCEPTION_CODE,"导出失败")));
-    }
-
-    /**
-     * 设置导出信息
-     * @param fileName
-     * @param response
-     * @throws UnsupportedEncodingException
-     */
-    private static void setResponse(String fileName, HttpServletResponse response) throws UnsupportedEncodingException {
-        // 重置response
-        response.reset();
-        response.setContentType("application/vnd.ms-excel;charset=utf-8");
-        response.setCharacterEncoding("utf-8");
-        // 这里URLEncoder.encode可以防止中文乱码
-        //,"yyyy-MM-dd_HH_mm_ss"
-        fileName = URLEncoder.encode(fileName + DateUtil.dateToStr(LocalDate.now()) + ExcelTypeEnum.XLSX.getValue(), "UTF-8");
-        response.setHeader("Content-disposition", "attachment;filename=" + fileName);
-    }
-}

+ 8 - 0
sckw-common/sckw-common-redis/src/main/java/com/sckw/redis/constant/RedisConstant.java

@@ -42,6 +42,14 @@ public class RedisConstant {
      * 更新贸易订单委托量、已履约量锁key
      */
     public static final String TORDER_UPDATE_AMOUNT_KEY = "order:trade:update:amount:%s";
+    /**
+     * 更新贸易订单地址下的委托量锁key
+     */
+    public static final String TORDER_ADDRESS_UPDATE_ENTRUST_AMOUNT = "order:trade:address:update:entrustAmount:%s";
+    /**
+     * 更新贸易订单地址下的实际交付量锁key
+     */
+    public static final String TORDER_ADDRESS_UPDATE_ACTUAL_AMOUNT = "order:trade:address:update:actualAmount:%s";
     /**
      * 合同签约完成更新贸易订单状态锁key
      */

+ 20 - 0
sckw-gateway/src/main/resources/bootstrap-lfdc.yml

@@ -0,0 +1,20 @@
+spring:
+  cloud:
+    nacos:
+      discovery:
+        # 服务注册地址
+        server-addr: 10.10.10.230:8848
+        # 命名空间
+        namespace: sckw_lfdc
+        # 共享配置
+        group: sckw-service-platform
+      config:
+        # 配置中心地址
+        server-addr: 10.10.10.230:8848
+        # 配置文件格式
+        file-extension: yaml
+        # 命名空间
+        namespace: sckw_lfdc
+        # 共享配置
+        group: sckw-service-platform
+

+ 14 - 4
sckw-modules-api/sckw-manage-api/src/main/java/com/sckw/manage/api/RemoteManageService.java

@@ -1,9 +1,6 @@
 package com.sckw.manage.api;
 
-import com.sckw.manage.api.model.dto.res.EntAddressResDto;
-import com.sckw.manage.api.model.dto.res.FindCooperateByEntReqVo;
-import com.sckw.manage.api.model.dto.res.FindCooperateByEntResVo;
-import com.sckw.manage.api.model.dto.res.FindEntCooperateResVo;
+import com.sckw.manage.api.model.dto.res.*;
 
 import java.util.List;
 import java.util.Map;
@@ -45,4 +42,17 @@ public interface RemoteManageService {
 
     List<FindCooperateByEntResVo> findCooperateByEnt(FindCooperateByEntReqVo reqVo);
 
+    /**
+     * 获取路线地址信息
+     * @param lineFreightId
+     * @return
+     */
+    Map<Long, LineFreightAddressRes> findLineFreightAddress(List<Long> lineFreightId);
+
+    /**
+     * 通过ids获取地址信息
+     *
+     * @param addressIds
+     */
+    Map<Long, EntAddressResDto> queryAddressListByAddressIdList(List<String> addressIds);
 }

+ 152 - 0
sckw-modules-api/sckw-manage-api/src/main/java/com/sckw/manage/api/model/dto/res/LineFreightAddressRes.java

@@ -0,0 +1,152 @@
+package com.sckw.manage.api.model.dto.res;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import jakarta.validation.constraints.Size;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author lfdc
+ * @description 线路地址
+ * @date 2024-03-04 13:03:51
+ */
+@Getter
+@Setter
+public class LineFreightAddressRes implements Serializable {
+    @Serial
+    private static final long serialVersionUID = -4571752839456202179L;
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 线路名称
+     */
+    private String name;
+
+    /**
+     * 起始地_名称
+     */
+    private String loadName;
+
+    /**
+     * 起始地-所在地区
+     */
+    private Integer loadCityCode;
+
+    /**
+     * 起始地-所属区域名称
+     */
+    private String loadCityName;
+
+    /**
+     * 起始地-详细地址
+     */
+    private String loadDetailAddress;
+
+    /**
+     * 起始地-纬度
+     */
+    private String loadLat;
+
+    /**
+     * 起始地-经度
+     */
+    private String loadLng;
+
+    /**
+     * 目的地_名称
+     */
+    private String unloadName;
+
+    /**
+     * 目的地-所在地区
+     */
+    private Integer unloadCityCode;
+
+    /**
+     * 目的地-所属区域名称
+     */
+    private String unloadCityName;
+
+    /**
+     * 目的地-详细地址
+     */
+    private String unloadDetailAddress;
+
+    /**
+     * 目的地-纬度
+     */
+    private String unloadLat;
+
+    /**
+     * 目的地-经度
+     */
+    private String unloadLng;
+
+    /**
+     * 运输里程
+     */
+    private BigDecimal transportMileage;
+
+    /**
+     * 运输单价(元/公里)
+     */
+    private BigDecimal transportPrice;
+
+    /**
+     * 运输总价
+     */
+    private BigDecimal transportAmount;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 备注
+     */
+    @Size(max = 200, message = "备注长度不能超过200")
+    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;
+
+}

+ 34 - 0
sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/dubbo/RemoteTradeOrderAmountService.java

@@ -0,0 +1,34 @@
+package com.sckw.order.api.dubbo;
+
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.order.api.model.UpdateAddressActualAmountParam;
+import com.sckw.order.api.model.UpdateAddressEntrustAmountParam;
+
+/**
+ * @desc: 贸易订单地址分配量信息相关dubbo
+ * @author: yzc
+ * @date: 2023-07-18 18:18
+ */
+
+public interface RemoteTradeOrderAmountService {
+
+
+    /**
+     * @param param
+     * @return com.sckw.core.web.response.HttpResult
+     * @desc 更新贸易订单地址下的委派量
+     * @author yzc
+     * @date 2024/3/12 16:40
+     */
+    HttpResult updateAddressEntrustAmount(UpdateAddressEntrustAmountParam param);
+
+    /**
+     * @param param
+     * @return com.sckw.core.web.response.HttpResult
+     * @desc 更新贸易订单地址下的实际交付量
+     * @author yzc
+     * @date 2024/3/12 16:41
+     */
+    HttpResult updateAddressActualAmount(UpdateAddressActualAmountParam param);
+
+}

+ 11 - 0
sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/dubbo/TradeOrderInfoService.java

@@ -21,6 +21,17 @@ public interface TradeOrderInfoService {
      */
     OrderDetailRes getOrderDetailById(Long tOrderId);
 
+
+
+    /**
+     * @desc: 获取订单详情
+     * @author: yzc
+     * @date: 2023-07-18 18:25
+     * @Param tOrderId:
+     * @return: com.sckw.order.api.model.OrderAddressDetailRes
+     */
+    OrderAddressDetailRes getOrderDetailByTradeOrderIdAndAddressId(Long tOrderId,Long tAddressId);
+
     /**
      * @desc: 更新订单状态
      * @author: yzc

+ 39 - 0
sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/model/AddressActualAmountParam.java

@@ -0,0 +1,39 @@
+package com.sckw.order.api.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-13  08:59
+ * @desc: 贸易订单地址下实际交付量参数
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class AddressActualAmountParam implements Serializable {
+
+
+    @Serial
+    private static final long serialVersionUID = 3315075003391902459L;
+
+    /**
+     * 地址id
+     */
+    @JsonProperty("tAddressId")
+    private Long tAddressId;
+
+    /**
+     * 实际成交量
+     */
+    private BigDecimal actualAmount;
+
+}

+ 6 - 0
sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/model/AddressInfoDetail.java

@@ -19,6 +19,12 @@ public class AddressInfoDetail implements Serializable {
 
     @Serial
     private static final long serialVersionUID = -7229803070964346948L;
+
+    /**
+     * 地址id
+     */
+    private String id;
+
     /**
      * 地址类型label
      */

+ 90 - 0
sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/model/OrderAddressDetailRes.java

@@ -0,0 +1,90 @@
+package com.sckw.order.api.model;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author lfdc
+ * @description 贸易订单地址id
+ * @date 2024-03-04 10:03:34
+ */
+@Getter
+@Setter
+public class OrderAddressDetailRes implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -2951319997472302360L;
+    /**
+     * 地址id
+     */
+    private String id;
+
+    /**
+     * 地址类型label
+     */
+    private String addressTypeLabel;
+
+    /**
+     * 地址类型label
+     */
+    private String typeLabel;
+
+
+    /**
+     * 地址类型(1装货地址、2卸货地址)
+     */
+    private String addressType;
+
+    /**
+     * 地址名称
+     */
+    private String name;
+
+    /**
+     * 地址类型
+     */
+    private String type;
+
+    /**
+     * 联系人姓名
+     */
+    private String contacts;
+
+    /**
+     * 联系电话
+     */
+    private String phone;
+
+    /**
+     * 所在地区
+     */
+    private Integer cityCode;
+
+    /**
+     * 所属区域名称
+     */
+    private String cityName;
+
+    /**
+     * 详细地址
+     */
+    private String detailAddress;
+
+    /**
+     * 纬度
+     */
+    private String lat;
+
+    /**
+     * 经度
+     */
+    private String lng;
+
+    /**
+     * 电子围栏
+     */
+    private String fence;
+}

+ 47 - 0
sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/model/UpdateAddressActualAmountParam.java

@@ -0,0 +1,47 @@
+package com.sckw.order.api.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-12  16:29
+ * @desc: 更新贸易订单地址下实际交付量
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class UpdateAddressActualAmountParam implements Serializable {
+    @Serial
+    private static final long serialVersionUID = -4767110260359382199L;
+
+    /**
+     * 订单id
+     */
+    @JsonProperty("tOrderId")
+    private Long tOrderId;
+
+    /**
+     * 地址实际成交量参数
+     */
+    private List<AddressActualAmountParam> addressActualAmountParams;
+
+    /**
+     * 更新用户id 需传,订单状态变化记录需要
+     */
+    private Long updateBy;
+
+    /**
+     * 更新者姓名 需传,订单状态变化记录需要
+     */
+    private String updateByName;
+
+}

+ 53 - 0
sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/model/UpdateAddressEntrustAmountParam.java

@@ -0,0 +1,53 @@
+package com.sckw.order.api.model;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-12  16:29
+ * @desc: 更新贸易订单地址下委托量
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class UpdateAddressEntrustAmountParam implements Serializable {
+    @Serial
+    private static final long serialVersionUID = -2032841683310300595L;
+
+    /**
+     * 订单id
+     */
+    @JsonProperty("tOrderId")
+    private Long tOrderId;
+
+    /**
+     * 地址id
+     */
+    @JsonProperty("tAddressId")
+    private Long tAddressId;
+
+    /**
+     * 委托量  生成物流订单传正数,撤销物流订单传负数
+     */
+    private BigDecimal entrustAmount;
+
+    /**
+     * 更新用户id 需传,订单状态变化记录需要
+     */
+    private Long updateBy;
+
+    /**
+     * 更新者姓名 需传,订单状态变化记录需要
+     */
+    private String updateByName;
+
+}

+ 7 - 3
sckw-modules-api/sckw-payment-api/src/main/java/com/sckw/payment/api/model/constant/ChannelEnum.java

@@ -7,9 +7,11 @@ import org.apache.commons.lang3.StringUtils;
 @Getter
 @AllArgsConstructor
 public enum ChannelEnum {
-    HF("11", "1", "huifu", "汇付渠道"),
-    XS("12", "2", "newpay", "新生渠道"),
-    ZX("13", "3", "citic", "中信渠道");
+//    HF("11", "1", "huifu", "汇付渠道"),
+//    XS("12", "2", "newpay", "新生渠道"),
+//    ZX("13", "3", "citic", "中信渠道"),
+    XW("14", "4", "xinwang", "新网银行"),
+    ;
 
     /**
      * 预付款+支付渠道
@@ -25,6 +27,7 @@ public enum ChannelEnum {
 
     /**
      * 通过交易方式获取支付渠道
+     *
      * @param trading 交易方式字典
      * @return
      */
@@ -41,6 +44,7 @@ public enum ChannelEnum {
         }
         return null;
     }
+
     public static ChannelEnum getByCode(String code) {
         for (ChannelEnum channelEnum : ChannelEnum.values()) {
             if (channelEnum.getCode().equals(code)) {

+ 66 - 0
sckw-modules-api/sckw-payment-api/src/main/java/com/sckw/payment/api/model/dto/WalletVo.java

@@ -0,0 +1,66 @@
+package com.sckw.payment.api.model.dto;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * 钱包清单
+ */
+@Data
+public class WalletVo implements Serializable {
+    /**
+     * 钱包名称
+     */
+    private String name;
+    /**
+     * uid对应的企业名称
+     */
+    @JSONField(name = "member_name")
+    private String memberName;
+
+    private String uid;
+    /**
+     * 渠道 huifu
+     */
+    private String channel;
+
+    @JSONField(name = "create_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private LocalDateTime createTime;
+
+    private String filter;
+    /**
+     * 冻结金额(分)
+     * note:冻结金额为预付金额
+     */
+    private BigDecimal freeze;
+    /**
+     * 预付金额(分)
+     */
+    @JSONField(name = "ap_money")
+    private BigDecimal apMoney;
+    /**
+     * 总金额(分)
+     */
+    @JSONField(name = "total_money")
+    private BigDecimal totalMoney;
+    /**
+     * 线上可用余额(分)
+     */
+    private BigDecimal money;
+    /**
+     * 充值中金额
+     */
+    @JSONField(name = "charging_money")
+    private BigDecimal chargingMoney;
+    /**
+     * 提现中金额
+     */
+    @JSONField(name = "withdrawing_money")
+    private BigDecimal withdrawingMoney;
+}

+ 2 - 0
sckw-modules-api/sckw-product-api/src/main/java/com/sckw/product/api/dubbo/GoodsInfoService.java

@@ -71,4 +71,6 @@ public interface GoodsInfoService {
     Boolean associateSupplyEnt(Long entId);
 
     KwpGoods getGoodsByGoodsName(String goodsName);
+
+    List<Long> getGoodsByGoodsNameAndTaxRate(String goodsName, String goodsTaxRate);
 }

+ 20 - 0
sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/RemoteTransportLineFreightRateService.java

@@ -0,0 +1,20 @@
+package com.sckw.transport.api.dubbo;
+
+import java.util.List;
+
+/**
+ * @author lfdc
+ * @version 1.0
+ * @className RemoteTransportLineFreightRateService
+ * @description 物流订单线路
+ * @date 2024-03-13 10:06:27
+ */
+public interface RemoteTransportLineFreightRateService {
+
+    /**
+     * 路径id是否被关联
+     * @param lineFreightRateIds 线路ids
+     * @return
+     */
+    Boolean getRemoteLineFreightRateIsUse(List<Long> lineFreightRateIds);
+}

+ 5 - 23
sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/TransportService.java → sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/TransportRemoteService.java

@@ -1,27 +1,26 @@
 package com.sckw.transport.api.dubbo;
 
 import com.sckw.core.web.response.HttpResult;
+import com.sckw.transport.api.model.dto.AcceptCarriageLogisticsOrderDto;
 import com.sckw.transport.api.model.dto.AccountCheckingBindDTO;
-import com.sckw.transport.api.model.dto.AddressResDTO;
-import com.sckw.transport.api.model.dto.LogisticsOrderDTO;
 import com.sckw.transport.api.model.dto.RWaybillOrderDto;
 import com.sckw.transport.api.model.param.ContractSignLogisticsParam;
 import com.sckw.transport.api.model.param.LogisticsOrderParam;
 import com.sckw.transport.api.model.vo.KwtLogisticsOrderVO;
 import com.sckw.transport.api.model.vo.RTruckMonitorVo;
 import com.sckw.transport.api.model.vo.RWaybillOrderVo;
+
 import java.util.List;
-import java.util.Map;
 
 /**
  * @author lfdc
  * @version 1.0
- * @className TransportDubboService
+ * @className TransportRemoteService
  * @description 物流订单dubbo
  * @company sckw
  * @date 2023-07-17 10:06:27
  */
-public interface TransportService {
+public interface TransportRemoteService {
 
     /**
      * 根据id 获取主表详情
@@ -37,7 +36,7 @@ public interface TransportService {
      * @param ids
      * @return
      */
-    List<LogisticsOrderDTO> getAcceptCarriageOrderList(List<String> ids);
+    List<AcceptCarriageLogisticsOrderDto> getAcceptCarriageOrderList(List<String> ids);
 
     /**
      * 获取物流订单中地址信息
@@ -45,15 +44,6 @@ public interface TransportService {
      * @return
      */
     List<Integer> getLogisticsOrderAddressList();
-
-    /**
-     * 根据企业id获取物流订单地址信息
-     *
-     * @param entId 企业id
-     * @return
-     */
-    List<AddressResDTO> getLogisticsOrderAddressListByEntId(Long entId);
-
     /**
      * 贸易订单验证物流订单是否已完成
      *
@@ -70,14 +60,6 @@ public interface TransportService {
      */
     HttpResult checkLogisticsOrderStatusById(LogisticsOrderParam logisticsOrderParam);
 
-    /**
-     * 根据企业id获取物流订单地址信息
-     *
-     * @param entIds 企业id
-     * @return
-     */
-    Map<Long, List<AddressResDTO>> getLogisticsOrderAddressListByEntId(List<Long> entIds);
-
     /**
      * 运费对账是否进行对账绑定数据
      *

+ 1 - 1
sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/TransportStatisticsService.java → sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/TransportRemoteStatisticsService.java

@@ -10,7 +10,7 @@ import java.util.List;
  * @company sckw
  * @date 2023-09-08 10:06:27
  */
-public interface TransportStatisticsService {
+public interface TransportRemoteStatisticsService {
     /**
      * 统计承运订单
      *

+ 6 - 1
sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/model/dto/LogisticsOrderDTO.java → sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/model/dto/AcceptCarriageLogisticsOrderDto.java

@@ -8,6 +8,7 @@ import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.util.Date;
+import java.util.List;
 
 /**
  * @author lfdc
@@ -15,7 +16,7 @@ import java.util.Date;
  * @date 2023-07-17 11:07:08
  */
 @Data
-public class LogisticsOrderDTO implements Serializable {
+public class AcceptCarriageLogisticsOrderDto implements Serializable {
 
     /**
      * 物流订单id
@@ -145,6 +146,10 @@ public class LogisticsOrderDTO implements Serializable {
      * 运价
      */
     private BigDecimal price;
+    /**
+     * 运价
+     */
+    private List<String> prices;
 
     /**
      * 运价

+ 0 - 13
sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/model/dto/AddressResDTO.java

@@ -1,13 +0,0 @@
-package com.sckw.transport.api.model.dto;
-
-import lombok.Data;
-
-/**
- * @author lfdc
- * @description 地址信息
- * @date 2023-08-02 14:08:52
- */
-@Data
-public class AddressResDTO {
-
-}

+ 2 - 0
sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/model/vo/LogisticsOrderVO.java

@@ -8,6 +8,7 @@ import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.util.Date;
+import java.util.List;
 
 /**
  * @author lfdc
@@ -148,6 +149,7 @@ public class LogisticsOrderVO implements Serializable {
 
     private String priceType;
 
+    private List<String> prices;
     /**
      * 运价方式
      */

+ 0 - 25
sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/model/vo/RWaybillOrderVo.java

@@ -75,31 +75,6 @@ public class RWaybillOrderVo implements Serializable {
      */
     private String driverIdcard;
 
-    /**
-     * 已委托量
-     */
-    private BigDecimal entrustAmount;
-
-    /**
-     * 卸货重量
-     */
-    private BigDecimal unloadAmount;
-
-    /**
-     * 装货重量
-     */
-    private BigDecimal loadAmount;
-
-    /**
-     * 亏吨重量
-     */
-    private BigDecimal deficitAmount;
-
-    /**
-     * 亏吨扣款
-     */
-    private BigDecimal deficitPrice;
-
     /**
      * 计划开始时间
      */

+ 3 - 3
sckw-modules/pom.xml

@@ -33,15 +33,15 @@
         <contract.revision>1.1.0</contract.revision>
         <file.revision>1.1.0</file.revision>
         <fleet.revision>1.1.0</fleet.revision>
-        <manage.revision>1.1.0</manage.revision>
+        <manage.revision>1.2.0</manage.revision>
         <message.revision>1.1.0</message.revision>
         <operation.revision>1.1.0</operation.revision>
-        <order.revision>1.1.0</order.revision>
+        <order.revision>1.2.0</order.revision>
         <payment.revision>1.1.0</payment.revision>
         <product.revision>1.1.0</product.revision>
         <report.revision>1.1.0</report.revision>
         <system.revision>1.1.0</system.revision>
-        <transport.revision>1.1.0</transport.revision>
+        <transport.revision>1.2.0</transport.revision>
         <maven.compiler.source>17</maven.compiler.source>
         <maven.compiler.target>17</maven.compiler.target>
     </properties>

+ 1 - 1
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/controller/KwcCarrierController.java

@@ -2,7 +2,7 @@ package com.sckw.contract.controller;
 
 import com.sckw.contract.model.vo.req.IdReqVo;
 import com.sckw.contract.model.vo.req.QueryListReqVo;
-import com.sckw.contract.service.KwcContractLogisticsService;
+import com.sckw.contract.service.operateService.KwcContractLogisticsService;
 import com.sckw.core.model.enums.EntTypeEnum;
 import com.sckw.core.web.response.HttpResult;
 import jakarta.servlet.http.HttpServletResponse;

+ 1 - 7
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/controller/KwcCheckedController.java

@@ -1,14 +1,10 @@
 package com.sckw.contract.controller;
 
 import com.sckw.contract.model.vo.req.*;
-import com.sckw.contract.service.*;
-import com.sckw.core.exception.BusinessException;
-import com.sckw.core.exception.SystemException;
+import com.sckw.contract.service.operateService.KwcContractLogisticsService;
 import com.sckw.core.model.enums.EntTypeEnum;
-import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.response.HttpResult;
-import com.sckw.excel.utils.ExcelUtil;
 import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.Valid;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -18,8 +14,6 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.List;
-
 /**
  * @author czh
  * @desc 托运合同

+ 1 - 1
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/controller/KwcContractSaleController.java

@@ -1,7 +1,7 @@
 package com.sckw.contract.controller;
 
 import com.sckw.contract.model.vo.req.*;
-import com.sckw.contract.service.KwcContractTradeService;
+import com.sckw.contract.service.operateService.KwcContractTradeService;
 import com.sckw.core.model.enums.EntTypeEnum;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.response.HttpResult;

+ 1 - 1
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/controller/KwcPurchaseController.java

@@ -2,7 +2,7 @@ package com.sckw.contract.controller;
 
 import com.sckw.contract.model.vo.req.IdReqVo;
 import com.sckw.contract.model.vo.req.QueryListReqVo;
-import com.sckw.contract.service.KwcContractTradeService;
+import com.sckw.contract.service.operateService.KwcContractTradeService;
 import com.sckw.core.model.enums.EntTypeEnum;
 import com.sckw.core.web.response.HttpResult;
 import jakarta.servlet.http.HttpServletResponse;

+ 15 - 9
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/CommonBusinessService.java

@@ -14,32 +14,38 @@ import com.sckw.contract.model.entity.KwcContractLogisticsUnit;
 import com.sckw.contract.model.entity.KwcContractTrade;
 import com.sckw.contract.model.entity.KwcContractTradeUnit;
 import com.sckw.contract.model.vo.req.ESignCallBackReqVo;
+import com.sckw.contract.service.operateService.KwcContractLogisticsService;
+import com.sckw.contract.service.operateService.KwcContractTradeService;
 import com.sckw.core.exception.SystemException;
 import com.sckw.core.model.constant.Global;
 import com.sckw.core.model.enums.ClientTypeEnum;
 import com.sckw.core.model.enums.CooperateTypeEnum;
 import com.sckw.core.utils.*;
-import lombok.RequiredArgsConstructor;
-import org.springframework.cloud.stream.function.StreamBridge;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.order.api.dubbo.TradeOrderInfoService;
 import com.sckw.order.api.model.ContractSignCompletedParam;
+import com.sckw.stream.enums.MessageEnum;
+import com.sckw.stream.model.SckwMessage;
+import com.sckw.stream.model.UserInfo;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
-import com.sckw.transport.api.dubbo.TransportService;
+import com.sckw.transport.api.dubbo.TransportRemoteService;
 import com.sckw.transport.api.model.param.ContractSignLogisticsParam;
+import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.stream.function.StreamBridge;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import com.sckw.stream.enums.MessageEnum;
-import com.sckw.stream.model.SckwMessage;
-import com.sckw.stream.model.UserInfo;
-import java.io.*;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
 import java.net.URL;
 import java.nio.charset.StandardCharsets;
 import java.util.*;
@@ -59,7 +65,7 @@ public class CommonBusinessService {
     private TradeOrderInfoService tradeOrderInfoService;
 
     @DubboReference(version = "1.0.0", group = "design", check = false)
-    private TransportService transportDubboService;
+    private TransportRemoteService transportRemoteService;
 
     @Autowired
     private KwcContractTradeMapper kwcContractTradeMapper;
@@ -248,7 +254,7 @@ public class CommonBusinessService {
         contractSignLogisticsParam.setContractId(contractId);
         contractSignLogisticsParam.setUpdateBy(userId);
         contractSignLogisticsParam.setUpdateByName(name);
-        transportDubboService.contractSignLogisticsCompleted(contractSignLogisticsParam);
+        transportRemoteService.contractSignLogisticsCompleted(contractSignLogisticsParam);
     }
 
 

+ 4 - 6
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/KwcContractLogisticsGoodsService.java

@@ -11,14 +11,14 @@ import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.utils.IdWorker;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginUserHolder;
-import com.sckw.product.api.dubbo.GoodsInfoService;
-import com.sckw.product.api.model.KwpGoods;
-import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
-import java.util.*;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
 /**
@@ -33,8 +33,6 @@ public class KwcContractLogisticsGoodsService {
     @Autowired
     private KwcContractLogisticsGoodsMapper kwcContractLogisticsGoodsMapper;
 
-    @DubboReference(version = "1.0.0", group = "design", check = false)
-    private GoodsInfoService goodsInfoService;
 
 
     /**

+ 5 - 1
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/KwcContractLogisticsService.java → sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/operateService/KwcContractLogisticsService.java

@@ -1,4 +1,4 @@
-package com.sckw.contract.service;
+package com.sckw.contract.service.operateService;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -15,6 +15,10 @@ import com.sckw.contract.model.entity.KwcContractLogisticsUnit;
 import com.sckw.contract.model.report.LogisticsListExport;
 import com.sckw.contract.model.vo.req.*;
 import com.sckw.contract.model.vo.res.*;
+import com.sckw.contract.service.CommonBusinessService;
+import com.sckw.contract.service.KwcContractLogisticsGoodsService;
+import com.sckw.contract.service.KwcContractLogisticsTrackService;
+import com.sckw.contract.service.KwcContractLogisticsUnitService;
 import com.sckw.core.common.enums.enums.DictEnum;
 import com.sckw.core.common.enums.enums.DictTypeEnum;
 import com.sckw.core.exception.BusinessException;

+ 5 - 1
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/KwcContractTradeService.java → sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/operateService/KwcContractTradeService.java

@@ -1,4 +1,4 @@
-package com.sckw.contract.service;
+package com.sckw.contract.service.operateService;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -15,6 +15,10 @@ import com.sckw.contract.model.entity.KwcContractTradeUnit;
 import com.sckw.contract.model.report.TradeListExport;
 import com.sckw.contract.model.vo.req.*;
 import com.sckw.contract.model.vo.res.*;
+import com.sckw.contract.service.CommonBusinessService;
+import com.sckw.contract.service.KwcContractTradeGoodsService;
+import com.sckw.contract.service.KwcContractTradeTrackService;
+import com.sckw.contract.service.KwcContractTradeUnitService;
 import com.sckw.core.common.enums.enums.DictEnum;
 import com.sckw.core.common.enums.enums.DictTypeEnum;
 import com.sckw.core.exception.SystemException;

+ 1 - 1
sckw-modules/sckw-example/src/main/java/com/sckw/example/controller/TestController.java

@@ -26,7 +26,7 @@ public class TestController {
 
     @GetMapping("/detail")
     public R<MemberDetail> download(/*@RequestParam("uid")*/ Long uid, String channel) {
-        return payCenterDubboService.memberDetail(uid, ChannelEnum.HF);
+        return null;//payCenterDubboService.memberDetail(uid, ChannelEnum.HF);
     }
 
     @GetMapping("/wall")

+ 2 - 2
sckw-modules/sckw-example/src/main/java/com/sckw/example/service/TransportService.java

@@ -1,6 +1,6 @@
 package com.sckw.example.service;
 
-import com.sckw.transport.api.dubbo.TransportStatisticsService;
+import com.sckw.transport.api.dubbo.TransportRemoteStatisticsService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Value;
@@ -24,7 +24,7 @@ public class TransportService {
     private String refreshScope;
 
     @DubboReference(version = "1.0.0", group = "design", check = false)
-    private TransportStatisticsService statisticsService;
+    private TransportRemoteStatisticsService statisticsService;
 
     public Integer statisticsLogistics(Long topEntId) {
         return statisticsService.statisticsLogistics(topEntId,new ArrayList<>());

+ 3 - 3
sckw-modules/sckw-file/src/main/java/com/sckw/file/controller/FileApiController.java → sckw-modules/sckw-file/src/main/java/com/sckw/file/controller/KwfFileController.java

@@ -38,13 +38,13 @@ import java.util.Map;
 @RestController
 @RequestMapping("/file")
 @AllArgsConstructor
-public class FileApiController {
+public class KwfFileController {
 
     @Autowired
     private FileService fileService;
 
     @Autowired
-    private FileDubboApiServiceImpl fileDubboApiService;
+    private FileDubboApiServiceImpl fileApiService;
 
     /**
      * 上传文件至OSS
@@ -204,7 +204,7 @@ public class FileApiController {
     @GlobalTransactional(rollbackFor = Exception.class)
     public HttpResult fileInfoInsertByOSS(@RequestBody FileInfo fileInfo) {
         try {
-            return fileDubboApiService.fileInfoInsert(fileInfo);
+            return fileApiService.fileInfoInsert(fileInfo);
         } catch (ParseException e) {
             throw new RuntimeException(e);
         }

+ 2 - 2
sckw-modules/sckw-file/src/main/java/com/sckw/file/service/FileService.java

@@ -137,7 +137,7 @@ public class FileService {
             for (MultipartFile multipartFile : multipartFiles) {
                 Map<String, Object> map = new HashMap<>(NumberConstant.SIXTEEN);
                 //文件大小
-                String fileSize = FileUtils.getFileSize(multipartFile);
+//                String fileSize = FileUtils.getFileSize(multipartFile);
                 //文件名称
                 String originalFilename = multipartFile.getOriginalFilename();
                 map.put("code", HttpStatus.SUCCESS_CODE);
@@ -183,7 +183,7 @@ public class FileService {
 
     public void remove(String fileName) {
         String str = FileUtils.getOSSAddressPrefix();
-        String fileNameSubstring = StringUtils.substring(fileName, str.length() + 1);
+//        String fileNameSubstring = StringUtils.substring(fileName, str.length() + 1);
         FileUtils.remove(fileName);
     }
 

+ 5 - 5
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfDriverService.java

@@ -882,11 +882,11 @@ public class KwfDriverService {
         driverImport.setRemark(JSON.toJSONString(returnFileInfo));
         kwfDriverImportDao.insert(driverImport);
 
-        try {
-            //remoteFileService.fileInfoInsert(fileInfo);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+//        try {
+//            //remoteFileService.fileInfoInsert(fileInfo);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
     }
 
     /**

+ 14 - 18
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckReportService.java

@@ -20,8 +20,13 @@ import com.sckw.fleet.dao.KwfDriverMapper;
 import com.sckw.fleet.dao.KwfTruckMapper;
 import com.sckw.fleet.dao.KwfTruckReportImportMapper;
 import com.sckw.fleet.dao.KwfTruckReportMapper;
-import com.sckw.fleet.model.*;
-import com.sckw.fleet.model.dto.*;
+import com.sckw.fleet.model.KwfDriver;
+import com.sckw.fleet.model.KwfTruck;
+import com.sckw.fleet.model.KwfTruckReport;
+import com.sckw.fleet.model.KwfTruckReportImport;
+import com.sckw.fleet.model.dto.KwfChangeFleetDto;
+import com.sckw.fleet.model.dto.KwfTruckReportDto;
+import com.sckw.fleet.model.dto.KwfTruckReportExcelImportDto;
 import com.sckw.fleet.model.vo.KwfTableTopCount;
 import com.sckw.fleet.model.vo.KwfTruckReportVo;
 import com.sckw.system.api.RemoteSystemService;
@@ -30,11 +35,11 @@ import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
 import org.apache.dubbo.config.annotation.DubboReference;
-import org.checkerframework.checker.units.qual.K;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.multipart.MultipartFile;
+
 import java.io.InputStream;
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -68,15 +73,6 @@ public class KwfTruckReportService {
     @DubboReference(version = "1.0.0", group = "design", check = false,timeout = 8000)
     private RemoteUserService remoteUserService;
 
-    /**
-     * @param key 主键id
-     * @desc 根据主键查询
-     * @author zk
-     * @date 2023/7/15
-     **/
-    public KwfTruckReport selectByKey(Long key) {
-        return null;
-    }
 
     /**
      * @param params 参数
@@ -515,12 +511,12 @@ public class KwfTruckReportService {
         truckReportImport.setUrl(returnFileInfo.getFilePath());
         truckReportImport.setRemark(JSON.toJSONString(returnFileInfo));
         kwfTruckReportImportDao.insert(truckReportImport);
-
-        try {
-            //remoteFileService.fileInfoInsert(fileInfo);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+//
+//        try {
+//            //remoteFileService.fileInfoInsert(fileInfo);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
     }
 
     /**

+ 19 - 13
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckService.java

@@ -30,7 +30,7 @@ import com.sckw.system.api.RemoteUserService;
 import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
-import com.sckw.transport.api.dubbo.TransportService;
+import com.sckw.transport.api.dubbo.TransportRemoteService;
 import com.sckw.transport.api.model.dto.RWaybillOrderDto;
 import com.sckw.transport.api.model.vo.RTruckMonitorVo;
 import com.sckw.transport.api.model.vo.RWaybillOrderVo;
@@ -75,7 +75,7 @@ public class KwfTruckService {
     @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 8000)
     private RemoteUserService remoteUserService;
     @DubboReference(version = "1.0.0", group = "design", check = false)
-    private TransportService transportDubboService;
+    private TransportRemoteService transportRemoteService;
 
     /**
      * @param key 主键id
@@ -117,10 +117,17 @@ public class KwfTruckService {
             String value = getDictValue(DictTypeEnum.COLOR_TYPE.getType(), StringUtils.objectStr(truck.getColor()));
             truckDetailVo.setColorName(value);
 
+            //数据字典
+            List<String> dictKey = new ArrayList<>();
+            dictKey.add(truck.getColor() != null ? DictTypeEnum.COLOR_TYPE.getType() + Global.POUND + truck.getColor() : null);
+            Map<String, SysDictResDto> dicts = this.dict(dictKey);
+            SysDictResDto color = dicts.get(DictTypeEnum.COLOR_TYPE.getType() + Global.POUND + truck.getColor());
+
             //车队班组
             KwfFleet fleet = this.findByFleetTruck(truckId, LoginUserHolder.getEntId());
             truckDetailVo.setFleetId(fleet != null ? fleet.getId() : null);
             truckDetailVo.setFleetName(fleet != null ? fleet.getName() : null);
+            truckDetailVo.setColorName(color != null ? color.getLabel() : null);
             return truckDetailVo;
         }
         return null;
@@ -239,9 +246,9 @@ public class KwfTruckService {
             createBys.add(Long.parseLong(truck.getCreateBy()));
             entIds.add(Long.parseLong(truck.getEntId()));
             dictKey.add(truck.getColor() != null ? DictTypeEnum.COLOR_TYPE.getType() + pound + truck.getColor() : null);
-            dictKey.add(truck.getColor() != null ? DictTypeEnum.TRUCK_TYPE.getType() + pound + truck.getType() : null);
-            dictKey.add(truck.getColor() != null ? DictTypeEnum.USE_TYPE.getType() + pound + truck.getUseType() : null);
-            dictKey.add(truck.getColor() != null ? DictTypeEnum.ENERGY_TYPE.getType() + pound + truck.getEnergyType() : null);
+            dictKey.add(truck.getType() != null ? DictTypeEnum.TRUCK_TYPE.getType() + pound + truck.getType() : null);
+            dictKey.add(truck.getUseType() != null ? DictTypeEnum.USE_TYPE.getType() + pound + truck.getUseType() : null);
+            dictKey.add(truck.getEnergyType() != null ? DictTypeEnum.ENERGY_TYPE.getType() + pound + truck.getEnergyType() : null);
         }
         //用户数据集
         createBys = createBys.stream().distinct().collect(Collectors.toList());
@@ -700,11 +707,11 @@ public class KwfTruckService {
         truckImport.setRemark(JSON.toJSONString(returnFileInfo));
         kwfTruckImportDao.insert(truckImport);
 
-        try {
-            //remoteFileService.fileInfoInsert(fileInfo);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+//        try {
+//            //remoteFileService.fileInfoInsert(fileInfo);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
     }
 
     /**
@@ -819,7 +826,7 @@ public class KwfTruckService {
             //托运方
             bool = EntTypeEnum.check(entTypes);
             if (bool != null && bool) {
-                List<RTruckMonitorVo> checkTrucks = transportDubboService.truckInTask(LoginUserHolder.getEntId());
+                List<RTruckMonitorVo> checkTrucks = transportRemoteService.truckInTask(LoginUserHolder.getEntId());
                 checkTrucks.forEach(order -> trucks.add(new KwfTruckMonitorVo(order.getEntId(), order.getTruckNo(), Global.NUMERICAL_ONE)));
             }
 
@@ -1063,7 +1070,7 @@ public class KwfTruckService {
      **/
     public RWaybillOrderVo getWaybillOrder(String truckNo, int busStatus) {
         try {
-            List<RWaybillOrderVo> waybillOrders = transportDubboService.findWaybillOrder(new RWaybillOrderDto(truckNo, busStatus));
+            List<RWaybillOrderVo> waybillOrders = transportRemoteService.findWaybillOrder(new RWaybillOrderDto(truckNo, busStatus));
             if (CollectionUtils.isEmpty(waybillOrders)) {
                 return null;
             }
@@ -1105,7 +1112,6 @@ public class KwfTruckService {
                     return truckGpsMap;
                 }
                 JSONArray trucks = result.getJSONArray("data");
-                //log.info("车牌号数量="+ truckNos.size() + " GPS数量=" + (trucks != null ? trucks.size() : 0) + " 响应时间="+(entTime - begTime));
                 for (int i = 0; trucks != null && i < trucks.size(); i++) {
                     JSONObject truck = trucks.getJSONObject(i);
                     JSONObject locateInfo = truck.getJSONObject("locateInfo");

+ 3 - 3
sckw-modules/sckw-fleet/src/main/resources/mapper/KwfDriverMapper.xml

@@ -128,10 +128,10 @@
             and dr.phone = #{params.phone, jdbcType=VARCHAR}
         </if>
         <if test="params.licenseType != null and params.licenseType != ''">
-            and drl.type = #{licenseType, jdbcType=VARCHAR}
+            and drl.type = #{params.licenseType, jdbcType=VARCHAR}
         </if>
-        <if test="sparams.tatus != null and params.status != ''">
-            and dr.status = #{status, jdbcType=VARCHAR}
+        <if test="params.status != null and params.status != ''">
+            and dr.status = #{params.status, jdbcType=VARCHAR}
         </if>
         <if test="params.authStatus != null and params.authStatus != '' and params.authStatus != 0">
             and dr.auth_status = #{params.authStatus, jdbcType=VARCHAR}

+ 80 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/controller/KwmLineFreightRateController.java

@@ -0,0 +1,80 @@
+package com.sckw.manage.controller;
+
+import com.sckw.core.annotation.RepeatSubmit;
+import com.sckw.core.exception.CustomPromptException;
+import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.web.constant.HttpStatus;
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.excel.utils.ExcelUtil;
+import com.sckw.manage.model.vo.req.*;
+import com.sckw.manage.model.vo.res.LineFreightRateExport;
+import com.sckw.manage.service.KwmLineFreightRateService;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.MediaType;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-01  09:20
+ * @desc: 路径管理
+ */
+@RestController
+@RequestMapping(value = "/kwmLineFreightRate")
+@RequiredArgsConstructor
+public class KwmLineFreightRateController {
+
+    private final KwmLineFreightRateService lineFreightRateService;
+
+    @PostMapping(value = "/add", produces = MediaType.APPLICATION_JSON_VALUE)
+    @RepeatSubmit(interval = 1000, message = "前方拥堵,请稍后尝试")
+    public HttpResult add(@RequestBody @Validated AddLineFreightRateParam addLineFreightRateParam) {
+        lineFreightRateService.add(addLineFreightRateParam);
+        return HttpResult.ok(" 新增运价成功");
+    }
+
+    @GetMapping("/detail")
+    public HttpResult detail(@RequestParam Long id) {
+        return HttpResult.ok(lineFreightRateService.detail(id));
+    }
+
+    @PostMapping(value = "/update", produces = MediaType.APPLICATION_JSON_VALUE)
+    @RepeatSubmit(interval = 1000, message = "前方拥堵,请稍后尝试")
+    public HttpResult update(@RequestBody @Validated UpdateLineFreightRateParam updateLineFreightRateParam) {
+        lineFreightRateService.update(updateLineFreightRateParam);
+        return HttpResult.ok(" 编辑运价成功");
+    }
+
+    @PostMapping(value = "/select", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult select(@RequestBody SelectLineFreightRateParam params) {
+        return HttpResult.ok(lineFreightRateService.select(params));
+    }
+
+    @PostMapping(value = "/choose", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult choose(@RequestBody ChooseLineFreightRateParam params) {
+        return HttpResult.ok(lineFreightRateService.choose(params));
+    }
+
+    @PostMapping(value = "/export", produces = MediaType.APPLICATION_JSON_VALUE)
+    public void export(@RequestBody ExportLineFreightRateParam params, HttpServletResponse response) {
+        List<LineFreightRateExport> list = lineFreightRateService.export(params);
+        if (CollectionUtils.isEmpty(list)) {
+            throw new CustomPromptException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认");
+        }
+        ExcelUtil.downData(response, LineFreightRateExport.class, list);
+    }
+
+    @GetMapping("/batchDelete")
+    public HttpResult batchDelete(@RequestParam List<Long> ids) {
+        lineFreightRateService.batchDelete(ids);
+        return HttpResult.ok("批量删除成功");
+    }
+
+    @PostMapping("/findList")
+    public HttpResult findList(@RequestBody LineFreightRateFindListParam params) {
+        return HttpResult.ok(lineFreightRateService.findList(params));
+    }
+}

+ 15 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/dao/KwmLineFreightRateMapper.java

@@ -0,0 +1,15 @@
+package com.sckw.manage.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sckw.manage.model.entity.KwmLineFreightRate;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @desc: 路径mapper
+ * @author: yzc
+ * @date: 2023-06-25 14:40
+ */
+@Mapper
+public interface KwmLineFreightRateMapper extends BaseMapper<KwmLineFreightRate> {
+
+}

+ 49 - 2
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/dubbo/RemoteManageServiceImpl.java

@@ -1,19 +1,24 @@
 package com.sckw.manage.dubbo;
 
+import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.sckw.core.model.constant.Global;
+import com.sckw.core.model.constant.NumberConstant;
 import com.sckw.core.model.enums.CooperateStatusEnum;
 import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.manage.api.RemoteManageService;
 import com.sckw.manage.api.model.dto.res.EntAddressResDto;
 import com.sckw.manage.api.model.dto.res.FindEntCooperateResVo;
+import com.sckw.manage.api.model.dto.res.LineFreightAddressRes;
 import com.sckw.manage.dao.KwmAddressMapper;
 import com.sckw.manage.dao.KwmCooperateMapper;
 import com.sckw.manage.dao.KwmCooperateTypeMapper;
+import com.sckw.manage.dao.KwmLineFreightRateMapper;
 import com.sckw.manage.model.entity.KwmAddress;
 import com.sckw.manage.model.entity.KwmCooperate;
 import com.sckw.manage.model.entity.KwmCooperateType;
+import com.sckw.manage.model.entity.KwmLineFreightRate;
 import com.sckw.manage.model.vo.req.FindCooperateByEntReqVo;
 import com.sckw.manage.model.vo.req.FindEntCooperateReqVo;
 import com.sckw.manage.model.vo.res.FindCooperateByEntResVo;
@@ -26,6 +31,7 @@ import org.apache.dubbo.config.annotation.DubboService;
 import org.springframework.beans.factory.annotation.Autowired;
 
 import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
@@ -48,6 +54,9 @@ public class RemoteManageServiceImpl implements RemoteManageService {
     @Autowired
     private KwmCooperateMapper kwmCooperateMapper;
 
+    @Autowired
+    private KwmLineFreightRateMapper lineFreightRateMapper;
+
     @Autowired
     private KwmCooperateTypeMapper kwmCooperateTypeMapper;
 
@@ -56,7 +65,7 @@ public class RemoteManageServiceImpl implements RemoteManageService {
 
     /**
      * @param idList 企业id集合
-     * @return Map<Long, List<EntAddressResDto>>
+     * @return Map<Long, List < EntAddressResDto>>
      * @desc: 根据企业id查下面的地址
      * @author: czh
      * @date: 2023/7/31
@@ -66,7 +75,7 @@ public class RemoteManageServiceImpl implements RemoteManageService {
         Map<Long, List<EntAddressResDto>> map = new HashMap<>(4);
         LambdaQueryWrapper<KwmAddress> kwmAddressLambdaQueryWrapper = new LambdaQueryWrapper<>();
         kwmAddressLambdaQueryWrapper.in(KwmAddress::getEntId, idList).
-                                     eq(KwmAddress::getDelFlag, Global.NO);
+                eq(KwmAddress::getDelFlag, Global.NO);
         List<KwmAddress> kwmAddressList = kwmAddressMapper.selectList(kwmAddressLambdaQueryWrapper);
         if (CollectionUtils.isEmpty(kwmAddressList)) {
             return map;
@@ -249,4 +258,42 @@ public class RemoteManageServiceImpl implements RemoteManageService {
         }
         return list;
     }
+
+    @Override
+    public Map<Long, LineFreightAddressRes> findLineFreightAddress(List<Long> lineFreightId) {
+        List<KwmLineFreightRate> list = lineFreightRateMapper.selectList(new LambdaQueryWrapper<KwmLineFreightRate>()
+                .in(KwmLineFreightRate::getId, lineFreightId).eq(KwmLineFreightRate::getDelFlag, 0));
+        Map<Long, LineFreightAddressRes> rateMap = new HashMap<>(NumberConstant.SIXTEEN);
+        List<LineFreightAddressRes> lineFre = new ArrayList<>();
+        if (!CollectionUtils.isEmpty(list)) {
+            for (KwmLineFreightRate kwmLineFreightRate : list) {
+                LineFreightAddressRes lineFreightRate = new LineFreightAddressRes();
+                BeanUtil.copyProperties(kwmLineFreightRate, lineFreightRate);
+                lineFre.add(lineFreightRate);
+            }
+        }
+        if (!CollectionUtils.isEmpty(lineFre)) {
+            rateMap = lineFre.stream().collect(Collectors.toMap(LineFreightAddressRes::getId, Function.identity()));
+        }
+        return rateMap;
+    }
+
+    /**
+     * 通过ids获取地址信息
+     * @param addressIds
+     */
+    @Override
+    public Map<Long, EntAddressResDto> queryAddressListByAddressIdList(List<String> addressIds) {
+        Map<Long, EntAddressResDto> map = new HashMap<>(4);
+        LambdaQueryWrapper<KwmAddress> kwmAddressLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        kwmAddressLambdaQueryWrapper.in(KwmAddress::getId, addressIds).
+                eq(KwmAddress::getDelFlag, Global.NO);
+        List<KwmAddress> kwmAddressList = kwmAddressMapper.selectList(kwmAddressLambdaQueryWrapper);
+        if (CollectionUtils.isEmpty(kwmAddressList)) {
+            return map;
+        }
+
+        List<EntAddressResDto> entAddressResDtoList = BeanUtils.copyToList(kwmAddressList, EntAddressResDto.class);
+        return entAddressResDtoList.stream().collect(Collectors.toMap(EntAddressResDto::getId,Function.identity()));
+    }
 }

+ 115 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/entity/KwmLineFreightRate.java

@@ -0,0 +1,115 @@
+package com.sckw.manage.model.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.sckw.core.model.base.BaseModel;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @desc: 路径
+ * @author: yzc
+ * @date: 2024-03-01 9:04
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@TableName("kwm_line_freight_rate")
+public class KwmLineFreightRate extends BaseModel implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -4571752839456202179L;
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 线路名称
+     */
+    private String name;
+
+    /**
+     * 起始地_名称
+     */
+    private String loadName;
+
+    /**
+     * 起始地-所在地区
+     */
+    private Integer loadCityCode;
+
+    /**
+     * 起始地-所属区域名称
+     */
+    private String loadCityName;
+
+    /**
+     * 起始地-详细地址
+     */
+    private String loadDetailAddress;
+
+    /**
+     * 起始地-纬度
+     */
+    private String loadLat;
+
+    /**
+     * 起始地-经度
+     */
+    private String loadLng;
+
+    /**
+     * 目的地_名称
+     */
+    private String unloadName;
+
+    /**
+     * 目的地-所在地区
+     */
+    private Integer unloadCityCode;
+
+    /**
+     * 目的地-所属区域名称
+     */
+    private String unloadCityName;
+
+    /**
+     * 目的地-详细地址
+     */
+    private String unloadDetailAddress;
+
+    /**
+     * 目的地-纬度
+     */
+    private String unloadLat;
+
+    /**
+     * 目的地-经度
+     */
+    private String unloadLng;
+
+    /**
+     * 运输里程
+     */
+    private BigDecimal transportMileage;
+
+    /**
+     * 运输单价(元/公里)
+     */
+    private BigDecimal transportPrice;
+
+    /**
+     * 运输总价
+     */
+    private BigDecimal transportAmount;
+
+}

+ 75 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/AddLineFreightRateParam.java

@@ -0,0 +1,75 @@
+package com.sckw.manage.model.vo.req;
+
+import jakarta.validation.constraints.*;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import org.hibernate.validator.constraints.Length;
+
+import java.math.BigDecimal;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-01  09:24
+ * @desc: 添加运价参数
+ */
+@Getter
+@Setter
+@ToString
+public class AddLineFreightRateParam {
+
+
+    /**
+     * 运价名称
+     */
+    @NotBlank(message = "运价名称不能为空")
+    @Length(max = 40, message = "运价名称最多支持50字")
+    private String name;
+
+    /**
+     * 起始地-地址名称
+     */
+    @NotBlank(message = "路径起始位置不能为空")
+    private String loadName;
+
+    @NotNull(message = "起始位置所属企业不能为空")
+    private Long loadEntId;
+
+    /**
+     * 目的地-地址名称
+     */
+    @NotBlank(message = "路径结束位置不能为空")
+    private String unloadName;
+
+    @NotNull(message = "结束位置所属企业不能为空")
+    private Long unloadEntId;
+
+    /**
+     * 行驶里程/公里
+     */
+    @NotNull(message = "行驶里程/公里不能为空")
+    @Digits(integer = 7, fraction = 2, message = "行驶里程格式错误")
+    @DecimalMin(value = "0", message = "行驶里程不能小于零")
+    private BigDecimal transportMileage;
+
+    /**
+     * 运输单价(元/公里)
+     */
+    @Digits(integer = 10, fraction = 6, message = "运输单价格式错误")
+    @DecimalMin(value = "0", message = "运输单价不能小于零")
+    private BigDecimal transportPrice;
+
+    /**
+     * 运输总价
+     */
+    @Digits(integer = 10, fraction = 6, message = "运输总价格式错误")
+    @DecimalMin(value = "0", message = "运输总价不能小于零")
+    @NotNull(message = "运输总价不能为空")
+    private BigDecimal transportAmount;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 37 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/ChooseLineFreightRateParam.java

@@ -0,0 +1,37 @@
+package com.sckw.manage.model.vo.req;
+
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.Size;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.util.List;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-01  15:00
+ * @desc: 选择运价路径请求参数
+ */
+@Getter
+@Setter
+@ToString
+@EqualsAndHashCode(callSuper = false)
+public class ChooseLineFreightRateParam {
+
+    /**
+     * 装货地名称集合
+     */
+    @NotEmpty(message = "装货地名不能为空")
+    @Size(min = 1,max = 3,message = "装货地名称最多3条")
+    private List<String> loadNames;
+
+    /**
+     * 卸货地名称集合
+     */
+    @NotEmpty(message = "卸货地名不能为空")
+    @Size(min = 1,max = 3,message = "卸货地名称最多3条")
+    private List<String> unloadNames;
+
+}

+ 54 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/ExportLineFreightRateParam.java

@@ -0,0 +1,54 @@
+package com.sckw.manage.model.vo.req;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import jakarta.validation.constraints.DecimalMin;
+import jakarta.validation.constraints.Digits;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-01  15:00
+ * @desc: 导出运价列表请求参数
+ */
+
+@Getter
+@Setter
+@ToString
+public class ExportLineFreightRateParam {
+
+    /**
+     * 模糊匹配运价名称、路径起始位置、路径结束位置
+     */
+    private String keywords;
+
+    /**
+     * 创建时间开始(yyyy-MM-dd HH:mm:ss)
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date startCreateTime;
+
+    /**
+     * 创建时间结束(yyyy-MM-dd HH:mm:ss)
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date endCreateTime;
+
+    /**
+     * 行驶里程开始
+     */
+    @DecimalMin(value = "0", message = "行驶里程不能小于零")
+    @Digits(integer = 7, fraction = 2, message = "行驶里程格式错误")
+    private BigDecimal startMileage;
+
+    /**
+     * 行驶里程结束
+     */
+    @DecimalMin(value = "0", message = "行驶里程不能小于零")
+    @Digits(integer = 7, fraction = 2, message = "行驶里程格式错误")
+    private BigDecimal endMileage;
+}

+ 21 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/LineFreightRateFindListParam.java

@@ -0,0 +1,21 @@
+package com.sckw.manage.model.vo.req;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-04  10:08
+ * @desc: 路径下拉列表请求参数
+ */
+@Getter
+@Setter
+@ToString
+public class LineFreightRateFindListParam {
+
+    /**
+     * 路径名称
+     */
+    private String name;
+}

+ 5 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/QueryByEntReqVo.java

@@ -21,6 +21,11 @@ public class QueryByEntReqVo implements Serializable {
      */
     private Long id;
 
+    /**
+     * 地址名称
+     */
+    private String name;
+
     /**
      * 地址名
      */

+ 57 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/SelectLineFreightRateParam.java

@@ -0,0 +1,57 @@
+package com.sckw.manage.model.vo.req;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.sckw.core.model.page.PageRequest;
+import jakarta.validation.constraints.DecimalMin;
+import jakarta.validation.constraints.Digits;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-01  15:00
+ * @desc: 分页查询运价请求参数
+ */
+@Getter
+@Setter
+@ToString
+@EqualsAndHashCode(callSuper = false)
+public class SelectLineFreightRateParam extends PageRequest {
+
+    /**
+     * 模糊匹配运价名称、路径起始位置、路径结束位置
+     */
+    private String keywords;
+
+    /**
+     * 创建时间开始(yyyy-MM-dd HH:mm:ss)
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date startCreateTime;
+
+    /**
+     * 创建时间结束(yyyy-MM-dd HH:mm:ss)
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date endCreateTime;
+
+    /**
+     * 行驶里程开始
+     */
+    @DecimalMin(value = "0", message = "行驶里程不能小于零")
+    @Digits(integer = 7, fraction = 2, message = "行驶里程格式错误")
+    private BigDecimal startMileage;
+
+    /**
+     * 行驶里程结束
+     */
+    @DecimalMin(value = "0", message = "行驶里程不能小于零")
+    @Digits(integer = 7, fraction = 2, message = "行驶里程格式错误")
+    private BigDecimal endMileage;
+
+}

+ 82 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/UpdateLineFreightRateParam.java

@@ -0,0 +1,82 @@
+package com.sckw.manage.model.vo.req;
+
+import jakarta.validation.constraints.DecimalMin;
+import jakarta.validation.constraints.Digits;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import org.hibernate.validator.constraints.Length;
+
+import java.math.BigDecimal;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-01  14:34
+ * @desc: 编辑运价参数
+ */
+@Getter
+@Setter
+@ToString
+public class UpdateLineFreightRateParam {
+
+    /**
+     * 运价id
+     */
+    @NotNull(message = "运价id不能为空")
+    private Long id;
+
+    /**
+     * 运价名称
+     */
+    @NotBlank(message = "运价名称不能为空")
+    @Length(max = 40, message = "运价名称最多支持50字")
+    private String name;
+
+    /**
+     * 起始地-地址名称
+     */
+    @NotBlank(message = "路径起始位置不能为空")
+    private String loadName;
+
+    //@NotNull(message = "起始位置所属企业不能为空")
+    private Long loadEntId;
+
+    /**
+     * 目的地-地址名称
+     */
+    @NotBlank(message = "路径结束位置不能为空")
+    private String unloadName;
+
+    //@NotNull(message = "结束位置所属企业不能为空")
+    private Long unloadEntId;
+
+    /**
+     * 行驶里程/公里
+     */
+    @NotNull(message = "行驶里程/公里不能为空")
+    @Digits(integer = 7, fraction = 2, message = "行驶里程格式错误")
+    @DecimalMin(value = "0", message = "行驶里程不能小于零")
+    private BigDecimal transportMileage;
+
+    /**
+     * 运输单价(元/公里)
+     */
+    @Digits(integer = 10, fraction = 6, message = "运输单价格式错误")
+    @DecimalMin(value = "0", message = "运输单价不能小于零")
+    private BigDecimal transportPrice;
+
+    /**
+     * 运输总价
+     */
+    @Digits(integer = 10, fraction = 6, message = "运输总价格式错误")
+    @DecimalMin(value = "0", message = "运输总价不能小于零")
+    @NotNull(message = "运输总价不能为空")
+    private BigDecimal transportAmount;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 61 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/res/LineFreightRateDetail.java

@@ -0,0 +1,61 @@
+package com.sckw.manage.model.vo.res;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-01  11:16
+ * @desc: 运价详情
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class LineFreightRateDetail {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 线路名称
+     */
+    private String name;
+
+    /**
+     * 起始地_名称
+     */
+    private String loadName;
+
+    /**
+     * 目的地_名称
+     */
+    private String unloadName;
+
+    /**
+     * 运输里程
+     */
+    private BigDecimal transportMileage;
+
+    /**
+     * 运输单价(元/公里)
+     */
+    private BigDecimal transportPrice;
+
+    /**
+     * 运输总价
+     */
+    private BigDecimal transportAmount;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 53 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/res/LineFreightRateExport.java

@@ -0,0 +1,53 @@
+package com.sckw.manage.model.vo.res;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.sckw.excel.annotation.ExcelContext;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-01  15:02
+ * @desc: 运价列表信息
+ */
+@Data
+@Accessors(chain = true)
+@ExcelContext(fileName = "运价列表信息", sheetName = "运价列表信息")
+public class LineFreightRateExport implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 6529061725929970732L;
+
+    @ExcelProperty(value = "运价名称")
+    private String name;
+
+    @ExcelProperty(value = "路径起始位置")
+    private String loadName;
+
+    @ExcelProperty(value = "路径结束位置")
+    private String unloadName;
+
+    @ExcelProperty(value = "行驶里程/公里")
+    private String transportMileage;
+
+    @ExcelProperty(value = "运输单价/元")
+    private String transportPrice;
+
+    @ExcelProperty(value = "运输总价/元")
+    private String transportAmount;
+
+    @ExcelProperty(value = "创建人")
+    private String createByName;
+
+    @ExcelProperty(value = "创建时间")
+    private String createTime;
+
+    @ExcelProperty(value = "更新时间")
+    private String updateTime;
+
+    @ExcelProperty(value = "备注")
+    private String remark;
+
+}

+ 38 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/res/LineFreightRateFindListResVO.java

@@ -0,0 +1,38 @@
+package com.sckw.manage.model.vo.res;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-04  10:09
+ * @desc: 路径下拉列表响应vo
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class LineFreightRateFindListResVO {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 线路名称
+     */
+    private String name;
+
+    /**
+     * 起始地_名称
+     */
+    private String loadName;
+
+    /**
+     * 目的地_名称
+     */
+    private String unloadName;
+}

+ 86 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/res/LineFreightRateListResVO.java

@@ -0,0 +1,86 @@
+package com.sckw.manage.model.vo.res;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-01  16:02
+ * @desc: 运价列表响应vo
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class LineFreightRateListResVO {
+
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 线路名称
+     */
+    private String name;
+
+    /**
+     * 起始地_名称
+     */
+    private String loadName;
+
+    /**
+     * 目的地_名称
+     */
+    private String unloadName;
+
+    /**
+     * 运输里程
+     */
+    private BigDecimal transportMileage;
+
+    /**
+     * 运输单价(元/公里)
+     */
+    private BigDecimal transportPrice;
+
+    /**
+     * 运输总价
+     */
+    private BigDecimal transportAmount;
+
+    /**
+     * 创建人id
+     */
+    private Long createBy;
+
+    /**
+     * 创建人姓名
+     */
+    private String createByName;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+}

+ 0 - 3
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/CommonBusinessService.java

@@ -49,9 +49,6 @@ public class CommonBusinessService {
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private RemoteSystemService remoteSystemService;
 
-    @DubboReference(version = "1.0.0", group = "design", check = false)
-    private RemoteUserService remoteUserService;
-
     @Autowired
     private KwmCooperateMapper kwmCooperateMapper;
 

+ 43 - 41
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmAddressService.java

@@ -6,7 +6,7 @@ import com.github.pagehelper.PageInfo;
 import com.sckw.core.common.enums.enums.DictTypeEnum;
 import com.sckw.core.exception.SystemException;
 import com.sckw.core.model.constant.Global;
-import com.sckw.core.model.enums.AddressDefaultTypeEnum;
+import com.sckw.core.model.enums.AddressTypeEnum;
 import com.sckw.core.model.enums.SystemTypeEnum;
 import com.sckw.core.model.page.PageHelperUtil;
 import com.sckw.core.model.page.PageResult;
@@ -33,7 +33,6 @@ import jakarta.servlet.http.HttpServletResponse;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cloud.stream.function.StreamBridge;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -60,8 +59,6 @@ public class KwmAddressService {
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private RemoteUserService remoteUserService;
 
-    @Autowired
-    private StreamBridge streamBridge;
 
     /**
      * @param reqVo 分页入参
@@ -96,7 +93,7 @@ public class KwmAddressService {
             }
         }
 
-        List<KwmAddress> kwmAddressList = findList(reqVo,authEntIdList);
+        List<KwmAddress> kwmAddressList = findList(reqVo, authEntIdList);
         if (CollectionUtils.isEmpty(kwmAddressList)) {
             return PageHelperUtil.getPageResult(new PageInfo<>());
         }
@@ -111,10 +108,10 @@ public class KwmAddressService {
      * @author: czh
      * @date: 2023/7/12
      */
-    private List<KwmAddress> findList(AddressQueryReqVo reqVo,List<Long> authEntIdList ) {
+    private List<KwmAddress> findList(AddressQueryReqVo reqVo, List<Long> authEntIdList) {
         LambdaQueryWrapper<KwmAddress> wrapper = new LambdaQueryWrapper<>();
-        if (CollectionUtils.isNotEmpty(authEntIdList)){
-            wrapper.in(KwmAddress::getEntId,authEntIdList);
+        if (CollectionUtils.isNotEmpty(authEntIdList)) {
+            wrapper.in(KwmAddress::getEntId, authEntIdList);
         }
         wrapper.in(Objects.nonNull(reqVo.getCityCode()), KwmAddress::getCityCode, reqVo.getCityCodeList()).
                 eq(Objects.nonNull(reqVo.getType()), KwmAddress::getType, reqVo.getType()).
@@ -187,7 +184,7 @@ public class KwmAddressService {
             }
 
             if (Objects.nonNull(item.getDefaultType())) {
-                addressQueryResVo.setDefaultTypeName(AddressDefaultTypeEnum.getName(item.getDefaultType()).getName());
+                addressQueryResVo.setDefaultTypeName(AddressTypeEnum.getName(item.getDefaultType()).getName());
             }
 
             if (Objects.nonNull(entCacheResDto)) {
@@ -220,39 +217,25 @@ public class KwmAddressService {
         Integer defaultType = kwmAddress.getDefaultType();
         Integer setDefaultType = reqVo.getDefaultType();
 
-//        LambdaQueryWrapper<KwmAddress> wrapper = new LambdaQueryWrapper<>();
-//        wrapper.eq(KwmAddress::getEntId, entId).
-//                eq(KwmAddress::getDelFlag, Global.NO).
-//                eq(KwmAddress::getStatus, Global.NO);
-//        List<KwmAddress> entAddress = kwmAddressMapper.selectList(wrapper);
-//        List<Integer> defaultTypeList = entAddress.stream().map(KwmAddress::getDefaultType).distinct().toList();
-//        if (defaultType.equals(AddressDefaultTypeEnum.SHIPMENT.getCode()) && (defaultTypeList.contains(AddressDefaultTypeEnum.SHIPMENT.getCode()) || defaultTypeList.contains(AddressDefaultTypeEnum.BOTH.getCode()))) {
-//            throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_021);
-//        }
-//
-//        if (defaultType.equals(AddressDefaultTypeEnum.TAKE.getCode()) && (defaultTypeList.contains(AddressDefaultTypeEnum.TAKE.getCode()) || defaultTypeList.contains(AddressDefaultTypeEnum.BOTH.getCode()))) {
-//            throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_021);
-//        }
-
         //当前是收货或者卸货
-        if (!defaultType.equals(AddressDefaultTypeEnum.NO.getCode()) && !defaultType.equals(AddressDefaultTypeEnum.BOTH.getCode())) {
+        if (!defaultType.equals(AddressTypeEnum.NO.getCode()) && !defaultType.equals(AddressTypeEnum.BOTH.getCode())) {
             if (defaultType.equals(setDefaultType)) {
                 //相等则取消
-                kwmAddress.setDefaultType(AddressDefaultTypeEnum.NO.getCode());
+                kwmAddress.setDefaultType(AddressTypeEnum.NO.getCode());
             } else {
-                kwmAddress.setDefaultType(AddressDefaultTypeEnum.BOTH.getCode());
+                kwmAddress.setDefaultType(AddressTypeEnum.BOTH.getCode());
             }
 
         }
 
         //当前是收货也是卸货
-        if (defaultType.equals(AddressDefaultTypeEnum.BOTH.getCode())) {
-            if (setDefaultType.equals(AddressDefaultTypeEnum.SHIPMENT.getCode())) {
-                kwmAddress.setDefaultType(AddressDefaultTypeEnum.TAKE.getCode());
+        if (defaultType.equals(AddressTypeEnum.BOTH.getCode())) {
+            if (setDefaultType.equals(AddressTypeEnum.SHIPMENT.getCode())) {
+                kwmAddress.setDefaultType(AddressTypeEnum.TAKE.getCode());
             }
 
-            if (setDefaultType.equals(AddressDefaultTypeEnum.TAKE.getCode())) {
-                kwmAddress.setDefaultType(AddressDefaultTypeEnum.SHIPMENT.getCode());
+            if (setDefaultType.equals(AddressTypeEnum.TAKE.getCode())) {
+                kwmAddress.setDefaultType(AddressTypeEnum.SHIPMENT.getCode());
             }
         }
 
@@ -261,20 +244,20 @@ public class KwmAddressService {
         lambdaQueryWrapper.eq(KwmAddress::getEntId, entId).
                 eq(KwmAddress::getDelFlag, Global.NO).
                 and(wp -> wp.eq(KwmAddress::getDefaultType, setDefaultType).or().
-                        eq(KwmAddress::getDefaultType, AddressDefaultTypeEnum.BOTH.getCode()));
+                        eq(KwmAddress::getDefaultType, AddressTypeEnum.BOTH.getCode()));
         List<KwmAddress> kwmAddressList = kwmAddressMapper.selectList(lambdaQueryWrapper);
         if (CollectionUtils.isNotEmpty(kwmAddressList)) {
             KwmAddress kwmAddress1 = kwmAddressList.get(0);
-            if (kwmAddress1.getDefaultType().equals(AddressDefaultTypeEnum.BOTH.getCode())) {
-                if (setDefaultType.equals(AddressDefaultTypeEnum.SHIPMENT.getCode())) {
-                    kwmAddress1.setDefaultType(AddressDefaultTypeEnum.TAKE.getCode());
+            if (kwmAddress1.getDefaultType().equals(AddressTypeEnum.BOTH.getCode())) {
+                if (setDefaultType.equals(AddressTypeEnum.SHIPMENT.getCode())) {
+                    kwmAddress1.setDefaultType(AddressTypeEnum.TAKE.getCode());
                 }
 
-                if (setDefaultType.equals(AddressDefaultTypeEnum.TAKE.getCode())) {
-                    kwmAddress1.setDefaultType(AddressDefaultTypeEnum.SHIPMENT.getCode());
+                if (setDefaultType.equals(AddressTypeEnum.TAKE.getCode())) {
+                    kwmAddress1.setDefaultType(AddressTypeEnum.SHIPMENT.getCode());
                 }
             } else {
-                kwmAddress1.setDefaultType(AddressDefaultTypeEnum.NO.getCode());
+                kwmAddress1.setDefaultType(AddressTypeEnum.NO.getCode());
             }
             kwmAddress1.setUpdateBy(userId);
             kwmAddress1.setUpdateTime(date);
@@ -283,7 +266,7 @@ public class KwmAddressService {
             }
         }
 
-        if (defaultType.equals(AddressDefaultTypeEnum.NO.getCode())) {
+        if (defaultType.equals(AddressTypeEnum.NO.getCode())) {
             kwmAddress.setDefaultType(setDefaultType);
         }
 
@@ -338,7 +321,7 @@ public class KwmAddressService {
         kwmAddress.setUpdateBy(userId);
         kwmAddress.setCreateTime(date);
         kwmAddress.setUpdateTime(date);
-        kwmAddress.setDefaultType(AddressDefaultTypeEnum.NO.getCode());
+        kwmAddress.setDefaultType(AddressTypeEnum.NO.getCode());
         kwmAddress.setId(new IdWorker(1L).nextId());
         if (kwmAddressMapper.insert(kwmAddress) <= 0) {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
@@ -414,7 +397,7 @@ public class KwmAddressService {
                 authEntIdList.addAll(ids);
             }
         }
-        List<KwmAddress> kwmAddressList = findList(reqVo,authEntIdList);
+        List<KwmAddress> kwmAddressList = findList(reqVo, authEntIdList);
         if (CollectionUtils.isEmpty(kwmAddressList)) {
             throw new SystemException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认!");
         }
@@ -446,6 +429,9 @@ public class KwmAddressService {
         if (StringUtils.isNotBlank(reqVo.getCityTrueName())) {
             wrapper.eq(KwmAddress::getName, reqVo.getCityTrueName());
         }
+        if (StringUtils.isNotBlank(reqVo.getName())) {
+            wrapper.like(KwmAddress::getName, reqVo.getName());
+        }
         if (StringUtils.isNotBlank(reqVo.getCityName())) {
             wrapper.and(wp -> wp.like(KwmAddress::getCityName, reqVo.getCityName()).or().
                     like(KwmAddress::getDetailAddress, reqVo.getCityName()));
@@ -480,4 +466,20 @@ public class KwmAddressService {
         return addressDetailResVo;
     }
 
+    /**
+     * @desc 根据id及企业id查询未删除的地址信息
+     * @param name
+     * @param entId
+     * @return com.sckw.manage.model.entity.KwmAddress
+     * @author yzc
+     * @date 2024/3/1 10:53
+     */
+    public KwmAddress getByNameAndEntId(String name, Long entId) {
+        LambdaQueryWrapper<KwmAddress> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(KwmAddress::getName, name)
+                .eq(KwmAddress::getEntId, entId)
+                .eq(KwmAddress::getDelFlag, Global.NO)
+                .last("LIMIT 1");
+        return kwmAddressMapper.selectOne(wrapper);
+    }
 }

+ 4 - 6
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateApplyService.java

@@ -1,8 +1,5 @@
 package com.sckw.manage.service;
 
-import java.io.IOException;
-import java.util.Date;
-
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
@@ -12,10 +9,12 @@ import com.sckw.core.model.enums.CooperateStatusEnum;
 import com.sckw.core.model.enums.CooperateTypeEnum;
 import com.sckw.core.model.page.PageHelperUtil;
 import com.sckw.core.model.page.PageResult;
-import com.sckw.core.utils.*;
+import com.sckw.core.utils.BeanUtils;
+import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.utils.IdWorker;
+import com.sckw.core.utils.StringUtils;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginUserHolder;
-import com.sckw.excel.utils.EasyExcelUtil;
 import com.sckw.excel.utils.ExcelUtil;
 import com.sckw.manage.dao.KwmCooperateMapper;
 import com.sckw.manage.dao.KwmCooperateTypeMapper;
@@ -24,7 +23,6 @@ import com.sckw.manage.model.dto.res.CooperateManageQueryResDto;
 import com.sckw.manage.model.dto.res.CooperateQueryDto;
 import com.sckw.manage.model.entity.KwmCooperate;
 import com.sckw.manage.model.entity.KwmCooperateType;
-import com.sckw.manage.model.report.AddressQueryExport;
 import com.sckw.manage.model.report.CooperateManageExport;
 import com.sckw.manage.model.vo.req.CooperateApplyQueryReqVo;
 import com.sckw.manage.model.vo.req.CooperateApproveReqVo;

+ 3 - 3
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateManageService.java

@@ -38,7 +38,7 @@ import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.FindEntUserResDto;
 import com.sckw.system.api.model.dto.res.KwsEnterpriseResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
-import com.sckw.transport.api.dubbo.TransportService;
+import com.sckw.transport.api.dubbo.TransportRemoteService;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
@@ -78,7 +78,7 @@ public class KwmCooperateManageService {
     private TradeOrderInfoService tradeOrderInfoService;
 
     @DubboReference(version = "1.0.0", group = "design", check = false)
-    private TransportService transportDubboService;
+    private TransportRemoteService transportRemoteService;
 
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private PaymentDubboService paymentDubboService;
@@ -297,7 +297,7 @@ public class KwmCooperateManageService {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_031);
         }
         //判断是否可以解除-托运和承运
-        HttpResult response = transportDubboService.checkLogisticsOrderIsFinishByEntId(kwmCooperate.getInviteeEntId(), kwmCooperate.getInviterEntId());
+        HttpResult response = transportRemoteService.checkLogisticsOrderIsFinishByEntId(kwmCooperate.getInviteeEntId(), kwmCooperate.getInviterEntId());
         int receivedResult = response.getCode();
         if (!Integer.toString(receivedResult).equals(String.valueOf(HttpStatus.SUCCESS_CODE))) {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_032);

+ 361 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmLineFreightRateService.java

@@ -0,0 +1,361 @@
+package com.sckw.manage.service;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.pagehelper.PageInfo;
+import com.sckw.core.exception.BusinessException;
+import com.sckw.core.model.constant.Global;
+import com.sckw.core.model.enums.SystemTypeEnum;
+import com.sckw.core.model.page.PageHelperUtil;
+import com.sckw.core.model.page.PageResult;
+import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.utils.StringUtils;
+import com.sckw.core.web.context.LoginUserHolder;
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.excel.utils.DateUtil;
+import com.sckw.manage.dao.KwmLineFreightRateMapper;
+import com.sckw.manage.model.entity.KwmAddress;
+import com.sckw.manage.model.entity.KwmLineFreightRate;
+import com.sckw.manage.model.vo.req.*;
+import com.sckw.manage.model.vo.res.LineFreightRateDetail;
+import com.sckw.manage.model.vo.res.LineFreightRateExport;
+import com.sckw.manage.model.vo.res.LineFreightRateFindListResVO;
+import com.sckw.manage.model.vo.res.LineFreightRateListResVO;
+import com.sckw.system.api.RemoteSystemService;
+import com.sckw.system.api.RemoteUserService;
+import com.sckw.system.api.model.dto.res.UserCacheResDto;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-01  09:18
+ * @desc: 路径service
+ */
+@Service
+@Slf4j
+@RequiredArgsConstructor
+public class KwmLineFreightRateService {
+
+    @DubboReference(version = "1.0.0", group = "design", check = false)
+    private RemoteSystemService remoteSystemService;
+
+    private final KwmLineFreightRateMapper lineFreightRateMapper;
+    private final KwmAddressService addressService;
+
+    @DubboReference(version = "1.0.0", group = "design", check = false, timeout = 6000)
+    RemoteUserService remoteUserService;
+
+    /**
+     * @param addLineFreightRateParam
+     * @return void
+     * @desc 新增路径
+     * @author yzc
+     * @date 2024/3/1 11:14
+     */
+    public void add(AddLineFreightRateParam addLineFreightRateParam) {
+        Long entId = LoginUserHolder.getEntId();
+        Long count = countByEntIdAndName(entId, addLineFreightRateParam.getName(), null);
+        if (count > 0) {
+            throw new BusinessException("路径名称已存在,不可重复!");
+        }
+        String loadName = addLineFreightRateParam.getLoadName();
+        String unloadName = addLineFreightRateParam.getUnloadName();
+        if (Objects.equals(loadName, unloadName)) {
+            throw new BusinessException("路径起始结束位置不能相同!");
+        }
+        KwmAddress load = addressService.getByNameAndEntId(loadName, addLineFreightRateParam.getLoadEntId());
+        if (Objects.isNull(load)) {
+            throw new BusinessException("路径起始位置信息不存在!");
+        }
+        KwmAddress unload = addressService.getByNameAndEntId(unloadName, addLineFreightRateParam.getUnloadEntId());
+        if (Objects.isNull(unload)) {
+            throw new BusinessException("路径结束位置信息不存在!");
+        }
+        KwmLineFreightRate freightRate = BeanUtil.copyProperties(addLineFreightRateParam, KwmLineFreightRate.class);
+        freightRate.setEntId(entId).setLoadName(load.getName()).setLoadCityCode(load.getCityCode())
+                .setLoadCityName(load.getCityName()).setLoadDetailAddress(load.getDetailAddress())
+                .setLoadLng(load.getLng()).setLoadLat(load.getLat())
+                .setUnloadName(unload.getName()).setUnloadCityCode(unload.getCityCode())
+                .setUnloadCityName(unload.getCityName()).setUnloadDetailAddress(unload.getDetailAddress())
+                .setUnloadLng(unload.getLng()).setUnloadLat(unload.getLat());
+        lineFreightRateMapper.insert(freightRate);
+    }
+
+    /**
+     * @param param
+     * @return void
+     * @desc 编辑路径
+     * @author yzc
+     * @date 2024/3/1 14:37
+     */
+    public void update(UpdateLineFreightRateParam param) {
+        Long entId = LoginUserHolder.getEntId();
+        KwmLineFreightRate lineFreightRate = getById(param.getId());
+        if (Objects.isNull(lineFreightRate)) {
+            throw new BusinessException("路径信息不存在!");
+        }
+        Long count = countByEntIdAndName(entId, param.getName(), param.getId());
+        if (count > 0) {
+            throw new BusinessException("路径名称已存在,不可重复!");
+        }
+        KwmLineFreightRate freightRate = BeanUtil.copyProperties(param, KwmLineFreightRate.class);
+        String loadName = param.getLoadName();
+        String unloadName = param.getUnloadName();
+        if (Objects.equals(loadName, unloadName)) {
+            throw new BusinessException("路径起始结束位置不能相同!");
+        }
+        if (!Objects.equals(loadName, lineFreightRate.getLoadName())) {
+            KwmAddress load = addressService.getByNameAndEntId(param.getLoadName(), param.getLoadEntId());
+            if (Objects.isNull(load)) {
+                throw new BusinessException("路径起始位置信息不存在!");
+            }
+            freightRate.setLoadName(load.getName()).setLoadCityCode(load.getCityCode())
+                    .setLoadCityName(load.getCityName()).setLoadDetailAddress(load.getDetailAddress())
+                    .setLoadLng(load.getLng()).setLoadLat(load.getLat());
+        }
+        if (!Objects.equals(unloadName, lineFreightRate.getUnloadName())) {
+            KwmAddress unload = addressService.getByNameAndEntId(param.getUnloadName(), param.getUnloadEntId());
+            if (Objects.isNull(unload)) {
+                throw new BusinessException("路径结束位置信息不存在!");
+            }
+            freightRate.setUnloadName(unload.getName()).setUnloadCityCode(unload.getCityCode())
+                    .setUnloadCityName(unload.getCityName()).setUnloadDetailAddress(unload.getDetailAddress())
+                    .setUnloadLng(unload.getLng()).setUnloadLat(unload.getLat());
+        }
+        lineFreightRateMapper.updateById(freightRate);
+    }
+
+    /**
+     * @param id
+     * @return com.sckw.manage.model.vo.res.LineFreightRateDetail
+     * @desc 路径详情
+     * @author yzc
+     * @date 2024/3/1 11:18
+     */
+    public LineFreightRateDetail detail(Long id) {
+        LambdaQueryWrapper<KwmLineFreightRate> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(KwmLineFreightRate::getId, id)
+                .eq(KwmLineFreightRate::getDelFlag, Global.NO)
+                .last("LIMIT 1");
+        KwmLineFreightRate freightRate = lineFreightRateMapper.selectOne(queryWrapper);
+        if (Objects.isNull(freightRate)) {
+            throw new BusinessException("路径信息不存在");
+        }
+        return BeanUtil.copyProperties(freightRate, LineFreightRateDetail.class);
+    }
+
+
+    /**
+     * @param params
+     * @return com.sckw.core.model.page.PageResult
+     * @desc 路径分页列表
+     * @author yzc
+     * @date 2024/3/1 16:27
+     */
+    public PageResult select(SelectLineFreightRateParam params) {
+        //新增客户经理权限过滤
+        List<Long> authEntIdList = new ArrayList<>();
+        if (SystemTypeEnum.MANAGE.getCode().equals(LoginUserHolder.getSystemType())) {
+            if (CollectionUtils.isEmpty(authEntIdList)) {
+                List<Long> ids = remoteUserService.findEnterpriseIdsByUserIdIsMain(LoginUserHolder.getUserId());
+                if (CollectionUtils.isEmpty(ids)){
+                    return PageResult.build(params.getPage(), params.getPageSize(), 0L, Collections.emptyList());
+                }
+                authEntIdList.addAll(ids);
+            }
+        } else {
+            authEntIdList.add(LoginUserHolder.getEntId());
+        }
+        LambdaQueryWrapper<KwmLineFreightRate> wrapper = buildWrapper(BeanUtil.copyProperties(params, ExportLineFreightRateParam.class), authEntIdList);
+        Page<KwmLineFreightRate> page = new Page<>(params.getPage(), params.getPageSize());
+        Page<KwmLineFreightRate> ipage = lineFreightRateMapper.selectPage(page, wrapper);
+        List<KwmLineFreightRate> list = ipage.getRecords();
+        if (CollectionUtils.isEmpty(list)) {
+            return PageResult.build(params.getPage(), params.getPageSize(), ipage.getTotal(), Collections.emptyList());
+        }
+        List<Long> createByIds = list.stream().map(KwmLineFreightRate::getCreateBy).toList();
+        Map<Long, UserCacheResDto> userMap = remoteSystemService.queryUserCacheMapByIds(createByIds);
+        List<LineFreightRateListResVO> result = new ArrayList<>();
+        list.forEach(e -> {
+            LineFreightRateListResVO vo = BeanUtil.copyProperties(e, LineFreightRateListResVO.class);
+            UserCacheResDto user = userMap.get(e.getCreateBy());
+            vo.setCreateByName(Objects.nonNull(user) ? user.getName() : "");
+            result.add(vo);
+        });
+        return PageResult.build(params.getPage(), params.getPageSize(), ipage.getTotal(), result);
+    }
+
+    /**
+     * @param params
+     * @return java.util.List<com.sckw.manage.model.vo.res.LineFreightRateExport>
+     * @desc 路径导出
+     * @author yzc
+     * @date 2024/3/1 16:40
+     */
+    public List<LineFreightRateExport> export(ExportLineFreightRateParam params) {
+        //新增客户经理权限过滤
+        List<Long> authEntIdList = new ArrayList<>();
+        if (SystemTypeEnum.MANAGE.getCode().equals(LoginUserHolder.getSystemType())) {
+            if (CollectionUtils.isEmpty(authEntIdList)) {
+                List<Long> ids = remoteUserService.findEnterpriseIdsByUserIdIsMain(LoginUserHolder.getUserId());
+                if (CollectionUtils.isEmpty(ids)){
+                    return new ArrayList<>();
+                }
+                authEntIdList.addAll(ids);
+            }
+        } else {
+            authEntIdList.add(LoginUserHolder.getEntId());
+        }
+        LambdaQueryWrapper<KwmLineFreightRate> wrapper = buildWrapper(params, authEntIdList);
+        List<KwmLineFreightRate> list = lineFreightRateMapper.selectList(wrapper);
+        if (CollectionUtils.isEmpty(list)) {
+            return Collections.emptyList();
+        }
+        List<Long> createByIds = list.stream().map(KwmLineFreightRate::getCreateBy).toList();
+        Map<Long, UserCacheResDto> userMap = remoteSystemService.queryUserCacheMapByIds(createByIds);
+        List<LineFreightRateExport> result = new ArrayList<>();
+        list.forEach(e -> {
+            LineFreightRateExport vo = BeanUtil.copyProperties(e, LineFreightRateExport.class);
+            UserCacheResDto user = userMap.get(e.getCreateBy());
+            vo.setCreateByName(Objects.nonNull(user) ? user.getName() : "")
+                    .setTransportMileage(Objects.isNull(e.getTransportMileage()) ? null : String.valueOf(e.getTransportMileage()))
+                    .setTransportMileage(Objects.isNull(e.getTransportPrice()) ? null : String.valueOf(e.getTransportPrice()))
+                    .setTransportMileage(Objects.isNull(e.getTransportAmount()) ? null : String.valueOf(e.getTransportAmount()))
+                    .setTransportMileage(Objects.isNull(e.getCreateTime()) ? null : String.valueOf(DateUtil.getDateTime(e.getCreateTime())))
+                    .setTransportMileage(Objects.isNull(e.getUpdateTime()) ? null : String.valueOf(DateUtil.getDateTime(e.getUpdateTime())));
+            result.add(vo);
+        });
+        return result;
+    }
+
+    /**
+     * @param params
+     * @return com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<com.sckw.manage.model.entity.KwmLineFreightRate>
+     * @desc 构建路径查询条件
+     * @author yzc
+     * @date 2024/3/1 16:40
+     */
+    private LambdaQueryWrapper<KwmLineFreightRate>
+
+    buildWrapper(ExportLineFreightRateParam params, List<Long> authEntIdList) {
+        LambdaQueryWrapper<KwmLineFreightRate> wrapper = new LambdaQueryWrapper<>();
+        if (Objects.nonNull(params.getStartCreateTime())) {
+            wrapper.ge(KwmLineFreightRate::getCreateTime, params.getStartCreateTime());
+        }
+        if (Objects.nonNull(params.getEndCreateTime())) {
+            wrapper.le(KwmLineFreightRate::getCreateTime, params.getEndCreateTime());
+        }
+        if (Objects.nonNull(params.getStartMileage())) {
+            wrapper.ge(KwmLineFreightRate::getTransportMileage, params.getStartMileage());
+        }
+        if (Objects.nonNull(params.getEndMileage())) {
+            wrapper.le(KwmLineFreightRate::getTransportMileage, params.getEndMileage());
+        }
+        if (CollectionUtils.isNotEmpty(authEntIdList)) {
+            wrapper.in(KwmLineFreightRate::getEntId, authEntIdList);
+        }
+
+        String keywords = params.getKeywords();
+        if (StringUtils.isNotBlank(keywords)) {
+            wrapper.and(e -> e.like(KwmLineFreightRate::getName, keywords)
+                    .or().like(KwmLineFreightRate::getLoadName, keywords)
+                    .or().like(KwmLineFreightRate::getUnloadName, keywords));
+        }
+        wrapper.eq(KwmLineFreightRate::getDelFlag, Global.NO)
+                .orderByDesc(KwmLineFreightRate::getCreateTime);
+        return wrapper;
+    }
+
+    /**
+     * @param ids
+     * @return void
+     * @desc 批量删除
+     * @author yzc
+     * @date 2024/3/1 16:41
+     */
+    public void batchDelete(List<Long> ids) {
+        //todo 关联托运、承运订单不可删除
+        LambdaQueryWrapper<KwmLineFreightRate> wrapper = new LambdaQueryWrapper<>();
+        wrapper.in(KwmLineFreightRate::getId, ids)
+                .eq(KwmLineFreightRate::getEntId, LoginUserHolder.getEntId())
+                .eq(KwmLineFreightRate::getDelFlag, Global.NO);
+        List<KwmLineFreightRate> list = lineFreightRateMapper.selectList(wrapper);
+        if (!Objects.equals(ids.size(), list.size())) {
+            throw new BusinessException("删除数据与数据库数据不一致");
+        }
+        LambdaUpdateWrapper<KwmLineFreightRate> updateWrapper = new LambdaUpdateWrapper<>();
+        updateWrapper.set(KwmLineFreightRate::getDelFlag, Global.YES).in(KwmLineFreightRate::getId, ids);
+        lineFreightRateMapper.update(null, updateWrapper);
+    }
+
+    /**
+     * @param entId
+     * @param name
+     * @param id
+     * @return java.lang.Long
+     * @desc 根据企业ID和路径名称统计
+     * @author yzc
+     * @date 2024/3/1 14:50
+     */
+    public Long countByEntIdAndName(Long entId, String name, Long id) {
+        LambdaQueryWrapper<KwmLineFreightRate> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(KwmLineFreightRate::getEntId, entId)
+                .ne(Objects.nonNull(id), KwmLineFreightRate::getId, id)
+                .eq(KwmLineFreightRate::getName, name)
+                .eq(KwmLineFreightRate::getDelFlag, Global.NO);
+        return lineFreightRateMapper.selectCount(queryWrapper);
+    }
+
+    /**
+     * @param id
+     * @return com.sckw.manage.model.entity.KwmLineFreightRate
+     * @desc 根据id查询路径信息
+     * @author yzc
+     * @date 2024/3/1 16:41
+     */
+    public KwmLineFreightRate getById(Long id) {
+        LambdaQueryWrapper<KwmLineFreightRate> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(KwmLineFreightRate::getId, id)
+                .eq(KwmLineFreightRate::getDelFlag, Global.NO);
+        return lineFreightRateMapper.selectOne(queryWrapper);
+    }
+
+    /**
+     * @param params
+     * @return java.util.List<com.sckw.manage.model.vo.res.LineFreightRateFindListResVO>
+     * @desc 路径下拉列表查询
+     * @author yzc
+     * @date 2024/3/4 10:15
+     */
+    public List<LineFreightRateFindListResVO> findList(LineFreightRateFindListParam params) {
+        LambdaQueryWrapper<KwmLineFreightRate> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(KwmLineFreightRate::getEntId, LoginUserHolder.getEntId())
+                .eq(KwmLineFreightRate::getDelFlag, Global.NO)
+                .like(StringUtils.isNotBlank(params.getName()), KwmLineFreightRate::getName, params.getName());
+        List<KwmLineFreightRate> list = lineFreightRateMapper.selectList(queryWrapper);
+        return BeanUtil.copyToList(list, LineFreightRateFindListResVO.class);
+    }
+
+    /**
+     * @param param
+     * @return java.util.List<com.sckw.manage.model.vo.res.LineFreightRateListResVO>
+     * @desc 物流订单路径选择查询
+     * @author yzc
+     * @date 2024/3/13 16:11
+     */
+    public List<LineFreightRateListResVO> choose(ChooseLineFreightRateParam param) {
+        LambdaQueryWrapper<KwmLineFreightRate> wrapper = new LambdaQueryWrapper<>();
+        wrapper.in(KwmLineFreightRate::getLoadName, param.getLoadNames())
+                .in(KwmLineFreightRate::getUnloadName, param.getUnloadNames())
+                .eq(KwmLineFreightRate::getDelFlag, Global.NO);
+        List<KwmLineFreightRate> list = lineFreightRateMapper.selectList(wrapper);
+        return BeanUtil.copyToList(list, LineFreightRateListResVO.class);
+    }
+}

+ 0 - 3
sckw-modules/sckw-operation/src/main/java/com/sckw/operation/service/BannerService.java

@@ -1,6 +1,5 @@
 package com.sckw.operation.service;
 
-import java.io.IOException;
 import java.util.*;
 
 import cn.hutool.core.date.DateUtil;
@@ -9,8 +8,6 @@ import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.sckw.core.exception.SystemException;
 import com.sckw.core.model.constant.Global;
-import com.sckw.core.model.enums.AddressDefaultTypeEnum;
-import com.sckw.core.model.enums.ContractStatusEnum;
 import com.sckw.core.model.page.PageHelperUtil;
 import com.sckw.core.model.page.PageResult;
 import com.sckw.core.utils.BeanUtils;

+ 88 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/controller/KwoTradeOrderController.java

@@ -1,15 +1,22 @@
 package com.sckw.order.controller;
 
 import com.sckw.core.annotation.RepeatSubmit;
+import com.sckw.core.exception.CustomPromptException;
+import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.response.HttpResult;
+import com.sckw.excel.utils.ExcelUtil;
 import com.sckw.order.model.vo.req.*;
 import com.sckw.order.serivce.KwoTradeOrderService;
 import io.seata.spring.annotation.GlobalTransactional;
+import jakarta.servlet.http.HttpServletResponse;
 import lombok.RequiredArgsConstructor;
 import org.springframework.http.MediaType;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+
 /**
  * @desc: 贸易订单相关
  * @author: yzc
@@ -203,4 +210,85 @@ public class KwoTradeOrderController {
         return HttpResult.ok(kwoTradeOrderService.goodsUnit(id));
     }
 
+
+    @GetMapping("/getAddressInfo")
+    public HttpResult getAddressInfo(@RequestParam Long id) {
+        return HttpResult.ok("贸易订单地址信息查询成功", kwoTradeOrderService.getAddressInfo(id));
+    }
+
+    /**
+     * @desc: 贸易订单列表分页查询
+     * @author: yzc
+     * @date: 2023-07-17 10:29
+     * @Param params:
+     * @return: com.sckw.core.web.response.HttpResult
+     */
+    @PostMapping(value = "/tradeOrderSelect", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult select(@RequestBody @Validated TradeOrderListSelectParam params) {
+        return HttpResult.ok(kwoTradeOrderService.tradeOrderSelect(params));
+    }
+
+    /**
+     * @desc: 贸易订单列表统计查询
+     * @author: yzc
+     * @date: 2023-07-17 10:29
+     * @Param params:
+     * @return: com.sckw.core.web.response.HttpResult
+     */
+    @PostMapping(value = "/tradeOrderStatistic", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult statistic(@RequestBody @Validated TradeOrderListStatisticParam params) {
+        return HttpResult.ok(kwoTradeOrderService.tradeOrderStatistic(params));
+    }
+
+    /**
+     * @desc: app主界面贸易订单统计
+     * @author: yzc
+     * @date: 2023-08-21 17:38
+     * @Param params:
+     * @return: com.sckw.core.web.response.HttpResult
+     */
+    @PostMapping(value = "/tradeOrderAppStatistic", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult appStatistic(@RequestBody @Validated TradeOrderAppStatisticParam params) {
+        return HttpResult.ok(kwoTradeOrderService.appStatistic(params));
+    }
+
+    /**
+     * @desc: 贸易订单列表导出
+     * @author: yzc
+     * @date: 2023-07-17 10:29
+     * @Param params:
+     * @return: com.sckw.core.web.response.HttpResult
+     */
+    @PostMapping(value = "/tradeOrderExport", produces = MediaType.APPLICATION_JSON_VALUE)
+    public void export(@RequestBody @Validated TradeOrderListExportParam params, HttpServletResponse response) {
+        List<TradeOrderListExport> list = kwoTradeOrderService.export(params);
+        if (CollectionUtils.isEmpty(list)) {
+            throw new CustomPromptException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认");
+        }
+        ExcelUtil.downData(response, TradeOrderListExport.class, list);
+    }
+
+    /**
+     * @desc: 贸易订单对账单分页列表查询
+     * @author: yzc
+     * @date: 2023-07-20 15:03
+     * @Param params:
+     * @return: com.sckw.core.web.response.HttpResult
+     */
+    @PostMapping(value = "/tradeOrderStatementList", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult tradeOrderStatementList(@RequestBody @Validated TradeOrderStatementList params) {
+        return HttpResult.ok(kwoTradeOrderService.tradeOrderStatementList(params));
+    }
+
+    /**
+     * @desc: 合同关联订单列表
+     * @author: yzc
+     * @date: 2023-07-27 16:48
+     * @Param params:
+     * @return: com.sckw.core.web.response.HttpResult
+     */
+    @PostMapping(value = "/tradeOrderContractList", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult tradeOrderContractList(@RequestBody @Validated TradeOrderContractParam params) {
+        return HttpResult.ok(kwoTradeOrderService.tradeOrderContractList(params));
+    }
 }

+ 25 - 4
sckw-modules/sckw-order/src/main/java/com/sckw/order/controller/KwoTradeOrderStatisticsController.java

@@ -1,15 +1,13 @@
 package com.sckw.order.controller;
 
 import com.sckw.core.web.response.HttpResult;
+import com.sckw.order.model.vo.req.WbTOrderDataStsParam;
 import com.sckw.order.model.vo.req.WbTOrderExcelStsParam;
 import com.sckw.order.serivce.KwoTradeOrderStatisticsService;
 import lombok.AllArgsConstructor;
 import org.springframework.http.MediaType;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * @desc: 订单统计相关接口
@@ -35,4 +33,27 @@ public class KwoTradeOrderStatisticsController {
     public HttpResult workbenchExcel(@RequestBody @Validated WbTOrderExcelStsParam params) {
         return HttpResult.ok(kwoTradeOrderStatisticsService.workbenchExcel(params));
     }
+
+    /**
+     * @desc: 工作台贸易订单数据统计
+     * @author: yzc
+     * @date: 2023-09-11 14:43
+     * @Param params:
+     * @return: com.sckw.core.web.response.HttpResult
+     */
+    @PostMapping(value = "/workbenchData", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult workbenchData(@RequestBody @Validated WbTOrderDataStsParam params) {
+        return HttpResult.ok(kwoTradeOrderStatisticsService.workbenchData(params));
+    }
+
+    /**
+     * @desc: 工作台采购订单列表
+     * @author: yzc
+     * @date: 2023-09-13 19:13
+     * @return: com.sckw.core.web.response.HttpResult
+     */
+    @GetMapping(value = "/workbenchPurchaseList", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult workbenchPurchaseList() {
+        return HttpResult.ok(kwoTradeOrderStatisticsService.workbenchPurchaseList());
+    }
 }

+ 87 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/controller/TradeOrderManageController.java

@@ -0,0 +1,87 @@
+package com.sckw.order.controller;
+
+import com.sckw.core.exception.CustomPromptException;
+import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.web.constant.HttpStatus;
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.excel.utils.ExcelUtil;
+import com.sckw.order.model.vo.req.*;
+import com.sckw.order.serivce.TradeOrderManageService;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.AllArgsConstructor;
+import org.springframework.http.MediaType;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @desc: 运营端贸易订单管理相关接口
+ * @author: yzc
+ * @date: 2023-09-14 11:21
+ */
+@AllArgsConstructor
+@RestController
+@RequestMapping("/kwOrderManage")
+public class TradeOrderManageController {
+
+    private final TradeOrderManageService tradeOrderManageService;
+
+
+    /**
+     * @desc: 贸易订单列表分页查询
+     * @author: yzc
+     * @date: 2023-07-17 10:29
+     * @Param params:
+     * @return: com.sckw.core.web.response.HttpResult
+     */
+    @PostMapping(value = "/listPaging", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult listPaging(@RequestBody @Validated OperatorTOrderListQueryVO params) {
+        return HttpResult.ok(tradeOrderManageService.listPaging(params));
+    }
+
+    /**
+     * @desc: 贸易订单列表统计查询
+     * @author: yzc
+     * @date: 2023-07-17 10:29
+     * @Param params:
+     * @return: com.sckw.core.web.response.HttpResult
+     */
+    @PostMapping(value = "/listStatistic", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult listStatistic(@RequestBody @Validated OperatorTOrderStsQueryVO params) {
+        return HttpResult.ok(tradeOrderManageService.listStatistic(params));
+    }
+
+    /**
+     * @desc: 贸易订单列表导出
+     * @author: yzc
+     * @date: 2023-09-14 14:40
+     * @Param params:
+     * @Param response:
+     * @return: void
+     */
+    @PostMapping(value = "/listExport", produces = MediaType.APPLICATION_JSON_VALUE)
+    public void listExport(@RequestBody @Validated OperatorTOrderExportQueryVO params, HttpServletResponse response) {
+        List<TradeOrderListExport> list = tradeOrderManageService.export(params);
+        if (CollectionUtils.isEmpty(list)) {
+            throw new CustomPromptException(HttpStatus.SUCCESS_CODE, "暂无数据,请确认");
+        }
+        ExcelUtil.downData(response, TradeOrderListExport.class, list);
+    }
+
+    /**
+     * @desc: 合同关联订单列表
+     * @author: yzc
+     * @date: 2023-09-14 14:51
+     * @Param params:
+     * @return: com.sckw.core.web.response.HttpResult
+     */
+    @PostMapping(value = "/contractAssociationList", produces = MediaType.APPLICATION_JSON_VALUE)
+    public HttpResult contractAssociationList(@RequestBody @Validated OperatorTOrderContractParam params) {
+        return HttpResult.ok(tradeOrderManageService.contractAssociationList(params));
+    }
+
+}

+ 2 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/dao/KwoTradeOrderAddressMapper.java

@@ -23,4 +23,6 @@ public interface KwoTradeOrderAddressMapper extends BaseMapper<KwoTradeOrderAddr
      * @return: void
      */
     void insertBatch(@Param(value = "list") List<KwoTradeOrderAddress> list);
+
+    List<KwoTradeOrderAddress> findByAddress(@Param("tOrderId") Long tOrderId, @Param("type") Integer type);
 }

+ 18 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/dao/KwoTradeOrderAmountMapper.java

@@ -0,0 +1,18 @@
+package com.sckw.order.dao;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sckw.order.model.KwoTradeOrderAmount;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @desc: 交易订单装卸货地址委派及交付量信息mapper
+ * @author: yzc
+ * @date: 2024-03-04 14:18
+ */
+@Mapper
+public interface KwoTradeOrderAmountMapper extends BaseMapper<KwoTradeOrderAmount> {
+
+
+
+}

+ 98 - 2
sckw-modules/sckw-order/src/main/java/com/sckw/order/dao/KwoTradeOrderMapper.java

@@ -1,10 +1,11 @@
 package com.sckw.order.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sckw.core.model.vo.TableTop;
 import com.sckw.order.api.model.TradeOrderCountStatisticsDTO;
 import com.sckw.order.model.KwoTradeOrder;
-import com.sckw.order.model.dto.WbTOrderExcelStsReqDTO;
-import com.sckw.order.model.dto.WbTOrderExcelStsResDTO;
+import com.sckw.order.model.dto.*;
+import com.sckw.order.model.vo.res.TradeOrderAppStatisticVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -45,4 +46,99 @@ public interface KwoTradeOrderMapper extends BaseMapper<KwoTradeOrder> {
      * @return: java.util.List<com.sckw.order.model.dto.WbTOrderExcelStsResDTO>
      */
     List<WbTOrderExcelStsResDTO> workbenchExcel(@Param("item") WbTOrderExcelStsReqDTO item);
+
+    /**
+     * @param query
+     * @param goodIds
+     * @param authUserIds
+     * @return java.util.List<com.sckw.order.model.dto.OrderListResDTO>
+     * @desc 贸易订单列表查询
+     * @author yzc
+     * @date 2024/3/6 15:50
+     */
+    List<OrderListResDTO> tradeOrderSelect(@Param("query") TradeOrderListSelectDTO query,
+                                           @Param("goodIds") List<Long> goodIds,
+                                           @Param("authUserIds") List<Long> authUserIds,
+                                           @Param("entIds") List<Long> entIds);
+
+
+    /***
+     * @desc 贸易订单列表统计查询
+     * @param query
+     * @param goodIds
+     * @param authUserIds
+     * @return java.util.List<com.sckw.core.model.vo.TableTop>
+     * @author yzc
+     * @date 2024/3/14 14:34
+     */
+    List<TableTop> tradeOrderStatistic(@Param("query") TradeOrderListSelectDTO query,
+                                       @Param("goodIds") List<Long> goodIds,
+                                       @Param("authUserIds") List<Long> authUserIds);
+
+    /**
+     * @param query
+     * @param statuses
+     * @param authUserIds
+     * @return java.util.List<com.sckw.order.model.vo.res.TradeOrderAppStatisticVO>
+     * @desc app主界面贸易订单统计
+     * @author yzc
+     * @date 2024/3/15 14:24
+     */
+    List<TradeOrderAppStatisticVO> appStatistic(@Param("query") TradeOrderAppStatisticParamDTO query,
+                                                @Param("statuses") List<Integer> statuses,
+                                                @Param("authUserIds") List<Long> authUserIds);
+
+    /**
+     * @param query
+     * @param goodIds
+     * @param authUserIds
+     * @param ids
+     * @return java.util.List<com.sckw.order.model.dto.OrderListResDTO>
+     * @desc 贸易订单列表导出
+     * @author yzc
+     * @date 2024/3/15 14:24
+     */
+    List<OrderListResDTO> tradeOrderExport(@Param("query") TradeOrderListSelectDTO query,
+                                           @Param("goodIds") List<Long> goodIds,
+                                           @Param("authUserIds") List<Long> authUserIds,
+                                           @Param("ids") List<Long> ids);
+
+    /**
+     * @param query
+     * @param goodsIds
+     * @param excludeIds
+     * @return java.util.List<com.sckw.order.model.dto.OrderListResDTO>
+     * @desc 贸易订单对账单分页列表查询
+     * @author yzc
+     * @date 2024/3/15 14:24
+     */
+    List<OrderListResDTO> tradeOrderStatementList(@Param("query") TradeOrderStatementListParamDTO query,
+                                                  @Param("goodsIds") List<Long> goodsIds,
+                                                  @Param("excludeIds") List<Long> excludeIds);
+
+    /**
+     * @param query
+     * @param contractIds
+     * @return java.util.List<com.sckw.order.model.dto.OrderListResDTO>
+     * @desc 合同关联订单列表
+     * @author yzc
+     * @date 2024/3/15 14:24
+     */
+    List<OrderListResDTO> tradeOrderContractList(@Param("query") TradeOrderContractParamDTO query,
+                                                 @Param("contractIds") List<Long> contractIds);
+
+    /**
+     * @desc TODO
+     * @param procureTopEntId 
+     * @param excludeStatuses 
+     * @return java.util.List<com.sckw.order.model.dto.WorkbenchPurchaseDTO>
+     * @author yzc
+     * @date 2024/3/18 17:04
+     */
+    List<WorkbenchPurchaseDTO> workbenchPurchaseList(@Param("procureTopEntId") Long procureTopEntId,
+                                                     @Param("excludeStatuses") List<Integer> excludeStatuses);
+
+    WorkbenchOrderStsDTO getOrderStsInfo(@Param("query") OrderStsInfoDTO query,
+                                         @Param("excludeStatuses") List<Integer> excludeStatuses);
+
 }

+ 148 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/dubbo/RemoteTradeOrderAmountServiceImpl.java

@@ -0,0 +1,148 @@
+package com.sckw.order.dubbo;
+
+import cn.hutool.core.collection.CollUtil;
+import com.sckw.core.utils.StringUtils;
+import com.sckw.core.web.response.HttpResult;
+import com.sckw.order.api.dubbo.RemoteTradeOrderAmountService;
+import com.sckw.order.api.model.AddressActualAmountParam;
+import com.sckw.order.api.model.UpdateAddressActualAmountParam;
+import com.sckw.order.api.model.UpdateAddressEntrustAmountParam;
+import com.sckw.order.enums.DeliveryTypeEnum;
+import com.sckw.order.enums.OrderAddressTypeEnum;
+import com.sckw.order.enums.OrderStatusEnum;
+import com.sckw.order.model.KwoTradeOrder;
+import com.sckw.order.model.KwoTradeOrderAmount;
+import com.sckw.order.serivce.KwoTradeOrderAddressService;
+import com.sckw.order.serivce.KwoTradeOrderAmountService;
+import com.sckw.order.serivce.KwoTradeOrderService;
+import com.sckw.redis.constant.RedisConstant;
+import com.sckw.redis.utils.RedissonUtils;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.config.annotation.DubboService;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-12  16:23
+ * @desc: 贸易订单地址分配量信息相关dubbo实现
+ */
+@DubboService(group = "design", version = "1.0.0")
+@Slf4j
+@RequiredArgsConstructor
+public class RemoteTradeOrderAmountServiceImpl implements RemoteTradeOrderAmountService {
+
+    private final KwoTradeOrderService tradeOrderService;
+    private final KwoTradeOrderAmountService tradeOrderAmountService;
+    private final KwoTradeOrderAddressService tradeOrderAddressService;
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public HttpResult updateAddressEntrustAmount(UpdateAddressEntrustAmountParam param) {
+        Long tOrderId = param.getTOrderId();
+        if (Objects.isNull(tOrderId)) {
+            return HttpResult.error("贸易订单id不能为空!");
+        }
+        Long tAddressId = param.getTAddressId();
+        if (Objects.isNull(tAddressId)) {
+            return HttpResult.error("贸易订单地址id不能为空!");
+        }
+        BigDecimal entrustAmount = param.getEntrustAmount();
+        Long updateBy = param.getUpdateBy();
+        String updateByName = param.getUpdateByName();
+        if (Objects.isNull(updateBy) || StringUtils.isBlank(updateByName)) {
+            return HttpResult.error("操作人信息不能为空!");
+        }
+        if (Objects.isNull(entrustAmount)) {
+            return HttpResult.error("任务量不能为空!");
+        }
+        String lockKey = String.format(RedisConstant.TORDER_ADDRESS_UPDATE_ENTRUST_AMOUNT, tAddressId);
+        if (Boolean.FALSE.equals(RedissonUtils.tryLock(lockKey, 5L, 10L))) {
+            return HttpResult.error("业务繁忙,请稍后再试!");
+        }
+        try {
+            KwoTradeOrder order = tradeOrderService.getById(tOrderId);
+            if (Objects.isNull(order)) {
+                return HttpResult.error("订单不存在!");
+            }
+            if (!Objects.equals(order.getStatus(), OrderStatusEnum.EXECUTING.getCode())) {
+                return HttpResult.error("执行中的订单才可物流托运!");
+            }
+            KwoTradeOrderAmount orderAmount = tradeOrderAmountService.getByOrderIdAndTaddressId(tOrderId, tAddressId);
+            if (Objects.isNull(orderAmount)) {
+                return HttpResult.error("地址下分配量信息不存在!");
+            }
+            BigDecimal totalEntrustAmount = Objects.isNull(order.getEntrustAmount()) ?
+                    entrustAmount : entrustAmount.add(order.getEntrustAmount());
+            orderAmount.setEntrustAmount(totalEntrustAmount).setUpdateBy(param.getUpdateBy());
+            tradeOrderAmountService.updateById(orderAmount);
+            //更新mongodb??
+        } finally {
+            RedissonUtils.unlock(lockKey);
+        }
+        return HttpResult.ok();
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public HttpResult updateAddressActualAmount(UpdateAddressActualAmountParam param) {
+        Long tOrderId = param.getTOrderId();
+        if (Objects.isNull(tOrderId)) {
+            return HttpResult.error("贸易订单id不能为空!");
+        }
+        List<AddressActualAmountParam> addressActualAmountParams = param.getAddressActualAmountParams();
+        if (CollUtil.isEmpty(addressActualAmountParams) || addressActualAmountParams.size() != 2) {
+            return HttpResult.error("地址实际成交量参数有误!");
+        }
+        Map<Long, BigDecimal> map = addressActualAmountParams.stream().collect(Collectors.toMap
+                (AddressActualAmountParam::getTAddressId, AddressActualAmountParam::getActualAmount, (k1, k2) -> k1));
+        if (map.size() != 2) {
+            return HttpResult.error("地址实际成交量参数有误!");
+        }
+        Long updateBy = param.getUpdateBy();
+        String updateByName = param.getUpdateByName();
+        if (Objects.isNull(updateBy) || StringUtils.isBlank(updateByName)) {
+            return HttpResult.error("操作人信息不能为空!");
+        }
+        KwoTradeOrder order = tradeOrderService.getById(tOrderId);
+        if (Objects.isNull(order)) {
+            return HttpResult.error("订单不存在!");
+        }
+        if (!Objects.equals(order.getStatus(), OrderStatusEnum.EXECUTING.getCode())) {
+            return HttpResult.error("执行中的订单才可物流托运!");
+        }
+        Map<String, Long> addressTypeMap = tradeOrderAddressService.getByIdsAndTOrderId(map.keySet(), tOrderId);
+        String addressType = Objects.equals(order.getDeliveryType(), DeliveryTypeEnum.ISSUE.getType()) ? OrderAddressTypeEnum.LOAD.getType() : OrderAddressTypeEnum.UNLOAD.getType();
+        Long addressId = addressTypeMap.get(addressType);
+        if (Objects.isNull(addressId)) {
+            return HttpResult.error("未查询到订单交付类型对应的地址实际成交量参数!");
+        }
+        BigDecimal actualAmount = map.get(addressId);
+        if (Objects.isNull(actualAmount)) {
+            return HttpResult.error("地址实际成交量不能为空!");
+        }
+        KwoTradeOrderAmount orderAmount = tradeOrderAmountService.getByOrderIdAndTaddressId(tOrderId, addressId);
+        if (Objects.isNull(orderAmount)) {
+            return HttpResult.error("地址下分配量信息不存在!");
+        }
+        String lockKey = String.format(RedisConstant.TORDER_ADDRESS_UPDATE_ACTUAL_AMOUNT, addressId);
+        if (Boolean.FALSE.equals(RedissonUtils.tryLock(lockKey, 5L, 10L))) {
+            return HttpResult.error("业务繁忙,请稍后再试!");
+        }
+        try {
+            orderAmount.setActualAmount(Objects.isNull(orderAmount.getActualAmount()) ? actualAmount : orderAmount.getActualAmount().add(actualAmount))
+                    .setUpdateBy(param.getUpdateBy());
+            tradeOrderAmountService.updateById(orderAmount);
+            //更新mongodb??
+        } finally {
+            RedissonUtils.unlock(lockKey);
+        }
+        return HttpResult.ok();
+    }
+}

+ 15 - 7
sckw-modules/sckw-order/src/main/java/com/sckw/order/dubbo/TradeOrderInfoServiceImpl.java

@@ -6,6 +6,7 @@ import com.alibaba.fastjson2.JSON;
 import com.google.common.collect.Lists;
 import com.sckw.core.exception.BusinessException;
 import com.sckw.core.model.constant.NumberConstant;
+import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.utils.StringUtils;
 import com.sckw.core.web.response.HttpResult;
@@ -18,6 +19,7 @@ import com.sckw.order.model.KwoTradeOrder;
 import com.sckw.order.model.KwoTradeOrderContract;
 import com.sckw.order.model.KwoTradeOrderGoodsUnit;
 import com.sckw.order.model.KwoTradeOrderTrack;
+import com.sckw.order.model.vo.res.AddressInfoDetailRes;
 import com.sckw.order.serivce.*;
 import com.sckw.redis.constant.RedisConstant;
 import com.sckw.redis.utils.RedissonUtils;
@@ -47,6 +49,8 @@ public class TradeOrderInfoServiceImpl implements TradeOrderInfoService {
     @Autowired
     private KwoTradeOrderService kwoTradeOrderService;
     @Autowired
+    private KwoTradeOrderAddressService tradeOrderAddressService;
+    @Autowired
     private StreamBridge streamBridge;
     @Autowired
     private KwoTradeOrderTrackService kwoTradeOrderTrackService;
@@ -69,6 +73,17 @@ public class TradeOrderInfoServiceImpl implements TradeOrderInfoService {
         return order;
     }
 
+    @Override
+    public OrderAddressDetailRes getOrderDetailByTradeOrderIdAndAddressId(Long tOrderId, Long tAddressId) {
+        //地址信息
+        AddressInfoDetailRes addressInfoDetailRes = tradeOrderAddressService.getByOrderIdAndAddressId(tOrderId, tAddressId);
+        OrderAddressDetailRes orderAddressDetailRes = new OrderAddressDetailRes();
+        if (addressInfoDetailRes != null) {
+            BeanUtils.copyProperties(addressInfoDetailRes, orderAddressDetailRes);
+        }
+        return orderAddressDetailRes;
+    }
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void updateOrderStatus(UpdateOrderStatusParam param) {
@@ -184,14 +199,7 @@ public class TradeOrderInfoServiceImpl implements TradeOrderInfoService {
             for (GoodsLoadingParam goodsLoading : loading) {
                 //差值
                 BigDecimal differenceAmount = goodsLoading.getLoadAmount().subtract(goodsLoading.getAmount());
-//                BigDecimal totalEntrustAmount = Objects.isNull(order.getEntrustAmount()) ? differenceAmount : differenceAmount.add(order.getEntrustAmount());
                 BigDecimal totalEntrustAmount = NumberConstant.ZERO_TWO.compareTo(order.getEntrustAmount()) == 0 ? differenceAmount : differenceAmount.add(order.getEntrustAmount());
-//                BigDecimal totalEntrustAmount = new BigDecimal("0.00");
-//                if (NumberConstant.ZERO_TWO.compareTo(order.getEntrustAmount()) == 0) {
-//                    totalEntrustAmount = differenceAmount;
-//                } else {
-//                    totalEntrustAmount = differenceAmount.add(order.getEntrustAmount());
-//                }
                 if (goodsLoading.getUnit().equals(order.getUnit())) {
                     order.setEntrustAmount(totalEntrustAmount).setUpdateBy(updateBy);
                     kwoTradeOrderService.updateById(order);

+ 10 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/enums/OrderStatusEnum.java

@@ -3,6 +3,11 @@ package com.sckw.order.enums;
 import lombok.AllArgsConstructor;
 import lombok.Getter;
 
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Collectors;
+
 /**
  * @desc: 订单状态枚举
  * @author: yzc
@@ -36,4 +41,9 @@ public enum OrderStatusEnum {
         return null;
     }
 
+    public static List<OrderStatusEnum> getSortList() {
+        OrderStatusEnum[] enums = OrderStatusEnum.values();
+        return Arrays.stream(enums).sorted(Comparator.comparingInt(OrderStatusEnum::getCode)).collect(Collectors.toList());
+    }
+
 }

+ 7 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/KwoTradeOrderAddress.java

@@ -3,6 +3,7 @@ package com.sckw.order.model;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.sckw.core.model.base.BaseModel;
+import lombok.EqualsAndHashCode;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.ToString;
@@ -20,6 +21,7 @@ import java.io.Serializable;
 @Setter
 @ToString
 @Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
 @TableName("kwo_trade_order_address")
 public class KwoTradeOrderAddress extends BaseModel implements Serializable {
 
@@ -93,4 +95,9 @@ public class KwoTradeOrderAddress extends BaseModel implements Serializable {
      */
     private String fence;
 
+    /**
+     * 排序(升序)
+     */
+    private Integer sort;
+
 }

+ 60 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/KwoTradeOrderAmount.java

@@ -0,0 +1,60 @@
+package com.sckw.order.model;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.sckw.core.model.base.BaseModel;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @desc: 交易订单装卸货地址委派及交付量信息
+ * @author: yzc
+ * @date: 2024-03-04 9:31
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@TableName("kwo_trade_order_amount")
+public class KwoTradeOrderAmount extends BaseModel implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = -8603636665614208263L;
+
+    /**
+     * 交易订单id
+     */
+    @JsonProperty("tOrderId")
+    private Long tOrderId;
+
+    /**
+     * 地址id
+     */
+    @JsonProperty("tAddressId")
+    private Long tAddressId;
+
+    /**
+     * 货物数量
+     */
+    private BigDecimal amount;
+
+    /**
+     * 已委托量
+     */
+    private BigDecimal entrustAmount;
+
+    /**
+     * 实际交付量
+     */
+    private BigDecimal actualAmount;
+
+
+}

+ 23 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/LoadAddressDTO.java

@@ -0,0 +1,23 @@
+package com.sckw.order.model.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-14  09:32
+ * @desc: 装货地址信息dto
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class LoadAddressDTO {
+
+    private Long loadAddressId;
+    private String loadName;
+    private String loadCityName;
+    private String loadDetailAddress;
+}

+ 86 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/OperatorTOrderListStsConditionDTO.java

@@ -0,0 +1,86 @@
+package com.sckw.order.model.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @desc: 运营端贸易订单列表统计查询条件dto
+ * @author: yzc
+ * @date: 2023-09-14 11:33
+ */
+@Getter
+@Setter
+@ToString
+public class OperatorTOrderListStsConditionDTO implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 1352493248166762988L;
+
+
+    /**
+     * 订单编号、单位、商品名称(模糊匹配共用)
+     */
+    private String keywords;
+    /**
+     * 创建时间开始(yyyy-MM-dd HH:mm:ss)
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date startCreateTime;
+
+    /**
+     * 创建时间结束(yyyy-MM-dd HH:mm:ss)
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date endCreateTime;
+
+    /**
+     * 装货地址code
+     */
+    private String shippingAddressCode;
+
+    /**
+     * 装货地址等级
+     */
+    private Integer shippingAddressLevel;
+
+    /**
+     * 装货地址code
+     */
+    private String unloadingAddressCode;
+
+    /**
+     * 卸货地址等级
+     */
+    private Integer unloadingAddressLevel;
+
+    /**
+     * 交易方式(预付款、货到付款)
+     */
+    private String trading;
+
+    /**
+     * 提货方式(采方自提、供应配送)
+     */
+    private String pickupType;
+
+    /**
+     * 交付类型(签发交付、签收交付)
+     */
+    private String deliveryType;
+
+    /**
+     * 下单方式(1采购下单/2代客下单)
+     */
+    private String source;
+
+    /**
+     * 订单状态
+     */
+    private Integer status;
+
+}

+ 155 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/OrderListResDTO.java

@@ -0,0 +1,155 @@
+package com.sckw.order.model.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @desc: 订单列表响应参数
+ * @author: yzc
+ * @date: 2023-07-12 17:45
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class OrderListResDTO {
+
+    /**
+     * 订单id
+     */
+    @JsonProperty("tOrderId")
+    private Long tOrderId;
+    /**
+     * 订单状态
+     */
+    private Integer status;
+    /**
+     * 订单编号
+     */
+    @JsonProperty("tOrderNo")
+    private String tOrderNo;
+    /**
+     * 采购企业主键ID
+     */
+    private Long procureEntId;
+
+    /**
+     * 采购单位
+     */
+    private String procureFirmName;
+
+    /**
+     * 销售单位主键ID
+     */
+    private Long supplyEntId;
+    /**
+     * 销售单位
+     */
+    private String supplyFirmName;
+    /**
+     * 交易方式(预付款、货到付款)
+     */
+    private String trading;
+
+    /**
+     * 交付类型(签发交付、签收交付)
+     */
+    private String deliveryType;
+
+    /**
+     * 提货方式(采方自提、供应配送)
+     */
+    private String pickupType;
+
+    /**
+     * 下单方式(自主下单/代客下单)
+     */
+    private String source;
+
+    /**
+     * 合同主键
+     */
+    private Long contractId;
+
+    /**
+     * 合同编号
+     */
+    private String contractNo;
+
+    /**
+     * 商品id
+     */
+    private Long goodsId;
+
+    /**
+     * 订单成交单价
+     */
+    private BigDecimal unitPrice;
+    /**
+     * 订单金额
+     */
+    private BigDecimal price;
+
+    /**
+     * 订单总量
+     */
+    private BigDecimal amount;
+    /**
+     * 已委托量
+     */
+    private BigDecimal entrustAmount;
+
+    /**
+     * 实际交付量
+     */
+    private BigDecimal actualAmount;
+
+    /**
+     * 计划开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDate startTime;
+    /**
+     * 计划结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDate endTime;
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 单位
+     */
+    private String unit;
+
+    /**
+     * 创建人id
+     */
+    private Long createBy;
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 装货地址信息
+     */
+    private List<LoadAddressDTO> loadAddresses;
+
+    /**
+     * 卸货地址信息
+     */
+    private List<UnloadAddressDTO> unloadAddresses;
+}

+ 50 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/OrderStsInfoDTO.java

@@ -0,0 +1,50 @@
+package com.sckw.order.model.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-18  11:12
+ * @desc: 订单统计信息查询dto
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class OrderStsInfoDTO implements Serializable {
+    @Serial
+    private static final long serialVersionUID = -6956677587145390841L;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 订单类型(1采购订单、2销售订单)
+     */
+    private Integer orderType;
+
+    /**
+     * 商品单位
+     */
+    private String unit;
+
+    /**
+     * 创建时间开始(yyyy-MM-dd HH:mm:ss)
+     */
+    private Date startCreateTime;
+
+    /**
+     * 创建时间结束(yyyy-MM-dd HH:mm:ss)
+     */
+    private Date endCreateTime;
+
+}

+ 35 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/TradeOrderAppStatisticParamDTO.java

@@ -0,0 +1,35 @@
+package com.sckw.order.model.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-15  08:57
+ * @desc: app主界面贸易订单统计请求参数DTO
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class TradeOrderAppStatisticParamDTO {
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 订单类型(1采购订单、2销售订单)
+     */
+    private Integer orderType;
+
+    /**
+     * 是否主账号(0是/1否)
+     */
+    private Integer isMain;
+
+
+}

+ 25 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/TradeOrderContractParamDTO.java

@@ -0,0 +1,25 @@
+package com.sckw.order.model.dto;
+
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+/**
+ * @desc: 合同关联订单列表请求参数dto
+ * @author: yzc
+ * @date: 2023-07-27 16:48
+ */
+@Getter
+@Setter
+@ToString
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class TradeOrderContractParamDTO {
+
+    private Long entId;
+
+    private Integer orderType;
+
+}

+ 105 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/TradeOrderListSelectDTO.java

@@ -0,0 +1,105 @@
+package com.sckw.order.model.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-06  15:14
+ * @desc: 贸易订单列表查询dto对象
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class TradeOrderListSelectDTO {
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 是否主账号(0是/1否)
+     */
+    private Integer isMain;
+
+    /**
+     * 订单类型(1采购订单、2销售订单)
+     */
+    private Integer orderType;
+    /**
+     * 订单编号、单位、商品名称(模糊匹配共用)
+     */
+    private String keywords;
+
+    /**
+     * 商品名称(模糊匹配查出的商品id)
+     */
+    private List<Long> goodIds;
+
+    /**
+     * 创建时间开始(yyyy-MM-dd HH:mm:ss)
+     */
+    private Date startCreateTime;
+
+    /**
+     * 创建时间结束(yyyy-MM-dd HH:mm:ss)
+     */
+    private Date endCreateTime;
+
+    /**
+     * 装货地址code
+     */
+    private String loadAddressCode;
+
+    /**
+     * 装货地址code
+     */
+    private String loadAddressLevel;
+
+    /**
+     * 卸货地址code
+     */
+    private String unloadAddressCode;
+
+    /**
+     * 卸货地址code
+     */
+    private String unloadAddressLevel;
+
+    /**
+     * 交易方式(预付款、货到付款)
+     */
+    private String trading;
+
+    /**
+     * 提货方式(采方自提、供应配送)
+     */
+    private String pickupType;
+
+    /**
+     * 交付类型(签发交付、签收交付)
+     */
+    private String deliveryType;
+
+    /**
+     * 下单方式(1采购下单/2代客下单)
+     */
+    private String source;
+
+    /**
+     * 订单状态
+     */
+    private Integer status;
+}

+ 55 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/TradeOrderStatementListParamDTO.java

@@ -0,0 +1,55 @@
+package com.sckw.order.model.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.time.LocalDate;
+
+/**
+ * @desc: 贸易订单对账单列表请求参数DTO
+ * @author: yzc
+ * @date: 2023-07-20 14:43
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+public class TradeOrderStatementListParamDTO {
+
+    /**
+     * 订单类型(1采购订单2销售订单)
+     */
+    private Integer orderType;
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 采购单位id
+     */
+    private Long procureEntId;
+
+    /**
+     * 计划开始时间(yyyy-MM-dd)
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDate startTime;
+
+    /**
+     * 计划结束时间(yyyy-MM-dd)
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDate endTime;
+
+    /**
+     * 交易方式(预付款、货到付款)
+     */
+    private String trading;
+
+}

+ 24 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/UnloadAddressDTO.java

@@ -0,0 +1,24 @@
+package com.sckw.order.model.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-14  09:32
+ * @desc: 卸货地址信息dto
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class UnloadAddressDTO {
+
+    private Long unloadAddressId;
+    private String unloadName;
+    private String unloadCityName;
+    private String unloadDetailAddress;
+
+}

+ 47 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/WorkbenchOrderStsDTO.java

@@ -0,0 +1,47 @@
+package com.sckw.order.model.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @desc: 工作台订单统计dto
+ * @author: yzc
+ * @date: 2023-09-11 17:45
+ */
+@Getter
+@Setter
+@ToString
+@Accessors(chain = true)
+public class WorkbenchOrderStsDTO implements Serializable {
+
+    public WorkbenchOrderStsDTO() {
+        this.orderAmount = BigDecimal.ZERO.doubleValue();
+        this.orderPrice = BigDecimal.ZERO.doubleValue();
+        this.orderActualAmount = BigDecimal.ZERO.doubleValue();
+    }
+
+    @Serial
+    private static final long serialVersionUID = -925557546832266552L;
+
+    /**
+     * 订单总量
+     */
+    private Double orderAmount;
+
+    /**
+     * 订单总金额
+     */
+    private Double orderPrice;
+
+    /**
+     * 订单总实际成交量
+     */
+    private Double orderActualAmount;
+
+}

+ 56 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/dto/WorkbenchPurchaseDTO.java

@@ -0,0 +1,56 @@
+package com.sckw.order.model.dto;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author: yzc
+ * @date: 2024-03-18  09:56
+ * @desc: 工作台采购订单列表DTO
+ */
+@Getter
+@Setter
+@ToString
+public class WorkbenchPurchaseDTO implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 2058696103492482712L;
+
+    /**
+     * 订单主键
+     */
+    @JsonProperty("tOrderId")
+    private Long tOrderId;
+
+    /**
+     * 订单成交数量
+     */
+    private BigDecimal amount;
+
+    /**
+     * 订单单位(吨、方、箱、件)
+     */
+    private String unit;
+
+    /**
+     * 商品id
+     */
+    private Long goodsId;
+
+    /**
+     * 采购企业名称
+     */
+    private String procureFirmName;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+}

+ 13 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/AcceptanceOrderParam.java

@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import jakarta.validation.Valid;
 import jakarta.validation.constraints.DecimalMin;
 import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotEmpty;
 import jakarta.validation.constraints.NotNull;
 import lombok.Getter;
 import lombok.Setter;
@@ -11,6 +12,7 @@ import lombok.ToString;
 
 import java.math.BigDecimal;
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @desc: 受理订单请求参数
@@ -54,6 +56,17 @@ public class AcceptanceOrderParam {
     @NotBlank(message = "交付类型不能为空")
     private String deliveryType;
 
+    @NotNull(message = "我方联系人信息不能为空")
+    private UpdateUnitParam saleUnitParam;
+
+    @NotEmpty(message = "卸货信息不能为空")
+    @Valid
+    private List<UpdateAddressAmountParam> addressAmountParams;
+
+    @NotEmpty(message = "装货信息不能为空")
+    @Valid
+    private List<AddressInfo> addressInfo;
+
     @NotNull(message = "合同信息不能为空")
     @Valid
     private ContractInfo contractInfo;

+ 17 - 2
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/AddressInfo.java

@@ -1,5 +1,6 @@
 package com.sckw.order.model.vo.req;
 
+import jakarta.validation.constraints.DecimalMin;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
 import jakarta.validation.constraints.Pattern;
@@ -8,6 +9,8 @@ import lombok.Setter;
 import lombok.ToString;
 import org.hibernate.validator.constraints.Range;
 
+import java.math.BigDecimal;
+
 /**
  * @desc: 地址信息
  * @author: yzc
@@ -21,7 +24,7 @@ public class AddressInfo {
     /**
      * 地址类型(1装货地址、2卸货地址)
      */
-    @NotNull(message = "地址类型不能为空")
+    @NotBlank(message = "地址类型不能为空")
     @Range(min = 1, max = 2, message ="非法地址类型")
     private String addressType;
 
@@ -34,7 +37,7 @@ public class AddressInfo {
     /**
      * 地址类型
      */
-    @NotNull(message = "地址类型不能为空")
+    @NotBlank(message = "地址类型不能为空")
     private String type;
 
     /**
@@ -84,4 +87,16 @@ public class AddressInfo {
      * 电子围栏
      */
     private String fence;
+
+    /**
+     * 货物数量
+     */
+    @NotNull(message = "货物数量不能为空")
+    @DecimalMin(value = "0.00",message = "分配量必须大于零")
+    private BigDecimal amount;
+
+    /**
+     * 地址排序
+     */
+    private Integer sort;
 }

+ 24 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/OperatorTOrderContractParam.java

@@ -0,0 +1,24 @@
+package com.sckw.order.model.vo.req;
+
+import com.sckw.core.model.page.PageRequest;
+import jakarta.validation.constraints.NotBlank;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+/**
+ * @desc: 合同关联订单列表请求参数
+ * @author: yzc
+ * @date: 2023-07-27 16:48
+ */
+@Getter
+@Setter
+@ToString
+@EqualsAndHashCode(callSuper = true)
+public class OperatorTOrderContractParam extends PageRequest {
+
+    @NotBlank(message = "合同ids不能为空")
+    private String contractIds;
+
+}

+ 35 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/OperatorTOrderExportQueryVO.java

@@ -0,0 +1,35 @@
+package com.sckw.order.model.vo.req;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import org.hibernate.validator.constraints.Range;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @desc: 运营端贸易订单列表导出查询参数vo
+ * @author: yzc
+ * @date: 2023-09-14 11:33
+ */
+@Getter
+@Setter
+@ToString
+public class OperatorTOrderExportQueryVO extends OperatorTOrderStsQueryVO implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 3904961009951552659L;
+
+    /**
+     * 订单状态
+     */
+    @Range(min = 1, max = 7, message = "非法订单状态")
+    private Integer status;
+
+    /**
+     * 订单ids
+     */
+    private String ids;
+
+}

+ 39 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/OperatorTOrderListQueryVO.java

@@ -0,0 +1,39 @@
+package com.sckw.order.model.vo.req;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import org.hibernate.validator.constraints.Range;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @desc: 运营端贸易订单列表分页查询参数vo
+ * @author: yzc
+ * @date: 2023-09-14 11:33
+ */
+@Getter
+@Setter
+@ToString
+public class OperatorTOrderListQueryVO extends OperatorTOrderStsQueryVO implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 3904961009951552659L;
+
+    /**
+     * 当前页码
+     */
+    private int page = 1;
+    /**
+     * 每页数量
+     */
+    private int pageSize = 10;
+
+    /**
+     * 订单状态
+     */
+    @Range(min = 1, max = 7, message = "非法订单状态")
+    private Integer status;
+
+}

+ 81 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/OperatorTOrderStsQueryVO.java

@@ -0,0 +1,81 @@
+package com.sckw.order.model.vo.req;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @desc: 运营端贸易订单统计查询参数vo
+ * @author: yzc
+ * @date: 2023-09-14 11:33
+ */
+@Getter
+@Setter
+@ToString
+public class OperatorTOrderStsQueryVO implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 1352493248166762988L;
+
+
+    /**
+     * 订单编号、单位、商品名称(模糊匹配共用)
+     */
+    private String keywords;
+    /**
+     * 创建时间开始(yyyy-MM-dd HH:mm:ss)
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date startCreateTime;
+
+    /**
+     * 创建时间结束(yyyy-MM-dd HH:mm:ss)
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date endCreateTime;
+
+    /**
+     * 装货地址code
+     */
+    private String shippingAddressCode;
+
+    /**
+     * 装货地址等级
+     */
+    private Integer shippingAddressLevel;
+
+    /**
+     * 装货地址code
+     */
+    private String unloadingAddressCode;
+
+    /**
+     * 卸货地址等级
+     */
+    private Integer unloadingAddressLevel;
+
+    /**
+     * 交易方式(预付款、货到付款)
+     */
+    private String trading;
+
+    /**
+     * 提货方式(采方自提、供应配送)
+     */
+    private String pickupType;
+
+    /**
+     * 交付类型(签发交付、签收交付)
+     */
+    private String deliveryType;
+
+    /**
+     * 下单方式(1采购下单/2代客下单)
+     */
+    private String source;
+
+}

+ 3 - 3
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/PurchaseOrderDraftParam.java

@@ -2,7 +2,7 @@ package com.sckw.order.model.vo.req;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.sckw.core.model.constant.NumberConstant;
-import jakarta.validation.constraints.*;
+import jakarta.validation.constraints.Size;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.ToString;
@@ -21,10 +21,11 @@ import java.util.List;
 @Setter
 @ToString
 public class PurchaseOrderDraftParam {
-    public PurchaseOrderDraftParam(){
+    public PurchaseOrderDraftParam() {
         this.amount = NumberConstant.ZERO_TWO;
         this.price = NumberConstant.ZERO_TWO;
     }
+
     /**
      * 商品信息
      */
@@ -47,7 +48,6 @@ public class PurchaseOrderDraftParam {
     /**
      * 地址信息
      */
-    @Size(max = 2, message = "地址信息最多有两条")
     private List<AddressInfo> addressInfo;
     /**
      * 开始时间

+ 0 - 1
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/PurchaseOrderParam.java

@@ -53,7 +53,6 @@ public class PurchaseOrderParam {
      * 地址信息
      */
     @NotEmpty(message = "地址信息不能为空")
-    @Size(min = 2, max = 2, message = "装货或卸货地址信息缺失")
     @Valid
     private List<AddressInfo> addressInfo;
     /**

+ 25 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/TradeOrderAppStatisticParam.java

@@ -0,0 +1,25 @@
+package com.sckw.order.model.vo.req;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import org.hibernate.validator.constraints.Range;
+
+/**
+ * @desc: 贸易订单app统计
+ * @author: yzc
+ * @date: 2023-08-21 17:21
+ */
+@Getter
+@Setter
+@ToString
+public class TradeOrderAppStatisticParam {
+
+    /**
+     * 订单类型(2销售订单、1采购订单)
+     */
+    @Range(min = 1, max = 2, message = "非法订单类型")
+    @NotNull(message = "订单类型不能为空")
+    private Integer orderType;
+}

Някои файлове не бяха показани, защото твърде много файлове са промени