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()