新增物料签收记录、调拨出库、电梯优化等
This commit is contained in:
@@ -96,6 +96,8 @@ namespace Tnb.ProductionMgr
|
||||
// 原材料仓内转移
|
||||
private static Timer? YCLInternalTransfertimer;
|
||||
|
||||
// 原材料仓内转移
|
||||
private static Timer? elevatorTimer;
|
||||
|
||||
public SemaphoreSlim s_taskCheckGet = new(1);
|
||||
public SemaphoreSlim s_taskScan = new(1);
|
||||
@@ -1907,10 +1909,12 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
{
|
||||
try
|
||||
{
|
||||
await _wareHouseService._s_GenTaskExecute.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).ToList();
|
||||
.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();
|
||||
|
||||
LoggerElevatorTask.Information($"【ElevatorTaskExceptionHandle】检查到需要恢复的电梯任务{elevatorTasks.Count}条 {string.Join(',', elevatorTasks.Select(x => x.bill_code))}");
|
||||
LoggerElevatorTask.Information($"【ElevatorTaskExceptionHandle】检查到需要恢复/执行的电梯任务{elevatorTasks.Count}条 {string.Join(',', elevatorTasks.Select(x => x.bill_code))}");
|
||||
|
||||
|
||||
if (elevatorTasks?.Count > 0)
|
||||
@@ -1927,10 +1931,12 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
// 三、四号梯发货带两托货
|
||||
string[] doubleCarryRunElevators =
|
||||
{
|
||||
"Elevator3","Elevator4"
|
||||
};
|
||||
"Elevator3","Elevator4"
|
||||
};
|
||||
if (doubleCarryRunElevators.Contains(e.elevator_code) && wmsDistaskHs[0].end_floor == 1)
|
||||
{
|
||||
LoggerElevatorTask.Information($"【GenTaskExecute】判断为三四号梯任务");
|
||||
LoggerElevatorTask.Information($"【GenTaskExecute】现在有{group.Count()}托货");
|
||||
// 电梯内放置两托货呼叫电梯下
|
||||
if (group.Count() == 2)
|
||||
{
|
||||
@@ -1939,6 +1945,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
wmsDistaskHs[0].device_id = e.device_id;
|
||||
wmsDistaskHs[1].device_id = e.device_id;
|
||||
}
|
||||
LoggerElevatorTask.Information($"【GenTaskExecute】呼叫电梯");
|
||||
await _wareHouseService.ExecuteTargetFloorTask(wmsDistaskHs);
|
||||
}
|
||||
// 一托货
|
||||
@@ -1963,23 +1970,28 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
}
|
||||
else
|
||||
{
|
||||
LoggerElevatorTask.Information($"【GenTaskExecute】判断为非三四号梯任务");
|
||||
if (e != null)
|
||||
{
|
||||
wmsDistaskHs[0].device_id = e.device_id;
|
||||
}
|
||||
LoggerElevatorTask.Information($"【GenTaskExecute】呼叫电梯");
|
||||
await _wareHouseService.ExecuteTargetFloorTask(wmsDistaskHs);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LoggerFloor2RackDelivery.LogError($"【ElevatorTaskExceptionHandle】{ex.Message}");
|
||||
LoggerFloor2RackDelivery.LogError($"【ElevatorTaskExceptionHandle】{ex.StackTrace}");
|
||||
}
|
||||
|
||||
|
||||
finally
|
||||
{
|
||||
_wareHouseService._s_GenTaskExecute.Release();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2606,15 +2618,14 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
// 停用
|
||||
//PackOutstockServicetimer = new Timer(PackOutstockService, null, TimeSpan.Zero, TimeSpan.FromSeconds(60));
|
||||
|
||||
ElevatorTaskExceptionHandleThread = new Thread(ElevatorTaskExceptionHandle);
|
||||
ElevatorTaskExceptionHandleThread.Start();
|
||||
|
||||
Floor4DMJ2MJXtimer = new Timer(Floor4DMJ2MJX, null, TimeSpan.Zero, TimeSpan.FromSeconds(30));
|
||||
Floor4MJX2MJCtimer = new Timer(Floor4MJX2MJC, null, TimeSpan.Zero, TimeSpan.FromSeconds(30));
|
||||
Floor4DMC2CPKtimer = new Timer(Floor4DMC2CPK, null, TimeSpan.Zero, TimeSpan.FromSeconds(30));
|
||||
|
||||
F2KTPsupplementtimer = new Timer(F2KTPsupplement, null, TimeSpan.Zero, TimeSpan.FromSeconds(30));
|
||||
YCLInternalTransfertimer = new Timer(YCLInternalTransfer, null, TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(185));
|
||||
|
||||
elevatorTimer = new Timer(ElevatorTaskExceptionHandle, null, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(20));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
@@ -2647,6 +2658,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
|
||||
ElevatorTaskExceptionHandleThread.Abort();
|
||||
F2KTPsupplementtimer?.Dispose();
|
||||
YCLInternalTransfertimer?.Dispose();
|
||||
elevatorTimer?.Dispose();
|
||||
}
|
||||
|
||||
#region 日志
|
||||
|
||||
Reference in New Issue
Block a user