11212121
This commit is contained in:
parent
75d5c6cab5
commit
25ead805f1
|
@ -77,6 +77,7 @@ CoverWelder.WelderName AS CoverWelderName,
|
|||
pipingClass.PipingClassCode,pip.PIPClassCode,
|
||||
CONVERT(VARCHAR(100), WeldingDaily.WeldingDate, 23) AS WeldingDate,
|
||||
WeldJoint.IsCancel,
|
||||
WeldJoint.IsPMI,
|
||||
WeldJoint.IsGoldJoint,
|
||||
WeldJoint.WPQId,wps.WPQCode,
|
||||
WeldJoint.DetectionType,
|
||||
|
@ -212,4 +213,70 @@ INSERT INTO [dbo].[Template_Files]([id],[title],[filePath],[SortIndex])
|
|||
VALUES('95125974-3DD4-4E16-B4F0-A9D9C9A1406D','밗돛보쌈쌈庫PMI쇱꿎궐절횅훰깊','',25)
|
||||
GO
|
||||
|
||||
-- PMI处理委托
|
||||
create table PMI_Delegation
|
||||
(
|
||||
Id nvarchar(50) not null primary key,
|
||||
DelegationNo nvarchar(50) not null,
|
||||
DelegationDate datetime,
|
||||
ProjectId nvarchar(50) not null,
|
||||
InstallationId nvarchar(50),
|
||||
UnitId nvarchar(50),
|
||||
DetectionStandard nvarchar(50),
|
||||
Remark nvarchar(255),
|
||||
CreatedTime datetime default getdate()
|
||||
)
|
||||
go
|
||||
---- PMI处理委托 明细
|
||||
create table PMI_DelegationDetails
|
||||
(
|
||||
Id nvarchar(50) not null primary key,
|
||||
PMIId nvarchar(50) not null,
|
||||
JointId nvarchar(50) not null,
|
||||
QualityNo nvarchar(255),
|
||||
Acceptance nvarchar(255),
|
||||
Status int not null,
|
||||
CreatedTime datetime default getdate()
|
||||
)
|
||||
go
|
||||
|
||||
-- 管线焊工 增加是否 PMI处理
|
||||
alter table Pipeline_WeldJoint add isPMI bit null
|
||||
update Pipeline_WeldJoint set isPMI=0
|
||||
-- 插入PMI委托菜单
|
||||
insert into Sys_Menu values('A6FB44C3-0920-4F77-862F-D814FD5E5D23','PMI检测管理','PMI detection management','',21,0,3,NUll,1)
|
||||
insert into Sys_Menu values(NEWID(),'PMI委托','PMI delegation','/WeldingProcess/PMI/PMIDelegation.aspx',0,'A6FB44C3-0920-4F77-862F-D814FD5E5D23',3,NULL,1)
|
||||
insert into Sys_Menu values(NEWID(),'PMI检测录入','PMI detection entry','/WeldingProcess/PMI/PMIDetectionEntry.aspx',0,'A6FB44C3-0920-4F77-862F-D814FD5E5D23',3,NULL,1)
|
||||
|
||||
|
||||
/*******PMI委托明细视图***********/
|
||||
CREATE VIEW [dbo].[View_PMI_DelegationDetails]
|
||||
AS
|
||||
|
||||
SELECT
|
||||
B.PMIId,
|
||||
B.JointId,
|
||||
B.QualityNo,
|
||||
B.Acceptance,
|
||||
B.CreatedTime,
|
||||
B.status,
|
||||
Pipeline.PipelineCode,
|
||||
WeldJoint.WeldJointCode,
|
||||
WeldJoint.Specification,
|
||||
WeldJoint.Remark,
|
||||
Pipeline.SingleNumber,
|
||||
(CASE WHEN WeldJoint.CoverWelderCode IS NOT NULL AND WeldJoint.BackingWelderCode IS NOT NULL
|
||||
THEN WeldJoint.CoverWelderCode + '/' + WeldJoint.BackingWelderCode
|
||||
ELSE (ISNULL(WeldJoint.CoverWelderCode,'') + ISNULL(WeldJoint.BackingWelderCode,'')) END) AS WelderCode, --焊工
|
||||
(CASE WHEN WeldJoint.Material1Code IS NOT NULL AND WeldJoint.Material2Code IS NOT NULL
|
||||
THEN WeldJoint.Material1Code + '/' + WeldJoint.Material2Code
|
||||
ELSE (ISNULL(WeldJoint.Material1Code,'') + ISNULL(WeldJoint.Material2Code,'')) END) AS MaterialCode --材质
|
||||
FROM PMI_Delegation AS A INNER JOIN
|
||||
PMI_DelegationDetails AS B ON A.Id=B.PMIId
|
||||
LEFT JOIN View_Pipeline_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=B.JointId
|
||||
LEFT JOIN Pipeline_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
use HJGLDB_ZJBSF
|
||||
go
|
||||
create table PMI_Delegation
|
||||
(
|
||||
Id nvarchar(50) not null primary key,
|
||||
DelegationNo nvarchar(50) not null,
|
||||
DelegationDate datetime,
|
||||
ProjectId nvarchar(50) not null,
|
||||
InstallationId nvarchar(50),
|
||||
UnitId nvarchar(50),
|
||||
DetectionStandard nvarchar(50),
|
||||
Remark nvarchar(255),
|
||||
CreatedTime datetime default getdate()
|
||||
)
|
||||
go
|
||||
create table PMI_DelegationDetails
|
||||
(
|
||||
Id nvarchar(50) not null primary key,
|
||||
PMIId nvarchar(50) not null,
|
||||
JointId nvarchar(50) not null,
|
||||
QualityNo nvarchar(255),
|
||||
Acceptance nvarchar(255),
|
||||
Status int not null,
|
||||
CreatedTime datetime default getdate()
|
||||
)
|
||||
go
|
||||
|
||||
-- 管线焊工 增加是否 PMI处理
|
||||
alter table Pipeline_WeldJoint add isPMI bit null
|
||||
update Pipeline_WeldJoint set isPMI=0
|
||||
-- 插入PMI委托菜单
|
||||
insert into Sys_Menu values('A6FB44C3-0920-4F77-862F-D814FD5E5D23','PMI检测管理','PMI detection management','',21,0,3,NUll,1)
|
||||
insert into Sys_Menu values(NEWID(),'PMI委托','PMI delegation','/WeldingProcess/PMI/PMIDelegation.aspx',0,'A6FB44C3-0920-4F77-862F-D814FD5E5D23',3,NULL,1)
|
||||
insert into Sys_Menu values(NEWID(),'PMI检测录入','PMI detection entry','/WeldingProcess/PMI/PMIDetectionEntry.aspx',0,'A6FB44C3-0920-4F77-862F-D814FD5E5D23',3,NULL,1)
|
||||
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[View_PMI_DelegationDetails]
|
||||
AS
|
||||
/*******硬度委托明细***********/
|
||||
SELECT
|
||||
B.PMIId,
|
||||
B.JointId,
|
||||
B.QualityNo,
|
||||
B.Acceptance,
|
||||
B.CreatedTime,
|
||||
B.status,
|
||||
Pipeline.PipelineCode,
|
||||
WeldJoint.WeldJointCode,
|
||||
WeldJoint.Specification,
|
||||
WeldJoint.Remark,
|
||||
Pipeline.SingleNumber,
|
||||
(CASE WHEN WeldJoint.CoverWelderCode IS NOT NULL AND WeldJoint.BackingWelderCode IS NOT NULL
|
||||
THEN WeldJoint.CoverWelderCode + '/' + WeldJoint.BackingWelderCode
|
||||
ELSE (ISNULL(WeldJoint.CoverWelderCode,'') + ISNULL(WeldJoint.BackingWelderCode,'')) END) AS WelderCode, --焊工
|
||||
(CASE WHEN WeldJoint.Material1Code IS NOT NULL AND WeldJoint.Material2Code IS NOT NULL
|
||||
THEN WeldJoint.Material1Code + '/' + WeldJoint.Material2Code
|
||||
ELSE (ISNULL(WeldJoint.Material1Code,'') + ISNULL(WeldJoint.Material2Code,'')) END) AS MaterialCode --材质
|
||||
FROM PMI_Delegation AS A INNER JOIN
|
||||
PMI_DelegationDetails AS B ON A.Id=B.PMIId
|
||||
LEFT JOIN View_Pipeline_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=B.JointId
|
||||
LEFT JOIN Pipeline_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId
|
||||
|
||||
GO
|
||||
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
USE [HJGLDB_ZJBSF]
|
||||
GO
|
||||
|
||||
/****** Object: View [dbo].[View_Pipeline_WeldJoint] Script Date: 2024-5-11 14:44:42 ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
ALTER VIEW [dbo].[View_Pipeline_WeldJoint]
|
||||
AS
|
||||
/************焊口信息视图*****************/
|
||||
SELECT WeldJoint.WeldJointId,
|
||||
WeldJoint.ProjectId,
|
||||
WeldJoint.PipelineId,
|
||||
WeldJoint.WeldJointCode,
|
||||
dbo.Fun_GetParseInt(WeldJoint.WeldJointCode) AS ConvertWeldJoint,
|
||||
WeldJoint.WeldTypeId,
|
||||
WeldJoint.Material1Id,
|
||||
WeldJoint.Material2Id,
|
||||
WeldJoint.ANSISCH,
|
||||
WeldJoint.Thickness,
|
||||
WeldJoint.Dia,
|
||||
WeldJoint.Size,
|
||||
WeldJoint.JointAttribute,
|
||||
WeldJoint.JointArea,
|
||||
WeldJoint.WeldingMethodId,
|
||||
WeldJoint.IsHotProess,
|
||||
WeldJoint.WeldingLocationId,
|
||||
WeldJoint.WeldMatId,
|
||||
WeldJoint.WeldSilkId,
|
||||
WeldJoint.GrooveTypeId,
|
||||
WeldJoint.PipeSegment,
|
||||
WeldJoint.PipeAssembly1Id,
|
||||
WeldJoint.PipeAssembly2Id,
|
||||
WeldJoint.PipeAssemblyCount,
|
||||
WeldJoint.HeartNo1,
|
||||
WeldJoint.HeartNo2,
|
||||
WeldJoint.LastTemp,
|
||||
WeldJoint.CellTemp,
|
||||
WeldJoint.PrepareTemp,
|
||||
WeldJoint.Electricity,
|
||||
WeldJoint.SystemNumber,
|
||||
WeldJoint.Remark,
|
||||
WeldJoint.DoneDin,
|
||||
WeldJoint.Voltage,
|
||||
WeldJoint.TestPackageNo,
|
||||
WeldJoint.WeldingDailyCode,
|
||||
WeldJoint.WeldingDailyId,
|
||||
WeldJoint.BackingWelderId,
|
||||
WeldJoint.CoverWelderId,
|
||||
WeldJoint.PipingClassId,
|
||||
WeldJoint.Specification,
|
||||
WeldJoint.CancelResult,
|
||||
Project.ProjectCode,
|
||||
Project.ProjectName,
|
||||
Pipeline.PipelineCode,
|
||||
Pipeline.InstallationId,
|
||||
Pipeline.UnitId,
|
||||
Pipeline.SingleNumber,
|
||||
Pipeline.WorkAreaId,
|
||||
WeldType.WeldTypeCode,
|
||||
Material1.MaterialCode AS Material1Code,
|
||||
Material2.MaterialCode AS Material2Code,
|
||||
WeldingMethod.WeldingMethodCode,
|
||||
WeldingLocation.WeldingLocationCode,
|
||||
WeldMat.ConsumablesCode AS WeldMatCode,
|
||||
--WeldSilk.ConsumablesCode AS WeldSilkCode,
|
||||
'' AS WeldSilkCode,
|
||||
GrooveType.GrooveTypeCode,
|
||||
CASE WHEN WeldJoint.WeldingDailyId IS NULL THEN '否' ELSE '是' END AS Is_hjName,
|
||||
CASE WHEN WeldJoint.IsHotProess=1 THEN '是' ELSE '否' END AS IsHotProessStr,
|
||||
Components1.ComponentsCode AS ComponentsCode1,
|
||||
Components2.ComponentsCode AS ComponentsCode2,
|
||||
BackingWelder.WelderCode AS BackingWelderCode,
|
||||
BackingWelder.WelderName AS BackingWelderName,
|
||||
CoverWelder.WelderCode AS CoverWelderCode,
|
||||
CoverWelder.WelderName AS CoverWelderName,
|
||||
(CASE WHEN CoverWelder.WelderCode IS NOT NULL AND BackingWelder.WelderCode IS NOT NULL
|
||||
THEN CoverWelder.WelderCode + '/' + BackingWelder.WelderCode
|
||||
ELSE (ISNULL(CoverWelder.WelderCode,'') + ISNULL(BackingWelder.WelderCode,'')) END) AS WelderCode, --焊工
|
||||
(CASE WHEN Material1.MaterialCode IS NOT NULL AND Material2.MaterialCode IS NOT NULL
|
||||
THEN Material1.MaterialCode + '/' + Material2.MaterialCode
|
||||
ELSE (ISNULL(Material1.MaterialCode,'') + ISNULL(Material2.MaterialCode,'')) END) AS MaterialCode, --材质
|
||||
pipingClass.PipingClassCode,
|
||||
CONVERT(VARCHAR(100), WeldingDaily.WeldingDate, 23) AS WeldingDate,
|
||||
WeldJoint.IsCancel,
|
||||
WeldJoint.IsPMI,
|
||||
WeldJoint.IsGoldJoint,
|
||||
WeldJoint.WPQId,wps.WPQCode,
|
||||
WeldJoint.DetectionType,
|
||||
WeldJoint.PageNum
|
||||
FROM Pipeline_WeldJoint AS WeldJoint
|
||||
LEFT JOIN Base_Project AS Project ON Project.ProjectId=WeldJoint.ProjectId
|
||||
LEFT JOIN Pipeline_Pipeline AS Pipeline ON Pipeline.PipelineId = WeldJoint.PipelineId
|
||||
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=WeldJoint.WeldTypeId
|
||||
LEFT JOIN Base_Material AS Material1 ON Material1.MaterialId = WeldJoint.Material1Id
|
||||
LEFT JOIN Base_Material AS Material2 ON Material2.MaterialId = WeldJoint.Material2Id
|
||||
LEFT JOIN Base_WeldingMethod AS WeldingMethod ON WeldingMethod.WeldingMethodId=WeldJoint.WeldingMethodId
|
||||
LEFT JOIN Base_WeldingLocation AS WeldingLocation ON WeldingLocation.WeldingLocationId=WeldJoint.WeldingLocationId
|
||||
LEFT JOIN Base_Consumables AS WeldMat ON WeldMat.ConsumablesId=WeldJoint.WeldMatId
|
||||
--LEFT JOIN Base_Consumables AS WeldSilk ON WeldSilk.ConsumablesId=WeldJoint.WeldSilkId
|
||||
LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=WeldJoint.GrooveTypeId
|
||||
LEFT JOIN Base_Components AS Components1 ON Components1.ComponentsId = WeldJoint.PipeAssembly1Id
|
||||
LEFT JOIN Base_Components AS Components2 ON Components2.ComponentsId = WeldJoint.PipeAssembly2Id
|
||||
LEFT JOIN Welder_Welder AS BackingWelder ON BackingWelder.WelderId=WeldJoint.BackingWelderId
|
||||
LEFT JOIN Welder_Welder AS CoverWelder ON CoverWelder.WelderId=WeldJoint.CoverWelderId
|
||||
LEFT JOIN Pipeline_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=WeldJoint.WeldingDailyId
|
||||
LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=WeldJoint.PipingClassId
|
||||
LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId=WeldJoint.WPQId
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
Loading…
Reference in New Issue