From 569e91c63636345391f741df049c9374a141a434 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期一, 26 八月 2024 08:57:33 +0800
Subject: [PATCH] 添加路由新建配置,重新导出种子数据

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

diff --git a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
index 4343eda..e619023 100644
--- a/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
+++ b/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Storage.cs
@@ -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