Преглед изворни кода

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

czh пре 2 година
родитељ
комит
21089836af
20 измењених фајлова са 489 додато и 366 уклоњено
  1. 28 1
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/FileUtils.java
  2. 2 2
      sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/utils/DateUtil.java
  3. 8 8
      sckw-common/sckw-common-mongo/src/main/java/com/sckw/mongo/model/SckwLogisticsOrder.java
  4. 4 2
      sckw-modules/sckw-operation/src/main/java/com/sckw/operation/service/BannerService.java
  5. 1 3
      sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsImageService.java
  6. 2 27
      sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java
  7. 3 3
      sckw-modules/sckw-report/src/main/java/com/sckw/report/service/vo/AcceptCarriageOrderVo.java
  8. 3 3
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/KwtLogisticsOrder.java
  9. 11 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/AcceptCarriageOrderVO.java
  10. 14 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/ConsignOrderVO.java
  11. 3 3
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/OrderDetailVO.java
  12. 21 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/SubcontractConsignmentVO.java
  13. 148 123
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/AcceptCarriageOrderExcelVo.java
  14. 144 118
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/ConsignOrderExcelVo.java
  15. 23 16
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/AcceptCarriageOrderService.java
  16. 36 28
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/ConsignOrderService.java
  17. 17 15
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/LogisticsConsignmentService.java
  18. 3 3
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/WaybillManagementService.java
  19. 17 11
      sckw-modules/sckw-transport/src/main/resources/mapper/KwtLogisticsOrderMapper.xml
  20. 1 0
      sckw-modules/sckw-transport/src/main/resources/mapper/KwtWaybillOrderMapper.xml

+ 28 - 1
sckw-common/sckw-common-core/src/main/java/com/sckw/core/utils/FileUtils.java

