diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index b869db8b..e9995e29 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -127,6 +127,28 @@ public class Ghre_StudyRecordServices : BaseServices() + .OrderByDescending(x => x.ExamTime) + .Where(x => x.ExamRecordId == entity.ExamRecordId) + .Select(x => new + { + GroupId = x.Id, + x.ExamRecordId, + x.ExamTime, + x.Score + }).ToListAsync(); + entity.Groups = Groups + .Select(x => new ExamGroup() + { + GroupId = x.GroupId, + ExamRecordId = x.ExamRecordId, + ExamTime = x.ExamTime.ObjToString() + (x.Score != null ? $"得分:{x.Score}" : ""), + }).ToList(); + } + entitys[i] = entity; } @@ -221,8 +243,7 @@ public class Ghre_StudyRecordServices : BaseServices() .OrderByDescending(x => x.ExamTime) .Where(x => x.ExamRecordId == entity.ExamRecordId) diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs index bcc47b68..c67c8f43 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs @@ -408,6 +408,7 @@ public class Ghre_StudyRuleServices : BaseServices GradeIds.Contains(x.GradeID)) .WhereIF(JobIds.Any(), x => JobIds.Contains(x.JobID)) .WhereIF(!ruleStaffIds.IsNull() && ruleStaffIds.Any(), x => ruleStaffIds.Contains(x.StaffID)) + .WhereIF(rule.DataBelongID.IsNotEmptyOrNull(), x => x.DataBelongID == rule.DataBelongID) .ToListAsync(); if (staffs.Any()) diff --git a/Tiobon.Core.Services/Ghre/Ghre_SurveyServices.cs b/Tiobon.Core.Services/Ghre/Ghre_SurveyServices.cs index 907ffb76..330e1248 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_SurveyServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_SurveyServices.cs @@ -869,6 +869,8 @@ WHERE A.IsEnable = 1 AND A.Status ! = 'Temporary' x.BeginEndTime = $"{DateTimeHelper.ConvertToMiniuteString(x.BeginTime)}~{DateTimeHelper.ConvertToMiniuteString(x.EndTime)}"; else x.BeginEndTime = "长期"; + + x.SurveyStatus = x.SurveyStatus == "Publish" ? "进行中" : "已结束"; }); return new ServicePageResult(filter.pageNum, total, filter.pageSize, entitys);