Browse Source

Merge branch 'dev' into pre-production

newStockUp
zhenghaoyu 1 year ago
parent
commit
337515db6f
  1. 3
      blade-biz-common/src/main/java/org/springblade/common/constant/DictBizConstant.java
  2. 47
      blade-biz-common/src/main/java/org/springblade/common/constant/retention/RetentionTypeConstant.java
  3. 55
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionParcelListEntity.java
  4. 10
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockListEntity.java
  5. 7
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionStockupEntity.java
  6. 16
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionDeliveryListClient.java
  7. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  8. 8
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockArticleClient.java
  9. 15
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java
  10. 13
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java
  11. 12
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListZeroVO.java
  12. 84
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionRetentionScanVo.java
  13. 20
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockListVO.java
  14. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupOrderListVO.java
  15. 1
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupVO.java
  16. 6
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingEntity.java
  17. 56
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingLineEntity.java
  18. 3
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingPackageEntity.java
  19. 9
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineBillladingWaybillEntity.java
  20. 11
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineBillladingLineVO.java
  21. 14
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/QuestDetailEntity.java
  22. 12
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionRecordEntity.java
  23. 12
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseRetentionScanEntity.java
  24. 11
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseRetentionScanClient.java
  25. 7
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/WarehouseRetentionRecordVO.java
  26. 7
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java
  27. 35
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java
  28. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  29. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  30. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java
  31. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java
  32. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java
  33. 71
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionRetentionScanDTO.java
  34. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java
  35. 90
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java
  36. 145
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionReservationExcel.java
  37. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionDeliveryListClient.java
  38. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  39. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java
  40. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java
  41. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  42. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  43. 73
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  44. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.java
  45. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryTripartiteMapper.xml
  46. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  47. 74
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  48. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  49. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  50. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  51. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java
  52. 22
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  53. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  54. 44
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  55. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionAsyncService.java
  56. 31
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  57. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  58. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  59. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  60. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
  61. 46
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  62. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  63. 201
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  64. 59
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  65. 80
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  66. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  67. 29
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  68. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java
  69. 94
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  70. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/wrapper/DistributionStockArticleWrapper.java
  71. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.java
  72. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml
  73. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml
  74. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.xml
  75. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java
  76. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java
  77. 93
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseRetentionApiController.java
  78. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/QuestDetailDTO.java
  79. 23
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java
  80. 14
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDistributionListDetailDTO.java
  81. 11
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionParcelListDTO.java
  82. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionZeroParcelDTO.java
  83. 6
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/TaskSearchDTO.java
  84. 6
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java
  85. 44
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java
  86. 187
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml
  87. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.java
  88. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml
  89. 23
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java
  90. 14
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionRecordService.java
  91. 755
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java
  92. 125
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java
  93. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionRecordWrapper.java
  94. 55
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionScanWrapper.java

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

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
*/

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

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

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

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

@ -102,11 +102,5 @@ public class TrunklineBillladingEntity extends TenantEntity {
/** 结算人名称 */
@ApiModelProperty(name = "结算人名称",notes = "")
private String settlementName ;
/** 备注 */
@ApiModelProperty(name = "备注",notes = "")
private String remark ;
/** 创建用户名称 */
@ApiModelProperty(name = "创建用户名称",notes = "")
private String createUserName ;
}

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

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

@ -37,5 +37,8 @@ public class TrunklineBillladingPackageEntity extends TenantEntity {
/** 包件码 */
@ApiModelProperty(name = "包件码",notes = "")
private String orderPackageCode ;
/** 提货单id */
@ApiModelProperty(name = "提货单id",notes = "")
private Long billladingId ;
}

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

