123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- using YBEE.EQM.Core;
- namespace YBEE.EQM.Application;
- /// <summary>
- /// 监测计划管理服务
- /// </summary>
- [ApiDescriptionSettings(Name = "exam-plan")]
- [Route("exam/plan")]
- public class ExamPlanAppService(IExamPlanService examPlanService) : IDynamicApiController
- {
- /// <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);
- }
- /// <summary>
- /// 获取最近5个抽测参照成绩监测计划
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public async Task<List<ExamPlanOutput>> GetSampleRefPlanList(int id)
- {
- return await examPlanService.GetSampleRefPlanList(id);
- }
- }
|