ExamOrgAppService.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using YBEE.EQM.Application;
  2. using YBEE.EQM.Core;
  3. namespace YBEE.EQM.Application;
  4. /// <summary>
  5. /// 被监测机构管理服务
  6. /// </summary>
  7. [ApiDescriptionSettings(Name = "exam-org")]
  8. [Route("exam/org")]
  9. public class ExamOrgAppService : IDynamicApiController
  10. {
  11. private readonly IExamOrgService _examOrgService;
  12. public ExamOrgAppService(IExamOrgService examOrgService)
  13. {
  14. _examOrgService = examOrgService;
  15. }
  16. /// <summary>
  17. /// 添加机构
  18. /// </summary>
  19. /// <param name="input"></param>
  20. /// <returns></returns>
  21. public async Task AddList(AddExamOrgListInput input)
  22. {
  23. await _examOrgService.AddList(input);
  24. }
  25. /// <summary>
  26. /// 移出机构
  27. /// </summary>
  28. /// <param name="input"></param>
  29. /// <returns></returns>
  30. public async Task Remove(DelExamOrgInput input)
  31. {
  32. await _examOrgService.Remove(input);
  33. }
  34. /// <summary>
  35. /// 切换机构是否参与区统一监测
  36. /// </summary>
  37. /// <param name="input"></param>
  38. /// <returns></returns>
  39. public async Task SwitchRequiredSample(SwitchExamOrgRequiredSampleInput input)
  40. {
  41. await _examOrgService.SwitchRequiredSample(input);
  42. }
  43. /// <summary>
  44. /// 根据监测计划ID获取监测机构列表
  45. /// </summary>
  46. /// <param name="examPlanId"></param>
  47. /// <returns></returns>
  48. public async Task<List<ExamOrgOutput>> GetListByExamPlanId([FromQuery][Required] int examPlanId)
  49. {
  50. return await _examOrgService.GetListByExamPlanId(examPlanId);
  51. }
  52. /// <summary>
  53. /// 分页查询监测机构列表
  54. /// </summary>
  55. /// <param name="input"></param>
  56. /// <returns></returns>
  57. public async Task<PageResult<ExamOrgOutput>> QueryPageList(ExamOrgPageInput input)
  58. {
  59. return await _examOrgService.QueryPageList(input);
  60. }
  61. /// <summary>
  62. /// 分页查询未加入的机构
  63. /// </summary>
  64. /// <param name="input"></param>
  65. /// <returns></returns>
  66. public async Task<PageResult<SysOrgLiteOutput>> QueryNotInSysOrgPageList(ExamOrgNotInPageInput input)
  67. {
  68. return await _examOrgService.QueryNotInSysOrgPageList(input);
  69. }
  70. /// <summary>
  71. /// 分页查询机构监测计划列表
  72. /// </summary>
  73. /// <param name="input"></param>
  74. /// <returns></returns>
  75. public async Task<PageResult<ExamPlanOutput>> QueryExamPlanPageList(ExamPlanPageInput input)
  76. {
  77. return await _examOrgService.QueryExamPlanPageList(input);
  78. }
  79. }