From 733c975cd8647f6d006736f1863bad731e32e6fb Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期日, 26 十月 2025 17:15:52 +0800
Subject: [PATCH] 上传最新代码,ERP接口,MES接口优化,WMS业务优化等
---
项目代码/WMS/WMSServices/WIDESEA_SystemService/Sys_DictionaryService.cs | 514 ++++++--------------------------------------------------
1 files changed, 60 insertions(+), 454 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_SystemService/Sys_DictionaryService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_SystemService/Sys_DictionaryService.cs"
index 87935d4..f95759d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_SystemService/Sys_DictionaryService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_SystemService/Sys_DictionaryService.cs"
@@ -109,22 +109,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,54 +195,6 @@
}
}
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(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>();
@@ -331,112 +267,6 @@
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)
- {
- 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 "inOrderType":
- {
- List<object> data = new List<object>();
-
- {
- Type type = typeof(InOrderTypeEnum);
- List<int> enums = Enum.GetValues(typeof(InOrderTypeEnum)).Cast<int>().ToList();
- int index = 0;
- foreach (var item in enums)
- {
- FieldInfo? fieldInfo = typeof(InOrderTypeEnum).GetField(((InOrderTypeEnum)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 "outOrderType":
- {
- List<object> data = new List<object>();
-
- {
- Type type = typeof(OutOrderTypeEnum);
- List<int> enums = Enum.GetValues(typeof(OutOrderTypeEnum)).Cast<int>().ToList();
- int index = 0;
- foreach (var item in enums)
- {
- FieldInfo? fieldInfo = typeof(OutOrderTypeEnum).GetField(((OutOrderTypeEnum)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 "orderDetailStatusEnum":
- {
- List<object> data = new List<object>();
-
- {
- Type type = typeof(OrderDetailStatusEnum);
- List<int> enums = Enum.GetValues(typeof(OrderDetailStatusEnum)).Cast<int>().ToList();
- int index = 0;
- foreach (var item in enums)
- {
- FieldInfo? fieldInfo = typeof(OrderDetailStatusEnum).GetField(((OrderDetailStatusEnum)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 };
@@ -581,26 +411,6 @@
{
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;
@@ -628,25 +438,6 @@
}
}
- //{
- // 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;
@@ -693,57 +484,6 @@
data.Add(new { key = item.ToString(), value = item.ToString() });
}
index++;
- }
-
- result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
- }
- break;
- case "outStockStatus":
- {
- 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)
- {
- 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 "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 };
@@ -814,87 +554,6 @@
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>();
@@ -906,87 +565,6 @@
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)
{
@@ -1030,33 +608,6 @@
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>();
@@ -1084,17 +635,17 @@
result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
}
break;
- case "agvStationAreaEnum":
+ case "materielUnitEnum":
{
List<object> data = new List<object>();
{
- Type type = typeof(AGVStationAreaEnum);
- List<int> enums = Enum.GetValues(typeof(AGVStationAreaEnum)).Cast<int>().ToList();
+ Type type = typeof(MaterielUnitEnum);
+ List<string> enumNames = Enum.GetNames(typeof(MaterielUnitEnum)).ToList();
int index = 0;
- foreach (var item in enums)
+ foreach (var item in enumNames)
{
- FieldInfo? fieldInfo = typeof(AGVStationAreaEnum).GetField(((AGVStationAreaEnum)item).ToString());
+ FieldInfo? fieldInfo = typeof(MaterielUnitEnum).GetField((item).ToString());
DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
if (description != null)
{
@@ -1111,6 +662,61 @@
result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
}
break;
+ case "agvStationAreaEnum":
+ {
+ List<object> data = new List<object>();
+
+ {
+ Type type = typeof(AGVStationAreaEnum);
+ List<string> enumNames = Enum.GetNames(typeof(AGVStationAreaEnum)).ToList();
+ int index = 0;
+ foreach (var item in enumNames)
+ {
+ FieldInfo? fieldInfo = typeof(AGVStationAreaEnum).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 "printAreaEnum":
+ {
+ List<object> data = new List<object>();
+
+ {
+ Type type = typeof(PrintAreaEnum);
+ List<int> enums = Enum.GetValues(typeof(PrintAreaEnum)).Cast<int>().ToList();
+ int index = 0;
+ foreach (var item in enums)
+ {
+ FieldInfo? fieldInfo = typeof(PrintAreaEnum).GetField(((PrintAreaEnum)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;
+ break;
case "materielInvOrgEnum":
{
List<object> data = new List<object>();
--
Gitblit v1.9.3