Merge branch 'master' of https://gitee.com/frane-yang/SGGL_SeDin_New
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
|
||||
|
||||
ALTER VIEW [dbo].[View_HJGL_WeldingTask]
|
||||
AS
|
||||
SELECT T.WeldTaskId,T.WeldJointId,T.CoverWelderId,T.BackingWelderId,
|
||||
cov.WelderCode AS CoverWelderCode,back.WelderCode AS BackingWelderCode,
|
||||
case when jot.JointAttribute is not null then jot.JointAttribute else T.JointAttribute end as JointAttribute,
|
||||
T.WeldingMode,T.ProjectId,T.UnitWorkId,T.UnitId,T.TaskDate,T.Tabler,T.TableDate,
|
||||
jot.WeldJointCode,jot.Dia,jot.DNDia, jot.Thickness,jot.Size,jot.WeldingLocationId,
|
||||
CASE WHEN jot.WeldingDailyId IS NULL THEN '·ñ' ELSE 'ÊÇ' END AS IsWelding,
|
||||
P.PipelineCode,B.WeldTypeCode,M.WeldingMethodCode,L.WeldingLocationCode,
|
||||
t.CanWelderCode,t.CanWelderId ,rod.ConsumablesName AS WeldingRodCode,T.CanWeldingRodName,T.CanWeldingWireName,
|
||||
wire.ConsumablesName AS WeldingWireCode,jot.WeldingDailyId,p.PipeArea,
|
||||
(case when charindex('/',jot.WeldJointCode)>0
|
||||
then RIGHT(jot.WeldJointCode,CHARINDEX('/',REVERSE(jot.WeldJointCode))-1)
|
||||
else jot.WeldJointCode end) as WeldJointNum
|
||||
from HJGL_WeldTask T
|
||||
left join HJGL_WeldJoint jot on T.WeldJointId=jot.WeldJointId
|
||||
LEFT JOIN dbo.SitePerson_Person cov ON cov.PersonId=t.CoverWelderId
|
||||
LEFT JOIN dbo.SitePerson_Person back ON back.PersonId=t.BackingWelderId
|
||||
LEFT join HJGL_Pipeline P on jot.PipelineId=P.PipelineId
|
||||
left join Base_WeldType B on jot.WeldTypeId=B.WeldTypeId
|
||||
LEFT join Base_WeldingMethod M on jot.WeldingMethodId=M.WeldingMethodId
|
||||
left join Base_WeldingLocation L on jot.WeldingLocationId=L.WeldingLocationId
|
||||
LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire
|
||||
LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
Reference in New Issue
Block a user