From 06414c9bdc13f3a4ef7f3588b5f62d545aa7bf97 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Tue, 4 Mar 2025 15:45:45 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=94=AF=E4=BA=9A=E5=A8=81=E3=80=91?= =?UTF-8?q?=E5=BF=85=E9=80=89=E4=BF=AE=E8=A7=84=E5=88=99=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=9B=B4=E6=8E=A5=E5=88=A0=E9=99=A4=E5=85=B3=E8=81=94?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=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_StudyRuleServices.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs index ac637b34..764bf37c 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs @@ -657,9 +657,12 @@ public class Ghre_StudyRuleServices : BaseServices public override async Task DeleteById1(object id) { - - if (await Db.Queryable().AnyAsync(x => x.StudyRuleId == id.ObjToLong() && x.StudyStatus != Consts.DIC_STUDY_RECORD_STUDY_STATUS.NO_JOIN)) - throw new Exception($"有学员已经学习,暂不可作废!"); + var companyCode = await QueryCompanyCode(); + if (companyCode != "Viavi") + { + if (await Db.Queryable().AnyAsync(x => x.StudyRuleId == id.ObjToLong() && x.StudyStatus != Consts.DIC_STUDY_RECORD_STUDY_STATUS.NO_JOIN)) + throw new Exception($"有学员已经学习,暂不可作废!"); + } await Db.Updateable() .SetColumns(it => new Ghre_StudyRecord()