diff --git a/Tiobon.Core.Model/ViewModels/Extend/Ghre_StudyRecordESS.cs b/Tiobon.Core.Model/ViewModels/Extend/Ghre_StudyRecordESS.cs index e70accc9..d15006ff 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/Ghre_StudyRecordESS.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/Ghre_StudyRecordESS.cs @@ -26,10 +26,10 @@ public class Ghre_StudyRecordESS public int? CreditPoints { get; set; } public string CourseBeginDate { get; set; } - public string CourseEndDate { get; set; } - public string ExamDate { get; set; } - public string ExamBeginDate { get; set; } - public string ExamEndDate { get; set; } + public DateTime? CourseEndDate { get; set; } + public DateTime? ExamDate { get; set; } + public DateTime? ExamBeginDate { get; set; } + public DateTime? ExamEndDate { get; set; } public bool? ShowStudyBtn { get; set; } = true; public bool? DisableStudyBtn { get; set; } = false; @@ -39,4 +39,8 @@ public class Ghre_StudyRecordESS public bool? DisableFeedbackBtn { get; set; } = true; public int StudyProgress { get; set; } = 0; + public int? AfterHowLong { get; set; } + public string ExamDateType { get; set; } + public string CourseDateString { get; set; } + public string ExamDateString { get; set; } } diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs index 92ecefcf..a3b26047 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs @@ -1423,6 +1423,7 @@ public class Ghre_ExamServices : BaseServices(); insert.ExamNo = await GenerateContinuousSequence(); + insert.ExamName = insert.ExamName + "_复制"; var insertStaffs = Mapper.Map(exam).ToANew>(); id = await base.Add(insert); insertStaffs.ForEach(x => x.ExamId = id); diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index db622b59..36b03542 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -189,15 +189,17 @@ namespace Tiobon.Core.Services A.CourseName, A.StandardHour, A.CreditPoints, - A.BeginTime CourseBeginDate, - A.EndTime CourseEndDate, + A.CourseEndTime CourseBeginDate, + A.CourseEndTime CourseEndDate, A.ExamDate, A.ExamBeginDate, A.ExamEndDate, A.JoinTime, A.CourseClassId, A.CourseSceneId, - A.CourseType + A.CourseType, + A.ExamDateType, + A.AfterHowLong FROM Ghre_StudyRecord_V A"; string conditions = $" WHERE UserId={App.User.ID} "; @@ -284,6 +286,15 @@ namespace Tiobon.Core.Services sql += " WHERE NUM <= " + filter.pageNum * filter.pageSize + " AND NUM >" + (filter.pageNum - 1) * filter.pageSize; var entitys = await Db.Ado.SqlQueryAsync(sql); + entitys.ForEach(x => + { + if (x.CourseBeginDate != null && x.CourseEndDate != null) + x.CourseDateString = DateTimeHelper.ConvertToDayString(x.CourseBeginDate) + "~" + DateTimeHelper.ConvertToDayString(x.CourseEndDate); + if (x.CourseBeginDate != null && x.CourseEndDate != null) + x.ExamDateString = DateTimeHelper.ConvertToDayString(x.ExamBeginDate) + "~" + DateTimeHelper.ConvertToDayString(x.ExamBeginDate); + else + x.ExamDateString = "-"; + }); return new ServicePageResult(filter.pageNum, total, filter.pageSize, entitys);