This commit is contained in:
tanglong 2026-01-16 10:31:44 +08:00
parent c163efa10e
commit f4f7bd6208
2 changed files with 22 additions and 11 deletions

View File

@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Microsoft.Extensions.DependencyInjection;
using Quartz.Util;
using System;
using System.Collections.Generic;
using System.Linq;
@ -54,14 +55,18 @@ namespace VOL.Business.Services.Norm
var res = new PageDataDto<HomeWorkListModel>();
var currentTime = DateTime.Now;
string school = "";
string schoolCode = "";
if (string.IsNullOrWhiteSpace(paramDto.SchoolCode))
if (!string.IsNullOrWhiteSpace(paramDto.SchoolCode))
{
school = UserContext.Current.TenantId;
schoolCode = paramDto.SchoolCode;
}
else
{
schoolCode = UserContext.Current.TenantId;
}
var query = from s in _homeWorkRepository.FindAsIQueryable(x => x.SchoolCode == school)
var query = from s in _homeWorkRepository.FindAsIQueryable(x => x.SchoolCode == schoolCode)
select new HomeWorkListModel()
{
WorkId = s.Id,

View File

@ -1996,15 +1996,19 @@ namespace VOL.Business.Services.Training
{
var res = new PageDataDto<ClassReportModel>();
string school = "";
string schoolCode = "";
if (string.IsNullOrWhiteSpace(paramDto.SchoolCode))
if (!string.IsNullOrWhiteSpace(paramDto.SchoolCode))
{
school = UserContext.Current.TenantId;
schoolCode = paramDto.SchoolCode;
}
else
{
schoolCode = UserContext.Current.TenantId;
}
var query = from td in _teacherRepository.DbContext.Set<Ai_ClassRoomRecord>()
where td.SchoolCode.Equals(school)
where td.SchoolCode.Equals(schoolCode)
select new ClassReportModel()
{
Id = td.Id,
@ -2127,15 +2131,17 @@ namespace VOL.Business.Services.Training
public async Task<GetStudentClassReportDetailsModel> GetStudentClassReportDetails(GetStudentClassReportDetailsDto paramDto)
{
var res = new GetStudentClassReportDetailsModel();
string schoolCode = "";
if (string.IsNullOrWhiteSpace(paramDto.SchoolCode))
if (!string.IsNullOrWhiteSpace(paramDto.SchoolCode))
{
schoolCode = paramDto.SchoolCode;
}
else
{
schoolCode = UserContext.Current.TenantId;
}
var query = from hrd in _teacherRepository.DbContext.Set<Ai_HeartRateData>()
where hrd.SchoolCode == schoolCode &&
hrd.ClassRoomRecordId == paramDto.ClassRoomRecordId &&