1
This commit is contained in:
@@ -214,10 +214,10 @@ namespace BLL
|
||||
ProjectId = r.ProjectId,
|
||||
CheckUnitName = u.UnitName,
|
||||
States = r.States,
|
||||
ProblemStatesName = i.CompleteStatus==1 ? "已整改":"未整改",
|
||||
ProblemStatesName = i.CompleteStatus == 1 ? "已整改" : "未整改",
|
||||
ProblemStates = i.CompleteStatus,
|
||||
InsResponsibleUserId = r.InsResponsibleUserId,
|
||||
InsResponsibleUserName= user.PersonName
|
||||
InsResponsibleUserName = user.PersonName
|
||||
};
|
||||
|
||||
// 应用检查大类过滤
|
||||
@@ -281,17 +281,24 @@ namespace BLL
|
||||
var thisUnit = BLL.CommonService.GetIsThisUnit();
|
||||
if (thisUnit.UnitId != input.UnitId)
|
||||
{
|
||||
// 先获取用户有权限的项目ID列表
|
||||
var projectIds = (from p in Funs.DB.Base_Project
|
||||
where p.UnitId == input.UnitId
|
||||
select p.ProjectId).ToList();
|
||||
//// 先获取用户有权限的项目ID列表
|
||||
//var projectIds = (from p in Funs.DB.Base_Project
|
||||
// where p.UnitId == input.UnitId
|
||||
// select p.ProjectId).ToList();
|
||||
|
||||
//// 过滤查询结果
|
||||
//query = query.Where(x => Funs.DB.Supervise_UnitHazardRegister
|
||||
// .Any(r => Funs.DB.Supervise_UnitHazardRegisterItem
|
||||
// .Any(i => i.UnitHazardRegisterItemId == x.UnitHazardRegisterItemId &&
|
||||
// i.UnitHazardRegisterId == r.UnitHazardRegisterId &&
|
||||
// projectIds.Contains(r.ProjectId))));
|
||||
|
||||
// 过滤查询结果
|
||||
query = query.Where(x => Funs.DB.Supervise_UnitHazardRegister
|
||||
.Any(r => Funs.DB.Supervise_UnitHazardRegisterItem
|
||||
.Any(i => i.UnitHazardRegisterItemId == x.UnitHazardRegisterItemId &&
|
||||
i.UnitHazardRegisterId == r.UnitHazardRegisterId &&
|
||||
projectIds.Contains(r.ProjectId))));
|
||||
input.UnitId == r.CheckUnitId)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user