From 7be2c47d320f2b9368abd478d227b9d8e7a3a119 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Thu, 26 Dec 2024 14:00:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B2=E5=B8=88=E7=BB=B4=E6=8A=A4=E6=96=B0?= =?UTF-8?q?=E5=A2=9EExcel=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs b/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs index 3b265ca7..5ab78016 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs @@ -505,6 +505,15 @@ FROM (SELECT A.*, } dict.Add("TeacherType", "Out"); } + + if (await base.AnyAsync(x => x.TeacherNo == TeacherNo)) + { + comments.Add("讲师编号重复!"); + data.ErrorCount++; + dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a)); + isExistError = true; + continue; + } if (TeacherLevel.IsNullOrEmpty()) { comments.Add("讲师等级不能为空!");