作业列表
This commit is contained in:
parent
c3a1b0d714
commit
be31757973
@ -66,32 +66,35 @@ namespace VOL.Business.Services.Norm
|
|||||||
schoolCode = UserContext.Current.TenantId;
|
schoolCode = UserContext.Current.TenantId;
|
||||||
}
|
}
|
||||||
|
|
||||||
var query = from s in _homeWorkRepository.FindAsIQueryable(x => x.SchoolCode.Contains(schoolCode))
|
var query =
|
||||||
select new HomeWorkListModel()
|
from s in _homeWorkRepository.FindAsIQueryable(x => x.SchoolCode.Contains(schoolCode))
|
||||||
{
|
let workStatus =
|
||||||
WorkId = s.Id,
|
currentTime < s.StartTime
|
||||||
TeacherId = s.TeacherId,
|
? HomeWorkStatus.NotStarted
|
||||||
StudentScope = s.StudentScope,
|
: currentTime > s.EndTime
|
||||||
WorkStatus =
|
? HomeWorkStatus.Ended
|
||||||
currentTime < s.StartTime
|
: HomeWorkStatus.Afoot
|
||||||
? HomeWorkStatus.NotStarted
|
select new HomeWorkListModel
|
||||||
: currentTime > s.EndTime
|
{
|
||||||
? HomeWorkStatus.Ended
|
WorkId = s.Id,
|
||||||
: HomeWorkStatus.Afoot,
|
TeacherId = s.TeacherId,
|
||||||
|
StudentScope = s.StudentScope,
|
||||||
|
|
||||||
TeacherName = s.TeacherName,
|
WorkStatus = workStatus,
|
||||||
WorkName = s.WorkName,
|
WorkStatusStr = workStatus.GetDescription(),
|
||||||
WorkText = s.WorkText,
|
|
||||||
WorkType = s.WorkType,
|
TeacherName = s.TeacherName,
|
||||||
WorkModeType = s.WorkModeType,
|
WorkName = s.WorkName,
|
||||||
WorkModeTypeName = s.WorkModeType.GetDescription(),
|
WorkText = s.WorkText,
|
||||||
StartTime = s.StartTime,
|
WorkType = s.WorkType,
|
||||||
EndTime = s.EndTime,
|
WorkModeType = s.WorkModeType,
|
||||||
StudentScopeStr = s.StudentScope.GetDescription(),
|
WorkModeTypeName = s.WorkModeType.GetDescription(),
|
||||||
WorkStatusStr = s.WorkStatus.GetDescription(),
|
StartTime = s.StartTime,
|
||||||
WorkTypeName = s.WorkTypeName,
|
EndTime = s.EndTime,
|
||||||
GradeAndClassName = $"{s.GradeName}-{s.ClassName}"
|
StudentScopeStr = s.StudentScope.GetDescription(),
|
||||||
};
|
WorkTypeName = s.WorkTypeName,
|
||||||
|
GradeAndClassName = $"{s.GradeName}-{s.ClassName}"
|
||||||
|
};
|
||||||
|
|
||||||
if (paramDto.WorkType > 0)
|
if (paramDto.WorkType > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user