NceePlanAppService.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application;
  3. /// <summary>
  4. /// 高中模拟划线计划管理服务
  5. /// </summary>
  6. [ApiDescriptionSettings(Name = "ncee-plan")]
  7. [Route("ncee/plan")]
  8. public class NceePlanAppService : IDynamicApiController
  9. {
  10. private readonly INceePlanService _nceePlanService;
  11. public NceePlanAppService(INceePlanService nceePlanService)
  12. {
  13. _nceePlanService = nceePlanService;
  14. }
  15. #region 创建更新
  16. /// <summary>
  17. /// 添加计划
  18. /// </summary>
  19. /// <param name="input"></param>
  20. /// <returns></returns>
  21. public async Task Add(AddNceePlanInput input)
  22. {
  23. await _nceePlanService.Add(input);
  24. }
  25. /// <summary>
  26. /// 更新计划
  27. /// </summary>
  28. /// <param name="input"></param>
  29. /// <returns></returns>
  30. public async Task Update(UpdateNceePlanInput input)
  31. {
  32. await _nceePlanService.Update(input);
  33. }
  34. /// <summary>
  35. /// 删除计划
  36. /// </summary>
  37. /// <param name="input"></param>
  38. /// <returns></returns>
  39. public async Task Del(BaseId input)
  40. {
  41. await _nceePlanService.Del(input);
  42. }
  43. #endregion
  44. #region 状态变更
  45. /// <summary>
  46. /// 开始监测
  47. /// </summary>
  48. /// <param name="input"></param>
  49. /// <returns></returns>
  50. public async Task Start(BaseId input)
  51. {
  52. await _nceePlanService.Start(input);
  53. }
  54. /// <summary>
  55. /// 结束监测
  56. /// </summary>
  57. /// <param name="input"></param>
  58. /// <returns></returns>
  59. public async Task Stop(BaseId input)
  60. {
  61. await _nceePlanService.Stop(input);
  62. }
  63. /// <summary>
  64. /// 取消监测
  65. /// </summary>
  66. /// <param name="input"></param>
  67. /// <returns></returns>
  68. public async Task Cancel(BaseId input)
  69. {
  70. await _nceePlanService.Cancel(input);
  71. }
  72. #endregion
  73. #region 查询统计
  74. /// <summary>
  75. /// 根据ID获取计划
  76. /// </summary>
  77. /// <param name="id"></param>
  78. /// <returns></returns>
  79. public async Task<NceePlanOutput> GetById(int id)
  80. {
  81. return await _nceePlanService.GetById(id);
  82. }
  83. /// <summary>
  84. /// 分页查询计划列表
  85. /// </summary>
  86. /// <param name="input"></param>
  87. /// <returns></returns>
  88. public async Task<PageResult<NceePlanOutput>> QueryPageList(NceePlanPageInput input)
  89. {
  90. return await _nceePlanService.QueryPageList(input);
  91. }
  92. /// <summary>
  93. /// 获取我的单据状态数量
  94. /// </summary>
  95. /// <returns></returns>
  96. public async Task<List<StatusCount>> QueryStatusCount(NceePlanPageInput input)
  97. {
  98. return await _nceePlanService.QueryStatusCount(input);
  99. }
  100. #endregion
  101. }