1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- using YBEE.EQM.Core;
- namespace YBEE.EQM.Application;
- /// <summary>
- /// 监测数据上报类型管理服务
- /// </summary>
- [ApiDescriptionSettings(Name = "exam-data-report")]
- [Route("exam/data/report")]
- public class ExamDataReportAppService : IDynamicApiController
- {
- private readonly IExamDataReportService _examDataReportService;
- public ExamDataReportAppService(IExamDataReportService examDataReportService)
- {
- _examDataReportService = examDataReportService;
- }
- #region 创建更新
- /// <summary>
- /// 添加上报类型
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task Add(AddExamDataReportInput input)
- {
- await _examDataReportService.Add(input);
- }
- /// <summary>
- /// 更新上报类型
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task Update(UpdateExamDataReportInput input)
- {
- await _examDataReportService.Update(input);
- }
- /// <summary>
- /// 删除上报类型
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task Del(BaseId input)
- {
- await _examDataReportService.Del(input);
- }
- #endregion
- #region 状态处理
- /// <summary>
- /// 开始
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task Start(BaseId input)
- {
- await _examDataReportService.Start(input);
- }
- /// <summary>
- /// 结束
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task Stop(BaseId input)
- {
- await _examDataReportService.Stop(input);
- }
- /// <summary>
- /// 取消
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task Cancel(BaseId input)
- {
- await _examDataReportService.Cancel(input);
- }
- #endregion
- #region 查询
- /// <summary>
- /// 根据ID获取监测数据上报类型
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public async Task<ExamDataReportOutput> GetById([FromQuery][Required] int id)
- {
- return await _examDataReportService.GetById(id);
- }
- /// <summary>
- /// 根据监测计划ID获取数据上报类型列表
- /// </summary>
- /// <param name="examPlanId"></param>
- /// <returns></returns>
- public async Task<List<ExamDataReportOutput>> GetListByExamPlanId([FromQuery][Required] int examPlanId)
- {
- return await _examDataReportService.GetListByExamPlanId(examPlanId);
- }
- #endregion
- }
|