fix 设备组重组
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Dlhis.Basic.Device.Request;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Dlhis.Basic.Device.Request;
|
||||
using Dlhis.Basic.Device.Response;
|
||||
using Dlhis.Basic.Device.Services;
|
||||
using Dlhis.Entity.Device.Enums;
|
||||
@@ -26,14 +27,16 @@ public class DeviceGroupsController : ControllerBase
|
||||
/// <summary>
|
||||
/// 获取设备组树
|
||||
/// </summary>
|
||||
/// <param name="showDevices">是否显示设备</param>
|
||||
/// <param name="type">分组类型</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("tree")]
|
||||
[IgnoreTenant]
|
||||
public async Task<List<DeviceGroupTreeResponse>> GetTreeAsync(bool showDevices, DeviceTypeEnumType? type)
|
||||
public async Task<List<DeviceGroupTreeResponse>> GetTreeAsync(
|
||||
[EnumDataType(typeof(DeviceTypeEnumType), ErrorMessage = "请选择正确的类型")]
|
||||
DeviceTypeEnumType type
|
||||
)
|
||||
{
|
||||
return await _deviceGroupService.GetTreeAsync(showDevices, type);
|
||||
return await _deviceGroupService.GetTreeAsync(type);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -54,9 +57,9 @@ public class DeviceGroupsController : ControllerBase
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("devices")]
|
||||
public async Task<List<DeviceUnderGroupResponse>> GetDevicesAsync(Guid code)
|
||||
public async Task<List<DeviceUnderGroupResponse>> GetDevicesByGroupCodeAsync(Guid code)
|
||||
{
|
||||
return await _deviceGroupService.GetDevicesAsync(code);
|
||||
return await _deviceGroupService.GetDevicesByGroupCodeAsync(code);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -81,4 +84,4 @@ public class DeviceGroupsController : ControllerBase
|
||||
{
|
||||
return await _deviceGroupService.GetAppointmentGroupsAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user