From 7f078e66be9959d94fc78344f195b7b4656812be Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期日, 29 十二月 2024 11:22:10 +0800 Subject: [PATCH] 任务表添加AGV任务号(AGV-年月日+任务号),修改测试架仓AGV交互逻辑 --- 代码管理/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