消除warning

This commit is contained in:
alex
2023-07-04 17:56:30 +08:00
parent 679bb67ac2
commit 6779adab6f

View File

@@ -107,7 +107,7 @@ namespace Tnb.WarehouseMgr
{ {
case EnumInOutStockType.In: case EnumInOutStockType.In:
var wmsInstockD = input.Adapt<WmsInstockD>(); var wmsInstockD = input.Adapt<WmsInstockD>();
var wmsInstockCodes = input.InstockCodes.Adapt<List<WmsInstockCode>>(); var wmsInstockCodes = input.InstockCodes?.Adapt<List<WmsInstockCode>>();
if (wmsInstockCodes?.Count > 0) if (wmsInstockCodes?.Count > 0)
{ {
wmsInstockCodes.ForEach(x => wmsInstockCodes.ForEach(x =>
@@ -123,7 +123,7 @@ namespace Tnb.WarehouseMgr
break; break;
case EnumInOutStockType.Out: case EnumInOutStockType.Out:
var wmsOutstockD = input.Adapt<WmsOutstockD>(); var wmsOutstockD = input.Adapt<WmsOutstockD>();
var wmsOutstockCodes = input.InstockCodes.Adapt<List<WmsOutstockCode>>(); var wmsOutstockCodes = input.InstockCodes?.Adapt<List<WmsOutstockCode>>();
if (wmsOutstockCodes?.Count > 0) if (wmsOutstockCodes?.Count > 0)
{ {
wmsOutstockCodes.ForEach(x => wmsOutstockCodes.ForEach(x =>
@@ -135,7 +135,7 @@ namespace Tnb.WarehouseMgr
x.bill_d_id = wmsOutstockD.id; x.bill_d_id = wmsOutstockD.id;
}); });
} }
isOk = await _update(wmsOutstockD, wmsOutstockCodes); isOk = await _update(wmsOutstockD, wmsOutstockCodes!);
break; break;
} }
if (!isOk) throw Oops.Oh(ErrorCode.COM1001); if (!isOk) throw Oops.Oh(ErrorCode.COM1001);
@@ -585,7 +585,7 @@ namespace Tnb.WarehouseMgr
//根据所有库位更新库位的锁定状态为“锁定” //根据所有库位更新库位的锁定状态为“锁定”
if (setLocaionColumbExp != null) if (setLocaionColumbExp != null)
{ {
await _db.Updateable<BasLocation>().SetColumns(setLocaionColumbExp).Where(it => input.LocationIds.Contains(it.id)).ExecuteCommandAsync(); await _db.Updateable<BasLocation>().SetColumns(setLocaionColumbExp).Where(it => input.LocationIds!.Contains(it.id)).ExecuteCommandAsync();
} }
await _db.Ado.CommitTranAsync(); await _db.Ado.CommitTranAsync();
} }