From 2ec78835e454cecb95e48a2be2cb0b8393674ec5 Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期二, 31 三月 2026 10:27:16 +0800
Subject: [PATCH] fix(Sys_Dictionary): 修复数字字典中文映射

---
 Code/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue                  |    7 
 Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json                |    2 
 Code/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs |   13 +
 Code/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs    |  302 ++++++++++++++++++++++++++++++++++++++++--
 Code/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue                     |    2 
 Code/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue                       |   31 ++--
 Code/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue                   |    1 
 Code/WMS/WIDESEA_WMSClient/src/views/stock/stock.vue                         |    4 
 8 files changed, 324 insertions(+), 38 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue b/Code/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue
index b6a588f..24a53e1 100644
--- a/Code/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue
+++ b/Code/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue
@@ -126,9 +126,10 @@
         field: "depth",
         title: "璐т綅娣卞害",
         type: "string",
-        width: 180,
-        align: "left",
-        hidden: true,
+        width: 100,
+        align: "center",
+        bind: { key: "locationDepth", data: [] },
+        // hidden: true,
       },
       {
         field: "locationType",
diff --git a/Code/WMS/WIDESEA_WMSClient/src/views/stock/stock.vue b/Code/WMS/WIDESEA_WMSClient/src/views/stock/stock.vue
index d1973a1..006da06 100644
--- a/Code/WMS/WIDESEA_WMSClient/src/views/stock/stock.vue
+++ b/Code/WMS/WIDESEA_WMSClient/src/views/stock/stock.vue
@@ -46,7 +46,7 @@
         { field: "locationCode", title: "璐т綅缂栧彿", type: "string" },
       ],
       [
-        { field: "warehouseId", title: "浠撳簱", type: "select", dataKey: "warehouses", data: [] },
+        { field: "warehouseId", title: "浠撳簱", type: "select", dataKey: "warehouseEnum", data: [] },
         { field: "stockStatus", title: "搴撳瓨鐘舵��", type: "select", dataKey: "stockStatusEmun", data: [] },
         { field: "outboundDate", title: "鍑哄簱鏃ユ湡", type: "datetime" },
       ],
@@ -79,7 +79,7 @@
       { field: "palletType", title: "鎵樼洏绫诲瀷", type: "int", width: 110, align: "left" },
       { field: "locationId", title: "璐т綅ID", type: "int", width: 110, align: "left", hidden: true },
       { field: "locationCode", title: "璐т綅缂栧彿", type: "string", width: 130, align: "left" },
-      { field: "warehouseId", title: "浠撳簱", type: "select", width: 110, align: "left", bind: { key: "warehouses", data: [] } },
+      { field: "warehouseId", title: "浠撳簱", type: "select", width: 110, align: "left", bind: { key: "warehouseEnum", data: [] } },
       { field: "stockStatus", title: "搴撳瓨鐘舵��", type: "int", width: 120, align: "left", bind: { key: "stockStatusEmun", data: [] } },
       { field: "outboundDate", title: "鍑哄簱鏃ユ湡", type: "datetime", width: 160, align: "left" },
       { field: "creater", title: "鍒涘缓浜�", type: "string", width: 100, align: "left" },
diff --git a/Code/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue b/Code/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue
index 22f2eea..f7ec3e1 100644
--- a/Code/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue
+++ b/Code/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue
@@ -91,7 +91,7 @@
           type: "select",
           width: 100,
           align: "left",
-          bind: { key: "warehouses", data: [] },
+          bind: { key: "warehouseEnum", data: [] },
         },
         {
           field: "creater",
diff --git a/Code/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue b/Code/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue
index 006847a..7266c31 100644
--- a/Code/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue
+++ b/Code/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue
@@ -120,20 +120,20 @@
         width: 220,
         align: "left",
       },
-      // {
-      //   field: "currentAddress",
-      //   title: "褰撳墠浣嶇疆",
-      //   type: "string",
-      //   width: 120,
-      //   align: "left",
-      // },
-      // {
-      //   field: "nextAddress",
-      //   title: "涓嬩竴浣嶇疆",
-      //   type: "string",
-      //   width: 120,
-      //   align: "left",
-      // },
+      {
+        field: "currentAddress",
+        title: "褰撳墠浣嶇疆",
+        type: "string",
+        width: 120,
+        align: "left",
+      },
+      {
+        field: "nextAddress",
+        title: "涓嬩竴浣嶇疆",
+        type: "string",
+        width: 120,
+        align: "left",
+      },
       {
         field: "exceptionMessage",
         title: "寮傚父淇℃伅",
@@ -154,6 +154,7 @@
         type: "int",
         width: 80,
         align: "left",
+        bind: { key: "locationDepth", data: [] },
       },
       {
         field: "dispatchertime",
@@ -161,7 +162,7 @@
         type: "datetime",
         width: 160,
         align: "left",
-        hidden:true,
+        // hidden:true,
       },
       {
         field: "wMSId",
diff --git a/Code/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue b/Code/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue
index c0ade98..4f2b25b 100644
--- a/Code/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue
+++ b/Code/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue
@@ -155,6 +155,7 @@
         type: "int",
         width: 80,
         align: "left",
+        bind: { key: "locationDepth", data: [] },
       },
       {
         field: "dispatchertime",
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs
index a134a94..a6bf59f 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationStatusEnum.cs
@@ -47,4 +47,17 @@
         [Description("澶ф墭鐩橀攣瀹�")]
         PalletLock = 99
     }
