From 17e4c7e3e7b3ef60d9da6de3b2a39a14a53c38a0 Mon Sep 17 00:00:00 2001
From: z8018 <1282578289@qq.com>
Date: 星期三, 12 三月 2025 14:11:33 +0800
Subject: [PATCH] 1

---
 WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
index 5e14f93..d4e4555 100644
--- a/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
+++ b/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -6,6 +6,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core.Enums;
 using WIDESEAWCS_ITaskInfoRepository;
 using WIDESEAWCS_ITaskInfoService;
@@ -19,8 +20,8 @@
 
 namespace WIDESEAWCS_Tasks
 {
-    [DisallowConcurrentExecution]
-    public class CommonStackerCraneJob : IJob
+
+    public class CommonStackerCraneJob : JobBase, IJob
     {
         private readonly ITaskService _taskService;
         private readonly ITaskExecuteDetailService _taskExecuteDetailService;
@@ -42,6 +43,9 @@
                 CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams");
                 if (commonStackerCrane != null)
                 {
+                    commonStackerCrane.Communicator.IsReadAfterWrite = false;
+                    //short a = commonStackerCrane.Communicator.Read<short>("DB2.2.0");
+                    commonStackerCrane.SetValue<StackerCraneDBName,short>(StackerCraneDBName.StartLayer, 1);
                     if (!commonStackerCrane.IsEventSubscribed)
                     {
                         commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//璁㈤槄浠诲姟瀹屾垚浜嬩欢
@@ -73,8 +77,10 @@
             }
             catch (Exception ex)
             {
-                Console.WriteLine(nameof(CommonStackerCraneJob) + ":" + ex.ToString());
+                WriteError("CommonConveyorLineJob", "test", ex);
+                //Console.WriteLine(nameof(CommonStackerCraneJob) + ":" + ex.ToString());
             }
+            WriteDebug("CommonConveyorLineJob", "test");
             return Task.CompletedTask;
         }
 
@@ -283,5 +289,10 @@
             }
             return stackerCraneTaskCommand;
         }
+
+        public void Dispose()
+        {
+            GC.SuppressFinalize(this);
+        }
     }
 }

--
Gitblit v1.9.3