Commit 211d1d75 authored by 黄奎's avatar 黄奎

页面修改

parent 9e293249
This diff is collapsed.
This diff is collapsed.
...@@ -76,10 +76,10 @@ WHERE 1=1 ...@@ -76,10 +76,10 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_Room_ViewModel.Group_Id), query.Group_Id); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_Room_ViewModel.Group_Id), query.Group_Id);
} }
if (query.School_Id > 0) //if (query.School_Id > 0)
{ //{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_Room_ViewModel.School_Id), query.School_Id); // builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Class_Room_ViewModel.School_Id), query.School_Id);
} //}
if (!string.IsNullOrEmpty(query.RoomName)) if (!string.IsNullOrEmpty(query.RoomName))
{ {
builder.AppendFormat(" AND A.{0} LIKE @RoomName ", nameof(RB_Class_Room_ViewModel.RoomName)); builder.AppendFormat(" AND A.{0} LIKE @RoomName ", nameof(RB_Class_Room_ViewModel.RoomName));
......
...@@ -49,7 +49,6 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -49,7 +49,6 @@ namespace Edu.WebApi.Controllers.EduTask
MoveType = base.ParmJObj.GetInt("MoveType"), MoveType = base.ParmJObj.GetInt("MoveType"),
Remarks = base.ParmJObj.GetStringValue("Remarks") Remarks = base.ParmJObj.GetStringValue("Remarks")
}; };
if (model.ClassId <= 0) if (model.ClassId <= 0)
{ {
return ApiResult.ParamIsNull(message: "请选择要调整的班级!"); return ApiResult.ParamIsNull(message: "请选择要调整的班级!");
...@@ -58,7 +57,7 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -58,7 +57,7 @@ namespace Edu.WebApi.Controllers.EduTask
string receiptFile = string.Empty; string receiptFile = string.Empty;
try try
{ {
List<string> receiptFileList = Common.Plugin.JsonHelper.DeserializeObject<List<string>>(base.ParmJObj.GetStringValue("ReceiptFileList")); List<string> receiptFileList = JsonHelper.DeserializeObject<List<string>>(base.ParmJObj.GetStringValue("ReceiptFileList"));
if (receiptFileList == null || !receiptFileList.Any()) if (receiptFileList == null || !receiptFileList.Any())
{ {
receiptFile = ""; receiptFile = "";
...@@ -69,8 +68,8 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -69,8 +68,8 @@ namespace Edu.WebApi.Controllers.EduTask
} }
if (model.MoveType == 1) if (model.MoveType == 1)
{ {
model.OldChangePlanItemList = Common.Plugin.JsonHelper.DeserializeObject<List<ChangePlanItem>>(base.ParmJObj.GetStringValue("OldChangePlanItemList")); model.OldChangePlanItemList = JsonHelper.DeserializeObject<List<ChangePlanItem>>(base.ParmJObj.GetStringValue("OldChangePlanItemList"));
model.NewChangePlanItemList = Common.Plugin.JsonHelper.DeserializeObject<List<ChangePlanItem>>(base.ParmJObj.GetStringValue("NewChangePlanItemList")); model.NewChangePlanItemList = JsonHelper.DeserializeObject<List<ChangePlanItem>>(base.ParmJObj.GetStringValue("NewChangePlanItemList"));
} }
else else
{ {
...@@ -83,7 +82,6 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -83,7 +82,6 @@ namespace Edu.WebApi.Controllers.EduTask
} }
model.TakeEffectTime = Convert.ToDateTime(takeEffectTime); model.TakeEffectTime = Convert.ToDateTime(takeEffectTime);
} }
model.AllChangePlanModel = Common.Plugin.JsonHelper.DeserializeObject<AllChangePlanItem>(base.ParmJObj.GetStringValue("AllChangePlanItem")); model.AllChangePlanModel = Common.Plugin.JsonHelper.DeserializeObject<AllChangePlanItem>(base.ParmJObj.GetStringValue("AllChangePlanItem"));
} }
} }
...@@ -91,7 +89,9 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -91,7 +89,9 @@ namespace Edu.WebApi.Controllers.EduTask
{ {
Common.Plugin.LogHelper.Write(ex, "SetChangeClassPlan"); Common.Plugin.LogHelper.Write(ex, "SetChangeClassPlan");
} }
if (model.MoveType == 1)//固定日期 List<TimeItem> timeList = new List<TimeItem>();
//固定日期
if (model.MoveType == 1)
{ {
if (model.ChangeType == 1)//调课 if (model.ChangeType == 1)//调课
{ {
...@@ -99,6 +99,7 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -99,6 +99,7 @@ namespace Edu.WebApi.Controllers.EduTask
{ {
return ApiResult.Failed("排课原次数与现有次数不一致"); return ApiResult.Failed("排课原次数与现有次数不一致");
} }
} }
else if (model.ChangeType == 2) else if (model.ChangeType == 2)
{ {
...@@ -114,8 +115,31 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -114,8 +115,31 @@ namespace Edu.WebApi.Controllers.EduTask
return ApiResult.Failed("请选择教室"); return ApiResult.Failed("请选择教室");
} }
} }
//固定日期上课计划验证冲突
timeList = new List<TimeItem>();
foreach (var item in model.NewChangePlanItemList)
{
foreach (var subItem in item.PlanTimeList)
{
timeList.Add(new TimeItem
{
StartTime = Common.ConvertHelper.FormatDate(item.ClassDate) + " " + subItem.StartTime + ":00",
EndTime = Common.ConvertHelper.FormatDate(item.ClassDate) + " " + subItem.EndTime + ":00",
});
}
}
if (timeList != null && timeList.Count > 0)
{
//var objList = changeClassPlanModule.GetRepeatListModule(model.ClassId, model.NewChangePlanItemList, timeList);
//if (objList != null && objList.Count > 0)
//{
// return ApiResult.Failed("存在上课计划冲突的数据!", data: objList);
//}
}
} }
else //全局修改 //全局修改
else
{ {
if (model.ChangeType == 1) if (model.ChangeType == 1)
{ {
...@@ -201,6 +225,11 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -201,6 +225,11 @@ namespace Edu.WebApi.Controllers.EduTask
{ {
return ApiResult.Failed("班级信息不存在"); return ApiResult.Failed("班级信息不存在");
} }
//var dateList = changeClassPlanModule.GetAllDateAndTimeRepeatListModule(model.ClassId, model.AllChangePlanModel,base.UserInfo);
//if (dateList != null && dateList.Count > 0)
//{
// return ApiResult.Failed("存在上课计划冲突的数据!", data: dateList);
//}
} }
else if (model.ChangeType == 2) else if (model.ChangeType == 2)
{ {
...@@ -208,6 +237,11 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -208,6 +237,11 @@ namespace Edu.WebApi.Controllers.EduTask
{ {
return ApiResult.Failed("请选择老师"); return ApiResult.Failed("请选择老师");
} }
//var teacherlist = changeClassPlanModule.GetAllRepeatListModule(model.ClassId, Common.ConvertHelper.FormatDate(model.TakeEffectTime), TeacherId: model.AllChangePlanModel.TeacherId);
//if (teacherlist != null && teacherlist.Count > 0)
//{
// return ApiResult.Failed("存在上课计划冲突的数据!", data: teacherlist);
//}
} }
else if (model.ChangeType == 3) else if (model.ChangeType == 3)
{ {
...@@ -215,6 +249,11 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -215,6 +249,11 @@ namespace Edu.WebApi.Controllers.EduTask
{ {
return ApiResult.Failed("请选择教室"); return ApiResult.Failed("请选择教室");
} }
//var classroomlist = changeClassPlanModule.GetAllRepeatListModule(model.ClassId, Common.ConvertHelper.FormatDate(model.TakeEffectTime), ClassRoomId: model.AllChangePlanModel.ClassRoomId);
//if (classroomlist != null && classroomlist.Count > 0)
//{
// return ApiResult.Failed("存在上课计划冲突的数据!", data: classroomlist);
//}
} }
} }
if (model.OldChangePlanItemList != null && model.OldChangePlanItemList.Any()) if (model.OldChangePlanItemList != null && model.OldChangePlanItemList.Any())
......
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