using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 监测抽样学生管理服务
/// </summary>
[ApiDescriptionSettings(Name = "exam-sample-student")]
[Route("exam/sample/student")]
public class ExamSampleStudentAppService : IDynamicApiController
{
    private readonly IExamSampleStudentService _examSampleStudentService;

    public ExamSampleStudentAppService(IExamSampleStudentService service)
    {
        _examSampleStudentService = service;
    }

    /// <summary>
    /// 分页查询抽样学生信息
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    public async Task<PageResult<ExamSampleStudentOutput>> QueryPageList(ExamSampleStudentPageInput input)
    {
        return await _examSampleStudentService.QueryPageList(input);
    }
    /// <summary>
    /// 根据监测号查询已发布监测方案中当前机构下学生信息
    /// </summary>
    /// <param name="examPlanId">监测计划ID</param>
    /// <param name="examNumber">监测号</param>
    /// <returns></returns>
    public async Task<ExamSampleStudentOutput> GetByExamNumber([FromQuery][Required] int examPlanId, [FromQuery][Required] string examNumber)
    {
        return await _examSampleStudentService.GetByExamNumber(examPlanId, examNumber);
    }
    /// <summary>
    /// 查询监测学生信息
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    public async Task<ExamSampleStudentOutput> QueryExamSampleStudent(QueryExamSampleStudentInput input)
    {
        return await _examSampleStudentService.QueryExamSampleStudent(input);
    }
}
