二楼缓存仓和暂存仓出入库优化

This commit is contained in:
2024-08-08 11:48:51 +08:00
parent 18dac9b6b2
commit 433be346b9
7 changed files with 76 additions and 34 deletions

View File

@@ -1229,9 +1229,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
/// <returns></returns>
public async void (object? args)
{
if (s_task送空托到上升降区.CurrentCount == 0)
if (_wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.CurrentCount == 0)
return;
await s_task送空托到上升降区.WaitAsync();
await _wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.WaitAsync();
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
try
@@ -1355,7 +1355,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
}
finally
{
s_task送空托到上升降区.Release();
_wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.Release();
if (!db_Floor2timer送空托到上升降区.Ado.Transaction.IsNull())
try { await db_Floor2timer送空托到上升降区.Ado.CommitTranAsync(); } catch { };
_wareHouseService.GenTaskExecute();
@@ -1371,9 +1371,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
/// <returns></returns>
public async void (object? args)
{
if (s_task送满托到下升降区.CurrentCount == 0)
if (_wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.CurrentCount == 0)
return;
await s_task送满托到下升降区.WaitAsync();
await _wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.WaitAsync();
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
try
@@ -1533,7 +1533,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
}
finally
{
s_task送满托到下升降区.Release();
_wareHouseService.s_taskExecuteSemaphore_F2ZCCOutstock.Release();
if (!db_Floor2timer送满托到下升降区.Ado.Transaction.IsNull())
try { await db_Floor2timer送满托到下升降区.Ado.CommitTranAsync(); } catch { };
_wareHouseService.GenTaskExecute();
@@ -1550,9 +1550,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
/// <returns></returns>
public async void (object? args)
{
if (s_task移走上升降区未生成预任务且满托的料架.CurrentCount == 0)
if (_wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.CurrentCount == 0)
return;
await s_task移走上升降区未生成预任务且满托的料架.WaitAsync();
await _wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.WaitAsync();
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
try
@@ -1658,7 +1658,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
}
finally
{
s_task移走上升降区未生成预任务且满托的料架.Release();
_wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.Release();
if (!db_Floor2timer移走上升降区未生成预任务且满托的料架.Ado.Transaction.IsNull())
// 数据库连接断开时会报错
try { await db_Floor2timer移走上升降区未生成预任务且满托的料架.Ado.CommitTranAsync(); } catch { };
@@ -1676,9 +1676,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
/// <returns></returns>
public async void (object? args)
{
if (s_task移走下升降区未生成预任务且空托的料架.CurrentCount == 0)
if (_wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.CurrentCount == 0)
return;
await s_task移走下升降区未生成预任务且空托的料架.WaitAsync();
await _wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.WaitAsync();
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
try
@@ -1789,7 +1789,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
}
finally
{
s_task移走下升降区未生成预任务且空托的料架.Release();
_wareHouseService.s_taskExecuteSemaphore_F2ZCCInstock.Release();
if (!db_Floor2timer移走下升降区未生成预任务且空托的料架.Ado.Transaction.IsNull())
try { await db_Floor2timer移走下升降区未生成预任务且空托的料架.Ado.CommitTranAsync(); } catch { };
_wareHouseService.GenTaskExecute();
@@ -2539,9 +2539,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
// 二楼料架配送
Floor2timer送空托到上升降区 = new Timer(, null, TimeSpan.Zero, TimeSpan.FromSeconds(30));
Floor2timer送满托到下升降区 = new Timer(, null, TimeSpan.Zero, TimeSpan.FromSeconds(30));
Floor2timer送满托到下升降区 = new Timer(, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30));
Floor2timer移走上升降区未生成预任务且满托的料架 = new Timer(, null, TimeSpan.Zero, TimeSpan.FromSeconds(30));
Floor2timer移走下升降区未生成预任务且空托的料架 = new Timer(, null, TimeSpan.Zero, TimeSpan.FromSeconds(30));
Floor2timer移走下升降区未生成预任务且空托的料架 = new Timer(, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(30));
GenTaskExecutetimer = new Timer(GenTaskExecute, null, TimeSpan.Zero, TimeSpan.FromSeconds(30));