修改判空条件代码逻辑
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace Tnb.WarehouseMgr
|
||||
if (kittingOut != null)
|
||||
{
|
||||
var locaion = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == kittingOut.location_id);
|
||||
if (locaion != null && locaion.is_type.ToEnum<EnumLocationType>() != EnumLocationType.存储库位)
|
||||
if (locaion?.is_type.ToEnum<EnumLocationType>() != EnumLocationType.存储库位)
|
||||
{
|
||||
kittingOut.status = WmsWareHouseConst.BILLSTATUS_TOBESHIPPED_ID;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user