还原定时任务

This commit is contained in:
FanLian
2023-08-15 16:53:07 +08:00
parent 4a5e4e6aec
commit 87c64e644f
4 changed files with 18 additions and 13 deletions

View File

@@ -80,6 +80,8 @@ namespace Tnb.WarehouseMgr
[HttpPost, Timed(Name = nameof(KittingOutByAdd))]
public async Task KittingOutByAdd(CancellationTokenSource? cts = default)
{
if (UserManager.AsscessToken.IsNullOrWhiteSpace()) return;
var curUser = await GetUserIdentity();
var curDb = _db.CopyNew();
try
{
@@ -133,8 +135,8 @@ namespace Tnb.WarehouseMgr
setSortingH.id = SnowflakeIdHelper.NextId();
setSortingH.kittingout_id = ko.id;
setSortingH.seq = ko.seq;
setSortingH.org_id = _userManager.User.OrganizeId;
setSortingH.create_id = _userManager.UserId;
setSortingH.org_id = curUser.FindFirst(ClaimConst.CLAINMORGID)?.Value;
setSortingH.create_id = curUser.FindFirst(ClaimConst.CLAINMUSERID)!.Value;
setSortingH.create_time = DateTime.Now;
await curDb.Insertable(setSortingH).ExecuteCommandAsync();
@@ -145,8 +147,8 @@ namespace Tnb.WarehouseMgr
x.id = SnowflakeIdHelper.NextId();
x.bill_id = setSortingH.id;
x.warehouse_id = setSortingH.warehouse_id;
x.org_id = _userManager.User.OrganizeId;
x.create_id = _userManager.UserId;
x.org_id = curUser.FindFirst(ClaimConst.CLAINMORGID)?.Value;
x.create_id = curUser.FindFirst(ClaimConst.CLAINMUSERID)!.Value;
x.create_time = DateTime.Now;
});
await curDb.Insertable(setSortDetails).ExecuteCommandAsync();
@@ -173,6 +175,8 @@ namespace Tnb.WarehouseMgr
[HttpPost, Timed(Name = nameof(KittingOutByIsToBeShipped))]
public async Task KittingOutByIsToBeShipped(CancellationTokenSource? cts = default)
{
if (UserManager.AsscessToken.IsNullOrWhiteSpace()) return;
var curUser = await GetUserIdentity();
var curDb = _db.CopyNew();
try
{
@@ -211,7 +215,7 @@ namespace Tnb.WarehouseMgr
WmsPretaskH preTask = new()
{
org_id = _userManager.User.OrganizeId,
org_id = curUser.FindFirst(ClaimConst.CLAINMORGID)?.Value,
startlocation_id = sPoint?.location_id!,
startlocation_code = sPoint?.location_code!,
endlocation_id = ePoint?.location_id!,
@@ -232,7 +236,7 @@ namespace Tnb.WarehouseMgr
area_code = it.Key,
require_id = ko.id,
require_code = ko.bill_code,
create_id = _userManager.UserId,
create_id = curUser.FindFirst(ClaimConst.CLAINMUSERID)!.Value,
create_time = DateTime.Now,
source_id = ko.source_id,
source_code = ko.source_code