From d5c610cbf2451bbf9a103c295ae51e541ad98951 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 18 二月 2025 17:16:26 +0800
Subject: [PATCH] 1
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
index 922ed3a..6977697 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs"
@@ -15,7 +15,6 @@
using System.Threading.Tasks;
using WIDESEAWCS_Common.StackerCraneEnum;
using WIDESEAWCS_Common.TaskEnum;
-using WIDESEAWCS_Common.WMSInfo;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_IShuttleCar;
@@ -31,12 +30,11 @@
using WIDESEAWCS_TaskInfoService;
using WIDESEAWCS_Tasks.ConveyorLineJob;
using WIDESEAWCS_Tasks.StackerCraneJob;
-using static WIDESEAWCS_Common.WMSInfo.RequestWMS;
namespace WIDESEAWCS_Tasks
{
[DisallowConcurrentExecution]
- public partial class CommonStackerCraneJob : IJob
+ public partial class CommonStackerCraneJob : JobBase, IJob
{
private readonly ITaskService _taskService;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
@@ -61,7 +59,7 @@
if (commonStackerCrane != null)
{
#region 淇″彿浜や簰澶勭悊
- Heartbeat(commonStackerCrane);
+ //Heartbeat(commonStackerCrane);
ShuttleCarSignal(commonStackerCrane);
#endregion
@@ -104,9 +102,13 @@
}
else
{
+ task.ShuttleCarCode = ShuttleCar?.ShuttleCarCode;
+ _taskService.UpdateData(task);
SendTask(commonStackerCrane, task);//涓嬪彂鍫嗗灈鏈轰换鍔�
}
}
+ else
+ SendTask(commonStackerCrane, task);//涓嬪彂鍫嗗灈鏈轰换鍔�
}
}
@@ -135,7 +137,7 @@
{
if (commonStackerCrane.SetValue(StackerCraneDBName.CommandSend, sendFlag))
{
- commonStackerCrane.LastTaskType = task.TaskType;
+ if (task.TaskType != (int)TaskOtherTypeEnum.RelocationCar) commonStackerCrane.LastTaskType = task.TaskType;
_taskService.UpdateTaskStatusToNext(task.TaskNum);
}
}
@@ -169,9 +171,12 @@
{
if (commonStackerCrane != null)
{
+ //if (_taskService.GetTaskInfo(commonStackerCrane.CurrentTaskNum) != null)
+ //{
Console.Out.WriteLine($"鍫嗗灈鏈轰换鍔″畬鎴愶細[{commonStackerCrane.CurrentTaskNum}]锛泏DateTime.Now}");
- var Status = _taskService.StackCraneTaskCompleted(commonStackerCrane.CurrentTaskNum).Status;///闇�淇敼锛侊紒锛侊紒锛侊紒锛侊紒锛侊紒锛侊紒锛侊紒
+ var Status = _taskService.StackCraneTaskCompleted(commonStackerCrane.CurrentTaskNum).Status;
commonStackerCrane.SetValue(StackerCraneDBName.ConfirmComplete, Status);
+ //}
}
}
/// <summary>
@@ -226,7 +231,7 @@
task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
}
}
- if (task != null && task.TargetAddress != "SC01") return task;//鍏ュ簱浠诲姟鍒ゆ柇鏄惁宸插垎閰嶈揣浣嶏紝WMS鍒ゆ柇璐т綅鐘舵�佹槸鍚﹀厑璁告斁璐�
+ if (task != null && !string.IsNullOrEmpty(task.TargetAddress)) return task;//鍏ュ簱浠诲姟鍒ゆ柇鏄惁宸插垎閰嶈揣浣嶏紝WMS鍒ゆ柇璐т綅鐘舵�佹槸鍚﹀厑璁告斁璐�
return task;
}
@@ -330,7 +335,7 @@
return null;
}
}
- else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
+ else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup || task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OtherGroup)
{
string[] targetCodes = task.NextAddress.Split("-");
if (targetCodes.Length == 3)
--
Gitblit v1.9.3