From 8c6fd742db249ad4cc819cf041eb98d880a3ef73 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期四, 02 一月 2025 15:09:07 +0800
Subject: [PATCH] 1

---
 WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
index b1f3bab..f82ab1f 100644
--- a/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -36,7 +36,7 @@
 namespace WIDESEAWCS_Tasks
 {
     [DisallowConcurrentExecution]
-    public class CommonConveyorLineJob : JobBase, IJob
+    public class CommonConveyorLineJob : JobBase, IJob, IDisposable
     {
         private readonly ITaskService _taskService;
         private readonly ITaskExecuteDetailService _taskExecuteDetailService;
@@ -59,6 +59,11 @@
                 CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams");
                 if (conveyorLine != null)
                 {
+                    short[] values = conveyorLine.Communicator.Read<short>("DB2.0", 20);
+
+                    //bool result = conveyorLine.Communicator.Write("DB1.0", "AAABBB");
+                    //string testVal = conveyorLine.Communicator.Read<string>("DB1.0");
+
                     List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode);
                     List<Task> tasks = new List<Task>();
                     foreach (string childDeviceCode in childDeviceCodes)
@@ -218,5 +223,10 @@
                 Console.Out.WriteLine(content.Serialize());
             }
         }
+
+        public void Dispose()
+        {
+            GC.SuppressFinalize(this);
+        }
     }
 }

--
Gitblit v1.9.3