From ea531c2049947e65900b7b53b5d5c9f4aadafa3b Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 19 Mar 2025 23:18:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E8=AE=B0=E5=BD=95=E9=9C=80?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=97=A0=E9=9C=80=E5=AD=A6=E4=B9=A0=E7=9A=84?= =?UTF-8?q?=E8=80=83=E8=AF=95=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index daca44dd..e8b3dd4f 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -37,19 +37,18 @@ 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 BeginTime IS NOT NULL AND StaffId IN ({string.Join(",", staffIds.Select(id => "'" + id + "'"))})"; + conditions = $" WHERE ((BeginTime IS NOT NULL AND ( IsRequireStudy='true' OR IsRequireStudy IS NULL )) OR IsRequireStudy='false') AND StaffId IN ({string.Join(",", staffIds.Select(id => "'" + id + "'"))})"; } if (IsEnable == true) conditions += " AND IsEnable = 1"; else if (IsEnable == false) conditions += " AND IsEnable = 0"; - conditions += " AND (IsRequireStudy = 'true' OR IsRequireStudy IS NULL)"; if (!string.IsNullOrWhiteSpace(condition)) conditions += " AND " + condition;