Commit 872978a1 authored by 黄奎's avatar 黄奎

页面修改

parent 2dbba6a2
...@@ -83,7 +83,6 @@ WHERE 1=1 ...@@ -83,7 +83,6 @@ WHERE 1=1
{ {
List<ExamWorkResult> list = new(); List<ExamWorkResult> list = new();
var dataList = GetStuHomeWorkDetailsListRepository(new CourseQuery() { CourseId = CourseId }); var dataList = GetStuHomeWorkDetailsListRepository(new CourseQuery() { CourseId = CourseId });
var courseList = dataList.GroupBy(qitem => new { qitem.course_id,qitem.CourseName }).Select(qitem=>new {qitem.Key.course_id,qitem.Key.CourseName }); var courseList = dataList.GroupBy(qitem => new { qitem.course_id,qitem.CourseName }).Select(qitem=>new {qitem.Key.course_id,qitem.Key.CourseName });
if (courseList != null && courseList.Any()) if (courseList != null && courseList.Any())
{ {
...@@ -92,7 +91,9 @@ WHERE 1=1 ...@@ -92,7 +91,9 @@ WHERE 1=1
var stuList = dataList.Where(qitem => qitem.course_id == cItem.course_id).GroupBy(qitem => new { qitem.student_uid }).Select(qitem => new{ qitem.Key.student_uid}); var stuList = dataList.Where(qitem => qitem.course_id == cItem.course_id).GroupBy(qitem => new { qitem.student_uid }).Select(qitem => new{ qitem.Key.student_uid});
//课程配置评论列表 //课程配置评论列表
var courseCommentList =new CourseCommentRepository().GetCourseCommentListRepository(new CourseQuery() { QCourseIds = cItem.course_id.ToString() }); var courseCommentList =new CourseCommentRepository().GetCourseCommentListRepository(new CourseQuery() { QCourseIds = cItem.course_id.ToString() });
var defaultCommentList = new CommentRepository().GetCommentListRepository(new CourseQuery() { KeyWords = cItem.CourseName });
if ((courseCommentList != null && courseCommentList.Count > 0) || (defaultCommentList != null && defaultCommentList.Count > 0))
{
foreach (var sItem in stuList) foreach (var sItem in stuList)
{ {
List<ExamWorkResult> homeWorkList = new(); List<ExamWorkResult> homeWorkList = new();
...@@ -131,11 +132,11 @@ WHERE 1=1 ...@@ -131,11 +132,11 @@ WHERE 1=1
var firstList = homeWorkList.Where(qitem => qitem.RowNum <= 5).ToList(); var firstList = homeWorkList.Where(qitem => qitem.RowNum <= 5).ToList();
var firstSubmitCount = firstList.Where(qitem => qitem.HomeWorkStatus == 0).Count(); var firstSubmitCount = firstList.Where(qitem => qitem.HomeWorkStatus == 0).Count();
//第一阶段有提交作业情况(至少一次) //第一阶段有提交作业情况(至少一次)
if (firstList.Count!= firstSubmitCount) if (firstList.Count != firstSubmitCount)
{ {
var firstScore = firstList.Average(qitem => qitem.Score_p) * 100; var firstScore = firstList.Average(qitem => qitem.Score_p) * 100;
string title = firstList.LastOrDefault().ThName + "老师的评语"; string title = firstList.LastOrDefault().ThName + "老师的评语";
info = GetCommentInfo(courseCommentList,cItem.CourseName,1, firstScore); info = GetCommentInfo(courseCommentList, cItem.CourseName, 1, firstScore);
if (!string.IsNullOrEmpty(info)) if (!string.IsNullOrEmpty(info))
{ {
var First_Stu_HomeWork_Id = firstList.LastOrDefault().Stu_HomeWork_Id; var First_Stu_HomeWork_Id = firstList.LastOrDefault().Stu_HomeWork_Id;
...@@ -179,7 +180,7 @@ WHERE 1=1 ...@@ -179,7 +180,7 @@ WHERE 1=1
var secondList = homeWorkList.Where(qitem => qitem.RowNum > 5 && qitem.RowNum <= 9).ToList(); var secondList = homeWorkList.Where(qitem => qitem.RowNum > 5 && qitem.RowNum <= 9).ToList();
var secondSubmitCount = secondList.Where(qitem => qitem.HomeWorkStatus == 0).Count(); var secondSubmitCount = secondList.Where(qitem => qitem.HomeWorkStatus == 0).Count();
//第二阶段有提交作业情况(至少一次) //第二阶段有提交作业情况(至少一次)
if (secondList.Count!= secondSubmitCount) if (secondList.Count != secondSubmitCount)
{ {
var secondScore = secondList.Average(qitem => qitem.Score_p) * 100; var secondScore = secondList.Average(qitem => qitem.Score_p) * 100;
info = GetCommentInfo(courseCommentList, cItem.CourseName, 2, secondScore); info = GetCommentInfo(courseCommentList, cItem.CourseName, 2, secondScore);
...@@ -226,7 +227,7 @@ WHERE 1=1 ...@@ -226,7 +227,7 @@ WHERE 1=1
var thirdList = homeWorkList.Where(qitem => qitem.RowNum > 9 && qitem.RowNum <= 13).ToList(); var thirdList = homeWorkList.Where(qitem => qitem.RowNum > 9 && qitem.RowNum <= 13).ToList();
var thirdSubmitCount = thirdList.Where(qitem => qitem.HomeWorkStatus == 0).Count(); var thirdSubmitCount = thirdList.Where(qitem => qitem.HomeWorkStatus == 0).Count();
//第三阶段有提交作业情况(至少一次) //第三阶段有提交作业情况(至少一次)
if (thirdList.Count!= thirdSubmitCount) if (thirdList.Count != thirdSubmitCount)
{ {
var thirdScore = thirdList.Average(qitem => qitem.Score_p) * 100; var thirdScore = thirdList.Average(qitem => qitem.Score_p) * 100;
info = GetCommentInfo(courseCommentList, cItem.CourseName, 3, thirdScore); info = GetCommentInfo(courseCommentList, cItem.CourseName, 3, thirdScore);
...@@ -270,6 +271,7 @@ WHERE 1=1 ...@@ -270,6 +271,7 @@ WHERE 1=1
} }
} }
} }
}
return list; return list;
} }
......
...@@ -30,6 +30,18 @@ namespace EduSpider.WebApi.Controllers ...@@ -30,6 +30,18 @@ namespace EduSpider.WebApi.Controllers
[Autowired] [Autowired]
public IAccountService AccountService { get; set; } public IAccountService AccountService { get; set; }
/// <summary>
/// 心跳检测
/// </summary>
/// <returns></returns>
[HttpGet]
[HttpPost]
[AllowAnonymous]
public ApiResult Heart()
{
return ApiResult.Success();
}
#region 账号密码登录 #region 账号密码登录
/// <summary> /// <summary>
/// 账号密码登录 /// 账号密码登录
......
using Autofac; using Autofac;
using Edu.WebApi.Filter; using Edu.WebApi.Filter;
using EduSpider.WebApi.Timers;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Controllers;
...@@ -49,6 +50,7 @@ namespace EduSpider.WebApi ...@@ -49,6 +50,7 @@ namespace EduSpider.WebApi
options.JsonSerializerOptions.Encoder = System.Text.Encodings.Web.JavaScriptEncoder.Create(System.Text.Unicode.UnicodeRanges.All); options.JsonSerializerOptions.Encoder = System.Text.Encodings.Web.JavaScriptEncoder.Create(System.Text.Unicode.UnicodeRanges.All);
options.JsonSerializerOptions.PropertyNamingPolicy = null; options.JsonSerializerOptions.PropertyNamingPolicy = null;
}); });
services.AddHostedService<TimedTaskServices>();
} }
/// <summary> /// <summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment