From 2227fee2e0e8c53423442661dfee9484a67e97e1 Mon Sep 17 00:00:00 2001
From: hwh2023 <598694955@qq.com>
Date: Mon, 25 Mar 2024 16:31:35 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=B4=A6=E6=88=B7=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Learun.Application.Organization/User/UserEntity.cs | 5 +++++
.../Learun.Application.Organization/User/UserService.cs | 4 ++--
.../EducationalAdministration/EmpInfo/EmpInfoService.cs | 1 +
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs
index db38418f1..6a5fac76c 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserEntity.cs
@@ -240,6 +240,11 @@ namespace Learun.Application.Organization
///
[Column("F_MODIFYPWDDATE")]
public DateTime? F_ModifyPwdDate { get; set; }
+ ///
+ /// 账户
+ ///
+ [Column("N_ACCOUNT")]
+ public string N_Account { get; set; }
#endregion
#region 扩展操作
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs
index 7e1da8b36..84319a5aa 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs
@@ -39,7 +39,7 @@ namespace Learun.Application.Organization
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM LR_Base_User t ");
- strSql.Append(" WHERE t.F_Account = @account AND t.F_DeleteMark = 0 ");
+ strSql.Append(" WHERE (t.F_Account = @account or t.N_Account=@account) AND t.F_DeleteMark = 0 ");
return this.BaseRepository().FindEntity(strSql.ToString(), new { account = account });
}
catch (Exception ex)
@@ -206,7 +206,7 @@ namespace Learun.Application.Organization
if (!string.IsNullOrEmpty(keyword))
{
keyword = "%" + keyword + "%";
- strSql.Append(" AND( t.F_Account like @keyword or t.F_RealName like @keyword or t.F_Mobile like @keyword ) ");
+ strSql.Append(" AND( t.F_Account like @keyword or t.F_RealName like @keyword or t.N_Account like @keyword or t.F_Mobile like @keyword ) ");
}
return this.BaseRepository().FindList(strSql.ToString(), new { companyId, departmentId, keyword }, pagination);
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
index 0c6bf6530..1ddb442ec 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
@@ -449,6 +449,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
}
UserEntity userbase = new UserEntity();
userbase.F_Account = tEntity.EmpNo;
+ userbase.N_Account = tEntity.EmpNo;
userbase.F_RealName = tEntity.EmpName;
userbase.F_EnCode = tEntity.EmpNo;
userbase.F_Password = Md5Helper.Encrypt(defaultpwd, 32).ToLower();