IExamSampleService.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application;
  3. /// <summary>
  4. /// 监测抽样方案管理服务
  5. /// </summary>
  6. public interface IExamSampleService
  7. {
  8. /// <summary>
  9. /// 添加监测抽样方案
  10. /// </summary>
  11. /// <param name="input"></param>
  12. /// <returns></returns>
  13. Task Add(AddExamSampleInput input);
  14. /// <summary>
  15. /// 更新监测抽样方案
  16. /// </summary>
  17. /// <param name="input"></param>
  18. /// <returns></returns>
  19. Task Update(UpdateExamSampleInput input);
  20. /// <summary>
  21. /// 复制抽样方案信息
  22. /// </summary>
  23. /// <param name="input"></param>
  24. /// <returns></returns>
  25. Task Duplicate(BaseId input);
  26. /// <summary>
  27. /// 删除监测抽样方案
  28. /// </summary>
  29. /// <param name="input"></param>
  30. /// <returns></returns>
  31. Task Del(BaseId input);
  32. /// <summary>
  33. /// 保存全抽班级ID列表
  34. /// </summary>
  35. /// <param name="input"></param>
  36. /// <returns></returns>
  37. Task SaveExamSampleAllClasses(SaveExamSampleAllClasses input);
  38. /// <summary>
  39. /// 切换全抽班级
  40. /// </summary>
  41. /// <param name="input"></param>
  42. /// <returns></returns>
  43. Task SwitchExamSampleAllClass(SwitchExamSampleAllClassInput input);
  44. /// <summary>
  45. /// 选定方案
  46. /// </summary>
  47. /// <param name="input"></param>
  48. /// <returns></returns>
  49. Task SelectSample(BaseId input);
  50. /// <summary>
  51. /// 执行抽样
  52. /// </summary>
  53. /// <param name="input">抽样方案ID</param>
  54. /// <returns></returns>
  55. /// <exception cref="Exception"></exception>
  56. Task ExecuteSample(BaseId input);
  57. /// <summary>
  58. /// 导出抽样方案存档文件
  59. /// </summary>
  60. /// <param name="id"></param>
  61. /// <param name="hideIdNumber"></param>
  62. /// <returns></returns>
  63. Task<(string fileName, byte[] fileBytes)> ExportToArchived(int id, bool hideIdNumber = false);
  64. /// <summary>
  65. /// 导出给印刷厂和网阅机构文件
  66. /// </summary>
  67. /// <param name="id"></param>
  68. /// <returns></returns>
  69. Task<(string fileName, byte[] fileBytes)> ExportToPrintshop(int id);
  70. /// <summary>
  71. /// 导出给学校
  72. /// </summary>
  73. /// <param name="id"></param>
  74. /// <returns></returns>
  75. Task<(string fileName, byte[] fileBytes)> ExportToOrg(int id);
  76. /// <summary>
  77. /// 导出抽样统计表
  78. /// </summary>
  79. /// <param name="id"></param>
  80. /// <returns></returns>
  81. Task<(string fileName, byte[] fileBytes)> ExportSampleCount(int id);
  82. /// <summary>
  83. /// 导出学校抽样统计表
  84. /// </summary>
  85. /// <param name="id"></param>
  86. /// <returns></returns>
  87. Task<(string fileName, byte[] fileBytes)> ExportSampleCountToOrg(int id);
  88. /// <summary>
  89. /// 根据ID获取抽样方案
  90. /// </summary>
  91. /// <param name="id"></param>
  92. /// <returns></returns>
  93. Task<ExamSampleOutput> GetById(int id);
  94. /// <summary>
  95. /// 根据监测计划ID获取全部抽样方案
  96. /// </summary>
  97. /// <param name="examPlanId"></param>
  98. /// <returns></returns>
  99. Task<List<ExamSampleOutput>> GetListByExamPlanId(int examPlanId);
  100. /// <summary>
  101. /// 查询已发布抽样
  102. /// </summary>
  103. /// <param name="examDataPublishId">监测发布内容ID</param>
  104. /// <param name="type">抽样数据发布类型</param>
  105. /// <returns></returns>
  106. Task<ExamSamplePlanOutput> GetByExamDataPublishId(int examDataPublishId, DataPublishType type);
  107. /// <summary>
  108. /// 获取抽样统计表
  109. /// </summary>
  110. /// <param name="id"></param>
  111. /// <returns></returns>
  112. Task<List<ExamSampleCountOutput>> GetSampleCountListById(int id);
  113. /// <summary>
  114. /// 获取学校抽样统计表
  115. /// </summary>
  116. /// <param name="id"></param>
  117. /// <returns></returns>
  118. Task<List<ExamSampleCountOutput>> GetOrgSampleCountListById(int id);
  119. }