@ -7,17 +7,12 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.math.BigDecimal;
@Data
@TableName("logpm_trunkline_billlading_waybill")
@ApiModel(value = "TrunklineBillladingWaybill对象", description = "提货运单关联表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineBillladingWaybillEntity extends TenantEntity {
/** 预留1 */
@ApiModelProperty(name = "预留1",notes = "")
private String reserve1 ;
/** 预留2 */
@ApiModelProperty(name = "预留2",notes = "")
private String reserve2 ;
@ -47,10 +42,10 @@ public class TrunklineBillladingWaybillEntity extends TenantEntity {
private Integer realNum ;
/** 提货重量 */
@ApiModelProperty(name = "提货重量",notes = "")
private BigDecimal realWeight ;
private Double realWeight ;
/** 提货体积 */
@ApiModelProperty(name = "提货体积",notes = "")
private BigDecimal realVolume ;
private Double realVolume ;
}

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 {
}

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

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

@ -38,7 +38,7 @@ import java.io.Serializable;
@Data
@TableName("logpm_warehouse_retention_scan")
@ApiModel(value = "WarehouseRetentionRecord对象", description = "滞留扫描记录")
public class WarehouseRetentionScanEntity extends TenantEntity implements Serializable {
public class WarehouseRetentionScanEntity extends TenantEntity {
private static final long serialVersionUID = 1L;
/**
@ -158,7 +158,7 @@ public class WarehouseRetentionScanEntity extends TenantEntity implements Serial
* 滞留扫描操作人Id
*/
@ApiModelProperty(value = "滞留扫描操作人Id")
private String retentionScanUserId;
private Long retentionScanUserId;
/**
* 滞留操作备注
*/
@ -178,6 +178,12 @@ public class WarehouseRetentionScanEntity extends TenantEntity implements Serial
* 配送任务ID
*/
@ApiModelProperty(value = "配送任务ID")
private Long deliveryListId;
private Long deliveryId;
/**
* 配送任务ID
*/
@ApiModelProperty(value = "配送任务ID")
private Long refId;
}

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

@ -19,8 +19,11 @@ 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;
/**
@ -47,4 +50,12 @@ public interface IWarehouseRetentionScanClient {
@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;
}

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{

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

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

@ -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/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

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

4
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">

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

@ -931,6 +931,6 @@
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
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);
// /**
// * 查询库存品详情

46
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) {

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

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

@ -42,7 +42,9 @@ 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;
@ -52,6 +54,7 @@ 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;
@ -79,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;
@ -149,6 +153,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
private final IDistributionReservationZeroPackageService distributionReservationZeroPackageService;
private final IDistributionParcelNumberService distributionParcelNumberService;
private final IWarehouseTrayGoodsClient warehouseTrayGoodsClient;
private final IWarehouseRetentionScanClient warehouseRetentionScanClient;
// private final DistributionStockMapper distributionStockMapper;
// private final BladeRedis redis;
@ -174,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
@ -1245,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()));
@ -1269,7 +1319,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
case "0":
//订制品
v.forEach(ord -> {
List<DistributionParcelListEntity> parcelListEntities = distributionReservationMapper.selectPackageByReservationAndStockArticle(distrilbutionloadingscanDTO.getReservationId(), ord.getStockArticleId());
for (DistributionParcelListEntity parcelListEntity : parcelListEntities) {
DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity();
@ -5108,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 包件信息

80
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

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

@ -2216,7 +2216,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (ObjectUtils.isNotNull(distributionSignfor.getMap())) {
List<DistributionSignPrintEntity> distributionSignPrintList = new ArrayList<>();
distributionSignfor.getMap().forEach((k, v) -> {
List<DistributionSignPrintEntity> list = iDistributionSignPrintService.list(Wrappers.<DistributionSignPrintEntity>query().lambda()
.eq(DistributionSignPrintEntity::getReservationId, distributionSignfor.getReservationId())
.eq(DistributionSignPrintEntity::getType, k)
@ -2486,5 +2485,16 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanSuccess("签收成功", str);
}
@Override
@Transactional
public R updateSign(DistributionSignforDTO 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));
this.updatePicture(distributionSignfor);
this.updateById(distributionSignfor);
return R.status(true);
}
}

29
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -269,8 +269,13 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
parcelListEntity.setMaterialName(vv.get(0).getName());
parcelListEntity.setMaterialCode(vv.get(0).getEncoded());
parcelListEntity.setMaterialUnit(vv.get(0).getUnit());
//查询在库订单信息
DistributionStockArticleEntity distributionStockArticleEntity = baseMapper.selectById(parcelListEntity.getStockArticleId());
if (ObjectUtil.isEmpty(distributionStockArticleEntity.getMallId()) ) {
throw new ServiceException("订单的客户数据异常,无法转换!!");
}
// 添加库存品信息
addStockList(parcelListEntity, 1);
addStockList(distributionStockArticleEntity,parcelListEntity, 1);
});
}
DistributionParcelListEntity parcelList = new DistributionParcelListEntity();
@ -282,8 +287,13 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity();
BeanUtil.copyProperties(v.get(0),parcelListEntity);
parcelListEntity.setQuantity(sum);
//查询在库订单信息
DistributionStockArticleEntity distributionStockArticleEntity = baseMapper.selectById(parcelListEntity.getStockArticleId());
if (ObjectUtil.isEmpty(distributionStockArticleEntity.getMallId()) ) {
throw new ServiceException("订单的客户数据异常,无法转换!!");
}
// 添加库存品信息
addStockList(parcelListEntity, 1);
addStockList(distributionStockArticleEntity,parcelListEntity, 1);
});
@ -413,7 +423,12 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
} else {
//不存在
addStockList(one, 2);
//查询在库订单信息
DistributionStockArticleEntity distributionStockArticleEntity = baseMapper.selectById(one.getStockArticleId());
if (ObjectUtil.isEmpty(distributionStockArticleEntity.getMallId()) ) {
throw new ServiceException("订单的客户数据异常,无法转换!!");
}
addStockList(distributionStockArticleEntity,one, 2);
}
// String s1 = basicTenantCodeClient.shelfCode(AuthUtil.getTenantId(), "7");
@ -442,13 +457,9 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
* @return
*/
@Transactional(rollbackFor = Exception.class)
public DistributionStockArticleEntity addStockList(DistributionParcelListEntity distributionParcelList, Integer qu) {
public DistributionStockArticleEntity addStockList(DistributionStockArticleEntity distributionStockArticleEntity,DistributionParcelListEntity distributionParcelList, Integer qu) {
//查询在库订单信息
DistributionStockArticleEntity distributionStockArticleEntity = baseMapper.selectById(distributionParcelList.getStockArticleId());
if (ObjectUtil.isEmpty(distributionStockArticleEntity.getMallId()) ) {
throw new ServiceException("订单的客户数据异常,无法转换!!");
}
DistributionStockListEntity distributionStockListEntity = new DistributionStockListEntity();
//直接添加
// distributionStockListEntity.setIncomingBatch(distributionStockArticleEntity.get); //入库批次号

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

@ -464,6 +464,16 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
page.setRecords(stockListVOList);
return page;
}
/**
*
* @param distributionStockListEntity
* @return
*/
@Override
public List<DistributionStockListVO> getStockListInfo(DistributionStockListEntity distributionStockListEntity) {
return baseMapper.getStockListInfo(distributionStockListEntity);
}
}
// @Override

94
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -46,7 +46,9 @@ import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.billLading.BillLadingStatusConstant;
import org.springblade.common.constant.order.OrderReservationStatusConstant;
import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.pda.PdaAudioLingoStatus;
import org.springblade.common.constant.stockup.StockAssignStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
@ -299,12 +301,20 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
.in(distrilbutionBillLading.getStockArticleId().contains(","),DistrilbutionBillStockEntity::getStockArticleId, distrilbutionBillLading.getStockArticleId().split(","))
);
if(!list.isEmpty()){
list.stream().forEach( i ->{
for (DistrilbutionBillStockEntity i : list) {
DistributionStockArticleEntity byId = distributionStockArticleService.getById(i.getStockArticleId());
if(byId.getIsZero().equals("0")){
throw new ServiceException("当前订单已创建!");
if(byId.getStockupStatus().equals(OrderReservationStatusConstant.daiyuyue.getValue())){
break;
}
});
List<DistributionParcelListEntity> list1 = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
.eq(DistributionParcelListEntity::getStockArticleId, i.getStockArticleId()));
int sum = list1.stream().filter(ii -> ii.getOrderPackageReservationStatus().equals(OrderPackageReservationStatusConstant.daiyuyue.getValue())).collect(Collectors.toList()).stream().mapToInt(DistributionParcelListEntity::getQuantity).sum();
if(sum == 0){
log.debug("####{}当前订单备货包件为空,无法创建任务!"+byId.getOrderCode());
throw new ServiceException(byId.getOrderCode()+"当前订单备货包件为空,无法创建任务!");
}
}
}
//新增
@ -354,6 +364,10 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
billPackageEntity.setBillType(byId.getIsZero().equals("1") ? "2" : "1");
packageEntityList.add(billPackageEntity);
});
List<Long> collect1 = collect.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList());
distributionAsyncService.updateParcelListReservation(collect1);
//判断是否全部修改
int i = byId.getHandQuantity() - collect.size();
if(i > 0){
@ -362,24 +376,33 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}
}else{
//没有包件 查询包件信息
packageEntityList.addAll(billPackInfo(s,distrilbutionBillLading.getId(),parcelLisList,byId));
List<DistrilbutionBillPackageEntity> packageEntityList1 = billPackInfo(s, distrilbutionBillLading.getId(), parcelLisList, byId);
if(packageEntityList1.isEmpty()){
throw new ServiceException(byId.getOrderCode()+"没有可用包件信息!");
}
packageEntityList.addAll(packageEntityList1);
distributionStockArticle.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
// distributionStockArticle.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
}
}else{
//没有包件 查询包件信息
packageEntityList.addAll(billPackInfo(s,distrilbutionBillLading.getId(),parcelLisList,byId));
List<DistrilbutionBillPackageEntity> packageEntityList1 = billPackInfo(s,distrilbutionBillLading.getId(),parcelLisList,byId);
if(packageEntityList1.isEmpty()){
throw new ServiceException(byId.getOrderCode()+"没有可用包件信息!");
}
packageEntityList.addAll(packageEntityList1);
distributionStockArticle.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
// distributionStockArticle.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
}
// int i1 = byId.getHandQuantity() + byId.getSigninQuantity(); //总数
if(byId.getCompleteSet().equals("1")){
//部分
distributionStockArticle.setReservationStatus(OrderReservationStatusConstant.bufenyuyue.getValue());
}else{
if(byId.getCompleteSet().equals("2")){
//全部
distributionStockArticle.setReservationStatus(OrderReservationStatusConstant.yiyueyue.getValue());
}else{
//部分
distributionStockArticle.setReservationStatus(OrderReservationStatusConstant.bufenyuyue.getValue());
}
//判断是否改为已预约
@ -462,31 +485,38 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
*/
public List<DistrilbutionBillPackageEntity> billPackInfo(String stockArticleId,Long billId,List<DistributionParcelListDTO> parcelLisList,DistributionStockArticleEntity byId){
List<DistrilbutionBillPackageEntity> packageEntityList = new ArrayList<>();
//没有包件 查询包件信息
//没有包件 查询待预约包件信息
List<DistributionParcelListEntity> list1 = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
.eq(DistributionParcelListEntity::getStockArticleId, stockArticleId)
.eq(DistributionParcelListEntity::getConditions, 1)
.eq(DistributionParcelListEntity::getOrderPackageReservationStatus,OrderPackageReservationStatusConstant.daiyuyue.getValue())
);
list1.stream().forEach(ss ->{
DistrilbutionBillPackageEntity billPackageEntity = new DistrilbutionBillPackageEntity();
billPackageEntity.setBillLadingId(billId);
billPackageEntity.setPacketBarCode(ss.getOrderPackageCode());
billPackageEntity.setPacketBarStatus(1);
billPackageEntity.setParceListId(ss.getId());
billPackageEntity.setStockArticleId(ss.getStockArticleId());
if(byId.getIsZero().equals("1")){
//零担
Optional<DistributionParcelListDTO> first = parcelLisList.stream().filter(i -> i.getStockArticleId().equals(ss.getStockArticleId()) && i.getId().equals(ss.getId())).findFirst();
billPackageEntity.setBillType("2");
billPackageEntity.setPacketNumber(first.get().getQuantity());
}else{
billPackageEntity.setBillType("1");
billPackageEntity.setPacketNumber(ss.getQuantity());
}
if(!list1.isEmpty()){
list1.stream().forEach(ss ->{
DistrilbutionBillPackageEntity billPackageEntity = new DistrilbutionBillPackageEntity();
billPackageEntity.setBillLadingId(billId);
billPackageEntity.setPacketBarCode(ss.getOrderPackageCode());
billPackageEntity.setPacketBarStatus(1);
billPackageEntity.setParceListId(ss.getId());
billPackageEntity.setStockArticleId(ss.getStockArticleId());
if(byId.getIsZero().equals("1")){
//零担
Optional<DistributionParcelListDTO> first = parcelLisList.stream().filter(i -> i.getStockArticleId().equals(ss.getStockArticleId()) && i.getId().equals(ss.getId())).findFirst();
billPackageEntity.setBillType("2");
billPackageEntity.setPacketNumber(first.get().getQuantity());
}else{
billPackageEntity.setBillType("1");
billPackageEntity.setPacketNumber(ss.getQuantity());
}
packageEntityList.add(billPackageEntity);
});
packageEntityList.add(billPackageEntity);
});
//修改包件预约状态
List<Long> collect = list1.stream().map(DistributionParcelListEntity::getId).collect(Collectors.toList());
distributionAsyncService.updateParcelListReservation(collect);
}
return packageEntityList;
}

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

