修改判空条件代码逻辑
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);
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
throw;
|
||||
}
|
||||
return Task.FromResult(true);
|
||||
@@ -216,12 +216,12 @@ 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;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
kittingOut.status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user