From ca5ceed30a1c4e423e249c3fe4a9d28cf7148099 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 4 Sep 2024 16:04:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E8=AE=B0=E5=BD=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ghre/Ghre_StudyRecordServices.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index 1c728dc3..100accd0 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -51,12 +51,12 @@ public class Ghre_StudyRecordServices : BaseServices().Where(x => x.DataPrivType == "Priv" && x.MenuNo == filter.menuName).AnyAsync()) { var staffIds = await GetUserStaffPrivIds((int)App.User.ID); if (staffIds.Any()) - conditions = $" WHERE StaffId IN ({string.Join(",", staffIds.Select(id => "'" + id + "'"))})"; + conditions = $" WHERE BeginTime IS NOT NULL AND StaffId IN ({string.Join(",", staffIds.Select(id => "'" + id + "'"))})"; } if (IsEnable == true) @@ -136,7 +136,7 @@ public class Ghre_StudyRecordServices : BaseServices().FirstAsync(x => x.CourseId == entity.CourseId); entity.CourseSnapId = snap?.Id; - entity.CourseType = "ManualInsert"; + if (entity.CourseType.IsNullOrEmpty()) + entity.CourseType = "ManualInsert"; var result = await base.Add(entity); var id = SnowFlakeSingle.Instance.NextId(); @@ -700,9 +701,10 @@ public class Ghre_StudyRecordServices : BaseServices