From 87c6b1e689a91bdcedc61346ed0569020e101cf8 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 13 Sep 2022 17:12:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E6=89=8D=E6=8B=9B=E8=81=98=20?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E8=BA=AB=E4=BB=BD=E8=AF=81=E5=8F=B7=E5=81=9A?= =?UTF-8?q?=E5=94=AF=E4=B8=80=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/RecruiterPeopleApi.cs | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/RecruiterPeopleApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/RecruiterPeopleApi.cs index fd6382e13..0806d81ae 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/RecruiterPeopleApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/RecruiterPeopleApi.cs @@ -111,6 +111,21 @@ namespace Learun.Application.WebApi { ReqFormEntity parameter = this.GetReqData(); HiringRegistrationEntity entity = parameter.strEntity.ToObject(); + var model = hiringRegistrationIBLL.GetIDCard(entity.IdentityCardNo); + if (string.IsNullOrEmpty(parameter.keyValue)) + { + if (model != null) + { + return Fail("身份证号已存在!"); + } + } + else + { + if (model != null && model.ID != parameter.keyValue) + { + return Fail("身份证号已存在!"); + } + } hiringRegistrationIBLL.SaveEntity(parameter.keyValue, entity); return Success("保存成功!"); } @@ -124,21 +139,21 @@ namespace Learun.Application.WebApi { ReqFormEntity parameter = this.GetReqData(); TalentsJoinInfoEntity entity = parameter.strEntity.ToObject(); - //var model = talentsJoinInfoIBLL.GetIdCard(entity.IdentityCardNo); - //if (string.IsNullOrEmpty(parameter.keyValue)) - //{ - // if (model != null) - // { - // return Fail("身份证号已存在!"); - // } - //} - //else - //{ - // if (model != null && model.ID != parameter.keyValue) - // { - // return Fail("身份证号已存在!"); - // } - //} + var model = talentsJoinInfoIBLL.GetIdCard(entity.IdentityCardNo); + if (string.IsNullOrEmpty(parameter.keyValue)) + { + if (model != null) + { + return Fail("身份证号已存在!"); + } + } + else + { + if (model != null && model.ID != parameter.keyValue) + { + return Fail("身份证号已存在!"); + } + } talentsJoinInfoIBLL.SaveEntity(parameter.keyValue, entity); return Success("保存成功!"); }