From 7a512d442b2673662d4f642e79b0748d2f52f499 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 14 一月 2025 10:02:04 +0800
Subject: [PATCH] 收货
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BasicInfo/RouterController.cs | 72 ++++++++++++++++++------------------
1 files changed, 36 insertions(+), 36 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BasicInfo/RouterController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BasicInfo/RouterController.cs"
index c76f27c..ca38702 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BasicInfo/RouterController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BasicInfo/RouterController.cs"
@@ -61,48 +61,48 @@
}
return content; }
- [HttpPost, Route("GetBaseRouterInfo"), AllowAnonymous]
- public WebResponseContent GetBaseRouterInfo()
- {
- try
- {
- #region 鑾峰彇璺敱绫诲瀷
- List<object> routerTypes = new List<object>();
- Type routerType = typeof(RouterInOutType);
- List<int> routerIndexs = Enum.GetValues(typeof(RouterInOutType)).Cast<int>().ToList();
- int routerIndex = 0;
- foreach (var item in routerIndexs)
- {
- FieldInfo? fieldInfo = routerType.GetField(((RouterInOutType)item).ToString());
- DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
- if (description != null)
- {
- routerTypes.Add(new { key = item.ToString(), value = description.Description });
- }
- else
- {
- routerTypes.Add(new { key = item.ToString(), value = item.ToString() });
- }
- routerIndex++;
- }
- #endregion
+ //[HttpPost, Route("GetBaseRouterInfo"), AllowAnonymous]
+ //public WebResponseContent GetBaseRouterInfo()
+ //{
+ // try
+ // {
+ // #region 鑾峰彇璺敱绫诲瀷
+ // List<object> routerTypes = new List<object>();
+ // Type routerType = typeof(RouterInOutType);
+ // List<int> routerIndexs = Enum.GetValues(typeof(RouterInOutType)).Cast<int>().ToList();
+ // int routerIndex = 0;
+ // foreach (var item in routerIndexs)
+ // {
+ // FieldInfo? fieldInfo = routerType.GetField(((RouterInOutType)item).ToString());
+ // DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
+ // if (description != null)
+ // {
+ // routerTypes.Add(new { key = item.ToString(), value = description.Description });
+ // }
+ // else
+ // {
+ // routerTypes.Add(new { key = item.ToString(), value = item.ToString() });
+ // }
+ // routerIndex++;
+ // }
+ // #endregion
- #region 鑾峰彇璁惧缂栧彿
- object deviceCodes = _deviceProtocolRepository.QueryData(x => true).GroupBy(x => x.DeviceChildCode).Select(x => new { key = x.Key, value = x.Key }).ToList();
+ // #region 鑾峰彇璁惧缂栧彿
+ // object deviceCodes = _deviceProtocolRepository.QueryData(x => true).GroupBy(x => x.DeviceChildCode).Select(x => new { key = x.Key, value = x.Key }).ToList();
- object areaInfos = Enum.GetNames(typeof(AreaInfo)).Select(x => new { key = x, value = x }).ToList();
+ // object areaInfos = Enum.GetNames(typeof(AreaInfo)).Select(x => new { key = x, value = x }).ToList();
- #endregion
+ // #endregion
- return WebResponseContent.Instance.OK(data: new { routerTypes, deviceCodes, areaInfos });
- }
- catch (Exception ex)
- {
- return WebResponseContent.Instance.Error(ex.Message);
- }
+ // return WebResponseContent.Instance.OK(data: new { routerTypes, deviceCodes, areaInfos });
+ // }
+ // catch (Exception ex)
+ // {
+ // return WebResponseContent.Instance.Error(ex.Message);
+ // }
- }
+ //}
[HttpPost, Route("AddRouters"), AllowAnonymous]
public WebResponseContent AddRouters([FromBody] List<RoutersAddDTO> routersAddDTOs, int routerType)
--
Gitblit v1.9.3