注释和报错

This commit is contained in:
FanLian
2023-07-18 09:10:57 +08:00
parent c92dbc3397
commit 919af3542c
6 changed files with 103 additions and 89 deletions

View File

@@ -317,11 +317,11 @@ namespace Tnb.WarehouseMgr
List<WmsOutstockD> outstockDs = input.outstockDs.Adapt<List<WmsOutstockD>>();
var location = await _db.Queryable<BasLocation>().SingleAsync(it => it.location_code == input.outstock.location_code && it.is_type != EnumLocationType..ToString());
//如果数据不全,
//如果数据不全或有误
if (location.IsNull() || outstockDs?.Count < 1)
{
//报错, 提示数据不全。
throw new AppFriendlyException("数据不全!", 500);
//报错, 提示数据不全或有误
throw new AppFriendlyException("数据不全或有误", 500);
}
// 生成出库申请数据,添加其他数据 主表
outstock.id = SnowflakeIdHelper.NextId();