原材料调拨入库

This commit is contained in:
2024-08-20 17:58:28 +08:00
parent cac75ad03f
commit b28ffc9dea
5 changed files with 18 additions and 17 deletions

View File

@@ -117,6 +117,8 @@ namespace Tnb.ProductionMgr
public SemaphoreSlim s_taskF2KTPsupplement = new(1);
public SemaphoreSlim s_taskYCLInternalTransfer = new(1);
public SemaphoreSlim s_elevatortask = new(1);
private StackExRedisHelper _redisData;
private readonly IPrdInstockService _prdInstockService;
private readonly ISqlSugarRepository<RedisReadConfig> _repository;
@@ -1909,7 +1911,9 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
{
try
{
await _wareHouseService._s_GenTaskExecute.WaitAsync();
if (s_elevatortask.CurrentCount == 0)
return;
await s_elevatortask.WaitAsync();
List<WmsDistaskH> elevatorTasks = db_ElevatorTaskExceptionHandle.Queryable<WmsDistaskH>()
.Where(r => r.startlocation_code.Contains("DT") && r.endlocation_code.Contains("DT") && r.act_start_date == null && r.act_end_date == null
&& r.status != WmsWareHouseConst.TASK_BILL_STATUS_CANCEL_ID && r.status != WmsWareHouseConst.TASK_BILL_STATUS_COMPLE_ID).ToList();
@@ -1965,7 +1969,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
}
else
{
LoggerElevatorTask.LogError($"电梯 {e.elevator_code} 待执行的电梯任务数异常 目前是{group.Count()} 超过了两托");
LoggerElevatorTask.LogError($"【ElevatorTaskExceptionHandle】电梯 {e.elevator_code} 待执行的电梯任务数异常 目前是{group.Count()} 超过了两托");
}
}
else
@@ -1990,7 +1994,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
}
finally
{
_wareHouseService._s_GenTaskExecute.Release();
s_elevatortask.Release();
}
}