Jelajahi Sumber

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

czh 2 tahun lalu
induk
melakukan
48eaa2d80a
15 mengubah file dengan 1501 tambahan dan 225 penghapusan
  1. 8 0
      sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/utils/DateUtil.java
  2. 6 3
      sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/utils/ExcelUtil.java
  3. 16 16
      sckw-modules/sckw-report/src/main/java/com/sckw/report/controller/KwTransportController.java
  4. 20 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/AcceptCarriageOrderController.java
  5. 25 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/ConsignOrderController.java
  6. 31 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dao/KwtLogisticsOrderMapper.java
  7. 51 8
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/param/ConsignOrderQuery.java
  8. 0 180
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/AcceptCarriageOrderExcelVo.java
  9. 10 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/AcceptCarriageOrderVO.java
  10. 154 18
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/ConsignOrderVO.java
  11. 405 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlvo/AcceptCarriageOrderExcelVo.java
  12. 405 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlvo/ConsignOrderExcelVo.java
  13. 118 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/AcceptCarriageOrderService.java
  14. 112 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/ConsignOrderService.java
  15. 140 0
      sckw-modules/sckw-transport/src/main/resources/mapper/KwtLogisticsOrderMapper.xml

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

@@ -22,6 +22,7 @@ public class DateUtil {
     public static final String DEFAULT_DATE_PATTERN = "yyyy-MM-dd HH:mm:ss";
     public static final String DEF_DATE_FORMAT = "yyyy-MM-dd";
     public static final DateTimeFormatter YYYY_MM_DD_HH_MM_SS = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+    public static final DateTimeFormatter YYYYMMDDHHMMSS = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
     public static final DateTimeFormatter YYYY_MM_DD = DateTimeFormatter.ofPattern("yyyy-MM-dd");
     public static final DateTimeFormatter HH_MM_SS = DateTimeFormatter.ofPattern("HH:mm:ss");
 
@@ -99,6 +100,13 @@ public class DateUtil {
         return LocalDate.parse(str, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
     }
 
+
+    public static String localDateTimeToString(LocalDateTime localDateTime) {
+        String localDateTimeNowStr = localDateTime.format(YYYYMMDDHHMMSS);
+        return localDateTimeNowStr;
+    }
+
+
     /**
      * yyyy-MM-dd 转换成 LocalDateTime
      *

+ 6 - 3
sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/utils/ExcelUtil.java

@@ -11,7 +11,10 @@ import com.sckw.core.model.constant.Global;
 import com.sckw.core.web.response.HttpResult;
 import com.sckw.excel.annotation.ExcelContext;
 import com.sckw.excel.annotation.ExcelSelected;
-import com.sckw.excel.config.easyexcel.*;
+import com.sckw.excel.config.easyexcel.ExcelSelectedResolve;
+import com.sckw.excel.config.easyexcel.LocalDateTimeConverter;
+import com.sckw.excel.config.easyexcel.RowWriteHandlerImpl;
+import com.sckw.excel.config.easyexcel.SelectedSheetWriteHandler;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.util.Assert;
@@ -22,7 +25,7 @@ import java.io.PrintWriter;
 import java.io.UnsupportedEncodingException;
 import java.lang.reflect.Field;
 import java.net.URLEncoder;
-import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -102,7 +105,7 @@ public class ExcelUtil {
     }
 
     private static void buildResponse(HttpServletResponse response, String fileName) throws UnsupportedEncodingException {
-        fileName = URLEncoder.encode(fileName + "-" + DateUtil.dateToStr(LocalDate.now()), "UTF-8").replaceAll("\\+", "%20");
+        fileName = URLEncoder.encode(fileName + "-" + DateUtil.localDateTimeToString(LocalDateTime.now()), "UTF-8").replaceAll("\\+", "%20");
         response.setContentType("application/vnd.ms-excel");
         response.setCharacterEncoding("UTF-8");
         response.setHeader("Access-Control-Expose-Headers", "Content-disposition");

+ 16 - 16
sckw-modules/sckw-report/src/main/java/com/sckw/report/controller/KwTransportController.java

@@ -79,22 +79,22 @@ public class KwTransportController {
         }
     }
 
-    /**
-     * 承运订单导出
-     *
-     * @param query 查询参数
-     * @return
-     */
-    @RequestMapping(value = "/acceptCarriageOrderExport", method = RequestMethod.POST)
-    public HttpResult exportAcceptCarriage(@Validated @RequestBody AcceptCarriageOrderQuery query) {
-        HttpServletResponse response = RequestHolder.getResponse();
-        List<AcceptCarriageOrderExcelVo> list = acceptCarriageService.exportAcceptCarriage(query,"2");
-        if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
-            ExcelUtil.download(response, AcceptCarriageOrderExcelVo.class, list);
-            return null;
-        }
-        return HttpResult.ok("没有可导出的数据");
-    }
+//    /**
+//     * 承运订单导出
+//     *
+//     * @param query 查询参数
+//     * @return
+//     */
+//    @RequestMapping(value = "/acceptCarriageOrderExport", method = RequestMethod.POST)
+//    public HttpResult exportAcceptCarriage(@Validated @RequestBody AcceptCarriageOrderQuery query) {
+//        HttpServletResponse response = RequestHolder.getResponse();
+//        List<AcceptCarriageOrderExcelVo> list = acceptCarriageService.exportAcceptCarriage(query,"2");
+//        if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
+//            ExcelUtil.download(response, AcceptCarriageOrderExcelVo.class, list);
+//            return null;
+//        }
+//        return HttpResult.ok("没有可导出的数据");
+//    }
 
     /**
      * 托运订单导出

+ 20 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/AcceptCarriageOrderController.java

@@ -9,13 +9,17 @@ import com.sckw.core.utils.OrderGenerateSeqNoUtils;
 import com.sckw.core.utils.StringUtils;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.response.HttpResult;
+import com.sckw.excel.config.easyexcel.RequestHolder;
+import com.sckw.excel.utils.ExcelUtil;
 import com.sckw.transport.model.dto.*;
 import com.sckw.transport.model.param.AcceptCarriageOrderQuery;
 import com.sckw.transport.model.param.ContractParam;
 import com.sckw.transport.model.param.DriverParam;
 import com.sckw.transport.model.param.LogisticsOrderParam;
+import com.sckw.transport.model.vo.execlvo.AcceptCarriageOrderExcelVo;
 import com.sckw.transport.service.AcceptCarriageOrderService;
 import com.sckw.transport.service.TransportCommonService;
+import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.Valid;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
@@ -82,6 +86,22 @@ public class AcceptCarriageOrderController {
         }
     }
 
+    /**
+     * 承运订单导出
+     *
+     * @param query 查询参数
+     * @return
+     */
+    @RequestMapping(value = "/acceptCarriageOrderExport", method = RequestMethod.POST)
+    public HttpResult exportAcceptCarriage(@Validated @RequestBody AcceptCarriageOrderQuery query) {
+        HttpServletResponse response = RequestHolder.getResponse();
+        List<AcceptCarriageOrderExcelVo> list = acceptCarriageOrderService.exportAcceptCarriage(query,"2");
+        if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
+            ExcelUtil.download(response, AcceptCarriageOrderExcelVo.class, list);
+            return null;
+        }
+        return HttpResult.ok("没有可导出的数据");
+    }
 
     /**
      * 获取订单详情-托运订单-承运订单-销售订单-采购订单

+ 25 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/ConsignOrderController.java

@@ -8,13 +8,18 @@ import com.sckw.core.model.vo.BaseList;
 import com.sckw.core.utils.OrderGenerateSeqNoUtils;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.response.HttpResult;
+import com.sckw.excel.config.easyexcel.RequestHolder;
+import com.sckw.excel.utils.ExcelUtil;
 import com.sckw.transport.model.dto.AddOrderDTO;
 import com.sckw.transport.model.dto.OrderDTO;
 import com.sckw.transport.model.dto.OrderFinishDTO;
 import com.sckw.transport.model.dto.StopOrderTakingDTO;
 import com.sckw.transport.model.param.AcceptCarriageOrderQuery;
+import com.sckw.transport.model.param.ConsignOrderQuery;
 import com.sckw.transport.model.param.DriverParam;
+import com.sckw.transport.model.vo.execlvo.ConsignOrderExcelVo;
 import com.sckw.transport.service.ConsignOrderService;
+import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.Valid;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
@@ -24,6 +29,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+
 /**
  * @author lfdc
  * @description 托运订单controller
@@ -74,6 +81,24 @@ public class ConsignOrderController {
     }
 
 
+    /**
+     * 托运订单-导出
+     *
+     * @param query 查询参数
+     * @return
+     */
+    @RequestMapping(value = "/consignExport", method = RequestMethod.POST)
+    public HttpResult exportConsign(@Validated @RequestBody ConsignOrderQuery query) {
+        HttpServletResponse response = RequestHolder.getResponse();
+        List<ConsignOrderExcelVo> list = consignOrderService.exportConsign(query,"1");
+        if (!org.springframework.util.CollectionUtils.isEmpty(list)) {
+            ExcelUtil.download(response, ConsignOrderExcelVo.class, list);
+            return null;
+        }
+        return HttpResult.ok("没有可导出的数据");
+    }
+
+
     /**
      * 托运订单/承运订单-获取车辆运单
      *

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

@@ -7,9 +7,12 @@ import com.sckw.transport.api.model.dto.LogisticsOrderDTO;
 import com.sckw.transport.api.model.vo.LogisticsOrderVO;
 import com.sckw.transport.model.KwtLogisticsOrder;
 import com.sckw.transport.model.param.AcceptCarriageOrderQuery;
+import com.sckw.transport.model.param.ConsignOrderQuery;
 import com.sckw.transport.model.param.DriverParam;
 import com.sckw.transport.model.param.LogisticsOrderParam;
 import com.sckw.transport.model.vo.*;
+import com.sckw.transport.model.vo.execlvo.AcceptCarriageOrderExcelVo;
+import com.sckw.transport.model.vo.AcceptCarriageOrderVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -198,6 +201,34 @@ public interface KwtLogisticsOrderMapper extends BaseMapper<KwtLogisticsOrder> {
                                                          @Param("entId") Long entId
     );
 
+    /**
+     * @param query
+     * @param orderList
+     * @param type
+     * @param entId
+     * @return
+     */
+    List<ConsignOrderVO> selectConsignLogisticsOrderList(@Param("query") ConsignOrderQuery query,
+                                                         @Param("orderList") List<Integer> orderList,
+                                                         @Param("type") String type,
+                                                         @Param("entId") Long entId
+    );
+
+    /**
+     * 首页查询导出
+     *
+     * @param query
+     * @param orderList
+     * @param type
+     * @param entId
+     * @return
+     */
+    List<AcceptCarriageOrderExcelVo> selectLogisticsOrderListExport(@Param("query") AcceptCarriageOrderQuery query,
+                                                                    @Param("orderList") List<Integer> orderList,
+                                                                    @Param("type") String type,
+                                                                    @Param("entId") Long entId
+    );
+
 
     /**
      * @param query

+ 51 - 8
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/param/ConsignOrderQuery.java

@@ -14,32 +14,75 @@ import java.io.Serializable;
 @Data
 @Accessors(chain = true)
 public class ConsignOrderQuery extends PageRequest implements Serializable {
+
+    /**
+     * 数据id-主要用于订单导出
+     */
+    private String ids;
     /**
      * 计费方式
      */
     private String billingMode;
     /**
-     * 结束时间
+     * 计划结束时间(起)
+     */
+    private String endBeginDateTime;
+
+    /**
+     * 计划结束时间(止)
      */