@ -78,7 +78,7 @@ public class DistributionStockArticleWrapper extends BaseEntityWrapper<Distribut
distributionStockupVO.setGroundingStatusName(DictBizCache.getValue(DictBizConstant.BASIC_GROUNDING, distributionStockupVO.getGroundingStatus()));
distributionStockupVO.setFreezeStatusName(DictBizCache.getValue(DictBizConstant.FREEZE_STATUS, distributionStockupVO.getFreezeStatus()));
distributionStockupVO.setReservationStatusName(DictBizCache.getValue(DictBizConstant.ORDER_RESERVATION_STATUS, distributionStockupVO.getReservationStatus()));
distributionStockupVO.setStockupStatusName(DictBizCache.getValue(DictBizConstant.STOCKUP_STATUS, distributionStockupVO.getStockupStatus()));
distributionStockupVO.setStockupStatusName(DictBizCache.getValue(DictBizConstant.ORDER_STOCKUP_STATUS, distributionStockupVO.getStockupStatus()));
if(ObjectUtils.isNotNull(distributionStockupVO.getCreateUser())){
distributionStockupVO.setCreateUserName(userCliient.userInfoById(distributionStockupVO.getCreateUser()).getData().getName());
}

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

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

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingLineMapper.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineBillladingLineMapper">
</mapper>

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingPackageMapper.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineBillladingPackageMapper">
</mapper>

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineDetailProductMapper.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineDetailProductMapper">
</mapper>

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineBillladingLineService.java

@ -0,0 +1,7 @@
package com.logpm.trunkline.service;
import com.logpm.trunkline.entity.TrunklineBillladingLineEntity;
import org.springblade.core.mp.base.BaseService;
public interface ITrunklineBillladingLineService extends BaseService<TrunklineBillladingLineEntity> {
}

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingLineServiceImpl.java

@ -0,0 +1,15 @@
package com.logpm.trunkline.service.impl;
import com.logpm.trunkline.entity.TrunklineBillladingLineEntity;
import com.logpm.trunkline.mapper.TrunklineBillladingLineMapper;
import com.logpm.trunkline.service.ITrunklineBillladingLineService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
@Slf4j
@AllArgsConstructor
@Service
public class TrunklineBillladingLineServiceImpl extends BaseServiceImpl<TrunklineBillladingLineMapper, TrunklineBillladingLineEntity> implements ITrunklineBillladingLineService {
}

93
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/api/WarehouseRetentionApiController.java

