From 309f7073be45de386ac11d258bee06a77896e3c4 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 12 Mar 2025 12:05:37 +0800 Subject: [PATCH] 11 --- .../Ghre/Ghre_StudyRecordServices.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index c662b636..0d458327 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -1919,6 +1919,20 @@ ORDER BY {filter.orderBy}"; .Where(it => ids.Contains(it.Id)) .ExecuteCommandAsync(); + #region 补充逻辑,只学习,未进入到考试页面 + var examId = await Db.Queryable() + .Where(x => ids.Contains(x.Id) && x.ExamId != null) + .Select(x => x.ExamId).Distinct().ToListAsync(); + staffIds = await Db.Queryable() + .Where(x => ids.Contains(x.Id) && x.StaffId != null) + .Select(x => x.StaffId).Distinct().ToListAsync(); + + await Db.Updateable() + .SetColumns(it => new Ghre_ExamStaff() { IsEnable = 0 }, true) + .Where(it => staffIds.Contains(it.StaffId) && it.StaffId != null && it.ExamId != null && examIds.Contains(it.ExamId)) + .ExecuteCommandAsync(); + #endregion + return true; } #endregion