-    private String endDateTime;
+    private String endOverDateTime;
     /**
      * 关键字搜索
      */
     private String keywords;
     /**
-     * 装货地址
+     * 装货地址code
      */
-    private String loadAddress;
+    private String loadAddressCode;
+//    /**
+//     * 装货地址
+//     */
+//    private String loadAddress;
     /**
-     * 开始时间
+     * 装货地址等级
      */
-    private String startDateTime;
+    private Integer loadAddressLevel;
+
+    /**
+     * 计划开始时间(起)
+     */
+    private String startBeginDateTime;
+
+    /**
+     * 计划开始时间(止)
+     */
+    private String startOverDateTime;
+
+    /**
+     * 创建时间(起)
+     */
+    private String createStartTime;
+
+    /**
+     * 创建时间(止)
+     */
+    private String createEndTime;
+
     /**
      * 单据状态
      */
     private String status;
     /**
-     * 卸货地址
+     * 卸货地址code
+     */
+    private String unloadAddressCode;
+//    /**
+//     * 卸货地址
+//     */
+//    private String unloadAddress;
+    /**
+     * 卸货地址等级
      */
-    private String unloadAddress;
+    private Integer unloadAddressLevel;
 }

+ 0 - 180
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/AcceptCarriageOrderExcelVo.java