@ -1,8 +1,10 @@
package com.logpm.warehouse.api;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.warehouse.dto.RetentionDTO;
import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity;
import com.logpm.warehouse.service.IWarehouseRetentionRecordService;
import com.logpm.warehouse.vo.WarehouseRetentionRecordVO;
import io.swagger.annotations.Api;
@ -11,6 +13,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.web.bind.annotation.*;
@ -26,37 +29,65 @@ public class WarehouseRetentionApiController {
private final IWarehouseRetentionRecordService warehouseRetentionRecordService;
// @ResponseBody
// @PostMapping("/retentionPackageList")
@ResponseBody
@PostMapping("/retentionPackageList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "滞留包件列表", notes = "传入trayTypeDTO")
public R<IPage<WarehouseRetentionRecordVO>> retentionPackageList(@RequestBody RetentionDTO retentionDTO) {
String method = "###########retentionPackageList: ";
log.info(method + "滞留包件列表 retentionDTO={}", retentionDTO);
Integer pageNum = retentionDTO.getPageNum();
Integer pageSize = retentionDTO.getPageSize();
if (Objects.isNull(pageNum)) {
retentionDTO.setPageNum(1);
}
if (Objects.isNull(pageSize)) {
retentionDTO.setPageSize(10);
}
try {
//查询订制品打托列表
IPage<WarehouseRetentionRecordVO> pages = warehouseRetentionRecordService.retentionPackageList(retentionDTO);
return R.data(pages);
} catch (CustomerException e) {
log.warn(e.message);
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error(method + "系统异常,联系管理员", e);
return R.fail(500, "系统异常,联系管理员");
}
}
// @GetMapping
@GetMapping("/initRetentionList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "初始化滞留车次信息", notes = "传入trayTypeDTO")
public R<WarehouseRetentionRecordVO> initRetentionList(@RequestParam Long deliveryId) {
WarehouseRetentionRecordVO warehouseRetentionRecordVO = warehouseRetentionRecordService.initRetentionList(deliveryId);
return R.data(warehouseRetentionRecordVO);
}
@PostMapping("/saveRetentionList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "保存滞留扫描列表", notes = "传入trayTypeDTO")
public R saveRetentionList(@RequestBody RetentionDTO retentionDTO) {
R r = warehouseRetentionRecordService.saveRetentionList(retentionDTO);
return r;
}
// @GetMapping("/initRetentionList")
// @ApiOperationSupport(order = 1)
// @ApiOperation(value = "滞留包件列表", notes = "传入trayTypeDTO")
// public R<IPage<WarehouseRetentionRecordVO>> retentionPackageList(@RequestBody RetentionDTO retentionDTO) {
// String method = "###########retentionPackageList: ";
// log.info(method+"滞留包件列表 retentionDTO={}",retentionDTO);
// Integer pageNum = retentionDTO.getPageNum();
// Integer pageSize = retentionDTO.getPageSize();
//
// if(Objects.isNull(pageNum)){
// retentionDTO.setPageNum(1);
// }
// if(Objects.isNull(pageSize)){
// retentionDTO.setPageSize(10);
// }
//
// try{
// //查询订制品打托列表
// IPage<WarehouseRetentionRecordVO> pages = warehouseRetentionRecordService.retentionPackageList(retentionDTO);
// return R.data(pages);
// }catch (CustomerException e){
// log.warn(e.message);
// return R.fail(e.code,e.message);
// }catch (Exception e){
// log.error(method+"系统异常,联系管理员",e);
// return R.fail(500,"系统异常,联系管理员");
// }
// @ApiOperation(value = "初始化滞留车次信息", notes = "传入trayTypeDTO")
// public R<WarehouseRetentionRecordVO> initRetentionList(@RequestParam Long deliveryId) {
// WarehouseRetentionRecordVO warehouseRetentionRecordVO = warehouseRetentionRecordService.initRetentionList(deliveryId);
// return R.data(warehouseRetentionRecordVO);
// }
//
//
// @ResponseBody
@ -85,8 +116,6 @@ public class WarehouseRetentionApiController {
// }
// @ResponseBody
// @PostMapping("/retentionScanPackage")
// @ApiOperationSupport(order = 1)
@ -113,6 +142,4 @@ public class WarehouseRetentionApiController {
// }
}

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/QuestDetailDTO.java

@ -44,7 +44,7 @@ public class QuestDetailDTO extends QuestDetailEntity {
private Integer noReceivedNum;//未入库数量
private Long allocationId;//上架后的库位id
private String allocationId;//上架后的库位id
}

23
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDTO.java

@ -1,8 +1,13 @@
package com.logpm.warehouse.dto;
import com.logpm.distribution.entity.DisStockListDetailEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.vo.DistributionParcelListVO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class RetentionDTO implements Serializable {
@ -14,4 +19,22 @@ public class RetentionDTO implements Serializable {
private String endDate;
private String orderPackageCode;
/**
* 配送任务ID
*/
private Long deliveryId;
/**
* 配送任务ID
*/
private String remarks;
private List<RetentionParcelListDTO> parcelListEntityList;
private List<RetentionZeroParcelDTO> parcelNumberEntityList;
private List<RetentionDistributionListDetailDTO> detailEntityList;
}

14
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionDistributionListDetailDTO.java

@ -0,0 +1,14 @@
package com.logpm.warehouse.dto;
import com.logpm.distribution.entity.DisStockListDetailEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class RetentionDistributionListDetailDTO extends DisStockListDetailEntity {
private String MaterialName;
private String materialNumber;
}

11
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionParcelListDTO.java

@ -0,0 +1,11 @@
package com.logpm.warehouse.dto;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class RetentionParcelListDTO extends DistributionParcelListEntity {
}

10
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/RetentionZeroParcelDTO.java

@ -0,0 +1,10 @@
package com.logpm.warehouse.dto;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class RetentionZeroParcelDTO extends DistributionParcelNumberEntity {
}

6
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/TaskSearchDTO.java

@ -41,6 +41,8 @@ public class TaskSearchDTO {
@ApiModelProperty(value = "任务id")
private Long questId;
@ApiModelProperty(value = "任务编号")
private String questNum;
@ApiModelProperty(value = "搜索code")
private String code;
@ -83,9 +85,9 @@ public class TaskSearchDTO {
private String goodsType;
/**
* goodsType 合同号类型
* 任务ID
*/
@ApiModelProperty(value = "合同号类型; 1- 订制品、 2- 零担、3- 库存品")
@ApiModelProperty(value = "任务ID")
private Long taskId;
/**

6
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseRetentionScanClient.java

@ -25,6 +25,7 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity;
import com.logpm.warehouse.service.IWarehouseRetentionRecordService;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
@ -52,4 +53,9 @@ public class WarehouseRetentionScanClient implements IWarehouseRetentionScanClie
return BladePage.of(page);
}
@Override
public R saveRetentionScan(WarehouseRetentionScanEntity warehouseRetentionScanEntity) {
return R.status(warehouseRetentionScanService.save(warehouseRetentionScanEntity));
}
}

44
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.java

@ -17,6 +17,8 @@
package com.logpm.warehouse.mapper;
import com.logpm.warehouse.dto.TaskSearchDTO;
import com.logpm.warehouse.entity.QuestDetailChildEntity;
import com.logpm.warehouse.entity.QuestDetailEntity;
import com.logpm.warehouse.entity.TaskQuestEntity;
import com.logpm.warehouse.entity.WarehouseTrayEntity;
import com.logpm.warehouse.vo.*;
@ -55,7 +57,7 @@ public interface TaskQuestMapper extends BaseMapper<TaskQuestEntity> {
List<TaskQuestApiVO> selectTaskQuestApiPage(IPage<TaskQuestApiVO> page,@Param("param") TaskQuestApiVO taskQuest,@Param("collect") List<Long> collect);
List<TaskallocationVO> selectallocationList(@Param("param") TaskSearchDTO taskSearchDTO);
List<TaskallocationVO> selectallocationList(@Param("questNum")String questNum, @Param("param") TaskSearchDTO taskSearchDTO);
List<TaskContractVO> selectcontractList(IPage<TaskContractVO> page, @Param("param") TaskSearchDTO taskSearchDTO,@Param("collect") List<Long> collect);
@ -84,4 +86,44 @@ public interface TaskQuestMapper extends BaseMapper<TaskQuestEntity> {
List<QuestDetailVO> selectInventoryListByQuestId(IPage<QuestDetailVO> page,@Param("questId") Long id);
List<QuestDetailVO> selectZeroListByQuestId(IPage<QuestDetailVO> page,@Param("questId") Long id);
String selectExitsInfo(@Param("questNum")String questNum);
int createdTable(@Param("questNum")String questNum);
int createdTableChild(@Param("questNum")String s);
int insertQuestDetail(@Param("questNum") String questNum,@Param("list")List<QuestDetailEntity> detailEntityList);
/**
*查询盘点数据list
* @param questNum
* @param questDetail
* @return
*/
List<QuestDetailEntity> selectTaskInfo(@Param("questNum")String questNum,@Param("param") QuestDetailEntity questDetail);
/**
*根据ID查询盘点数据
* @param questNum
* @param questDetail
* @return
*/
QuestDetailEntity selectOneTaskInfo(@Param("questNum")String questNum,@Param("param") QuestDetailEntity questDetail);
/**
*根据查询盘点数据
* @param questNum
* @param questDetail
* @return
*/
List<QuestDetailEntity> selectQuestDetailList(@Param("questNum")String questNum,@Param("param") QuestDetailEntity questDetail);
List<QuestDetailEntity> selectTaskTrayInfo(@Param("questNum")String questNum,@Param("param") QuestDetailEntity questDetail);
List<QuestDetailChildEntity> getQuestDetailInfo(@Param("questNum")String questNum,@Param("param")QuestDetailChildEntity questDetailChildEntity);
Integer updateQuestDetailQuestStatus(@Param("questNum")String questNum,@Param("param") QuestDetailEntity q);
Integer updatePositionCodeList(@Param("questNum") String questNum, @Param("list") List<QuestDetailEntity> ls);
}

187
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/TaskQuestMapper.xml

@ -44,6 +44,191 @@
ORDER BY ltq.create_time desc
</select>
<select id="selectExitsInfo" resultType="string">
SHOW TABLES FROM logpm_platform LIKE #{questNum};
</select>
<update id="createdTableChild" parameterType="string">
CREATE TABLE ${questNum} (
`id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户号',
`create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_user` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`is_deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除',
`status` int(11) NULL DEFAULT NULL COMMENT '状态',
`reserve1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留1',
`reserve2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留2',
`reserve3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留3',
`reserve4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留4',
`reserve5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留5',
`quest_detail_id` bigint(20) NULL DEFAULT NULL COMMENT '盘点明细ID',
`cargo_name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '货物状态;10 在库 20 破损 30丢失 40不可修复 50配送 60未入库',
`quest_num` int(10) NOT NULL DEFAULT 1 COMMENT '盘点数量',
`warehouse_id` bigint(20) NULL DEFAULT NULL COMMENT '仓库id',
PRIMARY KEY (`id`) USING BTREE,
INDEX `quest_detail_id_index`(`quest_detail_id`) USING BTREE COMMENT '盘点明细'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '${questNum}盘点明细子表' ROW_FORMAT = Dynamic;
</update>
<update id="createdTable" parameterType="string">
CREATE TABLE ${questNum} (
`id` bigint(20) NOT NULL COMMENT '主键',
`tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户号',
`create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_user` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`is_deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除',
`status` int(11) NULL DEFAULT NULL COMMENT '状态',
`reserve1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留1',
`reserve2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留2',
`reserve3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留3',
`reserve4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留4',
`reserve5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预留5',
`order_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单号',
`quest_id` bigint(20) NULL DEFAULT NULL COMMENT '任务ID',
`order_id` bigint(20) NULL DEFAULT NULL COMMENT '订单ID',
`quest_type` int(11) NULL DEFAULT NULL COMMENT '盘点方式;1. 随机 2 库位3 订单 4 托盘',
`quest_target` int(11) NULL DEFAULT NULL COMMENT '盘点对象;1.定制品 2零担 3 库存品',
`orde_package_code` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '包条码;对应定制品',
`order_package_id` bigint(20) NULL DEFAULT NULL COMMENT '包条ID;对应定制品',
`category_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '品类名称;对应零担',
`stock_id` bigint(20) NULL DEFAULT NULL COMMENT '库存品ID;对应库存品',
`quest_status` int(10) NOT NULL DEFAULT 0 COMMENT '盘点状态;0 待盘点 1. 已盘 2未盘点 3已排除',
`stock_num` int(10) NOT NULL DEFAULT 1 COMMENT '在库数量',
`warehouse_id` bigint(20) NULL DEFAULT NULL COMMENT '仓库id',
`position_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '完整货位(按库位)',
`tray_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '托盘码(按托盘)',
`tray_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '托盘id(按托盘)',
`allocation_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '货位id(按库位)',
`grounding_allocation_id` bigint(20) NULL DEFAULT NULL COMMENT '上架后的库位ID',
`is_new` int(20) NULL DEFAULT NULL COMMENT '是否是新增数据',
`grounding_position_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上架后的完整库位',
`material_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料编码(库存品)',
`market_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商场名称(库存品)',
`incoming_batch` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次号(库存品)',
`material_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '物料名称(库存品)',
`waybill_number` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '运单号',
PRIMARY KEY (`id`) USING BTREE,
INDEX `quest_id_index`(`quest_id`) USING BTREE COMMENT '任务id',
INDEX `order_id_index`(`order_id`) USING BTREE COMMENT '订单id',
INDEX `tenant_id_index`(`tenant_id`) USING BTREE COMMENT '租户id'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '${questNum}盘点明细' ROW_FORMAT = Dynamic;
</update>
<insert id="insertQuestDetail" parameterType="arraylist">
INSERT INTO ${questNum}(`id`, `tenant_id`, `create_user`, `create_time`, `update_user`, `update_time`, `create_dept`,
`is_deleted`, `status`, `reserve1`, `reserve2`, `reserve3`, `reserve4`, `reserve5`, `order_code`, `quest_id`, `order_id`, `quest_type`, `quest_target`,
`orde_package_code`, `order_package_id`, `category_name`, `stock_id`, `quest_status`, `stock_num`, `warehouse_id`, `position_code`, `tray_code`, `tray_id`,
`allocation_id`, `grounding_allocation_id`, `is_new`, `grounding_position_code`, `material_code`, `market_name`, `incoming_batch`, `material_name`,
`waybill_number`) VALUES
<foreach collection="list" item="item" separator=",">
(#{item.id}, #{item.tenantId}, #{item.createUser}, #{item.createTime}, #{item.updateUser}, #{item.updateTime}, #{item.createDept}, #{item.isDeleted}
, #{item.status}, #{item.reserve1}, #{item.reserve2}, #{item.reserve3}, #{item.reserve4}, #{item.reserve5}, #{item.orderCode}, #{item.questId}, #{item.orderId}
, #{item.questType}, #{item.questTarget}, #{item.ordePackageCode}, #{item.orderPackageId}, #{item.categoryName}, #{item.stockId}, #{item.questStatus},
#{item.stockNum}, #{item.warehouseId} , #{item.positionCode}, #{item.trayCode}, #{item.trayId}, #{item.allocationId}, #{item.groundingAllocationId},
#{item.isNew}, #{item.groundingPositionCode}, #{item.materialCode}, #{item.marketName} , #{item.incomingBatch}, #{item.materialName}, #{item.waybillNumber}
)
</foreach>
</insert>
<select id="selectTaskInfo" resultType="com.logpm.warehouse.entity.QuestDetailEntity">
select *
from ${questNum}
<where>
is_deleted = 0
<if test="param.questId != null and param.questId != ''">and quest_id =#{param.questId } </if>
<if test="param.questType != null and param.questType != ''">and quest_type =#{param.questType } </if>
<if test="param.questTarget != null and param.questTarget != ''">and quest_target =#{param.questTarget } </if>
<if test="param.warehouseId != null and param.warehouseId != ''">and warehouse_id =#{param.warehouseId } </if>
<if test="param.allocationId != null and param.allocationId != ''">and allocation_id =#{param.allocationId } </if>
<if test="param.trayId != null and param.trayId != ''">and tray_id =#{param.trayId } </if>
<if test="param.orderCode != null and param.orderCode != ''">and order_code =#{param.orderCode } </if>
</where>
</select>
<select id="selectOneTaskInfo" resultType="com.logpm.warehouse.entity.QuestDetailEntity">
select *
from ${questNum}
<where>
is_deleted = 0
<if test="param.questId != null and param.questId != ''">and quest_id =#{param.questId } </if>
<if test="param.questType != null and param.questType != ''">and quest_type =#{param.questType } </if>
<if test="param.questTarget != null and param.questTarget != ''">and quest_target =#{param.questTarget } </if>
<if test="param.warehouseId != null and param.warehouseId != ''">and warehouse_id =#{param.warehouseId } </if>
<if test="param.allocationId != null and param.allocationId != ''">and allocation_id =#{param.allocationId } </if>
<if test="param.trayId != null and param.trayId != ''">and tray_id =#{param.trayId } </if>
<if test="param.orderCode != null and param.orderCode != ''">and order_code =#{param.orderCode } </if>
</where>
</select>
<select id="selectQuestDetailList" resultType="com.logpm.warehouse.entity.QuestDetailEntity">
select *
from ${questNum}
<where>
is_deleted = 0
<if test="param.questId != null and param.questId != ''">and quest_id =#{param.questId } </if>
<if test="param.questType != null and param.questType != ''">and quest_type =#{param.questType } </if>
<if test="param.questTarget != null and param.questTarget != ''">and quest_target =#{param.questTarget } </if>
<if test="param.warehouseId != null and param.warehouseId != ''">and warehouse_id =#{param.warehouseId } </if>
<if test="param.allocationId != null and param.allocationId != ''">and allocation_id =#{param.allocationId } </if>
<if test="param.trayId != null and param.trayId != ''">and tray_id =#{param.trayId } </if>
<if test="param.orderCode != null and param.orderCode != ''">and order_code =#{param.orderCode } </if>
<if test="param.marketNames != null">
and material_name in
<foreach collection="param.marketNames" item="a" open="(" close=")" separator=",">
#{a}
</foreach>
</if>
</where>
</select>
<select id="selectTaskTrayInfo" resultType="com.logpm.warehouse.entity.QuestDetailEntity">
select *
from ${questNum}
<where>
is_deleted = 0
<if test="param.questId != null and param.questId != ''">and quest_id =#{param.questId } </if>
<if test="param.questType != null and param.questType != ''">and quest_type =#{param.questType } </if>
<if test="param.questTarget != null and param.questTarget != ''">and quest_target =#{param.questTarget } </if>
<if test="param.warehouseId != null and param.warehouseId != ''">and warehouse_id =#{param.warehouseId } </if>
<if test="param.allocationId != null and param.allocationId != ''">and allocation_id =#{param.allocationId } </if>
<if test="param.trayId != null and param.trayId != ''">and tray_id =#{param.trayId } </if>
<if test="param.trayId == null or param.trayId == ''">and tray_id is not null </if>
</where>
</select>
<update id="updateQuestDetailQuestStatus">
update ${questNum} set quest_status = #{param.questStatus}
WHERE `id` = #{ param.id }
</update>
<update id="updatePositionCodeList">
<foreach collection="list" separator=";" item="item" index="index">
update ${questNum}
<set>
<if test="item.groundingAllocationId != null and item.groundingAllocationId != null">grounding_allocation_id = #{item. groundingAllocationId},</if>
<if test="item.groundingPositionCode != null and item.groundingPositionCode != null">grounding_position_code = #{item.groundingPositionCode },</if>
<if test="item.questStatus != null and item.questStatus != null"> quest_status = #{item.questStatus },</if>
<!-- <if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>
<if test="item. != null and item. != null"> = #{item. }</if>-->
</set>
WHERE `id` = #{ param.id }
</foreach>
</update>
<select id="getQuestDetailInfo" resultType="com.logpm.warehouse.entity.QuestDetailChildEntity">
select *
from ${questNum}
<where>
is_deleted = 0
<if test="param.questDetailId != null and param.questDetailId != ''">and quest_detail_id = #{param.questDetailId } </if>
<if test="param.warehouseId != null and param.warehouseId != ''">and warehouse_id = #{param.warehouseId } </if>
</where>
</select>
<select id="exportTaskQuest" resultType="com.logpm.warehouse.excel.TaskQuestExcel">
SELECT * FROM logpm_task_quest ${ew.customSqlSegment}
@ -68,7 +253,7 @@
sum( lqd.stock_num ) total ,
sum( If(lqd.quest_status = 1,lqd.stock_num,0) ) unTotal
FROM
logpm_quest_detail lqd
${questNum} lqd
<where>
and lqd.quest_type =2
and lqd.is_deleted =0

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.java

@ -62,4 +62,5 @@ public interface WarehouseRetentionRecordMapper extends BaseMapper<WarehouseRete
IPage<WarehouseRetentionRecordEntity> retentionPackageList(IPage<Object> page, @Param("param") RetentionDTO retentionDTO);
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionRecordMapper.xml

@ -61,4 +61,5 @@
order by update_time desc
</select>
</mapper>

23
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/ITaskQuestService.java

@ -83,10 +83,25 @@ public interface ITaskQuestService extends BaseService<TaskQuestEntity> {
*/
R queryContract(TaskSearchDTO taskSearchDTO);
/**
* 盘点定制平数据
* @param taskSearchDTO
* @return
*/
List<QuestDetailEntity> allocationDetailByPackage(TaskSearchDTO taskSearchDTO);
/**
* 盘点零担数据
* @param taskSearchDTO
* @return
*/
List<QuestDetailEntity> allocationDetailByZero(TaskSearchDTO taskSearchDTO);
/**
* 盘点库存平数据
* @param taskSearchDTO
* @return
*/
List<QuestDetailEntity> allocationDetailByStock(TaskSearchDTO taskSearchDTO);
void updateQuestSetail(TaskSearchDTO taskSearchDTO);
@ -132,4 +147,12 @@ public interface ITaskQuestService extends BaseService<TaskQuestEntity> {
R questScanAllcation(TaskSearchDTO taskSearchDTO);
R selectPackageInfo(TaskSearchDTO taskSearchDTO);
/**
* 查询盘点任务数据任务
* @param questNum
* @param questDetail
* @return
*/
List<QuestDetailEntity> selectTaskInfo(String questNum, QuestDetailEntity questDetail);
}

14
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseRetentionRecordService.java

@ -62,4 +62,18 @@ public interface IWarehouseRetentionRecordService extends BaseService<WarehouseR
IPage<WarehouseRetentionRecordVO> retentionPackageList(RetentionDTO retentionDTO);
R retentionScanPackage(String orderPackageCode);
/**
* PDA查询初始化滞留扫描页
* @param deliveryId
* @return
*/
WarehouseRetentionRecordVO initRetentionList(Long deliveryId);
/**
* 保存扫描记录
* @param retentionDTO
* @return
*/
R saveRetentionList(RetentionDTO retentionDTO);
}

755
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/TaskQuestServiceImpl.java

File diff suppressed because it is too large Load Diff

125
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseRetentionRecordServiceImpl.java

@ -18,26 +18,48 @@ package com.logpm.warehouse.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.entity.DisStockListDetailEntity;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.feign.IDistributionDeliveryListClient;
import com.logpm.distribution.feign.IDistributionLoadscanClient;
import com.logpm.distribution.feign.IDistributionParcelListClient;
import com.logpm.distribution.vo.DistributionDeliveryListVO;
import com.logpm.distribution.vo.DistributionDeliverySelfVO;
import com.logpm.oldproject.feign.IWarehouseClient;
import com.logpm.warehouse.bean.Resp;
import com.logpm.warehouse.dto.RetentionDTO;
import com.logpm.warehouse.dto.RetentionDistributionListDetailDTO;
import com.logpm.warehouse.dto.RetentionParcelListDTO;
import com.logpm.warehouse.dto.RetentionZeroParcelDTO;
import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity;
import com.logpm.warehouse.entity.WarehouseRetentionScanEntity;
import com.logpm.warehouse.excel.WarehouseRetentionRecordExcel;
import com.logpm.warehouse.mapper.WarehouseRetentionRecordMapper;
import com.logpm.warehouse.service.IWarehouseRetentionRecordService;
import com.logpm.warehouse.service.IWarehouseRetentionScanService;
import com.logpm.warehouse.vo.WarehouseRetentionRecordVO;
import com.logpm.warehouse.vo.WarehouseWaybillDetentionVO;
import com.logpm.warehouse.wrapper.WarehouseRetentionRecordWrapper;
import com.logpm.warehouse.wrapper.WarehouseRetentionScanWrapper;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.retention.RetentionTypeConstant;
import org.springblade.common.exception.CustomerException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
* 滞留记录 服务实现类
@ -47,10 +69,14 @@ import java.util.Objects;
*/
@AllArgsConstructor
@Service
@Slf4j
public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<WarehouseRetentionRecordMapper, WarehouseRetentionRecordEntity> implements IWarehouseRetentionRecordService {
private final IDistributionLoadscanClient distributionLoadscanClient;
private final IDistributionParcelListClient distributionParcelListClient;
private final IWarehouseRetentionScanService warehouseRetentionScanService;
private final IDistributionDeliveryListClient deliveryListClient;
private final IBasicdataWarehouseClient warehouseClient;
@Override
public IPage<WarehouseRetentionRecordVO> selectWarehouseRetentionRecordPage(IPage<WarehouseRetentionRecordVO> page, WarehouseRetentionRecordVO warehouseRetentionRecord) {
@ -117,4 +143,103 @@ public class WarehouseRetentionRecordServiceImpl extends BaseServiceImpl<Warehou
return R.success("success");
}
@Override
public WarehouseRetentionRecordVO initRetentionList(Long deliveryId) {
WarehouseRetentionRecordEntity retentionRecordEntity = this.getOne(Wrappers.<WarehouseRetentionRecordEntity>query().lambda()
.eq(WarehouseRetentionRecordEntity::getRetentionType, RetentionTypeConstant.peisongzhiliu.getValue())
.eq(WarehouseRetentionRecordEntity::getTaskId, deliveryId));
if (Func.isEmpty(retentionRecordEntity)){
return null;
}
WarehouseRetentionRecordVO warehouseRetentionRecordVO = WarehouseRetentionRecordWrapper.build().entityVO(retentionRecordEntity);
//查询是否存在有对应的扫描列表
List<WarehouseRetentionScanEntity> retentionScanEntityList = warehouseRetentionScanService.list(Wrappers.<WarehouseRetentionScanEntity>query().lambda()
.eq(WarehouseRetentionScanEntity::getDeliveryId, retentionRecordEntity.getTaskId())
.eq(WarehouseRetentionScanEntity::getRefId, retentionRecordEntity.getId()));
if (Func.isNotEmpty(retentionScanEntityList)){
warehouseRetentionRecordVO.setRetentionScanVOList(WarehouseRetentionScanWrapper.build().listVO(retentionScanEntityList));
}
return warehouseRetentionRecordVO;
}
@Override
public R saveRetentionList(RetentionDTO retentionDTO) {
DistributionDeliveryListVO deliveryDriverInfo = deliveryListClient.getDeliveryDriverInfo(retentionDTO.getDeliveryId());
if (Func.isEmpty(deliveryDriverInfo)){
//查询配送任务
log.error("##############查询配送任务失败,deliveryId:{}",retentionDTO.getDeliveryId());
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)) {
throw new CustomerException(403, "仓库信息不能为空");
}
if (Func.isEmpty(deliveryDriverInfo.getDeliverySelfVO())){
log.error("##############查询配送任务司机失败");
}
List<DistributionDeliverySelfVO> deliverySelfVO = deliveryDriverInfo.getDeliverySelfVO();
DistributionDeliverySelfVO distributionDeliverySelfVO = null;
if (deliveryDriverInfo.getKind().equals("1")){
distributionDeliverySelfVO = deliverySelfVO.stream().filter(d -> d.getIsMaster() == 2).collect(Collectors.toList()).get(0);
}else if (deliveryDriverInfo.getKind().equals("2")){
distributionDeliverySelfVO = deliverySelfVO.get(0);
}
WarehouseRetentionRecordEntity warehouseRetentionRecordEntity = new WarehouseRetentionRecordEntity();
warehouseRetentionRecordEntity.setRetentionType(RetentionTypeConstant.peisongzhiliu.getValue());
warehouseRetentionRecordEntity.setRetentionWarehouseId(myCurrentWarehouse.getId());
warehouseRetentionRecordEntity.setRetentionWarehouseName(myCurrentWarehouse.getName());
warehouseRetentionRecordEntity.setRemark(retentionDTO.getRemarks());
warehouseRetentionRecordEntity.setTaskId(retentionDTO.getDeliveryId());
warehouseRetentionRecordEntity.setRetentionCarId(distributionDeliverySelfVO.getId());
warehouseRetentionRecordEntity.setRetentionCarNo(deliveryDriverInfo.getTrainNumber());
warehouseRetentionRecordEntity.setAssembleCarPersonId(distributionDeliverySelfVO.getDeliveryId());
warehouseRetentionRecordEntity.setAssembleCarPersonName(distributionDeliverySelfVO.getDriverName());
//统计数量
AtomicInteger retentionQuantity = new AtomicInteger();
List<RetentionParcelListDTO> parcelListEntityList = retentionDTO.getParcelListEntityList();
if (Func.isNotEmpty(parcelListEntityList)){
parcelListEntityList.forEach(p->{
WarehouseRetentionScanEntity warehouseRetentionScanEntity = new WarehouseRetentionScanEntity();
warehouseRetentionScanEntity.setConditions(1);
warehouseRetentionScanEntity.setDeliveryId(deliveryDriverInfo.getId());
warehouseRetentionScanEntity.setOrderCode(p.getOrderCode());
warehouseRetentionScanEntity.setOrderPackageCode(p.getOrderPackageCode());
warehouseRetentionScanEntity.setOrderId(p.getStockArticleId());
warehouseRetentionScanEntity.setOrderPackageId(p.getId());
warehouseRetentionScanService.save(warehouseRetentionScanEntity);
retentionQuantity.getAndAdd(p.getQuantity());
//缺少一个进行解绑的远程
});
}
List<RetentionZeroParcelDTO> parcelNumberEntityList = retentionDTO.getParcelNumberEntityList();
if (Func.isNotEmpty(parcelNumberEntityList)){
parcelNumberEntityList.forEach(pn->{
WarehouseRetentionScanEntity warehouseRetentionScanEntity = new WarehouseRetentionScanEntity();
warehouseRetentionScanEntity.setConditions(2);
warehouseRetentionScanEntity.setDeliveryId(deliveryDriverInfo.getId());
warehouseRetentionScanEntity.setOrderId(pn.getStockArticleId());
warehouseRetentionScanEntity.setOrderPackageId(pn.getParcelListId());
warehouseRetentionScanService.save(warehouseRetentionScanEntity);
retentionQuantity.getAndAdd(pn.getQuantity());
});
}
List<RetentionDistributionListDetailDTO> detailEntityList = retentionDTO.getDetailEntityList();
if (Func.isNotEmpty(detailEntityList)){
detailEntityList.forEach(d->{
WarehouseRetentionScanEntity warehouseRetentionScanEntity = new WarehouseRetentionScanEntity();
warehouseRetentionScanEntity.setConditions(3);
warehouseRetentionScanEntity.setDeliveryId(deliveryDriverInfo.getId());
warehouseRetentionScanEntity.setInventoryId(d.getStockListId());
warehouseRetentionScanEntity.setMaterialName(d.getMaterialName());
warehouseRetentionScanEntity.setMaterialNumber(d.getMaterialNumber());
warehouseRetentionScanEntity.setOrderPackageCode(d.getStockPackageCode());
warehouseRetentionScanEntity.setOrderPackageId(d.getId());
warehouseRetentionScanService.save(warehouseRetentionScanEntity);
retentionQuantity.getAndAdd(d.getNum());
});
}
this.save(warehouseRetentionRecordEntity);
return Resp.scanSuccess("操作成功","操作成功");
}
}

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionRecordWrapper.java

@ -18,8 +18,10 @@ package com.logpm.warehouse.wrapper;
import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity;
import com.logpm.warehouse.vo.WarehouseRetentionRecordVO;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.system.cache.DictBizCache;
import java.util.Objects;
@ -38,7 +40,7 @@ public class WarehouseRetentionRecordWrapper extends BaseEntityWrapper<Warehouse
@Override
public WarehouseRetentionRecordVO entityVO(WarehouseRetentionRecordEntity warehouseRetentionRecord) {
WarehouseRetentionRecordVO warehouseRetentionRecordVO = Objects.requireNonNull(BeanUtil.copy(warehouseRetentionRecord, WarehouseRetentionRecordVO.class));
warehouseRetentionRecordVO.setRetentionTypeName(DictBizCache.getValue(DictBizConstant.WAREHOUSE_TRAY_BINDING_TYPE, warehouseRetentionRecord.getRetentionType()));
//User createUser = UserCache.getUser(warehouseRetentionRecord.getCreateUser());
//User updateUser = UserCache.getUser(warehouseRetentionRecord.getUpdateUser());
//warehouseRetentionRecordVO.setCreateUserName(createUser.getName());

55
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/wrapper/WarehouseRetentionScanWrapper.java

@ -0,0 +1,55 @@
/*
* 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.wrapper;
import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity;
import com.logpm.warehouse.entity.WarehouseRetentionScanEntity;
import com.logpm.warehouse.vo.WarehouseRetentionRecordVO;
import com.logpm.warehouse.vo.WarehouseRetentionScanVO;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.system.cache.DictBizCache;
import java.util.Objects;
/**
* 滞留记录 包装类,返回视图层所需的字段
*
* @author BladeX
* @since 2023-08-09
*/
public class WarehouseRetentionScanWrapper extends BaseEntityWrapper<WarehouseRetentionScanEntity, WarehouseRetentionScanVO> {
public static WarehouseRetentionScanWrapper build() {
return new WarehouseRetentionScanWrapper();
}
@Override
public WarehouseRetentionScanVO entityVO(WarehouseRetentionScanEntity warehouseRetentionScanEntity) {
WarehouseRetentionScanVO warehouseRetentionScanVO = Objects.requireNonNull(BeanUtil.copy(warehouseRetentionScanEntity, WarehouseRetentionScanVO.class));
// warehouseRetentionRecordVO.setRetentionTypeName(DictBizCache.getValue(DictBizConstant.WAREHOUSE_TRAY_BINDING_TYPE, warehouseRetentionRecord.getRetentionType()));
//User createUser = UserCache.getUser(warehouseRetentionRecord.getCreateUser());
//User updateUser = UserCache.getUser(warehouseRetentionRecord.getUpdateUser());
//warehouseRetentionRecordVO.setCreateUserName(createUser.getName());
//warehouseRetentionRecordVO.setUpdateUserName(updateUser.getName());
return warehouseRetentionScanVO;
}
}
Loading…
Cancel
Save