Browse Source

Merge branch 'pre-production'

newStockUp
zhenghaoyu 1 year ago
parent
commit
a4b5c585a3
  1. 33
      blade-biz-common/src/main/java/org/springblade/common/cache/CacheObjNames.java
  2. 3
      blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java
  3. 47
      blade-biz-common/src/main/java/org/springblade/common/constant/retention/RetentionTypeConstant.java
  4. 52
      blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicDelineNodeEntity.java
  5. 55
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  6. 181
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionRetentionScanEntity.java
  7. 10
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java
  8. 7
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java
  9. 16
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java
  10. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  11. 8
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java
  12. 15
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java
  13. 8
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionAddvaluePackageVO.java
  14. 13
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java
  15. 12
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListZeroVO.java
  16. 84
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java
  17. 7
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java
  18. 20
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java
  19. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupOrderListVO.java
  20. 1
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java
  21. 10
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java
  22. 12
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/BillladingDTO.java
  23. 92
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java
  24. 116
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java
  25. 106
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java
  26. 56
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLineEntity.java
  27. 44
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java
  28. 51
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java
  29. 50
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineDetailProductEntity.java
  30. 8
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceDetailVO.java
  31. 8
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceVO.java
  32. 11
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingLineVO.java
  33. 8
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingPackageVO.java
  34. 17
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java
  35. 11
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java
  36. 8
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineDetailProductVO.java
  37. 14
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java
  38. 12
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionRecordEntity.java
  39. 189
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java
  40. 61
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java
  41. 7
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionRecordVO.java
  42. 34
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionScanVO.java
  43. 21
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineController.java
  44. 5
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineNodeController.java
  45. 2
      blade-service/logpm-basic/src/main/java/com/logpm/basic/dto/BasicDelineNodeDTO.java
  46. 2
      blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.java
  47. 16
      blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.xml
  48. 2
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineNodeService.java
  49. 6
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineService.java
  50. 4
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineNodeServiceImpl.java
  51. 65
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineServiceImpl.java
  52. 25
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java
  53. 7
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java
  54. 14
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  55. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java
  56. 35
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java
  57. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  58. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  59. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java
  60. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java
  61. 28
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java
  62. 71
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionRetentionScanDTO.java
  63. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java
  64. 90
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java
  65. 145
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationExcel.java
  66. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java
  67. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  68. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  69. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java
  70. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueDetailMapper.java
  71. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueDetailMapper.xml
  72. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueMapper.xml
  73. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvaluePackageMapper.java
  74. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  75. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  76. 73
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  77. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.java
  78. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.xml
  79. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  80. 74
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  81. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  82. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  83. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  84. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  85. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java
  86. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  87. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  88. 44
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  89. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java
  90. 31
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  91. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  92. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  93. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  94. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
  95. 37
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java
  96. 47
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  97. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  98. 314
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  99. 59
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  100. 86
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  101. Some files were not shown because too many files have changed in this diff Show More

33
blade-biz-common/src/main/java/org/springblade/common/cache/CacheObjNames.java vendored

@ -0,0 +1,33 @@
package org.springblade.common.cache;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
/**
* 系统查询缓存名称定义
*/
@AllArgsConstructor
@Getter
public enum CacheObjNames {
/**
* 基础数据模块 当前登陆人操作仓库的缓存
*/
basic_data_warehourse_list("getMyWarehouseList","basicdataWarehouseList");
/**
* 缓存名称
*/
final String cacheName;
/**
* 缓存前缀
*/
final String keyPrefix;
}

3
blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java

