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

@@ -67,8 +67,8 @@ namespace Tnb.WarehouseMgr
await _runService.Create(templateEntity, input);
//出库取起点
var carry = await _db.Queryable<WmsCarryH>().FirstAsync(it => it.id == input.data[nameof(WmsOutbale.carry_id)].ToString());
WmsPointH sPoint = null;
WmsPointH ePoint = null;
WmsPointH? sPoint = null;
WmsPointH? ePoint = null;
if (input.data.ContainsKey(nameof(WmsPointH.location_id)))
{
ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == input.data[nameof(WmsPointH.location_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_OUTSTOCK_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()!;
@@ -119,15 +119,15 @@ namespace Tnb.WarehouseMgr
{
preTasks[^1].is_sign = 0; // 修改最后一个元素的是否签收值
}
var isOk = await _wareHouseService.GenPreTask(preTasks, null);
var isOk = await _wareHouseService.GenPreTask(preTasks, null!);
if (isOk)
{
var preTaskUpInput = new GenPreTaskUpInput();
preTaskUpInput.RquireId = input.data["ReturnIdentity"].ToString();
preTaskUpInput.RquireId = input.data["ReturnIdentity"].ToString()!;
preTaskUpInput.CarryId = input.data[nameof(WmsCarryD.carry_id)]?.ToString()!;
preTaskUpInput.CarryStartLocationId = points.FirstOrDefault().location_id;
preTaskUpInput.CarryStartLocationCode = points.FirstOrDefault().location_code;
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList();
preTaskUpInput.CarryStartLocationId = points.FirstOrDefault()!.location_id!;
preTaskUpInput.CarryStartLocationCode = points.FirstOrDefault()!.location_code!;
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList()!;
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());