From 96a94a59c08f55712ba04eb413e7f61739f11f66 Mon Sep 17 00:00:00 2001
From: zhanghonglin <zhanghonglin@hnkhzn.com>
Date: 星期二, 19 八月 2025 17:09:31 +0800
Subject: [PATCH] 定时一周自动清楚重量厚度,不合格背景红色提示、筛选功能

---
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs |   77 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 77 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs"
index f114e4f..4cc3cea 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs"
@@ -23,6 +23,8 @@
 using WIDESEAWCS_QuartzJob.DeviceEnum;
 using WIDESEAWCS_Core.Enums;
 using WIDESEAWCS_Common.LocationEnum;
+using WIDESEAWCS_Common.StockEnum;
+using WIDESEAWCS_Common.WeightThicknessEnum;
 
 namespace WIDESEAWCS_WCSServer.Controllers.System
 {
@@ -157,6 +159,54 @@
                             foreach (var item in enums)
                             {
                                 FieldInfo? fieldInfo = type.GetField(((DeviceStatusEnum)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++;
+                            }
+
+                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+                        }
+                        break;
+                    case "mateType":
+                        {
+                            List<object> data = new List<object>();
+                            Type type = typeof(MateTypeEnum);
+                            List<int> enums = Enum.GetValues(type).Cast<int>().ToList();
+                            int index = 0;
+                            foreach (var item in enums)
+                            {
+                                FieldInfo? fieldInfo = type.GetField(((MateTypeEnum)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++;
+                            }
+
+                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+                        }
+                        break;
+                    case "stock":
+                        {
+                            List<object> data = new List<object>();
+                            Type type = typeof(stockEnum);
+                            List<int> enums = Enum.GetValues(type).Cast<int>().ToList();
+                            int index = 0;
+                            foreach (var item in enums)
+                            {
+                                FieldInfo? fieldInfo = type.GetField(((stockEnum)item).ToString());
                                 DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                 if (description != null)
                                 {
@@ -421,6 +471,33 @@
                             result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                         }
                         break;
+                    case "WeightThicknessEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(WeightThicknessEnum);
+                                List<int> enums = Enum.GetValues(typeof(WeightThicknessEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(WeightThicknessEnum).GetField(((WeightThicknessEnum)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++;
+                                }
+                            }
+
+                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+                        }
+                        break;
                     case "locationTypeEnum":
                         {
                             List<object> data = new List<object>();

--
Gitblit v1.9.3