From aa412d9c62261f476fb844753fefb90b858d94dd Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Tue, 13 Aug 2024 16:26:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=AF=95=E7=AE=A1=E7=90=86=E5=8F=91?= =?UTF-8?q?=E5=B8=83=20=E4=BC=98=E5=8C=96=E5=AD=A6=E4=B9=A0=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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];