From be438dd071400936c44a1425ec8d886f63c83329 Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期五, 11 七月 2025 14:33:08 +0800 Subject: [PATCH] 1 --- WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs | 33 +++++++++++++++++++++++++++++---- 1 files changed, 29 insertions(+), 4 deletions(-) diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs index 3503bbe..469d70d 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json; +锘縰sing Microsoft.AspNetCore.Mvc.ViewFeatures; +using Newtonsoft.Json; using OfficeOpenXml.FormulaParsing.Excel.Functions.Information; using System; using System.Collections.Generic; @@ -174,6 +175,30 @@ result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; } break; + case "inoutType": + { + List<object> data = new List<object>(); + Type type = typeof(InoutTypeEnum); + List<int> enums = Enum.GetValues(typeof(InoutTypeEnum)).Cast<int>().ToList(); + int index = 0; + foreach (var item in enums) + { + FieldInfo? fieldInfo = typeof(InoutTypeEnum).GetField(((InoutTypeEnum)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 "outboundStatusEnum": { List<object> data = new List<object>(); @@ -203,12 +228,12 @@ List<object> data = new List<object>(); { - Type type = typeof(InOrderTypeEnum); - List<int> enums = Enum.GetValues(typeof(InOrderTypeEnum)).Cast<int>().ToList(); + Type type = typeof(OrderTypeEnum); + List<int> enums = Enum.GetValues(typeof(OrderTypeEnum)).Cast<int>().ToList(); int index = 0; foreach (var item in enums) { - FieldInfo? fieldInfo = typeof(InOrderTypeEnum).GetField(((InOrderTypeEnum)item).ToString()); + FieldInfo? fieldInfo = typeof(OrderTypeEnum).GetField(((OrderTypeEnum)item).ToString()); DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); if (description != null) { -- Gitblit v1.9.3