123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- using YBEE.EQM.Core;
- namespace YBEE.EQM.Application;
- /// <summary>
- /// 校考成绩上报管理服务
- /// </summary>
- [ApiDescriptionSettings(Name = "exam-org-score-report")]
- [Route("exam/org/score/report")]
- public class ExamOrgScoreReportAppService : IDynamicApiController
- {
- private readonly IExamOrgScoreReportService _examOrgScoreReportService;
- public ExamOrgScoreReportAppService(IExamOrgScoreReportService examOrgScoreReportService)
- {
- _examOrgScoreReportService = examOrgScoreReportService;
- }
- /// <summary>
- /// 上传校考成绩
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- [RequestSizeLimit(1024 * 1024 * 20)]
- [RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)]
- public async Task<UploadExamOrgScoreReportOutput> Upload([FromForm] UploadExamOrgScoreReportInput input)
- {
- return await _examOrgScoreReportService.Upload(input);
- }
- /// <summary>
- /// 查询某科目校考成绩上报数据
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- public async Task<ExamOrgScoreReportOutput> QueryOne(QueryExamOrgScoreReportInput input)
- {
- return await _examOrgScoreReportService.QueryOne(input);
- }
- /// <summary>
- /// 获取机构校考上报明细列表
- /// </summary>
- /// <param name="examPlanId"></param>
- /// <returns></returns>
- public async Task<List<ExamOrgScoreReportItem>> GetListByExamPlanId(int examPlanId)
- {
- return await _examOrgScoreReportService.GetListByExamPlanId(examPlanId);
- }
- ///// <summary>
- ///// 删除
- ///// </summary>
- ///// <param name="input"></param>
- ///// <returns></returns>
- //public async Task Del(DeleteAttachmentInput input)
- //{
- // await _examOrgScoreReportService.Del(input);
- //}
- /// <summary>
- /// 合并学校上报小题分
- /// </summary>
- /// <param name="examPlanId"></param>
- /// <returns></returns>
- [AllowAnonymous]
- public async Task<IActionResult> MergeMinorScore(int examPlanId)
- {
- var (fileName, fileBytes) = await _examOrgScoreReportService.MergeMinorScore(examPlanId);
- return new FileContentResult(fileBytes, "application/octet-stream")
- {
- FileDownloadName = fileName,
- };
- }
- }
|