Эх сурвалжийг харах

1.根据原型修改增加承运订单加托运订单数据展示
2.根据原型新增导出字段以及排序
3.根据业务要求修改时间存储有yyyy-mm-dd变为yyyy-mm-dd hh:mm:ss
4.修改文件上传返回值处理
5.根据原型修改新增分包托运展示数据以及数据导出

lengfaqiang 2 жил өмнө
parent
commit
e63f9c4b98
14 өөрчлөгдсөн 450 нэмэгдсэн , 330 устгасан
  1. 2 2
      sckw-common/sckw-common-excel/src/main/java/com/sckw/excel/utils/DateUtil.java
  2. 8 8
      sckw-common/sckw-common-mongo/src/main/java/com/sckw/mongo/model/SckwLogisticsOrder.java
  3. 3 3
      sckw-modules/sckw-report/src/main/java/com/sckw/report/service/vo/AcceptCarriageOrderVo.java
  4. 3 3
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/KwtLogisticsOrder.java
  5. 11 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/AcceptCarriageOrderVO.java
  6. 14 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/ConsignOrderVO.java
  7. 3 3
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/OrderDetailVO.java
  8. 21 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/SubcontractConsignmentVO.java
  9. 148 123
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/AcceptCarriageOrderExcelVo.java
  10. 144 118
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/ConsignOrderExcelVo.java
  11. 23 16
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/AcceptCarriageOrderService.java
  12. 36 28
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/ConsignOrderService.java
  13. 17 15
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/LogisticsConsignmentService.java
  14. 17 11
      sckw-modules/sckw-transport/src/main/resources/mapper/KwtLogisticsOrderMapper.xml

+ 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;
 }

+ 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);

+ 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,