Commit bb1900ab authored by liudong1993's avatar liudong1993

1 修改约课教室

parent a9282b17
......@@ -2934,7 +2934,7 @@ namespace Edu.Module.Course
}
/// <summary>
/// 修改上课教
/// 修改上课教
/// </summary>
/// <param name="teacherId"></param>
/// <param name="date"></param>
......@@ -2950,7 +2950,7 @@ namespace Edu.Module.Course
{
return "请选择其他教室";
}
bool flag = false;
foreach (var item in appointList) {
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
{ nameof(RB_Scroll_Appointment_ViewModel.RoomId), roomId}
......@@ -2962,7 +2962,42 @@ namespace Edu.Module.Course
OperatorEnum =OperatorEnum.Equal
}
};
scroll_AppointmentRepository.Update(keyValues, wheres);
flag = scroll_AppointmentRepository.Update(keyValues, wheres);
}
if (flag) {
var appointModel = appointList.FirstOrDefault();
if (appointModel.State == Common.Enum.Course.CourseAppointStateEnum.WaitCourse || appointModel.State == Common.Enum.Course.CourseAppointStateEnum.Coursed)
{
//待上课 需要更新 上课计划 class_plan
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
{ nameof(RB_Class_Plan_ViewModel.ClassRoomId), roomId}
};
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
FiledName = nameof(RB_Class_Plan_ViewModel.ClassPlanId),
FiledValue = appointModel.ClassPlanId,
OperatorEnum =OperatorEnum.Equal
}
};
class_PlanRepository.Update(keyValues, wheres);
}
if (appointModel.State == Common.Enum.Course.CourseAppointStateEnum.Coursed) {
//已上课 需要更新 签到数据 class_check
var checkList = class_CheckRepository.GetClassCheckListRepository(new RB_Class_Check_ViewModel() { Group_Id = userInfo.Group_Id, QClassPlanIds = appointModel.ClassPlanId.ToString() });
foreach (var qitem in checkList) {
Dictionary<string, object> keyValues = new Dictionary<string, object>() {
{ nameof(RB_Class_Check_ViewModel.ClassRoomId), roomId}
};
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
FiledName = nameof(RB_Class_Check_ViewModel.ClassCheckId),
FiledValue = qitem.ClassCheckId,
OperatorEnum =OperatorEnum.Equal
}
};
class_CheckRepository.Update(keyValues, wheres);
}
}
}
}
return "";
......
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