|
|
@ -192,6 +192,9 @@ FROM (SELECT A.*, |
|
|
|
|
|
|
|
|
|
|
|
public override async Task<long> Add(InsertGhre_TeacherInput entity) |
|
|
|
public override async Task<long> Add(InsertGhre_TeacherInput entity) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
if (entity.EffectiveDate != null && entity.ExpirationDate != null) |
|
|
|
|
|
|
|
if (entity.EffectiveDate > entity.ExpirationDate) |
|
|
|
|
|
|
|
throw new Exception($"失效日期必须大于生效日期!"); |
|
|
|
|
|
|
|
|
|
|
|
if (entity.TeacherType == "In") |
|
|
|
if (entity.TeacherType == "In") |
|
|
|
{ |
|
|
|
{ |
|
|
@ -241,6 +244,11 @@ FROM (SELECT A.*, |
|
|
|
|
|
|
|
|
|
|
|
public override async Task<bool> Update(long Id, EditGhre_TeacherInput editModel) |
|
|
|
public override async Task<bool> 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") |
|
|
|
if (editModel.TeacherType == "In") |
|
|
|
{ |
|
|
|
{ |
|
|
|
editModel.SchoolId = null; |
|
|
|
editModel.SchoolId = null; |
|
|
|