Commit 648e63e5 authored by 黄奎's avatar 黄奎

页面修改

parent e047b0f3
......@@ -85,8 +85,7 @@ WHERE 1=1
/// <returns></returns>
public bool BatchSetStuCommentRepository(List<RB_Stu_Comment> list)
{
bool flag = false;
flag= base.BatchInsert(list);
bool flag = base.BatchInsert(list);
return flag;
}
......
......@@ -90,7 +90,7 @@ WHERE 1=1
var dataList = GetStuHomeWorkDetailsListRepository(new CourseQuery() { CourseId = CourseId });
var courseList = dataList.GroupBy(qitem => new { qitem.course_id }).Select(qitem=>new {qitem.Key.course_id });
if (courseList != null && courseList.Count() > 0)
if (courseList != null && courseList.Any())
{
foreach (var cItem in courseList)
{
......@@ -180,7 +180,7 @@ WHERE 1=1
var secondList = homeWorkList.Where(qitem => qitem.RowNum > 5 && qitem.RowNum <= 9).ToList();
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;
info = GetCommentInfo(courseCommentModel, secondScore);
......@@ -444,7 +444,7 @@ WHERE 1=1
{
string info = "";
var commentModel = commentRepository.GetComment(Score);
if (courseCommentModel != null && courseCommentModel.CommentDetails != null && courseCommentModel.CommentDetails.Count() > 0)
if (courseCommentModel != null && courseCommentModel.CommentDetails != null && courseCommentModel.CommentDetails.Count > 0)
{
var tempModel = courseCommentModel.CommentDetails.Where(qitem => qitem.StartNum <= Score && Score < qitem.EndNum)?.FirstOrDefault();
if (tempModel != null)
......
......@@ -435,7 +435,7 @@ namespace EduSpider.Services
var subList = StuCommentRepository.GetStuCommentListRepository(new CourseQuery() { CourseId = item.CourseId, CommentTimes = item.Times });
if (subList != null && subList.Count > 0)
{
var totalCount = subList.Count();
var totalCount = subList.Count;
if (subList.Where(qitem => qitem.ShowType == 1).Count() == totalCount)
{
ShowType = 1;
......
......@@ -168,7 +168,7 @@ namespace EduSpider.WebApi.Controllers
{
Id = 0,
Title = "系统默认配置",
CourseId = query.CourseId,
query.CourseId,
CommentDetails = sysList
};
}
......@@ -260,7 +260,7 @@ namespace EduSpider.WebApi.Controllers
public ApiResult BatchSetStuComment()
{
var stuListStr = base.ReqParameters.GetString("ChooseStuList");
List<RB_Stu_Comment> list = new List<RB_Stu_Comment>();
List<RB_Stu_Comment> list = new();
if (!string.IsNullOrWhiteSpace(stuListStr))
{
JArray jArray = JArray.Parse(stuListStr);
......
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