20230606新增费用申请页面、项目列表按活跃度排序

This commit is contained in:
2023-06-06 17:01:34 +08:00
parent 5984687629
commit e4871bc690
105 changed files with 63242 additions and 2216 deletions
+12 -9
View File
@@ -466,21 +466,24 @@ namespace BLL
IQueryable<Model.SpSysUserItem> users = null;
if (!string.IsNullOrEmpty(projectId))
{
var getSitepersons = from x in db.SitePerson_Person
join p in db.Person_Persons on x.PersonId equals p.PersonId
where x.ProjectId == projectId && x.States == Const.State_1 && x.RoleIds != null && p.Account != null
select x;
List<Model.SpSysUserItem> returUsers = new List<Model.SpSysUserItem>();
List<Model.SitePerson_Person> getPUser = new List<Model.SitePerson_Person>();
if (!string.IsNullOrEmpty(unitId))
{
getPUser = (from x in db.SitePerson_Person
/// 为啥 有单位id 还判断单位类型
/// (u.UnitId == unitId || u.UnitType == BLL.Const.ProjectUnitType_1 || u.UnitType == BLL.Const.ProjectUnitType_3 || u.UnitType == BLL.Const.ProjectUnitType_4)
getPUser = (from x in getSitepersons
join u in db.Project_ProjectUnit on new { x.ProjectId, x.UnitId } equals new { u.ProjectId, u.UnitId }
where x.ProjectId == projectId && (u.UnitId == unitId || u.UnitType == BLL.Const.ProjectUnitType_1 || u.UnitType == BLL.Const.ProjectUnitType_3 || u.UnitType == BLL.Const.ProjectUnitType_4)
&& x.States == Const.State_1
where x.UnitId == unitId
select x).ToList();
}
else
{
getPUser = (from x in db.SitePerson_Person
where x.ProjectId == projectId && x.States == Const.State_1
select x).ToList();
getPUser = getSitepersons.ToList();
}
if (getPUser.Count() > 0)
@@ -504,12 +507,12 @@ namespace BLL
return returUsers;
}
else
{
{
if (!string.IsNullOrEmpty(unitId))
{
users = (from x in db.Person_Persons
join z in db.Sys_Role on x.RoleIds equals z.RoleId
where (x.IsPost == true || !x.IsPost.HasValue) && x.UnitId == unitId
where (x.IsPost == true || !x.IsPost.HasValue) && x.UnitId == unitId && x.Account != null && x.RoleIds != null
orderby x.JobNum
select new Model.SpSysUserItem
{
@@ -521,7 +524,7 @@ namespace BLL
{
users = (from x in db.Person_Persons
join z in db.Sys_Role on x.RoleIds equals z.RoleId
where (x.IsPost == true || !x.IsPost.HasValue)
where (x.IsPost == true || !x.IsPost.HasValue) && x.Account != null && x.RoleIds != null
orderby x.JobNum
select new Model.SpSysUserItem
{