Browse Source

Merge branch 'dev' into pre-production

single_db
pref_mail@163.com 1 year ago
parent
commit
d79f5b8070
  1. 1
      blade-biz-common/src/main/java/org/springblade/common/constant/CodeNumConstant.java
  2. 43
      blade-biz-common/src/main/java/org/springblade/common/constant/driver/DriverApprovedDrivingModelConstant.java
  3. 48
      blade-biz-common/src/main/java/org/springblade/common/constant/driver/DriverBankTypeConverter.java
  4. 36
      blade-biz-common/src/main/java/org/springblade/common/constant/driver/DriverPositionTypeConstant.java
  5. 40
      blade-biz-common/src/main/java/org/springblade/common/constant/driver/DriverTypeStatusConstant.java
  6. 5
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataCarrierEntity.java
  7. 4
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataDriverArteryEntity.java
  8. 2
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataVehicleEntity.java
  9. 6
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataWarehouseEntity.java
  10. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionBillOrderPackVO.java
  11. 20
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BatchUnloadDTO.java
  12. 10
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  13. 2
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/TrunklineCarsLoadDTO.java
  14. 6
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/TrunklineCarsLoadLineDTO.java
  15. 12
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/UnloadPackageDTO.java
  16. 15
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/UnloadZeroDTO.java
  17. 13
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsOrderEntity.java
  18. 86
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsSignLogEntity.java
  19. 84
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineLoadSignOrderEntity.java
  20. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadAllOrderVO.java
  21. 27
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/SignOrderDetailVO.java
  22. 12
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/SignPackageVO.java
  23. 20
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/SignScanOrderVO.java
  24. 12
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineLoadSignOrderVO.java
  25. 30
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataDriverArteryExcel.java
  26. 77
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataDriverArteryImproterExcel.java
  27. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java
  28. 11
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml
  29. 33
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java
  30. 115
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java
  31. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  32. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.java
  33. 17
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml
  34. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  35. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationPackageService.java
  36. 58
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  37. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationPackageServiceImpl.java
  38. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  39. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationStockarticleServiceImpl.java
  40. 38
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  41. 145
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java
  42. 156
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/TripartiteTransferApiController.java
  43. 379
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  44. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java
  45. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.java
  46. 16
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml
  47. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadLineMapper.java
  48. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadLineMapper.xml
  49. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java
  50. 74
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  51. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java
  52. 48
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  53. 19
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java
  54. 96
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
  55. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsSignLogMapper.java
  56. 27
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.java
  57. 75
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml
  58. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingWaybillService.java
  59. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadLineService.java
  60. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java
  61. 33
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java
  62. 20
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java
  63. 10
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsSignLogService.java
  64. 24
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineLoadSignOrderService.java
  65. 14
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java
  66. 10
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java
  67. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLineServiceImpl.java
  68. 33
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java
  69. 843
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  70. 46
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java
  71. 39
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsSignLogServiceImpl.java
  72. 51
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineLoadSignOrderServiceImpl.java

1
blade-biz-common/src/main/java/org/springblade/common/constant/CodeNumConstant.java

@ -15,5 +15,6 @@ public class CodeNumConstant {
public final static int TRUNKLINEBILLLADING = 11;//干线提货单号
public final static int TRUNKLINE_CARS_LOAD = 12;//干线配载批次号
public final static int TRUNKLINE_TRIPARTITE_LOAD = 13;//干线三方中转批次号
public final static int TRUNKLINE_LOAD_SIGN = 14;//干线直发商家签收单号
}

43
blade-biz-common/src/main/java/org/springblade/common/constant/driver/DriverApprovedDrivingModelConstant.java

