From 03ae5d9a6570586f2f30362d7fa3da3bbf25c3b3 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期四, 10 十月 2024 16:48:32 +0800
Subject: [PATCH] 添加单点登录,修改界面单表修改数据-修改人修改时间-问题

---
 WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs |   29 +++++++++++++++++++++++++++--
 1 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
index 828ad04..e619023 100644
--- a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
+++ b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
@@ -36,7 +36,7 @@
                         {
                             Type type = typeof(IDevice);
                             var basePath = AppContext.BaseDirectory;
-                            string path = Path.Combine(basePath, $"WIDESEAWCS_QuartzJob.dll");
+                            string path = Path.Combine(basePath, Assembly.GetExecutingAssembly().GetName().Name);
                             Assembly assembly = Assembly.LoadFrom(path);
                             List<Type> types = assembly.GetTypes().Where(x => type.IsAssignableFrom(x) && !x.IsAbstract && !x.IsInterface).ToList();
                             List<object> data = new List<object>();
@@ -55,8 +55,8 @@
 
                             object obj = new { DicNo = key, Config = "", Data = data };
                             result = obj.Serialize();
-                            break;
                         }
+                        break;
                     case "jobAssembly":
                         {
                             object obj = new { DicNo = key, Config = "", Data = new List<object>() { new { key = "WIDESEAWCS_Tasks", value = "WIDESEAWCS_Tasks" } } };
@@ -277,6 +277,31 @@
                             result = JsonConvert.SerializeObject(obj);
                         }
                         break;
+                    case "inOutType":
+                        {
+                            List<object> data = new List<object>();
+                            Type type = typeof(RouterInOutType);
+                            List<int> enums = Enum.GetValues(typeof(RouterInOutType)).Cast<int>().ToList();
+                            int index = 0;
+                            foreach (var item in enums)
+                            {
+                                FieldInfo? fieldInfo = typeof(RouterInOutType).GetField(((RouterInOutType)item).ToString());
+                                DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
+                                if (description != null)
+                                {
+                                    data.Add(new { key = item.ToString(), value = description.Description });
+                                }
+                                else
+                                {
+                                    data.Add(new { key = item.ToString(), value = item.ToString() });
+                                }
+                                index++;
+                            }
+
+                            object obj = new { DicNo = key, Config = "", Data = data };
+                            result = obj.Serialize();
+                        }
+                        break;
                 }
                 return result;
             }

--
Gitblit v1.9.3