1.修复扫码单据添加条码校验库存失败问题

zhairh
x_z 2 years ago
parent 05e6d46164
commit 47ff2ca09b

@ -758,10 +758,10 @@ public class WareHouseController {
int count = invProductDetailService.vailStockCount(code, addOrderRequest.getLocStorageCode(), addOrderRequest.getInvWarehouseCode(), null); int count = invProductDetailService.vailStockCount(code, addOrderRequest.getLocStorageCode(), addOrderRequest.getInvWarehouseCode(), null);
if (count <= 0) { if (count <= 0) {
return ResultVOUtils.error(500, "当前库存不足不允许0库存出库"); return ResultVOUtils.error(500, "当前库存不足不允许0库存出库");
} else { } else if (StrUtil.isNotBlank(addOrderRequest.getOrderId())){
//查询此单据已扫描的条码数量 //查询此单据已扫描的条码数量
WarehouseEntity warehouse = codesTempService.findByUnique(addOrderRequest.getOrderId(), addOrderRequest.getCode()); WarehouseEntity warehouse = codesTempService.findByUnique(addOrderRequest.getOrderId(), addOrderRequest.getCode());
if (null != warehouse && warehouse.getCount() > count) { if (null != warehouse && warehouse.getCount() >= count) {
return ResultVOUtils.error(500, "当前库存不足不允许0库存出库"); return ResultVOUtils.error(500, "当前库存不足不允许0库存出库");
} }
} }

Loading…
Cancel
Save