diff --git a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
index 39b09813..94db0e6a 100644
--- a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
+++ b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
@@ -750,7 +750,7 @@ namespace BLL
ProjectId = weldTask.ProjectId,
// CusBillCode = string.Format("{0:yyyyMMdd}", DateTime.Now) + UnitService.GetUnitCodeByUnitId(weldTask.UnitId) + "-" + UnitWorkService.getUnitWorkByUnitWorkId(weldTask.UnitWorkId)?.UnitWorkCode + "AP-PF01",
CusBillCode = TwInOutplanmasterService.GetCusBillCodeByTaskCode(weldTaskCode, TwConst.TypeInt.领料出库, TwConst.Category.管件),
- WarehouseCode = PipelineService.GetPipeArea().Where(x => x.Value == PipelineService.GetPipelineByPipelineId(weldTask.PipelineId).PipeArea).Select(x => x.Text).FirstOrDefault(),
+ WarehouseCode = BLL.Base_WarehouseService.GetWarehouseByWarehouseId(PipelineService.GetPipelineByPipelineId(weldTask.PipelineId).WarehouseId).WarehouseName,
Source = 1,
InOutType = (int)TwConst.InOutType.出库,
TypeInt = (int)TwConst.TypeInt.领料出库,
@@ -789,7 +789,7 @@ namespace BLL
Id = Guid.NewGuid().ToString(),
ProjectId = weldTask.ProjectId,
CusBillCode = TwInOutplanmasterService.GetCusBillCodeByTaskCode(weldTaskCode, TwConst.TypeInt.领料出库, TwConst.Category.管段),
- WarehouseCode = PipelineService.GetPipeArea().Where(x => x.Value == PipelineService.GetPipelineByPipelineId(weldTask.PipelineId).PipeArea).Select(x => x.Text).FirstOrDefault(),
+ WarehouseCode = BLL.Base_WarehouseService.GetWarehouseByWarehouseId(PipelineService.GetPipelineByPipelineId(weldTask.PipelineId).WarehouseId).WarehouseName,
Source = 1,
InOutType = (int)TwConst.InOutType.出库,
TypeInt = (int)TwConst.TypeInt.领料出库,
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 223f44ea..11586171 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -17017,7 +17017,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs
index 01992a81..15d9cfe6 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs
@@ -1316,8 +1316,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
-
-
protected void btnPrintJoint_Click(object sender, EventArgs e)
{
var rows = Grid1.SelectedRowIndexArray;
diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx
index 953968eb..84c16e77 100644
--- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx
@@ -69,6 +69,7 @@
+
<%--
--%>
diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs
index f5ee4fe7..bcea3b54 100644
--- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs
+++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs
@@ -51,11 +51,11 @@ namespace FineUIPro.Web.common
this.tvControlItem.Nodes.Add(rootNode2);
// 优化:一次性获取所有管线统计数据,避免 N+1 查询
- var pipelineCountByUnitWork = (from x in Funs.DB.HJGL_Pipeline
+ var pipelineCountByUnitWork = (from x in Funs.DB.View_HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId
group x by x.UnitWorkId into g
- select new { UnitWorkId = g.Key, Count = g.Count() })
- .ToDictionary(x => x.UnitWorkId, x => x.Count);
+ select new { UnitWorkId = g.Key, Count = g.Count(), TotalDin = g.Sum(x => x.TotalDin) })
+ .ToDictionary(x => x.UnitWorkId, x => new { x.Count, x.TotalDin });
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
// 获取当前用户所在单位
@@ -74,14 +74,15 @@ namespace FineUIPro.Web.common
if (unitWork1.Count() > 0)
{
- foreach (var q in unitWork1)
+ foreach (var q in unitWork1)
{
// 优化:从内存字典中获取管线数量,避免数据库查询
- int a = pipelineCountByUnitWork.ContainsKey(q.UnitWorkId) ? pipelineCountByUnitWork[q.UnitWorkId] : 0;
+ int a = pipelineCountByUnitWork.ContainsKey(q.UnitWorkId) ? pipelineCountByUnitWork[q.UnitWorkId].Count : 0;
+ decimal totalDia = pipelineCountByUnitWork.ContainsKey(q.UnitWorkId) ? pipelineCountByUnitWork[q.UnitWorkId].TotalDin ?? 0 : 0;
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
- tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
+ tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线" + "(总达因:" + totalDia.ToString() + ")";
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
tn1.EnableClickEvent = true;
rootNode1.Nodes.Add(tn1);
@@ -92,11 +93,13 @@ namespace FineUIPro.Web.common
foreach (var q in unitWork2)
{
// 优化:从内存字典中获取管线数量,避免数据库查询
- int a = pipelineCountByUnitWork.ContainsKey(q.UnitWorkId) ? pipelineCountByUnitWork[q.UnitWorkId] : 0;
+ int a = pipelineCountByUnitWork.ContainsKey(q.UnitWorkId) ? pipelineCountByUnitWork[q.UnitWorkId].Count : 0;
+ decimal totalDia = pipelineCountByUnitWork.ContainsKey(q.UnitWorkId) ? pipelineCountByUnitWork[q.UnitWorkId].TotalDin??0 : 0;
+
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
- tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
+ tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线" + "(总达因:" + totalDia.ToString() + ")";
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
tn2.EnableClickEvent = true;
rootNode2.Nodes.Add(tn2);