@@ -129,7 +129,7 @@ public class FileUtils {
      */
     public static String getOSSAddressPrefix() {
         defalutOSS();
-        return StringConstant.HTTP_STRING
+        return StringConstant.HTTPS_STRING
                 + StringConstant.COLON
                 + StringConstant.LEFT_SEPARATORS
                 + bucketName
@@ -138,6 +138,33 @@ public class FileUtils {
                 + StringConstant.LEFT_SEPARATOR;
     }
 
+    /**
+     * 分割上传地址 目前仅用于oss
+     *
+     * @param replace 上传的绝对路径
+     * @return 分割后的相对路径
+     */
+    public static String replaceAll(String replace) {
+        if (StringUtils.isBlank(replace)) {
+            return null;
+        }
+        return replace.replaceAll(getOSSAddressPrefix(), "");
+    }
+
+    /**
+     * 拼接上传地址 目前仅用于oss
+     *
+     * @param replace 相对路径url
+     * @return 绝对路径url
+     */
+    public static String splice(String replace) {
+        StringBuilder stringBuilder = new StringBuilder();
+        if (StringUtils.isBlank(replace)) {
+            return null;
+        }
+        return stringBuilder.append(getOSSAddressPrefix()).append(BASE_DIR).append(replace).toString();
+    }
+
     /**
      * 获取指定文件或文件夹的后缀名
      *

+ 2 - 2
sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/utils/DateUtil.java

@@ -76,14 +76,14 @@ public class DateUtil {
         return format;
     }
 
-    public static LocalDateTime localDateToLocalDateEnd(LocalDate date) {
+    public static LocalDateTime localDateToLocalDateTimeEnd(LocalDate date) {
         String str = dateToStr(date, "yyyy-MM-dd") + " 23:59:59";
 //        LocalDate localDate = parseLocalDate(str);
         LocalDateTime localDateTime = LocalDateTime.parse(str, YYYY_MM_DD_HH_MM_SS);
         return localDateTime;
     }
 
-    public static LocalDateTime localDateToLocalDateStart(LocalDate date) {
+    public static LocalDateTime localDateToLocalDateTimeStart(LocalDate date) {
         String str = dateToStr(date, "yyyy-MM-dd") + " 00:00:00";
 //        LocalDate localDate = parseLocalDate(str);
         LocalDateTime localDateTime = LocalDateTime.parse(str, YYYY_MM_DD_HH_MM_SS);

+ 8 - 8
sckw-common/sckw-common-mongo/src/main/java/com/sckw/mongo/model/SckwLogisticsOrder.java

@@ -10,7 +10,7 @@ import org.springframework.data.mongodb.core.mapping.Document;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
-import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.Date;
 
 /**
@@ -485,14 +485,14 @@ public class SckwLogisticsOrder {
      * 计划开始时间
      */
 //    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
-    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
-    private LocalDate startTime;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+//    @DateTimeFormat(pattern = "yyyy-MM-dd")
+//    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDateTime startTime;
     /**
      * 计划结束时间
      */
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
-    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
-    private LocalDate endTime;
+//    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private LocalDateTime endTime;
 }

+ 4 - 2
sckw-modules/sckw-operation/src/main/java/com/sckw/operation/service/BannerService.java

@@ -83,13 +83,15 @@ public class BannerService {
         wrapper.eq(Objects.nonNull(reqVo.getStatus()), KwoBanner::getStatus, reqVo.getStatus()).
                 eq(KwoBanner::getDelFlag, Global.NO).
                 and(StringUtils.isNotBlank(reqVo.getKeywords()),
-                        wq -> wq.like(KwoBanner::getUrl, reqVo.getKeywords()).or().
-                                like(KwoBanner::getClientType, reqVo.getKeywords())).
+                        wq -> wq.like(KwoBanner::getUrl, reqVo.getKeywords())).
                 orderByDesc(KwoBanner::getDistrict,KwoBanner::getSort);
 
         if (Objects.nonNull(reqVo.getStartTime())) {
             wrapper.ge(KwoBanner::getStartTime, reqVo.getStartTime());
         }
+        if(Objects.nonNull(reqVo.getDistrict())) {
+            wrapper.eq(KwoBanner::getDistrict, reqVo.getDistrict());
+        }
 
         if (Objects.nonNull(reqVo.getEndTime())) {
             wrapper.lt(KwoBanner::getEntTime, DateUtil.offsetDay(reqVo.getEndTime(), 1));

+ 1 - 3
sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsImageService.java

@@ -3,7 +3,6 @@ package com.sckw.product.service;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.sckw.core.model.constant.Global;
-import com.sckw.core.utils.CollectionUtils;
 import com.sckw.product.dao.KwpGoodsImageMapper;
 import com.sckw.product.model.KwpGoodsImage;
 import lombok.RequiredArgsConstructor;
@@ -46,8 +45,7 @@ public class KwpGoodsImageService {
         LambdaQueryWrapper<KwpGoodsImage> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(KwpGoodsImage::getGoodsId, goodsId).eq(KwpGoodsImage::getDelFlag, Global.NO)
                 .orderByAsc(KwpGoodsImage::getSort);
-        List<KwpGoodsImage> list = kwpGoodsImageMapper.selectList(wrapper);
-        return CollectionUtils.emptyIfNull(list);
+        return kwpGoodsImageMapper.selectList(wrapper);
     }
 
     /**

+ 2 - 27
sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java

@@ -86,8 +86,6 @@ public class KwpGoodsService {
     private String pcGoodsListUrl;
     @Value("${goods.url.list.app}")
     private String appGoodsListUrl;
-    @Value("${filePathPrefix}")
-    private String pathPrefix;
 
 
     /**
@@ -220,8 +218,7 @@ public class KwpGoodsService {
             RecommendGoods recommendGoods = BeanUtils.copyProperties(e, RecommendGoods.class);
             List<KwpGoodsPriceRange> prices = map.get(recommendGoods.getId());
             recommendGoods.setUnitLabel(CollectionUtils.isNotEmpty(unitMap) ? unitMap.get(recommendGoods.getUnit()) : null)
-                    .setPrice(CollectionUtils.isNotEmpty(prices) ? prices.get(0).getPrice() : null)
-                    .setThumb(StringUtils.isNotEmpty(e.getThumb()) ? pathPrefix + e.getThumb() : null);
+                    .setPrice(CollectionUtils.isNotEmpty(prices) ? prices.get(0).getPrice() : null);
             recommendGoodsList.add(recommendGoods);
         });
         detail.setRecommendGoodsList(recommendGoodsList);
@@ -275,16 +272,7 @@ public class KwpGoodsService {
                 .setStatusLabel(CollectionUtils.isNotEmpty(goodsStatusMap) ? goodsStatusMap.get(String.valueOf(detail.getStatus())) : null)
                 .setPrepaidLimitLabel(Objects.equals(detail.getPrepaidLimit(), 1) ? "是" : "否");
         //商品图片信息
-        if (Objects.nonNull(goods.getThumb())) {
-            detail.setThumb(pathPrefix + goods.getThumb());
-        }
         List<KwpGoodsImage> goodsImages = kwpGoodsImageService.getByGoodsId(id);
-        goodsImages.forEach(e -> {
-            String image = e.getImage();
-            if (StringUtils.isNotEmpty(image)) {
-                e.setImage(pathPrefix + image);
-            }
-        });
         List<GoodsImagesDetail> images = BeanUtils.copyToList(goodsImages, GoodsImagesDetail.class);
         //商品价格段信息
         List<KwpGoodsPriceRange> priceRanges = kwpGoodsPriceRangeService.getByGoodsId(id);
@@ -720,7 +708,6 @@ public class KwpGoodsService {
                     .setAddress(addressMap.get(id)).setSupplyEnt(entMap.get(e.getSupplyEntId()))
                     .setManageName(Objects.nonNull(manager) ? manager.getName() : null)
                     .setPhone(Objects.nonNull(manager) ? manager.getPhone() : null)
-                    .setThumb(Objects.nonNull(e.getThumb()) ? pathPrefix + e.getThumb() : null)
                     .setCreateByName(Objects.nonNull(createUser) ? createUser.getName() : null);
             List<KwpGoodsPriceRange> priceRanges = priceRangeMap.get(id);
             if (CollectionUtils.isNotEmpty(priceRanges)) {
@@ -928,7 +915,6 @@ public class KwpGoodsService {
                     .setAddressName(Objects.isNull(address) ? null : address.getCityName())
                     .setDetailAddress(Objects.isNull(address) ? null : address.getDetailAddress())
                     .setPrice(CollectionUtils.isEmpty(priceRanges) ? null : priceRanges.get(0).getPrice())
-                    .setThumb(StringUtils.isNotEmpty(e.getThumb()) ? pathPrefix + e.getThumb() : null)
                     .setSupplyEnt(entMap.get(e.getSupplyEntId()));
             result.add(materials);
         });
@@ -1006,11 +992,7 @@ public class KwpGoodsService {
      * @return: java.util.List<com.sckw.product.model.KwpGoods>
      */
     public KwpGoods selectById(Long id) {
-        KwpGoods goods = kwpGoodsMapper.selectById(id);
-        if (Objects.nonNull(goods) && StringUtils.isNotBlank(goods.getThumb())) {
-            goods.setThumb(pathPrefix + goods.getThumb());
-        }
-        return goods;
+        return kwpGoodsMapper.selectById(id);
     }
 
 
@@ -1023,13 +1005,6 @@ public class KwpGoodsService {
      */
     public List<KwpGoods> selectByIds(List<Long> ids) {
         List<KwpGoods> list = kwpGoodsMapper.selectBatchIds(ids);
-        if (CollectionUtils.isNotEmpty(list)) {
-            list.forEach(e -> {
-                if (StringUtils.isNotBlank(e.getThumb())) {
-                    e.setThumb(pathPrefix + e.getThumb());
-                }
-            });
-        }
         return CollectionUtils.emptyIfNull(list);
     }
 

+ 3 - 3
sckw-modules/sckw-report/src/main/java/com/sckw/report/service/vo/AcceptCarriageOrderVo.java

@@ -6,7 +6,7 @@ import com.sckw.core.model.page.PageRequest;
 import lombok.Data;
 
 import java.math.BigDecimal;
-import java.time.LocalDate;
+import java.time.LocalDateTime;
 
 /**
  * @author lfdc
@@ -132,7 +132,7 @@ public class AcceptCarriageOrderVo extends PageRequest {
      * 计划收货时间
      */
     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
-    private LocalDate receiveGoodsDateTime;
+    private LocalDateTime receiveGoodsDateTime;
     /**
      * 收货电话
      */
@@ -149,7 +149,7 @@ public class AcceptCarriageOrderVo extends PageRequest {
      * 计划发货时间
      */
     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
-    private LocalDate shipmentsDateTime;
+    private LocalDateTime shipmentsDateTime;
     /**
      * 发货电话
      */

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

@@ -10,7 +10,7 @@ import lombok.Data;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
-import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.Date;
 
 /**
@@ -123,12 +123,12 @@ public class KwtLogisticsOrder implements Serializable {
     /**
      * 计划开始日期
      */
-    private LocalDate startTime;
+    private LocalDateTime startTime;
 
     /**
      * 计划结束日期
      */
-    private LocalDate endTime;
+    private LocalDateTime endTime;
 
     /**
      * 分包量

+ 11 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/AcceptCarriageOrderVO.java

@@ -94,6 +94,17 @@ public class AcceptCarriageOrderVO /*extends PageRequest*/ {
      * 货物名称
      */
     private String goodsName;
+
+    /**
+     * 装货名称
+     */
+    private String loadName;
+
+    /**
+     * 装货名称
+     */
+    private String unloadName;
+
     /**
      * 装货地点
      */

+ 14 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/ConsignOrderVO.java

@@ -14,6 +14,16 @@ import java.time.LocalDate;
  */
 @Data
 public class ConsignOrderVO /*extends PageRequest*/ {
+
+    /**
+     * 装货地点名称
+     */
+    private String loadName;
+
+    /**
+     * 卸货地点名称
+     */
+    private String unloadName;
     /**
      * 结算周期
      */
@@ -26,6 +36,10 @@ public class ConsignOrderVO /*extends PageRequest*/ {
      * 发起人
      */
     private String appointor;
+    /**
+     * 订单来源
+     */
+    private String orderSource;
 
     /**
      * 创建人id

+ 3 - 3
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/OrderDetailVO.java

@@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 
 import java.math.BigDecimal;
-import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.Date;
 
 /**
@@ -129,12 +129,12 @@ public class OrderDetailVO {
      * 计划结束时间
      */
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
-    private LocalDate scheduleEndTime;
+    private LocalDateTime scheduleEndTime;
     /**
      * 计划开始时间
      */
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
-    private LocalDate scheduleStartTime;
+    private LocalDateTime scheduleStartTime;
     /**
      * 结算周期
      */

+ 21 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/SubcontractConsignmentVO.java

@@ -12,6 +12,27 @@ import java.util.Date;
  */
 @Data
 public class SubcontractConsignmentVO {
+
+    /**
+     * 装货地点名称
+     */
+    private String loadName;
+
+    /**
+     * 装货地点名称卸货地点名称
+     */
+    private String unloadName;
+
+    /**
+     * 订单来源
+     */
+    private String orderSource;
+
+    /**
+     * 订单来源
+     */
+    private String orderSourceLabel;
+
     /**
      * 状态
      */

+ 148 - 123
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/AcceptCarriageOrderExcelVo.java

@@ -7,7 +7,7 @@ import com.sckw.excel.annotation.ExcelContext;
 import lombok.Data;
 
 import java.math.BigDecimal;
-import java.time.LocalDate;
+import java.time.LocalDateTime;
 
 /**
  * @author lfdc
@@ -19,223 +19,252 @@ import java.time.LocalDate;
 public class AcceptCarriageOrderExcelVo {
 
     /**
-     * 结算周期
+     * 状态
      */
-    @ExcelProperty(value = "结算周期")
-    private String accountsCycleLabel;
+    @ExcelProperty(value = "状态")
+    private String statusLabel;
 
     /**
-     * 发起人
+     * 承运订单号
      */
-    @ExcelProperty(value = "发起人")
-    private String appointor;
+    @JsonProperty("lOrderNo")
+    @ExcelProperty(value = "承运订单号")
+    private String lOrderNo;
 
     /**
-     * 计费方式
+     * 托运单位
      */
-    @ExcelProperty(value = "计费方式")
-    private String billingModeLabel;
+    @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 String loadAddress;
+
     /**
-     * 货物名称
+     * 地址明细
      */
-    @ExcelProperty(value = "货物名称")
-    private String goodsName;
+    @ExcelProperty(value = "地址明细")
+    private String loadAddressDetail;
+
     /**
-     * 装货地点
+     * 卸货地点名称
      */
-    @ExcelProperty(value = "装货地点")
-    private String loadAddress;
+    @ExcelProperty(value = "卸货地点名称")
+    private String unloadAddress;
 
     /**
-     * 承运订单号
+     * 地址明细
      */
-    @JsonProperty("lOrderNo")
-    @ExcelProperty(value = "托运订单号")
-    private String lOrderNo;
+    @ExcelProperty(value = "地址明细")
+    private String unloadAddressDetail;
 
     /**
-     *  贸易订单编号
+     * 订单来源翻译
      */
-    @JsonProperty("tOrderNo")
-    @ExcelProperty(value = "贸易订单编号")
-    private String tOrderNo;
+    @ExcelProperty(value = "订单来源")
+    private String orderSourceLabel;
 
     /**
-     * 合理损耗单位
+     * 发货单位
      */
-    @ExcelProperty(value = "合理损耗")
-    private String lossUnitLabel;
+    @ExcelProperty(value = "发货单位")
+    private String shipmentsUnit;
 
     /**
-     * 运价
+     * 收货单位
      */
-    @ExcelProperty(value = "运价")
-    private String priceLabel;
+    @ExcelProperty(value = "收货单位")
+    private String receiveGoodsUnit;
 
     /**
-     * 收货联系人
+     * 计费方式
      */
-    @ExcelProperty(value = "收货联系人")
-    private String receiveGoodsContacts;
+    @ExcelProperty(value = "计费方式")
+    private String billingModeLabel;
 
     /**
-     * 计划收货时间
+     * 合理损耗单位
      */
-    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
-    @ExcelProperty(value = "计划收货时间")
-    private LocalDate receiveGoodsDateTime;
+    @ExcelProperty(value = "合理损耗")
+    private String lossUnitLabel;
 
     /**
-     * 收货电话
+     * 扣亏货值/元/吨
      */
-    @ExcelProperty(value = "收货电话")
-    private String receiveGoodsPhone;
+    @ExcelProperty(value = "扣亏货值/元/吨")
+    private BigDecimal deficitAmount;
 
     /**
-     * 备注
+     * 结算周期
      */
-    @ExcelProperty(value = "备注")
-    private String remark;
+    @ExcelProperty(value = "结算周期")
+    private String accountsCycleLabel;
 
     /**
-     * 发货联系人
+     * 承运联系人
      */
-    @ExcelProperty(value = "发货联系人")
-    private String shipmentsContacts;
+    @ExcelProperty(value = "承运联系人")
+    private String carrierContacts;
 
     /**
-     * 计划发货时间
+     * 承运联系电话
      */
-    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
-    @ExcelProperty(value = "计划发货时间")
-    private LocalDate shipmentsDateTime;
+    @ExcelProperty(value = "承运联系电话")
+    private String carrierPhone;
 
     /**
-     * 发货电话
+     * 托运联系人
      */
-    @ExcelProperty(value = "发货电话")
-    private String shipmentsPhone;
+    @ExcelProperty(value = "托运联系人")
+    private String consignContacts;
 
     /**
-     * 签约方式
+     * 托运联系电话
      */
-    @ExcelProperty(value = "签约方式")
-    private String signingLabel;
+    @ExcelProperty(value = "托运联系电话")
+    private String consignPhone;
 
     /**
-     * 状态
+     * 装货点联系人
      */
-    @ExcelProperty(value = "状态")
-    private String statusLabel;
+    @ExcelProperty(value = "装货点联系人")
+    private String shipmentsContacts;
 
     /**
-     * 卸货地点
+     * 联系电话
      */
-    @ExcelProperty(value = "卸货地点")
-    private String unloadAddress;
-
-    @ExcelProperty(value = "创建时间")
-    private String createTime;
-
-    @ExcelProperty(value = "修改时间")
-    private String updateTime;
+    @ExcelProperty(value = "联系电话")
+    private String shipmentsPhone;
 
     /**
-     * 发货单位
+     * 卸货点联系人
      */
-    @ExcelProperty(value = "发货单位")
-    private String shipmentsUnit;
+    @ExcelProperty(value = "卸货点联系人")
+    private String receiveGoodsContacts;
 
     /**
-     * 收货单位
+     * 联系电话
      */
-    @ExcelProperty(value = "收货单位")
-    private String receiveGoodsUnit;
+    @ExcelProperty(value = "联系电话")
+    private String receiveGoodsPhone;
 
     /**
-     * 商品价值(扣亏货值)
+     * 计划开始时间
      */
-    @ExcelProperty(value = "扣亏货值")
-    private String goodsPriceLabel;
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @ExcelProperty(value = "计划开始时间")
+    private LocalDateTime shipmentsDateTime;
 
     /**
-     * 装货量
+     * 计划结束时间
      */
-    @ExcelProperty(value = "装货量")
-    private String loadAmount;
-
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @ExcelProperty(value = "计划结束时间")
+    private LocalDateTime receiveGoodsDateTime;
 
     /**
-     * 待分配量(amount-subcontract_amount-entrust_amount)
+     * 关联合同
      */
-    @ExcelProperty(value = "待分配量")
-    private String waitDistributionAmount;
+    @ExcelProperty(value = "关联合同")
+    private String contract;
 
     /**
-     * 分包量(给下游承运商分包的量)
+     * 备注
      */
-    @ExcelProperty(value = "分包量")
-    private String subcontractAmount;
+    @ExcelProperty(value = "备注")
+    private String remark;
 
     /**
-     * 已委托量(自己承运,给下游司机分配的量)
+     * 创建人
      */
-    @ExcelProperty(value = "已委托量")
-    private String entrustAmount;
+    @ExcelProperty(value = "创建人")
+    private String appointor;
 
     /**
-     * 卸货量
+     * 创建时间
      */
-    @ExcelProperty(value = "卸货量")
-    private String unloadAmount;
+    @ExcelProperty(value = "创建时间")
+    private String createTime;
+
+//    /**
+//     *  贸易订单编号
+//     */
+//    @JsonProperty("tOrderNo")
+//    @ExcelProperty(value = "贸易订单编号")
+//    private String tOrderNo;
+//
+//    /**
+//     * 签约方式
+//     */
+//    @ExcelProperty(value = "签约方式")
+//    private String signingLabel;
+//
+//    @ExcelProperty(value = "修改时间")
+//    private String updateTime;
+//
+//    /**
+//     * 商品价值(扣亏货值)
+//     */
+//    @ExcelProperty(value = "扣亏货值")
+//    private String goodsPriceLabel;
+//
+//    /**
+//     * 分包量(给下游承运商分包的量)
+//     */
+//    @ExcelProperty(value = "分包量")
+//    private String subcontractAmount;
+//
+//    /**
+//     * 已委托量(自己承运,给下游司机分配的量)
+//     */
+//    @ExcelProperty(value = "已委托量")
+//    private String entrustAmount;
+
 
 
 //    /**
@@ -248,11 +277,7 @@ public class AcceptCarriageOrderExcelVo {
 //     */
 //    private String orderSource;
 
-    /**
-     * 订单来源翻译
-     */
-    @ExcelProperty(value = "订单来源")
-    private String orderSourceLabel;
+
 
 
 //    /**

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

@@ -18,224 +18,250 @@ import java.time.LocalDate;
 @Data
 @ExcelContext(fileName = "托运订单列表", sheetName = "托运订单列表")
 public class ConsignOrderExcelVo implements Serializable {
+
     /**
-     * 结算周期
+     * 状态
      */
-    @ExcelProperty(value = "结算周期")
-    private String accountsCycleLabel;
+    @ExcelProperty(value = "状态")
+    private String statusLabel;
 
     /**
-     * 发起人
+     * 托运订单号
      */
-    @ExcelProperty(value = "发起人")
-    private String appointor;
+    @JsonProperty("lOrderNo")
+    @ExcelProperty(value = "托运订单号")
+    private String lOrderNo;
 
     /**
-     * 计费方式
+     * 托运单位
      */
-    @ExcelProperty(value = "计费方式")
-    private String billingModeLabel;
+    @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;
 
     /**
-     * 托运单位
-     */
-    @ExcelProperty(value = "托运单位")
-    private String consignCompany;
-    /**
-     * 托运联系人
+     * 待分配量(amount-subcontract_amount-entrust_amount)
      */
-    @ExcelProperty(value = "托运联系人")
-    private String consignContacts;
+    @ExcelProperty(value = "待分配量")
+    private String waitDistributionAmount;
+
     /**
-     * 托运联系电话
+     * 实装量
      */
-    @ExcelProperty(value = "托运联系电话")
-    private String consignPhone;
+    @ExcelProperty(value = "实装量")
+    private String loadAmount;
+
     /**
-     * 合同
+     * 卸货量
      */
-    @ExcelProperty(value = "合同")
-    private String contract;
+    @ExcelProperty(value = "卸货量")
+    private String unloadAmount;
 
     /**
-     * 扣亏货值/元/吨
+     * 运价
      */
-    @ExcelProperty(value = "扣亏货值")
-    private BigDecimal deficitAmount;
+    @ExcelProperty(value = "运价")
+    private String priceLabel;
+
     /**
-     * 货物名称
+     * 装货地点名称
      */
-    @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 String receiveGoodsContacts;
+    @ExcelProperty(value = "收货单位")
+    private String receiveGoodsUnit;
 
     /**
-     * 计划收货时间
+     * 计费方式
      */
-    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
-    @ExcelProperty(value = "计划收货时间")
-    private LocalDate receiveGoodsDateTime;
+    @ExcelProperty(value = "计费方式")
+    private String billingModeLabel;
 
     /**
-     * 收货电话
+     * 合理损耗单位
      */
-    @ExcelProperty(value = "收货电话")
-    private String receiveGoodsPhone;
+    @ExcelProperty(value = "合理损耗")
+    private String lossUnitLabel;
 
     /**
-     * 备注
+     * 扣亏货值/元/吨
      */
-    @ExcelProperty(value = "备注")
-    private String remark;
+    @ExcelProperty(value = "扣亏货值")
+    private BigDecimal deficitAmount;
 
     /**
-     * 发货联系人
+     * 结算周期
      */
-    @ExcelProperty(value = "发货联系人")
-    private String shipmentsContacts;
+    @ExcelProperty(value = "结算周期")
+    private String accountsCycleLabel;
 
     /**
-     * 计划发货时间
+     * 承运联系人
      */
-    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
-    @ExcelProperty(value = "计划发货时间")
-    private LocalDate shipmentsDateTime;
+    @ExcelProperty(value = "承运联系人")
+    private String carrierContacts;
 
     /**
-     * 发货电话
+     * 承运联系电话
      */
-    @ExcelProperty(value = "发货电话")
-    private String shipmentsPhone;
+    @ExcelProperty(value = "承运联系电话")
+    private String carrierPhone;
 
     /**
-     * 签约方式
+     * 托运联系人
      */
-    @ExcelProperty(value = "签约方式")
-    private String signingLabel;
+    @ExcelProperty(value = "托运联系人")
+    private String consignContacts;
 
     /**
-     * 状态
+     * 托运联系电话
      */
-    @ExcelProperty(value = "状态")
-    private String statusLabel;
+    @ExcelProperty(value = "托运联系电话")
+    private String consignPhone;
 
     /**
-     * 卸货地点
+     * 发货联系人/装货联系人
      */
-    @ExcelProperty(value = "卸货地点")
-    private String unloadAddress;
-
-    @ExcelProperty(value = "创建时间")
-    private String createTime;
-
-    @ExcelProperty(value = "修改时间")
-    private String updateTime;
+    @ExcelProperty(value = "装货联系人")
+    private String shipmentsContacts;
 
     /**
-     * 发货单位
+     * 发货电话
      */
-    @ExcelProperty(value = "发货单位")
-    private String shipmentsUnit;
+    @ExcelProperty(value = "联系电话")
+    private String shipmentsPhone;
 
     /**
-     * 收货单位
+     * 收货联系人/卸货点联系人
      */
-    @ExcelProperty(value = "收货单位")
-    private String receiveGoodsUnit;
+    @ExcelProperty(value = "卸货点联系人")
+    private String receiveGoodsContacts;
 
     /**
-     * 商品价值(扣亏货值)
+     * 收货电话
      */
-    @ExcelProperty(value = "扣亏货值")
-    private String goodsPriceLabel;
+    @ExcelProperty(value = "收货电话")
+    private String receiveGoodsPhone;
 
     /**
-     * 装货量
+     * 计划发货时间/计划开始时间
      */
-    @ExcelProperty(value = "装货量")
-    private String loadAmount;
-
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @ExcelProperty(value = "计划开始时间")
+    private LocalDate shipmentsDateTime;
 
     /**
-     * 待分配量(amount-subcontract_amount-entrust_amount)
+     * 计划收货时间/计划结束时间
      */
-    @ExcelProperty(value = "待分配量")
-    private String waitDistributionAmount;
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @ExcelProperty(value = "计划收货时间")
+    private LocalDate receiveGoodsDateTime;
 
     /**
-     * 分包量(给下游承运商分包的量)
+     * 合同
      */
-    @ExcelProperty(value = "分包量")
-    private String subcontractAmount;
+    @ExcelProperty(value = "合同")
+    private String contract;
 
     /**
-     * 已委托量(自己承运,给下游司机分配的量)
+     * 创建人
      */
-    @ExcelProperty(value = "已委托量")
-    private String entrustAmount;
+    @ExcelProperty(value = "创建人")
+    private String appointor;
+
+    @ExcelProperty(value = "创建时间")
+    private String createTime;
 
     /**
-     * 卸货量
+     * 备注
      */
-    @ExcelProperty(value = "卸货量")
-    private String unloadAmount;
+    @ExcelProperty(value = "备注")
+    private String remark;
+
+//    /**
+//     *  贸易订单编号
+//     */
+//    @JsonProperty("tOrderNo")
+//    @ExcelProperty(value = "贸易订单编号")
+//    private String tOrderNo;
+//
+//    /**
+//     * 签约方式
+//     */
+//    @ExcelProperty(value = "签约方式")
+//    private String signingLabel;
+//
+//    @ExcelProperty(value = "修改时间")
+//    private String updateTime;
+//
+//    /**
+//     * 商品价值(扣亏货值)
+//     */
+//    @ExcelProperty(value = "扣亏货值")
+//    private String goodsPriceLabel;
+//
+//    /**
+//     * 分包量(给下游承运商分包的量)
+//     */
+//    @ExcelProperty(value = "分包量")
+//    private String subcontractAmount;
+//
+//    /**
+//     * 已委托量(自己承运,给下游司机分配的量)
+//     */
+//    @ExcelProperty(value = "已委托量")
+//    private String entrustAmount;
 
 //    /**
 //     * 结算周期

+ 23 - 16
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/AcceptCarriageOrderService.java

@@ -639,8 +639,8 @@ public class AcceptCarriageOrderService {
         order.setGoodsPriceUnit(remoteSystemService.queryDictByTypeAndValue(DictTypeEnum.PRICE_TYPE.getType(), bo.getGoodsPriceUnit()) == null ?
                 null : remoteSystemService.queryDictByTypeAndValue(DictTypeEnum.PRICE_TYPE.getType(), bo.getGoodsPriceUnit()).getValue());
 //        order.setGoodsPriceUnit(bo.getGoodsPriceUnit());
-        order.setStartTime(bo.getShipmentsDateTime());
-        order.setEndTime(bo.getReceiveGoodsDateTime());
+        order.setStartTime(bo.getShipmentsDateTime() == null ? null : DateUtil.localDateToLocalDateTimeStart(bo.getShipmentsDateTime()));
+        order.setEndTime(bo.getReceiveGoodsDateTime() == null ? null : DateUtil.localDateToLocalDateTimeEnd(bo.getReceiveGoodsDateTime()));
         order.setRemark(bo.getRemark());
         order.setPayment(Long.parseLong(bo.getPayment()));
         order.setTaxRate(new BigDecimal(bo.getTaxRate()));
@@ -989,6 +989,8 @@ public class AcceptCarriageOrderService {
         Map<String, String> chargingDictData = getDictData(DictTypeEnum.CHARGING_TYPE.getType());
         /**结算周期*/
         Map<String, String> settlementDictData = getDictData(DictTypeEnum.SETTLEMENT_CYCLE.getType());
+        /**订单来源*/
+        Map<String, String> orderSource = getDictData(DictTypeEnum.ORDER_SOURCE.getType());
         List<SubcontractConsignmentVO> allList = new ArrayList<>();
         List<SubcontractConsignmentVO> voList = logisticsOrderMapper.getSubcontractConsignmentList(ids);
         if (CollectionUtils.isEmpty(voList)) {
@@ -1033,6 +1035,7 @@ public class AcceptCarriageOrderService {
                 }
                 subcontractConsignmentVO.setLoadAddressDetail(subcontractConsignmentVO.getLoadCityName() + subcontractConsignmentVO.getLoadAddress());
                 subcontractConsignmentVO.setUnloadAddressDetail(subcontractConsignmentVO.getUnloadCityName() + subcontractConsignmentVO.getUnloadAddress());
+                subcontractConsignmentVO.setOrderSourceLabel(orderSource == null ? null : orderSource.get(subcontractConsignmentVO.getOrderSource()));
             }
             allList.addAll(voList);
         }
@@ -1133,7 +1136,7 @@ public class AcceptCarriageOrderService {
             return result;
         }
         /**请求参数校验*/
-        checkParam(driverParam);
+//        checkParam(driverParam);
         /**1 趟次 2 循环*/
         Map<String, RTruckVo> truck = new HashMap<>(Global.NUMERICAL_SIXTEEN);
         if (String.valueOf(NumberConstant.ONE).equals(driverParam.getType())) {
@@ -2029,18 +2032,18 @@ public class AcceptCarriageOrderService {
         carriageUnit.setTopEntId(entCacheResDto1 == null ? null : entCacheResDto1.getId());
         carriageUnit.setFirmName(orderDTO.getAcceptCompany());
         carriageUnit.setContactsId(Long.parseLong(orderDTO.getAcceptContactsId()));
-        System.out.println("承运订单新建订单-消息列表推送 start");
+//        System.out.println("承运订单新建订单-消息列表推送 start");
 //        commonService.publicLogisticsConsignmentPushMessage(consignUnit, carriageUnit, lOrderNo, LoginUserHolder.getUserId(), LoginUserHolder.getEntId()
 //                , MessageEnum.CARRIAGE_NEW_LOGISTICS, MessageEnum.CARRIAGE_NEW_LOGISTICS_ORDER);
 
         commonService.newSendLogisticsOrderToMessage(consignUnit, carriageUnit, lOrderNo, LoginUserHolder.getUserId(), LoginUserHolder.getEntId()
-                , messageUrlConfig.getPc().getConsignLogisticsAddOrderUrl(), messageUrlConfig.getPc().getCarriageLogisticsAddOrderUrl()
-                , messageUrlConfig.getApp().getConsignLogisticsAddOrderUrl(), messageUrlConfig.getApp().getCarriageLogisticsAddOrderUrl()
+                , messageUrlConfig.getPc().getConsignLogisticsAddOrderUrl(), messageUrlConfig.getApp().getConsignLogisticsAddOrderUrl()
+                , messageUrlConfig.getPc().getCarriageLogisticsAddOrderUrl(), messageUrlConfig.getApp().getCarriageLogisticsAddOrderUrl()
                 , MessageEnum.NEW_LOGISTICS_ORDER, MessageEnum.NEW_CARRIAGE_ORDER
                 , "1"
         );
 
-        System.out.println("承运订单新建订单-消息列表推送 end ");
+//        System.out.println("承运订单新建订单-消息列表推送 end ");
         return HttpResult.ok();
     }
 
@@ -2182,12 +2185,12 @@ public class AcceptCarriageOrderService {
         order.setUpdateBy(LoginUserHolder.getUserId());
         order.setUpdateByName(LoginUserHolder.getUserName());
         order.setUpdateTime(new Date());
-        order.setWOrderNo(lOrderNo);
+//        order.setWOrderNo(lOrderNo);
         order.setCarryingCapacity(orderDTO.getAmount());
         order.setBillingMode(orderDTO.getBillingMode());
         order.setDelFlag(String.valueOf(NumberConstant.ZERO));
-        order.setStartTime(orderDTO.getStartTime());
-        order.setEndTime(orderDTO.getEndTime());
+        order.setStartTime(orderDTO.getStartTime() == null ? null : DateUtil.localDateToLocalDateTimeStart(orderDTO.getStartTime()));
+        order.setEndTime(orderDTO.getEndTime() == null ? null : DateUtil.localDateToLocalDateTimeEnd(orderDTO.getEndTime()));
         SckwBusSum busSum = new SckwBusSum();
         busSum.setBusSumType(BusinessTypeEnum.LOGISTICS_ORDER_TYPE.getName());
         busSum.setMethod(NumberConstant.ONE);
@@ -2372,9 +2375,9 @@ public class AcceptCarriageOrderService {
         order.setGoodsPrice(orderDTO.getGoodsPrice() == null ? null : orderDTO.getGoodsPrice());
         order.setGoodsPriceUnit(orderDTO.getGoodsPriceUnit());
         order.setStartTime(org.apache.commons.lang3.ObjectUtils.isEmpty(orderDTO.getStartTime()) ?
-                null : orderDTO.getStartTime());
+                null : DateUtil.localDateToLocalDateTimeStart(orderDTO.getStartTime()));
         order.setEndTime(org.apache.commons.lang3.ObjectUtils.isEmpty(orderDTO.getEndTime()) ?
-                null : orderDTO.getEndTime());
+                null : DateUtil.localDateToLocalDateTimeEnd(orderDTO.getEndTime()));
         BigDecimal decimal = new BigDecimal(NumberConstant.ZERO);
         order.setSubcontractAmount(decimal);
         order.setEntrustAmount(decimal);
@@ -2480,6 +2483,8 @@ public class AcceptCarriageOrderService {
             vo.setStatusLabel(LogisticsOrderEnum.getName(vo.getStatus()));
             vo.setLoadAddress(vo.getLoadCityName() + vo.getLoadAddress());
             vo.setUnloadAddress(vo.getUnloadCityName() + vo.getUnloadAddress());
+            vo.setLoadCityName(vo.getLoadName());
+            vo.setUnloadCityName(vo.getUnloadName());
             if (vo.getTOrderId() != null) {
 //                try {
 //                    OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.valueOf(vo.getTOrderId()));
@@ -2716,14 +2721,16 @@ public class AcceptCarriageOrderService {
             BeanUtils.copyProperties(vo, carriageOrderExcelVo);
             carriageOrderExcelVo.setPriceLabel(vo.getPrice() == null ? null : vo.getPrice().toString() + priceType.get(vo.getPriceType()));
             carriageOrderExcelVo.setLossUnitLabel(vo.getLoss() == null ? null : vo.getLoss().toString() + taxRate.get(vo.getLossUnit()));
-            carriageOrderExcelVo.setGoodsPriceLabel(vo.getGoodsPrice() == null ? null : vo.getGoodsPrice().toString() + priceType.get(vo.getGoodsPriceUnit()));
+//            carriageOrderExcelVo.setGoodsPriceLabel(vo.getGoodsPrice() == null ? null : vo.getGoodsPrice().toString() + priceType.get(vo.getGoodsPriceUnit()));
             carriageOrderExcelVo.setAccountsCycleLabel(settlementDictData.get(vo.getAccountsCycle()));
             carriageOrderExcelVo.setAppointor(longUserMap.get(vo.getCreateBy()) == null ? null : longUserMap.get(vo.getCreateBy()).getName());
             carriageOrderExcelVo.setBillingModeLabel(chargingDictData.get(vo.getBillingMode()));
-            carriageOrderExcelVo.setSigningLabel(signingWay.get(vo.getSigning()));
+//            carriageOrderExcelVo.setSigningLabel(signingWay.get(vo.getSigning()));
             carriageOrderExcelVo.setStatusLabel(LogisticsOrderEnum.getName(vo.getStatus()));
             carriageOrderExcelVo.setLoadAddress(vo.getLoadCityName() + vo.getLoadAddress());
             carriageOrderExcelVo.setUnloadAddress(vo.getUnloadCityName() + vo.getUnloadAddress());
+            carriageOrderExcelVo.setLoadAddress(vo.getLoadName());
+            carriageOrderExcelVo.setUnloadAddress(vo.getUnloadName());
             carriageOrderExcelVo.setOrderSourceLabel(orderSource == null ? null : orderSource.get(vo.getOrderSource()));
 //            if (vo.getTOrderId() != null) {
 //                try {
@@ -2766,8 +2773,8 @@ public class AcceptCarriageOrderService {
                     log.error("tradeOrderInfoService.getOrderDetailById error id:{}.errorMessage:{}", vo.getTOrderId(), e.getMessage(), e);
                 }
             }
-            carriageOrderExcelVo.setSubcontractAmount(Objects.isNull(vo.getSubcontractAmount()) ? null : df.format(vo.getSubcontractAmount()) + priceType.get(vo.getPriceType()));
-            carriageOrderExcelVo.setEntrustAmount(Objects.isNull(vo.getEntrustAmount()) ? null : df.format(vo.getEntrustAmount()) + priceType.get(vo.getPriceType()));
+//            carriageOrderExcelVo.setSubcontractAmount(Objects.isNull(vo.getSubcontractAmount()) ? null : df.format(vo.getSubcontractAmount()) + priceType.get(vo.getPriceType()));
+//            carriageOrderExcelVo.setEntrustAmount(Objects.isNull(vo.getEntrustAmount()) ? null : df.format(vo.getEntrustAmount()) + priceType.get(vo.getPriceType()));
             carriageOrderExcelVo.setLoadAmount(Objects.isNull(vo.getLoadAmount()) ? null : df.format(vo.getLoadAmount()) + priceType.get(vo.getPriceType()));
             carriageOrderExcelVo.setUnloadAmount(Objects.isNull(vo.getUnloadAmount()) ? null : df.format(vo.getUnloadAmount()) + priceType.get(vo.getPriceType()));
             exportList.add(carriageOrderExcelVo);

+ 36 - 28
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/ConsignOrderService.java

@@ -1413,9 +1413,9 @@ public class ConsignOrderService {
         order.setGoodsPrice(addOrderDTO.getGoodsPrice() == null ? null : addOrderDTO.getGoodsPrice());
         order.setGoodsPriceUnit(addOrderDTO.getGoodsPriceUnit());
         order.setStartTime(org.apache.commons.lang3.ObjectUtils.isEmpty(addOrderDTO.getStartTime()) ?
-                null : addOrderDTO.getStartTime());
+                null : DateUtil.localDateToLocalDateTimeStart(addOrderDTO.getStartTime()));
         order.setEndTime(org.apache.commons.lang3.ObjectUtils.isEmpty(addOrderDTO.getEndTime()) ?
-                null : addOrderDTO.getEndTime());
+                null : DateUtil.localDateToLocalDateTimeEnd(addOrderDTO.getEndTime()));
         BigDecimal decimal = new BigDecimal(NumberConstant.ZERO);
         order.setSubcontractAmount(decimal);
         order.setEntrustAmount(decimal);
@@ -1676,8 +1676,8 @@ public class ConsignOrderService {
         order.setCarryingCapacity(addOrderDTO.getAmount());
         order.setBillingMode(addOrderDTO.getBillingMode());
         order.setDelFlag(String.valueOf(NumberConstant.ZERO));
-        order.setStartTime(addOrderDTO.getStartTime());
-        order.setEndTime(addOrderDTO.getEndTime());
+        order.setStartTime(addOrderDTO.getStartTime() == null ? null : DateUtil.localDateToLocalDateTimeStart(addOrderDTO.getStartTime()));
+        order.setEndTime(addOrderDTO.getEndTime().atStartOfDay());
         SckwBusSum busSum = new SckwBusSum();
         busSum.setBusSumType(BusinessTypeEnum.LOGISTICS_ORDER_TYPE.getName());
         busSum.setMethod(NumberConstant.ONE);
@@ -1778,6 +1778,7 @@ public class ConsignOrderService {
         Map<String, String> settlementDictData = commonService.getDictData(DictTypeEnum.SETTLEMENT_CYCLE.getType());
         /**签约方式*/
         Map<String, String> signingWay = commonService.getDictData(DictTypeEnum.SIGNING_TYPE.getType());
+        Map<String, String> orderSource = commonService.getDictData(DictTypeEnum.ORDER_SOURCE.getType());
         /**合理损耗*/
 //        Map<String, String> taxRateTypeDictData = getDictData(DictTypeEnum.TAX_RATE_TYPE.getType());
         Map<Long, UserCacheResDto> longUserMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
@@ -1788,6 +1789,7 @@ public class ConsignOrderService {
             }
         }
         for (AcceptCarriageOrderVO vo : list) {
+            vo.setOrderSourceLabel(orderSource == null ? null : orderSource.get(vo.getOrderSource()));
             vo.setAccountsCycleLabel(settlementDictData.get(vo.getAccountsCycle()));
             vo.setAppointor(longUserMap.get(vo.getCreateBy()) == null ? null : longUserMap.get(vo.getCreateBy()).getName());
             vo.setBillingModeLabel(chargingDictData.get(vo.getBillingMode()));
@@ -1795,27 +1797,29 @@ public class ConsignOrderService {
             vo.setStatusLabel(LogisticsOrderEnum.getName(vo.getStatus()));
             vo.setLoadAddress(vo.getLoadCityName() + vo.getLoadAddress());
             vo.setUnloadAddress(vo.getUnloadCityName() + vo.getUnloadAddress());
+            vo.setLoadCityName(vo.getLoadName());
+            vo.setUnloadCityName(vo.getUnloadName());
             vo.setPriceLabel(vo.getPriceType() == null ? null : priceDictData.get(vo.getPriceType()));
-            if (vo.getTOrderId() != null) {
-                try {
-                    OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.valueOf(vo.getTOrderId()));
-                    if (orderDetailRes != null) {
-                        List<UnitInfoDetailRes> unitInfo = orderDetailRes.getUnitInfo();
-                        for (UnitInfoDetailRes detailRes : unitInfo) {
-                            if (String.valueOf(NumberConstant.ONE).equals(detailRes.getUnitType())) {
-                                vo.setShipmentsUnitEntId(String.valueOf(detailRes.getEntId()));
-                                vo.setShipmentsUnit(detailRes.getFirmName());
-                            } else {
-                                vo.setReceiveGoodsUnitEntId(String.valueOf(detailRes.getEntId()));
-                                vo.setReceiveGoodsUnit(detailRes.getFirmName());
-                            }
-                        }
-                    }
-                } catch (Exception e) {
-//                    throw new RuntimeException(e);
-                    log.info(vo.getTOrderId() + "查询错误:{}", e.getMessage(), e);
-                }
-            }
+//            if (vo.getTOrderId() != null) {
+//                try {
+//                    OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.valueOf(vo.getTOrderId()));
+//                    if (orderDetailRes != null) {
+//                        List<UnitInfoDetailRes> unitInfo = orderDetailRes.getUnitInfo();
+//                        for (UnitInfoDetailRes detailRes : unitInfo) {
+//                            if (String.valueOf(NumberConstant.ONE).equals(detailRes.getUnitType())) {
+//                                vo.setShipmentsUnitEntId(String.valueOf(detailRes.getEntId()));
+//                                vo.setShipmentsUnit(detailRes.getFirmName());
+//                            } else {
+//                                vo.setReceiveGoodsUnitEntId(String.valueOf(detailRes.getEntId()));
+//                                vo.setReceiveGoodsUnit(detailRes.getFirmName());
+//                            }
+//                        }
+//                    }
+//                } catch (Exception e) {
+////                    throw new RuntimeException(e);
+//                    log.info(vo.getTOrderId() + "查询错误:{}", e.getMessage(), e);
+//                }
+//            }
             vo.setWaitDistributionAmount(vo.getCarryingCapacity().subtract(vo.getSubcontractAmount()).subtract(vo.getEntrustAmount()));
             String tOrderId = vo.getTOrderId();
             if (StringUtils.isNotBlank(tOrderId)) {
@@ -1990,6 +1994,7 @@ public class ConsignOrderService {
         Map<String, String> taxRate = commonService.getDictData(DictTypeEnum.TAX_RATE_TYPE.getType());
         /**运价方式*/
         Map<String, String> priceType = commonService.getDictData(DictTypeEnum.PRICE_TYPE.getType());
+        Map<String, String> orderSource = commonService.getDictData(DictTypeEnum.ORDER_SOURCE.getType());
         Map<Long, UserCacheResDto> longUserMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
         if (CollectionUtils.isNotEmpty(list)) {
             List<Long> collect = list.stream().map(ConsignOrderVO::getCreateBy).collect(Collectors.toList());
@@ -2001,16 +2006,19 @@ public class ConsignOrderService {
         for (ConsignOrderVO vo : list) {
             ConsignOrderExcelVo consignOrderExcelVo = new ConsignOrderExcelVo();
             BeanUtils.copyProperties(vo, consignOrderExcelVo);
+            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()));
-            consignOrderExcelVo.setGoodsPriceLabel(vo.getGoodsPrice() == null ? null : vo.getGoodsPrice().toString() + priceType.get(vo.getGoodsPriceUnit()));
+//            consignOrderExcelVo.setGoodsPriceLabel(vo.getGoodsPrice() == null ? null : vo.getGoodsPrice().toString() + priceType.get(vo.getGoodsPriceUnit()));
             consignOrderExcelVo.setAccountsCycleLabel(settlementDictData.get(vo.getAccountsCycle()));
             consignOrderExcelVo.setAppointor(longUserMap.get(vo.getCreateBy()) == null ? null : longUserMap.get(vo.getCreateBy()).getName());
             consignOrderExcelVo.setBillingModeLabel(chargingDictData.get(vo.getBillingMode()));
-            consignOrderExcelVo.setSigningLabel(signingWay.get(vo.getSigning()));
+//            consignOrderExcelVo.setSigningLabel(signingWay.get(vo.getSigning()));
             consignOrderExcelVo.setStatusLabel(LogisticsOrderEnum.getName(vo.getStatus()));
             consignOrderExcelVo.setLoadAddress(vo.getLoadCityName() + vo.getLoadAddress());
             consignOrderExcelVo.setUnloadAddress(vo.getUnloadCityName() + vo.getUnloadAddress());
+            consignOrderExcelVo.setLoadName(vo.getLoadName());
+            consignOrderExcelVo.setUnloadName(vo.getUnloadName());
 //            if (vo.getTOrderId() != null) {
 //                OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.valueOf(vo.getTOrderId()));
 //                if (orderDetailRes != null) {
@@ -2048,8 +2056,8 @@ public class ConsignOrderService {
                     log.error("tradeOrderInfoService.getOrderDetailById error id:{},errorMessage:{}", tOrderId, e.getMessage(), e);
                 }
             }
-            consignOrderExcelVo.setSubcontractAmount(Objects.isNull(vo.getSubcontractAmount()) ? null : df.format(vo.getSubcontractAmount()) + priceType.get(vo.getPriceType()));
-            consignOrderExcelVo.setEntrustAmount(Objects.isNull(vo.getEntrustAmount()) ? null : df.format(vo.getEntrustAmount()) + priceType.get(vo.getPriceType()));
+//            consignOrderExcelVo.setSubcontractAmount(Objects.isNull(vo.getSubcontractAmount()) ? null : df.format(vo.getSubcontractAmount()) + priceType.get(vo.getPriceType()));
+//            consignOrderExcelVo.setEntrustAmount(Objects.isNull(vo.getEntrustAmount()) ? null : df.format(vo.getEntrustAmount()) + priceType.get(vo.getPriceType()));
             consignOrderExcelVo.setLoadAmount(Objects.isNull(vo.getLoadAmount()) ? null : df.format(vo.getLoadAmount()) + priceType.get(vo.getPriceType()));
             consignOrderExcelVo.setUnloadAmount(Objects.isNull(vo.getUnloadAmount()) ? null : df.format(vo.getUnloadAmount()) + priceType.get(vo.getPriceType()));
             exportList.add(consignOrderExcelVo);

+ 17 - 15
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/LogisticsConsignmentService.java

@@ -22,6 +22,7 @@ import com.sckw.core.utils.*;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.core.web.response.HttpResult;
+import com.sckw.excel.utils.DateUtil;
 import com.sckw.excel.utils.ValidUtil;
 import com.sckw.fleet.api.RemoteFleetService;
 import com.sckw.fleet.api.model.vo.RTruckVo;
@@ -369,8 +370,8 @@ public class LogisticsConsignmentService {
         logisticsOrder.setGoodsPriceUnit(bo.getGoodsPriceUnit());
         logisticsOrder.setContractName(bo.getContractName());
         logisticsOrder.setBillingMode(bo.getBillingMode());
-        logisticsOrder.setStartTime(bo.getShipmentsDateTime());
-        logisticsOrder.setEndTime(bo.getReceiveGoodsDateTime());
+        logisticsOrder.setStartTime(bo.getShipmentsDateTime() == null ? null : DateUtil.localDateToLocalDateTimeStart(bo.getShipmentsDateTime()));
+        logisticsOrder.setEndTime(bo.getReceiveGoodsDateTime() == null ? null : DateUtil.localDateToLocalDateTimeEnd(bo.getReceiveGoodsDateTime()));
         //rabbitMq业务汇总数据发送/消费对象
         SckwBusSum busSum = new SckwBusSum();
         //业务汇总类型
@@ -507,8 +508,8 @@ public class LogisticsConsignmentService {
         order.setGoodsPriceUnit(remoteSystemService.queryDictByTypeAndValue(DictTypeEnum.PRICE_TYPE.getType(), bo.getGoodsPriceUnit()) == null ?
                 null : remoteSystemService.queryDictByTypeAndValue(DictTypeEnum.PRICE_TYPE.getType(), bo.getGoodsPriceUnit()).getValue());
         order.setGoodsPriceUnit(bo.getGoodsPriceUnit());
-        order.setStartTime(bo.getShipmentsDateTime());
-        order.setEndTime(bo.getReceiveGoodsDateTime());
+        order.setStartTime(bo.getShipmentsDateTime() == null ? null : DateUtil.localDateToLocalDateTimeStart(bo.getShipmentsDateTime()));
+        order.setEndTime(bo.getReceiveGoodsDateTime() == null ? null : DateUtil.localDateToLocalDateTimeEnd(bo.getReceiveGoodsDateTime()));
         order.setRemark(bo.getRemark());
         order.setPayment(Long.parseLong(bo.getPayment()));
         order.setTaxRate(new BigDecimal(bo.getTaxRate()));
@@ -739,14 +740,15 @@ public class LogisticsConsignmentService {
 
     /**
      * 贸易订单或者物流订单分页优化代码
-     * @param stringList    贸易订单id集合
-     * @param page  分页数据
-     * @param pageSize  分页条数
-     * @param type  数据类型 1 采购2销售
+     *
+     * @param stringList 贸易订单id集合
+     * @param page       分页数据
+     * @param pageSize   分页条数
+     * @param type       数据类型 1 采购2销售
      * @return
      */
     public PageRes<LogisticsOrderDTO> getLogisticsOrderListByTradeOrderIds(List<String> stringList, Integer page, Integer pageSize, String type) {
-        PageHelper.startPage(page,pageSize);
+        PageHelper.startPage(page, pageSize);
         List<Long> returnIds = new ArrayList<>();
         for (String id : stringList) {
             OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.parseLong(id));
@@ -769,7 +771,7 @@ public class LogisticsConsignmentService {
         }
         List<LogisticsOrderDTO> orderDTOList = kwtLogisticsOrderMapper.selectOrderListNotPageByIds(returnIds, type);
         PageInfo<LogisticsOrderDTO> info = new PageInfo<>(orderDTOList);
-        if (CollectionUtils.isEmpty(orderDTOList)){
+        if (CollectionUtils.isEmpty(orderDTOList)) {
             PageRes<LogisticsOrderDTO> pageRes = new PageRes<>();
             pageRes.setPage(page);
             pageRes.setPageSize(pageSize);
@@ -792,7 +794,7 @@ public class LogisticsConsignmentService {
             logisticsOrderDTO.setGoodsPriceUnitLabel(priceDictData.get(logisticsOrderDTO.getGoodsPriceUnit()));
             logisticsOrderDTO.setUnitLabel(unitTypeDictData.get(logisticsOrderDTO.getUnit()));
         }
-        return PageRes.build(info,orderDTOList);
+        return PageRes.build(info, orderDTOList);
     }
 
     /**
@@ -947,7 +949,7 @@ public class LogisticsConsignmentService {
      * @return
      */
     public PageRes<OrderCarDTO> purchaseLogisticsCar(String ids, Integer page, Integer pageSize) {
-        PageHelper.startPage(page,pageSize);
+        PageHelper.startPage(page, pageSize);
         List<String> stringList = StringUtils.splitStrToList(ids, String.class);
         if (CollectionUtils.isEmpty(stringList)) {
             PageRes<OrderCarDTO> pageRes = new PageRes<>();
@@ -958,7 +960,7 @@ public class LogisticsConsignmentService {
         List<Long> idsList = StringUtils.splitStrToList(ids, Long.class);
         List<OrderCarDTO> orderCarList = waybillOrderMapper.selectWaybillOrderCarListByTradeOrderId(idsList);
         PageInfo<OrderCarDTO> info = new PageInfo<>(orderCarList);
-        if (CollectionUtils.isEmpty(orderCarList)){
+        if (CollectionUtils.isEmpty(orderCarList)) {
             PageRes<OrderCarDTO> pageRes = new PageRes<>();
             pageRes.setPage(page);
             pageRes.setPageSize(pageSize);
@@ -966,7 +968,7 @@ public class LogisticsConsignmentService {
         }
         List<String> collected = orderCarList.stream().map(OrderCarDTO::getTruckNo).distinct().collect(Collectors.toList());
         for (OrderCarDTO orderCarDTO : orderCarList) {
-            if (CollectionUtils.isNotEmpty(collected)){
+            if (CollectionUtils.isNotEmpty(collected)) {
                 Map<String, RTruckVo> truck = remoteFleetService.findTruck(collected);
                 orderCarDTO.setStatusLabel(CarWaybillEnum.getName(orderCarDTO.getStatus()));
                 orderCarDTO.setLoadAmount(truck.get(orderCarDTO.getTruckNo()) == null ?
@@ -976,7 +978,7 @@ public class LogisticsConsignmentService {
         }
         List<OrderCarDTO> returnList = new ArrayList<>();
         returnList.addAll(orderCarList);
-        return PageRes.build(info,returnList);
+        return PageRes.build(info, returnList);
 //        stringList = stringList.stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList());
 //        for (String id : stringList) {
 //            List<OrderCarDTO> list = waybillOrderMapper.selectWaybillOrderCarListNotPage(id);

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

@@ -9,6 +9,7 @@ import com.sckw.core.model.enums.CarWaybillQueryEnum;
 import com.sckw.core.model.page.PageResult;
 import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.utils.StringTimeUtil;
 import com.sckw.core.utils.StringUtils;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.core.web.response.HttpResult;
@@ -790,10 +791,9 @@ public class WaybillManagementService {
         }
         // 查询时间段
         if (Objects.nonNull(query.getStartDate()) && Objects.nonNull(query.getEndDate())) {
-            Date endDate = DateUtil.strDateTimeToDateTime(query.getEndDate());
             criteria.and("createTime")
-                    .gte(DateUtil.strDateTimeToDateTime(query.getStartDate()))
-                    .lte(DateUtil.offsetDay(endDate, 1));
+                    .gte(DateUtil.strDateTimeToDateTime(StringTimeUtil.fillStart(query.getStartDate())))
+                    .lte(DateUtil.strDateTimeToDateTime(StringTimeUtil.fillEnd(query.getEndDate())));
         }
         Query queryFormat = new Query(criteria);
         // 总记录数

+ 17 - 11
sckw-modules/sckw-transport/src/main/resources/mapper/KwtLogisticsOrderMapper.xml

@@ -506,7 +506,10 @@
         g.contract_name as contractName,
         g.signing_way as signing,
         e.city_name as loadCityName,
-        f.city_name as unloadCityName
+        f.city_name as unloadCityName,
+        e.name as loadName,
+        f.name as unloadName,
+        a.type as orderSource
         FROM kwt_logistics_order a
         LEFT JOIN kwt_logistics_order_unit b ON a.id = b.l_order_id
         AND b.unit_type = 1
@@ -685,17 +688,17 @@
                 AND a.id =#{driverParam.lOrderId}
             </if>
             <if test="driverParam.driverName != null and driverParam.driverName != '' or ( driverParam.driverPhone != null and driverParam.driverPhone != '' ) or ( driverParam.truckNo != null and driverParam.truckNo != '' ) ">
-                and (
+<!--                and (-->
                 <if test="driverParam.driverName != null and driverParam.driverName != ''">
-                    b.driver_name like concat('%',#{driverParam.driverName},'%')
+                    and b.driver_name like concat('%',#{driverParam.driverName},'%')
                 </if>
                 <if test="driverParam.driverPhone != null and driverParam.driverPhone != ''">
-                    or b.driver_phone like concat('%',#{driverParam.driverPhone},'%')
+                    and b.driver_phone like concat('%',#{driverParam.driverPhone},'%')
                 </if>
                 <if test="driverParam.truckNo != null and driverParam.truckNo != ''">
-                    or b.truck_no like concat('%',#{driverParam.truckNo},'%')
+                    and b.truck_no like concat('%',#{driverParam.truckNo},'%')
                 </if>
-                )
+<!--                )-->
             </if>
             GROUP BY
             b.truck_no
@@ -905,17 +908,17 @@
                 AND a.id =#{driverParam.lOrderId}
             </if>
             <if test="driverParam.driverName != null and driverParam.driverName != '' or ( driverParam.driverPhone != null and driverParam.driverPhone != '' ) or ( driverParam.truckNo != null and driverParam.truckNo != '' )">
-                and (
+<!--                and (-->
                 <if test=" driverParam.driverName != null and driverParam.driverName != ''">
-                    c.driver_name like concat('%',#{driverParam.driverName},'%')
+                    and c.driver_name like concat('%',#{driverParam.driverName},'%')
                 </if>
                 <if test=" driverParam.driverPhone != null and driverParam.driverPhone != ''">
-                    or c.driver_phone like concat('%',#{driverParam.driverPhone},'%')
+                    and c.driver_phone like concat('%',#{driverParam.driverPhone},'%')
                 </if>
                 <if test=" driverParam.truckNo != null and driverParam.truckNo != ''">
-                    or c.truck_no like concat('%',#{driverParam.truckNo},'%')
+                    and c.truck_no like concat('%',#{driverParam.truckNo},'%')
                 </if>
-                )
+<!--                )-->
             </if>
         </where>
     </select>
@@ -1087,6 +1090,7 @@
         b.phone AS shipmentsPhone,
         b.lat AS loadLat,
         b.lng AS loadLng,
+        c.`name` AS unloadName,
         c.address_type AS unloadType,
         c.contacts AS receiveGoodsContacts,
         c.phone AS receiveGoodsPhone,
@@ -1164,6 +1168,7 @@
         b.phone AS shipmentsPhone,
         b.lat AS loadLat,
         b.lng AS loadLng,
+        c.`name` AS unloadName,
         c.address_type AS unloadType,
         c.contacts AS receiveGoodsContacts,
         c.phone AS receiveGoodsPhone,
@@ -1239,6 +1244,7 @@
         shipmentsPhone,
         loadLat,
         loadLng,
+        unloadName,
         unloadType,
         receiveGoodsContacts,
         receiveGoodsPhone,

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

@@ -328,6 +328,7 @@
                 where wo.del_flag = 0 and lo.del_flag = 0
                 <if test="busStatus != null and busStatus == 4">
                     and wo.status in (7, 8, 9, 10, 12, 13)
+                    and wo.deficit_amount > 0
                 </if>
                 <if test="driverId != null and driverId != ''">
                     and wo.driver_id = #{driverId, jdbcType=BIGINT}