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

Loading…
Cancel
Save