|
|
@@ -277,9 +277,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
var weekTimeAry = model.WeekTimeSelect.Split(','); |
|
|
|
foreach (var weekTime in weekTimeAry) |
|
|
|
{ |
|
|
|
//第几周 |
|
|
|
var weektime = Convert.ToInt32(weekTime); |
|
|
|
//原先星期几 |
|
|
|
var LessonTimeOld_week = Convert.ToInt32(LessonTimeOld?.Split('-')[0]); |
|
|
|
//需要修改周次的开课时间 |
|
|
|
var lessonDate = GetLessonDate(weektime, Convert.ToInt32(LessonTimeOld?.Split('-')[0])); |
|
|
|
var lessonDate = GetLessonDate(weektime, LessonTimeOld_week); |
|
|
|
|
|
|
|
//最后调整到 |
|
|
|
var lessonDateNew = GetLessonDate(weektime, model.WeekSelect); |
|
|
@@ -361,9 +364,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
x.LessonDate == lessonDate && x.LessonTime == LessonTimeOld); |
|
|
|
//当前星期-节次 |
|
|
|
var lessiontimeNow = model.WeekSelect + "-" + model.NodeSelect; |
|
|
|
if (entity == null) |
|
|
|
if (LessonTimeOld_week == 0) |
|
|
|
//if (entity == null) |
|
|
|
{ |
|
|
|
//不存在 新增 |
|
|
|
//不存在则新增 |
|
|
|
var startdate = DateTime.Today; |
|
|
|
var startDate = Common.CalculateFirstDateOfWeek(startdate).ToString("yyyy-MM-dd"); |
|
|
|
|
|
|
@@ -375,7 +379,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
entity.LessonDate = lessonDateNew; |
|
|
|
entity.AcademicYearNo = semesterAndYear.AcademicYearShort; |
|
|
|
entity.Semester = semesterAndYear.Semester; |
|
|
|
entity.LessonDate = lessonDate; |
|
|
|
|
|
|
|
entity.DeptNo = classInfo?.DeptNo; |
|
|
|
entity.MajorNo = classInfo?.MajorNo; |
|
|
@@ -465,8 +468,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration |
|
|
|
/// <summary> |
|
|
|
/// 获取开课时间 |
|
|
|
/// </summary> |
|
|
|
/// <param name="weektime"></param> |
|
|
|
/// <param name="WeekSelect"></param> |
|
|
|
/// <param name="weektime">周次</param> |
|
|
|
/// <param name="WeekSelect">星期几</param> |
|
|
|
/// <returns></returns> |
|
|
|
private DateTime GetLessonDate(int weektime, int WeekSelect) |
|
|
|
{ |
|
|
|