From 64655b051c085f6e441a955c51f0984c28efbdbe Mon Sep 17 00:00:00 2001 From: Frane Date: Fri, 20 Aug 2021 10:00:34 +0800 Subject: [PATCH] 20210820 --- SGGL/BLL/ZHGL/RealName/SynchroSetService.cs | 7 +++---- .../HSSE/SitePerson/PersonListEdit.aspx.cs | 11 ++++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs index 383bfad4..f31758d3 100644 --- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs +++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs @@ -1040,13 +1040,12 @@ namespace BLL join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId where x.IdentityCard == identityCard && y.JTProjectCode == proCode - && v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0 - && ((x.IdcardType == null || x.IdcardType == "SHENFEN_ZHENGJIAN") - && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18)) + && v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0 + && (x.IdentityCard.Length == 15 || x.IdentityCard.Length == 18) select new { name = x.PersonName, - idcardType = x.IdcardType ?? "SHENFEN_ZHENGJIAN", + idcardType ="SHENFEN_ZHENGJIAN", idcardNumber = x.IdentityCard, idcardStartDate = x.IdcardStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardStartDate) : null, idcardEndDate = x.IdcardEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", x.IdcardEndDate) : null, diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonListEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonListEdit.aspx.cs index 5d31ac17..c65f93c6 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonListEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonListEdit.aspx.cs @@ -306,11 +306,20 @@ namespace FineUIPro.Web.HSSE.SitePerson ShowNotify("请选择证件类型!", MessageBoxIcon.Warning); return; } - if (string.IsNullOrEmpty(this.txtIdentityCard.Text)) + string IdCard = this.txtIdentityCard.Text; + if (string.IsNullOrEmpty(IdCard)) { ShowNotify("证件号码不能为空!", MessageBoxIcon.Warning); return; } + else + { + if (this.drpIdcardType.SelectedValue == "SHENFEN_ZHENGJIAN" && (IdCard.Length != 18 && IdCard.Length != 15)) + { + ShowNotify("身份证号码位数不对!", MessageBoxIcon.Warning); + return; + } + } //if (string.IsNullOrEmpty(this.txtIdcardStartDate.Text)) //{ // ShowNotify("证件开始日期不能为空!", MessageBoxIcon.Warning);