2023-04-04 001
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
insert into Sys_ButtonToMenu values('83D0D6F5-402A-4F6F-9423-37DBB6693164','0CA58EC2-7934-49B3-A2C3-327FAD27C541','生成委托单','5')
|
||||
/****** Object: View [dbo].[View_HJGL_NoWeldJointFind] Script Date: 2023/4/3 16:14:26 ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
|
||||
ALTER VIEW [dbo].[View_HJGL_NoWeldJointFind]
|
||||
AS
|
||||
--未焊焊口查找
|
||||
SELECT jot.WeldJointId,
|
||||
jot.WeldJointCode,
|
||||
(case when charindex('/',jot.WeldJointCode)>0
|
||||
then RIGHT(jot.WeldJointCode,CHARINDEX('/',REVERSE(jot.WeldJointCode))-1)
|
||||
else jot.WeldJointCode end) as WeldJointNum,
|
||||
jot.PipelineId,
|
||||
jot.WeldingDailyId,
|
||||
jot.JointAttribute,
|
||||
jot.Dia,
|
||||
jot.DNDia,
|
||||
jot.Size,
|
||||
jot.Thickness,
|
||||
jot.Remark,
|
||||
WeldType.WeldTypeCode,
|
||||
method.WeldingMethodCode,
|
||||
rod.ConsumablesCode AS WeldingRodCode,
|
||||
wire.ConsumablesCode AS WeldingWireCode,
|
||||
mat1.MaterialCode AS Material1Code ,
|
||||
mat2.MaterialCode AS Material2Code
|
||||
FROM dbo.HJGL_WeldJoint jot
|
||||
LEFT JOIN dbo.HJGL_PreWeldingDaily pre ON pre.WeldJointId = jot.WeldJointId
|
||||
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=jot.WeldTypeId
|
||||
LEFT JOIN Base_WeldingMethod AS method ON method.WeldingMethodId=jot.WeldingMethodId
|
||||
LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = jot.Material1Id
|
||||
LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = jot.Material2Id
|
||||
LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire
|
||||
LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod
|
||||
WHERE pre.PreWeldingDailyId IS NULL
|
||||
and jot.WeldJointId not in (select WeldJointId from HJGL_WeldJoint where IsTwoJoint = 1 and (AuditDate is null or AuditDate=''))
|
||||
GO
|
||||
|
||||
|
||||
Reference in New Issue
Block a user