From 2b25f973bb6d72ce6971d6f9c3cdccf51b7962ab Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期六, 06 九月 2025 14:27:08 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhiHuiQiCe/LongDeLiLiKu --- 项目代码/WMS/WMSServices/WIDESEA_SystemService/Sys_DictionaryService.cs | 440 +----------------------------------------------------- 1 files changed, 9 insertions(+), 431 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..9bb8716 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,17 +608,17 @@ result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; } break; - case "materielSourceTypeEnum": + case "materielTypeEnum": { List<object> data = new List<object>(); { - Type type = typeof(MaterielSourceTypeEnum); - List<int> enums = Enum.GetValues(typeof(MaterielSourceTypeEnum)).Cast<int>().ToList(); + 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(MaterielSourceTypeEnum).GetField(((MaterielSourceTypeEnum)item).ToString()); + FieldInfo? fieldInfo = typeof(MaterielTypeEnum).GetField(((MaterielTypeEnum)item).ToString()); DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); if (description != null) { @@ -1057,17 +635,17 @@ result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; } break; - case "materielTypeEnum": + case "materielUnitEnum": { List<object> data = new List<object>(); { - Type type = typeof(MaterielTypeEnum); - List<int> enums = Enum.GetValues(typeof(MaterielTypeEnum)).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(MaterielTypeEnum).GetField(((MaterielTypeEnum)item).ToString()); + FieldInfo? fieldInfo = typeof(MaterielUnitEnum).GetField((item).ToString()); DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); if (description != null) { -- Gitblit v1.9.3