diff --git a/24Hour/Controllers/LoginController.cs b/24Hour/Controllers/LoginController.cs index c8b6bb3..6368aec 100644 --- a/24Hour/Controllers/LoginController.cs +++ b/24Hour/Controllers/LoginController.cs @@ -640,12 +640,14 @@ namespace _24Hour.Controllers var datea = await _db.Queryable().Where(q => q.IsDeleted == 0 && q.cardId == cardId).FirstAsync(); if (datea == null) { + var unitcode = _configuration.GetSection("CaseTwenty:UnitCode").Value; var UserModel = new App_Sys_UserModel(); _db.BeginTran(); UserModel.Id = Guid.NewGuid().ToString(); UserModel.cardId = cardId; UserModel.name = name; UserModel.usertype = 1; + UserModel.unitCode = unitcode; string cardIdpwa = UserModel.cardId.Substring(UserModel.cardId.Length - 6); //默认密码身份证后六位 UserModel.Password = Elight.Utility.Encrypt.Md5.Encrypt32($"{cardIdpwa}").ToLower();