From 2950220f98f891a64cc452478e2a2ae61b82a8cd Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期日, 13 四月 2025 16:21:52 +0800 Subject: [PATCH] 优化代码、添加大屏 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/RoadwayInfoService.cs | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/RoadwayInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/RoadwayInfoService.cs" index d946f3d..17d9ebf 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/RoadwayInfoService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/RoadwayInfoService.cs" @@ -61,6 +61,35 @@ return WebResponseContent.Instance.OK(); } + /// <summary> + /// 淇敼宸烽亾鐨勭鐢ㄧ姸鎬� + /// </summary> + /// <param name="saveModel"></param> + /// <returns></returns> + public WebResponseContent UpdateEnableStatus(SaveModel saveModel) + { + WebResponseContent content = new WebResponseContent(); + try + { + List<Dt_RoadwayInfo> roadwayInfos = Repository.QueryData(x => saveModel.DelKeys.Contains(x.Id)); + var values = Enum.GetValues(typeof(EnableStatusEnum)); + var Index = saveModel.Extra.ObjToInt(); + var EnableStatus = (EnableStatusEnum)values.GetValue(Index); + roadwayInfos.ForEach(x => + { + x.EnableStatus = EnableStatus.ObjToInt(); + }); + Repository.UpdateData(roadwayInfos); + content.OK(); + } + catch (Exception ex) + { + content.Error(ex.Message); + } + + return content; + } + public WebResponseContent RoadwayEnableStatus(int key) { return RoadwayEnableStatus(new int[] { key }); -- Gitblit v1.9.3