|
|
@ -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库存出库");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|