diff --git a/SGGL/BLL/API/HSSE/APIResourcesService.cs b/SGGL/BLL/API/HSSE/APIResourcesService.cs index 86297658..18994841 100644 --- a/SGGL/BLL/API/HSSE/APIResourcesService.cs +++ b/SGGL/BLL/API/HSSE/APIResourcesService.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using NPOI.POIFS.Properties; +using System.Collections.Generic; using System.Linq; namespace BLL @@ -218,7 +219,24 @@ namespace BLL SupResourcesId = x.SupTrainingId, IsEndLever = x.IsEndLever, }; - return getDataLists.ToList(); + + + var getAllDataLists = from x in db.Training_TestTraining + select new Model.ResourcesItem + { + ResourcesId = x.TrainingId, + ResourcesCode = x.TrainingCode, + ResourcesName = x.TrainingName, + SupResourcesId = x.SupTrainingId, + IsEndLever = x.IsEndLever, + }; + var res = getDataLists.ToList(); + foreach (var x in res) + { + x.child = getAllDataLists.Where(xx => xx.SupResourcesId == x.ResourcesId).ToList(); + } + return res; + } } diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index c54c407f..40d0dd13 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -212,6 +212,7 @@ { var list = (from x in Funs.DB.Base_Project where x.ProjectState == null || x.ProjectState == BLL.Const.ProjectState_1 + where x.ProjectState != "3" orderby x.ProjectCode descending select x).ToList(); return list; @@ -254,7 +255,7 @@ } else { - var list = (from x in Funs.DB.Base_Project + var list = (from x in Funs.DB.Base_Project where x.ProjectState == state orderby x.ProjectCode descending select x).ToList(); @@ -269,7 +270,8 @@ public static List GetAllProjectDropDownList() { var list = (from x in Funs.DB.Base_Project - orderby x.ProjectCode descending + where x.ProjectState != "3" + orderby x.ProjectCode descending select x).ToList(); return list; } @@ -283,6 +285,7 @@ { var list = (from x in Funs.DB.Base_Project where x.ProjectType == projectType + where x.ProjectState != "3" orderby x.ProjectCode descending select x).ToList(); return list; @@ -296,7 +299,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 != "3" orderby x.ProjectCode descending select x).ToList(); } @@ -308,6 +312,7 @@ if (getRoleP != null) { return (from x in Funs.DB.Base_Project + where x.ProjectState != "3" orderby x.ProjectCode descending select x).ToList(); } @@ -316,6 +321,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 x.ProjectState != "3" orderby x.ProjectCode descending select x).Distinct().ToList(); } diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index dba584b3..59b589e3 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -12,7 +12,7 @@ - + diff --git a/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReport.aspx.cs index 5a790dc4..6b5ba55f 100644 --- a/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReport.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/ManagementReport/HSSEMonthReport.aspx.cs @@ -35,6 +35,7 @@ namespace FineUIPro.Web.ZHGL.ManagementReport var project = (from x in Funs.DB.HSSE_MonthReport join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId + where y.ProjectState !="3" select new { x.ProjectId, y.ProjectName }).Distinct(); if (project.Count() > 0) { diff --git a/SGGL/Model/APIItem/HSSE/ResourcesItem.cs b/SGGL/Model/APIItem/HSSE/ResourcesItem.cs index e06d1582..f9ed9b89 100644 --- a/SGGL/Model/APIItem/HSSE/ResourcesItem.cs +++ b/SGGL/Model/APIItem/HSSE/ResourcesItem.cs @@ -52,5 +52,7 @@ namespace Model get; set; } + + public List child { get; set; } } }