From e2a05a6c91f1b94bef8ecea7de7bf149d7e77c89 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期五, 18 十月 2024 15:05:29 +0800 Subject: [PATCH] 1 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs | 170 +------------------------------------------------------- 1 files changed, 5 insertions(+), 165 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs" index 72c4f21..ab3c111 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs" @@ -40,183 +40,23 @@ } #region AreaInfo - public WebResponseContent AreaEnableStatus(int[] keys) - { - List<Dt_AreaInfo> areaInfos = AreaInfoService.Repository.QueryData(x => keys.Contains(x.Id)); - areaInfos.ForEach(x => - { - x.AreaStatus = EnableEnum.Enable.ObjToInt(); - }); - AreaInfoService.Repository.UpdateData(areaInfos); - - return WebResponseContent.Instance.OK(); - } - - public WebResponseContent AreaDisableStatus(int[] keys) - { - List<Dt_AreaInfo> areaInfos = AreaInfoService.Repository.QueryData(x => keys.Contains(x.Id)); - areaInfos.ForEach(x => - { - x.AreaStatus = EnableEnum.Disable.ObjToInt(); - }); - AreaInfoService.Repository.UpdateData(areaInfos); - - return WebResponseContent.Instance.OK(); - } - - public WebResponseContent AreaEnableStatus(int key) - { - return AreaEnableStatus(new int[] { key }); - } - - public WebResponseContent AreaDisableStatus(int key) - { - return AreaDisableStatus(new int[] { key }); - } + #endregion #region CachePoint - public WebResponseContent CachePointEnableStatus(int[] keys) - { - List<Dt_CachePoint> cachePoints = CachePointService.Repository.QueryData(x => keys.Contains(x.Id)); - cachePoints.ForEach(x => - { - x.EnableStatus = EnableEnum.Enable.ObjToInt(); - }); - CachePointService.Repository.UpdateData(cachePoints); - - return WebResponseContent.Instance.OK(); - } - - public WebResponseContent CachePointDisableStatus(int[] keys) - { - List<Dt_CachePoint> cachePoints = CachePointService.Repository.QueryData(x => keys.Contains(x.Id)); - cachePoints.ForEach(x => - { - x.EnableStatus = EnableEnum.Disable.ObjToInt(); - }); - CachePointService.Repository.UpdateData(cachePoints); - - return WebResponseContent.Instance.OK(); - } - - public WebResponseContent CachePointEnableStatus(int key) - { - return CachePointEnableStatus(new int[] { key }); - } - - public WebResponseContent CachePointDisableStatus(int key) - { - return CachePointDisableStatus(new int[] { key }); - } + #endregion #region LocationInfo - public WebResponseContent LocationEnableStatus(int[] keys) - { - List<Dt_LocationInfo> locationInfos = LocationInfoService.Repository.QueryData(x => keys.Contains(x.Id)); - locationInfos.ForEach(x => - { - x.EnableStatus = EnableEnum.Enable.ObjToInt(); - }); - LocationInfoService.Repository.UpdateData(locationInfos); - - return WebResponseContent.Instance.OK(); - } - - public WebResponseContent LocationDisableStatus(int[] keys) - { - List<Dt_LocationInfo> locationInfos = LocationInfoService.Repository.QueryData(x => keys.Contains(x.Id)); - locationInfos.ForEach(x => - { - x.EnableStatus = EnableEnum.Disable.ObjToInt(); - }); - LocationInfoService.Repository.UpdateData(locationInfos); - - return WebResponseContent.Instance.OK(); - } - - public WebResponseContent LocationEnableStatus(int key) - { - return LocationEnableStatus(new int[] { key }); - } - - public WebResponseContent LocationDisableStatus(int key) - { - return LocationDisableStatus(new int[] { key }); - } + #endregion #region RoadwayInfo - public WebResponseContent RoadwayEnableStatus(int[] keys) - { - List<Dt_RoadwayInfo> roadwayInfos = RoadwayInfoService.Repository.QueryData(x => keys.Contains(x.Id)); - roadwayInfos.ForEach(x => - { - x.EnableStatus = EnableEnum.Enable.ObjToInt(); - }); - RoadwayInfoService.Repository.UpdateData(roadwayInfos); - - return WebResponseContent.Instance.OK(); - } - - public WebResponseContent RoadwayDisableStatus(int[] keys) - { - List<Dt_RoadwayInfo> roadwayInfos = RoadwayInfoService.Repository.QueryData(x => keys.Contains(x.Id)); - roadwayInfos.ForEach(x => - { - x.EnableStatus = EnableEnum.Disable.ObjToInt(); - }); - RoadwayInfoService.Repository.UpdateData(roadwayInfos); - - return WebResponseContent.Instance.OK(); - } - - public WebResponseContent RoadwayEnableStatus(int key) - { - return RoadwayEnableStatus(new int[] { key }); - } - - public WebResponseContent RoadwayDisableStatus(int key) - { - return RoadwayDisableStatus(new int[] { key }); - } + #endregion #region Warehouse - public WebResponseContent WarehouseEnableStatus(int[] keys) - { - List<Dt_Warehouse> warehouses = WarehouseService.Repository.QueryData(x => keys.Contains(x.Id)); - warehouses.ForEach(x => - { - x.WarehouseStatus = EnableEnum.Enable.ObjToInt(); - }); - WarehouseService.Repository.UpdateData(warehouses); - - return WebResponseContent.Instance.OK(); - } - - public WebResponseContent WarehouseDisableStatus(int[] keys) - { - List<Dt_Warehouse> warehouses = WarehouseService.Repository.QueryData(x => keys.Contains(x.Id)); - warehouses.ForEach(x => - { - x.WarehouseStatus = EnableEnum.Disable.ObjToInt(); - }); - WarehouseService.Repository.UpdateData(warehouses); - - return WebResponseContent.Instance.OK(); - } - - public WebResponseContent WarehouseEnableStatus(int key) - { - return WarehouseEnableStatus(new int[] { key }); - } - - public WebResponseContent WarehouseDisableStatus(int key) - { - return WarehouseDisableStatus(new int[] { key }); - } + #endregion } } -- Gitblit v1.9.3