@ -15,6 +15,7 @@ public class DictBizConstant {
public static final String BASIC_GROUNDING = "basic_grounding";//上架状态
public static final String STOCKUP_STATUS = "stockup_status";//备货状态
public static final String ORDER_STOCKUP_STATUS = "order_stockup_status";//订单备货状态
public static final String ORDER_RESERVATION_STATUS = "order_reservation_status";//订单预约状态
public static final String RESERVATION_STATUS = "reservation_status";//预约状态
@ -103,4 +104,6 @@ public class DictBizConstant {
public static final String ORDER_PACKAGE_LOADING_STATUS = "order_package_loading_status";//预约签收状态
// --------------2023-10-12 ---------------------
public static final String WAREHOUSE_QUEST_STATUS = "warehouse_quest_status"; //盘点任务
// --------------2023-11-04 ---------------------
public static final String WAREHOUSE_RETENTION_TYPE = "warehouse_retention_type"; //滞留类型
}

47
blade-biz-common/src/main/java/org/springblade/common/constant/retention/RetentionTypeConstant.java

@ -0,0 +1,47 @@
package org.springblade.common.constant.retention;
/**
* 订单冻结状态枚举
* 对应码表 freeze_status
* @author pref
*/
public enum RetentionTypeConstant {
zhuangchezhiliu("装车滞留",1),
peisongzhiliu("配送滞留",2),
chukuzhiliu("出库滞留",3),
quxiaozhiliu("取消滞留",4);
/**
* 状态
*/
private String name;
/**
*
*/
private Integer value;
private RetentionTypeConstant(String name, Integer value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
}

52
blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicDelineNodeEntity.java

@ -35,6 +35,42 @@ import org.springblade.core.tenant.mp.TenantEntity;
@EqualsAndHashCode(callSuper = true)
public class BasicDelineNodeEntity extends TenantEntity {
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 仓库id
*/
@ApiModelProperty(value = "仓库id")
private Long warehouseId;
/**
* 仓库名称
*/
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
/**
* 关联提货路线Id
*/
@ -71,19 +107,9 @@ public class BasicDelineNodeEntity extends TenantEntity {
@ApiModelProperty(value = "纬度")
private String latitude;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
* 备注
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "备注")
private String remark;
}

55
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java

@ -141,6 +141,61 @@ public class DistributionParcelListEntity extends TenantEntity {
@ApiModelProperty(value = "客户id")
@TableField(exist = false)
private Long marketId;
/**
* 商场名称
*/
@ApiModelProperty(value = "商场名称")
@TableField(exist = false)
private String mallName;
/**
* 商场名称
*/
@ApiModelProperty(value = "分类")
@TableField(exist = false)
private String genre;
/**
* 商场名称
*/
@ApiModelProperty(value = "零担标识")
@TableField(exist = false)
private String isZero;
/**
* 商场名称
*/
@ApiModelProperty(value = "商场iD")
@TableField(exist = false)
private Long mallId;
/**
* 托盘ID
*/
@ApiModelProperty(value = "托盘ID")
@TableField(exist = false)
private String trayId;
/**
* 托盘编码
*/
@ApiModelProperty(value = "托盘编码")
@TableField(exist = false)
private String trayCode;
/**
* 货位ID
*/
@ApiModelProperty(value = "货位ID")
@TableField(exist = false)
private String allocationId;
/**
* 完整货位
*/
@ApiModelProperty(value = "完整货位")
@TableField(exist = false)
private String positionCode;
/**
* 库存品ID
*/
@ApiModelProperty(value = "库存品ID")
@TableField(exist = false)
private Long stockId;
/**
* 物料Id
*/

181
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionRetentionScanEntity.java

@ -0,0 +1,181 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.io.Serializable;
/**
* 滞留扫描操作表 实体类
*
* @author BladeX
* @since 2023-11-03
*/
@Data
@TableName("logpm_distribution_retention_scan")
@ApiModel(value = "DistributionRetentionScan对象", description = "滞留扫描操作表")
public class DistributionRetentionScanEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID)
private Long id;
/**
* 租户号
*/
@ApiModelProperty(value = "租户号")
private String tenantId;
/**
* 是否已删除
*/
@ApiModelProperty(value = "是否已删除")
private Integer isDeleted;
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 配送车次号
*/
@ApiModelProperty(value = "配送车次号")
private String trainNumber;
/**
* 订单ID
*/
@ApiModelProperty(value = "订单ID")
private Long orderId;
/**
* 库存品ID
*/
@ApiModelProperty(value = "库存品ID")
private Long inventoryId;
/**
* 滞留类型 1-包件2-零担(这里会关联到具体的品类)3-库存品
*/
@ApiModelProperty(value = "滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品")
private Integer conditions;
/**
* 物料编码(库存品)
*/
@ApiModelProperty(value = "物料编码(库存品)")
private String materialNumber;
/**
* 物料名称(库存品)
*/
@ApiModelProperty(value = "物料名称(库存品)")
private String materialName;
/**
* 预约客户ID
*/
@ApiModelProperty(value = "预约客户ID")
private Long reservationId;
/**
* 订单自编号(库存品没有)
*/
@ApiModelProperty(value = "订单自编号(库存品没有)")
private String orderCode;
/**
* 预约单号
*/
@ApiModelProperty(value = "预约单号")
private String reservationCode;
/**
* 扫描类型:1-包件2-订单3-托盘4...
*/
@ApiModelProperty(value = "扫描类型:1-包件、2-订单、3-托盘、4...")
private Integer scanType;
/**
* 包件ID
*/
@ApiModelProperty(value = "包件ID")
private Long orderPackageId;
/**
* 包条码
*/
@ApiModelProperty(value = "包条码")
private String orderPackageCode;
/**
* 滞留数量
*/
@ApiModelProperty(value = "滞留数量")
private Integer retentionQuantity;
/**
* 滞留扫描操作人名称
*/
@ApiModelProperty(value = "滞留扫描操作人名称")
private String retentionScanUsername;
/**
* 滞留扫描操作人Id
*/
@ApiModelProperty(value = "滞留扫描操作人Id")
private String retentionScanUserId;
/**
* 滞留操作备注
*/
@ApiModelProperty(value = "滞留操作备注")
private String remarks;
/**
* 滞留扫描时间
*/
@ApiModelProperty(value = "滞留扫描时间")
private Date retentionScanTime;
/**
* 滞留方式 1-PDA2-PC
*/
@ApiModelProperty(value = "滞留方式 1-PDA、2-PC")
private Integer retentionWay;
/**
* 配送任务ID
*/
@ApiModelProperty(value = "配送任务ID")
private Long deliveryListId;
}

10
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java

@ -275,11 +275,11 @@ public class DistributionStockListEntity extends TenantEntity {
*/
@ApiModelProperty(value = "拆包ID")
private Long pid;
/**
* 托盘ID
*/
@ApiModelProperty(value = "托盘ID")
private Long trayId;
// /**
// * 托盘ID
// */
// @ApiModelProperty(value = "托盘ID")
// private Long trayId;
/**
* 托盘名称
*/

7
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java

@ -78,6 +78,13 @@ public class DistributionStockupEntity extends TenantEntity {
*/
@ApiModelProperty(value = "备货库位")
private String stockipAllocation;
/**
* 托盘位
*/
@ApiModelProperty(value = "托盘位")
@TableField(exist = false)
private String pallet;
/**
* 备货区ID
*/

16
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java

@ -16,13 +16,18 @@
*/
package com.logpm.distribution.feign;
import com.logpm.distribution.entity.DistributionDeliveryDetailsEntity;
import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import com.logpm.distribution.vo.DistributionDeliveryListVO;
import com.logpm.distribution.vo.DistributionDeliverySelfVO;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* 配送管理 Feign接口类
*
@ -45,6 +50,15 @@ public interface IDistributionDeliveryListClient {
* @return BladePage
*/
@GetMapping(TOP)
BladePage<DistributionDeliveryListEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
BladePage<DistributionDeliveryListEntity> deliveryListTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
/**
* 根据配送任务ID查询配送司机信息
* @param deliveryId
* @return
*/
@GetMapping(TOP+"/getDeliveryDriverInfo")
DistributionDeliveryListVO getDeliveryDriverInfo(@RequestParam("current") Long deliveryId);
}

6
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java

@ -17,6 +17,8 @@
package com.logpm.distribution.feign;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.vo.DistributionParcelListVO;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage;
import org.springframework.cloud.openfeign.FeignClient;
@ -41,6 +43,7 @@ public interface IDistributionParcelListClient {
String API_PREFIX = "/client";
String TOP = API_PREFIX + "/top1";
String TOPPARCELLIST = API_PREFIX + "/getParcelList";
String GETPARCELLISTINFO = API_PREFIX + "/getParcelListInfo";
@PostMapping(TOPPARCELLIST)
List<DistributionParcelListEntity> getParcelList(@RequestBody DistributionParcelListEntity parcelListEntity);
@ -102,4 +105,7 @@ public interface IDistributionParcelListClient {
@GetMapping(API_PREFIX+"/updateStockArticleIdByOrderCode")
void updateStockArticleIdByOrderCode(@RequestParam Long orderId, @RequestParam String orderCode);
@PostMapping(GETPARCELLISTINFO)
List<DistributionParcelListEntity> getParcelListInfo(@RequestBody DistributionParcelListVO parcelListVO);
}

8
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java

@ -41,6 +41,7 @@ public interface IDistributionStockArticleClient {
String API_PREFIX = "/client";
String TOP = API_PREFIX + "/top12";
String GETSTOCKARTICLEINFO = API_PREFIX + "/getStockArticleInfo";
/**
* 获取配送在库订单列表
@ -104,4 +105,11 @@ public interface IDistributionStockArticleClient {
@GetMapping(API_PREFIX + "/submitHandleNumByOrderId")
void submitHandleNumByOrderId(@RequestParam Integer subNum, @RequestParam Long articleId);
/**
* 查询订单信息数据
* @return
*/
@PostMapping(GETSTOCKARTICLEINFO)
List<DistributionStockArticleEntity> getStockArticleInfo(@RequestBody DistributionStockArticleEntity distributionStockArticleEntity);
}

15
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java

@ -47,6 +47,7 @@ public interface IDistributionStockListClient {
String ADDSTOCKLIST = API_PREFIX + "/addStockList";
String UPDATESTOCKLIST = API_PREFIX + "/updateStockList";
String PUTSTOCKLIST = API_PREFIX + "/putStockList";
String GETSTOCKLISTINFO = API_PREFIX + "/getStockListInfo";
/**
* 获取库存品管理列表
@ -116,12 +117,12 @@ public interface IDistributionStockListClient {
List<DistributionStockListEntity> getStockListByWarehouseIdAndMarketAndStockListInfo(@RequestParam("incomingBatch") String incomingBatch,@RequestParam("marketNames") List<String> marketNames,@RequestParam("warehouseId") Long warehouseId);
// /**
// * 修改某个客户信息及物品信息
// *
// * @return BladePage
// */
// @PutMapping(PUTSTOCKLIST)
// Boolean putStockList(@RequestBody DistributionStockListEntity distributionStockListEntity);
/**
* 修改某个客户信息及物品信息
*
* @return BladePage
*/
@PostMapping(GETSTOCKLISTINFO)
List<DistributionStockListVO> getStockListInfo(@RequestBody DistributionStockListEntity distributionStockListEntity);
}

8
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionAddvaluePackageVO.java

@ -32,6 +32,14 @@ import lombok.EqualsAndHashCode;
public class DistributionAddvaluePackageVO extends DistributionAddvaluePackageEntity {
private static final long serialVersionUID = 1L;
/**
* 最大操作数量 零担需要先进行装车
*/
private Integer maxQuantity;
/**
* 计划数量
*/
private Integer planQuantity;
}

13
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java

@ -100,6 +100,19 @@ public class DistributionParcelListVO extends DistributionParcelListEntity {
*/
private List<Long> warehouseIdList;
/**
* 商场id
*/
private Long mallId;
/**
* 商场id
*/
private String genre;
/**
* 商场id
*/
private String isZero;
/**
* 装车数量
*/

12
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListZeroVO.java

@ -38,11 +38,21 @@ public class DistributionParcelListZeroVO implements Serializable {
*/
@ApiModelProperty(value = "填写数量")
private Integer TiQuantity;
/**
* 冻结数量
*/
@ApiModelProperty(value = "冻结数量")
private Integer deliveryQuantity;
/**
* 配送数量
*/
@ApiModelProperty(value = "配送数量")
private Integer deliveryQuantity;
private Integer reservationQuantity;
/**
* 配送数量
*/
@ApiModelProperty(value = "出库数量")
private Integer outboundQuantity;

84
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java

@ -0,0 +1,84 @@
package com.logpm.distribution.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 滞留扫描对象
*/
@Data
//@EqualsAndHashCode(callSuper = true)
public class DistributionRetentionScanVo {
/**
* 预约Id
*/
private Long reservationId;
/**
* 预约Id
*/
private String reservationCode;
/**
* 订单Id
*/
private Long orderId;
/**
* 订单自编码
*/
private String orderCode;
/**
* 订单Id
*/
private Long inventoryId;
/**
* 物料编码
*/
private String materialNumber;
/**
* 物料名称
*/
private String materialName;
/**
* 包件ID
*/
private Long orderPackageId;
/**
* 包条码
*/
private String orderPackageCode;
/**
* 滞留数量
*/
private Integer retentionQuantity;
/**
* 类型
*/
private Integer conditions;
/**
* 配送ID
*/
private Long deliveryId;
/**
* 配送车次
*/
private String trainNumber;
}

7
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.vo;
import com.logpm.distribution.entity.DistributionSignPrintEntity;
import com.logpm.distribution.entity.DistributionSignforEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -150,6 +151,12 @@ public class DistributionSignforVO extends DistributionSignforEntity {
@ApiModelProperty(value = "卸车班组")
private String sijiSigningStatus;
/**
* 签收图片路径多个
*/
@ApiModelProperty(value = "卸车班组")
private List<DistributionSignPrintVO> printVOList;
/**
* 客户订单列表
*/

20
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java

@ -102,10 +102,30 @@ public class DistributionStockListVO extends DistributionStockListEntity {
*/
@ApiModelProperty(value = "托盘id")
private String trayCode;
/**
* 托盘id
*/
@ApiModelProperty(value = "托盘id")
private String trayId;
/**
* 库位id
*/
@ApiModelProperty(value = "库位id")
private String allocationId;
/**
* 货位信息
*/
@ApiModelProperty(value = "货位信息")
private String positionCode;
/**
* 类型
*/
@ApiModelProperty(value = "类型")
private Integer conditions;
/**
* 类型
*/
@ApiModelProperty(value = "shan")
private String mallName;
}

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupOrderListVO.java

@ -33,6 +33,8 @@ public class DistributionStockupOrderListVO implements Serializable {
private Long areaId; //货区id
private String trayId; //托盘id
private String customerAddress; //客户地址
private String firstsNumber; //品类数量
private Long shelfId; //货架id
private Long parcelListId; //包件id
private Long stockId; //备货id

1
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java

@ -72,6 +72,7 @@ public class DistributionStockupVO extends DistributionStockupEntity {
private Integer number;
private String goodsAllocation; //货位
private String stockipAllocation; //货位
private String pallet; //托盘位
private Integer reservationStockListNum; //数量
private String reservationId; //预约ID
private String stockListId; //库存品ID

10
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/IAdvanceClient.java

@ -85,6 +85,16 @@ public interface IAdvanceClient {
AdvanceEntity fingById(@RequestParam Integer advanceId);
/**
* 根据运单号和订单号查询老系统的开单对应的订单
* @param logiBillNo
* @param orderCode
* @return
*/
@GetMapping(API_PREFIX + "/findAdvanceEntityByLogiBillNoAndOrderCode")
List<AdvanceEntity> findAdvanceEntityByLogiBillNoAndOrderCode(@RequestParam String logiBillNo,@RequestParam String orderCode);

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

@ -0,0 +1,12 @@
package com.logpm.trunkline.dto;
import com.logpm.trunkline.entity.TrunklineBillladingEntity;
import lombok.Data;
@Data
public class BillladingDTO extends TrunklineBillladingEntity {
private Integer pageNum;
private Integer pageSize;
}

92
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceDetailEntity.java

@ -0,0 +1,92 @@
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_advance_detail")
@ApiModel(value = "TrunklineAdvanceDetail对象", description = "暂存单包件数据表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineAdvanceDetailEntity 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 advanceId ;
/** 订单自编号 */
@ApiModelProperty(name = "订单自编号",notes = "")
private String orderCode ;
/** 品牌 */
@ApiModelProperty(name = "品牌",notes = "")
private String brand ;
/** 订单来源 */
@ApiModelProperty(name = "订单来源",notes = "")
private String systemType ;
/** 一级品类名称 */
@ApiModelProperty(name = "一级品类名称",notes = "")
private String firstPackName ;
/** 一级品类编码 */
@ApiModelProperty(name = "一级品类编码",notes = "")
private String firstPackCode ;
/** 二级品类名称 */
@ApiModelProperty(name = "二级品类名称",notes = "")
private String secondPackName ;
/** 二级品类编码 */
@ApiModelProperty(name = "二级品类编码",notes = "")
private String secondPackCode ;
/** 三级品类名称 */
@ApiModelProperty(name = "三级品类名称",notes = "")
private String thirdPackName ;
/** 三级品类编码 */
@ApiModelProperty(name = "三级品类编码",notes = "")
private String thirdPackCode ;
/** 基地名称 */
@ApiModelProperty(name = "基地名称",notes = "")
private String siteName ;
/** 基地编码 */
@ApiModelProperty(name = "基地编码",notes = "")
private String siteCode ;
/** 数量 */
@ApiModelProperty(name = "数量",notes = "")
private Integer quantity ;
/** 包件码 */
@ApiModelProperty(name = "包件码",notes = "")
private String orderPackageCode ;
/** 车次号 */
@ApiModelProperty(name = "车次号",notes = "")
private String trainNumber ;
/** 服务号 */
@ApiModelProperty(name = "服务号",notes = "")
private String serviceNum ;
/** 运单号 */
@ApiModelProperty(name = "运单号",notes = "")
private String waybillNo ;
/** 包件状态 */
@ApiModelProperty(name = "包件状态 0未入库 1已入库",notes = "")
private String packageStatus ;
}

116
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineAdvanceEntity.java

@ -0,0 +1,116 @@
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_advance")
@ApiModel(value = "TrunklineAdvance对象", description = "暂存单数据表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineAdvanceEntity 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 ;
/** 订单自编码 */
@ApiModelProperty(name = "订单自编码",notes = "")
private String orderCode ;
/** 基地 */
@ApiModelProperty(name = "基地",notes = "")
private String siteName ;
/** 区域 */
@ApiModelProperty(name = "区域",notes = "")
private String area ;
/** 订单类型 */
@ApiModelProperty(name = "订单类型",notes = "")
private String orderType ;
/** 品牌 */
@ApiModelProperty(name = "品牌",notes = "")
private String brand ;
/** 订单总数 */
@ApiModelProperty(name = "订单总数",notes = "")
private Integer totalNum ;
/** 品名 */
@ApiModelProperty(name = "品名",notes = "")
private String packName ;
/** 品名编码 */
@ApiModelProperty(name = "品名编码",notes = "")
private String packCode ;
/** 商场编码 */
@ApiModelProperty(name = "商场编码",notes = "")
private String dealerCode ;
/** 商场名称 */
@ApiModelProperty(name = "商场名称",notes = "")
private String dealerName ;
/** 承运商 */
@ApiModelProperty(name = "承运商",notes = "")
private String carrierName ;
/** 客户名称 */
@ApiModelProperty(name = "客户名称",notes = "")
private String customerName ;
/** 客户电话 */
@ApiModelProperty(name = "客户电话",notes = "")
private String customerPhone ;
/** 客户地址 */
@ApiModelProperty(name = "客户地址",notes = "")
private String customerAddress ;
/** 订单来源 */
@ApiModelProperty(name = "订单来源",notes = "")
private String systemType ;
/** 门店编码 */
@ApiModelProperty(name = "门店编码",notes = "")
private String storeCode ;
/** 门店名称 */
@ApiModelProperty(name = "门店名称",notes = "")
private String storeName ;
/** 服务号 */
@ApiModelProperty(name = "服务号",notes = "")
private String serviceNum ;
/** 齐套状态 0未齐套 1齐套 2多仓齐套 */
@ApiModelProperty(name = "齐套状态 0未齐套 1齐套 2多仓齐套",notes = "")
private String matingType ;
/** 发货人名称 */
@ApiModelProperty(name = "发货人名称",notes = "")
private String senderName ;
/** 发货人电话 */
@ApiModelProperty(name = "发货人电话",notes = "")
private String senderPhone ;
/** 发货人地址 */
@ApiModelProperty(name = "发货人地址",notes = "")
private String senderAddress ;
/** 开单状态 0未开单 1已开单 */
@ApiModelProperty(name = "开单状态 0未开单 1已开单",notes = "")
private String waybillStatus ;
/** 运单号 */
@ApiModelProperty(name = "运单号",notes = "")
private String waybillNo ;
/** 车次号 */
@ApiModelProperty(name = "车次号",notes = "")
private String trainNumber ;
/** 冻结状态 0未冻结 1已冻结 */
@ApiModelProperty(name = "冻结状态 0未冻结 1已冻结",notes = "")
private String freezeStatus ;
}

106
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java

@ -0,0 +1,106 @@
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;
import java.util.Date;
@Data
@TableName("logpm_trunkline_billlading")
@ApiModel(value = "TrunklineBilllading对象", description = "干线提货表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineBillladingEntity 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 ;
/** 提货单号 */
@ApiModelProperty(name = "提货单号",notes = "")
private String billladingCode ;
/** 车牌号 */
@ApiModelProperty(name = "车牌号",notes = "")
private String carNumber ;
/** 司机id */
@ApiModelProperty(name = "司机id",notes = "")
private Long driverId ;
/** 司机名称 */
@ApiModelProperty(name = "司机名称",notes = "")
private String driverName ;
/** 司机电话 */
@ApiModelProperty(name = "司机电话",notes = "")
private String driverPhone ;
/** 承运商 */
@ApiModelProperty(name = "承运商",notes = "")
private String carrierName ;
/** 线路关联id */
@ApiModelProperty(name = "线路关联id",notes = "")
private Long lineId ;
/** 线路名称 */
@ApiModelProperty(name = "线路名称",notes = "")
private String lineNameTitle ;
/** 预计件数 */
@ApiModelProperty(name = "预计件数",notes = "")
private int planNum ;
/** 预计重量 */
@ApiModelProperty(name = "预计重量",notes = "")
private Double planWeight ;
/** 预计体积 */
@ApiModelProperty(name = "预计体积",notes = "")
private Double planVolume ;
/** 实际件数 */
@ApiModelProperty(name = "实际件数",notes = "")
private int realNum ;
/** 实际重量 */
@ApiModelProperty(name = "实际重量",notes = "")
private Double realWeight ;
/** 实际体积 */
@ApiModelProperty(name = "实际体积",notes = "")
private Double realVolume ;
/** 计费模式 1按件 2按重量 3按体积 */
@ApiModelProperty(name = "计费模式 1按件 2按重量 3按体积",notes = "")
private String chargeType ;
/** 提货费用 */
@ApiModelProperty(name = "提货费用",notes = "")
private Double totalFee ;
/** 提货单状态 1=未开始,2=提货中,3=已完成,4=已取消 */
@ApiModelProperty(name = "提货单状态 1=未开始,2=提货中,3=已完成,4=已取消",notes = "")
private String billladingStatus ;
/** 提货开始时间 */
@ApiModelProperty(name = "提货开始时间",notes = "")
private Date startTime ;
/** 提货完成时间 */
@ApiModelProperty(name = "提货完成时间",notes = "")
private Date endTime ;
/** 结算时间 */
@ApiModelProperty(name = "结算时间",notes = "")
private Date settlementTime ;
/** 结算人id */
@ApiModelProperty(name = "结算人id",notes = "")
private Long settlementId ;
/** 结算人名称 */
@ApiModelProperty(name = "结算人名称",notes = "")
private String settlementName ;
}

56
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLineEntity.java

@ -0,0 +1,56 @@
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_billlading_line")
@ApiModel(value = "TrunklineBillladingLine对象", description = "干线提货线路表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineBillladingLineEntity 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 billladingId ;
/** 客户类型 1 工厂 2 商场 3装饰 4个人 */
@ApiModelProperty(name = "客户类型 1 工厂 2 商场 3装饰 4个人",notes = "")
private String clientType ;
/** 联系人 */
@ApiModelProperty(name = "联系人",notes = "")
private String linkMan ;
/** 联系电话 */
@ApiModelProperty(name = "联系电话",notes = "")
private String linkPhone ;
/** 联系人地址 */
@ApiModelProperty(name = "联系人地址",notes = "")
private String linkAddress ;
/** 排序 */
@ApiModelProperty(name = "排序",notes = "")
private Integer sort ;
}

44
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java

@ -0,0 +1,44 @@
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_billlading_package")
@ApiModel(value = "TrunklineBillladingPackage对象", description = "提货单包件明细表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineBillladingPackageEntity 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 ;
/** 包件码 */
@ApiModelProperty(name = "包件码",notes = "")
private String orderPackageCode ;
/** 提货单id */
@ApiModelProperty(name = "提货单id",notes = "")
private Long billladingId ;
}

51
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java

@ -0,0 +1,51 @@
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_billlading_waybill")
@ApiModel(value = "TrunklineBillladingWaybill对象", description = "提货运单关联表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineBillladingWaybillEntity extends TenantEntity {
/** 预留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 ;
/** 提货单id */
@ApiModelProperty(name = "提货单id",notes = "")
private Long billladingId ;
/** 提货单号 */
@ApiModelProperty(name = "提货单号",notes = "")
private String billadingCode ;
/** 运单号 */
@ApiModelProperty(name = "运单号",notes = "")
private String waybillNo ;
/** 提货数量 */
@ApiModelProperty(name = "提货数量",notes = "")
private Integer realNum ;
/** 提货重量 */
@ApiModelProperty(name = "提货重量",notes = "")
private Double realWeight ;
/** 提货体积 */
@ApiModelProperty(name = "提货体积",notes = "")
private Double realVolume ;
}

50
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineDetailProductEntity.java

@ -0,0 +1,50 @@
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_detail_product")
@ApiModel(value = "TrunklineDetailProduct对象", description = "提货运单关联表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineDetailProductEntity 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 ;
/** 包件码 */
@ApiModelProperty(name = "包件码",notes = "")
private String unitNo ;
/** 货品代码 */
@ApiModelProperty(name = "货品代码",notes = "")
private String productCode ;
/** 货品名称 */
@ApiModelProperty(name = "货品名称",notes = "")
private String productName ;
/** 数量 */
@ApiModelProperty(name = "数量",notes = "")
private Integer quantity ;
}

8
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceDetailVO.java

@ -0,0 +1,8 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.entity.TrunklineAdvanceDetailEntity;
import lombok.Data;
@Data
public class TrunklineAdvanceDetailVO extends TrunklineAdvanceDetailEntity {
}

8
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineAdvanceVO.java

@ -0,0 +1,8 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import lombok.Data;
@Data
public class TrunklineAdvanceVO extends TrunklineAdvanceEntity {
}

11
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingLineVO.java

@ -0,0 +1,11 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.entity.TrunklineBillladingLineEntity;
import lombok.Data;
@Data
public class TrunklineBillladingLineVO extends TrunklineBillladingLineEntity {
}

8
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingPackageVO.java

@ -0,0 +1,8 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.entity.TrunklineBillladingPackageEntity;
import lombok.Data;
@Data
public class TrunklineBillladingPackageVO extends TrunklineBillladingPackageEntity {
}

17
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingVO.java

@ -0,0 +1,17 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.entity.TrunklineBillladingEntity;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class TrunklineBillladingVO extends TrunklineBillladingEntity {
private Integer nodeNub;
private Integer waybillCount;
private Integer totalNum;
private BigDecimal totalWeight;
private BigDecimal totalVolume;
}

11
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingWaybillVO.java

@ -0,0 +1,11 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.entity.TrunklineBillladingWaybillEntity;
import lombok.Data;
@Data
public class TrunklineBillladingWaybillVO extends TrunklineBillladingWaybillEntity {
}

8
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineDetailProductVO.java

@ -0,0 +1,8 @@
package com.logpm.trunkline.vo;
import com.logpm.trunkline.entity.TrunklineDetailProductEntity;
import lombok.Data;
@Data
public class TrunklineDetailProductVO extends TrunklineDetailProductEntity {
}

14
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java

@ -16,6 +16,7 @@
*/
package com.logpm.warehouse.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -23,6 +24,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.util.List;
/**
* 盘点明细 实体类
*
@ -120,6 +123,13 @@ public class QuestDetailEntity extends TenantEntity {
*/
@ApiModelProperty(value = "在库数量")
private Integer stockNum;
/**
* 商场名称
*/
@TableField(exist = false)
private List<String> marketNames;
/**
* 仓库id
*/
@ -146,12 +156,12 @@ public class QuestDetailEntity extends TenantEntity {
* 托盘id
*/
@ApiModelProperty(value = "托盘id")
private Long trayId;
private String trayId;
/**
* 货位id
*/
@ApiModelProperty(value = "货位id")
private Long allocationId;
private String allocationId;
/**
* 是否是新增数据

12
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionRecordEntity.java

@ -138,4 +138,16 @@ public class WarehouseRetentionRecordEntity extends TenantEntity {
@ApiModelProperty(value = "取消滞留备注")
private String cancelRemark;
/**
* 任务Id
*/
@ApiModelProperty(value = "任务Id")
private Long taskId;
/**
* 滞留数量
*/
@ApiModelProperty(value = "滞留数量")
private Integer retentionQuantity;
}

189
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java

@ -0,0 +1,189 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.warehouse.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serializable;
/**
* 滞留扫描记录 实体类
*
* @author BladeX
* @since 2023-11-03
*/
@Data
@TableName("logpm_warehouse_retention_scan")
@ApiModel(value = "WarehouseRetentionRecord对象", description = "滞留扫描记录")
public class WarehouseRetentionScanEntity extends TenantEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID)
private Long id;
/**
* 租户号
*/
@ApiModelProperty(value = "租户号")
private String tenantId;
/**
* 是否已删除
*/
@ApiModelProperty(value = "是否已删除")
private Integer isDeleted;
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
/**
* 配送车次号
*/
@ApiModelProperty(value = "配送车次号")
private String trainNumber;
/**
* 订单ID
*/
@ApiModelProperty(value = "订单ID")
private Long orderId;
/**
* 库存品ID
*/
@ApiModelProperty(value = "库存品ID")
private Long inventoryId;
/**
* 滞留类型 1-包件2-零担(这里会关联到具体的品类)3-库存品
*/
@ApiModelProperty(value = "滞留类型 1-包件、2-零担(这里会关联到具体的品类)、3-库存品")
private Integer conditions;
/**
* 物料编码(库存品)
*/
@ApiModelProperty(value = "物料编码(库存品)")
private String materialNumber;
/**
* 物料名称(库存品)
*/
@ApiModelProperty(value = "物料名称(库存品)")
private String materialName;
/**
* 预约客户ID
*/
@ApiModelProperty(value = "预约客户ID")
private Long reservationId;
/**
* 订单自编号(库存品没有)
*/
@ApiModelProperty(value = "订单自编号(库存品没有)")
private String orderCode;
/**
* 预约单号
*/
@ApiModelProperty(value = "预约单号")
private String reservationCode;
/**
* 扫描类型:1-包件2-订单3-托盘4...
*/
@ApiModelProperty(value = "扫描类型:1-包件、2-订单、3-托盘、4...")
private Integer scanType;
/**
* 包件ID
*/
@ApiModelProperty(value = "包件ID")
private Long orderPackageId;
/**
* 包条码
*/
@ApiModelProperty(value = "包条码")
private String orderPackageCode;
/**
* 滞留数量
*/
@ApiModelProperty(value = "滞留数量")
private Integer retentionQuantity;
/**
* 滞留扫描操作人名称
*/
@ApiModelProperty(value = "滞留扫描操作人名称")
private String retentionScanUsername;
/**
* 滞留扫描操作人Id
*/
@ApiModelProperty(value = "滞留扫描操作人Id")
private Long retentionScanUserId;
/**
* 滞留操作备注
*/
@ApiModelProperty(value = "滞留操作备注")
private String remarks;
/**
* 滞留扫描时间
*/
@ApiModelProperty(value = "滞留扫描时间")
private Date retentionScanTime;
/**
* 滞留方式 1-PDA2-PC
*/
@ApiModelProperty(value = "滞留方式 1-PDA、2-PC")
private Integer retentionWay;
/**
* 配送任务ID
*/
@ApiModelProperty(value = "配送任务ID")
private Long deliveryId;
/**
* 配送任务ID
*/
@ApiModelProperty(value = "配送任务ID")
private Long refId;
}

61
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java

@ -0,0 +1,61 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.warehouse.feign;
import com.logpm.warehouse.entity.WarehouseRetentionScanEntity;
import org.springblade.core.mp.support.BladePage;
import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
* 滞留扫描记录 Feign接口类
*
* @author BladeX
* @since 2023-11-03
*/
@FeignClient(
value = "warehouseRetentionScan"
)
public interface IWarehouseRetentionScanClient {
String API_PREFIX = "retentionScan/client";
String TOP = API_PREFIX + "/top";
/**
* 获取滞留扫描记录列表
*
* @param current 页号
* @param size 页数
* @return BladePage
*/
@GetMapping(TOP)
BladePage<WarehouseRetentionScanEntity> retentionScanTop(@RequestParam("current") Integer current, @RequestParam("size") Integer size);
/**
* 保存扫描记录
* @return BladePage
*/
@PostMapping(TOP+"/saveRetentionScan")
R saveRetentionScan(@RequestBody WarehouseRetentionScanEntity warehouseRetentionScanEntity);
}

7
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionRecordVO.java

@ -20,6 +20,8 @@ import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 滞留记录 视图实体类
*
@ -31,4 +33,9 @@ import lombok.EqualsAndHashCode;
public class WarehouseRetentionRecordVO extends WarehouseRetentionRecordEntity {
private static final long serialVersionUID = 1L;
private List<WarehouseRetentionScanVO> retentionScanVOList;
private String retentionTypeName;
}

34
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionScanVO.java

@ -0,0 +1,34 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.warehouse.vo;
import com.logpm.warehouse.entity.WarehouseRetentionScanEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 滞留扫描记录 视图实体类
*
* @author BladeX
* @since 2023-11-03
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class WarehouseRetentionScanVO extends WarehouseRetentionScanEntity {
private static final long serialVersionUID = 1L;
}

21
blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineController.java

@ -30,7 +30,6 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.logstash.logback.encoder.org.apache.commons.lang3.StringEscapeUtils;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
@ -47,6 +46,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* 提货路线 控制器
@ -104,10 +104,8 @@ public class BasicDelineController extends BladeController {
@ApiOperation(value = "新增", notes = "传入basicDeline")
public R save(@Valid @RequestBody BasicDelineDTO basicDeline) {
//转义->
basicDeline.setLineName(StringEscapeUtils.unescapeHtml4(basicDeline.getLineName()));
basicDelineService.save(basicDeline);
//新增关联表
return R.status(basicDelineMiddleService.saveByDTO(basicDeline));
// basicDeline.setLineName(StringEscapeUtils.unescapeHtml4(basicDeline.getLineName()));
return basicDelineService.saveDeline(basicDeline);
}
/**
@ -117,13 +115,12 @@ public class BasicDelineController extends BladeController {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入basicDeline")
public R update(@Valid @RequestBody BasicDelineDTO basicDeline) {
//转义->
basicDeline.setLineName(StringEscapeUtils.unescapeHtml4(basicDeline.getLineName()));
//删除所有中间表
basicDelineMiddleService.deleteBydelineId(Func.toLongList(String.valueOf(basicDeline.getId())));
//新增关联表
basicDelineMiddleService.saveByDTO(basicDeline);
return R.status(basicDelineService.updateById(basicDeline));
Long id = basicDeline.getId();
if(Objects.isNull(id)){
log.warn("#############update: id不能为空");
return R.fail(403,"id不能为空");
}
return basicDelineService.updateDeline(basicDeline);
}
/**

5
blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicDelineNodeController.java

@ -97,8 +97,9 @@ public class BasicDelineNodeController extends BladeController {
@GetMapping("/dictionary")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "字典", notes = "传入basicDelineNode")
public R<List<BasicDelineNodeVO>> dictionary() {
List<BasicDelineNodeVO> basicDelineNodeVOS = basicDelineNodeService.selectBasicDelineNodeDictionary();
public R<List<BasicDelineNodeVO>> dictionary(BasicDelineNodeDTO basicDelineNode) {
String customer = basicDelineNode.getCustomer();
List<BasicDelineNodeVO> basicDelineNodeVOS = basicDelineNodeService.selectBasicDelineNodeDictionary(customer);
return R.data(basicDelineNodeVOS);
}

2
blade-service/logpm-basic/src/main/java/com/logpm/basic/dto/BasicDelineNodeDTO.java

@ -51,6 +51,6 @@ public class BasicDelineNodeDTO extends BasicDelineNodeEntity {
@ApiModelProperty(value = "主表Id")
private Long delineId;
private Integer sort;
}

2
blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.java

@ -57,5 +57,5 @@ public interface BasicDelineNodeMapper extends BaseMapper<BasicDelineNodeEntity>
*
* @return
*/
List<BasicDelineNodeVO> selectBasicDelineNodeDictionary();
List<BasicDelineNodeVO> selectBasicDelineNodeDictionary(@Param("customer") String customer);
}

16
blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicDelineNodeMapper.xml

@ -40,16 +40,13 @@
lbdn.contacts contacts,
lbdn.address address,
lbdn.telephone telephone,
lbdm.ageing ageing,
lbdm.route route
lbdn.longitude longitude,
lbdn.latitude latitude,
ldbn.remark remark
FROM
logpm_basic_deline_node lbdn
JOIN logpm_basic_deline_middle lbdm on lbdn.id = lbdm.node_id
<where>
lbdn.is_deleted = 0
AND lbdm.is_deleted = 0
<if test="param.delineId != null ">and lbdm.deline_id = #{param.delineId}</if>
<if test="param.id != null ">and lbdm.node_id = #{param.id}</if>
</where>
</select>
@ -58,7 +55,12 @@
SELECT * FROM logpm_basic_deline_node ${ew.customSqlSegment}
</select>
<select id="selectBasicDelineNodeDictionary" resultType="com.logpm.basic.vo.BasicDelineNodeVO">
select id,customer from logpm_basic_deline_node where is_deleted = 0
select id,customer
from logpm_basic_deline_node
where is_deleted = 0
<if test="customer != null and customer != ''">
customer like concat('%',#{customer},'%')
</if>
</select>
</mapper>

2
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineNodeService.java

@ -55,5 +55,5 @@ public interface IBasicDelineNodeService extends BaseService<BasicDelineNodeEnti
*
* @return
*/
List<BasicDelineNodeVO> selectBasicDelineNodeDictionary();
List<BasicDelineNodeVO> selectBasicDelineNodeDictionary(String customer);
}

6
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicDelineService.java

@ -18,10 +18,12 @@ package com.logpm.basic.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basic.dto.BasicDelineDTO;
import com.logpm.basic.entity.BasicDelineEntity;
import com.logpm.basic.excel.BasicDelineExcel;
import com.logpm.basic.vo.BasicDelineVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import java.util.List;
@ -50,4 +52,8 @@ public interface IBasicDelineService extends BaseService<BasicDelineEntity> {
*/
List<BasicDelineExcel> exportBasicDeline(Wrapper<BasicDelineEntity> queryWrapper);
R saveDeline(BasicDelineDTO basicDelineDTO);
R updateDeline(BasicDelineDTO basicDeline);
}

4
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineNodeServiceImpl.java

@ -54,8 +54,8 @@ public class BasicDelineNodeServiceImpl extends BaseServiceImpl<BasicDelineNodeM
}
@Override
public List<BasicDelineNodeVO> selectBasicDelineNodeDictionary() {
return baseMapper.selectBasicDelineNodeDictionary();
public List<BasicDelineNodeVO> selectBasicDelineNodeDictionary(String customer) {
return baseMapper.selectBasicDelineNodeDictionary(customer);
}
}

65
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicDelineServiceImpl.java

@ -18,14 +18,23 @@ package com.logpm.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basic.dto.BasicDelineDTO;
import com.logpm.basic.dto.BasicDelineNodeDTO;
import com.logpm.basic.entity.BasicDelineEntity;
import com.logpm.basic.entity.BasicDelineMiddleEntity;
import com.logpm.basic.excel.BasicDelineExcel;
import com.logpm.basic.mapper.BasicDelineMapper;
import com.logpm.basic.service.IBasicDelineMiddleService;
import com.logpm.basic.service.IBasicDelineService;
import com.logpm.basic.vo.BasicDelineVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
@ -34,9 +43,13 @@ import java.util.List;
* @author lmy
* @since 2023-05-24
*/
@Slf4j
@Service
@AllArgsConstructor
public class BasicDelineServiceImpl extends BaseServiceImpl<BasicDelineMapper, BasicDelineEntity> implements IBasicDelineService {
private final IBasicDelineMiddleService basicDelineMiddleService;
@Override
public IPage<BasicDelineVO> selectBasicDelinePage(IPage<BasicDelineVO> page, BasicDelineVO basicDeline) {
return page.setRecords(baseMapper.selectBasicDelinePage(page, basicDeline));
@ -52,4 +65,56 @@ public class BasicDelineServiceImpl extends BaseServiceImpl<BasicDelineMapper, B
return basicDelineList;
}
@Override
public R saveDeline(BasicDelineDTO basicDelineDTO) {
log.info("#############saveDeline: 保存提货路线");
List<BasicDelineNodeDTO> delinenode = basicDelineDTO.getDelinenode();
if(delinenode.size() < 2){
log.warn("##############saveDeline: 节点选择有误");
return R.fail(403,"节点选择有误");
}
BasicDelineEntity basicDelineEntity = new BasicDelineEntity();
BeanUtil.copy(basicDelineDTO,basicDelineEntity);
save(basicDelineEntity);
Long delineId = basicDelineEntity.getId();
for (BasicDelineNodeDTO basicDelineNodeDTO:delinenode){
BasicDelineMiddleEntity basicDelineMiddleEntity = new BasicDelineMiddleEntity();
basicDelineMiddleEntity.setDelineId(delineId);
basicDelineMiddleEntity.setNodeId(basicDelineNodeDTO.getId());
basicDelineMiddleEntity.setAgeing(basicDelineNodeDTO.getAgeing());
basicDelineMiddleEntity.setRoute(basicDelineNodeDTO.getRoute());
basicDelineMiddleService.save(basicDelineMiddleEntity);
}
return R.success("保存成功");
}
@Override
public R updateDeline(BasicDelineDTO basicDeline) {
log.info("#############updateDeline: 更新提货路线");
List<BasicDelineNodeDTO> delinenode = basicDeline.getDelinenode();
if(delinenode.size() < 2){
log.warn("##############saveDeline: 节点选择有误");
return R.fail(403,"节点选择有误");
}
BasicDelineEntity basicDelineEntity = new BasicDelineEntity();
BeanUtil.copy(basicDeline,basicDelineEntity);
updateById(basicDelineEntity);
Long delineId = basicDelineEntity.getId();
//先删除以前的关联数据
List<Long> delineIds = new ArrayList<>();
delineIds.add(delineId);
basicDelineMiddleService.deleteBydelineId(delineIds);
for (BasicDelineNodeDTO basicDelineNodeDTO:delinenode){
BasicDelineMiddleEntity basicDelineMiddleEntity = new BasicDelineMiddleEntity();
basicDelineMiddleEntity.setDelineId(delineId);
basicDelineMiddleEntity.setNodeId(basicDelineNodeDTO.getId());
basicDelineMiddleEntity.setAgeing(basicDelineNodeDTO.getAgeing());
basicDelineMiddleEntity.setRoute(basicDelineNodeDTO.getRoute());
basicDelineMiddleService.save(basicDelineMiddleEntity);
}
return R.success("更新成功");
}
}

25
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java

@ -18,6 +18,7 @@ package com.logpm.basicdata.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.dto.BasicdataWarehouseDTO;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
@ -32,11 +33,15 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.cache.CacheObjNames;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.cache.utils.CacheUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.redis.cache.BladeRedis;
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.constant.BladeConstant;
import org.springblade.core.tool.utils.DateUtil;
@ -66,6 +71,8 @@ public class BasicdataWarehouseController extends BladeController {
private final IBasicdataWarehouseClient basicdataWarehouseClient;
private final BladeRedis bladeRedis;
/**
* 仓库 详情
*/
@ -177,6 +184,8 @@ public class BasicdataWarehouseController extends BladeController {
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入warehouseWarehouse")
public R save(@Valid @RequestBody BasicdataWarehouseEntity warehouseWarehouse) {
BladeUser user = AuthUtil.getUser();
CacheUtil.evict(CacheObjNames.basic_data_warehourse_list.getCacheName(), CacheObjNames.basic_data_warehourse_list.getKeyPrefix(),user.getUserId());
warehouseWarehouse.setEnableStatus("2");
return R.status(warehouseService.save(warehouseWarehouse));
}
@ -198,6 +207,8 @@ public class BasicdataWarehouseController extends BladeController {
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入warehouseWarehouse")
public R submit(@Valid @RequestBody BasicdataWarehouseEntity warehouseWarehouse) {
BladeUser user = AuthUtil.getUser();
CacheUtil.evict(CacheObjNames.basic_data_warehourse_list.getCacheName(), CacheObjNames.basic_data_warehourse_list.getKeyPrefix(),user.getUserId());
return R.status(warehouseService.saveOrUpdate(warehouseWarehouse));
}
@ -211,6 +222,10 @@ public class BasicdataWarehouseController extends BladeController {
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
BladeUser user = AuthUtil.getUser();
CacheUtil.evict(CacheObjNames.basic_data_warehourse_list.getCacheName(), CacheObjNames.basic_data_warehourse_list.getKeyPrefix(),user.getUserId());
boolean result = warehouseService.removeWarehouse(ids);
if (result) {
return R.status(true);
@ -274,7 +289,15 @@ public class BasicdataWarehouseController extends BladeController {
@GetMapping("/getMyWarehouseList")
@ApiOperationSupport(order = 3)
public R<List<BasicdataWarehouseEntity>> getMyWarehouseList() {
List<BasicdataWarehouseEntity> basicdataGoodsShelfVOList = warehouseService.getMyWarehouseList();
BladeUser user = AuthUtil.getUser();
List<BasicdataWarehouseEntity> basicdataGoodsShelfVOList = CacheUtil.get(CacheObjNames.basic_data_warehourse_list.getCacheName(), CacheObjNames.basic_data_warehourse_list.getKeyPrefix(), user.getUserId(),List.class);
if(ObjectUtils.isNull(basicdataGoodsShelfVOList)){
basicdataGoodsShelfVOList = warehouseService.getMyWarehouseList();
CacheUtil.put(CacheObjNames.basic_data_warehourse_list.getCacheName(), CacheObjNames.basic_data_warehourse_list.getKeyPrefix(),user.getUserId(),basicdataGoodsShelfVOList);
}
return R.data(basicdataGoodsShelfVOList);
}

7
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java

@ -269,6 +269,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
* @param isCovered
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void importClient(List<BasicdataClientExcel> data, Boolean isCovered) {
log.info("客户导入数据");
List<BasicdataStoreContactEntity> storeContactEntities = new ArrayList<>(); // 联系人
@ -418,6 +419,9 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
case "自提":
business.setMold("3");
break;
case "三方中转":
business.setMold("4");
break;
}
}else{
@ -442,6 +446,9 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
case "自提":
i.setMold("3");
break;
case "三方中转":
i.setMold("4");
break;
}
}else{

14
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java

@ -179,16 +179,10 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
});
}
}
List<BasicdataWarehouseEntity> warehouseEntityList = baseMapper.selectList(Wrappers.<BasicdataWarehouseEntity>query().lambda().in(BasicdataWarehouseEntity::getDepartment, deptIds));
// String json = redis.get(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId()));
// if (warehouseEntityList.size() <= 1) {
// redis.setEx(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId()), warehouseEntityList.get(0), 30 * 24 * 60 * 60L);
// }
return warehouseEntityList;
if(deptIds.isEmpty()){
return null;
}
return baseMapper.selectList(Wrappers.<BasicdataWarehouseEntity>query().lambda().in(BasicdataWarehouseEntity::getDepartment, deptIds));
}
@Override

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionAddvalueAppController.java

@ -95,7 +95,6 @@ public class DistributionAddvalueAppController {
return r;
}
/**
* 编辑保存
*/
@ -107,8 +106,6 @@ public class DistributionAddvalueAppController {
return r;
}
/**
* 查询编辑增值服务数据
*/
@ -120,8 +117,6 @@ public class DistributionAddvalueAppController {
return r;
}
/**
* 查询增值服务数据
*/

35
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java

@ -5,9 +5,11 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.service.IDistributionDeliveryInfoService;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.vo.DisStockListDetailVO;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.app.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -267,4 +269,37 @@ public class DistributionDeliveryAppController {
}
/**
* 扫描查询配送任务下的包件信息
*/
@PostMapping("/retentionScan")
@ApiOperationSupport(order = 11)
public R retentionScan(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
R r = distributionDeliveryListService.retentionScan(distrilbutionloadingscanDTO);
return r;
}
/**
* 扫描查询配送任务下的包件信息
*/
@PostMapping("/getZeroPackageInfo")
@ApiOperationSupport(order = 11)
public R getZeroPackageInfo(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
R distributionParcelListVOS = distributionDeliveryListService.getZeroPackageInfo(distrilbutionloadingscanDTO);
return R.data(distributionParcelListVOS);
}
/**
* 扫描查询配送任务下的包件信息
*/
@PostMapping("/getInventoryInfo")
@ApiOperationSupport(order = 11)
public R getInventoryInfo(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
R r = distributionDeliveryListService.getInventoryInfo(distrilbutionloadingscanDTO);
return R.data(r);
}
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -610,6 +610,8 @@ public class DistributionStockupAppController extends BladeController {
entity.setConditions("0");
entity.setType(2);
distributionStockService.save(entity);
//修改订单备货状态
distributionAsyncService.updateStockArticleStock(one.getStockArticleId());
// dataSourceTransactionManager.commit(transactionStatus);//提交
Map<String, Object> map = new HashMap<>();

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -244,12 +244,7 @@ public class DistributionDeliveryListController extends BladeController {
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distributionDeliveryList")
public void exportDistributionDeliveryList(@ApiIgnore @RequestParam Map<String, Object> distributionDeliveryList, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<DistributionDeliveryListEntity> queryWrapper = Condition.getQueryWrapper(distributionDeliveryList, DistributionDeliveryListEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(DistributionDeliveryList::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(DistributionDeliveryListEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<DistributionDeliveryListExcel> list = distributionDeliveryListService.exportDistributionDeliveryList(queryWrapper);
List<DistributionDeliveryListExcel> list = distributionDeliveryListService.exportDistributionDeliveryList(distributionDeliveryList);
ExcelUtil.export(response, "配送管理数据" + DateUtil.time(), "配送管理数据表", list, DistributionDeliveryListExcel.class);
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java

@ -163,10 +163,10 @@ public class DistributionParcelListController extends BladeController {
/**
* 修改零担在库数量
*/
@GetMapping("/zeroUpdateMaterial")
@PutMapping("/zeroUpdateMaterial")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "修改零担在库数量", notes = "传入distributionParcelList")
public R<List<DistributionParcelListVO>> getZeroUpdateMaterial(@ApiIgnore @RequestParam Map<String, Object> distributionParcelList, Query query) {
public R<List<DistributionParcelListVO>> getZeroUpdateMaterial(@RequestBody Map<String, Object> distributionParcelList, Query query) {
int a = distributionParcelListService.getZeroUpdateMaterial(distributionParcelList);
return a > 0 ? R.success("修改成功!") : R.fail("修改失败!");
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java

@ -183,12 +183,8 @@ public class DistributionReservationController extends BladeController {
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distrbutionReservation")
public void exportDistrbutionReservation(@ApiIgnore @RequestParam Map<String, Object> distrbutionReservation, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<DistributionReservationEntity> queryWrapper = Condition.getQueryWrapper(distrbutionReservation, DistributionReservationEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(DistrbutionReservation::getTenantId, bladeUser.getTenantId());
//}
queryWrapper.lambda().eq(DistributionReservationEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<DistributionReservationExcel> list = reservationService.exportDistrbutionReservation(queryWrapper);
List<DistributionReservationExcel> list = reservationService.exportDistrbutionReservation(distrbutionReservation);
ExcelUtil.export(response, "预约列表数据" + DateUtil.time(), "预约列表数据表", list, DistributionReservationExcel.class);
}

28
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java

@ -130,7 +130,7 @@ public class DistributionSignforController extends BladeController {
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入distributionSignfor")
public R<List<DistributionParcelListVO>> signforPackageList(Long signforId) {
List<DistributionParcelListVO> distributionSignforsnmbVO = distributionSignforService.signforPackageList(signforId);
List<DistributionParcelListVO> distributionSignforsnmbVO= distributionSignforService.signforPackageList(signforId);
return R.data(distributionSignforsnmbVO);
}
@ -255,13 +255,10 @@ public class DistributionSignforController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distributionSignfor")
public R update(@Valid @RequestBody DistributionSignforEntity distributionSignfor) {
distributionSignfor.setSigneeId(AuthUtil.getUser().getUserId());
distributionSignfor.setSigneeName(AuthUtil.getUser().getUserName());
Date date = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
distributionSignfor.setSigningTime(sdf.format(date));
return R.status(distributionSignforService.updateById(distributionSignfor));
public R update(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
R r = distributionSignforService.updateSign(distributionSignfor);
// return R.status(distributionSignforService.updateById(distributionSignfor));
return r;
}
/**
@ -314,4 +311,19 @@ public class DistributionSignforController extends BladeController {
}
// /**
// * 签收管理 修改签收照片信息
// */
// @PutMapping("/updatePCPicture")
// @ApiOperationSupport(order = 4)
// @ApiOperation(value = "修改签收照片信息", notes = "修改签收照片信息")
// public R updatePCPicture(@Valid @RequestBody DistributionSignforDTO distributionSignfor) {
// if(ObjectUtil.isNotEmpty(distributionSignfor.getReservationId())){
// return R.data(distributionSignforService.updatePicture(distributionSignfor));
// }else {
// return R.fail(3002,"参数不能为空不对!!");
// }
// }
}

71
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionRetentionScanDTO.java

@ -0,0 +1,71 @@
package com.logpm.distribution.dto;
import lombok.Data;
/**
* 滞留扫描对象
*/
@Data
//@EqualsAndHashCode(callSuper = true)
public class DistributionRetentionScanDTO {
/**
* 预约Id
*/
private Long reservationId;
/**
* 预约Id
*/
private String reservationCode;
/**
* 订单Id
*/
private Long orderId;
/**
* 订单自编码
*/
private Long orderCode;
/**
* 订单Id
*/
private Long inventoryId;
/**
* 物料编码
*/
private String materialNumber;
/**
* 物料名称
*/
private String materialName;
/**
* 包件ID
*/
private Long orderPackageId;
/**
* 包条码
*/
private Long orderPackageCode;
/**
* 滞留数量
*/
private Long retentionQuantity;
/**
* 类型
*/
private Integer conditions;
}

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java

@ -45,6 +45,12 @@ public class DistrilbutionloadingscanDTO {
@ApiModelProperty(value = "预约Id")
private Long orderId;
/**
* 订单自编码
*/
@ApiModelProperty(value = "预约Id")
private String orderCode;
// /**
// * 扫描类型
@ -88,6 +94,13 @@ public class DistrilbutionloadingscanDTO {
// @NotEmpty(message = "扫描物品不能为空")
private Integer type;
/**
* 滞留扫描类型
*/
@ApiModelProperty(value = "扫描物品(1-包条,2-订单,3-托盘)")
// @NotEmpty(message = "扫描物品不能为空")
private Integer retentionType;
/**
* 是否库存品
*/

90
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java

@ -41,71 +41,37 @@ public class DistributionDeliveryListExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 租户号
*/
@ColumnWidth(20)
@ExcelProperty("租户号")
private String tenantId;
/**
* 是否已删除
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除")
private Integer isDeleted;
/**
* 预留1
*/
@ColumnWidth(20)
@ExcelProperty("预留1")
private String reserve1;
/**
* 预留2
*/
@ColumnWidth(20)
@ExcelProperty("预留2")
private String reserve2;
/**
* 预留3
*/
@ColumnWidth(20)
@ExcelProperty("预留3")
private String reserve3;
/**
* 预留4
*/
@ColumnWidth(20)
@ExcelProperty("预留4")
private String reserve4;
/**
* 预留5
* 车次
*/
@ColumnWidth(20)
@ExcelProperty("预留5")
private String reserve5;
@ExcelProperty("车次")
private String trainNumber;
/**
* 车次
*/
@ColumnWidth(20)
@ExcelProperty("车次")
private String trainNumber;
@ExcelProperty("配送日期")
private String taskTime;
/**
* 仓库
*/
@ColumnWidth(20)
@ExcelProperty("仓库")
private String warehouse;
private String warehouseName;
/**
* 配送类型;1-自主配送,2-三方配送
*/
@ColumnWidth(20)
@ExcelProperty("配送类型;1-自主配送,2-三方配送")
@ExcelProperty("配送类型")
private String type;
/**
* 配送种类;1-市配,2-商配
*/
@ColumnWidth(20)
@ExcelProperty("配送种类;1-市配,2-商配")
@ExcelProperty("配送种类")
private String kind;
/**
* 配送车辆
@ -123,13 +89,13 @@ public class DistributionDeliveryListExcel implements Serializable {
* 配送公司;1-货拉拉,2-京东
*/
@ColumnWidth(20)
@ExcelProperty("配送公司;1-货拉拉,2-京东")
@ExcelProperty("配送公司")
private String distributionCompany;
/**
* 配送状态;1-配送中,2-已完成
*/
@ColumnWidth(20)
@ExcelProperty("配送状态;1-配送中,2-已完成")
@ExcelProperty("配送状态")
private String state;
/**
* 配送客户数
@ -143,12 +109,12 @@ public class DistributionDeliveryListExcel implements Serializable {
@ColumnWidth(20)
@ExcelProperty("配送价格")
private BigDecimal price;
/**
* 增值服务表id
*/
@ColumnWidth(20)
@ExcelProperty("增值服务表id")
private Integer addedServicesId;
// /**
// * 增值服务表id
// */
// @ColumnWidth(20)
// @ExcelProperty("增值服务表id")
// private Integer addedServicesId;
/**
* 订单总数
*/
@ -159,8 +125,14 @@ public class DistributionDeliveryListExcel implements Serializable {
* 配送件数
*/
@ColumnWidth(20)
@ExcelProperty("配送件数")
@ExcelProperty("配送件数")
private Integer deliveryNumber;
/**
* 配送件数
*/
@ColumnWidth(20)
@ExcelProperty("配送库存品数")
private Integer inventoryNub;
/**
* 扫描件数
*/
@ -173,11 +145,11 @@ public class DistributionDeliveryListExcel implements Serializable {
@ColumnWidth(20)
@ExcelProperty("装卸班组")
private String loadingTeam;
/**
* 预约表id
*/
@ColumnWidth(20)
@ExcelProperty("预约表id")
private String reservationId;
// /**
// * 预约表id
// */
// @ColumnWidth(20)
// @ExcelProperty("预约表id")
// private String reservationId;
}

145
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationExcel.java

@ -42,24 +42,44 @@ public class DistributionReservationExcel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 订单自编号;订单自编号关联订单表
*/
@ColumnWidth(20)
@ExcelProperty("预约单编号")
private String reservationCode;
/**
* 订单自编号;订单自编号关联订单表
*/
@ColumnWidth(20)
@ExcelProperty("订单号")
private String orderCode;
/**
* 租户号
* 订单自编号;订单自编号关联订单表
*/
@ColumnWidth(20)
@ExcelProperty("租户号")
private String tenantId;
@ExcelProperty("服务号")
private String serviceNumber;
/**
* 是否已删除
* 订单自编号;订单自编号关联订单表
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除")
private Integer isDeleted;
@ExcelProperty("仓库")
private String warehouseName;
/**
* 订单自编号;订单自编号关联订单表
*/
@ColumnWidth(20)
@ExcelProperty("订单自编号;订单自编号,关联订单表")
private String orderId;
@ExcelProperty("商场")
private String mallName;
/**
* 订单自编号;订单自编号关联订单表
*/
@ColumnWidth(20)
@ExcelProperty("门店")
private String storeName;
/**
* 收货人
*/
@ -78,18 +98,43 @@ public class DistributionReservationExcel implements Serializable {
@ColumnWidth(20)
@ExcelProperty("预约时间")
private Date reservationData;
/**
* 预约时间
*/
@ColumnWidth(20)
@ExcelProperty("预约包件数")
private Integer reservationNumber;
/**
* 预约时间
*/
@ColumnWidth(20)
@ExcelProperty("预约库存品数")
private Integer stockListNumber;
/**
* 预约时间
*/
@ColumnWidth(20)
@ExcelProperty("待收货款")
private BigDecimal dueSincere;
/**
* 预约时间
*/
@ColumnWidth(20)
@ExcelProperty("时段")
private String periodTimeName;
/**
* 服务类型;预约服务类型1-上楼2-超区3-拆样4-平移5-分拣6-搬运7-返货
*/
@ColumnWidth(20)
@ExcelProperty("服务类型;预约服务类型;1-上楼、2-超区、3-拆样、4-平移、5-分拣、6-搬运、7-返货;")
private String serveType;
@ExcelProperty("服务类型")
private String serveTypeName;
/**
* 配送方式;预约添加送货方式1-送货(商配的唯一方式)2-送货上楼3-送装一体4-
*/
@ColumnWidth(20)
@ExcelProperty("配送方式;预约添加送货方式;1-送货(商配的唯一方式)、2-送货上楼、3-送装一体、4-装")
private String deliveryType;
@ExcelProperty("配送方式")
private String deliveryTypeName;
/**
* 到付运费
*/
@ -107,66 +152,48 @@ public class DistributionReservationExcel implements Serializable {
*/
@ColumnWidth(20)
@ExcelProperty("代付运费")
private String replaceFee;
private BigDecimal replaceFee;
/**
* 收件人电话
*/
@ColumnWidth(20)
@ExcelProperty("收件人电话")
private String deliveryPhone;
// /**
// * 预约信息状态;预约列表信息状态;1-待确认、2-已确认
// */
// @ColumnWidth(20)
// @ExcelProperty("预约信息状态;预约列表信息状态;1-待确认、2-已确认")
// private String resvervationStatus;
/**
* 预约信息状态;预约列表信息状态1-待确认2-已确认
*/
@ColumnWidth(20)
@ExcelProperty("预约信息状态;预约列表信息状态;1-待确认、2-已确认")
private String resvervationStatus;
/**
* 订单来源
*/
@ColumnWidth(20)
@ExcelProperty("订单来源")
private String orderSource;
@ExcelProperty("预约信息状态")
private String resvervationStatusName;
// /**
// * 订单来源
// */
// @ColumnWidth(20)
// @ExcelProperty("订单来源")
// private String orderSource;
// /**
// * 备货状态;备货状态;1-未备货、2-待备货、3-已备货
// */
// @ColumnWidth(20)
// @ExcelProperty("备货状态")
// private String stockupStatus;
/**
* 备货状态;备货状态1-未备货2-待备货3-已备货
*/
@ColumnWidth(20)
@ExcelProperty("备货状态;备货状态;1-未备货、2-待备货、3-已备货")
private String stockupStatus;
/**
* 备货区编号
*/
@ColumnWidth(20)
@ExcelProperty("备货区编号")
private String goodsShelfId;
/**
* 预留1
*/
@ColumnWidth(20)
@ExcelProperty("预留1")
private String reserve1;
/**
* 预留2
*/
@ColumnWidth(20)
@ExcelProperty("预留2")
private String reserve2;
/**
* 预留3
*/
@ColumnWidth(20)
@ExcelProperty("预留3")
private String reserve3;
/**
* 预留4
*/
@ColumnWidth(20)
@ExcelProperty("预留4")
private String reserve4;
/**
* 预留5
*/
@ColumnWidth(20)
@ExcelProperty("预留5")
private String reserve5;
@ExcelProperty("备货状态")
private String stockupStatusName;
// /**
// * 备货区编号
// */
// @ColumnWidth(20)
// @ExcelProperty("备货区编号")
// private String goodsShelfId;
}

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java

@ -19,6 +19,8 @@ package com.logpm.distribution.feign;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.vo.DistributionDeliveryListVO;
import com.logpm.distribution.vo.DistributionDeliverySelfVO;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
@ -27,6 +29,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
/**
* 配送管理 Feign实现类
*
@ -42,7 +46,7 @@ public class DistributionDeliveryListClient implements IDistributionDeliveryList
@Override
@GetMapping(TOP)
public BladePage<DistributionDeliveryListEntity> top(Integer current, Integer size) {
public BladePage<DistributionDeliveryListEntity> deliveryListTop(Integer current, Integer size) {
Query query = new Query();
query.setCurrent(current);
query.setSize(size);
@ -50,4 +54,9 @@ public class DistributionDeliveryListClient implements IDistributionDeliveryList
return BladePage.of(page);
}
@Override
public DistributionDeliveryListVO getDeliveryDriverInfo(Long deliveryId) {
return distributionDeliveryListService.getDeliveryList(deliveryId);
}
}

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java

@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.service.IDistributionParcelListService;
import com.logpm.distribution.vo.DistributionParcelListVO;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
@ -172,4 +173,10 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
.eq("order_code",orderCode);
distributionParcelListService.update(updateWrapper);
}
@Override
@PostMapping(GETPARCELLISTINFO)
public List<DistributionParcelListEntity> getParcelListInfo(DistributionParcelListVO parcelListVO) {
return distributionParcelListService.getParcelListInfo(parcelListVO);
}
}

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java

@ -19,6 +19,8 @@ package com.logpm.distribution.feign;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.service.IDistributionParcelListService;
@ -191,4 +193,22 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
distributionStockArticleService.submitHandleNumByOrderId(subNum,articleId);
}
/**
* 查询订单数据
* @param stockArticleEntity
* @return
*/
@Override
@PostMapping(GETSTOCKARTICLEINFO)
public List<DistributionStockArticleEntity> getStockArticleInfo(DistributionStockArticleEntity stockArticleEntity) {
return distributionStockArticleService.list(Wrappers.<DistributionStockArticleEntity>query().lambda()
.eq(DistributionStockArticleEntity::getWarehouseId,stockArticleEntity.getWarehouseId())
.eq(ObjectUtils.isNotNull(stockArticleEntity.getMallId()),DistributionStockArticleEntity::getMallId,stockArticleEntity.getMallId())
.eq(ObjectUtils.isNotNull(stockArticleEntity.getId()),DistributionStockArticleEntity::getId,stockArticleEntity.getId())
.eq(ObjectUtils.isNotNull(stockArticleEntity.getGenre()),DistributionStockArticleEntity::getGenre,stockArticleEntity.getGenre())
.eq(ObjectUtils.isNotNull(stockArticleEntity.getIsZero()),DistributionStockArticleEntity::getIsZero,stockArticleEntity.getIsZero())
);
}
}

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java

@ -173,4 +173,16 @@ public class DistributionStockListClient implements IDistributionStockListClient
return distributionStockListService.list(stockListEntityLambdaQueryWrapper);
}
/**
* 查询商场库存平
*
* @param distributionStockListEntity
* @return
*/
@Override
@PostMapping(GETSTOCKLISTINFO)
public List<DistributionStockListVO> getStockListInfo(DistributionStockListEntity distributionStockListEntity) {
return distributionStockListService.getStockListInfo(distributionStockListEntity);
}
}

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

@ -53,7 +53,7 @@ public interface DistributionAddvalueDetailMapper extends BaseMapper<Distributio
/**
* 删除增值服务详情
* @param id
* @param addvalueId
*/
void deleteAddvalueDetail(@Param("addvalueId") Long id);
void deleteAddvalueDetail(@Param("addvalueId") Long addvalueId);
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionAddvalueDetailMapper.xml

@ -3,7 +3,8 @@
<mapper namespace="com.logpm.distribution.mapper.DistributionAddvalueDetailMapper">
<!-- 通用查询映射结果 -->
<resultMap id="distributionAddvalueDetailResultMap" type="com.logpm.distribution.entity.DistributionAddvalueDetailEntity">
<resultMap id="distributionAddvalueDetailResultMap"
type="com.logpm.distribution.entity.DistributionAddvalueDetailEntity">
<result column="tenant_id" property="tenantId"/>
<result column="create_user" property="createUser"/>
<result column="create_time" property="createTime"/>
@ -27,7 +28,7 @@
<result column="distance" property="distance"/>
</resultMap>
<delete id="deleteAddvalueDetail">
DELETE FROM logpm_distribution_addvalue_detil WHERE addvalue_id = #{addvalueId}
DELETE FROM logpm_distribution_addvalue_detail WHERE addvalue_id = #{addvalueId}
</delete>
@ -36,7 +37,8 @@
</select>
<select id="exportDistributionAddvalueDetail" resultType="com.logpm.distribution.excel.DistributionAddvalueDetailExcel">
<select id="exportDistributionAddvalueDetail"
resultType="com.logpm.distribution.excel.DistributionAddvalueDetailExcel">
SELECT * FROM logpm_distribution_addvalue_detail ${ew.customSqlSegment}
</select>

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

@ -61,6 +61,7 @@
ldad.num AS num,
ldad.flool_num AS floolNum,
ldad.distance AS distance,
lda.addvalue_id AS addvalueId,
ldad.id AS addvalueDetailId,
GROUP_CONCAT(ldap.package_id) AS packageListIds,
ldad.record_type AS isAll

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

@ -57,7 +57,7 @@ public interface DistributionAddvaluePackageMapper extends BaseMapper<Distributi
* @param reservationId
* @param id
*/
void deleteAddvaluePackageList(@Param("reservationId") Long reservationId,@Param("addvalueDetailIds") Long id);
void deleteAddvaluePackageList(@Param("reservationId") Long reservationId,@Param("addvalueDetailId") Long addvalueDetailId);
/**
* 删除指定增值服务包件

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

@ -235,6 +235,8 @@
ldsa.customer_name,
ldsa.customer_telephone,
ldsa.customer_address,
ldsa.total_number,
ldsa.hand_quantity,
ldrs.reservation_num AS deliveryNumber,
ldsa.description_goods descriptionGoods,
(
@ -278,7 +280,7 @@
( select sum(loaded_nub) FROM
logpm_distribution_loadscan AS ldl
WHERE ldl.order_id=ldrs.stock_article_id and ldl.scan_status != 1 and ldl.reservation_id = lds.reservation_id
) AS loadingNumber ,
) AS loadingNumber,
( select count(*) FROM
logpm_distribution_stock AS lstock
WHERE lstock.stock_article=ldrs.stock_article_id
@ -346,8 +348,8 @@
) ordNub,
COALESCE ( lds.received_quantity + lds.receivedin_quantity, 0 ) signNub,
ldsk.stockup_area stockupArea,
COALESCE ( ldrs.reservation_num, 0 ) inventoryNub,
COUNT(DISTINCT lwtg.tray_id) AS trayNum
COALESCE ( ldrs.reservation_num, 0 ) inventoryNub
-- COUNT(DISTINCT lwtg.tray_id) AS trayNum
FROM
logpm_distribution_signfor lds
LEFT JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java

@ -57,7 +57,7 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
* @param queryWrapper
* @return
*/
List<DistributionDeliveryListExcel> exportDistributionDeliveryList(@Param("ew") Wrapper<DistributionDeliveryListEntity> queryWrapper);
List<DistributionDeliveryListVO> exportDistributionDeliveryList(@Param("ew") Wrapper<DistributionDeliveryListEntity> queryWrapper);
/**
* 商配车次
*
@ -410,4 +410,22 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
* @return
*/
List<DistributionParcelNumberVO> selectDeliveryZeroOrderDetail(@Param("orderId") Long orderId,@Param("deliveryListId") Long deliveryId);
/**
* 查询滞留库存品包件
* @param stockPackageCode
* @param deliveryId
* @return
*/
DistributionRetentionScanVo selectRetentionInventoryPackage(@Param("stockPackageCode") String stockPackageCode,@Param("deliveryId") Long deliveryId);
/**
* 查询滞留包件细腻系
* @param orderPackageCode
* @param deliveryId
* @return
*/
DistributionRetentionScanVo selectRetentionPackage(@Param("orderPackageCode")String orderPackageCode,@Param("deliveryId") Long deliveryId);
List<DistributionRetentionScanVo> selectRetentionZeroPackage(@Param("deliveryId")Long deliveryId, @Param("orderCode")String barcode);
}

73
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -260,7 +260,7 @@
</select>
<select id="exportDistributionDeliveryList" resultType="com.logpm.distribution.excel.DistributionDeliveryListExcel">
<select id="exportDistributionDeliveryList" resultType="com.logpm.distribution.vo.DistributionDeliveryListVO">
SELECT * FROM logpm_distribution_delivery_list ${ew.customSqlSegment}
</select>
<select id="selectBycommercialNub" resultType="java.lang.Integer">
@ -1590,5 +1590,76 @@
WHERE
ldrs.stock_article_id = #{orderId} AND lddl.id=#{deliveryListId} and ldrs.stock_article_status in ('1','3') AND ldrzp.zero_package_status IN ( '1', '3' )
</select>
<select id="selectRetentionInventoryPackage"
resultType="com.logpm.distribution.vo.DistributionRetentionScanVo">
SELECT
lddl.id,
ldr.id AS reservationId,
lddl.train_number AS trainNumber,
ldr.reservation_code AS reservationCode,
ldsld.id AS orderPackageId,
ldsld.stock_package_code AS orderPackageCode,
ldsld.stock_list_id AS inventoryId,
ldsld.num AS reservationQuantity,
ldsl.cargo_number AS materialNumber,
ldsl.description_goods AS materialName,
ldsl.incoming_batch AS 入库批次
FROM
logpm_distribution_delivery_list AS lddl
LEFT JOIN logpm_distribution_signfor AS lds ON lds.delivery_id = lddl.id
LEFT JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id
LEFT JOIN logpm_distribution_reservation_stocklist AS ldrs ON ldrs.reservation_id = ldr.id
LEFT JOIN logpm_distribution_stock_list AS ldsl ON ldsl.id = ldrs.stocklist_id
INNER JOIN logpm_dis_stock_list_detail AS ldsld ON ldsld.stock_list_id = ldrs.stocklist_id and ldsld.reservation_id = ldr.id
WHERE lddl.id=#{deliveryId} and ldrs.stock_list_status in ('1','2') and ldsld.stock_package_code =#{stockPackageCode}
</select>
<select id="selectRetentionPackage" resultType="com.logpm.distribution.vo.DistributionRetentionScanVo">
SELECT
lddl.id AS deliveryId,
lddl.train_number AS trainNumber,
ldr.id AS reservationId,
ldr.reservation_code AS reservationCode,
ldsa.id AS orderId,
ldsa.order_code AS orderCode,
ldpl.id AS orderPackageId,
ldpl.order_package_code AS orderPackageCode,
ldpl.quantity AS retentionQuantity,
1 AS conditions
FROM
logpm_distribution_delivery_list AS lddl
LEFT JOIN logpm_distribution_signfor AS lds ON lds.delivery_id = lddl.id
LEFT JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id
LEFT JOIN logpm_distribution_reservation_stockarticle AS ldrs ON ldrs.reservation_id = ldr.id
LEFT JOIN logpm_distribution_stock_article AS ldsa ON ldsa.id = ldrs.stock_article_id
LEFT JOIN logpm_distribution_reservation_package AS ldrp ON ldrp.stock_article_id = ldrs.stock_article_id and ldrp.reservation_id = ldr.id
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldpl.id = ldrp.parce_list_id and ldpl.stock_article_id = ldsa.id
WHERE
lddl.id=#{deliveryId} AND ldrp.packet_bar_status in ('1','3') AND ldrs.is_zero = 0 AND ldpl.order_package_code = #{barCode}
</select>
<select id="selectRetentionZeroPackage" resultType="com.logpm.distribution.vo.DistributionRetentionScanVo">
SELECT
lddl.id AS deliveryId,
lddl.train_number AS trainNumber,
ldr.id AS reservationId,
ldr.reservation_code AS reservationCode,
ldsa.id AS orderId,
ldsa.order_code AS orderCode,
ldrs.reservation_num AS maxRetention,
ldrzp.parcel_list_id AS orderPackageId,
ldpl.firsts AS materialName
FROM
logpm_distribution_delivery_list AS lddl
LEFT JOIN logpm_distribution_signfor AS lds ON lds.delivery_id = lddl.id
LEFT JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id
LEFT JOIN logpm_distribution_reservation_stockarticle AS ldrs ON ldrs.reservation_id = ldr.id
LEFT JOIN logpm_distribution_stock_article AS ldsa ON ldsa.id = ldrs.stock_article_id
LEFT JOIN logpm_distribution_reservation_zero_package AS ldrzp ON ldrzp.stock_article_id = ldrs.stock_article_id and ldrzp.reservation_id = ldr.id
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrzp.parcel_list_id = ldpl.id
WHERE ldrs.is_zero = '1' AND lddl.id=#{deliveryId}
AND ldsa.order_code = #{orderCode}
AND ldrs.stock_article_status in ('1','3')
AND ldrzp.zero_package_status IN ('1','3')
</select>
</mapper>

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.java

@ -67,4 +67,11 @@ public interface DistributionDeliveryTripartiteMapper extends BaseMapper<Distrib
* @param id
*/
void deleteDeliveryTripartite(@Param("id")Long id);
/**
* 查询外协司机信息
* @param deliveryId
* @return
*/
DistributionDeliveryTripartiteEntity selectTripartiteInfo(@Param("deliveryId")Long deliveryId);
}

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

@ -53,5 +53,9 @@
<select id="selectListcustom" resultType="com.logpm.distribution.vo.app.DistributionAppDeliverySelfVO">
select id id,driver_name driverName,vehicle_num vehicleNub FROM logpm_distribution_delivery_tripartite where delivery_id = #{deliveryId}
</select>
<select id="selectTripartiteInfo"
resultType="com.logpm.distribution.entity.DistributionDeliveryTripartiteEntity">
SELECT * logpm_distribution_delivery_tripartite WHERE delivery_id = #{deliveryId}
</select>
</mapper>

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

@ -117,4 +117,6 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
ArrayList<String> selectorderCodeByLike(@Param("condition") String condition,@Param("collect") List<Long> collect);
List<DistributionStockListVO> selectStockListByOderId(@Param("id")Long id,@Param("collect") List<Long> collect);
List<DistributionParcelListEntity> getParcelListInfo(@Param("param")DistributionParcelListVO parcelListVO);
}

74
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml

@ -34,9 +34,79 @@
<result column="stock_article_id" property="stockArticleId"/>
</resultMap>
<select id="getParcelListInfo" resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
select ldsa.mall_name mallName,ldpl.order_code orderCode,ldpl.id,ldpl.conditions,ldpl.order_package_code orderPackageCode,ldsa.id stockArticleId,
ldsa.mall_id mallId,ldsa.genre ,ldsa.is_zero isZero,
ldpl.waybill_number waybillNumber,ldpl.firsts,ldpl.quantity,ldpl.warehouse_id warehouseId,ldpl.material_name materialName,ldpl.material_code materialCode,
CASE WHEN ldpl.conditions = 1 THEN
(select GROUP_CONCAT(tray_id)
from logpm_warehouse_tray_goods
where association_id = ldpl.id )
WHEN ldpl.conditions = 2 THEN
(select GROUP_CONCAT(tray_id)
from logpm_warehouse_tray_goods
where association_id = ldpl.material_id and incoming_batch = ldpl.order_code and market_id = ldsa.mall_id)
ELSE
( select GROUP_CONCAT(tray_id)
from logpm_warehouse_tray_goods
where association_id = ldpl.stock_article_id)
END trayId,
CASE WHEN ldpl.conditions = 1 THEN
(select GROUP_CONCAT(tray_code)
from logpm_warehouse_tray_goods
where association_id = ldpl.id )
WHEN ldpl.conditions = 2 THEN
(select GROUP_CONCAT(tray_code)
from logpm_warehouse_tray_goods
where association_id = ldpl.material_id and incoming_batch = ldpl.order_code and market_id = ldsa.mall_id)
ELSE
( select GROUP_CONCAT(tray_code)
from logpm_warehouse_tray_goods
where association_id = ldpl.stock_article_id)
END trayCode,
CASE WHEN ldpl.conditions = 1 THEN
(select GROUP_CONCAT(allocation_id)
from logpm_warehouse_updown_goods
where association_id = ldpl.id )
WHEN ldpl.conditions = 2 THEN
(select GROUP_CONCAT(allocation_id)
from logpm_warehouse_updown_goods
where association_id = ldpl.material_id and incoming_batch = ldpl.order_code and market_id = ldsa.mall_id)
ELSE
( select GROUP_CONCAT(allocation_id)
from logpm_warehouse_updown_goods
where association_id = ldpl.stock_article_id)
END allocationId,
CASE WHEN ldpl.conditions = 1 THEN
(select GROUP_CONCAT(position_code)
from logpm_warehouse_updown_goods
where association_id = ldpl.id )
WHEN ldpl.conditions = 2 THEN
(select GROUP_CONCAT(position_code)
from logpm_warehouse_updown_goods
where association_id = ldpl.material_id and incoming_batch = ldpl.order_code and market_id = ldsa.mall_id)
ELSE
( select GROUP_CONCAT(position_code)
from logpm_warehouse_updown_goods
where association_id = ldpl.stock_article_id)
END positionCode,
CASE WHEN ldpl.conditions = 2 THEN
(select GROUP_CONCAT(DISTINCT id)
from logpm_distribution_stock_list
where material_id = ldpl.material_id and incoming_batch = ldpl.order_code and market_id = ldsa.mall_id)
END stockId
<select id="selectDistributionParcelListPage"
resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
from logpm_distribution_stock_article ldsa
LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id
<where>
ldsa.warehouse_id = #{param.warehouseId} and ldpl.order_package_status != '70'
<if test="param.mallId != null and param.mallId != ''"> and ldsa.mall_id = #{param.mallId} </if>
<if test="param.genre != null and param.genre != ''">and ldsa.genre = #{param.genre}</if>
<if test="param.isZero != null and param.isZero != ''">and ldsa.is_zero = #{param.isZero}</if>
</where>
</select>
<select id="selectDistributionParcelListPage" resultType="com.logpm.distribution.entity.DistributionParcelListEntity">
SELECT
ldpl.warehouse_id warehouseId,
ldpl.id id,

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

@ -55,7 +55,7 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
* @param queryWrapper
* @return
*/
List<DistributionReservationExcel> exportDistrbutionReservation(@Param("ew") Wrapper<DistributionReservationEntity> queryWrapper);
List<DistributionReservationVO> exportDistrbutionReservation(@Param("ew") Wrapper<DistributionReservationEntity> queryWrapper);
Integer addReservations(@Param("list")List<Long> toLongList);

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

@ -73,8 +73,8 @@
</select>
<select id="exportDistrbutionReservation" resultType="com.logpm.distribution.excel.DistributionReservationExcel">
SELECT * FROM logpm_distrbution_reservation ${ew.customSqlSegment}
<select id="exportDistrbutionReservation" resultType="com.logpm.distribution.vo.DistributionReservationVO">
SELECT * FROM logpm_distribution_reservation ${ew.customSqlSegment}
</select>
<!-- 查询预约列表详情,包含订单信息,详细的增值服务-->
<select id="getReservationDetail" resultType="com.logpm.distribution.vo.DistributionReservationVO">
@ -666,6 +666,7 @@
reservation_id,
stock_article_id,
stock_article_status,
is_zero,
reservation_num
FROM logpm_distribution_reservation_stockarticle
<where>
@ -1037,7 +1038,7 @@
resultType="com.logpm.distribution.vo.DistributionAddvaluePackageVO">
SELECT
ldrzp.parcel_list_id,
ldrzp.quantity AS quantity,
ldrzp.quantity AS reservationNum,
ldrzp.reservation_id AS reservationId,
3 AS conditions,
ldsa.order_code AS orderCode,

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java

@ -24,10 +24,7 @@ import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.excel.DistributionSignforExcel;
import com.logpm.distribution.vo.DistributionLoadscanAbnormalVO;
import com.logpm.distribution.vo.DistributionReservationStocklistVO;
import com.logpm.distribution.vo.DistributionSignforVO;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import com.logpm.distribution.vo.app.DistributionAppParcelListVO;
import com.logpm.distribution.vo.app.DistributionAppSignforVO;
@ -227,4 +224,12 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return
*/
List<DistributionLoadscanAbnormalVO> selectAbnormalPackageList(@Param("reservationId")Long reservationId,@Param("deliveryListId") Long deliveryId);
/**
* 查询签收图片
* @param reservationId
* @return
*/
List<DistributionSignPrintVO> selectSignImgsUrl(@Param("reservationId")Long reservationId);
}

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

@ -555,6 +555,7 @@
CASE WHEN lds.positioning IS NOT NULL THEN true ELSE false END AS positioning,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub,
COALESCE(lds.received_quantity + lds.receivedin_quantity, 0) signNub,
COALESCE(lds.loaded_number + lds.loadedin_number, 0) signNub,
COALESCE(ldr.reservation_num + ldr.reservation_stock_list_num, 0) reservationNum
FROM
logpm_distribution_signfor lds
@ -929,4 +930,7 @@
WHERE
ldla.reservation_id = #{reservationId} and ldla.delivery_list_id = #{deliveryListId}
</select>
<select id="selectSignImgsUrl" resultType="com.logpm.distribution.entity.DistributionSignPrintEntity">
SELECT * FROM logpm_distribution_sign_print WHERE reservation_id = #{reservationId} and is_deleted = 0
</select>
</mapper>

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java

@ -102,4 +102,11 @@ public interface DistributionStockListMapper extends BaseMapper<DistributionStoc
* @return
*/
List<DistributionStockListVO> selectAllStockList(@Param("par")DistributionStockListDTO stockListDTO);
/**
* 查询库存平数据
* @param distributionStockListEntity
* @return
*/
List<DistributionStockListVO> getStockListInfo(@Param("par")DistributionStockListEntity distributionStockListEntity);
}

22
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml

@ -93,7 +93,29 @@
select * from logpm_distribution_stock_list where is_deleted = 0
</select>
<select id="getStockListInfo" resultType="com.logpm.distribution.vo.DistributionStockListVO">
select ldsl.market_name marketName,ldsl.incoming_batch incomingBatch,ldsl.quantity_stock quantityStock,ldsl.warehouse_id warehouseId,
ldsl.description_goods descriptionGoods,ldsl.cargo_number cargoNumber,ldsl.market_id marketId,ldsl.material_id materialId,
lwtg.tray_id trayId,
lwtg.tray_code trayCode,
lwug.allocation_id allocationId,
lwug.position_code positionCode,
ldsl.id id
from logpm_distribution_stock_list ldsl
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldsl.material_id
and lwtg.incoming_batch = ldsl.incoming_batch and lwtg.market_id = ldsl.market_id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldsl.material_id
and lwug.incoming_batch = ldsl.incoming_batch and lwug.market_id = ldsl.market_id
<where>
ldsl.warehouse_id = #{par.warehouseId} and ldsl.quantity_stock > 0
<if test="par.marketId != null and par.marketId != '' "> and ldsl.market_id = #{par.marketId} </if>
</where>
</select>
<select id="exportDistributionStockList" resultType="com.logpm.distribution.entity.DistributionStockListEntity">
SELECT * FROM logpm_distribution_stock_list ${ew.customSqlSegment}
</select>

15
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -180,14 +180,15 @@
</select>
<select id="pageList" resultType="com.logpm.distribution.vo.DistributionStockupVO">
select DISTINCT lds.id,lds.stockup_date stockupDate, lds.stockup_user stockupUser, lds.stockup_status stockupStatus, lds.stockup_area stockupArea,
lds.assign_status assignStatus, lds.goods_area_id goodsAreaId, lds.forklift_name forkliftName,
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time fixTime,lds.assign_time assignTime,
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode,
(GROUP_CONCAT(DISTINCT lwug.position_code)) stockipAllocation
lds.assign_status assignStatus, lds.goods_area_id goodsAreaId, lds.forklift_name forkliftName,
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time fixTime,lds.assign_time assignTime,
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode,
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '') stockipAllocation,COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') pallet
from logpm_distribution_stockup lds
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id =lds.id
LEFT JOIN logpm_distribution_reservation_package ldrp on ldrp.reservation_id = ldsi.reservation_id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldrp.parce_list_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldrp.parce_list_id
<where>
lds.is_deleted = 0
<!-- lds.tenant_id = #{param.tenantId} -->
@ -246,12 +247,14 @@
select DISTINCT lds.id,lds.stockup_date stockupDate, lds.stockup_user stockupUser, lds.stockup_status stockupStatus, lds.stockup_area stockupArea,
lds.assign_status assignStatus, lds.goods_area_id goodsAreaId, lds.forklift_name forkliftName,
lds.loader_name loaderName, lds.forklift_id forkliftId,lds.loader_id loaderId,lds.fix_time fixTime,lds.assign_time assignTime,
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode,(GROUP_CONCAT(DISTINCT lwtg.tray_code)) stockipAllocation
lds.type_service typeService,lds.outbound_date outboundDate,lds.stockup_code stockupCode,
COALESCE(GROUP_CONCAT(DISTINCT lwug.position_code SEPARATOR ','), '') stockipAllocation,COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '') pallet
from logpm_distribution_stockup lds
LEFT JOIN logpm_distribution_stockup_info ldsi on ldsi.stockup_id = lds.id
LEFT JOIN logpm_distrilbution_bill_stock ldbs on ldbs.bill_lading_id = ldsi.reservation_id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.stock_article_id = ldbs.stock_article_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id
<where>
lds.is_deleted = 0
<!-- lds.tenant_id = #{param.tenantId} -->
@ -750,7 +753,7 @@
LEFT JOIN logpm_distribution_stockup lds on lds.id = ldsi.stockup_id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.id = ldsii.parcel_list_id
<where>
ldsi.stockup_id =#{id}
ldsi.stockup_id =#{id} and ldrsi.reservation_num > 0
</where>
</select>

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

@ -114,24 +114,27 @@
SELECT * FROM logpm_distrilbution_bill_stock ${ew.customSqlSegment}
</select>
<select id="getBillOrderDetail" resultType="com.logpm.distribution.vo.DistributionBillOrderVO">
select DISTINCT ldsa.order_code orderCode,ldsa.description_goods descriptionGoods,ldsa.stockup_status stockupStatus,ldsa.hand_quantity handQuantity,
(select GROUP_CONCAT(IFNULL(ldpl.material_name , '') SEPARATOR ', ')
from logpm_distribution_parcel_list ldpl
where ldpl.material_name is not null and ldpl.stock_article_id = ldbs.stock_article_id) materialName,
(select count(lds.id)
from logpm_distribution_stock lds
where lds.stock_article = ldbs.stock_article_id ) preparedQuantity ,
(select GROUP_CONCAT(IFNULL(ldpl.pallet , '') SEPARATOR ', ')
from logpm_distribution_parcel_list ldpl
where ldpl.pallet is not null and ldpl.stock_article_id = ldbs.stock_article_id) pallet ,
(select GROUP_CONCAT(IFNULL(ldpl.goods_allocation , '') SEPARATOR ', ')
from logpm_distribution_parcel_list ldpl
where ldpl.goods_allocation is not null and ldpl.stock_article_id = ldbs.stock_article_id) goodsAllocation,
(select GROUP_CONCAT(IFNULL(ldpl.material_name , '') SEPARATOR ', ')
from logpm_distribution_parcel_list ldpl
where ldpl.material_name is not null and ldpl.stock_article_id = ldbs.stock_article_id) materialName,
(select count(lds.id)
from logpm_distribution_stock lds
where lds.stock_article = ldbs.stock_article_id ) preparedQuantity ,
(select COALESCE(GROUP_CONCAT(DISTINCT lwtg.tray_code SEPARATOR ','), '')
from logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id and lwtg.association_type = '3'
where ldpl.stock_article_id = ldbs.stock_article_id) pallet ,
(select COALESCE(GROUP_CONCAT(DISTINCT lwug.allocation_title SEPARATOR ','), '')
from logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id and lwug.association_type = '3'
where ldpl.stock_article_id = ldbs.stock_article_id) goodsAllocation,
ldsa.service_number serviceNumber,ldsa.waybill_number waybillNumber,ldsa.train_number trainNumber,ldsa.send_warehouse_name sendWarehouseName
from logpm_distrilbution_bill_stock ldbs
LEFT JOIN logpm_distribution_stock_article ldsa on ldbs.stock_article_id = ldsa.id
LEFT JOIN logpm_distribution_stock lds on lds.stock_article = ldbs.stock_article_id
LEFT JOIN logpm_distribution_stock_article ldsa on ldbs.stock_article_id = ldsa.id
LEFT JOIN logpm_distribution_stock lds on lds.stock_article = ldbs.stock_article_id
<where>
ldbs.is_deleted = 0 and ldbs.bill_lading_id = #{param.billLadingId} and ldbs.order_status in (1,2)
</where>
@ -139,10 +142,13 @@
</select>
<select id="getBillOrderPack" resultType="com.logpm.distribution.vo.DistributionBillOrderPackVO">
select ldpl.order_package_code orderPackageCode,ldpl.warehouse ,ldpl.firsts ,ldpl.second ,ldpl.third_product thirdProduct,
ldpl.material_code materialCode,ldpl.material_name materialName,ldpl.pallet ,ldpl.goods_allocation goodsAllocation,
ldpl.waybill_number waybillNumber,ldpl.send_warehouse_name sendWarehouseName,ldpl.order_code orderCode,ldpl.service_number serviceNumber
ldpl.material_code materialCode,ldpl.material_name materialName,
ldpl.waybill_number waybillNumber,ldpl.send_warehouse_name sendWarehouseName,ldpl.order_code orderCode,ldpl.service_number serviceNumber,
lwtg.tray_code pallet,lwug.allocation_title goodsAllocation
from logpm_distrilbution_bill_stock ldbs
LEFT JOIN logpm_distribution_parcel_list ldpl on ldbs.stock_article_id = ldpl.stock_article_id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldbs.stock_article_id = ldpl.stock_article_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id and lwtg.association_type = '3'
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id and lwug.association_type = '3'
<where>
ldbs.bill_lading_id = #{param.billLadingId} and ldbs.order_status in (1,2)
</where>
@ -180,9 +186,11 @@
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = lwug.association_id
where ldbs.bill_lading_id = #{reservationId} -->
select DISTINCT CONCAT( lwug.position_code ) allocation ,lwug.allocation_id allocationId , lwtg.tray_code pallet,lwtg.tray_id trayId,lwug.area_id areaId,
lwug.shelf_id shelfId,ldsa.order_code orderCode,ldsa.id stockArticleId ,ldbp.parce_list_id parcelListId,lds.id stockId,lds.stock_quantity stockQuantity
lwug.shelf_id shelfId,ldsa.order_code orderCode,ldsa.id stockArticleId ,ldbp.parce_list_id parcelListId,lds.id stockId,lds.stock_quantity stockQuantity,
ldsa.customer_address customerAddress,ldpl.firsts firstsNumber
from logpm_distrilbution_bill_package ldbp
LEFT JOIN logpm_distribution_parcel_list ldpl on ldbp.parce_list_id = ldpl.id
LEFT JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldbp.stock_article_id
LEFT JOIN logpm_warehouse_updown_goods lwug on ldbp.parce_list_id = lwug.association_id
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldbp.parce_list_id

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java

@ -9,6 +9,8 @@ import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionReservationEntity;
import java.util.List;
/**
* 配送签收异步线程
*/
@ -35,13 +37,13 @@ public interface IDistributionAsyncService {
*/
Boolean getOrderSelfPickup(Long id);
/**
* 修改订单状态
* 修改扫码状态
* @param id
* @return
*/
Boolean getInventorySelfPickup(Long id);
/**
* 修改订单状态
* 修改提货订单状态
* @param id
* @return
*/
@ -54,6 +56,20 @@ public interface IDistributionAsyncService {
*/
Boolean getBillStock(Long id);
/**
* 修改订单备货状态
* @param id 订单ID
* @return
*/
void updateStockArticleStock(Long id);
/**
* 修改包件预约状态
* @param ids 订单ID
* @return
*/
void updateParcelListReservation(List<Long> ids);
/**
* 修改库存品数量
* @param id

31
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java

@ -57,10 +57,10 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
/**
* 导出数据
*
* @param queryWrapper
* @param distributionDeliveryList
* @return
*/
List<DistributionDeliveryListExcel> exportDistributionDeliveryList(Wrapper<DistributionDeliveryListEntity> queryWrapper);
List<DistributionDeliveryListExcel> exportDistributionDeliveryList(Map<String, Object> distributionDeliveryList);
/**
* 获取其他表信息
@ -289,4 +289,31 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
*/
R zeroLoading(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
/**
* 扫描查询配送任务下的包件信息
* @param distrilbutionloadingscanDTO
* @return
*/
R retentionScan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
/**
* 通过订单自编号进行配送任务零担订单信息查询
* @param distrilbutionloadingscanDTO
* @return
*/
R getZeroPackageInfo(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
/**
* 库存品扫描
* @param distrilbutionloadingscanDTO
* @return
*/
R getInventoryInfo(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
/**
* 查询配送任务司机信息
* @param deliveryId
* @return
*/
List<DistributionDeliverySelfVO> getDriverInfo(Long deliveryId);
}

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java

@ -156,4 +156,11 @@ public interface IDistributionParcelListService extends BaseService<Distribution
* @return
*/
IPage<DistributionParcelListEntity> getPickupPack(Map<String, Object> distributionParcelList,IPage<Object> page);
/**
* 查询包件数据
* @param parcelListVO
* @return
*/
List<DistributionParcelListEntity> getParcelListInfo(DistributionParcelListVO parcelListVO);
}

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

@ -49,10 +49,10 @@ public interface IDistributionReservationService extends BaseService<Distributio
/**
* 导出数据
*
* @param queryWrapper
* @param distrbutionReservation
* @return
*/
List<DistributionReservationExcel> exportDistrbutionReservation(Wrapper<DistributionReservationEntity> queryWrapper);
List<DistributionReservationExcel> exportDistrbutionReservation(Map<String, Object> distrbutionReservation);
/**
* 批量确认预约信息

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

@ -195,4 +195,6 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
* @return
*/
R zeroSignfor(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO);
R updateSign(DistributionSignforDTO distributionSignfor);
}

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java

@ -146,6 +146,13 @@ public interface IDistributionStockListService extends BaseService<DistributionS
*/
IPage<DistributionStockListVO> getInventoryList(Map<String, Object> distributionStockList, IPage<DistributionStockListVO> page);
/**
* 查询库存平
* @param distributionStockListEntity
* @return
*/
List<DistributionStockListVO> getStockListInfo(DistributionStockListEntity distributionStockListEntity);
// /**
// * 查询库存品详情

37
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAddvalueServiceImpl.java

@ -190,18 +190,20 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImpl<Distributio
@Override
@Transactional
public R saveAddvalueInfo(DistributionAppAddvalueDTO distributionAppAddvalueDTO) {
List<DistributionAddvaluePackageDTO> packageEntityList = distributionAppAddvalueDTO.getPackageEntityList().stream().filter(p->p.getQuantity()>0).collect(Collectors.toList());
List<DistributionAddvaluePackageDTO> packageEntityList = distributionAppAddvalueDTO.getPackageEntityList();
List<DistributionAddvaluePackageDTO> packageDTOList = packageEntityList.stream().filter(p -> Func.isNotEmpty(p.getQuantity()) && p.getQuantity() > 0).collect(Collectors.toList());
if (Func.isEmpty(packageDTOList)){
return Resp.scanFail("操作失败","无可用包件信息");
}
//查询是否重复添加
DistributionAddvalueEntity addvalueEntity = distributionAddvalueMapper.selectOne(Wrappers.<DistributionAddvalueEntity>query().lambda()
.eq(DistributionAddvalueEntity::getAddvalueId, distributionAppAddvalueDTO.getAddvalueType())
.eq(DistributionAddvalueEntity::getRefId, distributionAppAddvalueDTO.getReservationId())
.eq(DistributionAddvalueEntity::getRefType, 1));
if (Func.isNotEmpty(addvalueEntity)){
return Resp.scanFail("操作失败", "存在该类型增值服务项,如需更改请编辑");
}
if (Func.isEmpty(packageEntityList)) {
return Resp.scanFail("请添加包件", "请添加包件");
}
DistributionAddvalueDetailEntity distributionAddvalueDetailEntity = new DistributionAddvalueDetailEntity();
if (Func.isEmpty(distributionAppAddvalueDTO.getNum())) {
return Resp.scanFail("添加失败", "错误的包件数量");
@ -211,7 +213,6 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImpl<Distributio
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(distributionAppAddvalueDTO.getReservationId());
if (Func.isEmpty(reservationEntity)){
return Resp.scanFail("添加失败", "客户信息错误");
}
// 上楼 超区 平移 搬运 分拣 专车
switch (distributionAppAddvalueDTO.getAddvalueType()) {
@ -336,6 +337,18 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImpl<Distributio
// distributionAddvalueDetailEntity.setNum(distributionAppAddvalueDTO.getNum());
// }
// 上楼 超区 平移 搬运 分拣 专车
if (Func.isEmpty(packageEntityList) && packageEntityList.size() == 0) {
//没有包件信息,对该增值服务进行清除
DistributionAddvalueEntity distributionAddvalueEntity = distributionAddvalueMapper.selectOne(Wrappers.<DistributionAddvalueEntity>query().lambda()
.eq(DistributionAddvalueEntity::getRefId, distributionAppAddvalueDTO.getReservationId())
.eq(DistributionAddvalueEntity::getAddvalueId, distributionAppAddvalueDTO.getAddvalueType()));
DistributionAddvalueDetailEntity addvalueDetailEntity = distributionAddvalueDetailService.getOne(Wrappers.<DistributionAddvalueDetailEntity>query().lambda()
.eq(DistributionAddvalueDetailEntity::getAddvalueId, distributionAddvalueEntity.getId()));
distributionAddvaluePackageMapper.deleteAddvaluePackageList(distributionAppAddvalueDTO.getReservationId(), addvalueDetailEntity.getId());
distributionAddvalueMapper.deleteAddvalue(distributionAppAddvalueDTO.getReservationId(), distributionAppAddvalueDTO.getAddvalueType());
distributionAddvalueDetailMapper.deleteAddvalueDetail(distributionAddvalueEntity.getId());
return Resp.scanSuccess("操作成功","操作成功");
}
switch (distributionAppAddvalueDTO.getAddvalueType()) {
case "1":
if (Func.isEmpty(distributionAppAddvalueDTO.getFloolNum())) {
@ -377,18 +390,6 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImpl<Distributio
return Resp.scanFail("添加失败", "服务器正忙");
}
distributionAddvalueDetailMapper.updateById(detailEntity);
if (Func.isEmpty(packageEntityList) && packageEntityList.size() == 0) {
//没有包件信息,对该增值服务进行清除
DistributionAddvalueEntity distributionAddvalueEntity = distributionAddvalueMapper.selectOne(Wrappers.<DistributionAddvalueEntity>query().lambda()
.eq(DistributionAddvalueEntity::getRefId, distributionAppAddvalueDTO.getReservationId())
.eq(DistributionAddvalueEntity::getAddvalueId, distributionAppAddvalueDTO.getAddvalueType()));
DistributionAddvalueDetailEntity addvalueDetailEntity = distributionAddvalueDetailService.getOne(Wrappers.<DistributionAddvalueDetailEntity>query().lambda()
.eq(DistributionAddvalueDetailEntity::getAddvalueId, distributionAddvalueEntity.getId()));
distributionAddvalueMapper.deleteAddvalue(distributionAppAddvalueDTO.getReservationId(), distributionAppAddvalueDTO.getAddvalueType());
distributionAddvalueDetailMapper.deleteAddvalueDetail(distributionAddvalueEntity.getId());
distributionAddvaluePackageMapper.deleteAddvaluePackageList(distributionAppAddvalueDTO.getReservationId(), addvalueDetailEntity.getId());
} else {
//查询出原来的包件信息
DistributionAddvalueVO addvalueVO = distributionAddvalueMapper.selectReservationAddvalue(distributionAppAddvalueDTO.getReservationId(), distributionAppAddvalueDTO.getAddvalueType());
String packageListIds = addvalueVO.getPackageListIds();
@ -454,7 +455,7 @@ public class DistributionAddvalueServiceImpl extends BaseServiceImpl<Distributio
});
}
}
}
return Resp.scanSuccess("保存成功", "保存成功");
}

47
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -28,6 +28,7 @@ import org.springblade.common.constant.delivery.DeliveryLoadingStatusConstant;
import org.springblade.common.constant.delivery.DeliveryStatusConstant;
import org.springblade.common.constant.order.OrderReservationStatusConstant;
import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.order.OrderStockupStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
@ -205,6 +206,51 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
return distrilbutionBillStockService.updateById(distrilbutionBillStock);
}
/**
* 修改订单备货状态
* @param id 订单ID
*/
@Async
@Override
public void updateStockArticleStock(Long id) {
log.debug("###查询订单备货状态");
DistributionStockArticleEntity byId = distributionStockArticleService.getById(id);
if(byId.getStockupStatus().equals(OrderStockupStatusConstant.daibeihuo.getValue())){
//
byId.setStockupStatus(OrderStockupStatusConstant.bufenbeihuo.getValue());
boolean b = distributionStockArticleService.updateById(byId);
log.debug("###执行结果={}",b);
}else if(byId.getStockupStatus().equals("1")){
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListMapper.selectList(Wrappers.<DistributionParcelListEntity>query().lambda()
.eq(DistributionParcelListEntity::getStockArticleId, id)
);
int sum = distributionParcelListEntities.stream().filter(i -> i.getOrderPackageStockupStatus().equals(OrderPackageStockupStatusConstant.daibeihuo.getValue())).collect(Collectors.toList()).stream().mapToInt(DistributionParcelListEntity::getQuantity).sum();
if(sum == 0 && byId.getStockupStatus().equals(OrderStockupStatusConstant.bufenbeihuo.getValue())){
byId.setStockupStatus(OrderStockupStatusConstant.yibeihu.getValue());
boolean b = distributionStockArticleService.updateById(byId);
log.debug("###执行结果={}",b);
}
}
}
/**
* 修改包件预约状态
* @param ids 订单ID
*/
@Async
@Override
public void updateParcelListReservation(List<Long> ids) {
log.debug("####修改包件预约状态");
ids.stream().forEach( i ->{
DistributionParcelListEntity distributionParcelListEntity = new DistributionParcelListEntity();
distributionParcelListEntity.setId(i);
distributionParcelListEntity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.yiyueyue.getValue());
int i1 = distributionParcelListMapper.updateById(distributionParcelListEntity);
log.debug("####修改包件预约数量===={}",i1);
});
}
@Async
@Override
public Boolean getInventoryNumUpdate(Long id, Integer num, Integer type) {
@ -1037,7 +1083,6 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
stockArticleEntity.setDeliveryQuantity(stockArticleEntity.getDeliveryQuantity() + outboundQuantity);
}
distributionStockArticleService.updateById(stockArticleEntity);
}

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java

@ -146,14 +146,14 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
public IPage<DistributionStockArticleVO> selectDistributionDeliveryorder(IPage<DistributionStockArticleVO> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO) {
List<DistributionStockArticleVO> distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliveryOrderPage(page, distributionDeliveryInfoDTO);
for (DistributionStockArticleVO distributionDeliveryInfoVO : distributionDeliveryInfoVOS) {
//查询签收数量
//查询装车数量
// distributionDeliveryInfoVO.get
// distributionDeliveryInfoVO.setLoadingNumber();
// distributionLoadscanService.list(Wrappers.query().lambda().eq())
// DistributionStockArticleWrapper.build().buildVoInfor(distributionDeliveryInfoVO);
}
// for (DistributionStockArticleVO distributionDeliveryInfoVO : distributionDeliveryInfoVOS) {
// //查询签收数量
// //查询装车数量
//// distributionDeliveryInfoVO.get
//// distributionDeliveryInfoVO.setLoadingNumber();
//// distributionLoadscanService.list(Wrappers.query().lambda().eq())
//// DistributionStockArticleWrapper.build().buildVoInfor(distributionDeliveryInfoVO);
// }
return page.setRecords(distributionDeliveryInfoVOS);
}

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

@ -42,14 +42,19 @@ import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.*;
import com.logpm.distribution.vo.print.PrintPreviewVO;
import com.logpm.distribution.wrapper.*;
import com.logpm.warehouse.entity.WarehouseRetentionScanEntity;
import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity;
import com.logpm.warehouse.feign.IWarehouseRetentionScanClient;
import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient;
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.logpm.warehouse.vo.TrayTypeDataVO;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.StringUtils;
import org.apache.ibatis.scripting.xmltags.ForEachSqlNode;
import org.jetbrains.annotations.NotNull;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.Inventory.InventoryLoadingStatusConstant;
import org.springblade.common.constant.common.IsOrNoConstant;
@ -77,6 +82,7 @@ import org.springblade.core.mp.support.Query;
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.constant.BladeConstant;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.cache.DictBizCache;
@ -146,6 +152,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
private final IDistributionLoadscanAbnormalService distributionLoadscanAbnormalService;
private final IDistributionReservationZeroPackageService distributionReservationZeroPackageService;
private final IDistributionParcelNumberService distributionParcelNumberService;
private final IWarehouseTrayGoodsClient warehouseTrayGoodsClient;
private final IWarehouseRetentionScanClient warehouseRetentionScanClient;
// private final DistributionStockMapper distributionStockMapper;
// private final BladeRedis redis;
@ -170,12 +179,55 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public List<DistributionDeliveryListExcel> exportDistributionDeliveryList(Wrapper<DistributionDeliveryListEntity> queryWrapper) {
List<DistributionDeliveryListExcel> distributionDeliveryListList = baseMapper.exportDistributionDeliveryList(queryWrapper);
//distributionDeliveryListList.forEach(distributionDeliveryList -> {
// distributionDeliveryList.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionDeliveryList.getType()));
//});
return distributionDeliveryListList;
public List<DistributionDeliveryListExcel> exportDistributionDeliveryList(Map<String, Object> distributionDeliveryList) {
Object o = distributionDeliveryList.get("ids");
if(ObjectUtils.isNotNull(o)){
distributionDeliveryList.remove("ids");
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(ObjectUtils.isNull(myCurrentWarehouse)){
throw new ServiceException("没有仓库信息!");
}
QueryWrapper<DistributionDeliveryListEntity> queryWrapper = Condition.getQueryWrapper(distributionDeliveryList, DistributionDeliveryListEntity.class);
queryWrapper.eq("warehouse_id",myCurrentWarehouse.getId());
if(ObjectUtils.isNotNull(o)){
queryWrapper.in("id",String.valueOf(o).split(","));
}
queryWrapper.lambda().eq(DistributionDeliveryListEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<DistributionDeliveryListExcel> list = new ArrayList<>();
List<DistributionDeliveryListVO> distributionDeliveryListVOS = baseMapper.exportDistributionDeliveryList(queryWrapper);
distributionDeliveryListVOS.forEach(dis -> {
// distributionDeliveryList.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionDeliveryList.getType()));
DistributionDeliveryListExcel deliveryListExcel = new DistributionDeliveryListExcel();
BeanUtils.copyProperties(dis,deliveryListExcel);
String value = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, dis.getType());
deliveryListExcel.setType(value);
String valuek = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_DELIVERY_KiIND, dis.getKind());
deliveryListExcel.setKind(valuek);
String valueks = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_DELIVERY_STATUS, dis.getDeliveryStatus());
deliveryListExcel.setState(valueks);
deliveryListExcel.setInventoryNub(ObjectUtils.isNotNull(dis.getInventoryNub() ) ? dis.getInventoryNub() : 0 );
//查询配送数据
if(dis.getKind().equals("1")){
//z自
List<DistributionDeliverySelfEntity> list1 = distributionDeliverySelfService.list(Wrappers.<DistributionDeliverySelfEntity>query().lambda().eq(DistributionDeliverySelfEntity::getDeliveryId, dis.getId()));
String collect = list1.stream().map(DistributionDeliverySelfEntity::getDriverName).collect(Collectors.joining());
String colle = list1.stream().map(DistributionDeliverySelfEntity::getVehicleNub).collect(Collectors.joining());
deliveryListExcel.setDriver(collect);
deliveryListExcel.setVehicle(colle);
}else{
//三
List<DistributionDeliveryTripartiteEntity> list1 = distributionDeliveryTripartiteService.list(Wrappers.<DistributionDeliveryTripartiteEntity>query().lambda().eq(DistributionDeliveryTripartiteEntity::getDeliveryId, dis.getId()));
String collect = list1.stream().map(DistributionDeliveryTripartiteEntity::getDriverName).collect(Collectors.joining());
String colle = list1.stream().map(DistributionDeliveryTripartiteEntity::getVehicleNum).collect(Collectors.joining());
deliveryListExcel.setDriver(collect);
deliveryListExcel.setVehicle(colle);
}
deliveryListExcel.setLoadingTeam("装:"+dis.getLoadingTeamName()+",卸:"+dis.getUnloadingTeamName());
list.add(deliveryListExcel);
});
return list;
}
@Override
@ -1241,7 +1293,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity);
}
}
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(distrilbutionloadingscanDTO.getReservationId());
reservationEntity.setLoadingStatus(ReservationLoadingStatusConstant.yizhuangche.getValue());
distributionReservationMapper.updateById(reservationEntity);
//查询预约下所有的订单信息
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleService.list(Wrappers.<DistributionReservationStockarticleEntity>query().lambda()
.eq(DistributionReservationStockarticleEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId()));
@ -1310,15 +1364,15 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isNotEmpty(distrilbutionloadingscanDTO.getDeliveryId())) {
loadscanEntity.setDeliveryId(distrilbutionloadingscanDTO.getDeliveryId());
}
parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
distributionParcelListService.updateById(parcelListEntity);
// parcelListEntity.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
// distributionParcelListService.updateById(parcelListEntity);
distributionLoadscanService.save(loadscanEntity);
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
Integer j = distributionSignforMapper.updateloadByReservationId(loadscanEntity.getDeliveryId(), loadscanEntity.getReservationId(), loadscanEntity.getPackageNub());
warehouseUpdownTypeClient.downPackage(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId());
//异步修改包件状态
distributionAsyncService.changeMarketDeliveryListStatus(loadscanEntity.getOrderPackageCode(), loadscanEntity.getDeliveryId());
// distributionAsyncService.changeMarketDeliveryListStatus(loadscanEntity.getOrderPackageCode(), loadscanEntity.getDeliveryId());
}
});
break;
@ -1439,7 +1493,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
signforEntity.setLoadedNumber(loadedNumber.subtract(packageLoadingNub).add(reservationNum).intValue());
distributionSignforService.updateById(signforEntity);
//异步修改包件状态
distributionAsyncService.checkZeroStockArticleLoadingStatus(parcelNumberEntity);
// distributionAsyncService.checkZeroStockArticleLoadingStatus(parcelNumberEntity);
}
}
}
@ -1508,7 +1562,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
Integer j = distributionSignforMapper.updateloadByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
// warehouseUpdownTypeClient.downStock()
//异步修改包件状态 //对于存在库存品的这里还需要将库存品从对应的信息中进行扣除
distributionAsyncService.changeMarketDeliveryListStatus(loadscaninvnEntity.getOrderPackageCode(), loadscaninvnEntity.getDeliveryId());
// distributionAsyncService.changeMarketDeliveryListStatus(loadscaninvnEntity.getOrderPackageCode(), loadscaninvnEntity.getDeliveryId());
DistributionStockListEntity stockListEntity = distributionStockListMapper.selectOne(Wrappers.<DistributionStockListEntity>query().lambda().eq(DistributionStockListEntity::getId, loadscaninvnEntity.getInventoryId()));
stockListEntity.setQuantityStock(stockListEntity.getQuantityStock() - loadscaninvnEntity.getPackageNub());
stockListEntity.setQuantityOccupied(stockListEntity.getQuantityOccupied() - loadscaninvnEntity.getPackageNub());
@ -1517,7 +1571,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
}
}
return R.success("成功");
return Resp.scanSuccess("操作成功","装车成功");
}
@ -2437,24 +2491,104 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询客户
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppcustomListPage(page, distributionDeliveryList.getId());
for (DistributionAppReservationVO distributionAppReservationVO : customList) {
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageListByReservationId(distributionAppReservationVO.getId());
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationMapper.selectStockArticleByReservationId(distributionAppReservationVO.getId());
List<DistributionStockEntity> distributionStockEntities = new ArrayList<>();
List<DistributionLoadscanEntity> loadscanEntityList = new ArrayList<>();
List<WarehouseTrayGoodsEntity> trayList = new ArrayList<>();
for (DistributionReservationStockarticleEntity reservationStockarticleEntity : reservationStockarticleEntityList) {
if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.no.getValue())){
//查询订制品备货数量
List<DistributionStockEntity> packageListStockUpScan = distributionStockMapper.selectList(Wrappers.<DistributionStockEntity>query().lambda()
.eq(DistributionStockEntity::getType, 1)
.eq(DistributionStockEntity::getParcelListId, reservationStockarticleEntity.getStockArticleId())
.eq(DistributionStockEntity::getReservationId, reservationStockarticleEntity.getReservationId()));
if (Func.isNotEmpty(packageListStockUpScan)){
distributionStockEntities.addAll(packageListStockUpScan);
}
//统计托盘数
//查询所有包件
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(reservationStockarticleEntity.getReservationId(), reservationStockarticleEntity.getStockArticleId());
parcelListEntities.forEach(p->{
WarehouseTrayGoodsEntity warehouseTrayGoodsEntity = new WarehouseTrayGoodsEntity();
warehouseTrayGoodsEntity.setAssociationId(p.getId());
warehouseTrayGoodsEntity.setAssociationType("1");
List<WarehouseTrayGoodsEntity> trayGoodsClientTrayList = warehouseTrayGoodsClient.getTrayList(warehouseTrayGoodsEntity);
if (Func.isNotEmpty(trayGoodsClientTrayList)){
trayList.addAll(trayGoodsClientTrayList);
}
});
//查询订制品装车数量
List<DistributionLoadscanEntity> packageListLoadingScan = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getReservationId, reservationStockarticleEntity.getReservationId())
.eq(DistributionLoadscanEntity::getOrderId, reservationStockarticleEntity.getStockArticleId())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
if (Func.isNotEmpty(packageListLoadingScan)){
loadscanEntityList.addAll(packageListLoadingScan);
}
}else if (reservationStockarticleEntity.getIsZero().equals(IsOrNoConstant.yes.getValue())){
//查询零担备货数量
List<DistributionStockEntity> zeroPackageListStockUpScan = distributionStockMapper.selectList(Wrappers.<DistributionStockEntity>query().lambda()
.eq(DistributionStockEntity::getType, 2)
.eq(DistributionStockEntity::getParcelListId, reservationStockarticleEntity.getStockArticleId())
.eq(DistributionStockEntity::getReservationId, reservationStockarticleEntity.getReservationId()));
if (Func.isNotEmpty(zeroPackageListStockUpScan)){
distributionStockEntities.addAll(zeroPackageListStockUpScan);
}
//查询零担装车数量
List<DistributionLoadscanEntity> zeroPackageListLoadingScan = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getReservationId, reservationStockarticleEntity.getReservationId())
.eq(DistributionLoadscanEntity::getOrderId, reservationStockarticleEntity.getStockArticleId())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
if (Func.isNotEmpty(zeroPackageListLoadingScan)){
loadscanEntityList.addAll(zeroPackageListLoadingScan);
}
}
}
distributionAppReservationVO.setTrayNum(0);
if (Func.isNotEmpty(trayList)){
Long count = trayList.stream().map(WarehouseTrayGoodsEntity::getTrayId).count();
distributionAppReservationVO.setTrayNum(count.intValue());
}
List<DisStockListDetailEntity> stockListDetailEntityList = distributionReservationMapper.selectInventoryListByReservation(distributionAppReservationVO.getId());
boolean stockArticleStockupStatus = parcelListEntities.stream().allMatch(s -> Func.isNotEmpty(s.getOrderPackageStockupStatus()) && s.getOrderPackageStockupStatus().equals(OrderPackageStockupStatusConstant.yibeihu.getValue()));
boolean inventoryStockupStatus = stockListDetailEntityList.stream().allMatch(i -> Func.isNotEmpty(i.getStockPackageCode()));
if (stockArticleStockupStatus && inventoryStockupStatus) {
// boolean inventoryStockupStatus = stockListDetailEntityList.stream().allMatch(i -> Func.isNotEmpty(i.getStockPackageCode()));
//备货数和计划数一致时完成备货
if (distributionStockEntities.size()+stockListDetailEntityList.stream().filter(s->Func.isNotEmpty(s.getStockPackageCode())).count() == distributionAppReservationVO.getReservationNum()){
distributionAppReservationVO.setIsstock("是");
} else {
}else {
distributionAppReservationVO.setIsstock("否");
}
boolean stockArticleLoadingStatus = parcelListEntities.stream().allMatch(s -> Func.isNotEmpty(s.getOrderPackageLoadingStatus()) && s.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue()));
boolean inventoryLoadingStatus = stockListDetailEntityList.stream().allMatch(i -> Func.isNotEmpty(i.getStockPackageCode()) && i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue()));
if (stockArticleLoadingStatus && inventoryLoadingStatus) {
Integer packageListScanNum = loadscanEntityList.stream().mapToInt(DistributionLoadscanEntity::getLoadedNub).sum();
Long inventoryListScanNum = stockListDetailEntityList.stream().filter(i -> Func.isNotEmpty(i.getStockPackageCode()) && i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())).count();
distributionAppReservationVO.setLoadingNub(packageListScanNum + inventoryListScanNum.intValue());
if (packageListScanNum + inventoryListScanNum ==distributionAppReservationVO.getReservationNum() ) {
distributionAppReservationVO.setIsload("是");
} else {
distributionAppReservationVO.setIsload("否");
}
// List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageListByReservationId(distributionAppReservationVO.getId());
//
// boolean stockArticleStockupStatus = parcelListEntities.stream().allMatch(s -> Func.isNotEmpty(s.getOrderPackageStockupStatus()) && s.getOrderPackageStockupStatus().equals(OrderPackageStockupStatusConstant.yibeihu.getValue()));
// if (stockArticleStockupStatus && inventoryStockupStatus) {
// distributionAppReservationVO.setIsstock("是");
// } else {
// distributionAppReservationVO.setIsstock("否");
// }
// boolean stockArticleLoadingStatus = parcelListEntities.stream().allMatch(s -> Func.isNotEmpty(s.getOrderPackageLoadingStatus()) && s.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.yizhuangche.getValue()));
// boolean inventoryLoadingStatus = stockListDetailEntityList.stream().allMatch(i -> Func.isNotEmpty(i.getStockPackageCode()) && i.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue()));
// if (stockArticleLoadingStatus && inventoryLoadingStatus) {
// distributionAppReservationVO.setIsload("是");
// } else {
// distributionAppReservationVO.setIsload("否");
// }
// //查询备货是否完成
// int aLong = distributionStockMapper.selectCount(new QueryWrapper<DistributionStockEntity>().lambda()
// .eq(DistributionStockEntity::getReservationId, distributionAppReservationVO.getId())
@ -5023,6 +5157,142 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return Resp.scanSuccess("装车成功", str.toString());
}
@Override
public R retentionScan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
Integer retentionType = distrilbutionloadingscanDTO.getRetentionType();
List<DistributionRetentionScanVo> retentionScanVos = new ArrayList<>();
switch (retentionType){
case 1:
//包件--库存品 和包件
List<DistributionParcelListEntity> parcelListEntities = baseMapper.selectPackageListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
// List<DisStockListDetailEntity> detailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
if (Func.isNotEmpty(parcelListEntities)){
List<DistributionParcelListEntity> packageInfo = parcelListEntities.stream().filter(p -> Func.isNotEmpty(p.getOrderPackageCode()) && p.getOrderPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList());
if (packageInfo.size()>1){
log.error("################包条码重复:{}",distrilbutionloadingscanDTO.getBarcode());
return Resp.scanFail("操作失败","操作失败");
}
if (packageInfo.size() == 1){
// DistributionRetentionScanVo distributionRetentionScanVo = new DistributionRetentionScanVo();
//此时才是满足条件的包件,能够进行滞留
//通过配送任务和包件确定预约信息
DistributionParcelListEntity parcelListEntity = packageInfo.get(0);
DistributionRetentionScanVo retentionPackage = baseMapper.selectRetentionPackage(parcelListEntity.getOrderPackageCode(), distrilbutionloadingscanDTO.getDeliveryId());
// distributionRetentionScanVo.setConditions(1);
// distributionRetentionScanVo.setOrderCode(parcelListEntity.getOrderPackageCode());
// distributionRetentionScanVo.setOrderId(parcelListEntity.getStockArticleId());
// distributionRetentionScanVo.setOrderPackageId(parcelListEntity.getId());
// distributionRetentionScanVo.setOrderPackageCode(parcelListEntity.getOrderPackageCode());
// distributionRetentionScanVo.setReservationCode(reservationEntity.getReservationCode());
// distributionRetentionScanVo.setReservationId(reservationEntity.getId());
// distributionRetentionScanVo.setRetentionQuantity(parcelListEntity.getQuantity());
// retentionScanVos.add(distributionRetentionScanVo);
}
//
} else {
List<DisStockListDetailEntity> detailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
if (Func.isNotEmpty(detailEntities)){
List<DisStockListDetailEntity> stockListDetailEntities = detailEntities.stream().filter(i -> Func.isNotEmpty(i.getStockPackageCode()) && Func.equals(i.getStockPackageCode(), distrilbutionloadingscanDTO.getDeliveryId())).collect(Collectors.toList());
if (stockListDetailEntities.size()> 1){
log.error("################库存品条码重复:{}",distrilbutionloadingscanDTO.getBarcode());
return Resp.scanFail("操作失败","操作失败");
}
if (stockListDetailEntities.size() == 1){
// DistributionRetentionScanVo distributionRetentionScanVo = new DistributionRetentionScanVo();
//此时才是满足条件的包件,能够进行滞留
//通过配送任务和包件确定预约信息
DisStockListDetailEntity disStockListDetailEntity = stockListDetailEntities.get(0);
DistributionRetentionScanVo inventoryPackage = baseMapper.selectRetentionInventoryPackage(disStockListDetailEntity.getStockPackageCode(), distrilbutionloadingscanDTO.getDeliveryId());
retentionScanVos.add(inventoryPackage);
}
}else {
log.error("################查询包件和库存品为空:{}",distrilbutionloadingscanDTO.getDeliveryId());
return Resp.scanFail("操作失败","不属于该配送任务!!!");
}
}
List<DistributionRetentionScanVo> distributionRetentionScanVos = baseMapper.selectRetentionZeroPackage(distrilbutionloadingscanDTO.getDeliveryId(),distrilbutionloadingscanDTO.getBarcode());
if (Func.isNotEmpty(distributionRetentionScanVos)){
retentionScanVos.addAll(distributionRetentionScanVos);
}
break;
case 2:
//托盘
break;
default:
log.info("################无满足滞留扫描类型");
break;
}
// warehouseRetentionScanClient.saveRetentionScan();
if (Func.isEmpty(retentionScanVos)){
return Resp.scanFail("操作失败","无该信息!!!");
}
return R.data(retentionScanVos);
}
@Override
public R getZeroPackageInfo(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = baseMapper.selectReservationStockByDeliveryId(distrilbutionloadingscanDTO.getDeliveryId());
if (Func.isEmpty(reservationStockarticleEntityList)){
log.error("#############配送任务查询订单错误,deliveryId:{}",distrilbutionloadingscanDTO.getDeliveryId());
return null;
}
List<Long> orderIds = reservationStockarticleEntityList.stream().filter(rs -> Func.isNotEmpty(rs.getIsZero()) && rs.getIsZero().equals(IsOrNoConstant.yes.getValue())).map(DistributionReservationStockarticleEntity::getStockArticleId).collect(Collectors.toList());
if (Func.isEmpty(orderIds)){
log.error("####################配送任务下无零担信息:{}");
return Resp.scanFail("查询错误","该任务无零担订单");
}
List<DistributionParcelNumberVO> parcelNumberVOS = new ArrayList<>();
orderIds.forEach(o->{
List<DistributionParcelNumberVO> parcelNumberVOList = baseMapper.selectDeliveryZeroOrderDetail(o, distrilbutionloadingscanDTO.getDeliveryId());
if (Func.isNotEmpty(parcelNumberVOList)){
parcelNumberVOS.addAll(parcelNumberVOList);
}
});
if (Func.isEmpty(parcelNumberVOS)){
return Resp.scanFail("查询失败","该配送任务无该零担订单");
}
return R.data(parcelNumberVOS);
}
@Override
public R getInventoryInfo(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
List<DisStockListDetailEntity> detailEntities = baseMapper.selectInventoryListByDeliveryListId(distrilbutionloadingscanDTO.getDeliveryId());
if (Func.isEmpty(detailEntities)){
log.error("######################查询配送任务零担信息错误,deliveryId:{},",distrilbutionloadingscanDTO.getDeliveryId());
return null;
}
List<DisStockListDetailEntity> stockListDetailEntities = detailEntities.stream().filter(d -> Func.isNotEmpty(d.getStockPackageCode())).filter(d -> d.getStockPackageCode().equals(distrilbutionloadingscanDTO.getBarcode())).collect(Collectors.toList());
List<DisStockListDetailVO> disStockListDetailVOS = DistributionDisStockListWrapper.build().listVO(stockListDetailEntities);
List<Long> inventoryIds = disStockListDetailVOS.stream().map(DisStockListDetailVO::getStockListId).distinct().collect(Collectors.toList());
DistributionStockListEntity distributionStockListEntity = distributionStockListService.listByIds(inventoryIds).get(0);
disStockListDetailVOS.stream().forEach(d->{d.setMarketName(distributionStockListEntity.getMarketName());d.setCargoNumber(distributionStockListEntity.getCargoNumber());});
if (Func.isEmpty(stockListDetailEntities)){
return Resp.scanFail("查询失败","不属于该配送任务");
}
return R.data(stockListDetailEntities);
}
@Override
public List<DistributionDeliverySelfVO> getDriverInfo(Long deliveryId) {
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(deliveryId);
if (Func.isEmpty(distributionDeliveryListEntity)) {
log.error("############################# 配送任务查询为空,deliveryId为:{}", distributionDeliveryListEntity);
}
//零担订单进行装车
//这里需要进行判定是进行编辑还是进行的装车
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfEntity();
if (distributionDeliveryListEntity.getKind().equals("1")) {
distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectById(deliveryId);
} else {
DistributionDeliveryTripartiteEntity distributionDeliveryTripartiteEntity = distributionDeliveryTripartiteMapper.selectTripartiteInfo(deliveryId);
BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity);
}
return null;
}
public Map<String, String> getDriverCar(String kind, Long deliveryListEntityId) {
Map<String, String> map = new HashMap<>();

59
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -35,6 +36,9 @@ import com.logpm.distribution.mapper.DistributionParcelListMapper;
import com.logpm.distribution.mapper.DistributionStockArticleMapper;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.*;
import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity;
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity;
import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient;
import com.logpm.warehouse.feign.IWarehouseUpdownGoodsClient;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.DictBizConstant;
@ -67,6 +71,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
private final IBasicdataWarehouseClient basicdataWarehouseClient;
private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient;
private final IWarehouseTrayGoodsClient warehouseTrayGoodsClient;
private final IDistributionParcelNumberService distributionParcelNumberService;
@ -320,10 +325,11 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
DistributionParcelListZeroVO parcelListVO = new DistributionParcelListZeroVO();
BeanUtils.copyProperties(i,parcelListVO);
parcelListVO.setLibraryQuantity(parcelNumber.getHandQuantity());
parcelListVO.setDeliveryQuantity(parcelNumber.getDeliveryQuantity());
if(ObjectUtils.isNotNull(one)){
parcelListVO.setDeliveryQuantity(one.getQuantity());
parcelListVO.setReservationQuantity(one.getQuantity());
}else{
parcelListVO.setDeliveryQuantity(0);
parcelListVO.setReservationQuantity(0);
}
list.add(parcelListVO);
});
@ -337,21 +343,26 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
*/
@Override
public int getZeroUpdateMaterial(Map<String, Object> distributionParcelList) {
Object o = distributionParcelList.get("stock_article_id"); //订单ID
Object o = distributionParcelList.get("stockArticleId"); //订单ID
Object parcelListZeroVO = distributionParcelList.get("distributionParcelListZeroVO");
if(ObjectUtils.isNull(parcelListZeroVO)){
throw new ServiceException("修改参数为空!!!");
}
for (DistributionParcelListZeroVO parcelZeroVO : (List<DistributionParcelListZeroVO>) parcelListZeroVO) {
if(parcelZeroVO.getTiQuantity().equals(0) || parcelZeroVO.getTiQuantity() > parcelZeroVO.getDeliveryQuantity()){
continue;
}
//修改
distributionParcelNumberService.update(Wrappers.<DistributionParcelNumberEntity>update()
.eq("parcel_list_id",parcelZeroVO.getId())
.set("hand_quantity", parcelZeroVO.getTiQuantity())
);
}
List<DistributionParcelListZeroVO> list = (List<DistributionParcelListZeroVO>) parcelListZeroVO;
String jsonString = JSON.toJSONString(list);
list =JSON.parseArray(jsonString,DistributionParcelListZeroVO.class);
list.stream().forEach(i -> {
DistributionParcelListZeroVO parcelZeroVO = JSONObject.parseObject(JSONObject.toJSONString(i), DistributionParcelListZeroVO.class);
if(!parcelZeroVO.getTiQuantity().equals(0) || parcelZeroVO.getTiQuantity() <= parcelZeroVO.getDeliveryQuantity()){
//修改
boolean update = distributionParcelNumberService.update(Wrappers.<DistributionParcelNumberEntity>update()
.eq("parcel_list_id", parcelZeroVO.getId())
.set("hand_quantity", parcelZeroVO.getTiQuantity())
);
}
});
return 1;
}
@ -527,6 +538,28 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
return distributionParcelListEntityIPage;
}
/**
* 查询包件数据
* @param parcelListVO
* @return
*/
@Override
public List<DistributionParcelListEntity> getParcelListInfo(DistributionParcelListVO parcelListVO) {
// List<DistributionParcelListEntity> list = new ArrayList<>();
parcelListVO.setGenre("1");
parcelListVO.setIsZero("0");
List<DistributionParcelListEntity> parcelListInfobao = baseMapper.getParcelListInfo(parcelListVO); //包件
// list.addAll(parcelListInfobao);
// parcelListVO.setGenre("2");
// parcelListVO.setIsZero("0");
// List<DistributionParcelListEntity> parcelListInfoku = baseMapper.getParcelListInfo(parcelListVO); //库从
// list.addAll(parcelListInfoku);
// parcelListVO.setGenre(null);
// parcelListVO.setIsZero("1");
// List<DistributionParcelListEntity> parcelListInfoling = baseMapper.getParcelListInfo(parcelListVO); //零担
// list.addAll(parcelListInfoling);
return parcelListInfobao;
}
/**
* @param distributionParcelList 包件信息

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

@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
@ -35,6 +36,7 @@ import com.logpm.oldproject.entity.WayBillEntity;
import com.logpm.oldproject.feign.IWayBillClient;
import com.logpm.warehouse.feign.IWarehouseWaybillClient;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.Inventory.*;
import org.springblade.common.constant.common.IsOrNoConstant;
@ -48,14 +50,17 @@ import org.springblade.common.constant.stockup.StockAssignStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeConstant;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.redis.cache.BladeRedis;
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.constant.BladeConstant;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.cache.DictBizCache;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
@ -196,14 +201,75 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
return page.setRecords(baseMapper.selectDistrbutionReservationPage(page, distrbutionReservation));
}
/**
* 预约导出
* @param distrbutionReservation
* @return
*/
@Override
public List<DistributionReservationExcel> exportDistrbutionReservation(Wrapper<DistributionReservationEntity> queryWrapper) {
List<DistributionReservationExcel> distrbutionReservationList = baseMapper.exportDistrbutionReservation(queryWrapper);
//distrbutionReservationList.forEach(distrbutionReservation -> {
// distrbutionReservation.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistrbutionReservation.getType()));
//});
return distrbutionReservationList;
public List<DistributionReservationExcel> exportDistrbutionReservation(Map<String, Object> distrbutionReservation) {
Object o = distrbutionReservation.get("ids");
if(ObjectUtils.isNotNull(o)){
distrbutionReservation.remove("ids");
}
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if(ObjectUtils.isNull()){
throw new ServiceException("请选择仓库!");
}
QueryWrapper<DistributionReservationEntity> queryWrapper = Condition.getQueryWrapper(distrbutionReservation, DistributionReservationEntity.class);
queryWrapper.lambda().eq(DistributionReservationEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
if(ObjectUtils.isNotNull(o)){
queryWrapper.in("id",String.valueOf(o).split(","));
}
queryWrapper.eq("warehouse_id",myCurrentWarehouse.getId());
// List<DistributionReservationExcel> distrbutionReservationList = baseMapper.exportDistrbutionReservation(queryWrapper);
List<DistributionReservationVO> distrbutionReservationList = baseMapper.exportDistrbutionReservation(queryWrapper);
List<DistributionReservationExcel> excelList = new ArrayList<>();
distrbutionReservationList.forEach( dis -> {
// distrbutionReservation.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistrbutionReservation.getType()));
DistributionReservationExcel reservationExcel = new DistributionReservationExcel();
reservationExcel.setReservationCode(dis.getReservationCode());
reservationExcel.setOrderCode("订单自编号");
reservationExcel.setServiceNumber(dis.getServiceNumber());
reservationExcel.setWarehouseName(dis.getWarehouseName());
reservationExcel.setMallName(dis.getMallName());
reservationExcel.setStoreName(dis.getStoreName());
reservationExcel.setConsignee(dis.getConsignee());
reservationExcel.setDeliveryAddress(dis.getDeliveryAddress());
reservationExcel.setDeliveryPhone(dis.getDeliveryPhone());
reservationExcel.setReservationData(dis.getReservationDate());
String value3 = DictBizCache.getValue(DictBizConstant.PERIOD_OF_TIME, dis.getPeriodOfTime());
reservationExcel.setPeriodTimeName(value3); //时段
if(ObjectUtils.isNotNull(dis.getTypeService())){
String[] split = dis.getServeType().split(",");
StringBuffer sb = new StringBuffer();
for (String s : split) {
String value = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, s);
sb.append(value);
}
reservationExcel.setServeTypeName(String.valueOf(sb));
}
if(ObjectUtils.isNotNull(dis.getDeliveryType())){
String[] split = dis.getDeliveryType().split(",");
StringBuffer sb = new StringBuffer();
for (String s : split) {
String value = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, s);
sb.append(value);
}
reservationExcel.setDeliveryTypeName(String.valueOf(sb));
}
reservationExcel.setReservationNumber(dis.getReservationNum());
reservationExcel.setStockListNumber(dis.getReservationStockListNum());
reservationExcel.setCollectFee(ObjectUtils.isNotNull(dis.getCollectFee()) ? dis.getCollectFee() : BigDecimal.valueOf(0));
reservationExcel.setOtherFee(dis.getOtherFee());
reservationExcel.setReplaceFee(ObjectUtils.isNotNull(dis.getReplaceFee()) ? dis.getReplaceFee() : BigDecimal.valueOf(0));
String value1 = DictBizCache.getValue(DictBizConstant.RESERVATION_STATUS, dis.getReservationStatus());
reservationExcel.setResvervationStatusName(value1);
String value2 = DictBizCache.getValue(DictBizConstant.STOCKUP_STATUS, dis.getStockupStatus());
reservationExcel.setStockupStatusName(value2);
excelList.add(reservationExcel);
});
return excelList;
}
@Override
@ -2709,6 +2775,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
return R.fail("订单已预约!!!");
}
stockArticleList.forEach(s -> {
if (Func.isNotEmpty(s.getAllocation())){
s.setAllocation(null);
}
DistributionStockArticleDTO stockArticleDTO = Func.copy(s, DistributionStockArticleDTO.class);
if (s.getIsZero().equals("0")) {
WayBillEntity wayBillEntity = wayBillClient.getByWaybillNo(s.getWaybillNumber());
@ -2786,6 +2855,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
});
s.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
s.setAvailableQuantity(0);
if (Func.isNotEmpty(s.getAllocation())){
s.setAllocation(null);
}
distributionStockArticleService.updateById(s);
} else {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save