From 3ba7c1973b42da656f610e5216ceaf9f38c3f042 Mon Sep 17 00:00:00 2001 From: fei550 <1420031550@qq.com> Date: Tue, 7 Jul 2026 14:22:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(hjgl)=E7=84=8A=E6=8E=A5=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=85=A5=E7=95=8C=E9=9D=A2=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2026-07-07-lpf.sql | 89 +++++++++++++++++++ .../HJGL/WeldingManage/WeldJointList.aspx.cs | 7 +- SGGL/Model/Model.cs | 18 ++++ 3 files changed, 110 insertions(+), 4 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2026-07-07-lpf.sql diff --git a/DataBase/版本日志/SGGLDB_V2026-07-07-lpf.sql b/DataBase/版本日志/SGGLDB_V2026-07-07-lpf.sql new file mode 100644 index 00000000..ab8142cc --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2026-07-07-lpf.sql @@ -0,0 +1,89 @@ +USE [SGGLDB_SHJ] +GO + +/****** Object: View [dbo].[View_HJGL_Pipeline] Script Date: 2026/7/7 14:13:47 ******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + +ALTER view [dbo].[View_HJGL_Pipeline] as + SELECT pipeline.PipelineId, + pipeline.ProjectId, + pipeline.UnitId, + pipeline.UnitWorkId, + pipeline.PipelineCode, + pipeline.SingleName, + pipeline.SingleNumber, + pipeline.PipingClassId, + pipeline.MediumId, + pipingClass.PipingClassCode, + pipeline.DetectionRateId, + rate.DetectionRateCode, + pipeline.DetectionType, + pipeline.TestPressure, + pipeline.TestMedium, + pipeline.PressurePipingClassId, + pc.PressurePipingClassCode, + pipeline.PipeLenth, + pipeline.DesignPress, + pipeline.DesignTemperature, + pipeline.Remark, + pipeline.LeakPressure, + pipeline.LeakMedium, + pipeline.VacuumPressure, + pipeline.PCMedium, + pipeline.PCtype, + pipeline.MaterialId, + pipeline.PipeArea, + pipeline.PaintId, + case pipeline.PipeArea when '1' then '¹¤³§Ô¤ÖÆ' when '2' then 'ÏÖ³¡Ê©¹¤' else '' end as PipeAreaStr, + pipeline.FlowingSection, + mat.MaterialCode, + dType.DetectionTypeCode, + lea.MediumName AS LeakMediumName, + pur.PurgeMethodName AS PCMediumName, + CAST((SELECT SUM(ISNULL(Size, 0)) + FROM dbo.HJGL_WeldJoint + WHERE PipelineId = pipeline.PipelineId) AS DECIMAL(8, 3)) AS TotalDin, + CAST((SELECT ISNULL(SUM(ISNULL(jot.Size, 0)), 0) + FROM dbo.HJGL_WeldJoint jot + WHERE jot.PipelineId = pipeline.PipelineId + AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(8, 3)) AS FinishSize, + (SELECT COUNT(WeldJointId) + FROM dbo.HJGL_WeldJoint + WHERE PipelineId = pipeline.PipelineId and IsTwoJoint is null) AS JointCount, + (SELECT COUNT(WeldJointId) + FROM dbo.HJGL_WeldJoint + WHERE PipelineId = pipeline.PipelineId + and IsTwoJoint is null + and JointAttribute = 'Ô¤ÖÆ¿Ú') AS ShopJointCount, + (SELECT COUNT(WeldJointId) + FROM dbo.HJGL_WeldJoint + WHERE PipelineId = pipeline.PipelineId + and IsTwoJoint is null + and WeldingDailyId IS NOT NULL) AS FinishJointCount, + unit.UnitName, + workArea.UnitWorkCode, + medium.MediumCode, + medium.MediumName AS MediumName, + testMedium.MediumCode AS TestMediumCode, + pipeline.ActEndDate AS FinishedDate, + pipeline.IsFinished + FROM dbo.HJGL_Pipeline AS pipeline + LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId = pipeline.PipingClassId + LEFT JOIN dbo.Base_Unit AS unit ON unit.UnitId = pipeline.UnitId + LEFT JOIN WBS_UnitWork AS workArea ON workArea.UnitWorkId = pipeline.UnitWorkId + LEFT JOIN Base_Medium AS medium ON medium.MediumId = pipeline.MediumId + LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId = pipeline.TestMedium + LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId = pipeline.DetectionRateId + LEFT JOIN dbo.Base_PressurePipingClass pc ON pc.PressurePipingClassId = pipeline.PressurePipingClassId + LEFT JOIN dbo.Base_TestMedium AS lea ON lea.TestMediumId = pipeline.LeakMedium + LEFT JOIN dbo.Base_PurgeMethod AS pur ON pur.PurgeMethodId = pipeline.PCMedium + LEFT JOIN dbo.Base_Material AS mat ON mat.MaterialId = pipeline.MaterialId + LEFT JOIN dbo.Base_DetectionType dType on dType.DetectionTypeId = pipeline.DetectionType + +GO + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs index 98100e24..4a8db52c 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs @@ -270,13 +270,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage v.TestPressure,v.SingleNumber,v.DetectionRateCode,v.DetectionType,v.Remark,v.FlowingSection,v.TestMediumCode,v.TotalDin, v.JointCount,v.PressurePipingClassCode,v.PipeLenth,v.DesignPress,v.DesignTemperature,v.LeakPressure,v.VacuumPressure, v.LeakMediumName,v.PCMediumName,v.MaterialCode,paint.PaintCode - FROM dbo.View_HJGL_Pipeline v - LEFT JOIN dbo.HJGL_Pipeline p ON p.PipelineId = v.PipelineId - LEFT JOIN dbo.Tw_PaintCodeDict paint ON paint.Id = p.PaintId + FROM dbo.View_HJGL_Pipeline v + LEFT JOIN dbo.Tw_PaintCodeDict paint ON paint.Id = v.PaintId WHERE v.ProjectId= @ProjectId"; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); - strSql += " AND PipelineId = @PipelineId"; + strSql += " AND v.PipelineId = @PipelineId"; listStr.Add(new SqlParameter("@PipelineId", pipelineId)); //strSql += " AND UnitWorkId =@UnitWorkId"; //listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID)); diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 6622341a..66aee34b 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -301858,6 +301858,8 @@ namespace Model private string _PipeArea; + private string _PaintId; + private string _PipeAreaStr; private string _FlowingSection; @@ -302346,6 +302348,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PaintId", DbType="NVarChar(20)")] + public string PaintId + { + get + { + return this._PaintId; + } + set + { + if ((this._PaintId != value)) + { + this._PaintId = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipeAreaStr", DbType="VarChar(8) NOT NULL", CanBeNull=false)] public string PipeAreaStr {