From b0f60f4a582d70135d306041c5c5c71152f4328f Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 30 Oct 2023 16:30:10 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=A9=E6=95=88?= =?UTF-8?q?=E8=80=83=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CQMS/Performance/Performance.aspx.cs | 19 ++++++++++++++++--- .../CQMS/Performance/PerformanceEdit.aspx.cs | 8 ++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/SGGL/FineUIPro.Web/CQMS/Performance/Performance.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Performance/Performance.aspx.cs index d3f25dcc..f154a7de 100644 --- a/SGGL/FineUIPro.Web/CQMS/Performance/Performance.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Performance/Performance.aspx.cs @@ -122,14 +122,18 @@ namespace FineUIPro.Web.CQMS.Performance using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { var NowDate = Convert.ToDateTime(drpCompileDateMonth.Text.Trim()); + var Year = NowDate.Year; var Month = 1; if (NowDate.Month != 12) { Month = NowDate.Month + 1; } + else { + Year += 1; + } //获取配置 - var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == NowDate.Year.ToString() && x.SortIndex == Month); + var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month); if (modelConfig != null) { int child3Index = 1; @@ -1063,13 +1067,17 @@ namespace FineUIPro.Web.CQMS.Performance //循环list给每周任务、工程量、资源需求计划、本周工作任务完成情况 ,每日工作计划、完成情况赋值 //获取周数 var NowDate = Convert.ToDateTime(drpCompileDateMonth.Text.Trim()); + var Year = NowDate.Year; var Month = 1; if (NowDate.Month != 12) { Month = NowDate.Month + 1; } + else { + Year += 1; + } - var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == NowDate.Year.ToString() && x.SortIndex == Month); + var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month); for (int i = 0; i < listChild1.Count; i++) { @@ -1238,14 +1246,19 @@ namespace FineUIPro.Web.CQMS.Performance return; } var dates = Convert.ToDateTime(drpCompileDateMonth.Text.Trim()); + var Year = dates.Year; var Month = 1; if (dates.Month != 12) { Month = dates.Month + 1; } + else + { + Year += 1; + } //按照日期查询是否有设置 - var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == dates.Year.ToString() && x.SortIndex == Month); + var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month); if (modelConfig == null) { ShowNotify("当前日期未设置规则,请前往施工绩效设置页面进行操作。", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Performance/PerformanceEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Performance/PerformanceEdit.aspx.cs index 4fdc1f81..d21682c9 100644 --- a/SGGL/FineUIPro.Web/CQMS/Performance/PerformanceEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Performance/PerformanceEdit.aspx.cs @@ -468,14 +468,18 @@ namespace FineUIPro.Web.CQMS.Performance #endregion var datesConfig = Convert.ToDateTime(drpCompileDateMonth.Text.Trim()); var Month = 1; + var nowYear = datesConfig.Year; if (datesConfig.Month != 12) { - Month = datesConfig.Month+ 1; + Month = datesConfig.Month + 1; + } + else { + nowYear += 1; } var Child2SortIndex = 1; //按照日期查询是否有设置 - var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == datesConfig.Year.ToString() && x.SortIndex == Month); + var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == nowYear.ToString() && x.SortIndex == Month); if (modelConfig!=null) { //根据设置的周数插入表格CQMS_Performance_Child2 From 55f9a30a24a7cb512fdeb14e398cc15b5def82aa Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Tue, 31 Oct 2023 14:33:55 +0800 Subject: [PATCH 2/4] =?UTF-8?q?20231031=20WBS=E5=A4=8D=E5=88=B6=E7=B2=98?= =?UTF-8?q?=E8=B4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/BLL.csproj | 2 +- SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs | 5 + SGGL/BLL/CQMS/WBS/DivisionProjectService.cs | 21 + SGGL/BLL/HSSE/SitePerson/PersonService.cs | 9 +- .../CQMS/WBS/ProjectControlPoint.aspx | 7 +- .../CQMS/WBS/ProjectControlPoint.aspx.cs | 400 ++++++++++++++++-- .../WBS/ProjectControlPoint.aspx.designer.cs | 9 + SGGL/FineUIPro.Web/ErrLog.txt | 78 ++++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 31 +- .../HSSE/Manager/MonthReportCEdit2.aspx.cs | 6 +- .../HSSE/Manager/MonthReportCView2.aspx.cs | 6 +- 11 files changed, 487 insertions(+), 87 deletions(-) diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 81372eff..67de0dcf 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -1015,7 +1015,7 @@ 2.1.1 - 12.0.3 + 13.0.3 2.5.5 diff --git a/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs b/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs index 881910b2..3f902edf 100644 --- a/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs +++ b/SGGL/BLL/CQMS/WBS/BreakdownProjectService.cs @@ -421,5 +421,10 @@ namespace BLL return false; } } + + public static Model.WBS_BreakdownProject GetBreakdownProjectByName(string divisionProjectId, string breakdownName) + { + return Funs.DB.WBS_BreakdownProject.FirstOrDefault(x => x.DivisionProjectId == divisionProjectId && x.BreakdownName == breakdownName); + } } } diff --git a/SGGL/BLL/CQMS/WBS/DivisionProjectService.cs b/SGGL/BLL/CQMS/WBS/DivisionProjectService.cs index bcbb8004..d41674a0 100644 --- a/SGGL/BLL/CQMS/WBS/DivisionProjectService.cs +++ b/SGGL/BLL/CQMS/WBS/DivisionProjectService.cs @@ -189,5 +189,26 @@ namespace BLL return false; } } + + /// + /// 根据分部id获取下级项 + /// + /// + /// + public static List GetDivisionProjectBySupId(string divisionProjectId) + { + return (from x in Funs.DB.WBS_DivisionProject where x.SuperDivisionId == divisionProjectId select x).ToList(); + } + + /// + /// 根据分部名称获取信息 + /// + /// + /// + public static Model.WBS_DivisionProject GetDivisionProjectByName(string CNProfessionalId, string unitWorkId,string superDivisionId, string divisionName) + { + var q = Funs.DB.WBS_DivisionProject.FirstOrDefault(x => x.CNProfessionalId == CNProfessionalId && x.UnitWorkId == unitWorkId && x.SuperDivisionId==superDivisionId && x.DivisionName == divisionName); + return q; + } } } diff --git a/SGGL/BLL/HSSE/SitePerson/PersonService.cs b/SGGL/BLL/HSSE/SitePerson/PersonService.cs index 4dbd683d..ef763e16 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonService.cs @@ -384,9 +384,9 @@ namespace BLL /// /// 单位Id /// 人员的数量 - public static int GetPersonCountByUnitId(string unitId, string projectId, bool isOutside) + public static int GetPersonCountByUnitId(string unitId, string projectId, DateTime inTime, bool isOutside) { - var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.IsUsed == true && x.IsOutside == isOutside select x).ToList(); + var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && x.InTime <= inTime && x.IsUsed == true && x.IsOutside == isOutside select x).ToList(); return q.Count(); } @@ -395,11 +395,12 @@ namespace BLL /// /// 单位Id /// HSE人员的数量 - public static int GetHSEPersonCountByUnitId(string unitId, string projectId) + public static int GetHSEPersonCountByUnitId(string unitId, string projectId, DateTime inTime) { var q = (from x in Funs.DB.SitePerson_Person join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId - where x.UnitId == unitId && x.ProjectId == projectId && y.IsHsse==true && x.IsUsed == true select x).ToList(); + where x.UnitId == unitId && x.ProjectId == projectId && x.InTime <= inTime && y.IsHsse == true && x.IsUsed == true + select x).ToList(); //var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && (x.WorkPostId == BLL.Const.WorkPost_HSSEEngineer || x.WorkPostId == BLL.Const.WorkPost_SafetyManager) && x.IsUsed == true select x).ToList(); return q.Count(); } diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx index 74109dcf..04b7fa9f 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx @@ -151,8 +151,11 @@ - + + +