盘点修改

jg-waiwang-pro
XI_TENG\xixi_ 3 months ago
parent 96f36fff22
commit a62968fdcb

@ -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);
}
}

Loading…
Cancel
Save