Browse Source

预约编辑拦截无效库存品

single_db
汤建军 1 year ago
parent
commit
f16087f501
  1. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

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

@ -1823,7 +1823,11 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isEmpty(oleInventoryList.get(c))) { if (Func.isEmpty(oleInventoryList.get(c))) {
mallName.add(distributionStockListDTO.getMarketName()); mallName.add(distributionStockListDTO.getMarketName());
mallId.add(distributionStockListDTO.getMarketId()); mallId.add(distributionStockListDTO.getMarketId());
DistributionStockListEntity stockListEntity = distributionStockListService.getById(distributionStockListDTO.getId());
int keyongshuliang = stockListEntity.getQuantityStock() - stockListEntity.getQuantityOccupied();
if (distributionStockListDTO.getReservationNum() > keyongshuliang) {
throw new RuntimeException("库存品库内数量不足!!!");
}
//新增库存品 //新增库存品
reservationStocklistEntity.setStocklistId(distributionStockListDTO.getId()); reservationStocklistEntity.setStocklistId(distributionStockListDTO.getId());
reservationStocklistEntity.setReservationId(id); reservationStocklistEntity.setReservationId(id);

Loading…
Cancel
Save