1
wankeda
2 天以前 be438dd071400936c44a1425ec8d886f63c83329
WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using 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)
                                    {