Commit 66955093 authored by 吴春's avatar 吴春

提交代码

parent 5a153466
......@@ -734,10 +734,10 @@ namespace Edu.WebApi.Controllers.Course
{
return ApiResult.Failed("请填写教案指导项目");
}
else
{
item.LessonPlanProjectsList.ForEach(x => x.ProjectContent = (x.ProjectContentList != null && x.ProjectContentList.Any()) ? JsonHelper.Serialize(x.ProjectContentList) : "");
}
//else
//{
// item.LessonPlanProjectsList.ForEach(x => x.ProjectContent = (x.ProjectContentList != null && x.ProjectContentList.Any()) ? JsonHelper.Serialize(x.ProjectContentList) : "");
//}
if (item.LessonPlanDetailsList == null || !item.LessonPlanDetailsList.Any())
{
return ApiResult.Failed("请填写教案详情");
......@@ -800,7 +800,6 @@ namespace Edu.WebApi.Controllers.Course
model.DayTime = planTiemList.Min(x => Convert.ToDateTime(x.NewPlanDateTime)).ToString("HH:mm");
startTime = planTiemList.Min(x => Convert.ToDateTime(x.NewPlanDateTime));
endTime = planTiemList.Max(x => Convert.ToDateTime(x.NewPlanDateTime));
model.RestTime = endTime.Subtract(startTime).TotalMilliseconds.ToString();
planTiemList.ForEach(x => x.NewPlanDateTime = planDate.ClassDate.ToString("yyyy-MM-dd") + " " + x.EndTime);
model.DayTime = model.DayTime + "~" + planTiemList.Max(x => Convert.ToDateTime(x.NewPlanDateTime)).ToString("HH:mm");
......@@ -843,9 +842,15 @@ namespace Edu.WebApi.Controllers.Course
}
}
item.LessonPlanProjectsList = projectList.Where(x => x.LessonPlanId == item.LessonPlanId).ToList();
item.LessonPlanProjectsList.ForEach(x => x.ProjectContentList = (string.IsNullOrWhiteSpace(x.ProjectContent) ? new List<string>() : Common.Plugin.JsonHelper.DeserializeObject<List<string>>(x.ProjectContent)));
// item.LessonPlanProjectsList.ForEach(x => x.ProjectContentList = (string.IsNullOrWhiteSpace(x.ProjectContent) ? new List<string>() : Common.Plugin.JsonHelper.DeserializeObject<List<string>>(x.ProjectContent)));
}
}
else
{
model.LessonPlanList = new List<RB_Class_LessonPlan_ViewModel>();
model.LessonPlanList.Add(new RB_Class_LessonPlan_ViewModel { CourseName = "活動編", LessonPlanDetailsList = new List<RB_Class_LessonPlanDetails_ViewModel>(), LessonPlanProjectsList = new List<RB_Class_LessonPlanProjects_ViewModel>() });
model.LessonPlanList.Add(new RB_Class_LessonPlan_ViewModel { CourseName = "理解編", LessonPlanDetailsList = new List<RB_Class_LessonPlanDetails_ViewModel>(), LessonPlanProjectsList = new List<RB_Class_LessonPlanProjects_ViewModel>() });
}
return ApiResult.Success("", model);
}
......@@ -890,7 +895,7 @@ namespace Edu.WebApi.Controllers.Course
item.LessonPlanProjectsList = new List<RB_Class_LessonPlanProjects_ViewModel>();
item.LessonPlanDetailsList = detailsList.Where(x => x.LessonPlanId == item.LessonPlanId).ToList();
item.LessonPlanProjectsList = projectList.Where(x => x.LessonPlanId == item.LessonPlanId).ToList();
item.LessonPlanProjectsList.ForEach(x => x.ProjectContentList = (string.IsNullOrWhiteSpace(x.ProjectContent) ? new List<string>() : Common.Plugin.JsonHelper.DeserializeObject<List<string>>(x.ProjectContent)));
// item.LessonPlanProjectsList.ForEach(x => x.ProjectContentList = (string.IsNullOrWhiteSpace(x.ProjectContent) ? new List<string>() : Common.Plugin.JsonHelper.DeserializeObject<List<string>>(x.ProjectContent)));
}
List.Add(model);
}
......
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