From 3943a1f9ef266e05be508d46df117c9f8cfb32b0 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 16 Jan 2026 14:40:38 +0800 Subject: [PATCH] 1 --- DataBase/版本日志/HJGLDB_DS_2026-01-16_gf.sql | 137 ++++++++++++++++++ .../HJGL/WeldingReport/HJGLData.aspx | 4 + 2 files changed, 141 insertions(+) create mode 100644 DataBase/版本日志/HJGLDB_DS_2026-01-16_gf.sql diff --git a/DataBase/版本日志/HJGLDB_DS_2026-01-16_gf.sql b/DataBase/版本日志/HJGLDB_DS_2026-01-16_gf.sql new file mode 100644 index 0000000..5dc466b --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-01-16_gf.sql @@ -0,0 +1,137 @@ + +ALTER PROC [dbo].[HJGL_sp_StatisticsSampleTable] + @projectId NVARCHAR(50) = NULL, + @iso_isoNo VARCHAR(50) = NULL, + @isHotPress bit = NULL, + @Welded NVARCHAR(50) =NULL, + @ndtType NVARCHAR(10) = NULL, + @ndtResult NVARCHAR(20)=NULL + +AS +/*********ͳ ܴ޸2022.11.30********/ +SELECT +JointInfo.JOT_ID, +project.ProjectCode, --ʩ +IsoInfo.PressureTestPackageNo,--ѹ +IsoInfo.ISO_ID, +IsoInfo.ISO_IsoNo, --ߺ +'1-'+IsoClass.ISC_IsoName+'-'+Ser.SER_Code+'-'+Steel.STE_Code AS ISO_Code, --ܵ +IsoClass.ISC_IsoName, --ܵȼ +Ser.SER_Name, -- +IsoInfo.ISO_DesignPress, --ѹ +IsoInfo.PipeLineClass, --ܵ +JointInfo.JOT_JointNo, -- +JointInfo.JOT_JointDesc, -- +JointInfo.JOT_Location, --λ +WeldMethod.WME_Name, --ӷ +JointType.JOTY_Code, -- +JointType.JOTY_Group, +Sort1,Sort2,Sort3,Sort4,Sort5, +IsoInfo.ISO_Insulator, -- +IsoInfo.ISO_DesignTemperature, --¶ +IsoInfo.ISO_TestPress, --ѹ +(CASE WHEN WeldMat.WMT_MatCode IS NOT NULL AND WeldSilk.WMT_MatCode IS NOT NULL and WeldMat.WMT_MatCode!=WeldSilk.WMT_MatCode + THEN WeldMat.WMT_MatCode + '/' + WeldSilk.WMT_MatCode + WHEN WeldMat.WMT_MatCode IS NOT NULL THEN WeldMat.WMT_MatCode + ELSE ISNULL(WeldSilk.WMT_MatCode,'') END) AS WeldMatSilkCode, +(CASE WHEN JointInfo.JOT_CellWelder!=JointInfo.JOT_FloorWelder THEN Welder1.WED_Code+'/'+Welder2.WED_Code ELSE Welder1.WED_Code END) AS WED_Code, +--Welder1.WED_Code,-- +Steel.STE_Code,-- +Steel.STE_Name,-- +NDTRate.NDTR_Name,--Ӧ +(CASE WHEN JointInfo.Jot_WeldingDate IS NOT NULL THEN JointInfo.Jot_WeldingDate + ELSE WeldReportMain.JOT_WeldDate END) AS JOT_WeldDate, -- +JointInfo.JOT_Size,--羭 +Batch.BatchCode,-- +BatchDetail.NDT, --ⷽʽId +(CASE WHEN BatchDetail.PointType=2 THEN 'K' ELSE '' END) AS PointType,--ĺ +JointInfo.JOT_Dia,--ֱ +JointInfo.JOT_Sch, --ں +(CASE WHEN JointInfo.RT_TrustCode IS NOT NULL THEN '' ELSE '' END) AS RTTrust, --RTί +JointInfo.RT_TrustCode, --RTίе +JointInfo.RT_TrustDate AS RTTrustDate, --߼ί + + JointInfo.RTFeedbackDate, --߼ⷴ + JointInfo.RT_States AS RTTestResult,--RT + + (CASE WHEN JointInfo.UT_TrustCode IS NOT NULL THEN '' ELSE '' END) AS UTTrust,--UTί + JointInfo.UT_States AS UTTestResult,--UT + + (CASE WHEN JointInfo.MT_TrustCode IS NOT NULL THEN '' ELSE '' END) AS MTTrust,--MTί + JointInfo.MT_States AS MTTestResult,--MT + + (CASE WHEN JointInfo.PT_TrustCode IS NOT NULL THEN '' ELSE '' END) AS PTTrust,--PTί + JointInfo.PT_TrustCode, --PTίе + JointInfo.PT_TrustDate, --PTί + JointInfo.PT_States AS PTTestResult,--PT + + (CASE WHEN JointInfo.PAUT_TrustCode IS NOT NULL THEN '' ELSE '' END) AS PAUTTrust, --PAUTί + JointInfo.PAUT_TrustCode, --PAUTίе + JointInfo.PAUT_TrustDate AS PAUTTrustDate, --PAUTί + JointInfo.PAUT_States AS PAUTTestResult,--PAUT + + (CASE WHEN (SELECT TOP 1 UnableCheck FROM dbo.HJGL_CH_TrustItem c WHERE c.JOT_ID=JointInfo.JOT_ID )=1 + THEN '' ELSE '' END) AS UnableCheck, + (SELECT TOP 1 UnableCheckReason FROM dbo.HJGL_CH_TrustItem c WHERE c.JOT_ID=JointInfo.JOT_ID ) AS UnableCheckReason, + +(CASE WHEN JointInfo.ProessTypes like '%4|5%' Then 'Ӧȴ,ȶ' +WHEN JointInfo.ProessTypes like '%4%' Then 'Ӧȴ' +WHEN JointInfo.ProessTypes like '%5%' Then 'ȶ' + ELSE '' END) AS ProessTypes,--ȴ +(case when JointInfo.ProessTypes like '%4%' or JointInfo.ProessTypes like '%5%' then 'Y' +else 'N' end) as IS_Proess, +(case when JointInfo.ProessTypes like '%1%' then 'Y' +else '' end) as IS_Preheating, +(select top 1 HotProessTrustCode from HJGL_CH_HotProessTrust t left join HJGL_CH_HotProessTrustItem i on t.HotProessTrustId=i.HotProessTrustId where i.JOT_ID=JointInfo.JOT_ID order by TrustDate desc) +as HotProessTrustCode, --ȴίб +JointInfo.HotProessTrustDate,--ȴίʱ +(select top 1 HotStartDate from HJGL_HotProessItem hpi where hpi.JOT_ID=JointInfo.JOT_ID) as HotStartDate, --ȴʼʱ +JointInfo.HotResultDate,--ȴʱ +(select top 1 HotHardCode from HJGL_CH_HardTestReport t left join HJGL_CH_HardTestReportItem i on t.HardTestReportId=i.HardTestReportId where i.JOT_ID=JointInfo.JOT_ID order by TestDate desc) +as HotHardCode, --Ӳίб +JointInfo.HardTrustDate,--Ӳίʱ +JointInfo.HardResultDate,--Ӳȷʱ +(case when JointInfo.HardTestResultOK=1 then 'ϸ' when JointInfo.HardTestResultOK=0 then 'ϸ' else '' end) as HardResult,--Ӳȼ +BatchDetail.BatchDetailId +FROM dbo.HJGL_PW_JointInfo AS JointInfo +LEFT JOIN DBO.HJGL_BO_BatchDetail AS BatchDetail ON JointInfo.JOT_ID = BatchDetail.JOT_ID +LEFT JOIN DBO.HJGL_PW_IsoInfo AS IsoInfo ON IsoInfo.ISO_ID = JointInfo.ISO_ID +LEFT JOIN HJGL_BS_WeldMethod AS WeldMethod ON WeldMethod.WME_ID = JointInfo.WME_ID +LEFT JOIN HJGL_BS_JointType AS JointType ON JointType.JOTY_ID=JointInfo.JOTY_ID +LEFT JOIN DBO.HJGL_BO_Batch AS Batch ON Batch.BatchId = BatchDetail.BatchId +LEFT JOIN dbo.Base_Project project ON project.ProjectId=JointInfo.ProjectId +LEFT JOIN dbo.HJGL_BS_Steel AS Steel ON Steel.STE_ID = JointInfo.STE_ID +LEFT JOIN DBO.HJGL_BS_Welder AS Welder1 ON Welder1.WED_ID = JointInfo.JOT_CellWelder +LEFT JOIN DBO.HJGL_BS_Welder AS Welder2 ON Welder2.WED_ID = JointInfo.JOT_FloorWelder +LEFT JOIN DBO.HJGL_BO_WeldReportMain AS WeldReportMain ON WeldReportMain.DReportID = JointInfo.DReportID +LEFT JOIN dbo.HJGL_BS_NDTRate AS NDTRate ON NDTRate.NDTR_ID = JointInfo.NDTR_ID +LEFT JOIN dbo.HJGL_BS_IsoClass AS IsoClass ON IsoClass.ISC_ID =IsoInfo.ISC_ID +LEFT JOIN dbo.HJGL_BS_Service AS Ser ON Ser.SER_ID = IsoInfo.SER_ID +LEFT JOIN HJGL_BS_WeldMaterial AS WeldMat ON WeldMat.WMT_ID=JointInfo.JOT_WeldMat +LEFT JOIN HJGL_BS_WeldMaterial AS WeldSilk ON WeldSilk.WMT_ID=JointInfo.JOT_WeldSilk + +WHERE (JointInfo.ProjectId=@projectId OR @projectId IS NULL) + AND ((CASE WHEN @ndtType='RT' THEN JointInfo.RT_TrustCode + WHEN @ndtType='PT' THEN JointInfo.PT_TrustCode + WHEN @ndtType='MT' THEN JointInfo.MT_TrustCode + WHEN @ndtType='UT' THEN JointInfo.UT_TrustCode + WHEN @ndtType='PAUT' THEN JointInfo.PAUT_TrustCode END) IS NOT NULL OR @ndtType IS NULL) + AND ((CASE WHEN @ndtType='RT' AND @ndtResult IS NOT NULL THEN JointInfo.RT_States + WHEN @ndtType='PT' AND @ndtResult IS NOT NULL THEN JointInfo.PT_States + WHEN @ndtType='MT' AND @ndtResult IS NOT NULL THEN JointInfo.MT_States + WHEN @ndtType='UT' AND @ndtResult IS NOT NULL THEN JointInfo.UT_States + WHEN @ndtType='PAUT' AND @ndtResult IS NOT NULL THEN JointInfo.PAUT_States END) =@ndtResult OR @ndtResult IS NULL) +AND ((case when JointInfo.DReportID IS NOT NULL then '1' else '2' end)=@Welded OR @Welded IS NULL) +AND (IsoInfo.ISO_IsoNo =@iso_isoNo OR @iso_isoNo IS NULL) +AND (((SELECT TOP 1 TrustDate from dbo.HJGL_CH_HotProessTrustItem a + WHERE a.JOT_ID=BatchDetail.JOT_ID and (a.ProessTypes='4' OR a.ProessTypes='5')) IS NOT NULL + AND @isHotPress=1) OR @isHotPress IS NULL) +ORDER BY project.ProjectCode,IsoInfo.ISO_IsoNo,JointInfo.JOT_JointNo + + + + + +GO + + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/HJGLData.aspx b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/HJGLData.aspx index 83cf4a7..9676e81 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/HJGLData.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/HJGLData.aspx @@ -226,6 +226,10 @@ SortField="HotProessTrustDate" FieldType="Date" Renderer="Date" HeaderTextAlign="Center" RendererArgument="yyyy-MM-dd" TextAlign="Center" Width="120px"> + +