20230627优化选择用户接口 角色不空 账号不空,优化生成卡号方法。
This commit is contained in:
@@ -18,7 +18,7 @@ namespace BLL
|
||||
{
|
||||
var getUser = db.Person_Persons.FirstOrDefault(x =>( x.Account == userInfo.Account || x.Telephone == userInfo.Telephone || x.PersonName == userInfo.Account)
|
||||
&& x.Password == Funs.EncryptionPassword(userInfo.Password) && (!x.IsPost.HasValue || x.IsPost == true)
|
||||
&& (x.Account != null || x.PersonId == Const.hfnbdId || x.PersonId == Const.sysglyId));
|
||||
&& (x.Account.Length > 1 || x.PersonId == Const.hfnbdId || x.PersonId == Const.sysglyId));
|
||||
if (getUser != null)
|
||||
{
|
||||
Model.UserItem newItem = new Model.UserItem();
|
||||
@@ -107,7 +107,8 @@ namespace BLL
|
||||
{
|
||||
var getUser = (from x in db.Person_Persons
|
||||
join y in db.Sys_Role on x.RoleIds equals y.RoleId
|
||||
where x.UnitId == unitId && x.IsPost == true && (strParam == null || x.PersonName.Contains(strParam)) && x.RoleIds != null
|
||||
where x.UnitId == unitId && x.IsPost == true && (strParam == null || x.PersonName.Contains(strParam))
|
||||
&& x.RoleIds .Length > 1 && x.Account.Length > 1
|
||||
orderby x.PersonName
|
||||
select new Model.BaseInfoItem { BaseInfoId = x.PersonId, BaseInfoName = x.PersonName, BaseInfoCode = x.Telephone }).ToList();
|
||||
|
||||
@@ -132,7 +133,7 @@ namespace BLL
|
||||
{
|
||||
var getDatas = from x in db.Person_Persons
|
||||
join y in db.SitePerson_Person on x.PersonId equals y.PersonId
|
||||
where y.ProjectId == projectId && y.States == Const.State_1 && y.RoleIds != null
|
||||
where y.ProjectId == projectId && y.States == Const.State_1 && y.RoleIds.Length>1 && x.Account.Length > 1
|
||||
select new Model.UserItem
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
@@ -173,8 +174,8 @@ namespace BLL
|
||||
else
|
||||
{
|
||||
var getPersons =from x in db.Person_Persons
|
||||
where x.IsPost == true && x.RoleIds != null
|
||||
select new Model.UserItem
|
||||
where x.IsPost == true && x.RoleIds.Length>1 && x.Account.Length > 1
|
||||
select new Model.UserItem
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
Account = x.Account,
|
||||
@@ -235,7 +236,7 @@ namespace BLL
|
||||
join y in db.SitePerson_Person on x.PersonId equals y.PersonId
|
||||
join z in db.Project_ProjectUnit on x.UnitId equals z.UnitId
|
||||
where y.ProjectId == projectId && z.ProjectId == projectId && z.UnitType == unitType && y.States == Const.State_1
|
||||
&& (strParam == null || x.PersonName.Contains(strParam)) && y.RoleIds != null
|
||||
&& (strParam == null || x.PersonName.Contains(strParam)) && y.RoleIds.Length>1 && x.Account.Length > 1
|
||||
select new Model.UserItem
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
@@ -267,7 +268,7 @@ namespace BLL
|
||||
join y in db.SitePerson_Person on x.PersonId equals y.PersonId
|
||||
join z in db.Project_ProjectUnit on x.UnitId equals z.UnitId
|
||||
where y.ProjectId == projectId && z.ProjectId == projectId && z.UnitType == unitType && y.States == Const.State_1
|
||||
&& (strParam == null || x.PersonName.Contains(strParam)) && y.RoleIds.Contains(item) && y.RoleIds != null
|
||||
&& (strParam == null || x.PersonName.Contains(strParam)) && y.RoleIds.Contains(item) && y.RoleIds.Length>1 && x.Account.Length > 1
|
||||
select new Model.UserItem
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
@@ -313,7 +314,7 @@ namespace BLL
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var user = from x in db.Person_Persons
|
||||
where x.IsPost == true && x.RoleIds != null
|
||||
where x.IsPost == true && x.RoleIds.Length > 1 && x.Account.Length > 1
|
||||
select x;
|
||||
return ObjectMapperManager.DefaultInstance.GetMapper<List<Model.Person_Persons>, List<Model.UserItem>>().Map(user.ToList());
|
||||
}
|
||||
@@ -444,7 +445,7 @@ namespace BLL
|
||||
{
|
||||
var getDatas = (from x in db.Person_Persons
|
||||
join y in db.SitePerson_Person on x.PersonId equals y.PersonId
|
||||
where y.ProjectId == projectId && y.States == Const.State_1 && y.RoleIds != null
|
||||
where y.ProjectId == projectId && y.States == Const.State_1 && y.RoleIds.Length>1 && x.Account.Length > 1
|
||||
select new Model.UserItem
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
|
||||
Reference in New Issue
Block a user