This commit is contained in:
2023-06-16 08:57:02 +08:00
parent 0aceef8697
commit bb0b3819f6

View File

@@ -125,6 +125,23 @@ namespace Tnb.WarehouseMgr
preTaskUpInput.LocationIds = points.Select(x => x.id).ToList();
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
WmsHandleH handleH = new();
handleH.org_id = _userManager.User.OrganizeId;
handleH.startlocation_id = input.data[nameof(WmsPointH.location_id)]?.ToString();
handleH.endlocation_id = endLocations[0].id;
handleH.bill_code = input.data[nameof(WmsHandleH.bill_code)]?.ToString();
handleH.biz_type = input.data[nameof(WmsHandleH.biz_type)]?.ToString();
handleH.carry_id = input.data[nameof(WmsHandleH.carry_id)]?.ToString();
handleH.carry_code = input.data[nameof(WmsHandleH.carry_code)]?.ToString();
handleH.require_id = input.data["ReturnIdentity"].ToString();
handleH.require_code = input.data[nameof(WmsHandleH.bill_code)]?.ToString()!;
handleH.create_id = _userManager.UserId;
handleH.create_time = DateTime.Now;
preTaskUpInput.PreTaskRecord = handleH;
//根据空载具入库Id回更单据状态
await _db.Updateable<WmsEmptyInstock>().SetColumns(it => new WmsEmptyInstock { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.PreTaskId).ExecuteCommandAsync();
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput);
}
}