|
|
|
@ -546,6 +546,20 @@ public class WarehousingInventoryController {
|
|
|
|
|
inventoryEntity.setInventoryNumber(frim);//库存数量
|
|
|
|
|
}
|
|
|
|
|
inventoryService.saveOrUpdate(inventoryEntity);
|
|
|
|
|
} else {
|
|
|
|
|
//更新库存
|
|
|
|
|
//根据商品id和批次号查询库存信息
|
|
|
|
|
QueryWrapper<InventoryEntity> inventoryQueryWrapper = new QueryWrapper<>();
|
|
|
|
|
inventoryQueryWrapper.lambda().eq(InventoryEntity::getProductId, warehousingInventoryProductModel.getProductId());
|
|
|
|
|
inventoryQueryWrapper.lambda().eq(InventoryEntity::getBatchNumber, warehousingInventoryProductModel.getBatchNumber());
|
|
|
|
|
List<InventoryEntity> inventoryList = inventoryService.list(inventoryQueryWrapper);
|
|
|
|
|
InventoryEntity inventoryEntity = new InventoryEntity();
|
|
|
|
|
if(inventoryList != null && inventoryList.size() > 0){
|
|
|
|
|
inventoryEntity = inventoryList.get(0);
|
|
|
|
|
BigDecimal frim =new BigDecimal(warehousingInventoryProductModel.getFirmOfferQuantity());
|
|
|
|
|
inventoryEntity.setInventoryNumber(frim);//库存数量
|
|
|
|
|
}
|
|
|
|
|
inventoryService.saveOrUpdate(inventoryEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|