From 147ec6bf25160d2e08dcb9fe33fd573254749af3 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Mon, 3 Apr 2023 13:38:10 +0800 Subject: [PATCH] =?UTF-8?q?20230403=E9=BB=98=E8=AE=A4=E5=AF=86=E7=A0=81=20?= =?UTF-8?q?=E6=9C=89=E8=B4=A6=E5=8F=B7=E7=9A=84123=20=E6=B2=A1=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E7=9A=84=E8=BA=AB=E4=BB=BD=E8=AF=81=E5=90=8E=E5=9B=9B?= =?UTF-8?q?=E4=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/Person/Person_PersonsService.cs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs index 9b42a026..7b437e32 100644 --- a/SGGL/BLL/Person/Person_PersonsService.cs +++ b/SGGL/BLL/Person/Person_PersonsService.cs @@ -666,7 +666,7 @@ namespace BLL JobNum = person.JobNum, PersonName = person.PersonName, Account = person.Account, - Password = GetPersonPassWord(person.IdentityCard), + Password = GetPersonPassWord(person.IdentityCard, person.Account), IsOffice = person.IsOffice, RoleIds = person.RoleIds, IdentityCard = person.IdentityCard, @@ -1102,19 +1102,22 @@ namespace BLL /// /// /// - public static string GetPersonPassWord(string idCard) + public static string GetPersonPassWord(string idCard,string Account) { string passWord = Funs.EncryptionPassword(Const.Password); - ////现场人员密码 - if (!string.IsNullOrEmpty(idCard)) + if (string.IsNullOrEmpty(Account)) { - if (idCard.Length > 3) + ////现场人员密码 + if (!string.IsNullOrEmpty(idCard)) { - passWord = Funs.EncryptionPassword(idCard.Substring(idCard.Length - 4)); - } - else - { - passWord = Funs.EncryptionPassword(idCard); + if (idCard.Length > 3) + { + passWord = Funs.EncryptionPassword(idCard.Substring(idCard.Length - 4)); + } + else + { + passWord = Funs.EncryptionPassword(idCard); + } } } return passWord;