@@ -1,180 +0,0 @@
-package com.sckw.transport.model.vo;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.sckw.excel.annotation.ExcelContext;
-import lombok.Data;
-
-/**
- * @author lfdc
- * @description 承运订单导出vo
- * @date 2023-07-24 13:07:44
- */
-@Data
-@ExcelContext(fileName = "承运订单列表", sheetName = "承运订单列表")
-public class AcceptCarriageOrderExcelVo {
-    /**
-     * 结算周期
-     */
-    @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 = "状态")
-    private String status;
-    /**
-     * 卸货地点
-     */
-    @ExcelProperty(value = "卸货地点")
-    private String unloadAddress;
-    /**
-     * 关联承运订单号
-     */
-    @ExcelProperty(value = "关联承运订单号")
-    private String wOrderNo;
-    /**
-     * 创建时间
-     */
-    @ExcelProperty(value = "创建时间")
-    private String createTime;
-    /**
-     * 修改时间
-     */
-    @ExcelProperty(value = "修改时间")
-    private String updateTime;
-
-}

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

@@ -140,6 +140,16 @@ public class AcceptCarriageOrderVO /*extends PageRequest*/ {
      * 运价
      */
     private BigDecimal price;
+
+    /**
+     * 运价
+     */
+    private String priceType;
+
+    /**
+     * 运价
+     */
+    private String priceLabel;
     /**
      * 收货联系人
      */

+ 154 - 18
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/ConsignOrderVO.java

@@ -1,10 +1,11 @@
 package com.sckw.transport.model.vo;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonProperty;
-import com.sckw.core.model.page.PageResult;
 import lombok.Data;
 
-import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
 
 /**
  * @author lfdc
@@ -12,19 +13,38 @@ import java.io.Serializable;
  * @date 2023-07-07 09:07:06
  */
 @Data
-public class ConsignOrderVO extends PageResult implements Serializable {
+public class ConsignOrderVO /*extends PageRequest*/ {
     /**
      * 结算周期
      */
     private String accountsCycle;
+    /**
+     * 结算周期
+     */
+    private String accountsCycleLabel;
     /**
      * 发起人
      */
     private String appointor;
+
+    /**
+     * 创建人id
+     */
+    private Long createBy;
     /**
      * 计费方式
      */
     private String billingMode;
+
+    /**
+     * 计费方式
+     */
+    private String billingModeLabel;
+
+    /**
+     * 承运单位ID
+     */
+    private String carrierCompanyId;
     /**
      * 承运单位
      */
@@ -33,10 +53,10 @@ public class ConsignOrderVO extends PageResult implements Serializable {
      * 承运联系人
      */
     private String carrierContacts;
-    /**
-     * 承运订单
-     */
-    private String carrierOrder;
+//    /**
+//     * 承运订单
+//     */
+//    private String carrierOrder;
     /**
      * 承运联系电话
      */
@@ -44,7 +64,12 @@ public class ConsignOrderVO extends PageResult implements Serializable {
     /**
      * 分配承运量
      */
-    private String carryingCapacity;
+    private BigDecimal carryingCapacity;
+
+    /**
+     * 托运单位id
+     */
+    private String consignCompanyId;
     /**
      * 托运单位
      */
@@ -64,7 +89,7 @@ public class ConsignOrderVO extends PageResult implements Serializable {
     /**
      * 扣亏货值/元/吨
      */
-    private String deficitAmount;
+    private BigDecimal deficitAmount;
     /**
      * 货物名称
      */
@@ -73,6 +98,10 @@ public class ConsignOrderVO extends PageResult implements Serializable {
      * 装货地点
      */
     private String loadAddress;
+    /**
+     * 装货区域名称
+     */
+    private String loadCityName;
     /**
      * 数据库id
      */
@@ -83,18 +112,44 @@ public class ConsignOrderVO extends PageResult implements Serializable {
      */
     @JsonProperty("lOrderNo")
     private String lOrderNo;
+
+    /**
+     * 贸易订单id
+     */
+    @JsonProperty("tOrderId")
+    private String tOrderId;
+    /**
+     *  贸易订单编号
+     */
+    @JsonProperty("tOrderNo")
+    private String tOrderNo;
+
     /**
      * 合理损耗
      */
-    private String loss;
+    private BigDecimal loss;
+    /**
+     * 合理损耗单位
+     */
+    private String lossUnit;
     /**
      * 计划时间
      */
-    private String plannedDateTime;
+//    private String plannedDateTime;
     /**
      * 运价
      */
-    private String price;
+    private BigDecimal price;
+
+    /**
+     * 运价
+     */
+    private String priceType;
+
+    /**
+     * 运价
+     */
+    private String priceLabel;
     /**
      * 收货联系人
      */
@@ -102,7 +157,8 @@ public class ConsignOrderVO extends PageResult implements Serializable {
     /**
      * 计划收货时间
      */
-    private String receiveGoodsDateTime;
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    private LocalDate receiveGoodsDateTime;
     /**
      * 收货电话
      */
@@ -118,7 +174,8 @@ public class ConsignOrderVO extends PageResult implements Serializable {
     /**
      * 计划发货时间
      */
-    private String shipmentsDateTime;
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    private LocalDate shipmentsDateTime;
     /**
      * 发货电话
      */
@@ -127,17 +184,96 @@ public class ConsignOrderVO extends PageResult implements Serializable {
      * 签约方式
      */
     private String signing;
+
+    /**
+     * 签约方式
+     */
+    private String signingLabel;
     /**
      * 状态
      */
-    private String status;
+    private Integer status;
+    /**
+     * 状态
+     */
+    private String statusLabel;
     /**
      * 卸货地点
      */
     private String unloadAddress;
     /**
-     * 关联承运订单号
+     * 卸货区域名称
+     */
+    private String unloadCityName;
+//    /**
+//     * 关联承运订单号
+//     */
+//    @JsonProperty("wOrderNo")
+//    private String wOrderNo;
+
+    private String createTime;
+
+    private String updateTime;
+
+    /**
+     * 发货单位
+     */
+    private String shipmentsUnitEntId;
+
+    /**
+     * 发货单位
+     */
+    private String shipmentsUnit;
+
+    /**
+     * 收货单位
+     */
+    private String receiveGoodsUnitEntId;
+
+    /**
+     * 收货单位
+     */
+    private String receiveGoodsUnit;
+
+    /**
+     * 商品价值(扣亏货值)
+     */
+    private BigDecimal goodsPrice;
+
+    /**
+     * 商品价值(扣亏货值)单位
      */
-    @JsonProperty("wOrderNo")
-    private String wOrderNo;
+    private String goodsPriceUnit;
+
+    /**
+     * 装货量
+     */
+    private BigDecimal loadAmount;
+
+    /**
+     * 剩余量
+     */
+    private BigDecimal ignoreAmount;
+
+    /**
+     * 待分配量(amount-subcontract_amount-entrust_amount)
+     */
+    private BigDecimal waitDistributionAmount;
+
+    /**
+     * 分包量(给下游承运商分包的量)
+     */
+    private BigDecimal subcontractAmount;
+
+    /**
+     * 已委托量(自己承运,给下游司机分配的量)
+     */
+    private BigDecimal entrustAmount;
+
+
+    /**
+     * 卸货量
+     */
+    private BigDecimal unloadAmount;
+
 }

+ 405 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlvo/AcceptCarriageOrderExcelVo.java

@@ -0,0 +1,405 @@
+package com.sckw.transport.model.vo.execlvo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.sckw.excel.annotation.ExcelContext;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+/**
+ * @author lfdc
+ * @description 承运订单导出vo
+ * @date 2023-07-24 13:07:44
+ */
+@Data
+@ExcelContext(fileName = "承运订单列表", sheetName = "承运订单列表")
+public class AcceptCarriageOrderExcelVo {
+
+    /**
+     * 结算周期
+     */
+    @ExcelProperty(value = "结算周期")
+    private String accountsCycleLabel;
+
+    /**
+     * 发起人
+     */
+    @ExcelProperty(value = "发起人")
+    private String appointor;
+
+    /**
+     * 计费方式
+     */
+    @ExcelProperty(value = "计费方式")
+    private String billingModeLabel;
+
+    /**
+     * 承运单位
+     */
+    @ExcelProperty(value = "承运单位")
+    private String carrierCompany;
+    /**
+     * 承运联系人
+     */
+    @ExcelProperty(value = "承运联系人")
+    private String carrierContacts;
+    /**
+     * 承运联系电话
+     */
+    @ExcelProperty(value = "承运联系电话")
+    private String carrierPhone;
+    /**
+     * 分配承运量
+     */
+    @ExcelProperty(value = "承运量")
+    private BigDecimal carryingCapacity;
+
+    /**
+     * 托运单位
+     */
+    @ExcelProperty(value = "托运单位")
+    private String consignCompany;
+    /**
+     * 托运联系人
+     */
+    @ExcelProperty(value = "托运联系人")
+    private String consignContacts;
+    /**
+     * 托运联系电话
+     */
+    @ExcelProperty(value = "托运联系电话")
+    private String consignPhone;
+    /**
+     * 合同
+     */
+    @ExcelProperty(value = "合同")
+    private String contract;
+
+    /**
+     * 扣亏货值/元/吨
+     */
+    @ExcelProperty(value = "扣亏货值")
+    private BigDecimal deficitAmount;
+    /**
+     * 货物名称
+     */
+    @ExcelProperty(value = "货物名称")
+    private String goodsName;
+    /**
+     * 装货地点
+     */
+    @ExcelProperty(value = "装货地点")
+    private String loadAddress;
+
+    /**
+     * 承运订单号
+     */
+    @JsonProperty("lOrderNo")
+    @ExcelProperty(value = "托运订单号")
+    private String lOrderNo;
+
+    /**
+     *  贸易订单编号
+     */
+    @JsonProperty("tOrderNo")
+    @ExcelProperty(value = "贸易订单编号")
+    private String tOrderNo;
+
+    /**
+     * 合理损耗单位
+     */
+    @ExcelProperty(value = "合理损耗")
+    private String lossUnitLabel;
+
+    /**
+     * 运价
+     */
+    @ExcelProperty(value = "运价")
+    private String priceLabel;
+
+    /**
+     * 收货联系人
+     */
+    @ExcelProperty(value = "收货联系人")
+    private String receiveGoodsContacts;
+
+    /**
+     * 计划收货时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @ExcelProperty(value = "计划收货时间")
+    private LocalDate receiveGoodsDateTime;
+
+    /**
+     * 收货电话
+     */
+    @ExcelProperty(value = "收货电话")
+    private String receiveGoodsPhone;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remark;
+
+    /**
+     * 发货联系人
+     */
+    @ExcelProperty(value = "发货联系人")
+    private String shipmentsContacts;
+
+    /**
+     * 计划发货时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @ExcelProperty(value = "计划发货时间")
+    private LocalDate shipmentsDateTime;
+
+    /**
+     * 发货电话
+     */
+    @ExcelProperty(value = "发货电话")
+    private String shipmentsPhone;
+
+    /**
+     * 签约方式
+     */
+    @ExcelProperty(value = "签约方式")
+    private String signingLabel;
+
+    /**
+     * 状态
+     */
+    @ExcelProperty(value = "状态")
+    private String statusLabel;
+
+    /**
+     * 卸货地点
+     */
+    @ExcelProperty(value = "卸货地点")
+    private String unloadAddress;
+
+    @ExcelProperty(value = "创建时间")
+    private String createTime;
+
+    @ExcelProperty(value = "修改时间")
+    private String updateTime;
+
+    /**
+     * 发货单位
+     */
+    @ExcelProperty(value = "发货单位")
+    private String shipmentsUnit;
+
+    /**
+     * 收货单位
+     */
+    @ExcelProperty(value = "收货单位")
+    private String receiveGoodsUnit;
+
+    /**
+     * 商品价值(扣亏货值)
+     */
+    @ExcelProperty(value = "扣亏货值")
+    private String goodsPriceLabel;
+
+    /**
+     * 装货量
+     */
+    @ExcelProperty(value = "装货量")
+    private String loadAmount;
+
+
+    /**
+     * 待分配量(amount-subcontract_amount-entrust_amount)
+     */
+    @ExcelProperty(value = "待分配量")
+    private String waitDistributionAmount;
+
+    /**
+     * 分包量(给下游承运商分包的量)
+     */
+    @ExcelProperty(value = "分包量")
+    private String subcontractAmount;
+
+    /**
+     * 已委托量(自己承运,给下游司机分配的量)
+     */
+    @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 = "状态")
+//    private String status;
+//    /**
+//     * 卸货地点
+//     */
+//    @ExcelProperty(value = "卸货地点")
+//    private String unloadAddress;
+//    /**
+//     * 关联承运订单号
+//     */
+//    @ExcelProperty(value = "关联承运订单号")
+//    private String wOrderNo;
+//    /**
+//     * 创建时间
+//     */
+//    @ExcelProperty(value = "创建时间")
+//    private String createTime;
+//    /**
+//     * 修改时间
+//     */
+//    @ExcelProperty(value = "修改时间")
+//    private String updateTime;
+
+}

+ 405 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlvo/ConsignOrderExcelVo.java

@@ -0,0 +1,405 @@
+package com.sckw.transport.model.vo.execlvo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.sckw.excel.annotation.ExcelContext;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+/**
+ * @author lfdc
+ * @description 托运订单导出vo
+ * @date 2023-07-24 13:07:40
+ */
+@Data
+@ExcelContext(fileName = "托运订单列表", sheetName = "托运订单列表")
+public class ConsignOrderExcelVo implements Serializable {
+    /**
+     * 结算周期
+     */
+    @ExcelProperty(value = "结算周期")
+    private String accountsCycleLabel;
+
+    /**
+     * 发起人
+     */
+    @ExcelProperty(value = "发起人")
+    private String appointor;
+
+    /**
+     * 计费方式
+     */
+    @ExcelProperty(value = "计费方式")
+    private String billingModeLabel;
+
+    /**
+     * 承运单位
+     */
+    @ExcelProperty(value = "承运单位")
+    private String carrierCompany;
+    /**
+     * 承运联系人
+     */
+    @ExcelProperty(value = "承运联系人")
+    private String carrierContacts;
+    /**
+     * 承运联系电话
+     */
+    @ExcelProperty(value = "承运联系电话")
+    private String carrierPhone;
+    /**
+     * 分配承运量
+     */
+    @ExcelProperty(value = "承运量")
+    private BigDecimal carryingCapacity;
+
+    /**
+     * 托运单位
+     */
+    @ExcelProperty(value = "托运单位")
+    private String consignCompany;
+    /**
+     * 托运联系人
+     */
+    @ExcelProperty(value = "托运联系人")
+    private String consignContacts;
+    /**
+     * 托运联系电话
+     */
+    @ExcelProperty(value = "托运联系电话")
+    private String consignPhone;
+    /**
+     * 合同
+     */
+    @ExcelProperty(value = "合同")
+    private String contract;
+
+    /**
+     * 扣亏货值/元/吨
+     */
+    @ExcelProperty(value = "扣亏货值")
+    private BigDecimal deficitAmount;
+    /**
+     * 货物名称
+     */
+    @ExcelProperty(value = "货物名称")
+    private String goodsName;
+    /**
+     * 装货地点
+     */
+    @ExcelProperty(value = "装货地点")
+    private String loadAddress;
+
+    /**
+     * 承运订单号
+     */
+    @JsonProperty("lOrderNo")
+    @ExcelProperty(value = "托运订单号")
+    private String lOrderNo;
+
+    /**
+     *  贸易订单编号
+     */
+    @JsonProperty("tOrderNo")
+    @ExcelProperty(value = "贸易订单编号")
+    private String tOrderNo;
+
+    /**
+     * 合理损耗单位
+     */
+    @ExcelProperty(value = "合理损耗")
+    private String lossUnitLabel;
+
+    /**
+     * 运价
+     */
+    @ExcelProperty(value = "运价")
+    private String priceLabel;
+
+    /**
+     * 收货联系人
+     */
+    @ExcelProperty(value = "收货联系人")
+    private String receiveGoodsContacts;
+
+    /**
+     * 计划收货时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @ExcelProperty(value = "计划收货时间")
+    private LocalDate receiveGoodsDateTime;
+
+    /**
+     * 收货电话
+     */
+    @ExcelProperty(value = "收货电话")
+    private String receiveGoodsPhone;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remark;
+
+    /**
+     * 发货联系人
+     */
+    @ExcelProperty(value = "发货联系人")
+    private String shipmentsContacts;
+
+    /**
+     * 计划发货时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @ExcelProperty(value = "计划发货时间")
+    private LocalDate shipmentsDateTime;
+
+    /**
+     * 发货电话
+     */
+    @ExcelProperty(value = "发货电话")
+    private String shipmentsPhone;
+
+    /**
+     * 签约方式
+     */
+    @ExcelProperty(value = "签约方式")
+    private String signingLabel;
+
+    /**
+     * 状态
+     */
+    @ExcelProperty(value = "状态")
+    private String statusLabel;
+
+    /**
+     * 卸货地点
+     */
+    @ExcelProperty(value = "卸货地点")
+    private String unloadAddress;
+
+    @ExcelProperty(value = "创建时间")
+    private String createTime;
+
+    @ExcelProperty(value = "修改时间")
+    private String updateTime;
+
+    /**
+     * 发货单位
+     */
+    @ExcelProperty(value = "发货单位")
+    private String shipmentsUnit;
+
+    /**
+     * 收货单位
+     */
+    @ExcelProperty(value = "收货单位")
+    private String receiveGoodsUnit;
+
+    /**
+     * 商品价值(扣亏货值)
+     */
+    @ExcelProperty(value = "扣亏货值")
+    private String goodsPriceLabel;
+
+    /**
+     * 装货量
+     */
+    @ExcelProperty(value = "装货量")
+    private String loadAmount;
+
+
+    /**
+     * 待分配量(amount-subcontract_amount-entrust_amount)
+     */
+    @ExcelProperty(value = "待分配量")
+    private String waitDistributionAmount;
+
+    /**
+     * 分包量(给下游承运商分包的量)
+     */
+    @ExcelProperty(value = "分包量")
+    private String subcontractAmount;
+
+    /**
+     * 已委托量(自己承运,给下游司机分配的量)
+     */
+    @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 = "状态")
+//    private String status;
+//    /**
+//     * 卸货地点
+//     */
+//    @ExcelProperty(value = "卸货地点")
+//    private String unloadAddress;
+//    /**
+//     * 关联承运订单号
+//     */
+//    @ExcelProperty(value = "关联承运订单号")
+//    private String wOrderNo;
+//    /**
+//     * 创建时间
+//     */
+//    @ExcelProperty(value = "创建时间")
+//    private String createTime;
+//    /**
+//     * 修改时间
+//     */
+//    @ExcelProperty(value = "修改时间")
+//    private String updateTime;
+
+}

+ 118 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/AcceptCarriageOrderService.java

@@ -48,9 +48,12 @@ import com.sckw.transport.model.dto.*;
 import com.sckw.transport.model.param.AcceptCarriageOrderQuery;
 import com.sckw.transport.model.param.DriverParam;
 import com.sckw.transport.model.vo.*;
+import com.sckw.transport.model.vo.execlvo.AcceptCarriageOrderExcelVo;
+import com.sckw.transport.model.vo.AcceptCarriageOrderVO;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cloud.stream.function.StreamBridge;
 import org.springframework.data.mongodb.core.MongoTemplate;
@@ -59,6 +62,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.ObjectUtils;
 
 import java.math.BigDecimal;
+import java.text.DecimalFormat;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -2392,4 +2396,118 @@ public class AcceptCarriageOrderService {
         }
         return HttpResult.ok(vos);
     }
+
+    /**
+     * 承运订单-导出
+     *
+     * @param query 查询条件
+     * @param type  类型 1托运 2承运
+     * @return
+     */
+    public List<AcceptCarriageOrderExcelVo> exportAcceptCarriage(AcceptCarriageOrderQuery query, String type) {
+        Long entId = LoginUserHolder.getEntId();
+//        PageHelper.startPage(query.getPage(), query.getPageSize());
+        List<Integer> orderList = new ArrayList<>();
+        if (StringUtils.isNotBlank(query.getStatus())) {
+            if (String.valueOf(NumberConstant.SEVEN).equals(query.getStatus())) {
+                orderList.add(LogisticsOrderEnum.REJECT_ORDER.getCode());
+                orderList.add(LogisticsOrderEnum.CANCEL_ORDER.getCode());
+            } else {
+                orderList.add(Integer.valueOf(query.getStatus()));
+            }
+        }
+        //装卸货地址
+        String loadCode = query.getLoadAddressCode();
+        if (StringUtils.isNotBlank(loadCode)) {
+            switch (query.getLoadAddressLevel()) {
+                case 1 -> query.setLoadAddressCode(
+                        loadCode.substring(0, 2).trim());
+                case 2 -> query.setLoadAddressCode(
+                        loadCode.substring(0, 4).trim());
+                case 3 -> query.setLoadAddressCode(loadCode);
+            }
+        }
+        String unloadCode = query.getUnloadAddressCode();
+        if (StringUtils.isNotBlank(unloadCode)) {
+            switch (query.getUnloadAddressLevel()) {
+                case 1 -> query.setUnloadAddressCode(
+                        loadCode.substring(0, 2).trim());
+                case 2 -> query.setUnloadAddressCode(
+                        loadCode.substring(0, 4).trim());
+                case 3 -> query.setUnloadAddressCode(loadCode);
+            }
+        }
+        List<AcceptCarriageOrderVO> list = logisticsOrderMapper.selectLogisticsOrderList(query, orderList, type, entId);
+        /**计费方式*/
+        Map<String, String> chargingDictData = getDictData(DictTypeEnum.CHARGING_TYPE.getType());
+        /**结算周期*/
+        Map<String, String> settlementDictData = getDictData(DictTypeEnum.SETTLEMENT_CYCLE.getType());
+        /**签约方式*/
+        Map<String, String> signingWay = getDictData(DictTypeEnum.SIGNING_TYPE.getType());
+        /**合理损耗单位*/
+        Map<String, String> taxRate = getDictData(DictTypeEnum.TAX_RATE_TYPE.getType());
+        /**运价方式*/
+        Map<String, String> priceType = getDictData(DictTypeEnum.PRICE_TYPE.getType());
+        Map<Long, UserCacheResDto> longUserMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+        if (CollectionUtils.isNotEmpty(list)) {
+            List<Long> collect = list.stream().map(AcceptCarriageOrderVO::getCreateBy).collect(Collectors.toList());
+            if (CollectionUtils.isNotEmpty(collect)) {
+                longUserMap = remoteSystemService.queryUserCacheMapByIds(collect);
+            }
+        }
+        List<AcceptCarriageOrderExcelVo> exportList = new ArrayList<>();
+        for (AcceptCarriageOrderVO vo : list) {
+            AcceptCarriageOrderExcelVo carriageOrderExcelVo = new AcceptCarriageOrderExcelVo();
+            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.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.setStatusLabel(LogisticsOrderEnum.getName(vo.getStatus()));
+            carriageOrderExcelVo.setLoadAddress(vo.getLoadCityName() + vo.getLoadAddress());
+            carriageOrderExcelVo.setUnloadAddress(vo.getUnloadCityName() + vo.getUnloadAddress());
+            if (vo.getTOrderId() != null) {
+                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())) {
+                            carriageOrderExcelVo.setShipmentsUnit(detailRes.getFirmName());
+                        } else {
+                            carriageOrderExcelVo.setReceiveGoodsUnit(detailRes.getFirmName());
+                        }
+                    }
+                }
+            }
+            BigDecimal subtract = vo.getCarryingCapacity().subtract(vo.getSubcontractAmount()).subtract(vo.getEntrustAmount());
+            DecimalFormat df = new DecimalFormat("0.00");
+            carriageOrderExcelVo.setWaitDistributionAmount(subtract == null ? null : df.format(subtract));
+            String tOrderId = vo.getTOrderId();
+            if (StringUtils.isNotBlank(tOrderId)) {
+                OrderDetailRes orderDetailById = tradeOrderInfoService.getOrderDetailById(Long.parseLong(tOrderId));
+                if (orderDetailById != null) {
+                    List<UnitInfoDetailRes> unitInfo = orderDetailById.getUnitInfo();
+                    if (CollectionUtils.isNotEmpty(unitInfo)) {
+                        for (UnitInfoDetailRes detailRes : unitInfo) {
+                            if ("1".equals(detailRes.getUnitType())) {
+                                carriageOrderExcelVo.setReceiveGoodsUnit(detailRes.getFirmName());
+                            }
+                            if ("2".equals(detailRes.getUnitType())) {
+                                carriageOrderExcelVo.setShipmentsUnit(detailRes.getFirmName());
+                            }
+                        }
+                    }
+                }
+            }
+            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);
+        }
+        return exportList;
+    }
 }

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

@@ -44,11 +44,14 @@ import com.sckw.transport.dao.*;
 import com.sckw.transport.model.*;
 import com.sckw.transport.model.dto.*;
 import com.sckw.transport.model.param.AcceptCarriageOrderQuery;
+import com.sckw.transport.model.param.ConsignOrderQuery;
 import com.sckw.transport.model.param.DriverParam;
 import com.sckw.transport.model.vo.*;
+import com.sckw.transport.model.vo.execlvo.ConsignOrderExcelVo;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cloud.stream.function.StreamBridge;
 import org.springframework.data.mongodb.core.MongoTemplate;
@@ -57,6 +60,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.ObjectUtils;
 
 import java.math.BigDecimal;
+import java.text.DecimalFormat;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -1621,6 +1625,7 @@ public class ConsignOrderService {
             vo.setStatusLabel(LogisticsOrderEnum.getName(vo.getStatus()));
             vo.setLoadAddress(vo.getLoadCityName() + vo.getLoadAddress());
             vo.setUnloadAddress(vo.getUnloadCityName() + vo.getUnloadAddress());
+            vo.setPriceLabel(vo.getPriceType() == null ? null : priceDictData.get(vo.getPriceType()));
             if (vo.getTOrderId() != null) {
                 OrderDetailRes orderDetailRes = tradeOrderInfoService.getOrderDetailById(Long.valueOf(vo.getTOrderId()));
                 if (orderDetailRes != null) {
@@ -1750,4 +1755,111 @@ public class ConsignOrderService {
         }
         return HttpResult.ok(vos);
     }
+
+    public List<ConsignOrderExcelVo> exportConsign(ConsignOrderQuery query, String type) {
+        Long entId = LoginUserHolder.getEntId();
+//        PageHelper.startPage(query.getPage(), query.getPageSize());
+        List<Integer> orderList = new ArrayList<>();
+        if (StringUtils.isNotBlank(query.getStatus())) {
+            if (String.valueOf(NumberConstant.SEVEN).equals(query.getStatus())) {
+                orderList.add(LogisticsOrderEnum.REJECT_ORDER.getCode());
+                orderList.add(LogisticsOrderEnum.CANCEL_ORDER.getCode());
+            } else {
+                orderList.add(Integer.valueOf(query.getStatus()));
+            }
+        }
+        //装卸货地址
+        String loadCode = query.getLoadAddressCode();
+        if (StringUtils.isNotBlank(loadCode)) {
+            switch (query.getLoadAddressLevel()) {
+                case 1 -> query.setLoadAddressCode(
+                        loadCode.substring(0, 2).trim());
+                case 2 -> query.setLoadAddressCode(
+                        loadCode.substring(0, 4).trim());
+                case 3 -> query.setLoadAddressCode(loadCode);
+            }
+        }
+        String unloadCode = query.getUnloadAddressCode();
+        if (StringUtils.isNotBlank(unloadCode)) {
+            switch (query.getUnloadAddressLevel()) {
+                case 1 -> query.setUnloadAddressCode(
+                        loadCode.substring(0, 2).trim());
+                case 2 -> query.setUnloadAddressCode(
+                        loadCode.substring(0, 4).trim());
+                case 3 -> query.setUnloadAddressCode(loadCode);
+            }
+        }
+        List<ConsignOrderVO> list = kwtLogisticsOrderMapper.selectConsignLogisticsOrderList(query, orderList, type, entId);
+        /**计费方式*/
+        Map<String, String> chargingDictData = commonService.getDictData(DictTypeEnum.CHARGING_TYPE.getType());
+        /**结算周期*/
+        Map<String, String> settlementDictData = commonService.getDictData(DictTypeEnum.SETTLEMENT_CYCLE.getType());
+        /**签约方式*/
+        Map<String, String> signingWay = commonService.getDictData(DictTypeEnum.SIGNING_TYPE.getType());
+        /**合理损耗单位*/
+        Map<String, String> taxRate = commonService.getDictData(DictTypeEnum.TAX_RATE_TYPE.getType());
+        /**运价方式*/
+        Map<String, String> priceType = commonService.getDictData(DictTypeEnum.PRICE_TYPE.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());
+            if (CollectionUtils.isNotEmpty(collect)) {
+                longUserMap = remoteSystemService.queryUserCacheMapByIds(collect);
+            }
+        }
+        List<ConsignOrderExcelVo> exportList = new ArrayList<>();
+        for (ConsignOrderVO vo : list) {
+            ConsignOrderExcelVo consignOrderExcelVo = new ConsignOrderExcelVo();
+            BeanUtils.copyProperties(vo, consignOrderExcelVo);
+            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.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.setStatusLabel(LogisticsOrderEnum.getName(vo.getStatus()));
+            consignOrderExcelVo.setLoadAddress(vo.getLoadCityName() + vo.getLoadAddress());
+            consignOrderExcelVo.setUnloadAddress(vo.getUnloadCityName() + vo.getUnloadAddress());
+            if (vo.getTOrderId() != null) {
+                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())) {
+                            consignOrderExcelVo.setShipmentsUnit(detailRes.getFirmName());
+                        } else {
+                            consignOrderExcelVo.setReceiveGoodsUnit(detailRes.getFirmName());
+                        }
+                    }
+                }
+            }
+            BigDecimal subtract = vo.getCarryingCapacity().subtract(vo.getSubcontractAmount()).subtract(vo.getEntrustAmount());
+            DecimalFormat df = new DecimalFormat("0.00");
+            consignOrderExcelVo.setWaitDistributionAmount(subtract == null ? null : df.format(subtract));
+            String tOrderId = vo.getTOrderId();
+            if (StringUtils.isNotBlank(tOrderId)) {
+                OrderDetailRes orderDetailById = tradeOrderInfoService.getOrderDetailById(Long.parseLong(tOrderId));
+                if (orderDetailById != null) {
+                    List<UnitInfoDetailRes> unitInfo = orderDetailById.getUnitInfo();
+                    if (CollectionUtils.isNotEmpty(unitInfo)) {
+                        for (UnitInfoDetailRes detailRes : unitInfo) {
+                            if ("1".equals(detailRes.getUnitType())) {
+                                consignOrderExcelVo.setReceiveGoodsUnit(detailRes.getFirmName());
+                            }
+                            if ("2".equals(detailRes.getUnitType())) {
+                                consignOrderExcelVo.setShipmentsUnit(detailRes.getFirmName());
+                            }
+                        }
+                    }
+                }
+            }
+            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);
+        }
+        return exportList;
+    }
 }

