Procházet zdrojové kódy

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

xucaiqin před 2 roky
rodič
revize
70bb902ce9
64 změnil soubory, kde provedl 762 přidání a 408 odebrání
  1. 1 1
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/enums/FileDisposeLayoutEnum.java
  2. 30 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/EntTypeEnum.java
  3. 20 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/vo/FileInfoEncryptVO.java
  4. 3 3
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/RegularUtils.java
  5. 5 0
      sckw-modules-api/sckw-product-api/src/main/java/com/sckw/product/api/model/GoodsDetail.java
  6. 9 0
      sckw-modules-api/sckw-system-api/src/main/java/com/sckw/system/api/RemoteSystemService.java
  7. 8 0
      sckw-modules-api/sckw-system-api/src/main/java/com/sckw/system/api/RemoteUserService.java
  8. 10 1
      sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/TransportService.java
  9. 9 1
      sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/TransportStatisticsService.java
  10. 51 0
      sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/model/vo/RTruckMonitorVo.java
  11. 1 1
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/model/vo/req/LogisticsBaseInfoReqVo.java
  12. 1 1
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/model/vo/req/TradeBaseInfoReqVo.java
  13. 2 2
      sckw-modules/sckw-contract/src/main/java/com/sckw/contract/service/CommonBusinessService.java
  14. 1 1
      sckw-modules/sckw-contract/src/main/resources/mapper/KwcContractLogisticsMapper.xml
  15. 14 1
      sckw-modules/sckw-file/src/main/java/com/sckw/file/controller/FileApiController.java
  16. 41 0
      sckw-modules/sckw-file/src/main/java/com/sckw/file/model/param/FileImageParam.java
  17. 52 7
      sckw-modules/sckw-file/src/main/java/com/sckw/file/service/FileService.java
  18. 14 1
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTruckMonitorVo.java
  19. 5 6
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfDriverService.java
  20. 32 11
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckService.java
  21. 1 1
      sckw-modules/sckw-fleet/src/main/resources/mapper/KwfTruckMapper.xml
  22. 5 0
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/model/vo/req/AddressQueryReqVo.java
  23. 17 2
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmAddressService.java
  24. 5 12
      sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateManageService.java
  25. 20 22
      sckw-modules/sckw-manage/src/main/resources/mapper/KwmCooperateMapper.xml
  26. 6 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/res/TransportDemandDetailRes.java
  27. 6 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/res/WantBuyDetailRes.java
  28. 2 2
      sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwoTradeOrderService.java
  29. 4 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwoTransportDemandService.java
  30. 4 0
      sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwpWantBuyService.java
  31. 2 2
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpLedgerLogisticsService.java
  32. 2 2
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementWalletService.java
  33. 2 2
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/operate/LedgerLogisticsService.java
  34. 2 2
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/operate/SettlementWalletService.java
  35. 5 0
      sckw-modules/sckw-product/src/main/java/com/sckw/product/model/vo/res/GoodsDetail.java
  36. 5 0
      sckw-modules/sckw-product/src/main/java/com/sckw/product/model/vo/res/OperationGoodsDetail.java
  37. 4 0
      sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java
  38. 7 0
      sckw-modules/sckw-system/src/main/java/com/sckw/system/controller/KwsMenuController.java
  39. 3 0
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/SysAreaDao.java
  40. 34 0
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteSystemServiceImpl.java
  41. 20 0
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteUserServiceImpl.java
  42. 1 1
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java
  43. 23 4
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsMenuService.java
  44. 3 3
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserService.java
  45. 0 3
      sckw-modules/sckw-system/src/main/resources/mapper/KwsEntTypeDao.xml
  46. 3 0
      sckw-modules/sckw-system/src/main/resources/mapper/KwsEnterpriseDao.xml
  47. 2 2
      sckw-modules/sckw-system/src/main/resources/mapper/KwsUserDao.xml
  48. 7 0
      sckw-modules/sckw-system/src/main/resources/mapper/SysAreaDao.xml
  49. 1 1
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dao/KwtLogisticsOrderMapper.java
  50. 61 3
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dubbo/TransportServiceImpl.java
  51. 22 1
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dubbo/TransportStatisticsServiceImpl.java
  52. 3 3
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/AddOrderDTO.java
  53. 2 2
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/OperateSendCarDto.java
  54. 2 2
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/OperateWaybillDto.java
  55. 2 2
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/WaybillOrderTicketDto.java
  56. 4 4
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/WaybillOrderTicketV1Dto.java
  57. 1 1
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/ConsignOrderExcelVo.java
  58. 135 284
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/ManagementLogisticsOrderExcelVo.java
  59. 1 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/ConsignOrderService.java
  60. 1 4
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtWaybillOrderService.java
  61. 1 1
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/TransportCommonService.java
  62. 1 1
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/WaybillManagementService.java
  63. 12 1
      sckw-modules/sckw-transport/src/main/resources/mapper/KwtLogisticsOrderMapper.xml
  64. 9 1
      sckw-modules/sckw-transport/src/main/resources/mapper/KwtWaybillOrderMapper.xml

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

@@ -25,7 +25,7 @@ public enum FileDisposeLayoutEnum {
     /**
      * oss按照比例缩放
      */
-    OSS_LESSEN(FileEnum.FILE_STORE_TYPE_OSS.getFileType(), "?x-oss-process=image/resize,p_12", "按百分比缩放"),
+    OSS_LESSEN(FileEnum.FILE_STORE_TYPE_OSS.getFileType(), "?x-oss-process=image/resize,p_", "按百分比缩放"),
     /**
      * 七牛云缩略图
      */

+ 30 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/enums/EntTypeEnum.java

@@ -1,6 +1,7 @@
 package com.sckw.core.model.enums;
 
 import com.sckw.core.model.constant.Global;
+import com.sckw.core.utils.StringUtils;
 import lombok.Getter;
 
 import java.util.ArrayList;
@@ -51,4 +52,33 @@ public enum EntTypeEnum {
         }
         return String.join(Global.COMMA, entNames);
     }
+
+    /**
+     * @param entTypes 企业属性
+     * @desc 校验企业是否为托运单位(供应商、采购商、4P物流)
+     * @author zk
+     * @date 2023/10/7
+     **/
+    public static Boolean check(String entTypes) {
+        if (StringUtils.isBlank(entTypes)) {
+            return null;
+        }
+        return entTypes.contains(String.valueOf(EntTypeEnum.SUPPLIER.getCode()))
+                || entTypes.contains(String.valueOf(EntTypeEnum.PURCHASER.getCode()))
+                || entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS3.getCode()));
+    }
+
+    /**
+     * @param entTypes 企业属性
+     * @desc 校验企业是否为承运单位(4P物流、3P物流)
+     * @author zk
+     * @date 2023/10/7
+     **/
+    public static Boolean carrier(String entTypes) {
+        if (StringUtils.isBlank(entTypes)) {
+            return null;
+        }
+        return entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS3.getCode()))
+                || entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS4.getCode()));
+    }
 }

+ 20 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/vo/FileInfoEncryptVO.java

@@ -0,0 +1,20 @@
+package com.sckw.core.model.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author lfdc
+ * @description 文件上传返回vo
+ * @date 2023-07-04 09:07:08
+ */
+@Data
+public class FileInfoEncryptVO implements Serializable {
+
+    /**
+     * 文件加密key
+     */
+    private String fileMd5;
+
+}

+ 3 - 3
sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/RegularUtils.java

