From 227cf5ae845198eb25552d3db7509c0ed517f69a Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 07 六月 2024 14:20:13 +0800
Subject: [PATCH] 获取VK4和VK5的所有显示工位车轮数据

---
 代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/VK4Job.cs |   40 ++++------------------------------------
 1 files changed, 4 insertions(+), 36 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/VK4Job.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/VK4Job.cs"
index 9023d59..e5f1b95 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/VK4Job.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/VK4Job.cs"
@@ -6,7 +6,7 @@
 using System.Reflection;
 using System.Text;
 using System.Threading.Tasks;
-using WIDESEA_Comm.PLCDBItem;
+using WIDESEA_Comm;
 using WIDESEA_Core.Extensions;
 using WIDESEA_WCS.Jobs;
 using WIDESEA_WCS.WCSClient;
@@ -30,7 +30,6 @@
             return Task.CompletedTask;
         }
 
-        public static StackerReadDBItem StackerDBItem;
         private void DoAction(IJobExecutionContext context)
         {
             var client = context.JobDetail.JobDataMap.Get("JobParams") as PLCClient;
@@ -40,40 +39,9 @@
                 client.Connect();
                 return;
             }
-            PropertyInfo[] propertyInfos = typeof(StackerReadDBItem).GetProperties();
-            if (StackerDBItem == null)
-            {
-                StackerDBItem = new();
-                //StackerDBItem.OnReadStackerSignal += HandleReadStackerSignal;
-            }
-            List<StackerReadDBItem> StackerReadDBItems = new List<StackerReadDBItem>();
-            var groups = client.itemGroups.OrderBy(x => x.Methods).ThenBy(x=>x.name).GroupBy(x => x.Methods);
-            foreach (var key in groups)
-            {
-                //foreach (var item in key)
-                //{
-                    for (int i = 0; i < propertyInfos.Length; i++)
-                    {
-                        if (i == 0)
-                        {
-                            StackerDBItem.StackerNo = key.First(x=>true).Methods;
-                        }
-                        else
-                        {
-                            DBItemGroup group = key.FirstOrDefault(x => x.name == propertyInfos[i].Name);
-                            if (group != null)
-                            {
-                                object readData = DBExtension.Read(group, client);
-                                object obj = propertyInfos[i].GetValue(StackerDBItem);
-                                if (obj != readData)
-                                    propertyInfos[i].SetValue(StackerDBItem, readData);
-                            }
-                        }
-                    }
-                    StackerReadDBItems.Add(StackerDBItem);
-                //}
-            }
-            
+
+            WheelDBItem.VK4WheelDBItem = new List<WheelDBItem>();
+            GetDate.GetWheelDate(client);
         }
     }
 }

--
Gitblit v1.9.3