From b3e1db76117858b67ad47fb3293cfec600e2d769 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Thu, 7 Sep 2023 08:51:08 +0800 Subject: [PATCH] 20230906 --- SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx | 12 +- .../DigData/ProjectDataDW.aspx.cs | 125 +++++++++--------- .../DigData/ProjectDataDW.aspx.designer.cs | 24 ++-- SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx | 2 +- .../DigData/ProjectWBSDW.aspx.cs | 4 + .../DigData/ProjectWBSDW.aspx.designer.cs | 4 +- SGGL/FineUIPro.Web/ErrLog.txt | 42 ------ 7 files changed, 90 insertions(+), 123 deletions(-) diff --git a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx index aac4ef7d..1e23034d 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx +++ b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx @@ -38,21 +38,21 @@ - + - + - + - + - + - + diff --git a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs index 3972dcb0..137ce1f2 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs @@ -1,6 +1,7 @@ using BLL; using System; using System.Data; +using System.Data.SqlTypes; using System.Linq; namespace FineUIPro.Web.DigData @@ -63,33 +64,61 @@ namespace FineUIPro.Web.DigData if (item == "HSSE") { this.gpHSSE.Hidden = false; - this.lbExpertArgument.Text = (from x in Funs.DB.Solution_LargerHazardListItem - join y in Funs.DB.Solution_LargerHazardList on x.LargerHazardListId equals y.LargerHazardListId - where y.ProjectId == this.ProjectId - && y.States == Const.State_1 - - select x).Count().ToString(); - this.lbAccident.Text = (from x in Funs.DB.Accident_AccidentPersonRecord - where x.ProjectId == this.ProjectId - && x.States == Const.State_2 - - select x).Count().ToString(); + this.lbSitePersons.Text = (from x in Funs.DB.SitePerson_Person + where x.ProjectId == this.ProjectId //&& y.States == Const.State_1 + select x).Count().ToString(); + var getPersonInOutNumber = (from x in Funs.DB.SitePerson_PersonInOutNumber + where x.ProjectId == this.ProjectId + select x).OrderByDescending(x => x.InOutDate).FirstOrDefault(); + if (getPersonInOutNumber != null) + { + this.lbWorkHours.Text = (getPersonInOutNumber.WorkHours ?? 0).ToString(); + } + else + { + this.lbWorkHours.Text = "0"; + } + this.lbEduCount.Text = (from x in Funs.DB.EduTrain_TrainRecord + where x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2 + select x).Count().ToString(); + + var getAllHazardRegister = from x in Funs.DB.HSSE_Hazard_HazardRegister + where x.ProjectId == this.ProjectId && x.States != null && x.States != "4" && x.States != "0" + select x; + int allHazardCount = getAllHazardRegister.Count(); + int cHazardCount = getAllHazardRegister.Where(x => x.States == "3").Count(); + this.lbRectifyRate.Text = allHazardCount > 0 ? Math.Round(cHazardCount * 100.0 / (allHazardCount * 1.0)).ToString() + "%" : "0%"; + + this.lbMeetingCount.Text = (Funs.DB.Meeting_AttendMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count() + + Funs.DB.Meeting_ClassMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count() + + Funs.DB.Meeting_MonthMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count() + + Funs.DB.Meeting_SpecialMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count() + + Funs.DB.Meeting_WeekMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count()).ToString(); + + var getCostManges = Funs.DB.CostGoods_CostManage.Where(x => x.ProjectId == this.ProjectId && x.States == Const.State_2); + if (getCostManges.Count() > 0) + { + this.lbHSECost.Text = getCostManges.Sum(x => x.SumMoney ?? 0).ToString(); + } + else + { + this.lbHSECost.Text = "0"; + } } if (item == "CQMS") { this.gpCQMS.Hidden = false; //// 实体验收 资料验收 var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail - join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode - where y.ProjectId == this.ProjectId - && y.State == "8" - select x; + join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode + where y.ProjectId == this.ProjectId && y.State == "8" + select x; int all = getSpotCheckDetail.Count(); - // this.lbSpotCheck1.Text = all.ToString(); - int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格 - // this.lbSpotCheck2.Text= okCount.ToString(); + // this.lbSpotCheck1.Text = all.ToString(); + int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格 + // this.lbSpotCheck2.Text= okCount.ToString(); - this.lbSpotCheckRate.Text= all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString()+"%" : "0%"; + this.lbSpotCheckRate.Text = all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%"; /// 资料验收合格项目 var getOKSpotCheckDetail = getSpotCheckDetail.Where(x => x.IsOK == true); @@ -127,49 +156,25 @@ namespace FineUIPro.Web.DigData { this.gpJDGL.Hidden = false; - //double totalSJCost = 0; ////累计实际费用 - //decimal totalPlanCost = 0; ////计划费用 - //var getWorkPackageDetail = Funs.DB.WBS_WorkPackageDetail.FirstOrDefault(x => x.WorkPackageId == workPackageId); - //if (getWorkPackageDetail != null) - //{ - // ///末级节点 - // var getMaxSJCost = Funs.DB.View_WBS_WorkPackageDetail.Where(x => x.WorkPackageId == workPackageId).OrderByDescending(x => x.Months).FirstOrDefault(); - // if (getMaxSJCost != null) - // { - // totalSJCost = getMaxSJCost.TotalThisValue ?? 0; - // totalPlanCost = getMaxSJCost.PlanCost ?? 0; - // } - //} - //else - //{ - // ///非末级节点 - // var getMaxSJCost = Funs.DB.View_WBS_WorkPackageParentDetail.Where(x =>x.ProjectId == this.ProjectId - // && x.ParentId == workPackageId).OrderByDescending(x => x.Months).FirstOrDefault(); - // if (getMaxSJCost != null) - // { - // totalSJCost = getMaxSJCost.TotalThisValue ?? 0; - // totalPlanCost = getMaxSJCost.PlanCost ?? 0; - // } - //} - ////// 根 节点 建筑工程 安装工程 - //if (workPackageId == "1" || workPackageId == "2") - //{ - // var getUnitWorkByType = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.ProjectId && x.ProjectType == workPackageId select x; - // if (getUnitWorkByType.Count() > 0) - // { - // totalPlanCost = getUnitWorkByType.Sum(x => x.PlanCost ?? 0); - // } - //} + double totalSJCost = 0; ////累计实际费用 + decimal totalPlanCost = 0; ////计划费用 + var getViewWorkPackageParentDetail = from x in Funs.DB.View_WBS_WorkPackageParentDetail + where x.ProjectId == this.ProjectId && (x.ParentId == "1" || x.ParentId == "2") + select x; + if (getViewWorkPackageParentDetail.Count() > 0) + { + totalSJCost = getViewWorkPackageParentDetail.Sum(x => x.TotalThisValue ?? 0); + } - //var getUnitWork = Funs.DB.WBS_UnitWork.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitWorkId == workPackageId); - //if (getUnitWork != null) - //{ - // totalPlanCost= getUnitWork.PlanCost ?? 0; - //} + var getUnitWork = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.ProjectId select x; + if (getUnitWork.Count() > 0) + { + totalPlanCost = getUnitWork.Sum(x => x.PlanCost ?? 0); + } - /////项目进度完成百分比 - //decimal s = Convert.ToDecimal(totalSJCost); - //this.lbJDRate.Text = totalPlanCost > 0 ? Math.Round(s / totalPlanCost).ToString() + "%" : "0%"; + ///项目进度完成百分比 + decimal s = Convert.ToDecimal(totalSJCost); + this.lbJDRate.Text = totalPlanCost > 0 ? Math.Round(s / totalPlanCost).ToString() + "%" : "0%"; } if (item == "HTGL") diff --git a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.designer.cs index 25d324cd..894b8118 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.designer.cs @@ -87,58 +87,58 @@ namespace FineUIPro.Web.DigData protected global::FineUIPro.Form SimpleForm1; /// - /// lbExpertArgument 控件。 + /// lbSitePersons 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbExpertArgument; + protected global::FineUIPro.Label lbSitePersons; /// - /// lbAccident 控件。 + /// lbWorkHours 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbAccident; + protected global::FineUIPro.Label lbWorkHours; /// - /// Label3 控件。 + /// lbEduCount 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label Label3; + protected global::FineUIPro.Label lbEduCount; /// - /// Label7 控件。 + /// lbRectifyRate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label Label7; + protected global::FineUIPro.Label lbRectifyRate; /// - /// Label8 控件。 + /// lbMeetingCount 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label Label8; + protected global::FineUIPro.Label lbMeetingCount; /// - /// Label9 控件。 + /// lbHSECost 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label Label9; + protected global::FineUIPro.Label lbHSECost; /// /// gpCQMS 控件。 diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx index 3e3e41d3..426eb1d2 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx @@ -64,7 +64,7 @@ - + diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs index 3f67a293..c7182d9a 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs @@ -114,6 +114,10 @@ namespace FineUIPro.Web.DigData && x.States == Const.State_2 && (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId)) select x).Count().ToString(); + + this.lbHSEProblemCount.Text= (from x in Funs.DB.HSSE_Hazard_HazardRegister + where x.ProjectId == this.ProjectId && x.States != null && x.States !="4" && x.States != "0" + select x).Count().ToString(); } if (item == "CQMS") { diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs index f8ae1512..caf5ffa5 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs @@ -159,13 +159,13 @@ namespace FineUIPro.Web.DigData protected global::FineUIPro.Label lbAccident; /// - /// Label3 控件。 + /// lbHSEProblemCount 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label Label3; + protected global::FineUIPro.Label lbHSEProblemCount; /// /// gpCQMS 控件。 diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index b4222019..e69de29b 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1,42 +0,0 @@ - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 FineUIPro.Web.index.MenuSwitchMethod(String type) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\index.aspx.cs:行号 417 - 在 FineUIPro.Web.index.btnPerson_Click(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\index.aspx.cs:行号 467 - 在 FineUIPro.Button.OnClick(EventArgs e) - 在 (Button , EventArgs ) - 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:09/03/2023 11:44:42 -出错文件:http://localhost:8797/index.aspx -IP地址:::1 - -出错时间:09/03/2023 11:44:42 - - -错误信息开始=====> -错误类型:ChangeConflictException -错误信息:2 的 1 更新失败。 -错误堆栈: - 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) - 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) - 在 System.Data.Linq.DataContext.SubmitChanges() - 在 BLL.PhtglContractTrackService.UpdatePHTGL_ContractTrack(PHTGL_ContractTrack newtable) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\PHTGL\ContractCompile\PhtglContracttrackService .cs:行号 200 - 在 FineUIPro.Web.PHTGL.ContractCompile.ContractTrackList.btnSave_OnClick(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\PHTGL\ContractCompile\ContractTrackList.aspx.cs:行号 371 - 在 FineUIPro.Button.OnClick(EventArgs e) - 在 (Button , EventArgs ) - 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:09/04/2023 10:22:11 -出错文件:http://localhost:8797/PHTGL/ContractCompile/ContractTrackList.aspx -IP地址:::1 -操作人员:JT - -出错时间:09/04/2023 10:22:11 -