@@ -53,8 +53,8 @@ public class RegularUtils {
     /**
      * 身份证
      */
-    public static final String IDCARD = "(^\\d{18}$)|(^\\d{15}$)";
-    /**
+    public static final String IDCARD = "[0-9A-Za-z]{15}|[0-9A-Za-z]{18}";
+    /**[0-9A-Za-z]{18}
      * 车牌号
      */
 //    public static final String TRUCK_NUMBER = "^[京津沪冀晋辽吉黑苏浙皖闽赣鲁豫鄂湘粤桂琼川黔云渝藏陕陇青宁新闽粤晋琼使领A_Z]{1}[A_Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$";
@@ -144,6 +144,6 @@ public class RegularUtils {
 
 
     public static void main(String[] args) {
-        System.out.println(matchs("\\d{1,8}([\\.]\\d{0,2})?", new BigDecimal("99999999.00").toString()));
+        System.out.println(matchs(IDCARD, "22883719241229935X"));
     }
 }

+ 5 - 0
sckw-modules-api/sckw-product-api/src/main/java/com/sckw/product/api/model/GoodsDetail.java

@@ -65,6 +65,11 @@ public class GoodsDetail implements Serializable {
      */
     private String goodsType;
 
+    /**
+     * 商品类型集合
+     */
+    private List<String> goodsTypes;
+
     /**
      * 商品类型lab
      */

+ 9 - 0
sckw-modules-api/sckw-system-api/src/main/java/com/sckw/system/api/RemoteSystemService.java

@@ -76,6 +76,15 @@ public interface RemoteSystemService {
      */
     List<SysDictResDto> queryDictBottom(String type, String value);
 
+    /**
+     * @param type 字典类型 value key
+     * @return SysDictResDto
+     * @desc: 根据字典类型和key的数据
+     * @author: czh
+     * @date: 2023/7/7
+     */
+    List<SysDictResDto> queryDictFrontAll(String type, String value);
+
     /**
      * @param type 字典类型,value key
      * @return SysDictGroupResDto

+ 8 - 0
sckw-modules-api/sckw-system-api/src/main/java/com/sckw/system/api/RemoteUserService.java

@@ -211,4 +211,12 @@ public interface RemoteUserService {
      * @date: 2023/9/20
      */
     List<FindEntUserResDto> findEntUser(Long entId);
+
+    /**
+     * @param code 区域code
+     * @desc: 查某区域下的所有区域
+     * @author: czh
+     * @date: 2023/10/8
+     */
+    List<AreaTreeFrontResDto> findAllArea(Integer code);
 }

+ 10 - 1
sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/TransportDubboService.java → sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/dubbo/TransportService.java

@@ -8,6 +8,7 @@ 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;
@@ -20,7 +21,7 @@ import java.util.Map;
  * @company sckw
  * @date 2023-07-17 10:06:27
  */
-public interface TransportDubboService {
+public interface TransportService {
 
     /**
      * 根据id 获取主表详情
@@ -115,4 +116,12 @@ public interface TransportDubboService {
      * @date 2023/9/6
      **/
     List<RWaybillOrderVo> findWaybillOrder(RWaybillOrderDto params);
+
+    /**
+     * @param checkEntId 托运企业ID
+     * @desc 查询托运方关联任务中的车辆
+     * @author zk
+     * @date 2023/10/8
+     **/
+    List<RTruckMonitorVo> truckInTask(Long checkEntId);
 }

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

@@ -10,13 +10,21 @@ package com.sckw.transport.api.dubbo;
  */
 public interface TransportStatisticsService {
     /**
-     * 统计承运
+     * 统计承运
      *
      * @param topEntId
      * @return
      */
     Integer statisticsLogistics(Long topEntId);
 
+    /**
+     * 统计托运订单
+     *
+     * @param topEntId
+     * @return
+     */
+    Integer statisticsLogisticsByConsign(Long topEntId);
+
     /**
      * 统计调度派车
      *

+ 51 - 0
sckw-modules-api/sckw-transport-api/src/main/java/com/sckw/transport/api/model/vo/RTruckMonitorVo.java

@@ -0,0 +1,51 @@
+package com.sckw.transport.api.model.vo;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * desc 车辆监控
+ * author zk
+ * date 2023/9/5 0005
+ */
+@Data
+public class RTruckMonitorVo implements Serializable {
+    @Serial
+    private static final long serialVersionUID = -7951209824419412406L;
+
+    /**
+     *企业id
+     */
+    private Long entId;
+
+    /**
+     *企业名称
+     */
+    private String firmName;
+
+    /**
+     *车牌号
+     */
+    private String truckNo;
+
+    /**
+     *业务状态(0空闲、1任务中)
+     */
+    private Integer businessStatus;
+
+    /**
+     *运行状态(0行驶、1停止、2离线)
+     */
+    private Integer runStatus;
+
+    public RTruckMonitorVo() {
+    }
+
+    public RTruckMonitorVo(Long entId, String truckNo, Integer businessStatus) {
+        this.entId = entId;
+        this.truckNo = truckNo;
+        this.businessStatus = businessStatus;
+    }
+}

+ 1 - 1
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/model/vo/req/LogisticsBaseInfoReqVo.java

@@ -40,7 +40,7 @@ public class LogisticsBaseInfoReqVo implements Serializable {
     /**
      * 计费方式(1按装货量、2按卸货量、3按车次)
      */
-    @NotNull(message = "计费方式不能为空")
+//    @NotNull(message = "计费方式不能为空")
     private Integer charging;
 
     /**

+ 1 - 1
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/model/vo/req/TradeBaseInfoReqVo.java

@@ -37,7 +37,7 @@ public class TradeBaseInfoReqVo implements Serializable {
     /**
      * 付款方式 1预付款、2货到付款
      */
-    @NotNull(message = "付款方式不能为空")
+//    @NotNull(message = "付款方式不能为空")
     private Integer trading;
 
     /**

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

@@ -27,7 +27,7 @@ import com.sckw.order.api.model.ContractSignCompletedParam;
 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.TransportDubboService;
+import com.sckw.transport.api.dubbo.TransportService;
 import com.sckw.transport.api.model.param.ContractSignLogisticsParam;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
@@ -58,7 +58,7 @@ public class CommonBusinessService {
     private TradeOrderInfoService tradeOrderInfoService;
 
     @DubboReference(version = "1.0.0", group = "design", check = false)
-    private TransportDubboService transportDubboService;
+    private TransportService transportDubboService;
 
     @Autowired
     private KwcContractTradeMapper kwcContractTradeMapper;

+ 1 - 1
sckw-modules/sckw-contract/src/main/resources/mapper/KwcContractLogisticsMapper.xml

@@ -107,7 +107,7 @@
                e.firm_name carrierEntName,
                a.performed_amount performedAmount,
                a.contract_pid contractPid,
-               f.name contractPname,
+               f.name contractPname
           from kwc_contract_logistics a
           left join kwc_contract_logistics_unit b on a.id = b.contract_id and b.del_flag = 0 and b.unit_type = 3
           left join kwc_contract_logistics_unit e on a.id = e.contract_id and e.del_flag = 0 and e.unit_type = 4

+ 14 - 1
sckw-modules/sckw-file/src/main/java/com/sckw/file/controller/FileApiController.java

@@ -1,15 +1,18 @@
 package com.sckw.file.controller;
 
+import com.sckw.core.annotation.RepeatSubmit;
 import com.sckw.core.model.file.FileInfo;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.response.HttpResult;
 import com.sckw.core.web.response.result.Status;
 import com.sckw.file.api.dto.FileInfoDTO;
 import com.sckw.file.dubbo.FileDubboApiServiceImpl;
+import com.sckw.file.model.param.FileImageParam;
 import com.sckw.file.service.FileService;
 import io.seata.spring.annotation.GlobalTransactional;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.Valid;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
 import lombok.AllArgsConstructor;
@@ -155,7 +158,7 @@ public class FileApiController {
      * @param file
      * @return
      */
-    @RequestMapping(value = "/uploadFileEncrypt", method = RequestMethod.POST)
+    @RequestMapping(value = "/uploadFileEncrypt", method = RequestMethod.POST,produces = "application/json")
     public HttpResult uploadFileEncrypt(@NotNull @RequestParam("file") MultipartFile file) {
         try {
             return fileService.uploadFileEncrypt(file);
@@ -181,6 +184,16 @@ public class FileApiController {
         }
     }
 
+    @RepeatSubmit(interval = 3000,message ="两次请求间隔未超过3秒")
+    @RequestMapping(name = "通过key获取地址",value = "/getImage",method = RequestMethod.POST)
+    public HttpResult getImage(@RequestBody @Valid FileImageParam fileImageParam){
+        try {
+            return fileService.getImage(fileImageParam);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
     /**
      * dubbo接收文件信息保存至数据库
      *

+ 41 - 0
sckw-modules/sckw-file/src/main/java/com/sckw/file/model/param/FileImageParam.java

@@ -0,0 +1,41 @@
+package com.sckw.file.model.param;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+/**
+ * @author lfdc
+ * @description 文件查询图片数据
+ * @date 2023-10-08 09:10:00
+ */
+@Data
+public class FileImageParam {
+
+    /**
+     * 文件key
+     */
+    @NotBlank(message = "文件key不能为空")
+    private String fileKey;
+
+    /**
+     * 指定目标缩放图的宽度
+     */
+    private String fileWidth;
+
+    /**
+     * 指定目标缩放图的高度
+     */
+    private String fileHeight;
+
+    /**
+     * 是否缩放展示
+     */
+    @NotNull(message = "是否缩放展示不能为空")
+    private boolean isLessen;
+
+    /**
+     * 缩放比例
+     */
+    private String lessenRatio;
+}

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

@@ -2,11 +2,13 @@ package com.sckw.file.service;
 
 
 import com.aliyun.oss.model.OSSObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.sckw.core.common.enums.NumberConstant;
 import com.sckw.core.common.enums.StringConstant;
 import com.sckw.core.common.enums.enums.FileDisposeLayoutEnum;
 import com.sckw.core.common.enums.enums.FileEnum;
 import com.sckw.core.model.file.FileInfo;
+import com.sckw.core.model.vo.FileInfoEncryptVO;
 import com.sckw.core.model.vo.FileInfoVO;
 import com.sckw.core.utils.FileUtils;
 import com.sckw.core.utils.IdWorker;
@@ -21,6 +23,7 @@ import com.sckw.file.dao.KwsFileEncryptDao;
 import com.sckw.file.dao.KwsFileInfoDao;
 import com.sckw.file.model.kwfFileEncrypt;
 import com.sckw.file.model.kwfFileInfo;
+import com.sckw.file.model.param.FileImageParam;
 import jakarta.servlet.http.HttpServletRequest;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.extern.slf4j.Slf4j;
@@ -57,6 +60,8 @@ import java.util.zip.ZipOutputStream;
 @Service
 public class FileService {
 
+    final static String IMG_FORMAT = "png_jpg_bmp_gif_tif_jpeg_PNG_JPG_BMP_GIF_TIF_JPEG_HEIC_heic";
+
     @Autowired
     KwsFileInfoDao fileInfoDao;
 
@@ -254,7 +259,7 @@ public class FileService {
         return null;
     }
 
-    public HttpResult uploadFileInfo(MultipartFile file){
+    public HttpResult uploadFileInfo(MultipartFile file) {
         boolean flag = checkFileFormat(file);
         if (!flag) {
             throw new RuntimeException("上传文件格式错误!");
@@ -349,10 +354,10 @@ public class FileService {
         insertFile(returnFileInfo, isImage);
         /**存储到加密属性文件信息*/
         String fileMd5 = returnFileInfo.getFileMd5();
-        String filePath = returnFileInfo.getFilePath();
-        FileInfoVO vo = new FileInfoVO();
+//        String filePath = returnFileInfo.getFilePath();
+        FileInfoEncryptVO vo = new FileInfoEncryptVO();
         vo.setFileMd5(fileMd5);
-        vo.setFilePath(filePath);
+//        vo.setFilePath(filePath);
 //        insertFileEncrypt(fileMd5, filePath, FileEnum.FILE_STORE_TYPE_OSS, isImage);
         return HttpResult.ok(vo);
     }
@@ -403,11 +408,51 @@ public class FileService {
         insertFile(returnFileInfo, isImage);
         /**存储到加密属性文件信息*/
         String fileMd5 = returnFileInfo.getFileMd5();
-        String filePath = returnFileInfo.getFilePath();
+//        String filePath = returnFileInfo.getFilePath();
 //        insertFileEncrypt(fileMd5, filePath, FileEnum.FILE_STORE_TYPE_OSS, isImage);
-        FileInfoVO vo = new FileInfoVO();
+        FileInfoEncryptVO vo = new FileInfoEncryptVO();
         vo.setFileMd5(fileMd5);
-        vo.setFilePath(filePath);
+//        vo.setFilePath(filePath);
         return HttpResult.ok(Status.SUCCESS.getCode(), "", vo);
     }
+
+    public HttpResult getImage(FileImageParam fileImageParam) {
+        String lessenRatio = fileImageParam.getLessenRatio();
+        String fileHeight = fileImageParam.getFileHeight();
+        String fileWidth = fileImageParam.getFileWidth();
+        boolean flag = true;
+        if (fileImageParam.isLessen()) {
+            if (org.apache.commons.lang3.StringUtils.isBlank(lessenRatio)) {
+                lessenRatio = String.valueOf(NumberConstant.TWELVE);
+            }
+        } else {
+            flag = false;
+            if (org.apache.commons.lang3.StringUtils.isBlank(fileHeight)) {
+                fileHeight = String.valueOf(NumberConstant.TWO_HUNDRED);
+
+            }
+            if (org.apache.commons.lang3.StringUtils.isBlank(fileWidth)) {
+                fileWidth = String.valueOf(NumberConstant.TWO_HUNDRED);
+            }
+        }
+        String returnImageAddress = FileUtils.getOSSAddressPrefix();
+        LambdaQueryWrapper<kwfFileInfo> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(com.sckw.file.model.kwfFileInfo::getMd5, fileImageParam.getFileKey())
+                .orderByDesc(kwfFileInfo::getCreateTime);
+        kwfFileInfo kwfFileInfo = fileInfoDao.selectList(
+                wrapper).get(0);
+        if (IMG_FORMAT.indexOf(kwfFileInfo.getFileSuffix()) == -1) {
+            returnImageAddress = returnImageAddress + kwfFileInfo.getFilePath();
+        } else {
+            if (flag) {
+                returnImageAddress = returnImageAddress + kwfFileInfo.getFilePath()
+                        + FileDisposeLayoutEnum.OSS_LESSEN.getParameter() + lessenRatio;
+            } else {
+                returnImageAddress = returnImageAddress + kwfFileInfo.getFilePath()
+                        + FileDisposeLayoutEnum.OSS_ABBREVIATE_LEFT.getParameter() + fileHeight
+                        + FileDisposeLayoutEnum.OSS_ABBREVIATE_RIGHT.getParameter() + fileWidth;
+            }
+        }
+        return HttpResult.ok("",returnImageAddress);
+    }
 }

+ 14 - 1
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTruckMonitorVo.java

@@ -2,13 +2,18 @@ package com.sckw.fleet.model.vo;
 
 import lombok.Data;
 
+import java.io.Serial;
+import java.io.Serializable;
+
 /**
  * desc 车辆监控
  * author zk
  * date 2023/9/5 0005
  */
 @Data
-public class KwfTruckMonitorVo {
+public class KwfTruckMonitorVo implements Serializable {
+    @Serial
+    private static final long serialVersionUID = -7951209824419412416L;
 
     /**
      *企业id
@@ -35,4 +40,12 @@ public class KwfTruckMonitorVo {
      */
     private Integer runStatus;
 
+    public KwfTruckMonitorVo() {
+    }
+
+    public KwfTruckMonitorVo(Long entId, String truckNo, Integer businessStatus) {
+        this.entId = entId;
+        this.truckNo = truckNo;
+        this.businessStatus = businessStatus;
+    }
 }

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

@@ -357,7 +357,7 @@ public class KwfDriverService {
         /**车队班组绑定**/
         driverFleetEdit(driver.getId(), params.getFleetId());
 
-        return HttpResult.ok("司机信息新增成功!", driver);
+        return HttpResult.ok(result.getMsg(), driver);
     }
 
     /**
@@ -412,7 +412,7 @@ public class KwfDriverService {
         /**车队班组绑定**/
         driverFleetEdit(driver.getId(), params.getFleetId());
 
-        return HttpResult.ok("司机信息修改成功!");
+        return HttpResult.ok(result.getMsg());
     }
 
     /**
@@ -463,14 +463,13 @@ public class KwfDriverService {
                 params.setSalt(PasswordUtils.getSaltSubPwd(password));
                 params.setPassword(password);
                 params.setEntId(LoginUserHolder.getEntId());
-                params.setEntId(params.getEntId() == null ? 1 : params.getEntId());// 暂时处理---------------zk
                 params.setBusinessStatus(Global.NO);
                 params.setStatus(Global.NO);
                 int count = driverDao.insert(params);
 
                 /**司机信息与企业关联信息**/
                 driverEntEdit(params);
-                return count > 0 ? HttpResult.ok(params) : HttpResult.error("司机信息新增失败!");
+                return count > 0 ? HttpResult.ok("司机信息新增成功!", params) : HttpResult.error("司机信息新增失败!");
             } else {
                 KwfDriver driver = drivers.get(Global.NUMERICAL_ZERO);
                 BeanUtils.copyPropertiesValue(params, driver);
@@ -481,7 +480,7 @@ public class KwfDriverService {
                 driverEnt.setEntId(LoginUserHolder.getEntId());
                 driverEnt.setId(driver.getId());
                 driverEntEdit(driverEnt);
-                return count > 0 ? HttpResult.ok(driver) : HttpResult.error("司机信息新增失败!");
+                return count > 0 ? HttpResult.ok("司机信息修改成功!", driver) : HttpResult.error("司机信息修改失败!");
             }
         } else {
             /**唯一性交易**/
@@ -494,7 +493,7 @@ public class KwfDriverService {
 
             /**更新**/
             int count = driverDao.updateById(params);
-            return count > 0 ? HttpResult.ok(params) : HttpResult.error("司机信息修改失败!");
+            return count > 0 ? HttpResult.ok("司机信息修改成功!", params) : HttpResult.error("司机信息修改失败!");
         }
     }
 

+ 32 - 11
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckService.java

@@ -10,6 +10,7 @@ import com.sckw.core.common.enums.enums.DictTypeEnum;
 import com.sckw.core.common.enums.enums.FileEnum;
 import com.sckw.core.exception.SystemException;
 import com.sckw.core.model.constant.Global;
+import com.sckw.core.model.enums.EntTypeEnum;
 import com.sckw.core.model.enums.SystemTypeEnum;
 import com.sckw.core.model.file.FileInfo;
 import com.sckw.core.utils.*;
@@ -28,8 +29,9 @@ import com.sckw.system.api.RemoteSystemService;
 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.TransportDubboService;
+import com.sckw.transport.api.dubbo.TransportService;
 import com.sckw.transport.api.model.dto.RWaybillOrderDto;
+import com.sckw.transport.api.model.vo.RTruckMonitorVo;
 import com.sckw.transport.api.model.vo.RWaybillOrderVo;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
@@ -68,8 +70,8 @@ public class KwfTruckService {
     KwfFleetTruckMapper fleetTruckDao;
     @DubboReference(version = "1.0.0", group = "design", check = false,timeout = 8000)
     private RemoteSystemService remoteSystemService;
-    @DubboReference(version = "1.0.0", group = "design", check = false,timeout = 8000)
-    private TransportDubboService transportDubboService;
+    @DubboReference(version = "1.0.0", group = "design", check = false)
+    private TransportService transportDubboService;
 
     /**
      * @param key 主键id
@@ -338,7 +340,7 @@ public class KwfTruckService {
         /**车队班组绑定**/
         truckFleetEdit(truck.getId(), params.getFleetId());
 
-        return HttpResult.ok("车辆信息新增成功!", truck);
+        return HttpResult.ok(result.getMsg(), truck);
     }
 
     /**
@@ -450,7 +452,7 @@ public class KwfTruckService {
                 truckEnt.setEntId(LoginUserHolder.getEntId());
                 truckEnt.setId(truck.getId());
                 truckEntEdit(truckEnt);
-                return count > 0 ? HttpResult.ok(truck) : HttpResult.error("车辆信息新增失败!");
+                return count > 0 ? HttpResult.ok("车辆信息修改成功!", truck) : HttpResult.error("车辆信息修改失败!");
             }
         } else {
             /**唯一性交易**/
@@ -463,7 +465,7 @@ public class KwfTruckService {
 
             /**更新**/
             int count = truckDao.updateById(params);
-            return count > 0 ? HttpResult.ok(params) : HttpResult.error("车辆信息修改失败!");
+            return count > 0 ? HttpResult.ok("车辆信息修改成功!", params) : HttpResult.error("车辆信息修改失败!");
         }
     }
 
@@ -733,15 +735,34 @@ public class KwfTruckService {
      * @date 2023/9/6
      **/
     public List<KwfTruckMonitorVo> findTruckMonitor(Map params) {
-        List<KwfTruckMonitorVo> trucks = new ArrayList<>();
+        //企业PC/APP
         if (LoginUserHolder.getSystemType() == SystemTypeEnum.COMPANY.getCode()) {
-            params.put("entId", LoginUserHolder.getEntId());
-            trucks = truckDao.findTruckByEnt(params);
+            List<KwfTruckMonitorVo> trucks = new ArrayList<>();
+            //企业属性
+            String entTypes = LoginEntHolder.get().getEntTypes();
+            //承运方
+            Boolean bool = EntTypeEnum.carrier(entTypes);
+            if (bool != null && bool) {
+                params.put("entId", LoginUserHolder.getEntId());
+                List<KwfTruckMonitorVo> carrierTrucks = truckDao.findTruckByEnt(params);
+                trucks.addAll(carrierTrucks);
+            }
+
+            //托运方
+            bool = EntTypeEnum.check(entTypes);
+            if (bool != null && bool) {
+                List<RTruckMonitorVo> checkTrucks = transportDubboService.truckInTask(LoginUserHolder.getEntId());
+                checkTrucks.forEach(order -> trucks.add(new KwfTruckMonitorVo(order.getEntId(), order.getTruckNo(), Global.NUMERICAL_ONE)));
+            }
+
+            return trucks;
         }
+
+        //运营端
         if (LoginUserHolder.getSystemType() == SystemTypeEnum.MANAGE.getCode()) {
-            trucks = truckDao.findTruckByAll(params);
+            return truckDao.findTruckByAll(params);
         }
-        return trucks;
+        return new ArrayList<>();
     }
 
     /**

+ 1 - 1
sckw-modules/sckw-fleet/src/main/resources/mapper/KwfTruckMapper.xml

@@ -348,7 +348,7 @@
 
     <select id="findTruckByEnt" resultType="com.sckw.fleet.model.vo.KwfTruckMonitorVo" >
         SELECT
-            kt.truck_no, kt.business_status businessStatus, kte.ent_id entId
+            kt.truck_no truckNo, kt.business_status businessStatus, kte.ent_id entId
         from kwf_truck kt
         left join kwf_truck_ent kte on kte.truck_id = kt.id
         where kt.del_flag = 0 and kte.del_flag = 0

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

@@ -27,6 +27,11 @@ public class AddressQueryReqVo extends PageRequest implements Serializable {
      */
     private Integer cityCode;
 
+    /**
+     * 所属区域
+     */
+    private List<Integer> cityCodeList;
+
     /**
      * 地址名称、详细地址
      */

+ 17 - 2
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmAddressService.java

@@ -2,6 +2,7 @@ package com.sckw.manage.service;
 
 import java.io.IOException;
 import java.util.*;
+import java.util.stream.Collectors;
 
 import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -33,6 +34,8 @@ import com.sckw.manage.model.vo.res.AddressQueryResVo;
 import com.sckw.stream.enums.MessageEnum;
 import com.sckw.stream.model.UserInfo;
 import com.sckw.system.api.RemoteSystemService;
+import com.sckw.system.api.RemoteUserService;
+import com.sckw.system.api.model.dto.res.AreaTreeFrontResDto;
 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;
@@ -66,6 +69,9 @@ public class KwmAddressService {
     @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 StreamBridge streamBridge;
 
@@ -77,6 +83,16 @@ public class KwmAddressService {
      * @date: 2023/7/12
      */
     public PageResult queryByPage(AddressQueryReqVo reqVo) {
+        Integer cityCode = reqVo.getCityCode();
+        List<Integer> cityCodeList = new ArrayList<>();
+        if (Objects.nonNull(cityCode)) {
+            cityCodeList.add(cityCode);
+            List<AreaTreeFrontResDto> allArea = remoteUserService.findAllArea(cityCode);
+            if (CollectionUtils.isNotEmpty(allArea)) {
+                cityCodeList.addAll(allArea.stream().map(AreaTreeFrontResDto::getCode).distinct().toList());
+            }
+        }
+        reqVo.setCityCodeList(cityCodeList);
         PageHelper.startPage(reqVo.getPage(), reqVo.getPageSize());
         List<KwmAddress> kwmAddressList = findList(reqVo);
         if (CollectionUtils.isEmpty(kwmAddressList)) {
@@ -95,7 +111,7 @@ public class KwmAddressService {
      */
     private List<KwmAddress> findList(AddressQueryReqVo reqVo) {
         LambdaQueryWrapper<KwmAddress> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(Objects.nonNull(reqVo.getCityCode()), KwmAddress::getCityCode, reqVo.getCityCode()).
+        wrapper.in(Objects.nonNull(reqVo.getCityCode()), KwmAddress::getCityCode, reqVo.getCityCodeList()).
                 eq(Objects.nonNull(reqVo.getType()), KwmAddress::getType, reqVo.getType()).
                 eq(KwmAddress::getDelFlag, Global.NO).
                 and(StringUtils.isNotBlank(reqVo.getKeywords()),
@@ -113,7 +129,6 @@ public class KwmAddressService {
 
         if (StringUtils.isNotBlank(reqVo.getIds())) {
             wrapper.in(KwmAddress::getId, StringUtils.splitStrToList(reqVo.getIds(), Long.class));
-
         }
 
         if (!Objects.equals(LoginUserHolder.getSystemType(), SystemTypeEnum.MANAGE.getCode())) {

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

@@ -1,12 +1,8 @@
 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;
-import com.sckw.core.exception.BusinessException;
 import com.sckw.core.exception.SystemException;
 import com.sckw.core.model.constant.Global;
 import com.sckw.core.model.enums.CooperateStatusEnum;
@@ -25,29 +21,26 @@ import com.sckw.manage.dao.KwmCooperateMapper;
 import com.sckw.manage.dao.KwmCooperateTypeMapper;
 import com.sckw.manage.model.dto.req.CooperateManageQueryReqDto;
 import com.sckw.manage.model.dto.res.CooperateManageQueryResDto;
-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.report.AddressQueryExport;
 import com.sckw.manage.model.report.CooperateManageExport;
 import com.sckw.manage.model.report.QueryAllCooperateInfoExcel;
 import com.sckw.manage.model.vo.req.*;
 import com.sckw.manage.model.vo.res.*;
+import com.sckw.order.api.dubbo.TradeOrderInfoService;
+import com.sckw.payment.api.dubbo.PaymentDubboService;
 import com.sckw.payment.api.model.constant.OrderEnum;
 import com.sckw.stream.enums.MessageEnum;
 import com.sckw.stream.model.UserInfo;
 import com.sckw.system.api.RemoteSystemService;
-import com.sckw.order.api.dubbo.TradeOrderInfoService;
 import com.sckw.system.api.RemoteUserService;
+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.UserCacheResDto;
-import com.sckw.transport.api.dubbo.TransportDubboService;
-import com.sckw.payment.api.dubbo.PaymentDubboService;
-import com.sckw.system.api.model.dto.res.EntCacheResDto;
+import com.sckw.transport.api.dubbo.TransportService;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
-import org.jetbrains.annotations.NotNull;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -84,7 +77,7 @@ public class KwmCooperateManageService {
     private TradeOrderInfoService tradeOrderInfoService;
 
     @DubboReference(version = "1.0.0", group = "design", check = false)
-    private TransportDubboService transportDubboService;
+    private TransportService transportDubboService;
 
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private PaymentDubboService paymentDubboService;

+ 20 - 22
sckw-modules/sckw-manage/src/main/resources/mapper/KwmCooperateMapper.xml

@@ -75,18 +75,18 @@
                    #{item}
                </foreach>
            </if>
-           <if test="reqDto.cooperateTypes != null and reqDto.cooperateTypes.size() > 0">
-               and exists (select 1
-                             from kwm_cooperate_type c
-                            where c.cooperate_id = a.id
-                               and c.status = b.status
-                               and c.del_flag = 0
-                              and c.type in
-                            <foreach collection="reqDto.cooperateTypes" item="item" open="(" close=")" separator=",">
-                               #{item}
-                           </foreach>
-                          )
+            <if test="reqDto.cooperateTypes != null and reqDto.cooperateTypes.size() > 0">
+                <foreach collection="reqDto.cooperateTypes" item="item">
+                    and exists (select 1
+                                  from kwm_cooperate_type c
+                                 where c.cooperate_id = a.id
+                                   and c.status = b.status
+                                   and c.del_flag = 0
+                                   and c.type = #{item}
+                    )
+                </foreach>
            </if>
+
          <if test="reqDto.status != null and reqDto.status.size() > 0">
              and b.status in
              <foreach collection="reqDto.status" item="item" open="(" close=")" separator=",">
@@ -207,18 +207,16 @@
                 #{item}
             </foreach>
         </if>
-
         <if test="reqDto.cooperateTypes != null and reqDto.cooperateTypes.size() > 0">
-            and exists (select 1
-                            from kwm_cooperate_type c
-                            where c.cooperate_id = a.id
-                              and c.status = 1
-                                and c.del_flag = 0
-                            and c.type in
-                        <foreach collection="reqDto.cooperateTypes" item="item" open="(" close=")" separator=",">
-                            #{item}
-                        </foreach>
-                        )
+            <foreach collection="reqDto.cooperateTypes" item="item">
+                and exists (select 1
+                              from kwm_cooperate_type c
+                             where c.cooperate_id = a.id
+                               and c.status = 1
+                               and c.del_flag = 0
+                               and c.type = #{item}
+                            )
+            </foreach>
         </if>
         <if test="reqDto.status != null and reqDto.status.size() > 0">
             and a.status in

+ 6 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/res/TransportDemandDetailRes.java

@@ -10,6 +10,7 @@ import java.io.Serial;
 import java.io.Serializable;
 import java.time.LocalDate;
 import java.util.Date;
+import java.util.List;
 
 /**
  * @desc: 运需详情响应
@@ -37,6 +38,11 @@ public class TransportDemandDetailRes implements Serializable {
      */
     private String goodsType;
 
+    /**
+     * 商品类型集合
+     */
+    private List<String> goodsTypes;
+
     /**
      * 商品分类Label
      */

+ 6 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/res/WantBuyDetailRes.java

@@ -40,6 +40,12 @@ public class WantBuyDetailRes implements Serializable {
      * 商品类型
      */
     private String goodsType;
+
+    /**
+     * 商品类型集合
+     */
+    private List<String> goodsTypes;
+
     /**
      * 商品类型label
      */

+ 2 - 2
sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwoTradeOrderService.java

@@ -49,7 +49,7 @@ import com.sckw.system.api.model.dto.res.AreaTreeFrontResDto;
 import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.KwsRoleResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
-import com.sckw.transport.api.dubbo.TransportDubboService;
+import com.sckw.transport.api.dubbo.TransportService;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
@@ -91,7 +91,7 @@ public class KwoTradeOrderService {
     private PaymentDubboService paymentDubboService;
 
     @DubboReference(version = "1.0.0", group = "design", check = false)
-    private TransportDubboService transportDubboService;
+    private TransportService transportDubboService;
 
     private final KwoTradeOrderMapper kwoTradeOrderMapper;
     private final StreamBridge streamBridge;

+ 4 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwoTransportDemandService.java

@@ -111,6 +111,10 @@ public class KwoTransportDemandService {
                     new HashMap<>() : dict.get(DictTypeEnum.TRANSPORT_DEMAND_STATUS.getType());
         }
         TransportDemandDetailRes res = BeanUtils.copyProperties(transportDemand, TransportDemandDetailRes.class);
+        List<SysDictResDto> types = remoteSystemService.queryDictFrontAll(DictTypeEnum.PRODUCT_NAME_TYPE.getType(), res.getGoodsType());
+        if (CollectionUtils.isNotEmpty(types)) {
+            res.setGoodsTypes(types.stream().map(SysDictResDto::getValue).toList());
+        }
         res.setGoodsTypeLabel(productNameMap.get(res.getGoodsType()))
                 .setTradingLabel(tradeMap.get(res.getTrading()))
                 .setStatusLabel(statusMap.get(String.valueOf(res.getStatus())));

+ 4 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwpWantBuyService.java

@@ -376,6 +376,10 @@ public class KwpWantBuyService {
             tradeMap = CollectionUtils.isEmpty(dict.get(DictTypeEnum.TRADE_TYPE.getType())) ?
                     new HashMap<>() : dict.get(DictTypeEnum.TRADE_TYPE.getType());
         }
+        List<SysDictResDto> types = remoteSystemService.queryDictFrontAll(DictTypeEnum.PRODUCT_NAME_TYPE.getType(), responseData.getGoodsType());
+        if (CollectionUtils.isNotEmpty(types)) {
+            responseData.setGoodsTypes(types.stream().map(SysDictResDto::getValue).toList());
+        }
         responseData.setGoodsTypeLabel(productNameMap.get(responseData.getGoodsType()))
                 .setStatusLabel(wantBuyStatusMap.get(String.valueOf(responseData.getStatus())));
         //求购地址信息

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

@@ -32,7 +32,7 @@ import com.sckw.system.api.RemoteSystemService;
 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.TransportDubboService;
+import com.sckw.transport.api.dubbo.TransportService;
 import com.sckw.transport.api.model.dto.AccountCheckingBindDTO;
 import com.sckw.transport.api.model.dto.LogisticsOrderDTO;
 import io.seata.spring.annotation.GlobalTransactional;
@@ -72,7 +72,7 @@ public class KwpLedgerLogisticsService extends AbsLedger {
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private RemoteSystemService remoteSystemService;
     @DubboReference(version = "1.0.0", group = "design", check = false)
-    private TransportDubboService transportDubboService;
+    private TransportService transportDubboService;
 
     private void changeDict(List<? extends ILedger> list) {
         List<SysDictResDto> taxRateDict = remoteSystemService.queryDictByType(DictTypeEnum.TAX_RATE.getType());

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

@@ -41,7 +41,7 @@ import com.sckw.redis.constant.RedisConstant;
 import com.sckw.stream.enums.MessageEnum;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
-import com.sckw.transport.api.dubbo.TransportDubboService;
+import com.sckw.transport.api.dubbo.TransportService;
 import com.sckw.transport.api.model.param.LogisticsOrderParam;
 import io.seata.spring.annotation.GlobalTransactional;
 import jakarta.annotation.Resource;
@@ -90,7 +90,7 @@ public class KwpSettlementWalletService {
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private TradeOrderInfoService tradeOrderInfoService;
     @DubboReference(version = "1.0.0", group = "design", check = false)
-    private TransportDubboService transportDubboService;
+    private TransportService transportDubboService;
     private final KwpSettlementLogisticsTrackMapper kwpSettlementLogisticsTrackMapper;
     @Resource
     private KwpLedgerTradeService kwpLedgerTradeService;

+ 2 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/operate/LedgerLogisticsService.java

@@ -23,7 +23,7 @@ import com.sckw.payment.service.KwpLedgerLogisticsOrderService;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
-import com.sckw.transport.api.dubbo.TransportDubboService;
+import com.sckw.transport.api.dubbo.TransportService;
 import com.sckw.transport.api.model.dto.LogisticsOrderDTO;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
@@ -48,7 +48,7 @@ public class LedgerLogisticsService extends AbsLedger {
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private RemoteSystemService remoteSystemService;
     @DubboReference(version = "1.0.0", group = "design", check = false)
-    private TransportDubboService transportDubboService;
+    private TransportService transportDubboService;
 
     private void changeDict(List<? extends ILedger> list) {
         List<SysDictResDto> taxRateDict = remoteSystemService.queryDictByType(DictTypeEnum.TAX_RATE.getType());

+ 2 - 2
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/operate/SettlementWalletService.java

@@ -12,7 +12,7 @@ import com.sckw.payment.model.vo.req.SettlementWalletReq;
 import com.sckw.payment.model.vo.res.SettlementWalletVo;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
-import com.sckw.transport.api.dubbo.TransportDubboService;
+import com.sckw.transport.api.dubbo.TransportService;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
@@ -42,7 +42,7 @@ public class SettlementWalletService {
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private TradeOrderInfoService tradeOrderInfoService;
     @DubboReference(version = "1.0.0", group = "design", check = false)
-    private TransportDubboService transportDubboService;
+    private TransportService transportDubboService;
     private final KwpSettlementLogisticsTrackMapper kwpSettlementLogisticsTrackMapper;
 
 

+ 5 - 0
sckw-modules/sckw-product/src/main/java/com/sckw/product/model/vo/res/GoodsDetail.java

@@ -76,6 +76,11 @@ public class GoodsDetail {
      */
     private String goodsType;
 
+    /**
+     * 商品类型集合
+     */
+    private List<String> goodsTypes;
+
     /**
      * 商品类型lab
      */

+ 5 - 0
sckw-modules/sckw-product/src/main/java/com/sckw/product/model/vo/res/OperationGoodsDetail.java

@@ -81,6 +81,11 @@ public class OperationGoodsDetail implements Serializable {
      */
     private String goodsType;
 
+    /**
+     * 商品类型集合
+     */
+    private List<String> goodsTypes;
+
     /**
      * 商品类型lab
      */

+ 4 - 0
sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java

@@ -266,6 +266,10 @@ public class KwpGoodsService {
             goodsStatusMap = dict.get(DictTypeEnum.GOODS_STATUS.getType());
             addressMap = dict.get(DictTypeEnum.ADDRESS_TYPE.getType());
         }
+        List<SysDictResDto> types = remoteSystemService.queryDictFrontAll(DictTypeEnum.PRODUCT_NAME_TYPE.getType(), detail.getGoodsType());
+        if (CollectionUtils.isNotEmpty(types)) {
+            detail.setGoodsTypes(types.stream().map(SysDictResDto::getValue).toList());
+        }
         detail.setGoodsTypeLabel(CollectionUtils.isNotEmpty(productNameMap) ? productNameMap.get(detail.getGoodsType()) : null)
                 .setUnitLabel(CollectionUtils.isNotEmpty(unitMap) ? unitMap.get(detail.getUnit()) : null)
                 .setTaxRateLabel(CollectionUtils.isNotEmpty(taxRateMap) ? taxRateMap.get(detail.getTaxRate()) : null)

+ 7 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/controller/KwsMenuController.java

@@ -149,4 +149,11 @@ public class KwsMenuController {
     public HttpResult queryMapping(@Valid @RequestBody QueryMappingReqVo reqVo) {
         return HttpResult.ok(kwsMenuService.queryMapping(reqVo.getMenuId()));
     }
+
+    @GetMapping("/test")
+    public HttpResult test(@RequestParam String ids) {
+        return HttpResult.ok(kwsMenuService.test(ids));
+    }
+
+
 }

+ 3 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/SysAreaDao.java

@@ -2,6 +2,7 @@ package com.sckw.system.dao;
 
 import com.sckw.system.model.SysArea;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
@@ -19,4 +20,6 @@ public interface SysAreaDao {
     SysArea selectById(Integer code);
 
     List<SysArea> selectByIds(List<Integer> list);
+
+    List<SysArea> findAllArea(@Param(value = "code") Integer code);
 }

+ 34 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteSystemServiceImpl.java

@@ -230,6 +230,40 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
         return BeanUtils.copyToList(checkNextLevelDict(sysDictGroupResDto.getChild()), SysDictResDto.class);
     }
 
+    @Override
+    public List<SysDictResDto> queryDictFrontAll(String type, String value) {
+        if (StringUtils.isBlank(type) || StringUtils.isBlank(value)) {
+            return Collections.emptyList();
+        }
+
+        SysDict sysDict = sysDictDao.queryByTypeAndValue(type, value);
+        if (Objects.isNull(sysDict)) {
+            return Collections.emptyList();
+        }
+
+        List<SysDictResDto> list = new ArrayList<>();
+        getFrontAll(sysDict, list);
+        List<SysDictResDto> result = new ArrayList<>();
+        for (int n = list.size() - 1; n >= 0; n--) {
+            result.add(list.get(n));
+        }
+        return result;
+    }
+
+    private void getFrontAll(SysDict sysDict, List<SysDictResDto> list) {
+        String parentId = sysDict.getParentId();
+        SysDictResDto sysDictResDto = new SysDictResDto();
+        BeanUtils.copyProperties(sysDict, sysDictResDto);
+        list.add(sysDictResDto);
+
+        if (String.valueOf(Global.NUMERICAL_ZERO).equals(parentId)) {
+            return;
+        }
+
+        SysDict sysDict1 = sysDictDao.selectByKey(Long.valueOf(parentId));
+        getFrontAll(sysDict1, list);
+    }
+
     private List<SysDictGroupResDto> checkNextLevelDict(List<SysDictGroupResDto> list) {
         if (CollectionUtils.isEmpty(list)) {
             return Collections.emptyList();

+ 20 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteUserServiceImpl.java

@@ -15,6 +15,7 @@ import com.sckw.system.api.model.dto.req.*;
 import com.sckw.system.api.model.dto.res.*;
 import com.sckw.system.dao.KwsEnterpriseDao;
 import com.sckw.system.dao.KwsUserLoginDao;
+import com.sckw.system.dao.SysAreaDao;
 import com.sckw.system.dao.SysDictDao;
 import com.sckw.system.model.*;
 import com.sckw.system.model.pojo.FindEntUserPojo;
@@ -64,6 +65,9 @@ public class RemoteUserServiceImpl implements RemoteUserService {
     @Resource
     private SysDictDao sysDictDao;
 
+    @Resource
+    private SysAreaDao sysAreaDao;
+
     @Resource
     private CommonService commonService;
 
@@ -237,6 +241,22 @@ public class RemoteUserServiceImpl implements RemoteUserService {
     }
 
 
+    /**
+     * @param code 区域code
+     * @desc: 查某区域下的所有区域
+     * @author: czh
+     * @date: 2023/10/8
+     */
+    @Override
+    public List<AreaTreeFrontResDto> findAllArea(Integer code) {
+        List<SysArea> list = sysAreaDao.findAllArea(code);
+        if (CollectionUtils.isEmpty(list)) {
+            return Collections.emptyList();
+        }
+        return BeanUtils.copyToList(list, AreaTreeFrontResDto.class);
+    }
+
+
     /**
      * 根据用户名查用户信息
      * @param username 用户账号

+ 1 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java

@@ -906,7 +906,7 @@ public class KwsEnterpriseService {
             types.addAll(listByEntIds.stream().map(KwsEntType::getType).toList());
         }
 
-        if (Objects.nonNull(isAll) && isAll) {
+        if (Objects.isNull(isAll) || isAll) {
             List<KwsEntType> approvalByEntId = kwsEntTypeDao.findApprovalByEntId(kwsEnterprise.getId());
             if (CollectionUtils.isNotEmpty(approvalByEntId)) {
                 types.addAll(approvalByEntId.stream().map(KwsEntType::getType).toList());

+ 23 - 4
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsMenuService.java

@@ -15,6 +15,7 @@ import com.sckw.core.model.enums.SystemTypeEnum;
 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.system.dao.*;
@@ -382,13 +383,15 @@ public class KwsMenuService {
      * @date: 2023/6/13
      */
     public void roleBindMenu(RoleBindMenuReqVo reqVo) {
-        String[] split = reqVo.getMenuIds().split(",");
-        List<KwsMenuRights> list = new ArrayList<>();
+        List<Long> menuIdList = Arrays.stream(reqVo.getMenuIds().split(Global.COMMA)).map(Long::parseLong).collect(Collectors.toList());
+        List<Long> allMenus = getAllMenus(menuIdList, new ArrayList<>());
+        allMenus = allMenus.stream().distinct().toList();
         Date date = new Date();
-        for (String menuId : split) {
+        List<KwsMenuRights> list = new ArrayList<>();
+        for (Long menuId : allMenus) {
             KwsMenuRights kwsMenuRights = new KwsMenuRights();
             kwsMenuRights.setEntId(reqVo.getEntId());
-            kwsMenuRights.setMenuId(Long.parseLong(menuId));
+            kwsMenuRights.setMenuId(menuId);
             kwsMenuRights.setRoleId(reqVo.getRoleId());
             kwsMenuRights.setId(new IdWorker(1L).nextId());
             kwsMenuRights.setRemark(reqVo.getRemark());
@@ -406,6 +409,19 @@ public class KwsMenuService {
         }
     }
 
+    public List<Long> getAllMenus(List<Long> menuIdList, List<Long> list) {
+        List<KwsMenu> menuList = kwsMenuDao.selectByKeys(menuIdList);
+        List<KwsMenu> childList = menuList.stream().filter(item -> !item.getParentId().equals(0L)).toList();
+        if (CollectionUtils.isEmpty(childList)) {
+            list.addAll(menuList.stream().map(KwsMenu::getId).toList());
+            return list;
+        }
+
+        list.addAll(childList.stream().map(KwsMenu::getId).toList());
+        return getAllMenus(childList.stream().map(KwsMenu::getParentId).collect(Collectors.toList()), list);
+    }
+
+
     public List<KwsMenu> selectAll() {
         return kwsMenuDao.selectAll();
     }
@@ -535,4 +551,7 @@ public class KwsMenuService {
         return list;
     }
 
+    public List<Long> test(String ids) {
+        return getAllMenus(StringUtils.splitStrToList(ids, Long.class), new ArrayList<>());
+    }
 }

+ 3 - 3
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserService.java

@@ -17,6 +17,7 @@ import com.sckw.system.api.model.dto.req.UpdatePasswordReqDto;
 import com.sckw.system.api.model.dto.res.AreaTreeFrontResDto;
 import com.sckw.system.api.model.dto.res.KwsUserResDto;
 import com.sckw.system.api.model.dto.res.RegisterResDto;
+import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.dao.*;
 import com.sckw.system.dubbo.RemoteSystemServiceImpl;
 import com.sckw.system.model.*;
@@ -372,6 +373,7 @@ public class KwsUserService {
      */
     public List<KwsUserResVo> findPage(Map<String, Object> params) {
         params.put("entId", LoginUserHolder.getEntId());
+        params.put("isMain", Global.NO);
         return kwsUserDao.findPage(params);
     }
 
@@ -616,9 +618,7 @@ public class KwsUserService {
     }
 
     public List<AreaTreeFrontResDto> test(List<Integer> list) {
-        Integer integer = transportStatisticsService.statisticsLogistics(123L);
-        List<Long> longs = LoginUserHolder.getAuthUserIdList();
-
+        List<SysDictResDto> sysDictResDtos = remoteSystemService.queryDictFrontAll("product_name_type", "2");
         return null;
     }
 

+ 0 - 3
sckw-modules/sckw-system/src/main/resources/mapper/KwsEntTypeDao.xml

@@ -207,7 +207,4 @@
      and a.del_flag = 0 and a.status = 0
   </select>
 
-
-
-
 </mapper>

+ 3 - 0
sckw-modules/sckw-system/src/main/resources/mapper/KwsEnterpriseDao.xml

@@ -96,6 +96,9 @@
     left join kws_user k on a.create_by = k.id
     left join kws_user ku on a.update_by = ku.id
     left join kws_ent_type b on a.id = b.ent_id and b.del_flag = 0
+        <if test="dto.approval == null or (dto.approval != null and dto.approval != 2)">
+            and b.status != 1
+        </if>
     left join kws_ent_dep c on a.id = c.ent_id
     left join kws_enterprise d on c.ent_pid = d.id
     where a.del_flag = 0

+ 2 - 2
sckw-modules/sckw-system/src/main/resources/mapper/KwsUserDao.xml

@@ -258,8 +258,8 @@
     <if test="email != null and email != ''">
       and su.email = #{email, jdbcType=VARCHAR}
     </if>
-    <if test="isMain != null and isMain != ''">
-      and su.is_main = #{isMain, jdbcType=INTEGER}
+    <if test="isMain != null">
+      and su.is_main = #{isMain}
     </if>
     <if test="deptId != null and deptId != ''">
       and c.id = #{deptId, jdbcType=VARCHAR}

+ 7 - 0
sckw-modules/sckw-system/src/main/resources/mapper/SysAreaDao.xml

@@ -68,4 +68,11 @@
         #{item}
       </foreach>
     </select>
+
+  <select id="findAllArea" resultType="com.sckw.system.model.SysArea">
+    select a.*
+      from sys_area a
+     where a.pcode = #{code} or a.province_code = #{code}
+  </select>
+
 </mapper>

+ 1 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dao/KwtLogisticsOrderMapper.java

@@ -357,7 +357,7 @@ public interface KwtLogisticsOrderMapper extends BaseMapper<KwtLogisticsOrder> {
 
     List<Long> statisticsLogistics(@Param("topEntId") Long topEntId);
 
-    Integer statisticsLogisticsByTopEntIdAndOrderStatus(@Param("topEntId") Long topEntId, @Param("orderList") List<Integer> orderList);
+    Integer statisticsLogisticsByTopEntIdAndOrderStatus(@Param("topEntId") Long topEntId, @Param("orderList") List<Integer> orderList,@Param("unitType") String unitType);
 
     /**
      * @param statusList 单据状态集合

+ 61 - 3
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dubbo/TransportDubboServiceImpl.java → sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dubbo/TransportServiceImpl.java

@@ -28,7 +28,7 @@ import com.sckw.redis.utils.RedissonUtils;
 import com.sckw.stream.model.SckwBusSum;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
-import com.sckw.transport.api.dubbo.TransportDubboService;
+import com.sckw.transport.api.dubbo.TransportService;
 import com.sckw.transport.api.model.dto.AccountCheckingBindDTO;
 import com.sckw.transport.api.model.dto.AddressResDTO;
 import com.sckw.transport.api.model.dto.LogisticsOrderDTO;
@@ -36,17 +36,20 @@ 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 com.sckw.transport.dao.*;
 import com.sckw.transport.model.*;
 import com.sckw.transport.service.CommonService;
 import jakarta.annotation.Resource;
+import jodd.util.StringUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.springframework.beans.BeanUtils;
 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;
 
 import java.math.BigDecimal;
@@ -59,9 +62,9 @@ import java.util.stream.Collectors;
  * @date 2023-07-11 14:07:28
  */
 @Slf4j
-//@Service
+@Service
 @DubboService(group = "design", version = "1.0.0", timeout = 50000)
-public class TransportDubboServiceImpl implements TransportDubboService {
+public class TransportServiceImpl implements TransportService {
 
     @Autowired
     public CommonService commonService;
@@ -624,4 +627,59 @@ public class TransportDubboServiceImpl implements TransportDubboService {
 
         return waybillOrderVos;
     }
+
+    /**
+     * @param checkEntId 托运企业ID
+     * @desc 查询托运方关联任务中的车辆
+     * @author zk
+     * @date 2023/10/8
+     **/
+    @Override
+    public List<RTruckMonitorVo> truckInTask(Long checkEntId) {
+        //查询物流订单
+        List<Long> orderIds = new ArrayList<>();
+        Map<String, Object> params = new HashMap<>(Global.NUMERICAL_SIXTEEN){{
+            put("status", LogisticsOrderEnum.IN_TRANSIT.getCode());
+            put("checkEntId", checkEntId);
+        }};
+        List<KwtLogisticsOrder> orders = logisticsOrderMapper.findLogisticsOrder(params);
+        if (!CollectionUtils.isEmpty(orders)) {
+            List<Long> idList = new ArrayList<>();
+            orders.forEach(order -> idList.add(order.getId()));
+            orderIds.addAll(idList);
+            findLogisticsOrderChild(orderIds, StringUtil.join(idList, Global.COMMA));
+        }
+
+        //查询运单
+        List<RTruckMonitorVo> trucks = new ArrayList<>();
+        params = new HashMap<>(Global.NUMERICAL_SIXTEEN){{
+            put("busStatus", Global.NUMERICAL_THREE);
+            put("lOrderIds", orderIds);
+        }};
+        List<KwtWaybillOrder> waybillOrders = waybillOrderDao.findWaybillOrder(params);
+        waybillOrders.forEach(order -> trucks.add(new RTruckMonitorVo(order.getEntId(), order.getTruckNo(), Global.NUMERICAL_ONE)));
+        return trucks;
+    }
+
+    /**
+     * @param orderIds 物流订单ID集合
+     * @param ids 当前物流订单ID
+     * @desc 查询下级分包 物流订单
+     * @author zk
+     * @date 2023/10/8
+     **/
+    public void findLogisticsOrderChild(List<Long> orderIds, String ids) {
+        Map<String, Object> params = new HashMap<>(Global.NUMERICAL_SIXTEEN){{
+            put("status", LogisticsOrderEnum.IN_TRANSIT.getCode());
+            put("pid", ids);
+        }};
+        //查询物流订单
+        List<KwtLogisticsOrder> orders = logisticsOrderMapper.findLogisticsOrder(params);
+        if (!CollectionUtils.isEmpty(orders)) {
+            List<Long> idList = new ArrayList<>();
+            orders.forEach(order -> idList.add(order.getId()));
+            orderIds.addAll(idList);
+            findLogisticsOrderChild(orderIds, StringUtil.join(idList, Global.COMMA));
+        }
+    }
 }

+ 22 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dubbo/TransportStatisticsServiceImpl.java

@@ -9,6 +9,7 @@ import com.sckw.transport.dao.KwtWaybillOrderMapper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
 import java.util.ArrayList;
@@ -20,6 +21,7 @@ import java.util.List;
  * @date 2023-09-08 11:09:34
  */
 @Slf4j
+@Service
 @DubboService(group = "design", version = "1.0.0")
 public class TransportStatisticsServiceImpl implements TransportStatisticsService {
 
@@ -97,7 +99,26 @@ public class TransportStatisticsServiceImpl implements TransportStatisticsServic
         orderList.add(LogisticsOrderEnum.HAVE_FINISHED.getCode());
         orderList.add(LogisticsOrderEnum.HAVE_RECONCILED.getCode());
         orderList.add(LogisticsOrderEnum.HAVE_ALREADY_SETTLED.getCode());
-        Integer count = logisticsOrderMapper.statisticsLogisticsByTopEntIdAndOrderStatus(topEntId, orderList);
+        Integer count = logisticsOrderMapper.statisticsLogisticsByTopEntIdAndOrderStatus(topEntId, orderList,"2");
+        return count;
+    }
+
+    /**
+     * 统计托运订单数量
+     *
+     * @param topEntId 集团企业id
+     * @return
+     */
+    @Override
+    public Integer statisticsLogisticsByConsign(Long topEntId) {
+        //统计维度
+        List<Integer> orderList = new ArrayList<>();
+        orderList.add(LogisticsOrderEnum.WAIT_DELIVERY.getCode());
+        orderList.add(LogisticsOrderEnum.IN_TRANSIT.getCode());
+        orderList.add(LogisticsOrderEnum.HAVE_FINISHED.getCode());
+        orderList.add(LogisticsOrderEnum.HAVE_RECONCILED.getCode());
+        orderList.add(LogisticsOrderEnum.HAVE_ALREADY_SETTLED.getCode());
+        Integer count = logisticsOrderMapper.statisticsLogisticsByTopEntIdAndOrderStatus(topEntId, orderList,"1");
         return count;
     }
 }

+ 3 - 3
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/AddOrderDTO.java

@@ -113,7 +113,7 @@ public class AddOrderDTO {
      */
     @NotNull(message = "运价方式不能为空")
     @Min(value = 0, message = "必须大于等于{value}")
-    @Max(value = 6, message = "必须小于等于{value}")
+    @Max(value = 10, message = "必须小于等于{value}")
     private Long priceType;
 
     /**
@@ -213,7 +213,7 @@ public class AddOrderDTO {
      */
     @NotNull(message = "支付方式不能为空")
     @Min(value = 0, message = "支付方式必须大于等于{value}")
-    @Max(value = 4, message = "支付方式必须小于等于{value}")
+//    @Max(value = 4, message = "支付方式必须小于等于{value}")
     private Long payment;
 
 
@@ -222,7 +222,7 @@ public class AddOrderDTO {
      */
     @NotNull(message = "签约方式不能为空")
     @Min(value = 0, message = "签约方式必须大于等于{value}")
-    @Max(value = 4, message = "签约方式必须小于等于{value}")
+    @Max(value = 10, message = "签约方式必须小于等于{value}")
     private String signingWay;
 
     /**

+ 2 - 2
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/OperateSendCarDto.java

@@ -62,8 +62,8 @@ public class OperateSendCarDto {
      * 操作时间
      */
     @JsonProperty("operateTime")
-    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
     @NotNull(message = "时间不能为空")
     private Date operateTime;
 }

+ 2 - 2
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/OperateWaybillDto.java

@@ -28,8 +28,8 @@ public class OperateWaybillDto {
      * 操作时间
      */
     @JsonProperty("operateTime")
-    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
     @NotNull(message = "时间不能为空")
     private Date operateTime;
 

+ 2 - 2
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/WaybillOrderTicketDto.java

@@ -65,8 +65,8 @@ public class WaybillOrderTicketDto {
      * 操作时间
      */
     @JsonProperty("operateTime")
-    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
     @NotNull(message = "时间不能为空")
     private Date operateTime;
 

+ 4 - 4
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/WaybillOrderTicketV1Dto.java

@@ -46,8 +46,8 @@ public class WaybillOrderTicketV1Dto {
      * 操作时间
      */
     @JsonProperty("loadOperateTime")
-    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
     @NotNull(message = "装货时间不能为空")
     private Date loadOperateTime;
 
@@ -70,8 +70,8 @@ public class WaybillOrderTicketV1Dto {
      * 操作时间
      */
     @JsonProperty("unloadOperateTime")
-    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
     @NotNull(message = "卸货时间不能为空")
     private Date unloadOperateTime;
 

+ 1 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/ConsignOrderExcelVo.java

@@ -54,7 +54,7 @@ public class ConsignOrderExcelVo implements Serializable {
      * 任务总量
      */
     @ExcelProperty(value = "任务总量")
-    private BigDecimal carryingCapacity;
+    private String carryingCapacity;
 
     /**
      * 待分配量(amount-subcontract_amount-entrust_amount)

+ 135 - 284
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/ManagementLogisticsOrderExcelVo.java

@@ -21,219 +21,244 @@ import java.time.LocalDate;
 //        @Translate(field = "status")
 //})
 public class ManagementLogisticsOrderExcelVo implements Serializable {
+
     /**
-     * 结算周期
+     * 状态
      */
-    @ExcelProperty(value = "结算周期")
-    private String accountsCycleLabel;
+    @ExcelProperty(value = "状态")
+    private String statusLabel;
 
     /**
-     * 发起人
+     * 贸易订单编号
      */
-    @ExcelProperty(value = "发起人")
-    private String appointor;
+    @JsonProperty("tOrderNo")
+    @ExcelProperty(value = "贸易订单编号")
+    private String tOrderNo;
 
     /**
-     * 计费方式
+     * 承运订单号
      */
-    @ExcelProperty(value = "计费方式")
-    private String billingModeLabel;
+    @JsonProperty("lOrderNo")
+    @ExcelProperty(value = "托运订单号")
+    private String lOrderNo;
+
+    /**
+     * 托运单位
+     */
+    @ExcelProperty(value = "托运单位")
+    private String consignCompany;
 
     /**
      * 承运单位
      */
     @ExcelProperty(value = "承运单位")
     private String carrierCompany;
+
     /**
-     * 承运联系人
-     */
-    @ExcelProperty(value = "承运联系人")
-    private String carrierContacts;
-    /**
-     * 承运联系电话
+     * 货物名称
      */
-    @ExcelProperty(value = "承运联系电话")
-    private String carrierPhone;
+    @ExcelProperty(value = "货物名称")
+    private String goodsName;
+
     /**
-     * 分配承运
+     * 任务总
      */
-    @ExcelProperty(value = "承运量")
+    @ExcelProperty(value = "任务总量")
     private BigDecimal carryingCapacity;
 
     /**
-     * 托运单位
+     * 待分配量(amount-subcontract_amount-entrust_amount)
      */
-    @ExcelProperty(value = "托运单位")
-    private String consignCompany;
+    @ExcelProperty(value = "待分配量")
+    private String waitDistributionAmount;
+
     /**
-     * 托运联系人
+     * 装货量-实装量
      */
-    @ExcelProperty(value = "托运联系人")
-    private String consignContacts;
+    @ExcelProperty(value = "实装量")
+    private String loadAmount;
+
     /**
-     * 托运联系电话
+     * 卸货量
      */
-    @ExcelProperty(value = "托运联系电话")
-    private String consignPhone;
+    @ExcelProperty(value = "实卸量")
+    private String unloadAmount;
+
     /**
-     * 合同
+     * 运价
      */
-    @ExcelProperty(value = "合同")
-    private String contract;
+    @ExcelProperty(value = "运价")
+    private String priceLabel;
 
     /**
-     * 扣亏货值/元/吨
+     * 税率
      */
-    @ExcelProperty(value = "扣亏货值")
-    private BigDecimal deficitAmount;
+    @ExcelProperty(value = "税率/%")
+    private BigDecimal taxRate;
+
     /**
-     * 货物名称
+     * 装货地点名称
      */
-    @ExcelProperty(value = "货物名称")
-    private String goodsName;
+    @ExcelProperty(value = "装货地点名称")
+    private String loadName;
+
     /**
-     * 装货地点
+     * 地址明细
      */
-    @ExcelProperty(value = "装货地点")
+    @ExcelProperty(value = "地址明细")
     private String loadAddress;
 
     /**
-     * 承运订单号
+     * 卸货地点名称
      */
-    @JsonProperty("lOrderNo")
-    @ExcelProperty(value = "托运订单号")
-    private String lOrderNo;
+    @ExcelProperty(value = "卸货地点名称")
+    private String unloadName;
 
     /**
-     * 贸易订单编号
+     * 地址明细
      */
-    @JsonProperty("tOrderNo")
-    @ExcelProperty(value = "贸易订单编号")
-    private String tOrderNo;
+    @ExcelProperty(value = "地址明细")
+    private String unloadAddress;
 
     /**
-     * 合理损耗单位
+     * 订单来源
      */
-    @ExcelProperty(value = "合理损耗")
-    private String lossUnitLabel;
+    @ExcelProperty(value = "订单来源")
+    private String orderSourceLabel;
 
     /**
-     * 运价
+     * 发货单位
      */
-    @ExcelProperty(value = "运价")
-    private String priceLabel;
+    @ExcelProperty(value = "发货单位")
+    private String shipmentsUnit;
 
     /**
-     * 税率
+     * 收货单位
      */
-    @ExcelProperty(value = "税率")
-    private BigDecimal taxRate;
+    @ExcelProperty(value = "收货单位")
+    private String receiveGoodsUnit;
 
+    /**
+     * 计费方式
+     */
+    @ExcelProperty(value = "计费方式")
+    private String billingModeLabel;
 
     /**
-     * 订单来源
+     * 合理损耗单位
      */
-    @ExcelProperty(value = "订单来源")
-    private String orderSourceLabel;
+    @ExcelProperty(value = "合理损耗")
+    private String lossUnitLabel;
 
     /**
-     * 收货联系人
+     * 扣亏货值/元/吨
      */
-    @ExcelProperty(value = "收货联系人")
-    private String receiveGoodsContacts;
+    @ExcelProperty(value = "扣亏货值/元/吨")
+    private BigDecimal deficitAmount;
 
     /**
-     * 计划收货时间
+     * 结算周期
      */
-    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
-    @ExcelProperty(value = "计划收货时间")
-    private LocalDate receiveGoodsDateTime;
+    @ExcelProperty(value = "结算周期")
+    private String accountsCycleLabel;
 
     /**
-     * 收货电话
+     * 承运联系人
      */
-    @ExcelProperty(value = "收货电话")
-    private String receiveGoodsPhone;
+    @ExcelProperty(value = "承运联系人")
+    private String carrierContacts;
 
     /**
-     * 备注
+     * 承运联系电话
      */
-    @ExcelProperty(value = "备注")
-    private String remark;
+    @ExcelProperty(value = "承运联系电话")
+    private String carrierPhone;
 
     /**
-     * 发货联系人
+     * 托运联系人
      */
-    @ExcelProperty(value = "发货联系人")
-    private String shipmentsContacts;
+    @ExcelProperty(value = "托运联系人")
+    private String consignContacts;
 
     /**
-     * 计划发货时间
+     * 托运联系电话
      */
-    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
-    @ExcelProperty(value = "计划发货时间")
-    private LocalDate shipmentsDateTime;
+    @ExcelProperty(value = "托运联系电话")
+    private String consignPhone;
 
     /**
-     * 发货电话
+     * 装货点联系人
      */
-    @ExcelProperty(value = "发货电话")
-    private String shipmentsPhone;
+    @ExcelProperty(value = "装货点联系人")
+    private String shipmentsContacts;
 
     /**
-     * 签约方式
+     * 联系电话
      */
-    @ExcelProperty(value = "签约方式")
-    private String signingLabel;
+    @ExcelProperty(value = "联系电话")
+    private String shipmentsPhone;
 
     /**
-     * 状态
+     * 卸货点联系人
      */
-    @ExcelProperty(value = "状态")
-    private String statusLabel;
+    @ExcelProperty(value = "卸货点联系人")
+    private String receiveGoodsContacts;
 
     /**
-     * 卸货地点
+     * 联系电话
      */
-    @ExcelProperty(value = "卸货地点")
-    private String unloadAddress;
+    @ExcelProperty(value = "联系电话")
+    private String receiveGoodsPhone;
 
-    @ExcelProperty(value = "创建时间")
-    private String createTime;
+    /**
+     * 计划开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @ExcelProperty(value = "计划开始时间")
+    private LocalDate shipmentsDateTime;
 
-    @ExcelProperty(value = "修改时间")
-    private String updateTime;
+    /**
+     * 计划结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @ExcelProperty(value = "计划结束时间")
+    private LocalDate receiveGoodsDateTime;
 
     /**
-     * 发货单位
+     * 关联合同
      */
-    @ExcelProperty(value = "发货单位")
-    private String shipmentsUnit;
+    @ExcelProperty(value = "关联合同")
+    private String contract;
 
     /**
-     * 收货单位
+     * 创建人
      */
-    @ExcelProperty(value = "收货单位")
-    private String receiveGoodsUnit;
+    @ExcelProperty(value = "创建人")
+    private String appointor;
+
+    @ExcelProperty(value = "创建时间")
+    private String createTime;
 
     /**
-     * 商品价值(扣亏货值)
+     * 备注
      */
-    @ExcelProperty(value = "扣亏货值")
-    private String goodsPriceLabel;
+    @ExcelProperty(value = "备注")
+    private String remark;
 
     /**
-     * 装货量
+     * 签约方式
      */
-    @ExcelProperty(value = "装货量")
-    private String loadAmount;
+    @ExcelProperty(value = "签约方式")
+    private String signingLabel;
 
+    @ExcelProperty(value = "修改时间")
+    private String updateTime;
 
     /**
-     * 待分配量(amount-subcontract_amount-entrust_amount)
+     * 商品价值(扣亏货值)
      */
-    @ExcelProperty(value = "待分配量")
-    private String waitDistributionAmount;
+    @ExcelProperty(value = "扣亏货值")
+    private String goodsPriceLabel;
 
     /**
      * 分包量(给下游承运商分包的量)
@@ -247,178 +272,4 @@ public class ManagementLogisticsOrderExcelVo implements Serializable {
     @ExcelProperty(value = "已委托量")
     private String entrustAmount;
 
-    /**
-     * 卸货量
-     */
-    @ExcelProperty(value = "卸货量")
-    private String unloadAmount;
-
-
-
-//    /**
-//     * 结算周期
-//     */
-//    @ExcelProperty(value = "结算周期")
-//    private String accountsCycle;
-//    /**
-//     * 发起人
-//     */
-//    @ExcelProperty(value = "发起人")
-//    private String appointor;
-//    /**
-//     * 计费方式
-//     */
-//    @ExcelProperty(value = "计费方式")
-//    private String billingMode;
-//    /**
-//     * 承运单位
-//     */
-//    @ExcelProperty(value = "承运单位")
-//    private String carrierCompany;
-//    /**
-//     * 承运联系人
-//     */
-//    @ExcelProperty(value = "承运联系人")
-//    private String carrierContacts;
-//    /**
-//     * 承运订单
-//     */
-//    @ExcelProperty(value = "承运订单")
-//    private String carrierOrder;
-//    /**
-//     * 承运联系电话
-//     */
-//    @ExcelProperty(value = "承运联系电话")
-//    private String carrierPhone;
-//    /**
-//     * 分配承运量
-//     */
-//    @ExcelProperty(value = "分配承运量")
-//    private String carryingCapacity;
-//    /**
-//     * 托运单位
-//     */
-//    @ExcelProperty(value = "托运单位")
-//    private String consignCompany;
-//    /**
-//     * 托运联系人
-//     */
-//    @ExcelProperty(value = "托运联系人")
-//    private String consignContacts;
-//    /**
-//     * 托运联系电话
-//     */
-//    @ExcelProperty(value = "托运联系电话")
-//    private String consignPhone;
-//    /**
-//     * 合同
-//     */
-//    @ExcelProperty(value = "合同")
-//    private String contract;
-//    /**
-//     * 扣亏货值/元/吨
-//     */
-//    @ExcelProperty(value = "扣亏货值/元/吨")
-//    private String deficitAmount;
-//    /**
-//     * 货物名称
-//     */
-//    @ExcelProperty(value = "货物名称")
-//    private String goodsName;
-//    /**
-//     * 装货地点
-//     */
-//    @ExcelProperty(value = "装货地点")
-//    private String loadAddress;
-//    /**
-//     * 数据库id
-//     */
-//    private String lOrderId;
-//    /**
-//     * 托运订单号
-//     */
-//    @ExcelProperty(value = "托运订单号")
-//    private String lOrderNo;
-//    /**
-//     * 合理损耗
-//     */
-//    @ExcelProperty(value = "合理损耗")
-//    private String loss;
-//    /**
-//     * 计划时间
-//     */
-//    @ExcelProperty(value = "计划时间")
-//    private String plannedDateTime;
-//    /**
-//     * 运价
-//     */
-//    @ExcelProperty(value = "运价")
-//    private String price;
-//    /**
-//     * 收货联系人
-//     */
-//    @ExcelProperty(value = "收货联系人")
-//    private String receiveGoodsContacts;
-//    /**
-//     * 计划收货时间
-//     */
-//    @ExcelProperty(value = "计划收货时间")
-//    private String receiveGoodsDateTime;
-//    /**
-//     * 收货电话
-//     */
-//    @ExcelProperty(value = "收货电话")
-//    private String receiveGoodsPhone;
-//    /**
-//     * 备注
-//     */
-//    @ExcelProperty(value = "备注")
-//    private String remark;
-//    /**
-//     * 发货联系人
-//     */
-//    @ExcelProperty(value = "发货联系人")
-//    private String shipmentsContacts;
-//    /**
-//     * 计划发货时间
-//     */
-//    @ExcelProperty(value = "计划发货时间")
-//    private String shipmentsDateTime;
-//    /**
-//     * 发货电话
-//     */
-//    @ExcelProperty(value = "发货电话")
-//    private String shipmentsPhone;
-//    /**
-//     * 签约方式
-//     */
-//    @ExcelProperty(value = "签约方式")
-//    private String signing;
-//    /**
-//     * 状态
-//     */
-//    @ExcelProperty(value = "状态", converter = ExcelConverter.class)
-//    @EasyExcel(type = LogisticsOrderEnum.class, status = NumberConstant.TWO)
-//    private String status;
-//    /**
-//     * 卸货地点
-//     */
-//    @ExcelProperty(value = "卸货地点")
-//    private String unloadAddress;
-//    /**
-//     * 关联承运订单号
-//     */
-//    @ExcelProperty(value = "关联承运订单号")
-//    private String wOrderNo;
-//    /**
-//     * 创建时间
-//     */
-//    @ExcelProperty(value = "创建时间")
-//    private String createTime;
-//    /**
-//     * 修改时间
-//     */
-//    @ExcelProperty(value = "修改时间")
-//    private String updateTime;
-
 }

+ 1 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/ConsignOrderService.java

@@ -2006,6 +2006,7 @@ public class ConsignOrderService {
         for (ConsignOrderVO vo : list) {
             ConsignOrderExcelVo consignOrderExcelVo = new ConsignOrderExcelVo();
             BeanUtils.copyProperties(vo, consignOrderExcelVo);
+            consignOrderExcelVo.setCarryingCapacity(vo.getCarryingCapacity().toString());
             consignOrderExcelVo.setOrderSourceLabel(orderSource == null ? null : orderSource.get(vo.getOrderSource()));
             consignOrderExcelVo.setPriceLabel(vo.getPrice() == null ? null : vo.getPrice().toString() + priceType.get(vo.getPriceType()));
             consignOrderExcelVo.setLossUnitLabel(vo.getLoss() == null ? null : vo.getLoss().toString() + taxRate.get(vo.getLossUnit()));

+ 1 - 4
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtWaybillOrderService.java

@@ -40,6 +40,7 @@ import com.sckw.transport.model.vo.WaybillCountVo;
 import com.sckw.transport.model.vo.WaybillOrderDriverVo;
 import jakarta.annotation.Resource;
 import jakarta.validation.Valid;
+import jodd.util.StringUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -2543,7 +2544,6 @@ public class KwtWaybillOrderService {
 
     /**
      * 承运订单-托运订单-订单详情数据统计
-     *
      * @param orderId
      * @param type
      * @return
@@ -2562,7 +2562,6 @@ public class KwtWaybillOrderService {
 
     /**
      * 承运数据统计
-     *
      * @param orderId
      * @return
      */
@@ -2605,7 +2604,6 @@ public class KwtWaybillOrderService {
 
     /**
      * 托运数据统计
-     *
      * @param orderId
      * @return
      */
@@ -2649,7 +2647,6 @@ public class KwtWaybillOrderService {
 
     /**
      * 查询已排量、待运量数据
-     *
      * @param orderId 物流订单id
      * @return
      */

+ 1 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/TransportCommonService.java

@@ -399,7 +399,7 @@ public class TransportCommonService {
             //未完成的量
             BigDecimal subtract = amount.subtract(loadAmount);
             //.setScale(2,BigDecimal.ROUND_HALF_DOWN)
-            BigDecimal add = order.getSubcontractAmount().add(subtract);
+            BigDecimal add = order.getSubcontractAmount().subtract(amount);
             logisticsOrderMapper.update(null, new LambdaUpdateWrapper<KwtLogisticsOrder>()
                     .eq(KwtLogisticsOrder::getId, order.getId())
                     .set(KwtLogisticsOrder::getDelFlag, NumberConstant.ZERO)

+ 1 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/WaybillManagementService.java

@@ -93,7 +93,7 @@ public class WaybillManagementService {
         Criteria criteria = new Criteria();
         //criteria.and("wOrderId").is(id);
         criteria.and("_id").is(id);
-        criteria.and("entId").is(LoginUserHolder.getEntId());
+//        criteria.and("entId").is(LoginUserHolder.getAuthUserIdList());
         criteria.and("delFlag").is(NumberConstant.ZERO);
         Query queryFormat = new Query(criteria);
         SckwWaybillOrder info = mongoTemplate.findOne(queryFormat, SckwWaybillOrder.class);

+ 12 - 1
sckw-modules/sckw-transport/src/main/resources/mapper/KwtLogisticsOrderMapper.xml

@@ -787,6 +787,12 @@
         <if test="id != null and id != ''">
             and id = #{id, jdbcType=BIGINT}
         </if>
+        <if test="pid != null and pid != ''">
+            and pid in (#{pid, jdbcType=VARCHAR})
+        </if>
+        <if test="status != null and status != ''">
+            and status = #{status, jdbcType=INTEGER}
+        </if>
         <if test="upperlOrderId != null and upperlOrderId != ''">
             and FIND_IN_SET(#{upperlOrderId, jdbcType=BIGINT}, pids)
         </if>
@@ -802,8 +808,11 @@
                 or FIND_IN_SET(id, #{currentlOrderId, jdbcType=VARCHAR})
             )
         </if>
-
+        <if test="checkEntId != null and checkEntId != ''">
+            and id in (select l_order_id from kwt_logistics_order_unit where unit_type = 1 and top_ent_id = #{checkEntId, jdbcType=BIGINT})
+        </if>
     </select>
+
     <select id="selectOrderCountByTorderId" resultType="com.sckw.transport.model.dto.LogisticsOrderDTO">
         SELECT a.id          as lOrderId,
                a.l_order_no  as lOrderNo,
@@ -1888,6 +1897,7 @@
         <if test="topEntId != null and topEntId != ''">
             AND ( b.ent_id = #{topEntId} OR b.top_ent_id = #{topEntId} )
         </if>
+        AND b.unit_type=#{unitType}
         And a.status in
         <foreach collection="orderList" open="(" close=")" separator="," item="item">
             #{item}
@@ -2603,4 +2613,5 @@
             and FIND_IN_SET(id, #{belowlOrderId, jdbcType=VARCHAR})
         </if>
     </select>
+
 </mapper>

+ 9 - 1
sckw-modules/sckw-transport/src/main/resources/mapper/KwtWaybillOrderMapper.xml

@@ -644,7 +644,7 @@
         kwo.id worderId, kwo.w_order_no worderNo, kwo.l_order_id lOrderId, kwo.type, kwo.ent_id carrierEntId, kwo.start_time startTime,
         kwo.end_time endTime, kwo.entrust_amount entrustAmount, kwo.load_amount loadAmount, kwo.unload_amount unloadAmount,
         kwo.deficit_amount deficitAmount, kwo.deficit_price deficitPrice, kwo.truck_id truckId, kwo.truck_no truckNo, kwo.status,
-        kwo.create_time createTime, kwo.driver_id driverId, kwo.driver_name driverName, kwo.driver_phone driverPhone
+        kwo.create_time createTime, kwo.driver_id driverId, kwo.driver_name driverName, kwo.driver_phone driverPhone, kwo.ent_id entId
         FROM kwt_waybill_order kwo
         where kwo.del_flag = 0
         <if test="tOrderId != null and tOrderId != ''">
@@ -671,6 +671,14 @@
         <if test="busStatus != null and busStatus == 4">
             and kwo.status in (7, 8, 9, 10, 12, 13)
         </if>
+        <choose>
+            <when test="lOrderIds != null and lOrderIds != '' and lOrderIds.size() > 0">
+                and kwo.l_order_id in
+                <foreach collection="lOrderIds" item="lOrderId" open="(" close=")" separator=",">
+                    #{lOrderId,jdbcType=BIGINT}
+                </foreach>
+            </when>
+        </choose>
     </select>
 
     <select id="selectInvalidWaybillOrderCarListGroupByTruckNo" resultType="com.sckw.transport.model.dto.OrderCarDTO">