From c4c22f1b07d6c2b8a0d8d3971ab8b6e48be7577b Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 11 Jun 2025 13:16:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E8=AE=B0=E5=BD=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=20=E6=96=B0=E5=A2=9E=E8=BF=94=E5=9B=9E=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E8=80=83=E8=AF=95=E8=AE=B0=E5=BD=95=20=E5=BF=85?= =?UTF-8?q?=E9=80=89=E4=BF=AE=E8=A7=84=E5=88=99=E4=BA=A7=E7=94=9F=E5=AD=A6?= =?UTF-8?q?=E4=B9=A0=E8=AE=B0=E5=BD=95=E6=96=B0=E5=A2=9E=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E9=9B=86=E5=9B=A2=E6=95=B0=E6=8D=AE=E5=BD=92=E5=B1=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ghre/Ghre_StudyRecordServices.cs | 25 +++++++++++++++++-- .../Ghre/Ghre_StudyRuleServices.cs | 1 + .../Ghre/Ghre_SurveyServices.cs | 2 ++ 3 files changed, 26 insertions(+), 2 deletions(-) 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);