This commit is contained in:
tanglong 2025-08-12 14:14:24 +08:00
parent c1c1f3d934
commit 734e7bec7e
2 changed files with 3 additions and 3 deletions

View File

@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Mvc;
using YD_WeChatApplet.Api.Services.Impl; using YD_WeChatApplet.Api.Services.Impl;
using YD_WeChatApplet.Commons.Dto; using YD_WeChatApplet.Commons.Dto;
using YD_WeChatApplet.Commons.Dto.HomeWork; using YD_WeChatApplet.Commons.Dto.HomeWork;
using YD_WeChatApplet.Commons.Dto.Patriarch;
using YD_WeChatApplet.Commons.Dto.School; using YD_WeChatApplet.Commons.Dto.School;
using YD_WeChatApplet.Services; using YD_WeChatApplet.Services;
@ -62,7 +63,7 @@ namespace YD_WeChatApplet.Api.Controllers
/// <param name="dto"></param> /// <param name="dto"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("HomeWorkRecordByTeacher")] [HttpGet("HomeWorkRecordByTeacher")]
public async Task<PageDataDto<HomeWorkRecordDto>> HomeWorkRecordByTeacher(PageDto dto) public async Task<PageDataDto<HomeWorkRecordDto>> HomeWorkRecordByTeacher(PatriarchHomeWorkHistoryDto dto)
{ {
var res = await _homeWorkService.HomeWorkRecordByTeacher(dto); var res = await _homeWorkService.HomeWorkRecordByTeacher(dto);
return res; return res;

View File

@ -184,7 +184,6 @@ namespace YD_WeChatApplet.Api.Services.Impl
/// 学生报告 /// 学生报告
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public async Task<StudentReportDto> StudentReport() public async Task<StudentReportDto> StudentReport()
{ {
var res = new StudentReportDto(); var res = new StudentReportDto();
@ -309,13 +308,13 @@ namespace YD_WeChatApplet.Api.Services.Impl
Amount = x.Amount ?? 0, Amount = x.Amount ?? 0,
Duration = x.Duration ?? 0, Duration = x.Duration ?? 0,
Calorie = x.Calorie ?? 0 Calorie = x.Calorie ?? 0
}) })
.OrderByDescending(x => x.EndTime) .OrderByDescending(x => x.EndTime)
.Skip((dto.PageIndex - 1) * dto.PageSize) .Skip((dto.PageIndex - 1) * dto.PageSize)
.Take(dto.PageSize) .Take(dto.PageSize)
.ToListAsync(); .ToListAsync();
return new PageDataDto<ExerciseRecordDto> return new PageDataDto<ExerciseRecordDto>
{ {
Total = totalCount, Total = totalCount,