+    public enum LocationDepth
+    {
+        /// <summary>
+        /// 娴�
+        /// </summary>
+        [Description("娴�")]
+        shallow = 1,
+        /// <summary>
+        /// 娣�
+        /// </summary>
+        [Description("娣�")]
+        deep = 2,
+    }
 }
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs
index 4e2449d..f6ade60 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs
@@ -13,6 +13,7 @@
 using WIDESEA_Common.OrderEnum;
 using WIDESEA_Common.StockEnum;
 using WIDESEA_Common.TaskEnum;
+using WIDESEA_Common.WareHouseEnum;
 using WIDESEA_Core;
 using WIDESEA_Core.BaseRepository;
 using WIDESEA_Core.BaseServices;
@@ -146,20 +147,7 @@
                 vueDictionaryDTOs.AddRange(selectDics);
             }
 
-            //object GetSourceData(string dicNo, string dbSql, object data)
-            //{
-            //    if (string.IsNullOrEmpty(dbSql))
-            //    {
-            //        return data;
-            //    }
-            //    return BaseDal.QueryObjectDataBySql(dbSql, null);
-            //}
-            //List<VueDictionaryDTO> vueDictionaryDTOs = dicConfig.Select(item => new VueDictionaryDTO
-            //{
-            //    DicNo = item.dicNo,
-            //    Config = item.config,
-            //    Data = GetSourceData(item.dicNo, item.dbSql, item.list)
-            //}).ToList();
+
 
             try
             {
@@ -211,9 +199,291 @@
             {
                 switch (key)
                 {
-                    default:
-                        return result;
+                    case "taskTypeEnum":
+                        {
+                            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++;
+                                }
+                            }
+
+                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+                        }
+                        break;
+                    case "taskStatusEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(TaskInStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(TaskInStatusEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(TaskInStatusEnum).GetField(((TaskInStatusEnum)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(TaskOutStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(TaskOutStatusEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(TaskOutStatusEnum).GetField(((TaskOutStatusEnum)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(TaskRobotStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(TaskRobotStatusEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(TaskRobotStatusEnum).GetField(((TaskRobotStatusEnum)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 "enableStatusEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(EnableStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(EnableStatusEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(EnableStatusEnum).GetField(((EnableStatusEnum)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 "locationStatusEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(LocationStatusEnum);
+                                List<int> enums = Enum.GetValues(typeof(LocationStatusEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(LocationStatusEnum).GetField(((LocationStatusEnum)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 "enableEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(EnableEnum);
+                                List<int> enums = Enum.GetValues(typeof(EnableEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(EnableEnum).GetField(((EnableEnum)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 "locationDepth":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(LocationDepth);
+                                List<int> enums = Enum.GetValues(typeof(LocationDepth)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(LocationDepth).GetField(((LocationDepth)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>();
+
+                            {
+                                Type type = typeof(LocationTypeEnum);
+                                List<int> enums = Enum.GetValues(typeof(LocationTypeEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(LocationTypeEnum).GetField(((LocationTypeEnum)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 "stockStatusEmun":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(StockStatusEmun);
+                                List<int> enums = Enum.GetValues(typeof(StockStatusEmun)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(StockStatusEmun).GetField(((StockStatusEmun)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 "warehouseEnum":
+                        {
+                            List<object> data = new List<object>();
+
+                            {
+                                Type type = typeof(WarehouseEnum);
+                                List<int> enums = Enum.GetValues(typeof(WarehouseEnum)).Cast<int>().ToList();
+                                int index = 0;
+                                foreach (var item in enums)
+                                {
+                                    FieldInfo? fieldInfo = typeof(WarehouseEnum).GetField(((WarehouseEnum)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;
             }
             catch (Exception ex)
             {
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
index f360a67..a37ed70 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -28,7 +28,7 @@
       "Microsoft.AspNetCore.Mvc.ModelBinding": "Warning"
     }
   },
-  "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType,warehouses,suppliers,taskType,receiveStatus,purchaseType,purchaseOrderStatus,printStatus",
+  "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,locationDepth,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType,warehouses,suppliers,taskType,receiveStatus,purchaseType,purchaseOrderStatus,printStatus,warehouseEnum",
   "AllowedHosts": "*",
   "ConnectionStringsEncryption": false,
   "MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue

--
Gitblit v1.9.3