@ -0,0 +1,43 @@
package org.springblade.common.constant.driver;
/*
* logisticsplatform-service
* @Author Diss
* @Create 2024/1/12 15:32
*/
/**
* ApprovedDrivingModel
*/
public enum DriverApprovedDrivingModelConstant {
//准驾车型;1-A1,2-A2,3-A3,4-B1,5-B2,6-C1,7-C2
A1("A1", "1"),
A2("A2", "2"),
A3("A3", "3"),
B1("B1", "4"),
B2("B2", "5"),
C1("C1", "6"),
C2("C2", "7");
private String name;
private String value;
DriverApprovedDrivingModelConstant(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

48
blade-biz-common/src/main/java/org/springblade/common/constant/driver/DriverBankTypeConverter.java

@ -0,0 +1,48 @@
package org.springblade.common.constant.driver;
/*
* logisticsplatform-service
* @Author Diss
* @Create 2024/1/12 15:34
*/
/**
* BankType
*/
public enum DriverBankTypeConverter {
//银行类型;1-工商银行,2-建设银行,3-农业银行,4-邮政银行,5-中国银行,6-交通银行,7-其他
ICBC("工商银行","1"),
//2-建设银行
CCB("建设银行","2"),
//3-农业银行
ABC("农业银行","3"),
//4-邮政银行
POST("邮政银行","4"),
//5-中国银行
BANK("中国银行","5"),
//6-交通银行
JHB("交通银行","6"),
//7-其他
OTHER("其他","7");
private String name;
private String value;
DriverBankTypeConverter(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

36
blade-biz-common/src/main/java/org/springblade/common/constant/driver/DriverPositionTypeConstant.java

@ -0,0 +1,36 @@
package org.springblade.common.constant.driver;
/*
* logisticsplatform-service
* @Author Diss
* @Create 2024/1/12 15:28
*/
public enum DriverPositionTypeConstant {
//职务类型;1-干线,2-配送
ganxian("干线", "1"),
peisong("配送", "2");
private String name;
private String value;
DriverPositionTypeConstant(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

40
blade-biz-common/src/main/java/org/springblade/common/constant/driver/DriverTypeStatusConstant.java

@ -0,0 +1,40 @@
package org.springblade.common.constant.driver;
/*
* logisticsplatform-service
* @Author Diss
* @Create 2024/1/12 15:19
*/
/**
* 司机类型的状态
*/
public enum DriverTypeStatusConstant {
//司机类型;1-自有,2-加盟,3-外调,4-临调
ziyou("自有", "1"),
jiamao("加盟", "2"),
waifang("外调", "3"),
lincha("临调", "4");
private String name;
private String value;
DriverTypeStatusConstant(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

5
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataCarrierEntity.java

@ -207,5 +207,10 @@ public class BasicdataCarrierEntity extends TenantEntity {
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* id
*/
@ApiModelProperty(value = "id")
private Long id;
}

4
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataDriverArteryEntity.java

@ -212,13 +212,13 @@ public class BasicdataDriverArteryEntity extends TenantEntity {
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
@ApiModelProperty(value = "仓库ID")
private String warehouseId;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
}

2
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataVehicleEntity.java

@ -319,4 +319,6 @@ public class BasicdataVehicleEntity extends TenantEntity {
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "id")
private Long id;
}

6
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataWarehouseEntity.java

@ -280,4 +280,10 @@ public class BasicdataWarehouseEntity extends TenantEntity {
@ApiModelProperty(value = "老系统id")
private Integer oldId;
/**
* 对应id
*/
@ApiModelProperty(value = "仓库id")
public Long id;
}

4
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionBillOrderPackVO.java

@ -37,4 +37,8 @@ public class DistributionBillOrderPackVO {
private Date signForCreateTime; //签收时间
private Date clerkUpdateTime; //文员签收时间
private Date stockupCreateTime; //备货时间名称
/**
* 服务类型
*/
private String outboundType;
}

20
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BatchUnloadDTO.java

@ -0,0 +1,20 @@
package com.logpm.trunkline.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
public class BatchUnloadDTO implements Serializable {
private Long loadId;
private Long warehouseId;
private List<UnloadPackageDTO> unloadPackageList = new ArrayList<>();
private List<UnloadZeroDTO> unloadZeroList = new ArrayList<>();
}

10
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java

@ -76,5 +76,15 @@ public class LoadCarsDTO implements Serializable {
private List<LoadScanFinalNodeIdVO> loadScanFinalNodeIdList = new ArrayList<>();
private String fullLoadRate;
private String mallName;
private Long driverId;
private String signStatus;
private Long signOrderId;
private List<Long> loadScanIds = new ArrayList<>();
private String signOrderIds;
}

2
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/TrunklineCarsLoadDTO.java

@ -10,6 +10,8 @@ import java.util.List;
public class TrunklineCarsLoadDTO extends TrunklineCarsLoadEntity {
private List<TrunklineCarsLoadLineDTO> carsLoadLineList = new ArrayList<>();
private List<TrunklineCarsLoadLineDTO> addCarsLoadLineList = new ArrayList<>();
private List<TrunklineCarsLoadLineDTO> removeCarsLoadLineList = new ArrayList<>();
private String carrierTimeStr;
private String receivingTimeStr;

6
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/TrunklineCarsLoadLineDTO.java

@ -9,6 +9,10 @@ import java.util.List;
@Data
public class TrunklineCarsLoadLineDTO extends TrunklineCarsLoadLineEntity {
private List<TrunklineCarsOrderDTO> lineCarsOrderList = new ArrayList<>();
private Integer updateType;//1 更新sort 2新增
private List<TrunklineCarsOrderDTO> addList = new ArrayList<>();
private List<TrunklineCarsOrderDTO> removeList = new ArrayList<>();
}

12
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/UnloadPackageDTO.java

@ -0,0 +1,12 @@
package com.logpm.trunkline.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class UnloadPackageDTO implements Serializable {
private String orderPackageCode;
}

15
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/UnloadZeroDTO.java

@ -0,0 +1,15 @@
package com.logpm.trunkline.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class UnloadZeroDTO implements Serializable {
private String waybillNo;
private Integer enterNum;
private String trayCode;
private String orderCode;
}

13
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsOrderEntity.java

@ -63,7 +63,7 @@ public class TrunklineCarsOrderEntity extends TenantEntity {
private Integer type ;
/** 是否是直发商家 0否 1是 */
@ApiModelProperty(name = "是否是直发商家 0否 1是",notes = "")
private String isCustomer ;
private String isCustomer = "0" ;
/** 实际件数 */
@ApiModelProperty(name = "实际件数",notes = "")
private Integer realNum;
@ -77,5 +77,16 @@ public class TrunklineCarsOrderEntity extends TenantEntity {
@ApiModelProperty(name = "卸车数量",notes = "")
private Integer unloadNum;
/** 发车数量 */
@ApiModelProperty(name = "发车数量",notes = "")
private Integer startNum;
/** 签收数量 */
@ApiModelProperty(name = "签收数量",notes = "")
private Integer signNum;
/** 签收单id */
@ApiModelProperty(name = "签收单id",notes = "")
private Long signOrderId;
}

86
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineCarsSignLogEntity.java

@ -0,0 +1,86 @@
package com.logpm.trunkline.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_trunkline_cars_sign_log")
@ApiModel(value = "TrunklineCarsSignLog对象", description = "干线签收记录表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineCarsSignLogEntity extends TenantEntity {
/** 预留1 */
@ApiModelProperty(name = "预留1",notes = "")
private String reserve1 ;
/** 预留2 */
@ApiModelProperty(name = "预留2",notes = "")
private String reserve2 ;
/** 预留3 */
@ApiModelProperty(name = "预留3",notes = "")
private String reserve3 ;
/** 预留4 */
@ApiModelProperty(name = "预留4",notes = "")
private String reserve4 ;
/** 预留5 */
@ApiModelProperty(name = "预留5",notes = "")
private String reserve5 ;
/** 仓库id */
@ApiModelProperty(name = "仓库id",notes = "")
private Long warehouseId ;
/** 仓库名称 */
@ApiModelProperty(name = "仓库名称",notes = "")
private String warehouseName ;
/** 配载id */
@ApiModelProperty(name = "配载id",notes = "")
private Long loadId ;
/** 配载批次号 */
@ApiModelProperty(name = "配载批次号",notes = "")
private String loadCode ;
/** 运单id */
@ApiModelProperty(name = "运单id",notes = "")
private Long waybillId ;
/** 运单号 */
@ApiModelProperty(name = "运单号",notes = "")
private String waybillNo ;
/** 订单号 */
@ApiModelProperty(name = "订单号",notes = "")
private String orderCode ;
/** 包件码/品类名 */
@ApiModelProperty(name = "包件码/品类名",notes = "")
private String scanCode ;
/** 数量 */
@ApiModelProperty(name = "数量",notes = "")
private Integer num ;
/** 类型 1订制品 2零担 */
@ApiModelProperty(name = "类型 1订制品 2零担",notes = "")
private Integer type ;
/** 有无数据 1有 0无 */
@ApiModelProperty(name = "有无数据 1有 0无",notes = "")
private Integer isData ;
/** 是否异常 1是 0否 */
@ApiModelProperty(name = "是否异常 1是 0否",notes = "")
private Integer isAbnormal ;
/** 托盘码 */
@ApiModelProperty(name = "托盘码",notes = "")
private String trayCode ;
/** 托盘名称 */
@ApiModelProperty(name = "托盘名称",notes = "")
private String trayName ;
/** 托盘id */
@ApiModelProperty(name = "托盘id",notes = "")
private Long trayId ;
/** 来源仓库id */
@ApiModelProperty(name = "来源仓库id",notes = "")
private Long fromWarehouseId ;
/** 装车记录id */
@ApiModelProperty(name = "装车记录id",notes = "")
private Long loadScanId ;
/** 备注 */
@ApiModelProperty(name = "备注",notes = "")
private String remark ;
}

84
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineLoadSignOrderEntity.java

@ -0,0 +1,84 @@
package com.logpm.trunkline.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
@Data
@TableName("logpm_trunkline_load_sign_order")
@ApiModel(value = "TrunklineLoadSignOrder对象", description = "配载计划直发签收单")
@EqualsAndHashCode(callSuper = true)
public class TrunklineLoadSignOrderEntity extends TenantEntity {
/** 预留1 */
@ApiModelProperty(name = "预留1",notes = "")
private String reserve1 ;
/** 预留2 */
@ApiModelProperty(name = "预留2",notes = "")
private String reserve2 ;
/** 预留3 */
@ApiModelProperty(name = "预留3",notes = "")
private String reserve3 ;
/** 预留4 */
@ApiModelProperty(name = "预留4",notes = "")
private String reserve4 ;
/** 预留5 */
@ApiModelProperty(name = "预留5",notes = "")
private String reserve5 ;
/** 配载id */
@ApiModelProperty(name = "配载id",notes = "")
private Long loadId ;
/** 节点id */
@ApiModelProperty(name = "节点id",notes = "")
private Long warehouseId;
/** 商家名称 */
@ApiModelProperty(name = "商家名称",notes = "")
private String mallName;
/** 商家收货人 */
@ApiModelProperty(name = "商家收货人",notes = "")
private String mallPerson;
/** 商家收货人电话 */
@ApiModelProperty(name = "商家收货人电话",notes = "")
private String mallMobile;
/** 商家收货地址 */
@ApiModelProperty(name = "商家收货地址",notes = "")
private String mallAddress;
/** 签收单归属仓库id */
@ApiModelProperty(name = "签收单归属仓库id",notes = "")
private Long belongToWarehouseId;
/** 签收单归属仓库名称 */
@ApiModelProperty(name = "签收单归属仓库名称",notes = "")
private String belongToWarehouseName;
/** 签收单计划件数 */
@ApiModelProperty(name = "签收单计划件数",notes = "")
private Integer planNum;
/** 签收单装车件数 */
@ApiModelProperty(name = "签收单装车件数",notes = "")
private Integer loadingNum;
/** 签收单签收件数 */
@ApiModelProperty(name = "签收单签收件数",notes = "")
private Integer signNum;
/** 签收单签收状态 */
@ApiModelProperty(name = "签收单签收状态",notes = "")
private String signStatus;// 0未签收 10部分签收 20已签收
/** 签收单号 */
@ApiModelProperty(name = "签收单号",notes = "")
private String loadSignCode;
}

3
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/CarsLoadAllOrderVO.java

@ -14,10 +14,13 @@ public class CarsLoadAllOrderVO implements Serializable {
private String waybillNo;//运单号
private Date createTime;//创建时间
private String destination;//到站
private String departureWarehouseName;//目的仓
private String destinationWarehouseName;//目的仓
private String shipper;//发货单位
private String consignee;//收货单位
private String consigneeName;//收货人
private String consigneeMobile;//收货人
private String consigneeAddress;//收货人
private String goodsName;//货物名称
private String customerTrain;//客户车次号
private String remark;//备注好

27
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/SignOrderDetailVO.java

@ -0,0 +1,27 @@
package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class SignOrderDetailVO implements Serializable {
private Long loadScanId;
private String carsNo;
private String waybillNo;
private String orderCode;
private String warehouseName;
private String mallName;
private String mallPerson;
private String mallMobile;
private String mallAddress;
private String scanCode;
private String scanStatus;
private Integer type;
private Integer num;
private Integer unloadNum;
private String remark;
private Long signOrderId;
}

12
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/SignPackageVO.java

@ -0,0 +1,12 @@
package com.logpm.trunkline.vo;
import java.io.Serializable;
public class SignPackageVO implements Serializable {
private String orderPackageCode;
private Integer num;
private Integer unloadNum;
private String scanStatus;
}

20
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/SignScanOrderVO.java

@ -0,0 +1,20 @@
package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
public class SignScanOrderVO implements Serializable {
private String waybillNo;
private String orderCode;
private Integer loadingNum;
private Integer signNum;
private List<SignPackageVO> signPackageList = new ArrayList<>();
}

12
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineLoadSignOrderVO.java

@ -0,0 +1,12 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity;
import lombok.Data;
@Data
public class TrunklineLoadSignOrderVO extends TrunklineLoadSignOrderEntity {
private String driverName;
private String carsNo;
}

30
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataDriverArteryExcel.java

@ -17,6 +17,7 @@
package com.logpm.basicdata.excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
@ -56,13 +57,6 @@ public class BasicdataDriverArteryExcel implements Serializable {
@ColumnWidth(40)
@ExcelProperty("司机手机号码")
private String phone;
/**
* 车辆信息
*/
@ColumnWidth(40)
@ExcelProperty("车辆信息")
private String bindVehicles;
/**
* 司机类型;1-自有,2-加盟,3-外调,4-临调
*/
@ -81,7 +75,12 @@ public class BasicdataDriverArteryExcel implements Serializable {
@ColumnWidth(40)
@ExcelProperty("准驾车型;1-A1,2-A2,3-A3,4-B1,5-B2,6-C1,7-C2")
private Integer drivingType;
/**
* 车辆信息
*/
@ColumnWidth(40)
@ExcelProperty("车辆信息")
private String bindVehicles;
/**
* 绑定车辆
*/
@ -111,7 +110,13 @@ public class BasicdataDriverArteryExcel implements Serializable {
*/
@ColumnWidth(40)
@ExcelProperty("性别")
private Integer gender;
private String gender;
/**
* 仓库
*/
@ColumnWidth(40)
@ExcelProperty("仓库")
private String warehouseName;
/**
* 居住地址
*/
@ -166,7 +171,12 @@ public class BasicdataDriverArteryExcel implements Serializable {
@ColumnWidth(40)
@ExcelProperty("道路经营许可证号")
private String roadOperationLicenseNub;
/**
* 关联承运商Id
*/
@ColumnWidth(40)
@ExcelProperty("关联承运商")
private String carrierName;
/**
* 运输协议
*/

77
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdataDriverArteryImproterExcel.java

@ -17,13 +17,16 @@
package com.logpm.basicdata.excel;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
@ -41,7 +44,6 @@ public class BasicdataDriverArteryImproterExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 司机姓名
*/
@ -54,44 +56,48 @@ public class BasicdataDriverArteryImproterExcel implements Serializable {
@ColumnWidth(40)
@ExcelProperty("司机手机号码")
private String phone;
/**
* 车辆信息
*/
@ColumnWidth(40)
@ExcelProperty("车辆信息")
private String bindVehicles;
/**
* 司机类型;1-自有,2-加盟,3-外调,4-临调
*/
@ColumnWidth(40)
@ExcelProperty("司机类型;1-自有,2-加盟,3-外调,4-临调")
private Integer type;
private String type;
/**
* 职务类型;1-干线,2-配送
*/
@ColumnWidth(40)
@ExcelProperty("职务类型;1-干线,2-配送")
private Integer jobType;
private String jobType;
/**
* 准驾车型;1-A1,2-A2,3-A3,4-B1,5-B2,6-C1,7-C2
*/
@ColumnWidth(40)
@ExcelProperty("准驾车型;1-A1,2-A2,3-A3,4-B1,5-B2,6-C1,7-C2")
private Integer drivingType;
private String drivingType;
// /**
// * 车辆信息
// */
// @ColumnWidth(40)
// @ExcelProperty("车辆信息")
// private String bindVehicles;
/**
* 绑定车辆
*/
@ColumnWidth(40)
@ExcelProperty("绑定车辆")
private String bindVehicle;
/**
* 合同开始时间
*/
@ColumnWidth(40)
@ExcelProperty("合同开始时间")
private String contractStartTime;
private Date contractStartTime;
/**
* 合同结束时间
*/
@ColumnWidth(40)
@ExcelProperty("合同结束时间")
private String contractEndTime;
private Date contractEndTime;
/**
* 身份证号
*/
@ -102,8 +108,14 @@ public class BasicdataDriverArteryImproterExcel implements Serializable {
* 性别
*/
@ColumnWidth(40)
@ExcelProperty("性别")
private Integer gender;
@ExcelProperty("性别;1-男,2-女")
private String gender;
/**
* 仓库
*/
@ColumnWidth(40)
@ExcelProperty("仓库")
private String warehouseName;
/**
* 居住地址
*/
@ -115,7 +127,7 @@ public class BasicdataDriverArteryImproterExcel implements Serializable {
*/
@ColumnWidth(40)
@ExcelProperty("银行类型;1-工商银行,2-建设银行,3-农业银行,4-邮政银行,5-中国银行,6-交通银行,7-其他")
private Integer bankType;
private String bankType;
/**
* 银行卡号
*/
@ -139,13 +151,13 @@ public class BasicdataDriverArteryImproterExcel implements Serializable {
*/
@ColumnWidth(40)
@ExcelProperty("驾驶证起始日期")
private String driverLicenseStartTime;
private Date driverLicenseStartTime;
/**
* 驾驶证到期日期
*/
@ColumnWidth(40)
@ExcelProperty("驾驶证到期日期")
private String driverLicenseEndTime;
private Date driverLicenseEndTime;
/**
* 从业资格证编号
*/
@ -158,14 +170,18 @@ public class BasicdataDriverArteryImproterExcel implements Serializable {
@ColumnWidth(40)
@ExcelProperty("道路经营许可证号")
private String roadOperationLicenseNub;
/**
* 关联承运商Id
*/
@ColumnWidth(40)
@ExcelProperty("关联承运商")
private String carrierName;
/**
* 运输协议
*/
@ColumnWidth(40)
@ExcelProperty("运输协议")
private String transportationAgreement;
/**
* 备注
*/
@ -173,5 +189,24 @@ public class BasicdataDriverArteryImproterExcel implements Serializable {
@ExcelProperty("备注")
private String notes;
/**
* 和实体类表对应的字段
*/
/**
* 仓库ID
*/
@ExcelIgnore
private String warehouseId;
/**\
* 关联承运商Id
*/
@ExcelIgnore
private Long carrierId;
/**
* 用户id
*/
@ExcelIgnore
private Long userId;
}

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java

@ -58,4 +58,6 @@ public interface BasicdataDriverArteryMapper extends BaseMapper<BasicdataDriverA
List<BasicdataDriverArteryVO> selectBasicdataDictionary();
List<BasicdataDriverArteryEntity> findDriverListByName(@Param("driverName") String driverName);
void updateIsdeletedByPhone(@Param("phone") String phone);
}

11
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml

@ -46,6 +46,12 @@
<result column="reserve4" property="reserve4"/>
<result column="reserve5" property="reserve5"/>
</resultMap>
<update id="updateIsdeletedByPhone">
UPDATE logpm_basicdata_driver_artery lbda
SET lbda.is_deleted = 1
WHERE lbda.phone = #{phone} AND lbda.is_deleted = 0
</update>
<select id="selectBasicdataDriverArteryPage" resultType="com.logpm.basicdata.vo.BasicdataDriverArteryVO">
@ -119,14 +125,19 @@
lbda.bank_type bankType,
lbda.bank_card_nub bankCardNub,
lbda.driver_license_nub driverLicenseNub,
lbda.road_operation_license_nub roadOperationLicenseNub,
lbda.driver_license_organ driverLicenseOrgan,
lbda.driver_license_start_time driverLicenseStartTime,
lbda.driver_license_end_time driverLicenseEndTime,
lbda.employee_qualification_nub employeeQualificationNub,
lbda.transportation_agreement transportationAgreement,
lbda.warehouse_name warehouseName,
lbda.residential_address residentialAddress,
lbc.carrier_name carrierName,
(SELECT GROUP_CONCAT(brand_id SEPARATOR ',') from logpm_basicdata_drivermiddle lbd WHERE lbd.driver_id = lbda.id and lbd.is_deleted = 0) bindVehicles
FROM
logpm_basicdata_driver_artery lbda
JOIN logpm_basicdata_carrier lbc ON lbda.carrier_id = lbc.id and lbc.is_deleted = 0
<where>
lbda.is_deleted = 0
<if test="param.name != null ">and lbda.name like

33
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataCodeServiceImpl.java

@ -81,12 +81,43 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
case CodeNumConstant.TRUNKLINE_TRIPARTITE_LOAD:
code = generateTrunklineTripartiteLoadCode(type,warehouseCode,orderCode);
break;
case CodeNumConstant.TRUNKLINE_LOAD_SIGN:
code = generateTrunklineLoadSignCode(type,warehouseCode,orderCode);
break;
default:
log.info("##################getCodeByType: 暂不支持的编码类型 type={}", CodeDesEnum.getMes(type));
}
return code;
}
private String generateTrunklineLoadSignCode(Integer type, String warehouseCode, String orderCode) {
if(!StringUtil.hasLength(warehouseCode)){
log.warn("############generateTrunklineLoadSignCode: 仓库编码为空warehouseCode={}",warehouseCode);
return null;
}
String dateShort = CommonUtil.dateToStringDiv(new Date(),"yyMMdd");
String key = warehouseCode+":ZFQS:"+dateShort;
//获得序号
Boolean exists = bladeRedis.exists(key);
Long incr = null;
if(exists){
incr = bladeRedis.incr(key);
}else{
String value = dateShort+"00001";
incr = Long.parseLong(value);
bladeRedis.set(key,incr);
bladeRedis.expireAt(key,CommonUtil.getDayEnd());
}
return warehouseCode+CommonUtil.geFourNumber(incr,5);
}
private String generateTrunklineTripartiteLoadCode(Integer type, String warehouseCode, String orderCode) {
if(!StringUtil.hasLength(warehouseCode)){
log.warn("############generateTrunklineCarsLineCode: 仓库编码为空warehouseCode={}",warehouseCode);
@ -110,7 +141,7 @@ public class BasicdataCodeServiceImpl implements IBasicdataCodeService {
bladeRedis.expireAt(key,CommonUtil.getDayEnd());
}
return warehouseCode+f+dateShort+CommonUtil.geFourNumber(incr,5);
return warehouseCode+f+CommonUtil.geFourNumber(incr,5);
}
private String generateTrunklineCarsLineCode(Integer type, String warehouseCode, String orderCode) {

115
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java

@ -18,33 +18,45 @@ package com.logpm.basicdata.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.dto.BasicdataDriverArteryDTO;
import com.logpm.basicdata.entity.BasicdataDriverArteryEntity;
import com.logpm.basicdata.entity.BasicdataDrivermiddleEntity;
import com.logpm.basicdata.entity.BasicdataVehicleEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.entity.*;
import com.logpm.basicdata.excel.BasicdataDriverArteryExcel;
import com.logpm.basicdata.excel.BasicdataDriverArteryImproterExcel;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.basicdata.mapper.BasicdataDriverArteryMapper;
import com.logpm.basicdata.mapper.BasicdataDrivermiddleMapper;
import com.logpm.basicdata.mapper.BasicdataVehicleMapper;
import com.logpm.basicdata.service.IBasicdataCarrierService;
import com.logpm.basicdata.service.IBasicdataDriverArteryService;
import com.logpm.basicdata.service.IBasicdataVehicleService;
import com.logpm.basicdata.vo.BasicdataDriverArteryVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.driver.DriverTypeStatusConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.User;
import org.springblade.system.feign.IUserClient;
import org.springblade.system.feign.IUserSearchClient;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.alibaba.fastjson.JSONPatch.OperationType.copy;
/**
* 司机信息表 服务实现类
*
@ -66,6 +78,10 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
private final BasicdataDrivermiddleServiceImpl basicdataDrivermiddleService;
private final IBasicdataWarehouseClient warehouseClient;
private final IUserClient userClient;
private final IBasicdataCarrierService basicdataCarrierService;
private final BasicdataDriverArteryMapper basicdataDriverArteryMapper;
private final BasicdataDrivermiddleServiceImpl basicdataDrivermiddleServiceImpl;
@Override
public IPage<BasicdataDriverArteryVO> selectBasicdataDriverArteryPage(IPage<BasicdataDriverArteryVO> page, BasicdataDriverArteryDTO basicdataDriverArtery) {
@ -79,6 +95,7 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
//basicdataDriverArteryList.forEach(basicdataDriverArtery -> {
// basicdataDriverArtery.setTypeName(DictCache.getValue(DictEnum.YES_NO, BasicdataDriverArtery.getType()));
//});
return basicdataDriverArteryList;
}
@ -134,17 +151,99 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
return basicdataDriverArteryVOS;
}
/**
* 导入
*
* @param data
*/
@Override
public void importDriverArtery(List<BasicdataDriverArteryImproterExcel> data) {
ArrayList<BasicdataDriverArteryEntity> arrayList = new ArrayList<>();
public void importDriverArtery(List<BasicdataDriverArteryImproterExcel> data) {
log.info("传入参数>>>>>>>>>>>>>>>>>>>>>>>{}",data);
outerLoop:
for (BasicdataDriverArteryImproterExcel datum : data) {
List<BasicdataDrivermiddleEntity> driverMiddleEntity = new ArrayList<>();
//检查数据是否为空
if (ObjectUtils.isEmpty(datum.getPhone())|| ObjectUtils.isEmpty(datum.getName())|| ObjectUtils.isEmpty(datum.getWarehouseName())|| ObjectUtils.isEmpty(datum.getCarrierName())) {
// log.error("必填数据不能为空");
// continue;
throw new ServiceException("用户"+datum.getName() +"必填数据不能为空!");
}
if(!ObjectUtils.isEmpty(datum.getPhone())){
R<User> userR = userClient.userInfoByPhone("627683", datum.getPhone());
if (userR.getData() == null){
// log.error("未找到用户");
// continue;
throw new ServiceException("用户"+datum.getName() +"未找到用户!");
}else {
datum.setUserId(userR.getData().getId());
}
}
if (!ObjectUtils.isEmpty(datum.getBindVehicle())){
String[] car = datum.getBindVehicle().split(",");
for (String s : car) {
List<BasicdataVehicleEntity> carListByName = basicdataVehicleService.findCarListByName(s);
if (carListByName.isEmpty()){
// log.error("未找到可绑定的车辆");
throw new ServiceException("用户"+datum.getName() +"未找到可绑定的车辆!");
}else{
BasicdataDrivermiddleEntity basicdataDrivermiddleEntity = new BasicdataDrivermiddleEntity();
basicdataDrivermiddleEntity.setBrandId(carListByName.get(0).getId());
driverMiddleEntity.add(basicdataDrivermiddleEntity);
}
}
}
if (!ObjectUtils.isEmpty(datum.getCarrierName())){
//找到数据库内的承运商
List<BasicdataCarrierEntity> basicdataCarrierEntities = basicdataCarrierService.list(Wrappers.<BasicdataCarrierEntity>lambdaQuery().eq(BasicdataCarrierEntity::getCarrierName,datum.getCarrierName()));
if (ObjectUtils.isEmpty(basicdataCarrierEntities)){
// log.error("未找到承运商");
// continue;
throw new ServiceException("用户"+datum.getName() +"未找到承运商!");
}else{
datum.setCarrierId(basicdataCarrierEntities.get(0).getId());
}
}
if (!ObjectUtils.isEmpty(datum.getWarehouseName())){
//在数据库找到仓库名字对应
BasicdataWarehouseEntity byName = warehouseClient.findByName(datum.getWarehouseName());
if (ObjectUtils.isEmpty(byName)){
// log.error("未找到仓库");
// continue;
throw new ServiceException("用户"+datum.getName() +"未找到仓库!");
}else{
datum.setWarehouseId(String.valueOf(byName.getId()));
}
}
//根据手机号去重 如果有手机号相同 就删除老数据
if (ObjectUtils.isNotNull(datum) && ObjectUtils.isNotNull(datum.getPhone())) {
List<BasicdataDriverArteryEntity> basicdataVehicleEntities = baseMapper.selectList(new QueryWrapper<BasicdataDriverArteryEntity>().lambda()
.eq(BasicdataDriverArteryEntity::getPhone, datum.getPhone()));
if (!basicdataVehicleEntities.isEmpty()){
basicdataDriverArteryMapper.updateIsdeletedByPhone(datum.getPhone());
}
}
BasicdataDriverArteryEntity copy = Func.copy(datum, BasicdataDriverArteryEntity.class);
//连接到前端后取消注释
BladeUser user = AuthUtil.getUser();
copy.setTenantId(user.getTenantId());// 租户号
copy.setUserId(user.getUserId()); // 创建人
copy.setUpdateUser(user.getUserId());// 更新人
log.info("复制后>>>>>>>>>>>>{}",copy);
arrayList.add(copy);
this.save(copy);
//车辆和司机绑定关系
for (BasicdataDrivermiddleEntity basicdataDrivermiddleEntity : driverMiddleEntity) {
basicdataDrivermiddleEntity.setDriverId(copy.getId());
basicdataDrivermiddleServiceImpl.save(basicdataDrivermiddleEntity);
}
}
this.saveBatch(arrayList);
}
@Override
public List<BasicdataDriverArteryEntity> findDriverListByName(String driverName) {
return baseMapper.findDriverListByName(driverName);

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java

@ -123,7 +123,7 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
* @param id1
* @return
*/
List<DistributionParcelListEntity> getReservationPackage(@Param("orderIds") List<Long> orderIds,@Param("param")Map<String,Object> param);
List<DistributionParcelListEntity> getReservationPackage(IPage<DistributionParcelListEntity> page,@Param("orderIds") List<Long> orderIds,@Param("param")Map<String,Object> param);
/**
* 删除预约单

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.java

@ -16,7 +16,6 @@
*/
package com.logpm.distribution.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionReservationPackageDTO;
@ -29,7 +28,6 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 预约包件中间表 Mapper 接口
@ -145,6 +143,8 @@ public interface DistributionReservationPackageMapper extends BaseMapper<Distrib
String getConcatThirdProductByOrderId(@Param("reservationId") Long reservationId,@Param("stockArticleId") Long stockArticleId);
String getConcatMaterialName(@Param("reservationId") Long reservationId,@Param("stockArticleId") Long stockArticleId);
// /**
// * 根据预约ID和订单ID查询预约包件中间表
// * @param id

17
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml

@ -399,4 +399,21 @@ WHERE
group by ldpl.third_product) t
</select>
<select id="getConcatMaterialName" resultType="String">
select GROUP_CONCAT(t.materialName)
from (SELECT
CONCAT( ldpl.material_name, '(', count( ldpl.id ), ')' ) materialName
FROM
logpm_distribution_reservation_package ldrp
LEFT JOIN logpm_distribution_parcel_list ldpl ON ldrp.parce_list_id = ldpl.id
WHERE
ldrp.reservation_id = #{reservationId}
AND ldrp.stock_article_id = #{stockArticleId}
AND ldrp.packet_bar_status != 2
GROUP BY
ldpl.material_name) t
</select>
</mapper>

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml

@ -151,6 +151,7 @@
</select>
<select id="getBillOrderPack" resultType="com.logpm.distribution.vo.DistributionBillOrderPackVO">
SELECT
lds.outbound_type,
ldpl.order_package_code orderPackageCode,
ldpl.warehouse,
ldpl.firsts,

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationPackageService.java

@ -100,4 +100,7 @@ public interface IDistributionReservationPackageService extends BaseService<Dist
* @return
*/
boolean cancelReservationPackage(Long reservationId, Long packageId);
String getConcatMaterialName(Long reservationId, Long stockArticleId);
}

58
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -71,6 +71,7 @@ import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.orderpackage.*;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.constant.reservation.*;
import org.springblade.common.constant.signing.SignforDriverSigningStatusConstant;
import org.springblade.common.constant.signing.SignforStatusConstant;
import org.springblade.common.constant.stockup.StockAssignStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
@ -1702,8 +1703,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
BigDecimal outboundQuantity = new BigDecimal(parcelNumberVO.getOutboundQuantity());
BigDecimal deliveryQuantity = new BigDecimal(parcelNumberVO.getDeliveryQuantity());
int handNum = handQuantity.subtract(reservationNum).intValue();
assert parcelNumberEntity != null;
parcelNumberEntity.setHandQuantity(handNum);
parcelNumberEntity.setHandQuantity(handNum);
int outboundNum = outboundQuantity.add(reservationNum).intValue();
parcelNumberEntity.setOutboundQuantity(outboundNum);
parcelNumberEntity.setDeliveryQuantity(deliveryQuantity.subtract(reservationNum).intValue());
@ -2398,8 +2398,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionStockArticleVOS.add(distributionStockArticleVO);
});
}
assert deliveryListVO != null;
deliveryListVO.setStockArticleList(distributionStockArticleVOS);
deliveryListVO.setStockArticleList(distributionStockArticleVOS);
} else {
log.error("##############配送任务查询异常,查询ID为:{}", id);
return null;
@ -4131,12 +4130,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(loadscanEntities)) {
loadingDataMap = loadscanEntities.stream().collect(Collectors.toMap(DistributionLoadscanEntity::getPackageId, Function.identity(), (k1, k2) -> k2));
}
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
ArrayList<DistributionParcelListVO> distributionParcelListVOS = new ArrayList<>();
if (Func.isNotEmpty(reservationStockarticleEntityList)) {
List<Long> orderIds = reservationStockarticleEntityList.stream().filter(order -> order.getIsZero().equals(IsOrNoConstant.no.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList());
if (Func.isNotEmpty(orderIds)) {
//查询该客户的非零但订单包间
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackage(orderIds, distributionDeliveryInfoDTO);
List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackage(page,orderIds, distributionDeliveryInfoDTO);
// List<DistributionParcelListEntity> parcelListEntityList = distributionReservationMapper.getReservationPackageNew(distributionDeliveryInfoDTO);
log.info(">>>>>> parcelListEntityList {}",parcelListEntityList);
List<DistributionParcelListVO> parcelListVOList = DistributionParcelListWrapper.build().listVO(parcelListEntityList);
@ -4177,11 +4177,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionParcelListVO.setScanStatus(LoadingStatusConstant.saomiao.getName());
break;
case "3":
distributionParcelListVO.setScanStatus(LoadingStatusConstant.quxiao.getName());
distributionParcelListVO.setScanStatus(LoadingStatusConstant.queren.getName());
break;
case "4":
distributionParcelListVO.setScanStatus(LoadingStatusConstant.yijianzhuangche.getName());
break;
case "5":
distributionParcelListVO.setScanStatus(LoadingStatusConstant.buluzhuangche.getName());
break;
}
distributionParcelListVO.setLoadingNub(loadscanEntity.getLoadedNub());
}
@ -4356,6 +4359,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public IPage<DistributionStockArticleVO> selectDiscussStockArticleInfoList(Map<String, Object> params, Query query, Long deliveryListId) {
IPage<DistributionStockArticleVO> page = Condition.getPage(query);
//这里还需要查询出该配送任务下的订单信息,在进行编辑的时候进行回显
// String deliveryId = (String) params.get("deliveryId");
//查询出配送任务下的订单
@ -5858,11 +5862,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(zeroLoadscanEntity)) {
//存在装车数据
int num = zeroLoadscanEntity.getLoadedNub() - retentionQuantity;
zeroLoadscanEntity.setLoadedNub(0);
zeroLoadscanEntity.setPackageNub(0);
if (num <= 0) {
zeroLoadscanEntity.setScanStatus(LoadingStatusConstant.quxiao.getValue());
}
if (num > 0) {
zeroLoadscanEntity.setLoadedNub(0);
zeroLoadscanEntity.setPackageNub(0);
} else {
zeroLoadscanEntity.setLoadedNub(0);
zeroLoadscanEntity.setPackageNub(0);
zeroLoadscanEntity.setScanStatus(LoadingStatusConstant.quxiao.getValue());
}
distributionLoadscanService.updateById(zeroLoadscanEntity);
//扣减装车数量
int a = distributionSignforMapper.deductionLoadingPacjageNum(zeroLoadscanEntity.getReservationId(), zeroLoadscanEntity.getDeliveryId(), retentionQuantity);
@ -6297,7 +6304,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// 通过预约单查询预约下面的订单 --1 或者 库存品 --2
List<Map<String, Object>> spaclStockList = buildSpaclOrders(distributionReservationEntity, 2);
if (!spaclStockList.isEmpty() ) {
if (spaclStockList.size() > 0 && !spaclStockList.isEmpty()) {
map.put("库存品集合", spaclStockList);
Integer spaclStockNum = 0;
for (Map<String, Object> m : spaclStockList) {
@ -6433,10 +6440,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询产品名称拼接
String productName = distributionReservationPackageService.getConcatThirdProductByOrderId(reservationId, stockArticleId);
String materialNames = distributionReservationPackageService.getConcatMaterialName(reservationId,stockArticleId);
temp.put("产品名称", productName);
//todo 单位是否需要查询物料表
temp.put("单位", getUnit(distributionStockArticleEntity.getId()));
temp.put("物料名称", materialNames);
temp.put("数量", distributionReservationStockarticleEntity.getReservationNum());
temp.put("备货区", getStockupArea(distributionReservationEntity.getId()));
@ -6633,10 +6642,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} else {
n = String.valueOf(anInt + 1);
}
}
return n;
}
bladeRedis.set(s, n);
return n;
} else {
bladeRedis.set(s, n);
return n;
}
}
/**
* 工单查询配送数据
@ -6745,11 +6757,21 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (loadingNum == 0) {
deliveryListEntity.setDeliveryListLoadingStatus(DeliveryLoadingStatusConstant.weizhuangche.getValue());
}
} else {
log.error(method + "查询配送无计划数量,deliveryId:{}", deliveryId);
}
//维护状态
List<DistributionSignforEntity> list = distributionSignforService.list(Wrappers.<DistributionSignforEntity>query().lambda()
.eq(DistributionSignforEntity::getDeliveryId, deliveryId)
);
if (!list.isEmpty()){
//查看所有的签收信息是否均已完成
boolean anyMatch = list.stream().allMatch(s -> s.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue()));
if (anyMatch){
deliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue());
}
}
this.updateById(deliveryListEntity);
}
}

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationPackageServiceImpl.java

@ -17,8 +17,6 @@
package com.logpm.distribution.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
@ -41,8 +39,6 @@ import org.springblade.common.constant.orderpackage.OrderPackageReservationStatu
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.reservation.ReservationPackageStatusConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.system.cache.DictBizCache;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -190,5 +186,10 @@ public class DistributionReservationPackageServiceImpl extends BaseServiceImpl<D
return true;
}
@Override
public String getConcatMaterialName(Long reservationId, Long stockArticleId) {
return baseMapper.getConcatMaterialName(reservationId,stockArticleId);
}
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -3637,11 +3637,15 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isNotEmpty(distributionParcelListEntities)){
int sum = distributionParcelListEntities.stream().mapToInt(DistributionParcelListEntity::getQuantity).sum();
reservationEntity.setReservationNum(sum);
}else {
reservationEntity.setReservationNum(0);
}
List<DistributionReservationStocklistEntity> reservationStocklistEntities = distributionReservationMapper.selectStockListByReservationId(reservationId);
if (Func.isNotEmpty(reservationStocklistEntities)){
int sum = reservationStocklistEntities.stream().mapToInt(DistributionReservationStocklistEntity::getReservationNum).sum();
reservationEntity.setReservationStockListNum(sum);
}else {
reservationEntity.setReservationStockListNum(0);
}
this.updateById(reservationEntity);
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationStockarticleServiceImpl.java

@ -124,6 +124,10 @@ public class DistributionReservationStockarticleServiceImpl extends BaseServiceI
if (Func.isNotEmpty(distributionParcelListEntities)){
int sum = distributionParcelListEntities.stream().mapToInt(DistributionParcelListEntity::getQuantity).sum();
reservationStockarticleEntity.setReservationNum(sum);
}else {
reservationStockarticleEntity.setReservationNum(0);
reservationStockarticleEntity.setStockArticleStatus(ReservationOrderStatusConstant.quxiao.getValue());
reservationStockarticleEntity.setCancelStatus(1);
}
this.updateById(reservationStockarticleEntity);

38
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -501,6 +501,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
//维护配送状态
distributionDeliveryListService.maintenanceDeliveryInfo(distributionSignfor.getDeliveryId());
return R.success("操作成功");
}
@ -1787,6 +1788,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setScanUser(AuthUtil.getUser().getNickName());
distributionLoadscanEntity.setSigningUser(AuthUtil.getUser().getNickName());
distributionLoadscanEntity.setSigningUserId(AuthUtil.getUser().getUserId());
distributionLoadscanEntity.setIsAbnormalLoading(2);
distributionLoadscanEntity.setIsAbnormalSigning(2);
distributionLoadscanEntity.setAbnormalNote("异常签收");
//进行签收数量的修改
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
@ -2305,6 +2308,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
List<Long> abnormalPackageIds = loadscanEntityList.stream().map(DistributionLoadscanEntity::getPackageId).collect(Collectors.toList());
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.listByIds(abnormalPackageIds);
List<DistributionAppParcelListVO> distributionAppParcelListVOS = DistributionParcelListAppWrapper.build().listVO(distributionParcelListEntities);
distributionAppParcelListVOS.forEach(p->{
p.setIsAbnormalLoading(1);
if (p.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())){
p.setIsAbnnormalSigning(1);
}
});
distributionAppStockArticleVO.setDistributionAppParcelListVOS(distributionAppParcelListVOS);
//统计装车数和签收数
int abnormalLoadingNum = loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum();
@ -2966,7 +2975,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setOrderId(parcelNumberEntity.getStockArticleId());
loadscanEntity.setDeliveryId(distributionSignforEntity.getDeliveryId());
loadscanEntity.setReservationId(distributionSignforEntity.getReservationId());
loadscanEntity.setScanUser(user.getUserName());
loadscanEntity.setScanUser(user.getNickName());
loadscanEntity.setScanTime(simpleDateFormat.format(new Date()));
loadscanEntity.setPackageNub(parcelNumberEntity.getReservationNum());
loadscanEntity.setLoadedNub(parcelNumberEntity.getReservationNum());
@ -3049,10 +3058,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setOrderId(parcelListEntity.getStockArticleId());
loadscanEntity.setDeliveryId(distributionSignforEntity.getDeliveryId());
loadscanEntity.setReservationId(distributionSignforEntity.getReservationId());
loadscanEntity.setScanUser(user.getUserName());
loadscanEntity.setScanUser(user.getNickName());
loadscanEntity.setScanTime(signingTime);
loadscanEntity.setPackageNub(parcelListEntity.getQuantity());
loadscanEntity.setSigningUser(user.getUserName());
loadscanEntity.setSigningUser(user.getNickName());
loadscanEntity.setSigningUserId(user.getUserId());
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) {
loadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
@ -3107,7 +3116,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntities.setReceivedQuantity(parcelListEntity.getQuantity());
loadscanEntities.setOneClick(1);
loadscanEntities.setOneQclick(2);
loadscanEntities.setSigningUser(user.getUserName());
loadscanEntities.setSigningUser(user.getNickName());
loadscanEntities.setSigningUserId(user.getUserId());
loadscanEntities.setReceivedQuantity(parcelListEntity.getQuantity());
loadscanEntities.setSigningTime(signingTime);
@ -3142,15 +3151,16 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
reservationEntity.setSigningStatus(ReservationSigningStatusConstant.yiqianshou.getValue());
distributionReservationMapper.updateById(reservationEntity);
//维护配送任务
distributionAsyncService.checkDeliverySignStatusByReservation(distributionSignforEntity.getDeliveryId());
distributionDeliveryListEntity.setDeliveryListLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
if (distributionSignfor.getIsClerk()) {
distributionDeliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.peisongzhong.getValue());
} else {
distributionDeliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue());
}
distributionDeliveryListMapper.updateById(distributionDeliveryListEntity);
//维护签收状态
// distributionAsyncService.checkDeliverySignStatusByReservation(distributionSignforEntity.getDeliveryId());
// distributionDeliveryListEntity.setDeliveryListLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
// if (distributionSignfor.getIsClerk()) {
// distributionDeliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.peisongzhong.getValue());
// } else {
// distributionDeliveryListEntity.setDeliveryStatus(DeliveryStatusConstant.yiwancheng.getValue());
// }
// distributionDeliveryListMapper.updateById(distributionDeliveryListEntity);
LambdaUpdateWrapper<DistributionSignforEntity> set = new UpdateWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getId, distributionSignforEntity.getId())
.set(StringUtils.isNotBlank(distributionSignfor.getDeliverySignPictures()), DistributionSignforEntity::getDeliverySignPictures, distributionSignfor.getDeliverySignPictures())
@ -3167,6 +3177,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date()));
boolean update = this.update(set);
//维护配送信息
distributionDeliveryListService.maintenanceDeliveryInfo(distributionSignforEntity.getDeliveryId());
return R.status(true);
}

145
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java

@ -758,6 +758,151 @@ public class CarsLoadApiController {
}
}
//----------------------直发商家-----------------
@ResponseBody
@PostMapping("/finaSignOrderList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询签收列表", notes = "传入loadCarsDTO")
public R finaSignOrderList(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############finaSignOrderList: ";
log.info(method + "请求参数{}", loadCarsDTO);
String signStatus = loadCarsDTO.getSignStatus();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(StringUtil.isBlank(signStatus)){
log.warn(method+"签收状态为空 signStatus={}",signStatus);
return R.fail(405,"签收状态为空");
}
return carsLoadService.finaSignOrderList(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/finaSignOrderDetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询签收详情", notes = "传入loadCarsDTO")
public R finaSignOrderDetail(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############finaSignOrderDetail: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long signOrderId = loadCarsDTO.getSignOrderId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(signOrderId)){
log.warn(method+"签收单Id为空 signOrderId={}",signOrderId);
return R.fail(405,"签收单Id为空");
}
return carsLoadService.finaSignOrderDetail(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/signScanPackageCode")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "签收扫描包件", notes = "传入loadCarsDTO")
public R signScanPackageCode(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############signScanPackageCode: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long signOrderId = loadCarsDTO.getSignOrderId();
String orderPackageCode = loadCarsDTO.getOrderPackageCode();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(signOrderId)){
log.warn(method+"签收单Id为空 signOrderId={}",signOrderId);
return R.fail(405,"签收单Id为空");
}
if(StringUtil.isBlank(orderPackageCode)){
log.warn(method+"包件码为空 orderPackageCode={}",orderPackageCode);
return R.fail(405,"包件码为空");
}
return carsLoadService.signScanPackageCode(signOrderId,orderPackageCode,"PDA扫码签收");
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/signZeroOrder")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "签收零担", notes = "传入loadCarsDTO")
public R signZeroOrder(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############signZeroOrder: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long signOrderId = loadCarsDTO.getSignOrderId();
Long carsLoadScanId = loadCarsDTO.getCarsLoadScanId();
Integer enterNum = loadCarsDTO.getEnterNum();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(signOrderId)){
log.warn(method+"签收单Id为空 signOrderId={}",signOrderId);
return R.fail(405,"签收单Id为空");
}
if(Objects.isNull(carsLoadScanId)){
log.warn(method+"签收零担id为空 carsLoadScanId={}",carsLoadScanId);
return R.fail(405,"签收零担id为空");
}
return carsLoadService.signZeroOrder(signOrderId,carsLoadScanId,enterNum,"PDA录入签收");
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
}

156
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/TripartiteTransferApiController.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.trunkline.dto.BatchUnloadDTO;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.service.ITrunklineCarsLoadService;
import com.logpm.trunkline.vo.TripartiteTransferVO;
@ -82,5 +83,160 @@ public class TripartiteTransferApiController {
}
@ResponseBody
@PostMapping("/transferUnloadPackage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "三方中转包件卸车", notes = "传入loadCarsDTO")
public R transferUnloadPackage(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############transferUnloadPackage: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();
String orderPackageCode = loadCarsDTO.getOrderPackageCode();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"配载计划id为空 loadId={}",loadId);
return R.fail(405,"配载计划id为空");
}
if(StringUtil.isBlank(orderPackageCode)){
log.warn(method+"包件码为空 orderPackageCode={}",orderPackageCode);
return R.fail(405,"包件码为空");
}
return carsLoadService.transferUnloadPackage(loadId,orderPackageCode,myCurrentWarehouse.getId(),1,"正常卸车");
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/transferUnloadZero")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "零担卸车", notes = "传入loadCarsDTO")
public R transferUnloadZero(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############transferUnloadZero: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();
String waybillNo = loadCarsDTO.getWaybillNo();
Integer enterNum = loadCarsDTO.getEnterNum();
String trayCode = loadCarsDTO.getTrayCode();
String orderCode = loadCarsDTO.getOrderCode();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"配载计划id为空 loadId={}",loadId);
return R.fail(405,"配载计划id为空");
}
if(StringUtil.isBlank(waybillNo)){
log.warn(method+"运单号为空 waybillNo={}",waybillNo);
return R.fail(405,"运单号为空");
}
if(StringUtil.isBlank(orderCode)){
log.warn(method+"订单号为空 orderCode={}",orderCode);
return R.fail(405,"订单号为空");
}
return carsLoadService.transferUnloadZero(loadId,waybillNo,enterNum,myCurrentWarehouse.getId(),1,trayCode,orderCode,"零担正常卸车");
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/transferUnloadTray")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "三方中转托盘卸车", notes = "传入loadCarsDTO")
public R transferUnloadTray(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############transferUnloadTray: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();
String trayCode = loadCarsDTO.getTrayCode();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"配载计划id为空 loadId={}",loadId);
return R.fail(405,"配载计划id为空");
}
if(StringUtil.isBlank(trayCode)){
log.warn(method+"托盘码为空 trayCode={}",trayCode);
return R.fail(405,"托盘码为空");
}
return carsLoadService.transferUnloadTray(loadId,trayCode,myCurrentWarehouse.getId());
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/batchTransferUnload")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "三方中转批量卸车", notes = "传入loadCarsDTO")
public R batchTransferUnload(@RequestBody BatchUnloadDTO batchUnloadDTO) {
String method = "############batchTransferUnload: ";
log.info(method + "请求参数{}", batchUnloadDTO);
Long loadId = batchUnloadDTO.getLoadId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
batchUnloadDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"配载id为空 loadId={}",loadId);
return R.fail(405,"配载id为空");
}
return carsLoadService.batchTransferUnload(batchUnloadDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
}

379
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.dto.TrunklineCarsLoadDTO;
import com.logpm.trunkline.dto.TrunklineCarsLoadLineDTO;
import com.logpm.trunkline.dto.TrunklineCarsOrderDTO;
import com.logpm.trunkline.dto.*;
import com.logpm.trunkline.service.ITrunklineCarsLoadService;
import com.logpm.trunkline.vo.TrunklineCarsLoadVO;
import com.logpm.trunkline.vo.ZeroSuppleVO;
@ -478,6 +475,11 @@ public class CarsLoadController {
}
/**
* 逻辑不正确弃用
* @param loadCarsDTO
* @return
*/
@ResponseBody
@PostMapping("/findCustomerCarsOrderList")
@ApiOperationSupport(order = 1)
@ -658,7 +660,7 @@ public class CarsLoadController {
log.warn(method+"合计运输费用值不正确 countTransportCost={}",countTransportCost);
throw new CustomerException(400,"合计运输费用值不正确");
}
List<TrunklineCarsLoadLineDTO> carsLoadLineList = carsLoadDTO.getCarsLoadLineList();
List<TrunklineCarsLoadLineDTO> carsLoadLineList = carsLoadDTO.getAddCarsLoadLineList();
if(carsLoadLineList.size() <= 0){
log.warn(method+"配载计划节点信息不正确 carsLoadLineList.size()={}",carsLoadLineList.size());
throw new CustomerException(400,"配载计划节点信息不正确");
@ -688,12 +690,12 @@ public class CarsLoadController {
log.warn(method+"排序为空 sort={}",sort);
throw new CustomerException(400,"排序为空");
}
List<TrunklineCarsOrderDTO> lineCarsOrderList = carsLoadLineDTO.getLineCarsOrderList();
List<TrunklineCarsOrderDTO> addList = carsLoadLineDTO.getAddList();
// if (lineCarsOrderList.size() <= 0){
// log.warn(method+"节点关联订单不正确 lineCarsOrderList.size()={}",lineCarsOrderList.size());
// throw new CustomerException(400,"节点关联订单不正确");
// }
for (TrunklineCarsOrderDTO carsOrderDTO:lineCarsOrderList){
for (TrunklineCarsOrderDTO carsOrderDTO:addList){
String orderCode = carsOrderDTO.getOrderCode();
if(StringUtil.isBlank(orderCode)){
log.warn(method+"订单编码为空 orderCode={}",orderCode);
@ -1539,4 +1541,367 @@ public class CarsLoadController {
}
}
@ResponseBody
@PostMapping("/batchUnload")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "批量卸车", notes = "传入loadCarsDTO")
public R batchUnload(@RequestBody BatchUnloadDTO batchUnloadDTO) {
String method = "############batchUnload: ";
log.info(method + "请求参数{}", batchUnloadDTO);
Long loadId = batchUnloadDTO.getLoadId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
batchUnloadDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"配载id为空 loadId={}",loadId);
return R.fail(405,"配载id为空");
}
return carsLoadService.batchUnload(batchUnloadDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
//--------------------------直发商家----------------------
@ResponseBody
@PostMapping("/findWaybillOrderListNoIsToMall")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询当前节点添加的订单不包含直发商家列表", notes = "传入loadCarsDTO")
public R findWaybillOrderListNoIsToMall(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############findWaybillOrderListNoIsToMall: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"配载id为空 loadId={}",loadId);
return R.fail(405,"配载id为空");
}
return carsLoadService.findWaybillOrderListNoIsToMall(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/findWaybillOrderListToMall")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询当前节点添加的订单包含直发商家列表", notes = "传入loadCarsDTO")
public R findWaybillOrderListToMall(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############findWaybillOrderListToMall: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"配载id为空 loadId={}",loadId);
return R.fail(405,"配载id为空");
}
return carsLoadService.findWaybillOrderListToMall(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/updateWaybillOrderIsCustemer")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "修改运单订单的直发商家", notes = "传入loadCarsDTO")
public R updateWaybillOrderIsCustemer(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############updateWaybillOrderIsCustemer: ";
log.info(method + "请求参数{}", loadCarsDTO);
String carsOrderIds = loadCarsDTO.getCarsOrderIds();
String isCustomer = loadCarsDTO.getIsCustomer();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(StringUtil.isBlank(carsOrderIds)){
log.warn(method+"运单订单id为空 carsOrderIds={}",carsOrderIds);
return R.fail(405,"运单订单id为空");
}
if(StringUtil.isBlank(isCustomer)){
log.warn(method+"直发商家状态为空 isCustomer={}",isCustomer);
return R.fail(405,"直发商家状态为空");
}
return carsLoadService.updateWaybillOrderIsCustemer(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/findSignOrderList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询签收单列表", notes = "传入loadCarsDTO")
public R findSignOrderList(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############findSignOrderList: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"配载id为空 loadId={}",loadId);
return R.fail(405,"配载id为空");
}
return carsLoadService.findSignOrderList(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/updateBelongToWarehouseBySignOrderId")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "更新签收单归属仓库", notes = "传入loadCarsDTO")
public R updateBelongToWarehouseBySignOrderId(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############updateBelongToWarehouseBySignOrderId: ";
log.info(method + "请求参数{}", loadCarsDTO);
String signOrderIds = loadCarsDTO.getSignOrderIds();
Long warehouseId = loadCarsDTO.getWarehouseId();
try{
if(StringUtil.isBlank(signOrderIds)){
log.warn(method+"签收单id为空 signOrderIds={}",signOrderIds);
return R.fail(405,"签收单id为空");
}
if(Objects.isNull(warehouseId)){
log.warn(method+"归属仓库id为空 warehouseId={}",warehouseId);
return R.fail(405,"归属仓库id为空");
}
return carsLoadService.updateBelongToWarehouseBySignOrderId(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/findSignOrderDetailList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查询签收单详情列表", notes = "传入loadCarsDTO")
public R findSignOrderDetailList(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############findSignOrderDetailList: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long signOrderId = loadCarsDTO.getSignOrderId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(signOrderId)){
log.warn(method+"签收单id为空 signOrderId={}",signOrderId);
return R.fail(405,"签收单id为空");
}
return carsLoadService.findSignOrderDetailList(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/batchSign")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "批量签收", notes = "传入loadCarsDTO")
public R batchSign(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############batchSign: ";
log.info(method + "请求参数{}", loadCarsDTO);
List<Long> loadScanIds = loadCarsDTO.getLoadScanIds();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadScanIds) || loadScanIds.size() < 1){
log.warn(method+"批量签收ids为空 loadScanIds={}",loadScanIds);
return R.fail(405,"批量签收ids为空");
}
return carsLoadService.batchSign(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/signPackage")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "签收包件", notes = "传入loadCarsDTO")
public R signPackage(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############signPackage: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long signOrderId = loadCarsDTO.getSignOrderId();
String orderPackageCode = loadCarsDTO.getOrderPackageCode();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(signOrderId)){
log.warn(method+"签收单Id为空 signOrderId={}",signOrderId);
return R.fail(405,"签收单Id为空");
}
if(StringUtil.isBlank(orderPackageCode)){
log.warn(method+"包件码为空 orderPackageCode={}",orderPackageCode);
return R.fail(405,"包件码为空");
}
return carsLoadService.signScanPackageCode(signOrderId,orderPackageCode,"PC签收");
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
@ResponseBody
@PostMapping("/signZero")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "签收零担", notes = "传入loadCarsDTO")
public R signZero(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############signZero: ";
log.info(method + "请求参数{}", loadCarsDTO);
Long signOrderId = loadCarsDTO.getSignOrderId();
Long carsLoadScanId = loadCarsDTO.getCarsLoadScanId();
Integer enterNum = loadCarsDTO.getEnterNum();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(405,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(signOrderId)){
log.warn(method+"签收单Id为空 signOrderId={}",signOrderId);
return R.fail(405,"签收单Id为空");
}
if(Objects.isNull(carsLoadScanId)){
log.warn(method+"签收零担id为空 carsLoadScanId={}",carsLoadScanId);
return R.fail(405,"签收零担id为空");
}
return carsLoadService.signZeroOrder(signOrderId,carsLoadScanId,enterNum,"PC录入签收");
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
}

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java

@ -144,7 +144,7 @@ public class TripartiteTransferController {
log.warn(method+"节点名称为空 nodeName={}",nodeName);
throw new CustomerException(400,"节点名称为空");
}
List<TrunklineCarsOrderDTO> lineCarsOrderList = carsLoadLineDTO.getLineCarsOrderList();
List<TrunklineCarsOrderDTO> lineCarsOrderList = carsLoadLineDTO.getAddList();
if (lineCarsOrderList.size() <= 0){
log.warn(method+"节点关联订单不正确 lineCarsOrderList.size()={}",lineCarsOrderList.size());
throw new CustomerException(400,"节点关联订单不正确");

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.java

@ -22,4 +22,8 @@ public interface TrunklineBillladingWaybillMapper extends BaseMapper<TrunklineBi
void updateDataByBillladingWaybillId(@Param("billladingWaybillId") Long billladingWaybillId, @Param("enterNum") Integer enterNum, @Param("enterWeight") BigDecimal enterWeight, @Param("enterVolume") BigDecimal enterVolume);
Integer getFinishNumByWaybillIdNotBillladingWaybillId(@Param("waybillId") Long waybillId, @Param("billladingWaybillId") Long billladingWaybillId);
TrunklineBillladingWaybillEntity getOneByBillladingIdAndWaybillNo(@Param("billladingId") Long billladingId, @Param("waybillNo") String waybillNo);
void updateByBillladingIdAndWaybillNo(@Param("billladingId") Long billladingId, @Param("waybillNo") String waybillNo);
}

16
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingWaybillMapper.xml

@ -62,4 +62,20 @@
and ltbw.id != #{billladingWaybillId}
</select>
<select id="getOneByBillladingIdAndWaybillNo" resultType="com.logpm.trunkline.entity.TrunklineBillladingWaybillEntity">
select *
from logpm_trunkline_billlading_waybill
where billlading_id = #{billladingId}
and waybill_no = #{waybillNo}
and is_deleted = 1
</select>
<update id="updateByBillladingIdAndWaybillNo">
update logpm_trunkline_billlading_waybill
set is_deleted = 0
where billlading_id = #{billladingId}
and waybill_no = #{waybillNo}
</update>
</mapper>

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadLineMapper.java

@ -22,4 +22,7 @@ public interface TrunklineCarsLoadLineMapper extends BaseMapper<TrunklineCarsLoa
List<TrunklineCarsLoadLineEntity> findListMoreSortByLoadId(@Param("loadId") Long loadId, @Param("sort") Integer sort);
BigDecimal getAllNodeFee(@Param("loadId") Long loadId);
void deleteEntityById(@Param("carsLoadLineId") Long carsLoadLineId);
}

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadLineMapper.xml

@ -47,5 +47,10 @@
and is_deleted = 0
</select>
<delete id="deleteEntityById">
delete from logpm_trunkline_cars_load_line
where id = #{carsLoadLineId}
</delete>
</mapper>

5
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java

@ -35,5 +35,10 @@ public interface TrunklineCarsLoadMapper extends BaseMapper<TrunklineCarsLoadEnt
IPage<JSONObject> findZeroListByWarehouseId(IPage<Object> page, @Param("param") LoadCarsDTO loadCarsDTO);
IPage<JSONObject> useZeroList(IPage<Object> page, @Param("param") LoadCarsDTO loadCarsDTO);
IPage<CarsLoadAllOrderVO> findWaybillOrderListNoIsToMall(IPage<Object> page, @Param("param") LoadCarsDTO loadCarsDTO);
void updateWaybillOrderIsCustemer(@Param("list") List<Long> carsOrderIdList, @Param("isCustomer") String isCustomer);
}

74
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -132,9 +132,9 @@
lww.customer_train customerTrain,
lww.remark remark,
lww.waybill_type type,
t.stock_num stockNum,
IFNULL( t.stock_num, 0 )-IFNULL( l.planNum,0) stockNum,
IFNULL(TRUNCATE(lww.total_freight/lww.total_count,4),0) price,
IFNULL(TRUNCATE(lww.total_freight/lww.total_count,4),0)*t.stock_num freight
IFNULL(TRUNCATE(lww.total_freight/lww.total_count,4),0)*(IFNULL( t.stock_num, 0 )-IFNULL( l.planNum,0)) freight
from (select ldpl.order_code,
ldpl.waybill_number,
ldsa.is_zero,
@ -166,6 +166,16 @@
ldpl.waybill_number,
ldsa.is_zero,
ldsa.hand_quantity) t
left join (select ltco.order_code orderCode,
ltco.waybill_no waybillNo,
sum(start_num) planNum
from logpm_trunkline_cars_order ltco
where 1=1
<if test="param.warehouseId != null" >
and ltco.node_id = #{param.warehouseId}
</if>
group by ltco.order_code,
ltco.waybill_no) l on l.orderCode = t.order_code and l.waybillNo = t.waybill_number
left join logpm_warehouse_waybill lww on lww.waybill_no = t.waybill_number
left join (select ltwo.waybill_no,
ltwo.order_code,
@ -173,7 +183,7 @@
from logpm_trunkline_waybill_order ltwo
group by ltwo.waybill_no,
ltwo.order_code) m on m.order_code = t.order_code and m.waybill_no = t.waybill_number
where t.stock_num > 0
where IFNULL( t.stock_num, 0 )-IFNULL( l.planNum,0) > 0
</select>
<select id="findUseOrderList" resultType="com.logpm.trunkline.vo.CarsLoadAllOrderVO">
@ -300,6 +310,12 @@
<if test="param.warehouseId != null" >
and ltcl.start_warehouse_id = #{param.warehouseId}
</if>
<if test="param.type != null and param.type == 1">
and ltcl.load_status = '0'
</if>
<if test="param.type != null and param.type == 2">
and ltcl.load_status != '0'
</if>
</select>
<select id="carsLoadPageList" resultType="com.logpm.trunkline.vo.TrunklineCarsLoadVO">
@ -396,4 +412,56 @@
and ltcls.warehouse_id = #{param.warehouseId}
</select>
<select id="findWaybillOrderListNoIsToMall" resultType="com.logpm.trunkline.vo.CarsLoadAllOrderVO">
select ltco.id carsOrderId,
ltco.waybill_no waybillNo,
ltco.order_code orderCode,
ltco.plan_num planNum,
ltco.real_num realNum,
ltco.type type,
ldsa.mall_name consignee,
ldsa.consignee_person consigneeName,
ldsa.consignee_mobile consigneeMobile,
ldsa.consignee_address consigneeAddress,
lww.departure_warehouse_name departureWarehouseName,
lww.destination_warehouse_name destinationWarehouseName
from logpm_trunkline_cars_order ltco
left join logpm_distribution_stock_article ldsa on ldsa.order_code = ltco.order_code
left join logpm_warehouse_waybill lww on lww.waybill_no = ltco.waybill_no
<where>
<if test="param.loadId != null">
and ltco.load_id = #{param.loadId}
</if>
<if test="param.warehouseId != null">
and ltco.node_id = #{param.warehouseId}
and ldsa.warehouse_id = #{param.warehouseId}
</if>
<if test="param.waybillNo != null and param.waybillNo != ''">
and ltco.waybill_no = #{param.waybillNo}
</if>
<if test="param.orderCode != null and param.orderCode != ''">
and ltco.order_code = #{param.orderCode}
</if>
<if test="param.mallName != null and param.mallName != ''">
and ldsa.mall_name = #{param.mallName}
</if>
<if test="param.isCustomer != null ">
and ltco.is_customer = #{param.isCustomer}
</if>
</where>
</select>
<update id="updateWaybillOrderIsCustemer">
update logpm_trunkline_cars_order
set is_customer = #{isCustomer}
where 1=1
<if test="list != null ">
and id in
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</update>
</mapper>

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.java

@ -58,4 +58,16 @@ public interface TrunklineCarsLoadScanMapper extends BaseMapper<TrunklineCarsLoa
void updateFinalNodeIdById(@Param("loadScanId") Long loadScanId, @Param("finalNodeId") Long finalNodeId);
void updateUnloadCheckByLoadIdAndWarehouseId(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
void clearFinalNodeId(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId);
void updateScanToAbnormalByLoadIdAndNodeIdAndWarehouseId(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId, @Param("warehouseId") Long warehouseId);
void updateScanToAbnormalByLoadIdAndNodeIdAndWarehouseIdAndOrderCodeAndWaybillNo(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId, @Param("warehouseId") Long warehouseId, @Param("orderCode") String orderCode, @Param("waybillNo") String waybillNo);
List<SignPackageVO> findSignPackageList(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId, @Param("orderCode") String orderCode, @Param("waybillNo") String waybillNo);
Integer findSignNumByLoadIdAndNodeIdAndOrderCodeAndeWaybillNo(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId, @Param("orderCode") String orderCode, @Param("waybillNo") String waybillNo);
}

48
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -226,4 +226,52 @@
and unload_check = 0
</update>
<update id="clearFinalNodeId">
update logpm_trunkline_cars_load_scan
set final_node_id = null
where load_id = #{loadId}
and final_node_id = #{nodeId}
</update>
<update id="updateScanToAbnormalByLoadIdAndNodeIdAndWarehouseId">
update logpm_trunkline_cars_load_scan
set loading_abnormal = 1
where load_id = #{loadId}
and warehouse_id = #{warehouseId}
and final_node_id = #{nodeId}
</update>
<update id="updateScanToAbnormalByLoadIdAndNodeIdAndWarehouseIdAndOrderCodeAndWaybillNo">
update logpm_trunkline_cars_load_scan
set loading_abnormal = 1,final_node_id = null
where load_id = #{loadId}
and warehouse_id = #{warehouseId}
and final_node_id = #{nodeId}
and order_code = #{orderCode}
and waybill_no = #{waybillNo}
</update>
<select id="findSignPackageList" resultType="com.logpm.trunkline.vo.SignPackageVO">
select scan_code orderPackageCode,
num num,
unload_num unloadNum,
scan_status scanStatus
from logpm_trunkline_cars_load_scan
where load_id = #{loadId}
and warehouse_id = #{warehouseId}
and order_code = #{orderCode}
and waybill_no = #{waybillNo}
</select>
<select id="findSignNumByLoadIdAndNodeIdAndOrderCodeAndeWaybillNo" resultType="int">
select IFNULL(sum(unload_num),0)
from logpm_trunkline_cars_load_scan
where load_id = #{loadId}
and warehouse_id = #{nodeId}
and order_code = #{orderCode}
and waybill_no = #{waybillNo}
and scan_status = '3'
</select>
</mapper>

19
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity;
import com.logpm.trunkline.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -31,4 +32,22 @@ public interface TrunklineCarsOrderMapper extends BaseMapper<TrunklineCarsOrderE
List<CarsLoadWaybillInfoVO> findWaybillOrderByloadId(@Param("loadId") Long loadId);
List<CarsLoadOrderInfoVO> findCarsLoadOrderInfoList(@Param("loadId") Long loadId, @Param("waybillNo") String waybillNo);
void clearFinalNodeId(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId);
void deleteByLoadIdAndNodeIdAndWarehouseId(@Param("loadId") Long loadId, @Param("nodeId") Long nodeId, @Param("warehouseId") Long warehouseId);
void updateStartNumByLoadIdAndWarehouseId(@Param("loadId") Long loadId, @Param("nodeId") Long warehouseId);
void updateStartNumToPlanNumByLoadIdAndWarehouseId(@Param("loadId") Long loadId, @Param("nodeId") Long warehouseId);
List<TrunklineLoadSignOrderEntity> findSignOrderListBy(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
List<SignScanOrderVO> findSignOrderList(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
List<SignScanOrderVO> findSignZeroOrderList(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
Integer findSignNumBySignOrderId(@Param("signOrderId") Long signOrderId);
List<TrunklineCarsOrderEntity> findCustomerOrderList(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId, @Param("mallName") String mallName);
}

96
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml

@ -147,4 +147,100 @@
</select>
<update id="clearFinalNodeId">
update logpm_trunkline_cars_order
set final_node_id = null
where load_id = #{loadId}
and node_id = #{nodeId}
</update>
<delete id="deleteByLoadIdAndNodeIdAndWarehouseId">
delete from logpm_trunkline_cars_order
where load_id = #{loadId}
and final_node_id = #{nodeId}
and node_id = #{warehouseId}
</delete>
<update id="updateStartNumByLoadIdAndWarehouseId">
update logpm_trunkline_cars_order
set start_num = 0
where load_id = #{loadId}
and node_id = #{nodeId}
</update>
<update id="updateStartNumToPlanNumByLoadIdAndWarehouseId">
update logpm_trunkline_cars_order
set start_num = plan_num
where load_id = #{loadId}
and node_id = #{nodeId}
</update>
<select id="findSignOrderListBy" resultType="com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity">
select ltco.load_id loadId,
ltco.node_id warehouseId,
ldsa.mall_name mallName,
lww.id belongToWarehouseId,
lww.name belongToWarehouseName,
0 signNum,
'0' signStatus,
GROUP_CONCAT(ldsa.consignee_person) mallPerson,
GROUP_CONCAT(ldsa.consignee_mobile) mallMobile,
GROUP_CONCAT(ldsa.consignee_address) mallAddress,
sum(ltco.plan_num) planNum,
sum(ltco.real_num) loadingNum
from logpm_trunkline_cars_order ltco
left join logpm_distribution_stock_article ldsa on ldsa.order_code,ltco.order_code
left join logpm_warehouse_warehouse lww on ltco.node_id = lww.id
<where>
and ltco.load_id = #{loadId}
and ltco.node_id = #{warehouseId}
and ldsa.warehouse_id = #{warehouseId}
</where>
group by ltco.load_id,
ltco.node_id,
ldsa.mall_name,
lww.id,
lww.name
</select>
<select id="findSignOrderList" resultType="com.logpm.trunkline.vo.SignScanOrderVO">
select ltco.waybill_no waybillNo,
ltco.order_code orderCode,
ltco.real_num loadingNum,
ltco.sign_num signNum
from logpm_trunkline_cars_order ltco
where ltco.load_id = #{loadId}
and ltco.node_id = #{warehouseId}
and ltco.type = 1
and ltco.is_customer = '1'
</select>
<select id="findSignZeroOrderList" resultType="com.logpm.trunkline.vo.SignScanOrderVO">
select ltco.waybill_no waybillNo,
ltco.order_code orderCode,
ltco.real_num loadingNum,
ltco.sign_num signNum
from logpm_trunkline_cars_order ltco
where ltco.load_id = #{loadId}
and ltco.node_id = #{warehouseId}
and ltco.type = 2
and ltco.is_customer = '1'
</select>
<select id="findSignNumBySignOrderId" resultType="int">
select IFNULL(sum(ltco.sign_num),0)
from logpm_trunkline_cars_order ltco
where ltco.sign_order_id = #{signOrderId}
</select>
<select id="findCustomerOrderList" resultType="com.logpm.trunkline.entity.TrunklineCarsOrderEntity">
select *
from from logpm_trunkline_cars_order ltco
left join logpm_distribution_stock_article ldsa on ldsa.order_code = ltco.order_code and ldsa.warehouse_id = ltco.node_id
where ltco.load_id = #{loadId}
and ltco.node_id = #{warehouseId}
and ldsa.mall_name = #{mallName}
and ltco.is_customer = '1'
</select>
</mapper>

9
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsSignLogMapper.java

@ -0,0 +1,9 @@
package com.logpm.trunkline.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.trunkline.entity.TrunklineCarsSignLogEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TrunklineCarsSignLogMapper extends BaseMapper<TrunklineCarsSignLogEntity> {
}

27
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.java

@ -0,0 +1,27 @@
package com.logpm.trunkline.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity;
import com.logpm.trunkline.vo.SignOrderDetailVO;
import com.logpm.trunkline.vo.TrunklineLoadSignOrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface TrunklineLoadSignOrderMapper extends BaseMapper<TrunklineLoadSignOrderEntity> {
List<TrunklineLoadSignOrderEntity> findAllLoadSignOrderList(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
void deleteListBySignStatusAndLoadIdAndWarehouseId(@Param("loadId") Long loadId, @Param("warehouseId") Long warehouseId);
IPage<TrunklineLoadSignOrderVO> finaSignOrderList(IPage<Object> page, @Param("param") LoadCarsDTO loadCarsDTO);
TrunklineLoadSignOrderVO finaSignOrderDetail(@Param("signOrderId") Long signOrderId);
IPage<SignOrderDetailVO> findSignOrderDetailList(IPage<Object> page, @Param("param") LoadCarsDTO loadCarsDTO);
void updateBelongToWarehouse(@Param("signOrderId") Long signOrderId, @Param("warehouseId") Long warehouseId, @Param("warehouseName") String warehouseName);
}

75
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineLoadSignOrderMapper.xml

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineLoadSignOrderMapper">
<select id="findAllLoadSignOrderList" resultType="com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity">
select *
from logpm_trunkline_load_sign_order ltlso
where ltlso.load_id = #{loadId}
and ltlso.warehouse_id = #{warehouseId}
</select>
<delete id="deleteListBySignStatusAndLoadIdAndWarehouseId" >
delete from logpm_trunkline_load_sign_order
where load_id = #{loadId}
and warehouse_id = #{warehouseId}
and sign_status = 0
</delete>
<select id="finaSignOrderList" resultType="com.logpm.trunkline.vo.TrunklineLoadSignOrderVO">
select ltlso.*
ltcl.driver_name driverName
from logpm_trunkline_load_sign_order ltlso
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltlso.load_id
where ltlso.load_id = #{param.loadId}
and ltlso.warehouse_id = #{param.warehouseId}
and ltcl.driver_id = #{param.driverId}
<if test="param.signStatus = '20'">
and ltlso.sign_status = '20'
</if>
<if test="param.signStatus = '10'">
and ltlso.sign_status != '20'
</if>
</select>
<select id="finaSignOrderDetail" resultType="com.logpm.trunkline.vo.TrunklineLoadSignOrderVO">
select ltlso.*
ltcl.driver_name driverName,
ltcl.cars_no carsNo
from logpm_trunkline_load_sign_order ltlso
left join logpm_trunkline_cars_load ltcl on ltcl.id = ltlso.load_id
where ltlso.id = #{signOrderId}
</select>
<select id="findSignOrderDetailList" resultType="com.logpm.trunkline.vo.SignOrderDetailVO">
select ltcls.id loadScanId,
ltcls.waybill_no waybillNo,
ltcls.order_code orderCode,
ltcls.warehouse_name warehouseName,
ldsa.mall_name mallName,
ldsa.consignee_person mallPerson,
ldsa.consignee_mobile mallMobile,
ldsa.consignee_address mallAddress,
ltcls.scan_code scanCode,
ltcls.scan_status scanStatus,
ltcls.type type,
ltcls.num num,
ltcls.unload_num unloadNum,
ltcls.remark remak,
ltco.sign_order_id signOrderId
from logpm_trunkline_cars_order ltco
left join logpm_trunkline_cars_load_scan ltcls on ltco.load_id = ltcls.load_id and ltco.node_id = ltcls.warehouse_id and ltcls.order_code = ltco.order_code and ltcls.waybill_no = ltco.waybill_no
left join logpm_distribution_stock_article ldsa on ldsa.order_code = ltco.order_code and ldsa.warehouse_id = ltco.node_id
where ltco.sign_order_id = #{param.signOrderId}
and ltco.is_customer = '1'
</select>
<update id="updateBelongToWarehouse">
update logpm_trunkline_load_sign_order
set belong_to_warehouse_id = #{warehouseId},
belong_to_warehouse_name = #{warehouseName}
where id = #{signOrderId}
</update>
</mapper>

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingWaybillService.java

@ -30,4 +30,8 @@ public interface ITrunklineBillladingWaybillService extends BaseService<Trunklin
Integer getFinishNumByWaybillIdNotBillladingWaybillId(Long waybillId, Long billladingWaybillId);
TrunklineBillladingWaybillEntity getNoDataWaybillByBillladingId(Long billladingId);
TrunklineBillladingWaybillEntity getOneByBillladingIdAndWaybillNo(Long billladingId, String waybillNo);
void updateByBillladingIdAndWaybillNo(Long billladingId, String waybillNo);
}

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadLineService.java

@ -25,4 +25,7 @@ public interface ITrunklineCarsLoadLineService extends BaseService<TrunklineCars
List<TrunklineCarsLoadLineEntity> findListByLoadId(Long loadId);
BigDecimal getAllNodeFee(Long loadId);
void deleteEntityById(Long carsLoadLineId);
}

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadScanService.java

@ -53,4 +53,16 @@ public interface ITrunklineCarsLoadScanService extends BaseService<TrunklineCars
void updateFinalNodeIdById(Long loadScanId, Long finalNodeId);
void updateUnloadCheckByLoadIdAndWarehouseId(Long loadId, Long warehouseId);
void clearFinalNodeId(Long loadId, Long nodeId);
void updateScanToAbnormalByLoadIdAndNodeIdAndWarehouseId(Long loadId, Long nodeId, Long warehouseId);
void updateScanToAbnormalByLoadIdAndNodeIdAndWarehouseIdAndOrderCodeAndWaybillNo(Long loadId, Long nodeId, Long warehouseId, String orderCode, String waybillNo);
List<SignPackageVO> findSignPackageList(Long loadId, Long warehouseId, String orderCode, String waybillNo);
Integer findSignNumByLoadIdAndNodeIdAndOrderCodeAndeWaybillNo(Long loadId, Long nodeId, String orderCode, String waybillNo);
List<TrunklineCarsLoadScanEntity> findListByIds(List<Long> loadScanIds);
}

33
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java

@ -1,6 +1,7 @@
package com.logpm.trunkline.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.BatchUnloadDTO;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.dto.TrunklineCarsLoadDTO;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
@ -132,4 +133,36 @@ public interface ITrunklineCarsLoadService extends BaseService<TrunklineCarsLoad
R determineHasNoFinalNode(Long loadId, Long warehouseId);
R updateLoadScanFinalNodeIdById(LoadCarsDTO loadCarsDTO);
R transferUnloadPackage(Long loadId, String orderPackageCode, Long warehouseId, Integer unbindTray, String remark);
R transferUnloadZero(Long loadId, String waybillNo, Integer enterNum, Long warehouseId, Integer unbindTray, String trayCode, String orderCode, String remark);
R transferUnloadTray(Long loadId, String trayCode, Long warehouseId);
R batchUnload(BatchUnloadDTO batchUnloadDTO);
R batchTransferUnload(BatchUnloadDTO batchUnloadDTO);
R findWaybillOrderListNoIsToMall(LoadCarsDTO loadCarsDTO);
R findWaybillOrderListToMall(LoadCarsDTO loadCarsDTO);
R updateWaybillOrderIsCustemer(LoadCarsDTO loadCarsDTO);
R finaSignOrderList(LoadCarsDTO loadCarsDTO);
R finaSignOrderDetail(LoadCarsDTO loadCarsDTO);
R signScanPackageCode(Long signOrderId,String orderPackageCode,String remark);
R signZeroOrder(Long signOrderId,Long carsLoadScanId,Integer enterNum, String remark);
R findSignOrderList(LoadCarsDTO loadCarsDTO);
R findSignOrderDetailList(LoadCarsDTO loadCarsDTO);
R batchSign(LoadCarsDTO loadCarsDTO);
R updateBelongToWarehouseBySignOrderId(LoadCarsDTO loadCarsDTO);
}

20
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsOrderService.java

@ -3,6 +3,7 @@ package com.logpm.trunkline.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity;
import com.logpm.trunkline.vo.*;
import org.springblade.core.mp.base.BaseService;
@ -28,4 +29,23 @@ public interface ITrunklineCarsOrderService extends BaseService<TrunklineCarsOrd
List<CarsLoadWaybillInfoVO> findWaybillOrderByloadId(Long loadId);
List<CarsLoadOrderInfoVO> findCarsLoadOrderInfoList(Long loadId, String waybillNo);
void clearFinalNodeId(Long loadId, Long nodeId);
void deleteByLoadIdAndNodeIdAndWarehouseId(Long loadId, Long nodeId, Long warehouseId);
void updateStartNumByLoadIdAndWarehouseId(Long loadId, Long warehouseId);
void updateStartNumToPlanNumByLoadIdAndWarehouseId(Long loadId, Long warehouseId);
List<TrunklineLoadSignOrderEntity> findSignOrderListBy(Long loadId, Long warehouseId);
List<SignScanOrderVO> findSignOrderList(Long loadId, Long warehouseId);
List<SignScanOrderVO> findSignZeroOrderList(Long loadId, Long warehouseId);
Integer findSignNumBySignOrderId(Long signOrderId);
List<TrunklineCarsOrderEntity> findCustomerOrderList(Long loadId, Long warehouseId, String mallName);
}

10
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsSignLogService.java

@ -0,0 +1,10 @@
package com.logpm.trunkline.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
import com.logpm.trunkline.entity.TrunklineCarsSignLogEntity;
public interface ITrunklineCarsSignLogService extends IService<TrunklineCarsSignLogEntity> {
void addEntity(TrunklineCarsLoadScanEntity carsLoadScanEntity,String remark);
}

24
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineLoadSignOrderService.java

@ -0,0 +1,24 @@
package com.logpm.trunkline.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity;
import com.logpm.trunkline.vo.SignOrderDetailVO;
import com.logpm.trunkline.vo.TrunklineLoadSignOrderVO;
import java.util.List;
public interface ITrunklineLoadSignOrderService extends IService<TrunklineLoadSignOrderEntity> {
List<TrunklineLoadSignOrderEntity> findAllLoadSignOrderList(Long loadId, Long warehouseId);
void deleteListBySignStatusAndLoadIdAndWarehouseId(Long loadId, Long warehouseId);
IPage<TrunklineLoadSignOrderVO> finaSignOrderList(IPage<Object> page, LoadCarsDTO loadCarsDTO);
TrunklineLoadSignOrderVO finaSignOrderDetail(Long signOrderId);
IPage<SignOrderDetailVO> findSignOrderDetailList(IPage<Object> page, LoadCarsDTO loadCarsDTO);
void updateBelongToWarehouse(Long signOrderId, Long warehouseId, String warehouseName);
}

14
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

@ -1,7 +1,6 @@
package com.logpm.trunkline.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basicdata.feign.*;
@ -181,9 +180,6 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
//保存线路节点
List<TrunklineBillladingLineVO> billladingLineList = billladingDTO.getBillladingLineList();
billladingLineList = billladingLineList.stream()
.sorted(Comparator.comparing(TrunklineBillladingLineVO::getSort))
.collect(Collectors.toList());
String lineTitle = "";
for (TrunklineBillladingLineVO billladingLineVO:billladingLineList){
@ -198,7 +194,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
billladingLineEntity.setBillladingId(billladingId);
billladingLineEntity.setWarehouseId(warehouseId);
billladingLineEntity.setWarehouseName(warehouseName);
billladingLineService.save(billladingLineEntity);
billladingLineService.saveOrUpdate(billladingLineEntity);
}
billladingEntity.setLineNameTitle(lineTitle);
updateById(billladingEntity);
@ -211,13 +207,9 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
for (TrunklineBillladingWaybillVO billladingWaybillVO:billladingWaybillList){
String waybillNo = billladingWaybillVO.getWaybillNo();
//查询运单以前是否挂在当前提货单下
QueryWrapper<TrunklineBillladingWaybillEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("billlading_id",billladingId)
.eq("waybill_no",waybillNo);
TrunklineBillladingWaybillEntity one = billladingWaybillService.getOne(queryWrapper);
TrunklineBillladingWaybillEntity one = billladingWaybillService.getOneByBillladingIdAndWaybillNo(billladingId,waybillNo);
if(!Objects.isNull(one)){
one.setIsDeleted(0);
billladingWaybillService.updateById(one);
billladingWaybillService.updateByBillladingIdAndWaybillNo(billladingId,waybillNo);
}else{
TrunklineBillladingWaybillEntity billladingWaybillEntity = new TrunklineBillladingWaybillEntity();
BeanUtil.copy(billladingWaybillVO,billladingWaybillEntity);

10
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java

@ -128,4 +128,14 @@ public class TrunklineBillladingWaybillServiceImpl extends BaseServiceImpl<Trunk
return baseMapper.selectOne(queryWrapper);
}
@Override
public TrunklineBillladingWaybillEntity getOneByBillladingIdAndWaybillNo(Long billladingId, String waybillNo) {
return baseMapper.getOneByBillladingIdAndWaybillNo(billladingId,waybillNo);
}
@Override
public void updateByBillladingIdAndWaybillNo(Long billladingId, String waybillNo) {
baseMapper.updateByBillladingIdAndWaybillNo(billladingId,waybillNo);
}
}

8
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLineServiceImpl.java

@ -62,7 +62,8 @@ public class TrunklineCarsLoadLineServiceImpl extends BaseServiceImpl<TrunklineC
public List<TrunklineCarsLoadLineEntity> findListByLoadId(Long loadId) {
QueryWrapper<TrunklineCarsLoadLineEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("is_deleted",0)
.eq("load_id",loadId);
.eq("load_id",loadId)
.orderByAsc("sort");
return baseMapper.selectList(queryWrapper);
}
@ -70,4 +71,9 @@ public class TrunklineCarsLoadLineServiceImpl extends BaseServiceImpl<TrunklineC
public BigDecimal getAllNodeFee(Long loadId) {
return baseMapper.getAllNodeFee(loadId);
}
@Override
public void deleteEntityById(Long carsLoadLineId) {
baseMapper.deleteEntityById(carsLoadLineId);
}
}

33
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadScanServiceImpl.java

@ -124,4 +124,37 @@ public class TrunklineCarsLoadScanServiceImpl extends BaseServiceImpl<TrunklineC
baseMapper.updateUnloadCheckByLoadIdAndWarehouseId(loadId,warehouseId);
}
@Override
public void clearFinalNodeId(Long loadId, Long nodeId) {
baseMapper.clearFinalNodeId(loadId,nodeId);
}
@Override
public void updateScanToAbnormalByLoadIdAndNodeIdAndWarehouseId(Long loadId, Long nodeId, Long warehouseId) {
baseMapper.updateScanToAbnormalByLoadIdAndNodeIdAndWarehouseId(loadId,nodeId,warehouseId);
}
@Override
public void updateScanToAbnormalByLoadIdAndNodeIdAndWarehouseIdAndOrderCodeAndWaybillNo(Long loadId, Long nodeId, Long warehouseId, String orderCode, String waybillNo) {
baseMapper.updateScanToAbnormalByLoadIdAndNodeIdAndWarehouseIdAndOrderCodeAndWaybillNo(loadId,nodeId,warehouseId,orderCode,waybillNo);
}
@Override
public List<SignPackageVO> findSignPackageList(Long loadId, Long warehouseId, String orderCode, String waybillNo) {
return baseMapper.findSignPackageList(loadId,warehouseId,orderCode,waybillNo);
}
@Override
public Integer findSignNumByLoadIdAndNodeIdAndOrderCodeAndeWaybillNo(Long loadId, Long nodeId, String orderCode, String waybillNo) {
return baseMapper.findSignNumByLoadIdAndNodeIdAndOrderCodeAndeWaybillNo(loadId,nodeId,orderCode,waybillNo);
}
@Override
public List<TrunklineCarsLoadScanEntity> findListByIds(List<Long> loadScanIds) {
List<TrunklineCarsLoadScanEntity> carsLoadScanEntities = baseMapper.selectBatchIds(loadScanIds);
return carsLoadScanEntities;
}
}

843
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

File diff suppressed because it is too large Load Diff

46
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsOrderEntityServiceImpl.java

@ -3,6 +3,7 @@ package com.logpm.trunkline.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity;
import com.logpm.trunkline.mapper.TrunklineCarsOrderMapper;
import com.logpm.trunkline.service.ITrunklineCarsOrderService;
import com.logpm.trunkline.vo.*;
@ -67,4 +68,49 @@ public class TrunklineCarsOrderEntityServiceImpl extends BaseServiceImpl<Trunkli
return baseMapper.findCarsLoadOrderInfoList(loadId,waybillNo);
}
@Override
public void clearFinalNodeId(Long loadId, Long nodeId) {
baseMapper.clearFinalNodeId(loadId,nodeId);
}
@Override
public void deleteByLoadIdAndNodeIdAndWarehouseId(Long loadId, Long nodeId, Long warehouseId) {
baseMapper.deleteByLoadIdAndNodeIdAndWarehouseId(loadId,nodeId,warehouseId);
}
@Override
public void updateStartNumByLoadIdAndWarehouseId(Long loadId, Long warehouseId) {
baseMapper.updateStartNumByLoadIdAndWarehouseId(loadId,warehouseId);
}
@Override
public void updateStartNumToPlanNumByLoadIdAndWarehouseId(Long loadId, Long warehouseId) {
baseMapper.updateStartNumToPlanNumByLoadIdAndWarehouseId(loadId,warehouseId);
}
@Override
public List<TrunklineLoadSignOrderEntity> findSignOrderListBy(Long loadId, Long warehouseId) {
return baseMapper.findSignOrderListBy(loadId,warehouseId);
}
@Override
public List<SignScanOrderVO> findSignOrderList(Long loadId, Long warehouseId) {
return baseMapper.findSignOrderList(loadId,warehouseId);
}
@Override
public List<SignScanOrderVO> findSignZeroOrderList(Long loadId, Long warehouseId) {
return baseMapper.findSignZeroOrderList(loadId,warehouseId);
}
@Override
public Integer findSignNumBySignOrderId(Long signOrderId) {
return baseMapper.findSignNumBySignOrderId(signOrderId);
}
@Override
public List<TrunklineCarsOrderEntity> findCustomerOrderList(Long loadId, Long warehouseId, String mallName) {
return baseMapper.findCustomerOrderList(loadId,warehouseId,mallName);
}
}

39
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsSignLogServiceImpl.java

@ -0,0 +1,39 @@
package com.logpm.trunkline.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
import com.logpm.trunkline.entity.TrunklineCarsSignLogEntity;
import com.logpm.trunkline.mapper.TrunklineCarsSignLogMapper;
import com.logpm.trunkline.service.ITrunklineCarsSignLogService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@Slf4j
@Service
@AllArgsConstructor
public class TrunklineCarsSignLogServiceImpl extends ServiceImpl<TrunklineCarsSignLogMapper, TrunklineCarsSignLogEntity> implements ITrunklineCarsSignLogService {
@Override
public void addEntity(TrunklineCarsLoadScanEntity carsLoadScanEntity,String remark) {
TrunklineCarsSignLogEntity trunklineCarsSignLogEntity = new TrunklineCarsSignLogEntity();
trunklineCarsSignLogEntity.setLoadId(carsLoadScanEntity.getLoadId());
trunklineCarsSignLogEntity.setLoadCode(carsLoadScanEntity.getLoadCode());
trunklineCarsSignLogEntity.setLoadScanId(carsLoadScanEntity.getId());
trunklineCarsSignLogEntity.setWarehouseId(carsLoadScanEntity.getWarehouseId());
trunklineCarsSignLogEntity.setWarehouseName(carsLoadScanEntity.getWarehouseName());
trunklineCarsSignLogEntity.setWaybillId(carsLoadScanEntity.getWaybillId());
trunklineCarsSignLogEntity.setWaybillNo(carsLoadScanEntity.getWaybillNo());
trunklineCarsSignLogEntity.setOrderCode(carsLoadScanEntity.getOrderCode());
trunklineCarsSignLogEntity.setScanCode(carsLoadScanEntity.getScanCode());
trunklineCarsSignLogEntity.setNum(carsLoadScanEntity.getUnloadNum());
trunklineCarsSignLogEntity.setType(carsLoadScanEntity.getType());
trunklineCarsSignLogEntity.setIsData(1);
trunklineCarsSignLogEntity.setIsAbnormal(0);
trunklineCarsSignLogEntity.setTrayId(carsLoadScanEntity.getTrayId());
trunklineCarsSignLogEntity.setTrayCode(carsLoadScanEntity.getTrayName());
trunklineCarsSignLogEntity.setTrayName(carsLoadScanEntity.getTrayName());
trunklineCarsSignLogEntity.setFromWarehouseId(carsLoadScanEntity.getFromWarehouseId());
trunklineCarsSignLogEntity.setRemark(remark);
save(trunklineCarsSignLogEntity);
}
}

51
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineLoadSignOrderServiceImpl.java

@ -0,0 +1,51 @@
package com.logpm.trunkline.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.entity.TrunklineLoadSignOrderEntity;
import com.logpm.trunkline.mapper.TrunklineLoadSignOrderMapper;
import com.logpm.trunkline.service.ITrunklineLoadSignOrderService;
import com.logpm.trunkline.vo.SignOrderDetailVO;
import com.logpm.trunkline.vo.TrunklineLoadSignOrderVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@Service
@AllArgsConstructor
public class TrunklineLoadSignOrderServiceImpl extends ServiceImpl<TrunklineLoadSignOrderMapper, TrunklineLoadSignOrderEntity> implements ITrunklineLoadSignOrderService {
@Override
public List<TrunklineLoadSignOrderEntity> findAllLoadSignOrderList(Long loadId, Long warehouseId) {
return baseMapper.findAllLoadSignOrderList(loadId,warehouseId);
}
@Override
public void deleteListBySignStatusAndLoadIdAndWarehouseId(Long loadId, Long warehouseId) {
baseMapper.deleteListBySignStatusAndLoadIdAndWarehouseId(loadId,warehouseId);
}
@Override
public IPage<TrunklineLoadSignOrderVO> finaSignOrderList(IPage<Object> page, LoadCarsDTO loadCarsDTO) {
return baseMapper.finaSignOrderList(page,loadCarsDTO);
}
@Override
public TrunklineLoadSignOrderVO finaSignOrderDetail(Long signOrderId) {
return baseMapper.finaSignOrderDetail(signOrderId);
}
@Override
public IPage<SignOrderDetailVO> findSignOrderDetailList(IPage<Object> page, LoadCarsDTO loadCarsDTO) {
return baseMapper.findSignOrderDetailList(page,loadCarsDTO);
}
@Override
public void updateBelongToWarehouse(Long signOrderId, Long warehouseId, String warehouseName) {
baseMapper.updateBelongToWarehouse(signOrderId,warehouseId,warehouseName);
}
}
Loading…
Cancel
Save