From 89db61a986edad0009f911b1f12ad5c12e72de3d Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Fri, 7 Mar 2025 13:32:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B2=E5=B8=88=E7=BB=B4=E6=8A=A4=E2=80=94?= =?UTF-8?q?=E2=80=94=E9=9C=80=E8=A6=81=E8=AE=BE=E5=AE=9A=E6=9C=89=E6=95=88?= =?UTF-8?q?=E6=9C=9F=EF=BC=88=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5=E6=9C=89?= =?UTF-8?q?=E6=95=88=E6=9C=9F=E8=B5=B7=E3=80=81=E6=9C=89=E6=95=88=E6=9C=9F?= =?UTF-8?q?=E8=AE=AB=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs b/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs index 4b3c837d..786e4168 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs @@ -192,6 +192,9 @@ FROM (SELECT A.*, public override async Task Add(InsertGhre_TeacherInput entity) { + if (entity.EffectiveDate != null && entity.ExpirationDate != null) + if (entity.EffectiveDate > entity.ExpirationDate) + throw new Exception($"失效日期必须大于生效日期!"); if (entity.TeacherType == "In") { @@ -241,6 +244,11 @@ FROM (SELECT A.*, public override async Task Update(long Id, EditGhre_TeacherInput editModel) { + + if (editModel.EffectiveDate != null && editModel.ExpirationDate != null) + if (editModel.EffectiveDate > editModel.ExpirationDate) + throw new Exception($"失效日期必须大于生效日期!"); + if (editModel.TeacherType == "In") { editModel.SchoolId = null;