From 250e09a3553b2a72b94684ab4da184eb3171a77d Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Wed, 25 Oct 2023 14:23:55 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ContractCompile/PhtglContracttrackService .cs | 14 ++++----------
.../PHTGL/ContractCompile/ContractWBS.aspx.cs | 2 +-
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
index 32643bc9..d8539f22 100644
--- a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
+++ b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
@@ -1100,11 +1100,8 @@ namespace BLL
decimal physicalCompletionQuantity = 0, materialConsumption = 0;
if (we.Count() > 0)
{
- foreach (var w in we)
- {
- physicalCompletionQuantity += w.PhysicalCompletionQuantity ?? 0;
- materialConsumption += w.MaterialConsumption ?? 0;
- }
+ physicalCompletionQuantity = we.Sum(x => x.PhysicalCompletionQuantity ?? 0);
+ materialConsumption = we.Sum(x => x.MaterialConsumption ?? 0);
row[9] = physicalCompletionQuantity;
row[10] = materialConsumption;
}
@@ -1188,11 +1185,8 @@ namespace BLL
decimal physicalCompletionQuantity = 0, materialConsumption = 0;
if (we.Count() > 0)
{
- foreach (var w in we)
- {
- physicalCompletionQuantity += w.PhysicalCompletionQuantity ?? 0;
- materialConsumption += w.MaterialConsumption ?? 0;
- }
+ physicalCompletionQuantity = we.Sum(x => x.PhysicalCompletionQuantity ?? 0);
+ materialConsumption = we.Sum(x => x.MaterialConsumption ?? 0);
row[9] = physicalCompletionQuantity;
row[10] = materialConsumption;
}
diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs
index 64686ba1..7b84004e 100644
--- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs
@@ -177,7 +177,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
return;
}
string ID = Grid1.SelectedRow.DataKeys[0].ToString();
- var model = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackById(ID[0].ToString());
+ var model = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackById(ID);
if (model != null) ///已上报时不能删除
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ContractTrackMatchWBS.aspx?ContractTrackId={0}", ID, "编辑 - ")));
From fc70739b8b278b8e7f894f1e304be339943b71bd Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Wed, 25 Oct 2023 14:41:30 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../PHTGL/ContractCompile/ContractWBS.aspx.cs | 4 +-
SGGL/FineUIPro.Web/common/Menu_DigData.xml | 63 +++----------------
SGGL/FineUIPro.Web/common/Menu_HTGL.xml | 13 ++--
SGGL/FineUIPro.Web/common/Menu_JDGL.xml | 6 +-
SGGL/FineUIPro.Web/common/Menu_PHTGL.xml | 17 +++--
SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 37 +++++++++++
6 files changed, 60 insertions(+), 80 deletions(-)
diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs
index 7b84004e..19aed1fd 100644
--- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs
+++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractWBS.aspx.cs
@@ -215,8 +215,8 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
- object[] ID = Grid1.DataKeys[Grid1.SelectedRowIndex];
- var model = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackById(ID[0].ToString());
+ string ID = Grid1.SelectedRow.DataKeys[0].ToString();
+ var model = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackById(ID);
if (model != null) ///已上报时不能删除
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ContractTrackMatchWBS.aspx?ContractTrackId={0}", ID, "编辑 - ")));
diff --git a/SGGL/FineUIPro.Web/common/Menu_DigData.xml b/SGGL/FineUIPro.Web/common/Menu_DigData.xml
index bb7a7a34..b532a9bb 100644
--- a/SGGL/FineUIPro.Web/common/Menu_DigData.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_DigData.xml
@@ -1,51 +1,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -58,15 +16,12 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml
index 129ab5fd..c0fc81f0 100644
--- a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml
@@ -1,14 +1,12 @@
-
-
-
+
+
+
-
-
@@ -16,10 +14,7 @@
-
-
-
-
+
diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
index fd6a0762..8d4aa005 100644
--- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml
@@ -1,11 +1,7 @@
-
+
-
-
-
-
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml
index 3ccb32ac..eb672a76 100644
--- a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml
@@ -13,15 +13,7 @@
-
-
-
-
-
-
-
-
-
+
@@ -35,8 +27,13 @@
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml
index 9bc36592..03eb9188 100644
--- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml
+++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml
@@ -48,6 +48,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From ffbb79697d8fe40d7e0d491564c9852abdaedfad Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Wed, 25 Oct 2023 15:08:52 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../PhtglContracttrackService .cs | 40 ++++---------------
.../ProjectConstructionLog.aspx.cs | 40 ++++++++++---------
2 files changed, 30 insertions(+), 50 deletions(-)
diff --git a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
index d8539f22..85b8475c 100644
--- a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
+++ b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
@@ -1107,17 +1107,11 @@ namespace BLL
}
for (int i = 0; i < workPostIds.Count; i++)
{
- var workEfficiencyList = workEfficiencys.Where(x => x.Type == "Person" && x.TypeId == workPostIds[i] && x.ContractTrackId == item.Id);
+ var workEfficiencyList = workEfficiencys.Where(x => x.Type == "Person" && x.TypeId == workPostIds[i] && x.ContractTrackId == item.Id && x.ConsumeHours != null);
if (workEfficiencyList.Count() > 0)
{
decimal d = 0;
- foreach (var workEfficiency in workEfficiencyList)
- {
- if (workEfficiency.ConsumeHours != null)
- {
- d += decimal.Round(Convert.ToDecimal(workEfficiency.ConsumeHours), 2);
- }
- }
+ d = workEfficiencyList.Sum(x => x.ConsumeHours ?? 0);
if (d > 0)
{
row[12 + i * 2] = decimal.Round(d, 2);
@@ -1130,17 +1124,11 @@ namespace BLL
}
for (int i = 0; i < machineIds.Count; i++)
{
- var workEfficiencyList = workEfficiencys.Where(x => x.Type == "Machine" && x.TypeId == machineIds[i] && x.ContractTrackId == item.Id);
+ var workEfficiencyList = workEfficiencys.Where(x => x.Type == "Machine" && x.TypeId == machineIds[i] && x.ContractTrackId == item.Id && x.ConsumeHours != null);
if (workEfficiencyList.Count() > 0)
{
decimal d = 0;
- foreach (var workEfficiency in workEfficiencyList)
- {
- if (workEfficiency.ConsumeHours != null)
- {
- d += decimal.Round(Convert.ToDecimal(workEfficiency.ConsumeHours), 2);
- }
- }
+ d = workEfficiencyList.Sum(x => x.ConsumeHours ?? 0);
if (d > 0)
{
row[52 + i * 2] = decimal.Round(d, 2);
@@ -1192,17 +1180,11 @@ namespace BLL
}
for (int i = 0; i < workPostIds.Count; i++)
{
- var workEfficiencyList = workEfficiencys.Where(x => x.Type == "Person" && x.TypeId == workPostIds[i] && x.ContractTrackId == item.Id);
+ var workEfficiencyList = workEfficiencys.Where(x => x.Type == "Person" && x.TypeId == workPostIds[i] && x.ContractTrackId == item.Id && x.ConsumeHours != null);
if (workEfficiencyList.Count() > 0)
{
decimal d = 0;
- foreach (var workEfficiency in workEfficiencyList)
- {
- if (workEfficiency.ConsumeHours != null)
- {
- d += decimal.Round(Convert.ToDecimal(workEfficiency.ConsumeHours), 2);
- }
- }
+ d = workEfficiencyList.Sum(x => x.ConsumeHours ?? 0);
if (d > 0)
{
row[12 + i * 2] = decimal.Round(d, 2);
@@ -1215,17 +1197,11 @@ namespace BLL
}
for (int i = 0; i < machineIds.Count; i++)
{
- var workEfficiencyList = workEfficiencys.Where(x => x.Type == "Machine" && x.TypeId == machineIds[i] && x.ContractTrackId == item.Id);
+ var workEfficiencyList = workEfficiencys.Where(x => x.Type == "Machine" && x.TypeId == machineIds[i] && x.ContractTrackId == item.Id && x.ConsumeHours != null);
if (workEfficiencyList.Count() > 0)
{
decimal d = 0;
- foreach (var workEfficiency in workEfficiencyList)
- {
- if (workEfficiency.ConsumeHours != null)
- {
- d += decimal.Round(Convert.ToDecimal(workEfficiency.ConsumeHours), 2);
- }
- }
+ d = workEfficiencyList.Sum(x => x.ConsumeHours ?? 0);
if (d > 0)
{
row[52 + i * 2] = decimal.Round(d, 2);
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs
index 6845bf99..beee0f15 100644
--- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs
@@ -303,25 +303,29 @@ namespace FineUIPro.Web.PZHGL.InformationProject
{
foreach (var personLog in personLogs)
{
- if (!string.IsNullOrEmpty(personLog.HSETodaySummary) || !string.IsNullOrEmpty(personLog.HSETodaySummaryRemark) || !string.IsNullOrEmpty(personLog.HSETomorrowPlan) || !string.IsNullOrEmpty(personLog.HSETomorrowPlanRemark))
+ var projectUser = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, personLog.CompileMan);
+ if (projectUser != null && projectUser.WorkPostId != BLL.Const.WorkPost_ConstructionManager)
{
- Model.ConstructionLogHSE hse = new Model.ConstructionLogHSE();
- hse.ConstructionLogId = personLog.ConstructionLogId;
- hse.HSETodaySummary = personLog.HSETodaySummary;
- hse.HSETodaySummaryRemark = personLog.HSETodaySummaryRemark;
- hse.HSETomorrowPlan = personLog.HSETomorrowPlan;
- hse.HSETomorrowPlanRemark = personLog.HSETomorrowPlanRemark;
- hses.Add(hse);
- }
- if (!string.IsNullOrEmpty(personLog.CQMSTodaySummary) || !string.IsNullOrEmpty(personLog.CQMSTodaySummaryRemark) || !string.IsNullOrEmpty(personLog.CQMSTomorrowPlan) || !string.IsNullOrEmpty(personLog.CQMSTomorrowPlanRemark))
- {
- Model.ConstructionLogCQMS cqms = new Model.ConstructionLogCQMS();
- cqms.ConstructionLogId = personLog.ConstructionLogId;
- cqms.CQMSTodaySummary = personLog.CQMSTodaySummary;
- cqms.CQMSTodaySummaryRemark = personLog.CQMSTodaySummaryRemark;
- cqms.CQMSTomorrowPlan = personLog.CQMSTomorrowPlan;
- cqms.CQMSTomorrowPlanRemark = personLog.CQMSTomorrowPlanRemark;
- cqmss.Add(cqms);
+ if (!string.IsNullOrEmpty(personLog.HSETodaySummary) || !string.IsNullOrEmpty(personLog.HSETodaySummaryRemark) || !string.IsNullOrEmpty(personLog.HSETomorrowPlan) || !string.IsNullOrEmpty(personLog.HSETomorrowPlanRemark))
+ {
+ Model.ConstructionLogHSE hse = new Model.ConstructionLogHSE();
+ hse.ConstructionLogId = personLog.ConstructionLogId;
+ hse.HSETodaySummary = personLog.HSETodaySummary;
+ hse.HSETodaySummaryRemark = personLog.HSETodaySummaryRemark;
+ hse.HSETomorrowPlan = personLog.HSETomorrowPlan;
+ hse.HSETomorrowPlanRemark = personLog.HSETomorrowPlanRemark;
+ hses.Add(hse);
+ }
+ if (!string.IsNullOrEmpty(personLog.CQMSTodaySummary) || !string.IsNullOrEmpty(personLog.CQMSTodaySummaryRemark) || !string.IsNullOrEmpty(personLog.CQMSTomorrowPlan) || !string.IsNullOrEmpty(personLog.CQMSTomorrowPlanRemark))
+ {
+ Model.ConstructionLogCQMS cqms = new Model.ConstructionLogCQMS();
+ cqms.ConstructionLogId = personLog.ConstructionLogId;
+ cqms.CQMSTodaySummary = personLog.CQMSTodaySummary;
+ cqms.CQMSTodaySummaryRemark = personLog.CQMSTodaySummaryRemark;
+ cqms.CQMSTomorrowPlan = personLog.CQMSTomorrowPlan;
+ cqms.CQMSTomorrowPlanRemark = personLog.CQMSTomorrowPlanRemark;
+ cqmss.Add(cqms);
+ }
}
}
this.GridHSETodaySummary.DataSource = hses;
From d1a4134e7bc90e1a8345de7121d4b4dff0ffd59b Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Wed, 25 Oct 2023 15:24:07 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ProjectConstructionLog.aspx.cs | 28 ++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs
index beee0f15..b88371eb 100644
--- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.cs
@@ -304,7 +304,33 @@ namespace FineUIPro.Web.PZHGL.InformationProject
foreach (var personLog in personLogs)
{
var projectUser = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, personLog.CompileMan);
- if (projectUser != null && projectUser.WorkPostId != BLL.Const.WorkPost_ConstructionManager)
+ if (projectUser != null)
+ {
+ if (projectUser.WorkPostId != BLL.Const.WorkPost_ConstructionManager)
+ {
+ if (!string.IsNullOrEmpty(personLog.HSETodaySummary) || !string.IsNullOrEmpty(personLog.HSETodaySummaryRemark) || !string.IsNullOrEmpty(personLog.HSETomorrowPlan) || !string.IsNullOrEmpty(personLog.HSETomorrowPlanRemark))
+ {
+ Model.ConstructionLogHSE hse = new Model.ConstructionLogHSE();
+ hse.ConstructionLogId = personLog.ConstructionLogId;
+ hse.HSETodaySummary = personLog.HSETodaySummary;
+ hse.HSETodaySummaryRemark = personLog.HSETodaySummaryRemark;
+ hse.HSETomorrowPlan = personLog.HSETomorrowPlan;
+ hse.HSETomorrowPlanRemark = personLog.HSETomorrowPlanRemark;
+ hses.Add(hse);
+ }
+ if (!string.IsNullOrEmpty(personLog.CQMSTodaySummary) || !string.IsNullOrEmpty(personLog.CQMSTodaySummaryRemark) || !string.IsNullOrEmpty(personLog.CQMSTomorrowPlan) || !string.IsNullOrEmpty(personLog.CQMSTomorrowPlanRemark))
+ {
+ Model.ConstructionLogCQMS cqms = new Model.ConstructionLogCQMS();
+ cqms.ConstructionLogId = personLog.ConstructionLogId;
+ cqms.CQMSTodaySummary = personLog.CQMSTodaySummary;
+ cqms.CQMSTodaySummaryRemark = personLog.CQMSTodaySummaryRemark;
+ cqms.CQMSTomorrowPlan = personLog.CQMSTomorrowPlan;
+ cqms.CQMSTomorrowPlanRemark = personLog.CQMSTomorrowPlanRemark;
+ cqmss.Add(cqms);
+ }
+ }
+ }
+ else
{
if (!string.IsNullOrEmpty(personLog.HSETodaySummary) || !string.IsNullOrEmpty(personLog.HSETodaySummaryRemark) || !string.IsNullOrEmpty(personLog.HSETomorrowPlan) || !string.IsNullOrEmpty(personLog.HSETomorrowPlanRemark))
{