From 23f7d0e0cf31ea6a7cde81bf23ef07091bd4f3a7 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 03 十一月 2025 14:22:35 +0800
Subject: [PATCH] 添加人工触发调拨单
---
新建文件夹/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs | 158 ++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 140 insertions(+), 18 deletions(-)
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
index 4e2449d..78469de 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
@@ -8,6 +8,7 @@
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Common;
using WIDESEA_Common.CommonEnum;
using WIDESEA_Common.LocationEnum;
using WIDESEA_Common.OrderEnum;
@@ -145,22 +146,6 @@
}
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
{
List<string> dicList = dicNos.ToList();
@@ -211,9 +196,146 @@
{
switch (key)
{
- default:
- return result;
+ case "taskStatusEnum":
+ {
+ List<object> data = new List<object>();
+ Type type = typeof(SupplyStatusEnum);
+ List<int> enums = Enum.GetValues(typeof(SupplyStatusEnum)).Cast<int>().ToList();
+ int index = 0;
+ foreach (var item in enums)
+ {
+ FieldInfo? fieldInfo = typeof(SupplyStatusEnum).GetField(((SupplyStatusEnum)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 "TacticsEnum":
+ {
+ List<object> data = new List<object>();
+ Type type = typeof(TacticsEnum);
+ List<int> enums = Enum.GetValues(typeof(TacticsEnum)).Cast<int>().ToList();
+ int index = 0;
+ foreach (var item in enums)
+ {
+ FieldInfo? fieldInfo = typeof(TacticsEnum).GetField(((TacticsEnum)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 "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 "MessageGroupByEnum":
+ {
+ List<object> data = new List<object>();
+ Type type = typeof(MessageGroupByEnum);
+ List<int> enums = Enum.GetValues(typeof(MessageGroupByEnum)).Cast<int>().ToList();
+ int index = 0;
+ foreach (var item in enums)
+ {
+ FieldInfo? fieldInfo = typeof(MessageGroupByEnum).GetField(((MessageGroupByEnum)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 "MessageStatusEnum":
+ {
+ List<object> data = new List<object>();
+ Type type = typeof(MessageStatusEnum);
+ List<int> enums = Enum.GetValues(typeof(MessageStatusEnum)).Cast<int>().ToList();
+ int index = 0;
+ foreach (var item in enums)
+ {
+ FieldInfo? fieldInfo = typeof(MessageStatusEnum).GetField(((MessageStatusEnum)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)
{
--
Gitblit v1.9.3