Commit b31a07f3 authored by 黄奎's avatar 黄奎

页面修改

parent 0d196e9b
...@@ -157,7 +157,7 @@ namespace Edu.Module.Course ...@@ -157,7 +157,7 @@ namespace Edu.Module.Course
{ {
//提前时间 //提前时间
string Scroll_Time = dictvalueRepository.GetList(new Model.ViewModel.User.RB_Dictvalue_Extend() { RB_Group_id = groupId, DictKey = "Scroll_Time" }).FirstOrDefault()?.Content ?? "00:00"; string Scroll_Time = dictvalueRepository.GetList(new Model.ViewModel.User.RB_Dictvalue_Extend() { RB_Group_id = groupId, DictKey = "Scroll_Time" }).FirstOrDefault()?.Content ?? "00:00";
// Scroll_Time = "11:00:00"; //Scroll_Time = "13:00:00";
//按照设置的时间来判定 //按照设置的时间来判定
if (DateTime.Now.Hour == Convert.ToDateTime("2022-01-25 " + Scroll_Time).Hour) if (DateTime.Now.Hour == Convert.ToDateTime("2022-01-25 " + Scroll_Time).Hour)
...@@ -188,7 +188,26 @@ namespace Edu.Module.Course ...@@ -188,7 +188,26 @@ namespace Edu.Module.Course
#endregion #endregion
List<int> CancelStuId = new List<int>(); List<int> CancelStuId = new List<int>();
var tempAppointList = AppointList.GroupBy(x => new { x.Date, x.AccountId, x.WorkUserId, x.TeacherId, x.TeacherName, x.CourseId, x.CourseName, x.ChapterNo, x.ShiftSort, x.CourseTimeId, x.RoomId, x.RoomName, x.RoomSchoolId, x.RoomSchoolName, x.ScrollMinNum }).OrderBy(x => x.Key.Date).ThenBy(x => x.Key.ShiftSort).ToList(); var tempAppointList = AppointList.GroupBy(x => new
{
x.Date,
x.AccountId,
x.WorkUserId,
x.TeacherId,
x.TeacherName,
x.CourseId,
x.CourseName,
x.ChapterNo,
x.ShiftSort,
x.CourseTimeId,
x.RoomId,
x.RoomName,
x.RoomSchoolId,
x.RoomSchoolName,
x.ScrollMinNum,
x.CourseETime,
x.CourseSTime
}).OrderBy(x => x.Key.Date).ThenBy(x => x.Key.ShiftSort).ToList();
//以老师为单位 遍历 //以老师为单位 遍历
foreach (var item in tempAppointList) foreach (var item in tempAppointList)
{ {
...@@ -216,11 +235,12 @@ namespace Edu.Module.Course ...@@ -216,11 +235,12 @@ namespace Edu.Module.Course
OperatorEnum =OperatorEnum.Equal OperatorEnum =OperatorEnum.Equal
} }
}; };
bool flag = scroll_AppointmentRepository.Update(keyValues, wheres); bool flag = true;
//flag= scroll_AppointmentRepository.Update(keyValues, wheres);
if (flag) if (flag)
{ {
//给学生推送 取消课程的订阅消息 //给学生推送 取消课程的订阅消息 10-09注释
SendAppointmentCancelMsg(token, qitem.StuOpenId, qitem, StartTime); //SendAppointmentCancelMsg(token, qitem.StuOpenId, qitem, StartTime);
if (qitem.AppointType == 2) if (qitem.AppointType == 2)
{ {
...@@ -383,16 +403,15 @@ namespace Edu.Module.Course ...@@ -383,16 +403,15 @@ namespace Edu.Module.Course
PlanType = 2, PlanType = 2,
CourseId = item.Key.CourseId CourseId = item.Key.CourseId
}; };
string sTime = CourseTimeList.FirstOrDefault().StartTime;
string eTime = CourseTimeList.FirstOrDefault().EndTime;
var oldModel = planList?.FirstOrDefault(qitem => qitem.Group_Id == groupId var oldModel = planList?.FirstOrDefault(qitem => qitem.Group_Id == groupId
&& qitem.School_Id == item.Key.RoomSchoolId && qitem.School_Id == item.Key.RoomSchoolId
&& qitem.TeacherId == item.Key.TeacherId && qitem.TeacherId == item.Key.TeacherId
&& qitem.ClassRoomId == item.Key.RoomId && qitem.ClassRoomId == item.Key.RoomId
&& Common.ConvertHelper.FormatDate(qitem.ClassDate) == Common.ConvertHelper.FormatDate(item.Key.Date) && Common.ConvertHelper.FormatDate(qitem.ClassDate) == Common.ConvertHelper.FormatDate(item.Key.Date)
&& qitem.PlanType == 2 && qitem.PlanType == 2
&& qitem.StartTime == sTime && qitem.StartTime == item.Key.CourseSTime
&& qitem.EndTime == eTime && qitem.EndTime == item.Key.CourseETime
&& qitem.CourseId == item.Key.CourseId); && qitem.CourseId == item.Key.CourseId);
//先查询计划是否已存在 //先查询计划是否已存在
if (oldModel != null && oldModel.ClassPlanId > 0) if (oldModel != null && oldModel.ClassPlanId > 0)
......
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