原材料仓、中储仓出入库优化

This commit is contained in:
2024-08-01 13:57:29 +08:00
parent be72cfb46f
commit 5693ef6ed2
9 changed files with 85 additions and 17 deletions

View File

@@ -468,7 +468,7 @@ namespace Tnb.WarehouseMgr
}
});
await s_taskDistributeYCL2ZCC.WaitAsync();
await _s_taskExecuteSemaphore_F1ZCCInstock.WaitAsync();
WmsMaterialTransferD wmsMaterialTransferD = await _db.Queryable<WmsMaterialTransferD>().FirstAsync(it => it.id == input.source_id);
WmsMaterialTransfer wmsMaterialTransfer = await _db.Queryable<WmsMaterialTransfer>().FirstAsync(it => it.id == wmsMaterialTransferD.bill_id);
@@ -561,7 +561,7 @@ namespace Tnb.WarehouseMgr
}
finally
{
_ = s_taskDistributeYCL2ZCC.Release();
_s_taskExecuteSemaphore_F1ZCCInstock.Release();
InvokeGenPretaskExcute();
}
@@ -1111,7 +1111,7 @@ namespace Tnb.WarehouseMgr
[HttpPost, NonUnify, AllowAnonymous]
public async Task<Entities.Dto.Outputs.Result> DistributeToZCC(MaterialTransferDistributeToZCCInput input)
{
s_taskDistributeToZCC.Wait();
await _s_taskExecuteSemaphore_F1ZCCOutstock.WaitAsync();
try
{
@@ -1239,7 +1239,7 @@ namespace Tnb.WarehouseMgr
}
finally
{
s_taskDistributeToZCC.Release();
_s_taskExecuteSemaphore_F1ZCCOutstock.Release();
InvokeGenPretaskExcute();
}
return await ToApiResult(HttpStatusCode.OK, "成功");
@@ -1254,7 +1254,7 @@ namespace Tnb.WarehouseMgr
[HttpPost, NonUnify, AllowAnonymous]
public async Task<Entities.Dto.Outputs.Result> DistributeZCCToYCL(MaterialTransferDistributeToZCCInput input)
{
s_taskDistributeZCCToYCL.Wait();
await _s_taskExecuteSemaphore_F1ZCCOutstock.WaitAsync();
try
{
@@ -1375,7 +1375,7 @@ namespace Tnb.WarehouseMgr
}
finally
{
s_taskDistributeZCCToYCL.Release();
_s_taskExecuteSemaphore_F1ZCCOutstock.Release(); ;
InvokeGenPretaskExcute();
}
return await ToApiResult(HttpStatusCode.OK, "成功");