wms 消除warning

This commit is contained in:
alex
2023-07-04 09:22:13 +08:00
parent e78f63acfb
commit 1a01692551
41 changed files with 296 additions and 327 deletions

View File

@@ -68,8 +68,8 @@ namespace Tnb.WarehouseMgr
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_WMSTRANSFER_ID, true);
await _runService.Create(templateEntity, input);
// 计算路径,插入预任务申请
WmsPointH sPoint = null;
WmsPointH ePoint = null;
WmsPointH? sPoint = null;
WmsPointH? ePoint = null;
if (input.data.ContainsKey(nameof(WmsTransfer.startlocation_id)))
{
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == input.data[nameof(WmsTransfer.startlocation_id)].ToString());
@@ -93,10 +93,10 @@ namespace Tnb.WarehouseMgr
WmsPretaskH preTask = new();
preTask.org_id = _userManager.User.OrganizeId;
preTask.startlocation_id = sPoint?.location_id;
preTask.startlocation_code = sPoint?.location_code;
preTask.endlocation_id = ePoint?.location_id;
preTask.endlocation_code = ePoint?.location_code;
preTask.startlocation_id = sPoint?.location_id!;
preTask.startlocation_code = sPoint?.location_code!;
preTask.endlocation_id = ePoint?.location_id!;
preTask.endlocation_code = ePoint?.location_code!;
preTask.start_floor = sPoint?.floor.ToString();
preTask.end_floor = ePoint?.floor.ToString();
preTask.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult();
@@ -105,7 +105,7 @@ namespace Tnb.WarehouseMgr
preTask.task_type = WmsWareHouseConst.WMS_PRETASK_TRANSFER_TYPE_ID;
preTask.carry_id = input.data[nameof(preTask.carry_id)]?.ToString()!;
preTask.carry_code = input.data[nameof(preTask.carry_code)]?.ToString()!;
preTask.area_id = sPoint?.area_id;
preTask.area_id = sPoint?.area_id!;
preTask.area_code = it.Key;
preTask.require_id = input.data["ReturnIdentity"].ToString();
preTask.require_code = input.data[nameof(preTask.bill_code)]?.ToString()!;
@@ -113,7 +113,7 @@ namespace Tnb.WarehouseMgr
preTask.create_time = DateTime.Now;
return preTask;
}).ToList();
var isOk = await _wareHouseService.GenPreTask(preTasks, null);
var isOk = await _wareHouseService.GenPreTask(preTasks, null!);
if (isOk)
{
//查询库位表
@@ -141,7 +141,7 @@ namespace Tnb.WarehouseMgr
await _db.Ado.CommitTranAsync();
}
catch (Exception ex)
catch (Exception)
{
await _db.Ado.RollbackTranAsync();
throw;