This commit is contained in:
2026-08-19 10:05:39 +08:00
parent 10e9cef280
commit 3d7c01003d
+16 -9
View File
@@ -196,7 +196,7 @@ namespace BLL
db.SubmitChanges();
}
}
public static void UpdatePassword(string userId )
public static void UpdatePassword(string userId)
{
Model.CNPCDB db = Funs.DB;
Model.Sys_User m = db.Sys_User.FirstOrDefault(e => e.UserId == userId);
@@ -293,7 +293,8 @@ namespace BLL
db.SubmitChanges();
}
}
catch (Exception e) {
catch (Exception e)
{
}
}
@@ -409,7 +410,7 @@ namespace BLL
foreach (var item in getPUser)
{
List<string> roleIdList = Funs.GetStrListByStr(item.RoleId, ',');
var getRoles = db.Sys_Role.FirstOrDefault(x =>roleIdList.Contains(x.RoleId));
var getRoles = db.Sys_Role.FirstOrDefault(x => roleIdList.Contains(x.RoleId));
if (getRoles != null)
{
string userName = RoleService.getRoleNamesRoleIds(item.RoleId) + "-" + UserService.GetUserNameByUserId(item.UserId);
@@ -602,7 +603,7 @@ namespace BLL
/// 根据项目号和角色Id获取用户下拉选项
/// </summary>
/// <returns></returns>
public static List<Model.Sys_User> GetUserListByProjectIdUnitIdRoleId(string projectId,string unitId, string roleIds)
public static List<Model.Sys_User> GetUserListByProjectIdUnitIdRoleId(string projectId, string unitId, string roleIds)
{
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
{
@@ -632,7 +633,7 @@ namespace BLL
else
{
list = (from x in db.Sys_User
where x.UnitId == unitId && x.UserId != BLL.Const.hfnbdId
where x.UnitId == unitId && x.UserId != BLL.Const.hfnbdId
orderby x.UserName
select x).ToList();
@@ -731,7 +732,7 @@ namespace BLL
{
dropName.DataValueField = "UserId";
dropName.DataTextField = "UserName";
dropName.DataSource = BLL.UserService.GetUserListByProjectIdUnitIdRoleId(projectId,unitId, roleIds);
dropName.DataSource = BLL.UserService.GetUserListByProjectIdUnitIdRoleId(projectId, unitId, roleIds);
dropName.DataBind();
if (isShowPlease)
{
@@ -1596,7 +1597,12 @@ namespace BLL
}
}
/// <summary>
/// 重置登录密码
/// </summary>
/// <param name="unitId"></param>
/// <param name="idCard"></param>
/// <returns></returns>
public static string getInitialPassword(string unitId, string idCard)
{
string prefixValue = Const.PasswordPrefixValue;
@@ -1620,14 +1626,15 @@ namespace BLL
{
if (idCard.Length > 4)
{
suffixValue = idCard.Substring(idCard.Length-4, 4);
suffixValue = idCard.Substring(idCard.Length - 4, 4);
}
else
{
suffixValue = idCard;
}
}
return prefixValue + "." + suffixValue;
return prefixValue + suffixValue;
//return prefixValue + "." + suffixValue;
}
/// <summary>