| | |
| | | using Newtonsoft.Json; |
| | | using Microsoft.AspNetCore.Mvc.ViewFeatures; |
| | | using Newtonsoft.Json; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Information; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | 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>(); |
| | |
| | | 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) |
| | | { |