Commit 8fe222cf authored by 黄奎's avatar 黄奎

页面修改

parent 4aed7e8b
......@@ -49,7 +49,7 @@ namespace EduSpider.IServices
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<object> GetHomeWorkDetails(CourseQuery query);
public object GetHomeWorkDetails(CourseQuery query);
/// <summary>
/// 新增修改课程评价配置
......
......@@ -44,6 +44,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_HomeWork.Course_id), query.CourseId);
}
if (query.HomeWorkId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_HomeWork.Homework_id), query.HomeWorkId);
}
}
return Get<RB_HomeWork>(builder.ToString()).ToList();
}
......
......@@ -246,9 +246,10 @@ namespace EduSpider.Services
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<object> GetHomeWorkDetails(CourseQuery query)
public object GetHomeWorkDetails(CourseQuery query)
{
List<object> result = new();
var HomeWork= HomeWorkRepository.GetCourseHomeWorkListRepository(query).FirstOrDefault();
var list = StuHomeWorkRepository.GetStuHomeWorkDetailsListRepository(query);
if (list != null && list.Count > 0)
{
......@@ -273,11 +274,25 @@ namespace EduSpider.Services
HomeWorkTitle = item.Homework_title,
Status = item.status,
StatusStr = str,
item.student_name,
item.student_uid,
item.score,
item.score_p,
add_time = VTX.FW.Helper.ConvertHelper.FormatDate(item.add_time)
});
}
}
return result;
var obj = new
{
HomeWorkTitle = HomeWork?.Homework_title ?? "",
CourseName = HomeWork?.Course_name ?? "",
StuNum = HomeWork?.Num ?? 0,
SubmitNum = HomeWork?.Cnum ?? 0,
ReadNum = HomeWork?.Rnum ?? 0,
GoodNum = HomeWork?.Cream_num ?? 0,
DataList = result
};
return obj;
}
/// <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