master
xiaochanghai 11 months ago
parent e2d761506f
commit 9027af834e
  1. 12
      Tiobon.Core.Model/ViewModels/Extend/Ghre_StudyRecordESS.cs
  2. 1
      Tiobon.Core.Services/Ghre/Ghre_ExamServices.cs
  3. 17
      Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.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; }
}

@ -1423,6 +1423,7 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr
var insert = Mapper.Map(exam).ToANew<InsertGhre_ExamInput>();
insert.ExamNo = await GenerateContinuousSequence();
insert.ExamName = insert.ExamName + "_复制";
var insertStaffs = Mapper.Map(exam).ToANew<List<InsertGhre_ExamStaffInput>>();
id = await base.Add(insert);
insertStaffs.ForEach(x => x.ExamId = id);

@ -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<Ghre_StudyRecordESS>(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<Ghre_StudyRecordESS>(filter.pageNum, total, filter.pageSize, entitys);

Loading…
Cancel
Save