Commit 743f4cae authored by 吴春's avatar 吴春

页面修改

parent 5bcd3bce
......@@ -37,5 +37,29 @@ namespace Edu.Model.ViewModel.Grade
/// </summary>
public int StuId { get; set; }
/// <summary>
/// 上课日期
/// </summary>
public DateTime ClassDate { get; set; }
/// <summary>
/// 上课日期字符串
/// </summary>
public string ClassDateStr { get { return Common.ConvertHelper.FormatDate(this.ClassDate); } }
/// <summary>
/// 上课开始时间
/// </summary>
public string StartTime { get; set; }
/// <summary>
/// 上课结束时间
/// </summary>
public string EndTime { get; set; }
/// <summary>
/// 课程名称
/// </summary>
public string CourseName { get; set; }
}
}
......@@ -76,9 +76,20 @@ namespace Edu.Repository.Grade
public List<RB_Class_FeedBack_ViewModel> GetClassFeedBackPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Class_FeedBack_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" SELECT A.*,b.TeacherName,b.TeacherHead as TeacherIcon FROM RB_Class_FeedBack AS A LEFT JOIN rb_teacher as b on a.TeacherId=b.TId
LEFT JOIN rb_student_orderguest as sog on sog.GuestId=a.OrderGuestId
LEFT JOIN rb_student as s on s.StuId = sog.Student_Id where 1=1 and a.`Status`=0 and sog.`Status`=0 and s.`Status`=0");
builder.AppendFormat(@"
SELECT A.*,b.TeacherName,b.TeacherHead as TeacherIcon,plan.ClassDate,time.StartTime,time.EndTime,IFNULL(course.CourseName,'') AS CourseName
FROM RB_Class_FeedBack AS A LEFT JOIN rb_teacher as b on a.TeacherId=b.TId
LEFT JOIN rb_student_orderguest as sog on sog.GuestId=a.OrderGuestId
LEFT JOIN rb_student as s on s.StuId = sog.Student_Id
LEFT JOIN rb_class_plan AS plan ON A.ClassPlanId=plan.ClassPlanId
LEFT JOIN rb_class_time AS time ON A.ClassTimeId=time.ClassTimeId
LEFT JOIN(
SELECT guest.Id,course.CourseName
FROM rb_order_guest AS guest INNER JOIN rb_order AS orderTab ON guest.OrderId=orderTab.OrderId
LEFT JOIN rb_course AS course ON orderTab.CourseId=course.CourseId
) AS course ON A.OrderGuestId=course.Id
WHERE 1=1 AND a.`Status`=0 AND sog.`Status`=0 AND s.`Status`=0
");
if (query != null)
{
if (query.Group_Id > 0)
......@@ -104,7 +115,8 @@ LEFT JOIN rb_student as s on s.StuId = sog.Student_Id where 1=1 and a.`Status`=
}
builder.AppendFormat(" ORDER BY a.CreateTime desc ");
return GetPage<RB_Class_FeedBack_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
var list= GetPage<RB_Class_FeedBack_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
return list;
}
}
......
......@@ -149,8 +149,8 @@ namespace Edu.WebApi.Controllers.Applet
#region 获取最新一条上课反馈记录
long count = 0;
var feedBackList = classModule.GetClassFeedBackPageListRepository(1, 1, out count, new RB_Class_FeedBack_ViewModel { StuId = appletUserInfo.AccountId, Group_Id = appletUserInfo.Group_Id });
List<RB_Class_FeedBack_ViewModel> feedBackList = classModule.GetClassFeedBackPageListRepository(1, 1, out long count, new RB_Class_FeedBack_ViewModel { StuId = appletUserInfo.AccountId, Group_Id = appletUserInfo.Group_Id });
if (feedBackList != null && feedBackList.Any())
{
feedBackList.ForEach(x => x.PhotoList = (!string.IsNullOrWhiteSpace(x.Photo) ? JsonHelper.DeserializeObject<List<string>>(x.Photo) : new List<string>()));
......@@ -767,7 +767,6 @@ namespace Edu.WebApi.Controllers.Applet
var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var query = new RB_Class_FeedBack_ViewModel()
{
Group_Id = appletUserInfo.Group_Id,
StuId = appletUserInfo.AccountId,
};
......@@ -789,7 +788,11 @@ namespace Edu.WebApi.Controllers.Applet
item.Comment,
item.Score,
CreateTimeYear = item.CreateTime.ToString("yyyy"),
CreatetimeStr = item.CreateTime.ToString("MM-dd HH:mm:ss")
CreatetimeStr = item.CreateTime.ToString("MM-dd HH:mm:ss"),
item.CourseName,
item.ClassDateStr,
item.StartTime,
item.EndTime
});
}
pageModel.Count = rowsCount;
......
@echo off
echo ASPNETCORE_ENVIRONMENT=Development
dotnet build
start "Edu.WebApi" dotnet bin\Debug\netcoreapp3.0\Edu.WebApi.dll
start "Edu.WebApi" dotnet bin\Debug\netcoreapp3.0\Edu.WebApi.dll --urls http://0.0.0.0:6001 --ip="127.0.0.1" --port=6001
exit
\ No newline at end of file
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