Browse Source

Merge branch 'dev' into pre-production

master
汤建军 8 months ago
parent
commit
ea58677f95
  1. 72
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

72
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -241,42 +241,42 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
baseMapper.updateById(distributionStockupEntity);
//判断备货的任务类型
//添加库存品数据
DistributionStockupEntity stockupEntity = distributionStockupService.selectById(s);
if ("3".equals(stockupEntity.getTypeService())) {
//自提 添加库存平信息
List<DistributionStockListSelfNumVO> distributionStockListSelfNumVOS = distributionStockupInfoService.selectStockListSelfNum(s);
if (!distributionStockListSelfNumVOS.isEmpty()) {
List<DisStockListDetailEntity> listDetailEntities = new ArrayList<>();
distributionStockListSelfNumVOS.forEach(i -> {
if (ObjectUtils.isNotNull(i)) {
Integer quantity = i.getQuantity();
while (quantity > 0) {
DisStockListDetailEntity disStockListDetail = new DisStockListDetailEntity();
disStockListDetail.setNum(1);
disStockListDetail.setSku(i.getSku());
disStockListDetail.setWarehouseId(i.getWarehouseId());
disStockListDetail.setWarehouseName(i.getWarehouseName());
disStockListDetail.setReservationId(i.getBillLadingId());
disStockListDetail.setStockPackageStatus("1");
disStockListDetail.setStockListId(i.getStockListId());
disStockListDetail.setStockLockingStatus(StockLockingStatusConstant.wuzhuangche.getValue());
disStockListDetail.setStockStatus(StockStatusConstant.daibangding.getValue());
disStockListDetail.setStockSignfoStatus(StockSignfoStatusConstant.daiqianshou.getValue());
disStockListDetail.setStockType("10");
listDetailEntities.add(disStockListDetail);
quantity--;
}
}
});
if (!listDetailEntities.isEmpty()) {
disStockListDetailService.saveBatch(listDetailEntities);
}
}
}
// DistributionStockupEntity stockupEntity = distributionStockupService.selectById(s);
// if ("3".equals(stockupEntity.getTypeService())) {
// //自提 添加库存平信息
// List<DistributionStockListSelfNumVO> distributionStockListSelfNumVOS = distributionStockupInfoService.selectStockListSelfNum(s);
//
// if (!distributionStockListSelfNumVOS.isEmpty()) {
// List<DisStockListDetailEntity> listDetailEntities = new ArrayList<>();
//
// distributionStockListSelfNumVOS.forEach(i -> {
// if (ObjectUtils.isNotNull(i)) {
// Integer quantity = i.getQuantity();
// while (quantity > 0) {
// DisStockListDetailEntity disStockListDetail = new DisStockListDetailEntity();
// disStockListDetail.setNum(1);
// disStockListDetail.setSku(i.getSku());
// disStockListDetail.setWarehouseId(i.getWarehouseId());
// disStockListDetail.setWarehouseName(i.getWarehouseName());
// disStockListDetail.setReservationId(i.getBillLadingId());
// disStockListDetail.setStockPackageStatus("1");
// disStockListDetail.setStockListId(i.getStockListId());
// disStockListDetail.setStockLockingStatus(StockLockingStatusConstant.wuzhuangche.getValue());
// disStockListDetail.setStockStatus(StockStatusConstant.daibangding.getValue());
// disStockListDetail.setStockSignfoStatus(StockSignfoStatusConstant.daiqianshou.getValue());
// disStockListDetail.setStockType("10");
// listDetailEntities.add(disStockListDetail);
// quantity--;
// }
// }
// });
// if (!listDetailEntities.isEmpty()) {
// disStockListDetailService.saveBatch(listDetailEntities);
// }
//
// }
//
// }
// else{
// //商 市
// distributionStockupInfoService.selectStockListNum(s);

Loading…
Cancel
Save