20260518 黄金口台账
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule)
|
||||
values('142E6B0B-530E-448B-84C5-1A93E0316E3B','뼝쏜(툭庫)보왯꼼醴섟쇱꿎횅훰깊','HJGL/WeldingReport/GoldMouthLedger.aspx',240,'F3B157B7-9BEE-4150-6666-087828F1C51D','3')
|
||||
go
|
||||
|
||||
|
||||
CREATE PROCEDURE [dbo].[HJGL_rpt_GoldMouthLedger]
|
||||
(
|
||||
@projectId NVARCHAR(50) = null
|
||||
)
|
||||
AS
|
||||
/**********뼝쏜(툭庫)보왯꼼醴섟쇱꿎횅훰깊***************/
|
||||
SELECT jointInfo.JOT_ID,
|
||||
jointInfo.ProjectId,
|
||||
jointInfo.ISO_ID,
|
||||
isoInfo.ISO_IsoNo,
|
||||
jointInfo.JOT_JointNo,
|
||||
(case when Steel.STE_Code is not null
|
||||
then (case when Steel2.STE_Code is not null and Steel.STE_Code<>Steel2.STE_Code
|
||||
then Steel.STE_Code+'/'+Steel2.STE_Code
|
||||
else Steel.STE_Code end)
|
||||
else Steel2.STE_Code end) as SteelCode,--꼼醴
|
||||
null as OldIsoNo,--툭庫(일)밗돛밗窟긍뵀
|
||||
null as OldSteelCode,--툭庫(일)밗돛꼼醴
|
||||
(case when Welder.WED_Code is not null
|
||||
then (case when FloorWelder.WED_Code is not null and Welder.WED_Code<>FloorWelder.WED_Code
|
||||
then Welder.WED_Code+'/'+FloorWelder.WED_Code
|
||||
else Welder.WED_Code end)
|
||||
else FloorWelder.WED_Code end) as WelderCode, --보묏뵀
|
||||
(CASE WHEN JointInfo.Jot_WeldingDate IS NOT NULL THEN JointInfo.Jot_WeldingDate
|
||||
ELSE WeldReportMain.JOT_WeldDate END) AS JOT_WeldDate, --보쌈휑퍅
|
||||
ndt.NDT_Code,--쇱꿎렘랬
|
||||
(case when jointInfo.RT_States is not null and jointInfo.RT_States!='덤路쇱' then jointInfo.RT_States
|
||||
else (case when jointInfo.PT_States is not null and jointInfo.PT_States!='덤路쇱' then jointInfo.PT_States
|
||||
else (case when jointInfo.MT_States is not null and jointInfo.MT_States!='덤路쇱' then jointInfo.MT_States
|
||||
else (case when jointInfo.UT_States is not null and jointInfo.UT_States!='덤路쇱' then jointInfo.UT_States
|
||||
else null end)end) end) end) as TestStates,--쇱꿎榴檄
|
||||
jointInfo.RTFeedbackDate as TestDate,--쇱꿎휑퍅
|
||||
null as ConfirmMan,--횅훰훙
|
||||
jointType.JOTY_Group,
|
||||
jointInfo.Sort1,
|
||||
jointInfo.Sort2,
|
||||
jointInfo.Sort3,
|
||||
jointInfo.Sort4,
|
||||
jointInfo.Sort5,
|
||||
jointInfo.JOT_Remark
|
||||
FROM HJGL_PW_JointInfo AS jointInfo
|
||||
LEFT JOIN HJGL_PW_IsoInfo AS isoInfo ON isoInfo.ISO_ID = jointInfo.ISO_ID
|
||||
LEFT JOIN HJGL_BS_JointType AS jointType ON jointType.JOTY_ID=jointInfo.JOTY_ID
|
||||
LEFT JOIN HJGL_BS_Steel AS Steel ON Steel.STE_ID=jointInfo.STE_ID
|
||||
LEFT JOIN HJGL_BS_Steel AS Steel2 ON Steel2.STE_ID=jointInfo.STE_ID2
|
||||
LEFT JOIN HJGL_BS_Welder AS Welder ON Welder.WED_ID= jointInfo.JOT_CellWelder
|
||||
LEFT JOIN HJGL_BS_Welder AS FloorWelder ON FloorWelder.WED_ID=jointInfo.JOT_FloorWelder
|
||||
LEFT JOIN HJGL_BO_WeldReportMain AS WeldReportMain ON WeldReportMain.DReportID=jointInfo.DReportID
|
||||
LEFT JOIN HJGL_BO_BatchDetail AS batchDetail on batchDetail.JOT_ID = jointInfo.JOT_ID
|
||||
LEFT JOIN HJGL_BS_NDTType AS ndt ON ndt.NDT_ID = batchDetail.NDT
|
||||
WHERE IsGold=1
|
||||
and (jointInfo.ProjectId=@projectId or @projectId is null)
|
||||
GO
|
||||
Reference in New Issue
Block a user