From dc06f58d8ed537555fd529551180f43a0586ec3f Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期日, 22 六月 2025 11:44:43 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs |  853 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 768 insertions(+), 85 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
index 9743d4b..601ae7b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
@@ -1,5 +1,6 @@
 锘縰sing Newtonsoft.Json;
 using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -7,6 +8,12 @@
 using System.Reflection;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEA_Common.CommonEnum;
+using WIDESEA_Common.LocationEnum;
+using WIDESEA_Common.MaterielEnum;
+using WIDESEA_Common.OrderEnum;
+using WIDESEA_Common.StockEnum;
+using WIDESEA_Common.TaskEnum;
 using WIDESEA_Core;
 using WIDESEA_Core.BaseRepository;
 using WIDESEA_Core.BaseServices;
@@ -14,7 +21,9 @@
 using WIDESEA_Core.DB;
 using WIDESEA_Core.Enums;
 using WIDESEA_Core.Helper;
+using WIDESEA_Core.Utilities;
 using WIDESEA_DTO.System;
+using WIDESEA_IBasicRepository;
 using WIDESEA_ISystemRepository;
 using WIDESEA_ISystemService;
 using WIDESEA_Model.Models;
@@ -25,19 +34,33 @@
     {
         private readonly IUnitOfWorkManage _unitOfWorkManage;
         private readonly ICacheService _cacheService;
+        private readonly IBasicRepository _basicRepository;
+        private readonly ISupplierInfoRepository _supplierInfoRepository;
+        private readonly ISys_RoleDataPermissionRepository _roleDataPermissionRepository;
 
-        public Sys_DictionaryService(ISys_DictionaryRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService) : base(BaseDal)
+        public Sys_DictionaryService(ISys_DictionaryRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService, IBasicRepository basicRepository, ISys_RoleDataPermissionRepository roleDataPermissionRepository, ISupplierInfoRepository supplierInfoRepository) : base(BaseDal)
         {
             _unitOfWorkManage = unitOfWorkManage;
             _cacheService = cacheService;
+            _basicRepository = basicRepository;
+            _roleDataPermissionRepository = roleDataPermissionRepository;
+            _supplierInfoRepository = supplierInfoRepository;
         }
 
         public ISys_DictionaryRepository Repository => BaseDal;
 
         public override WebResponseContent AddData(SaveModel saveModel)
         {
+            string validResult = typeof(Sys_Dictionary).ValidateDicInEntity(saveModel.MainData, true, TProperties);
+
+            if (!string.IsNullOrEmpty(validResult))
+            {
+                return WebResponseContent.Instance.Error(validResult);
+            }
+
             Sys_Dictionary dictionary = saveModel.MainData.DicToModel<Sys_Dictionary>();
-            _cacheService.Remove(dictionary.DicNo);
+            if (!string.IsNullOrEmpty(_cacheService.Get(dictionary.DicNo)))
+                _cacheService.Remove(dictionary.DicNo);
             return base.AddData(saveModel);
         }
 
@@ -75,12 +98,13 @@
                     DicNo = s.DicNo,
                     Config = s.Config,
                     //dbSql = s.Sql,
-                    Data = s.DicList.OrderByDescending(o => o.OrderNo).Select(list => new { key = list.DicValue, value = list.DicName })
+                    Data = s.DicList.OrderByDescending(o => o.OrderNo).Select(list => new { key = list.DicValue, value = list.DicName }),
+                    SaveCache = false
                 }).ToList();
 
                 foreach (var item in selectDics)
                 {
-                    if (!_cacheService.Exists(item.DicNo))
+                    if (!_cacheService.Exists(item.DicNo) && item.SaveCache)
                     {
                         _cacheService.Add(item.DicNo, item.Serialize());
                     }
@@ -117,8 +141,11 @@
 
                         foreach (var item in dics)
                         {
-                            dicList.Remove(item);
-                            cusDics.Add(item);
+                            if (dicNos.Contains(item) && !cacheDicNos.Contains(item))
+                            {
+                                dicList.Remove(item);
+                                cusDics.Add(item);
+                            }
                         }
 
                         foreach (var item in cusDics)
@@ -127,7 +154,7 @@
                             if (vueDictionaryDTO != null)
                             {
                                 vueDictionaryDTOs.Add(vueDictionaryDTO);
-                                if (!_cacheService.Exists(item))
+                                if (!_cacheService.Exists(item) && vueDictionaryDTO.SaveCache)
                                 {
                                     _cacheService.Add(item, vueDictionaryDTO.Serialize());
                                 }
@@ -150,15 +177,145 @@
             {
                 switch (key)
                 {
-                    case "inboundState":
+                    case "warehouses":
                         {
                             List<object> data = new List<object>();
-                            Type type = typeof(InboundStatusEnum);
-                            List<int> enums = Enum.GetValues(typeof(InboundStatusEnum)).Cast<int>().ToList();
+
+                            {
+                                List<Dt_Warehouse> warehouses = _basicRepository.WarehouseRepository.QueryData();
+                                int index = 0;
+                                foreach (var item in warehouses)
+                                {
+                                    data.Add(new { key = item.WarehouseId, value = item.WarehouseName });
+                                    index++;
+                                }
+                            }
+
+                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+                        }
+                        break;
+                    case "suppliers":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                List<Dt_SupplierInfo> supplierInfos = _supplierInfoRepository.QueryData();
+                                int index = 0;
+                                foreach (var item in supplierInfos)
+                                {
+                                    data.Add(new { key = item.SupplierCode, value = item.SupplierCode });
+                                    index++;
+                                }
+                            }
+
+                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+                        }
+                        break;
+                    case "materials":
+                        {
+                            {
+                                List<object> data = new List<object>();
+
+                                {
+                                    List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData();
+                                    int index = 0;
+                                    foreach (var item in materielInfos)
+                                    {
+                                        data.Add(new { key = item.MaterielCode, value = item.MaterielCode });
+                                        index++;
+                                    }
+                                }
+
+                                result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+                            }
+                        }
+                        break;
+                    case "returnStatus":
+                        {
+                            List<object> data = new List<object>();
+                            Type type = typeof(ReturnOrderStatusEnum);
+                            List<int> enums = Enum.GetValues(typeof(ReturnOrderStatusEnum)).Cast<int>().ToList();
                             int index = 0;
                             foreach (var item in enums)
                             {
-                                FieldInfo? fieldInfo = typeof(InboundStatusEnum).GetField(((InboundStatusEnum)item).ToString());
+                                FieldInfo? fieldInfo = typeof(ReturnOrderStatusEnum).GetField(((ReturnOrderStatusEnum)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 "returnType":
+                        {
+                            List<object> data = new List<object>();
+                            Type type = typeof(ReturnOrderTypeEnum);
+                            List<int> enums = Enum.GetValues(typeof(ReturnOrderTypeEnum)).Cast<int>().ToList();
+                            int index = 0;
+                            foreach (var item in enums)
+                            {
+                                FieldInfo? fieldInfo = typeof(ReturnOrderTypeEnum).GetField(((ReturnOrderTypeEnum)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 "taskType":
+                        {
+                            List<object> data = new List<object>();
+
+                            #region TaskTypeEnum
+                            {
+                                Type type = typeof(TaskTypeEnum);
+                                List<int> enums = Enum.GetValues(typeof(TaskTypeEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(TaskTypeEnum).GetField(((TaskTypeEnum)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++;
+                                }
+                            }
+                            #endregion
+
+                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+                        }
+                        break;
+                    case "inboundState":
+                        {
+                            List<object> data = new List<object>();
+                            Type type = typeof(InOrderStatusEnum);
+                            List<int> enums = Enum.GetValues(typeof(InOrderStatusEnum)).Cast<int>().ToList();
+                            int index = 0;
+                            foreach (var item in enums)
+                            {
+                                FieldInfo? fieldInfo = typeof(InOrderStatusEnum).GetField(((InOrderStatusEnum)item).ToString());
                                 DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                 if (description != null)
                                 {
@@ -177,12 +334,37 @@
                     case "outboundStatusEnum":
                         {
                             List<object> data = new List<object>();
-                            Type type = typeof(OutboundStatusEnum);
-                            List<int> enums = Enum.GetValues(typeof(OutboundStatusEnum)).Cast<int>().ToList();
+                            Type type = typeof(OutOrderStatusEnum);
+                            List<int> enums = Enum.GetValues(typeof(OutOrderStatusEnum)).Cast<int>().ToList();
                             int index = 0;
                             foreach (var item in enums)
                             {
-                                FieldInfo? fieldInfo = typeof(OutboundStatusEnum).GetField(((OutboundStatusEnum)item).ToString());
+                                FieldInfo? fieldInfo = typeof(OutOrderStatusEnum).GetField(((OutOrderStatusEnum)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 "outLockStockStatusEnum":
+                        {
+                            List<object> data = new List<object>();
+                            Type type = typeof(OutLockStockStatusEnum);
+                            List<int> enums = Enum.GetValues(typeof(OutLockStockStatusEnum)).Cast<int>().ToList();
+                            int index = 0;
+                            foreach (var item in enums)
+                            {
+                                FieldInfo? fieldInfo = typeof(OutLockStockStatusEnum).GetField(((OutLockStockStatusEnum)item).ToString());
                                 DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                 if (description != null)
                                 {
@@ -284,12 +466,12 @@
                             List<object> data = new List<object>();
 
                             {
-                                Type type = typeof(CreateType);
-                                List<int> enums = Enum.GetValues(typeof(CreateType)).Cast<int>().ToList();
+                                Type type = typeof(OrderCreateTypeEnum);
+                                List<int> enums = Enum.GetValues(typeof(OrderCreateTypeEnum)).Cast<int>().ToList();
                                 int index = 0;
                                 foreach (var item in enums)
                                 {
-                                    FieldInfo? fieldInfo = typeof(CreateType).GetField(((CreateType)item).ToString());
+                                    FieldInfo? fieldInfo = typeof(OrderCreateTypeEnum).GetField(((OrderCreateTypeEnum)item).ToString());
                                     DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                     if (description != null)
                                     {
@@ -418,25 +600,25 @@
                         {
                             List<object> data = new List<object>();
 
-                            {
-                                Type type = typeof(TaskTypeEnum);
-                                List<int> enums = Enum.GetValues(typeof(TaskTypeEnum)).Cast<int>().ToList();
-                                int index = 0;
-                                foreach (var item in enums)
-                                {
-                                    FieldInfo? fieldInfo = typeof(TaskTypeEnum).GetField(((TaskTypeEnum)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++;
-                                }
-                            }
+                            //{
+                            //    Type type = typeof(TaskTypeEnum);
+                            //    List<int> enums = Enum.GetValues(typeof(TaskTypeEnum)).Cast<int>().ToList();
+                            //    int index = 0;
+                            //    foreach (var item in enums)
+                            //    {
+                            //        FieldInfo? fieldInfo = typeof(TaskTypeEnum).GetField(((TaskTypeEnum)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 };
                         }
@@ -446,12 +628,12 @@
                             List<object> data = new List<object>();
 
                             {
-                                Type type = typeof(InTaskStatusEnum);
-                                List<int> enums = Enum.GetValues(typeof(InTaskStatusEnum)).Cast<int>().ToList();
+                                Type type = typeof(TaskStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(TaskStatusEnum)).Cast<int>().ToList();
                                 int index = 0;
                                 foreach (var item in enums)
                                 {
-                                    FieldInfo? fieldInfo = typeof(InTaskStatusEnum).GetField(((InTaskStatusEnum)item).ToString());
+                                    FieldInfo? fieldInfo = typeof(TaskStatusEnum).GetField(((TaskStatusEnum)item).ToString());
                                     DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                     if (description != null)
                                     {
@@ -465,46 +647,25 @@
                                 }
                             }
 
-                            {
-                                Type type = typeof(OutTaskStatusEnum);
-                                List<int> enums = Enum.GetValues(typeof(OutTaskStatusEnum)).Cast<int>().ToList();
-                                int index = 0;
-                                foreach (var item in enums)
-                                {
-                                    FieldInfo? fieldInfo = typeof(OutTaskStatusEnum).GetField(((OutTaskStatusEnum)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++;
-                                }
-                            }
-
-                            {
-                                Type type = typeof(AGVTaskStatusEnum);
-                                List<int> enums = Enum.GetValues(typeof(AGVTaskStatusEnum)).Cast<int>().ToList();
-                                int index = 0;
-                                foreach (var item in enums)
-                                {
-                                    FieldInfo? fieldInfo = typeof(AGVTaskStatusEnum).GetField(((AGVTaskStatusEnum)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++;
-                                }
-                            }
-
+                            //{
+                            //    Type type = typeof(TaskStatusEnum);
+                            //    List<int> enums = Enum.GetValues(typeof(TaskStatusEnum)).Cast<int>().ToList();
+                            //    int index = 0;
+                            //    foreach (var item in enums)
+                            //    {
+                            //        FieldInfo? fieldInfo = typeof(TaskStatusEnum).GetField(((TaskStatusEnum)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;
@@ -535,12 +696,12 @@
                     case "stockChangeType":
                         {
                             List<object> data = new List<object>();
-                            Type type = typeof(StockChangeType);
-                            List<int> enums = Enum.GetValues(typeof(StockChangeType)).Cast<int>().ToList();
+                            Type type = typeof(StockChangeTypeEnum);
+                            List<int> enums = Enum.GetValues(typeof(StockChangeTypeEnum)).Cast<int>().ToList();
                             int index = 0;
                             foreach (var item in enums)
                             {
-                                FieldInfo? fieldInfo = typeof(StockChangeType).GetField(((StockChangeType)item).ToString());
+                                FieldInfo? fieldInfo = typeof(StockChangeTypeEnum).GetField(((StockChangeTypeEnum)item).ToString());
                                 DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                 if (description != null)
                                 {
@@ -559,12 +720,12 @@
                     case "outStockStatus":
                         {
                             List<object> data = new List<object>();
-                            Type type = typeof(OutStockStatus);
-                            List<int> enums = Enum.GetValues(typeof(OutStockStatus)).Cast<int>().ToList();
+                            Type type = typeof(OutLockStockStatusEnum);
+                            List<int> enums = Enum.GetValues(typeof(OutLockStockStatusEnum)).Cast<int>().ToList();
                             int index = 0;
                             foreach (var item in enums)
                             {
-                                FieldInfo? fieldInfo = typeof(OutStockStatus).GetField(((OutStockStatus)item).ToString());
+                                FieldInfo? fieldInfo = typeof(OutLockStockStatusEnum).GetField(((OutLockStockStatusEnum)item).ToString());
                                 DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                 if (description != null)
                                 {
@@ -580,6 +741,528 @@
                             result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                         }
                         break;
+                    case "receiveOrderTypeEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(ReceiveOrderTypeEnum);
+                                List<int> enums = Enum.GetValues(typeof(ReceiveOrderTypeEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(ReceiveOrderTypeEnum).GetField(((ReceiveOrderTypeEnum)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 "authorityScope":
+                        {
+                            if (App.User.IsSuperAdmin)
+                            {
+                                List<Dt_Warehouse> warehouses = _basicRepository.WarehouseRepository.QueryData(x => true);
+                                var data = warehouses.Select(x => new { key = x.WarehouseId, value = x.WarehouseName });
+                                result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+                            }
+                            else
+                            {
+                                List<Sys_RoleDataPermission> roleDataPermissions = _roleDataPermissionRepository.QueryData(x => x.RoleId == App.User.RoleId);
+                                var data = roleDataPermissions.Select(x => new { key = x.WarehouseId, value = x.WarehouseName });
+                                result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+                            }
+                        }
+                        break;
+                    case "authorityScopes":
+                        {
+                            List<Sys_Role> roles = Repository.Db.Queryable<Sys_Role>().ToList();
+                            List<object> data = new List<object>();
+                            foreach (var item in roles)
+                            {
+                                List<Sys_RoleDataPermission> roleDataPermissions = _roleDataPermissionRepository.QueryData(x => x.RoleId == item.RoleId);
+                                string value = "";
+                                foreach (var roleDataPermission in roleDataPermissions)
+                                {
+                                    value += (roleDataPermission.WarehouseName + ",");
+                                }
+                                if (roleDataPermissions.Count > 0)
+                                    data.Add(new { key = item.RoleId, value = value.Substring(0, value.Length - 1) });
+                                else
+                                    data.Add(new { key = item.RoleId, value = "鏃犳潈闄�" });
+                            }
+                            data.Add(new { key = -1, value = "鏃犳潈闄�" });
+                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data, SaveCache = false };
+                        }
+
+                        break;
+                    case "locationChangeType":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(LocationChangeType);
+                                List<int> enums = Enum.GetValues(typeof(LocationChangeType)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(LocationChangeType).GetField(((LocationChangeType)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 "receiveStatus":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(ReceiveOrderStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(ReceiveOrderStatusEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(ReceiveOrderStatusEnum).GetField(((ReceiveOrderStatusEnum)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 "purchaseType":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(PurchaseOrderTypeEnum);
+                                List<string> enums = Enum.GetValues(typeof(PurchaseOrderTypeEnum)).Cast<string>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    //FieldInfo? fieldInfo = typeof(PurchaseOrderTypeEnum).GetField(((PurchaseOrderTypeEnum)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 "purchaseOrderStatus":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(PurchaseOrderStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(PurchaseOrderStatusEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(PurchaseOrderStatusEnum).GetField(((PurchaseOrderStatusEnum)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 "printStatus":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(PrintStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(PrintStatusEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(PrintStatusEnum).GetField(((PrintStatusEnum)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 "checkOrderStatusEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(CheckOrderStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(CheckOrderStatusEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(CheckOrderStatusEnum).GetField(((CheckOrderStatusEnum)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 "checkAcceptEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(CheckAcceptEnum);
+                                List<string> enumNames = Enum.GetNames(typeof(CheckAcceptEnum)).ToList();
+                                int index = 0;
+                                foreach (var item in enumNames)
+                                {
+                                    FieldInfo? fieldInfo = typeof(CheckAcceptEnum).GetField((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 "checkUploadEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(CheckUploadEnum);
+                                List<int> enums = Enum.GetValues(typeof(CheckUploadEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(CheckUploadEnum).GetField(((CheckUploadEnum)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 "proStockAttributeEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(ProStockAttributeEnum);
+                                List<int> enums = Enum.GetValues(typeof(ProStockAttributeEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(ProStockAttributeEnum).GetField(((ProStockAttributeEnum)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 "materielSourceTypeEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(MaterielSourceTypeEnum);
+                                List<int> enums = Enum.GetValues(typeof(MaterielSourceTypeEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(MaterielSourceTypeEnum).GetField(((MaterielSourceTypeEnum)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 "materielTypeEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(MaterielTypeEnum);
+                                List<int> enums = Enum.GetValues(typeof(MaterielTypeEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(MaterielTypeEnum).GetField(((MaterielTypeEnum)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 "customerOutRuleEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(CustomerOutRuleEnum);
+                                List<int> enums = Enum.GetValues(typeof(CustomerOutRuleEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(CustomerOutRuleEnum).GetField(((CustomerOutRuleEnum)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 "proScrapStatusEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(ProScrapSheetStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(ProScrapSheetStatusEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(ProScrapSheetStatusEnum).GetField(((ProScrapSheetStatusEnum)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 "checkTypeEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(CheckTypeEnum);
+                                List<int> enums = Enum.GetValues(typeof(CheckTypeEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(CheckTypeEnum).GetField(((CheckTypeEnum)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 "inspectAcceptEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(InspectAcceptEnum);
+                                List<string> enumNames = Enum.GetNames(typeof(InspectAcceptEnum)).ToList();
+                                int index = 0;
+                                foreach (var item in enumNames)
+                                {
+                                    FieldInfo? fieldInfo = typeof(InspectAcceptEnum).GetField((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 "inspectResultEnum":
+                        {
+                            List<object> data = new List<object>();
+                            {
+                                Type type = typeof(InspectResultEnum);
+                                List<int> enums = Enum.GetValues(typeof(InspectResultEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(InspectResultEnum).GetField(((InspectResultEnum)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 "takeStockDetailStatusEnum":
+                        {
+                            List<object> data = new List<object>();
+                            {
+                                Type type = typeof(TakeStockDetailStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(TakeStockDetailStatusEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(TakeStockDetailStatusEnum).GetField(((TakeStockDetailStatusEnum)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;
                 }
                 return result;
             }

--
Gitblit v1.9.3