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;