2023-10-27

This commit is contained in:
2023-10-27 17:46:32 +08:00
parent e46a7ad179
commit 65a5fdae3e
16 changed files with 268 additions and 50 deletions
@@ -0,0 +1,57 @@
Alter VIEW [dbo].[View_HJGL_Batch_PointBatchItem]
AS
/*************点口明细表*************/
SELECT PointBatchItem.PointBatchItemId,
PointBatchItem.PointBatchId,
PointBatch.ProjectId,
PointBatch.UnitId,
PointBatch.DetectionTypeId,
PointBatch.PointBatchCode,
Pipeline.UnitWorkId,
PointBatchItem.WeldJointId,
(CASE PointBatchItem.PointState WHEN '1' THEN '点口' WHEN '2' THEN '扩透' END) AS PointState,
(CASE PointBatchItem.IsBuildTrust WHEN 1 THEN '' ELSE '' END) AS IsBuildTrust,
(CASE WHEN PointBatchItem.IsAudit=1 THEN ''
WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NOT NULL THEN ''
WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NULL THEN '' END) AS PointIsAudit,
PointBatchItem.PointDate,--点口日期
(CASE PointBatchItem.IsWelderFirst WHEN 1 THEN '' ELSE '' END) AS IsWelderFirst,
PointBatchItem.RepairDate,--返修日期
PointBatchItem.RepairRecordId,
PointBatchItem.CutDate,--切除日期
PointBatchItem.PBackingWelderId,--返修打底焊工
PointBatchItem.PCoverWelderId,--返修盖面焊工
UnitWork.UnitWorkCode,--工区号
WeldJoint.WeldJointCode,--焊口号
WeldJoint.BackingWelderId AS WelderId, --焊工ID
BackingWelder.WelderCode AS BackingWelderCode,
CoverWelder.WelderCode AS CoverWelderCode,
WeldType.WeldTypeCode,
WeldJoint.JointAttribute,
WeldJoint.JointArea,--焊接区域
WeldJoint.Size,--实际寸径
WeldingDaily.WeldingDate,--焊接日期
WeldJoint.PipelineId, --管线ID
WeldJoint.Material1Id AS Mat, --材质
WeldJoint.Specification, --规格
Pipeline.PipelineCode, --管线号
PipingClass.PipingClassName , --管道等级
WeldJoint.BackingWelderId,
WeldJoint.CoverWelderId
FROM dbo.HJGL_Batch_PointBatchItem AS PointBatchItem
LEFT JOIN dbo.HJGL_Batch_PointBatch AS PointBatch ON PointBatch.PointBatchId=PointBatchItem.PointBatchId
LEFT JOIN dbo.HJGL_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=PointBatchItem.WeldJointId
LEFT JOIN dbo.HJGL_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId
LEFT JOIN dbo.WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId=Pipeline.UnitWorkId
LEFT JOIN dbo.HJGL_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=WeldJoint.WeldingDailyId
LEFT JOIN dbo.Base_PipingClass AS PipingClass ON PipingClass.PipingClassId=Pipeline.PipingClassId
LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=WeldJoint.BackingWelderId
LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=WeldJoint.CoverWelderId
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=WeldJoint.WeldTypeId
LEFT JOIN HJGL_Hard_TrustItem HardTrustItem ON HardTrustItem.WeldJointId=PointBatchItem.WeldJointId
where (WeldJoint.IsHotProess!=1 or (WeldJoint.IsHotProess=1 and HardTrustItem.IsPass=1))
and BackingWelder.ProjectId=Pipeline.ProjectId and CoverWelder.ProjectId=Pipeline.ProjectId
go
@@ -170,25 +170,26 @@ INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOff
VALUES ( N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'价格体系',30,N'0',N'Menu_PHTGL',0,0,1)
GO
INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
VALUES ( N'C8C719BC-450F-43AB-B17F-AB5DECD83E17',N'土建',10,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
VALUES ( N'C8C719BC-450F-43AB-B17F-AB5DECD83E17',N'土建工程',10,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
VALUES ( N'BBA09E69-5017-411C-A516-64D0140AF70E',N'工艺',20,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
VALUES ( N'BBA09E69-5017-411C-A516-64D0140AF70E',N'钢结构预制工程',20,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
VALUES ( N'999FCA97-E28A-46FA-9293-0399D1172AC9',N'电气',30,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
VALUES ( N'999FCA97-E28A-46FA-9293-0399D1172AC9',N'工艺管道安装工程',30,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
VALUES ( N'838ED633-B375-4937-A4E1-F95FCCF640A0',N'仪表',40,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
VALUES ( N'838ED633-B375-4937-A4E1-F95FCCF640A0',N'工艺设备安装工程',40,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
VALUES ( N'AD5C7CBB-310D-4D15-9AFF-530BF765F460',N'给排水',50,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
VALUES ( N'AD5C7CBB-310D-4D15-9AFF-530BF765F460',N'非标设备现场制作安装工程',50,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
VALUES ( N'0141B1F4-970A-4C23-B58A-BDF0785CA96E',N'暖通',60,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
VALUES ( N'0141B1F4-970A-4C23-B58A-BDF0785CA96E',N'电仪安装工程',60,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
VALUES ( N'8A1D2885-2584-44AD-A4DD-ED3F98198C8A',N'防腐保温',70,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
VALUES ( N'8A1D2885-2584-44AD-A4DD-ED3F98198C8A',N'水暖安装工程',70,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
VALUES ( N'48216E20-7103-48AB-A12F-237E28605952',N'消防电信',80,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
VALUES ( N'48216E20-7103-48AB-A12F-237E28605952',N'防腐绝热工程',80,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
VALUES ( N'5EB73242-63F0-402C-A42B-2BCDC0AC2229',N'临建设施',90,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
VALUES ( N'5EB73242-63F0-402C-A42B-2BCDC0AC2229',N'无损检测工程',90,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
VALUES ( N'2A5A325E-C3C2-4412-9F5D-FB9185E9EB9B',N'消防工程',100,N'7D8CF5B4-B945-4254-B134-4ABF55255497',N'Menu_PHTGL',0,1,1)
GO
INSERT [Sys_Menu] ([MenuId],[MenuName],[SortIndex],[SuperMenu],[MenuType],[IsOffice],[IsEnd],[IsUsed])
VALUES ( N'73B84D49-940A-42DF-AC14-F4C75E10EC39',N'合同执行跟踪',40,N'0',N'Menu_PHTGL',0,0,1)
GO