修改判空条件代码逻辑

This commit is contained in:
alex
2023-07-10 14:58:52 +08:00
parent ba03f549bc
commit ee4bbf62fe
2 changed files with 5 additions and 5 deletions

View File

@@ -253,7 +253,7 @@ namespace Tnb.WarehouseMgr
//入库申请条码明细表
List<WmsInstockCode> instockcodes = input.instockcodes;
//如果数据不全,
if (instock.IsNull() || instock.carry_id.IsNullOrWhiteSpace() || instock.location_id.IsNullOrWhiteSpace() || instockds?.Count < 1 || instockcodes?.Count < 1)
if ((instock?.carry_id.IsNullOrWhiteSpace() ?? true) || (instock?.location_id.IsNullOrWhiteSpace() ?? true) || instockds?.Count < 1 || instockcodes?.Count < 1)
{
//报错, 提示数据不全。
throw new AppFriendlyException("数据不全!", 500);