diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs index 0a8113a3..e554365a 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs @@ -736,7 +736,7 @@ public class Ghre_ExamServices : BaseServices x.ExamId == Id); @@ -1091,7 +1091,7 @@ public class Ghre_ExamServices : BaseServices> Insert1(long id, DefaultGhre_ExamPageData pageData) { - if (pageData.DateType == "ExamDate") + if (pageData.DateType == Consts.DicExamDateType.EXAM_DATE) { pageData.BeginTime = Convert.ToDateTime(pageData.ExamDate[0]); pageData.EndTime = Convert.ToDateTime(pageData.ExamDate[1]); @@ -1281,7 +1281,7 @@ public class Ghre_ExamServices : BaseServices() + var studyRecords = await Db.Queryable() .WhereIF(!entity.CourseId.IsNull(), x => x.CourseId == entity.CourseId) .WhereIF(!entity.CourseSceneId.IsNull(), x => x.CourseSceneId == entity.CourseSceneId) .Where(x => x.ExamId == null).ToListAsync(); @@ -1289,6 +1289,12 @@ public class Ghre_ExamServices : BaseServices new { it.ExamId }).ExecuteCommandAsync(); #endregion + if (entity.DateType == Consts.DicExamDateType.EXAM_DATE) + { + courseEndTime = entity.EndTime.Value.Date.AddDays(1); + courseTime = courseEndTime.AddDays(-(snap?.ValidityPeriod ?? 1)); + } + for (int i = 0; i < staffs.Count; i++) { var staff = staffs[i];