+ 140 - 0
sckw-modules/sckw-transport/src/main/resources/mapper/KwtLogisticsOrderMapper.xml

@@ -1005,4 +1005,144 @@
             </if>
         </where>
     </select>
+
+    <select id="selectLogisticsOrderListExport" resultType="com.sckw.transport.model.vo.execlvo.AcceptCarriageOrderExcelVo">
+        SELECT
+        <include refid="Query_Column_List">
+        </include>
+        FROM
+        kwt_logistics_order a
+        LEFT JOIN kwt_logistics_order_address b ON a.id = b.l_order_id
+        AND b.address_type = 1 AND b.del_flag = 0
+        LEFT JOIN kwt_logistics_order_address c ON a.id = c.l_order_id
+        AND c.address_type = 2 AND c.del_flag = 0
+        LEFT JOIN kwt_logistics_order_unit d ON a.id = d.l_order_id
+        AND d.unit_type = 1 AND d.del_flag = 0
+        LEFT JOIN kwt_logistics_order_unit e ON a.id = e.l_order_id
+        AND e.unit_type = 2
+        LEFT JOIN kwt_logistics_order_goods g ON a.id = g.l_order_id AND g.del_flag = 0
+        LEFT JOIN kwt_logistics_order_contract f ON a.id = f.l_order_id AND f.del_flag = 0
+        <where>
+            a.del_flag = 0
+            <if test="type == 1">
+                and (d.top_ent_id = #{entId} or d.ent_id = #{entId})
+            </if>
+            <if test="type == 2">
+                and (e.top_ent_id = #{entId} or e.ent_id = #{entId})
+            </if>
+            <if test="query.keywords != null and query.keywords != ''">
+                and (
+                a.t_order_no like concat('%',#{query.keywords},'%')
+                or a.l_order_no like concat('%',#{query.keywords},'%')
+                or d.firm_name like concat('%',#{query.keywords},'%')
+                or e.firm_name like concat('%',#{query.keywords},'%')
+                or g.goods_name like concat('%',#{query.keywords},'%'))
+            </if>
+            <if test="orderList != null and orderList.size() > 0 ">
+                and a.status in
+                <foreach collection="orderList" item="status" open="(" close=")" separator=",">
+                    #{status}
+                </foreach>
+            </if>
+            <if test="query.endBeginDateTime != null and query.endBeginDateTime != '' ">
+                and DATE( a.end_time) <![CDATA[ >= ]]> #{query.endBeginDateTime}
+            </if>
+            <if test="query.endOverDateTime != null and query.endOverDateTime != '' ">
+                and DATE( a.end_time ) <![CDATA[ <= ]]> #{query.endOverDateTime}
+            </if>
+            <if test="query.startBeginDateTime != null and query.startBeginDateTime != '' ">
+                and DATE( a.start_time) <![CDATA[ >= ]]> #{query.startBeginDateTime}
+            </if>
+            <if test="query.startOverDateTime != null and query.startOverDateTime != '' ">
+                and DATE( a.start_time ) <![CDATA[ <= ]]> #{query.startOverDateTime}
+            </if>
+            <if test="query.createStartTime != null and query.createStartTime != '' ">
+                and a.create_time &gt;=#{query.createStartTime}
+            </if>
+            <if test="query.createEndTime != null and query.createEndTime != ''">
+                and a.create_time &lt;=#{query.createEndTime}
+            </if>
+            <if test="query.loadAddressCode != null and query.loadAddressCode != ''">
+                and b.city_code = #{query.loadAddressCode}
+            </if>
+            <if test="query.unloadAddressCode != null and query.unloadAddressCode != ''">
+                and c.city_code = #{query.unloadAddressCode}
+            </if>
+            <if test="query.billingMode != null and query.billingMode != ''">
+                and a.billing_mode =#{query.billingMode}
+            </if>
+        </where>
+        ORDER BY a.id DESC
+        <!--               ,a.create_time-->
+    </select>
+
+    <select id="selectConsignLogisticsOrderList" resultType="com.sckw.transport.model.vo.ConsignOrderVO">
+        SELECT
+        <include refid="Query_Column_List">
+        </include>
+        FROM
+        kwt_logistics_order a
+        LEFT JOIN kwt_logistics_order_address b ON a.id = b.l_order_id
+        AND b.address_type = 1 AND b.del_flag = 0
+        LEFT JOIN kwt_logistics_order_address c ON a.id = c.l_order_id
+        AND c.address_type = 2 AND c.del_flag = 0
+        LEFT JOIN kwt_logistics_order_unit d ON a.id = d.l_order_id
+        AND d.unit_type = 1 AND d.del_flag = 0
+        LEFT JOIN kwt_logistics_order_unit e ON a.id = e.l_order_id
+        AND e.unit_type = 2
+        LEFT JOIN kwt_logistics_order_goods g ON a.id = g.l_order_id AND g.del_flag = 0
+        LEFT JOIN kwt_logistics_order_contract f ON a.id = f.l_order_id AND f.del_flag = 0
+        <where>
+            a.del_flag = 0
+            <if test="type == 1">
+                and (d.top_ent_id = #{entId} or d.ent_id = #{entId})
+            </if>
+            <if test="type == 2">
+                and (e.top_ent_id = #{entId} or e.ent_id = #{entId})
+            </if>
+            <if test="query.keywords != null and query.keywords != ''">
+                and (
+                a.t_order_no like concat('%',#{query.keywords},'%')
+                or a.l_order_no like concat('%',#{query.keywords},'%')
+                or d.firm_name like concat('%',#{query.keywords},'%')
+                or e.firm_name like concat('%',#{query.keywords},'%')
+                or g.goods_name like concat('%',#{query.keywords},'%'))
+            </if>
+            <if test="orderList != null and orderList.size() > 0 ">
+                and a.status in
+                <foreach collection="orderList" item="status" open="(" close=")" separator=",">
+                    #{status}
+                </foreach>
+            </if>
+            <if test="query.endBeginDateTime != null and query.endBeginDateTime != '' ">
+                and DATE( a.end_time) <![CDATA[ >= ]]> #{query.endBeginDateTime}
+            </if>
+            <if test="query.endOverDateTime != null and query.endOverDateTime != '' ">
+                and DATE( a.end_time ) <![CDATA[ <= ]]> #{query.endOverDateTime}
+            </if>
+            <if test="query.startBeginDateTime != null and query.startBeginDateTime != '' ">
+                and DATE( a.start_time) <![CDATA[ >= ]]> #{query.startBeginDateTime}
+            </if>
+            <if test="query.startOverDateTime != null and query.startOverDateTime != '' ">
+                and DATE( a.start_time ) <![CDATA[ <= ]]> #{query.startOverDateTime}
+            </if>
+            <if test="query.createStartTime != null and query.createStartTime != '' ">
+                and a.create_time &gt;=#{query.createStartTime}
+            </if>
+            <if test="query.createEndTime != null and query.createEndTime != ''">
+                and a.create_time &lt;=#{query.createEndTime}
+            </if>
+            <if test="query.loadAddressCode != null and query.loadAddressCode != ''">
+                and b.city_code = #{query.loadAddressCode}
+            </if>
+            <if test="query.unloadAddressCode != null and query.unloadAddressCode != ''">
+                and c.city_code = #{query.unloadAddressCode}
+            </if>
+            <if test="query.billingMode != null and query.billingMode != ''">
+                and a.billing_mode =#{query.billingMode}
+            </if>
+        </where>
+        ORDER BY a.id DESC
+        <!--               ,a.create_time-->
+    </select>
 </mapper>