feat 设备分组
This commit is contained in:
46
Src/Dlhis.Basic/Device/Controllers/DeviceGroupsController.cs
Normal file
46
Src/Dlhis.Basic/Device/Controllers/DeviceGroupsController.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using Dlhis.Basic.Device.Request;
|
||||
using Dlhis.Basic.Device.Response;
|
||||
using Dlhis.Basic.Device.Services;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Dlhis.Basic.Device.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// 设备分组
|
||||
/// </summary>
|
||||
[Authorize]
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class DeviceGroupsController : ControllerBase
|
||||
{
|
||||
private readonly IDeviceGroupService _deviceGroupService;
|
||||
|
||||
public DeviceGroupsController(IDeviceGroupService deviceGroupService)
|
||||
{
|
||||
_deviceGroupService = deviceGroupService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备分组分页
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("page")]
|
||||
public async Task<Pagination<DeviceGroupPageResponse>> GetPageAsync([FromQuery] DeviceGroupPageRequest request)
|
||||
{
|
||||
return await _deviceGroupService.GetPageAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备分组保存
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("save")]
|
||||
public async Task SaveAsync(DeviceGroupSaveRequest request)
|
||||
{
|
||||
await _deviceGroupService.SaveAsync(request);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user