|
|
|
@ -2193,8 +2193,14 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
|
|
|
|
|
WarehouseUpdownGoodsEntity updownGoodsEntity = warehouseUpdownGoodsService.getOne(queryWrapper); |
|
|
|
|
DistributionStockListEntity stockListEntity = distributionStockListClient.getEntityByMarketIdAndMaterialCodeAndIncomingBatch(marketId, materialCode,incomingBatch,warehouseId); |
|
|
|
|
//查询原库存数量
|
|
|
|
|
Integer num1 = warehouseUpdownGoodsService.getNumByZation(stockListEntity.getId()); |
|
|
|
|
if (num1+enterNum>stockListEntity.getQuantityStock()){ |
|
|
|
|
Integer totalNum = 0 ; |
|
|
|
|
List<PositionVO> updownGoodsByStock = warehouseUpdownGoodsService.getUpdownGoodsByStock(marketId, materialCode, incomingBatch,warehouseId); |
|
|
|
|
List<PositionVO> trayGoodsByStock = warehouseTrayGoodsService.getTrayGoodsByStockNoAllocationId(marketId, materialCode, incomingBatch,warehouseId); |
|
|
|
|
updownGoodsByStock.addAll(trayGoodsByStock); |
|
|
|
|
for (PositionVO positionVO:updownGoodsByStock){ |
|
|
|
|
totalNum = totalNum + positionVO.getNum(); |
|
|
|
|
} |
|
|
|
|
if (totalNum+enterNum>stockListEntity.getQuantityStock()){ |
|
|
|
|
stringBuffer.append("{").append(materialCode).append("},"); |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|