using YBEE.EQM.Core; namespace YBEE.EQM.Application; /// /// 缺测替补抽样服务 /// [ApiDescriptionSettings(Name = "exam-sample-replace")] [Route("exam/sample/replace")] public class ExamSampleReplaceAppService(IExamSampleReplaceService examSampleReplaceService) : IDynamicApiController { /// /// 抽取 /// /// /// public async Task Sample(SampleExamSampleReplaceInput input) { await examSampleReplaceService.Sample(input); } /// /// 标记替补为缺测 /// /// /// [HttpGet] public async Task MarkedReplaceAbsent([FromQuery][Required] int id) { await examSampleReplaceService.MarkedReplaceAbsent(id); } /// /// 软删除 /// /// /// [HttpPost] public async Task FakeDelete(BaseId input) { await examSampleReplaceService.FakeDelete(input); } /// /// 导出缺测替补名单 /// /// /// public async Task ExportToOrg([FromQuery][Required] int examPlanId) { var (fileName, fileBytes) = await examSampleReplaceService.ExportToOrg(examPlanId); return new FileContentResult(fileBytes, "application/octet-stream") { FileDownloadName = fileName, }; } /// /// 分页查询缺测替补抽样列表 /// /// /// public async Task> QueryOrgPageList(ExamSampleReplacePageInput input) { return await examSampleReplaceService.QueryOrgPageList(input); } }