diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index 26b5dbd..397f7d0 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -280,7 +280,8 @@ { if (userId == Const.sysglyId || userId == Const.hfnbdId || userId == Const.sedinId) { - return (from x in Funs.DB.Base_Project + return (from x in Funs.DB.Base_Project + where x.ProjectState == "1" orderby x.ProjectCode descending select x).ToList(); } @@ -292,6 +293,7 @@ if (getRoleP != null) { return (from x in Funs.DB.Base_Project + where x.ProjectState == "1" orderby x.ProjectCode descending select x).ToList(); } @@ -299,7 +301,7 @@ { return (from x in Funs.DB.Base_Project join y in Funs.DB.Project_ProjectUser on x.ProjectId equals y.ProjectId - where y.UserId == userId + where y.UserId == userId && x.ProjectState == "1" orderby x.ProjectCode descending select x).Distinct().ToList(); } @@ -313,7 +315,7 @@ { if (userId == Const.sysglyId || userId == Const.hfnbdId || userId == Const.sedinId) { - return (from x in Funs.DB.Base_Project + return (from x in Funs.DB.Base_Project where x.ProjectState == "1" orderby x.ProjectCode descending select x).ToList(); } @@ -325,7 +327,7 @@ if (getRoleP != null) { return (from x in Funs.DB.Base_Project - where x.ProjectState2 != "7" || (needProjectId != "" && needProjectId == x.ProjectId) + where x.ProjectState == "1" && x.ProjectState2 != "7" || (needProjectId != "" && needProjectId == x.ProjectId) orderby x.ProjectCode descending select x).ToList(); } @@ -333,7 +335,7 @@ { return (from x in Funs.DB.Base_Project join y in Funs.DB.Project_ProjectUser on x.ProjectId equals y.ProjectId - where y.UserId == userId && (x.ProjectState2 != "7" || (needProjectId != "" && needProjectId == x.ProjectId)) + where y.UserId == userId && (x.ProjectState2 != "7" || (needProjectId != "" && needProjectId == x.ProjectId)) && x.ProjectState == "1" orderby x.ProjectCode descending select x).Distinct().ToList(); }