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