From 0c51a35191a3254ca5a4ed4fc729fd1e5a2646da Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Tue, 29 Jul 2025 09:35:32 +0800 Subject: [PATCH] 20250729 --- .../EditorManage/PMEditorEdit.aspx | 83 ++++++++++--------- EProject/FineUIPro.Web/Global.asax.cs | 20 +++-- .../Report/OverviewReport.aspx.cs | 6 +- .../Report/ProjectCostReport.aspx.cs | 2 +- EProject/FineUIPro.Web/common/Main.aspx | 3 +- 5 files changed, 59 insertions(+), 55 deletions(-) diff --git a/EProject/FineUIPro.Web/EditorManage/PMEditorEdit.aspx b/EProject/FineUIPro.Web/EditorManage/PMEditorEdit.aspx index c283d65..6e8ce87 100644 --- a/EProject/FineUIPro.Web/EditorManage/PMEditorEdit.aspx +++ b/EProject/FineUIPro.Web/EditorManage/PMEditorEdit.aspx @@ -19,15 +19,15 @@ - + - - - - - + + + + + @@ -69,13 +69,13 @@ - - + @@ -183,7 +183,7 @@ - + - + @@ -224,7 +224,7 @@ - + @@ -239,30 +239,31 @@ - + + + + + + - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + @@ -275,7 +276,7 @@ + HeaderText="Identifier" HeaderTextAlign="Center"> @@ -284,7 +285,7 @@ ExpandUnusedSpace="true"> - + @@ -301,8 +302,8 @@ - - + + @@ -314,7 +315,7 @@ - + @@ -328,10 +329,10 @@ + OnClick="btnCalculated_Click" Text="Calculated Progress"> + OnClick="btnSave_Click"> diff --git a/EProject/FineUIPro.Web/Global.asax.cs b/EProject/FineUIPro.Web/Global.asax.cs index e459607..94003eb 100644 --- a/EProject/FineUIPro.Web/Global.asax.cs +++ b/EProject/FineUIPro.Web/Global.asax.cs @@ -96,6 +96,7 @@ aTimer.Start(); aTimer.Elapsed += new System.Timers.ElapsedEventHandler(MCEmial); } + //填写第二张资源时,第一张资源预留一个月的时候填写人工时 if (DateTime.Now.Hour == 10) { @@ -350,19 +351,20 @@ where x.EProjectId == epr.Key && (y.ProjectControl_JobType == "Projects" || y.ProjectControl_JobType == "MOC") && x.Phase == "Study/Concept Planning" orderby x.CreateDate ascending - select new { x.ResourcePlanId, y.PM_MA_ProjectApproval }).ToList(); + select new { x.ResourcePlanId, y.PM_MA_ProjectApproval, x.WO }).ToList(); //if (planLists.Count == 2) //{ - if (planLists[0].PM_MA_ProjectApproval.HasValue && planLists[0].PM_MA_ProjectApproval.Value.AddMonths(1) <= DateTime.Now) + if (planLists[0].PM_MA_ProjectApproval.HasValue && planLists[0].PM_MA_ProjectApproval.Value.AddMonths(1) <= DateTime.Now) + { + string resourcePlanId = planLists[0].ResourcePlanId.ToString(); + string wo = planLists[0].WO.ToString();//特殊处理的人工时无ResourcePlanId判断Account与第一个rp的Account相同做Disabled + List manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.EProjectId == epr.Key && (x.ResourcePlanId == resourcePlanId || x.Account.Contains(wo)) select x).ToList(); + foreach (var item in manHours_Plan) { - string resourcePlanId = planLists[0].ResourcePlanId.ToString(); - List manHours_Plan = (from x in Funs.DB.ManHours_Plan where x.ResourcePlanId == resourcePlanId select x).ToList(); - foreach (var item in manHours_Plan) - { - item.AccountDisabled = 1; - Funs.DB.SubmitChanges(); - } + item.AccountDisabled = 1; + Funs.DB.SubmitChanges(); } + } //} } } diff --git a/EProject/FineUIPro.Web/Report/OverviewReport.aspx.cs b/EProject/FineUIPro.Web/Report/OverviewReport.aspx.cs index c9bc04e..a209961 100644 --- a/EProject/FineUIPro.Web/Report/OverviewReport.aspx.cs +++ b/EProject/FineUIPro.Web/Report/OverviewReport.aspx.cs @@ -2887,7 +2887,7 @@ namespace FineUIPro.Web.Report { if (Funs.GetNewDateTime(itemOver.MCActual).Value.AddDays(90) < Funs.GetNewDateTime(DateTime.Now.ToShortDateString()) && string.IsNullOrEmpty(itemOver.FC_Signed)) { - overview.GetRow(rowIndex).GetCell(22).CellStyle = redbackgroundstyle; + overview.GetRow(rowIndex).GetCell(24).CellStyle = redbackgroundstyle; } } @@ -2901,7 +2901,7 @@ namespace FineUIPro.Web.Report { if (Funs.GetNewDateTime(itemOver.FC_Signed).Value.AddDays(180) < Funs.GetNewDateTime(DateTime.Now.ToShortDateString()) && string.IsNullOrEmpty(itemOver.ProjectControl_BC_CloseDate)) { - overview.GetRow(rowIndex).GetCell(23).CellStyle = redbackgroundstyle; + overview.GetRow(rowIndex).GetCell(25).CellStyle = redbackgroundstyle; } } //超出实际MC90天,仍未收到AB的(As-built Received) @@ -2909,7 +2909,7 @@ namespace FineUIPro.Web.Report { if (Funs.GetNewDateTime(itemOver.MCActual).Value.AddDays(90) < Funs.GetNewDateTime(DateTime.Now.ToShortDateString()) && string.IsNullOrEmpty(itemOver.As_built_Received)) { - overview.GetRow(rowIndex).GetCell(25).CellStyle = redDatestyle; + overview.GetRow(rowIndex).GetCell(27).CellStyle = redDatestyle; } } #endregion diff --git a/EProject/FineUIPro.Web/Report/ProjectCostReport.aspx.cs b/EProject/FineUIPro.Web/Report/ProjectCostReport.aspx.cs index 842b191..7dff103 100644 --- a/EProject/FineUIPro.Web/Report/ProjectCostReport.aspx.cs +++ b/EProject/FineUIPro.Web/Report/ProjectCostReport.aspx.cs @@ -49,7 +49,7 @@ namespace FineUIPro.Web.Report string strSql = @"SELECT costReport.CostReportId, costReport.EProjectId, costReport.Monthly, - costReport.OrginalBudget, + (costReport.OrginalBudget+costReport.ChangedBudget) as OrginalBudget, costReport.ChangedBudget, costReport.ActualCost, (costReport.CommittedPRPO + costReport.CommittedSSRs) AS Commitment, diff --git a/EProject/FineUIPro.Web/common/Main.aspx b/EProject/FineUIPro.Web/common/Main.aspx index 81d975f..033ea0d 100644 --- a/EProject/FineUIPro.Web/common/Main.aspx +++ b/EProject/FineUIPro.Web/common/Main.aspx @@ -731,7 +731,8 @@ var sd = parseFloat(CostArr[i].ActualCost) + parseFloat(CostArr[i].CommittedPRPO) + parseFloat(CostArr[i].CommittedSSRs + parseFloat(CostArr[i].CostToComplete)); ActCom += "" + sd + ","; ActComs += "" + CostArr[i].ActualCost + ","; - Budget += "" + CostArr[i].OrginalBudget + ","; + var bg = parseFloat(CostArr[i].OrginalBudget) + parseFloat(CostArr[i].ChangedBudget); + Budget += "" + bg + ","; } } Legendata = '[' + Legendata.substring(0, Legendata.length - 1) + ']';