using YBEE.EQM.Core;
namespace YBEE.EQM.Application;
///
/// 监测计划管理服务
///
[ApiDescriptionSettings(Name = "exam-plan")]
[Route("exam/plan")]
public class ExamPlanAppService : IDynamicApiController
{
private readonly IExamPlanService _examPlanService;
public ExamPlanAppService(IExamPlanService examPlanService)
{
_examPlanService = examPlanService;
}
///
/// 添加监测计划
///
///
///
public async Task Add(AddExamPlanInput input)
{
await _examPlanService.Add(input);
}
///
/// 更新监测计划
///
///
///
public async Task Update(UpdateExamPlanInput input)
{
await _examPlanService.Update(input);
}
///
/// 删除监测计划
///
///
///
public async Task Del(BaseId input)
{
await _examPlanService.Del(input);
}
///
/// 开始监测
///
///
///
public async Task Start(BaseId input)
{
await _examPlanService.Start(input);
}
///
/// 结束监测
///
///
///
public async Task Stop(BaseId input)
{
await _examPlanService.Stop(input);
}
///
/// 取消监测
///
///
///
public async Task Cancel(BaseId input)
{
await _examPlanService.Cancel(input);
}
///
/// 根据ID获取监测计划
///
///
///
public async Task GetById([FromQuery][Required] int id)
{
return await _examPlanService.GetById(id);
}
///
/// 分页查询监测计划列表
///
///
///
public async Task> QueryPageList(ExamPlanPageInput input)
{
return await _examPlanService.QueryPageList(input);
}
///
/// 获取我的单据状态数量
///
///
public async Task> QueryStatusCount(ExamPlanPageInput input)
{
return await _examPlanService.QueryStatusCount(input);
}
}