Browse Source

入库单存放至托盘BUG修复

master
汤建军 8 months ago
parent
commit
e61e257bd0
  1. 12
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

12
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

@ -205,6 +205,14 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
WarehouseWarehousingDetailEntity detailEntity = new WarehouseWarehousingDetailEntity();
detailEntity.setId(i.getId());
detailEntity.setActualReceipt(next.getActualReceipt()); //实际
int i2 = next.getCreateInventory() - i.getCreateInventory();
if ( next.getCreateInventory() < i.getActualReceipt()){
//入库单预计数量无法进行减少
log.info("入库单进行预计数量修改,原计划录入:{},目标修改:{}",i.getCreateInventory(),next.getCreateInventory());
log.info("入库单进行预计数量修改,已入库数量:{}",i.getActualReceipt());
throw new RuntimeException("入库单预计数量不能小于已入库数量");
}
detailEntity.setCreateInventory(next.getCreateInventory());
if (next.getActualReceipt().equals(i.getCreateInventory()) || next.getActualReceipt() > i.getCreateInventory()) {
detailEntity.setConditions("3");
num.updateAndGet(v -> v + 1);
@ -216,6 +224,10 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
warehouseWarehousingDetailService.updateById(detailEntity);//修改数据
//当前入库数量
int i1 = next.getActualReceipt() - i.getActualReceipt();
if (i1< 0){
log.info("入库单进行预计数量修改,已入库数量:{},目标修改数量:{}",i.getActualReceipt(),next.getActualReceipt());
throw new RuntimeException("请输入正确的入库数量");
}
//添加库存品
addInventory(i1, warehouseWarehousingEntryDTO, i);
iterator.remove();

Loading…
Cancel
Save