生成预任务时,新增任务属性逻辑判断

This commit is contained in:
alex
2023-06-21 10:21:15 +08:00
parent c2badd9a44
commit 798abfe5b0
4 changed files with 33 additions and 26 deletions

View File

@@ -143,8 +143,8 @@ namespace Tnb.WarehouseMgr
List<string> locIds = new();
foreach (var carry in carrys)
{
WmsPointH sPoint = null;
WmsPointH ePoint = null;
WmsPointH sPoint = null!;
WmsPointH ePoint = null!;
if (input.data.ContainsKey(nameof(WmsPointH.location_id)))
{
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == carry.location_id);
@@ -168,10 +168,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();