fix 时段变更生成下发任务

This commit is contained in:
2024-07-17 18:37:33 +08:00
parent a981baa296
commit 3c9e3261c8
7 changed files with 235 additions and 56 deletions

View File

@@ -1,6 +1,8 @@
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;
using Kurisu.AspNetCore.DataAccess.Dto;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -21,16 +23,40 @@ public class DeviceTimePeriodsController : ControllerBase
{
_deviceTimePeriodService = deviceTimePeriodService;
}
/// <summary>
/// 时段码分页
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpGet("page")]
public async Task<Pagination<DeviceTimePeriodPageResponse>> GetPageAsync([FromQuery] DeviceTimePeriodPageRequest request)
public async Task<Pagination<DeviceTimePeriodResponse>> GetPageAsync([FromQuery] DeviceTimePeriodPageRequest request)
{
return await _deviceTimePeriodService.GetPageAsync(request);
}
/// <summary>
/// 保存时段码设置
/// </summary>
/// <param name="request"></param>
[HttpPost("save")]
public async Task SaveAsync(DeviceTimePeriodSaveRequest request)
{
await _deviceTimePeriodService.SaveAsync(request);
}
/// <summary>
/// 获取类型时段列表
/// </summary>
/// <param name="assignType"></param>
/// <param name="value"></param>
/// <returns></returns>
[HttpGet("list")]
public async Task<List<DeviceTimePeriodResponse>> GetListAsync(
[EnumDataType(typeof(DeviceTimePeriodAssignEnumType))]
DeviceTimePeriodAssignEnumType assignType,
[Required] Guid value)
{
return await _deviceTimePeriodService.GetListAsync(assignType, value);
}
}