From 75e3bca44b111c167b9389e4e51b2ce577a9f9e0 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期日, 10 八月 2025 10:35:50 +0800
Subject: [PATCH] 优化更新
---
WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs
index 3503bbe..469d70d 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json;
+锘縰sing 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)
{
--
Gitblit v1.9.3