diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsEmptyInstockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsEmptyInstockService.cs index 2b9b5057..c6b4a5da 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsEmptyInstockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsEmptyInstockService.cs @@ -125,6 +125,23 @@ namespace Tnb.WarehouseMgr preTaskUpInput.LocationIds = points.Select(x => x.id).ToList(); preTaskUpInput.PreTaskRecords = preTasks.Adapt>(); 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().SetColumns(it => new WmsEmptyInstock { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.PreTaskId).ExecuteCommandAsync(); + await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput); } }