焊接修改

This commit is contained in:
2025-05-08 18:38:55 +08:00
parent 23f7bfbb1d
commit 3a36b8e3ef
38 changed files with 3717 additions and 341 deletions
@@ -0,0 +1,101 @@
ALTER VIEW [dbo].[View_Batch_BatchTrustItem]
AS
/********无损委托********/
SELECT
ROW_NUMBER() OVER(ORDER BY WeldJointCode) AS Number,
BatchTrustItem.TrustBatchItemId,
BatchTrustItem.TrustBatchId,
BatchTrustItem.PointBatchItemId,
BatchTrustItem.WeldJointId,
BatchTrustItem.CreateDate,
BatchTrustItem.TrustNum,
BatchTrust.TrustType,
BatchTrustItem.RepairNum,
BatchTrust.TrustBatchCode, --委托单号
BatchTrust.ProjectId,
UnitWork.UnitWorkCode, --单位工程
pipe.PipelineCode, --管线号
pipingClass.PipingClassCode, --管线等级
jot.WeldJointCode+isnull((select top 1 RepairMark from [dbo].[HJGL_RepairRecord] where [WeldJointId]=BatchTrustItem.WeldJointId and RepairRecordId=BatchTrustItem.RepairRecordId),'')+(case when PointBatchItem.PointState='2' then 'K' else '' end) as WeldJointCode, --焊口号
mat.MaterialCode, --材质
jot.JointArea, --焊接区域
welder.WelderCode AS WelderCode, --焊工号
weldType.WeldTypeCode, --焊缝类型
jot.Dia, --外径
jot.Size, --寸径
jot.Thickness, --壁厚
method.WeldingMethodCode, --焊接方法
rate.DetectionRateCode,
null as CheckDefects,
PointBatchItem.PointDate --点口日期
FROM dbo.HJGL_Batch_BatchTrustItem AS BatchTrustItem
LEFT JOIN dbo.HJGL_Batch_BatchTrust AS BatchTrust ON BatchTrust.TrustBatchId=BatchTrustItem.TrustBatchId
LEFT JOIN dbo.HJGL_Batch_PointBatchItem AS PointBatchItem ON PointBatchItem.PointBatchItemId=BatchTrustItem.PointBatchItemId
LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = PointBatchItem.PointBatchId
LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId = point.DetectionRateId
LEFT JOIN dbo.HJGL_WeldJoint jot ON jot.WeldJointId = BatchTrustItem.WeldJointId
LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId = jot.PipelineId
LEFT JOIN Base_PipingClass AS pipingClass ON PipingClass.PipingClassId=pipe.PipingClassId
LEFT JOIN dbo.WBS_UnitWork UnitWork ON UnitWork.UnitWorkId = BatchTrust.UnitWorkId
LEFT JOIN dbo.Base_WeldType weldType ON weldType.WeldTypeId = jot.WeldTypeId
LEFT JOIN dbo.SitePerson_Person welder ON welder.PersonId = jot.BackingWelderId and welder.ProjectId=BatchTrust.ProjectId
LEFT JOIN dbo.Base_Material mat ON mat.MaterialId = jot.Material1Id
LEFT JOIN dbo.Base_WeldingMethod method ON method.WeldingMethodId = jot.WeldingMethodId
GO
ALTER VIEW [dbo].[View_GenerateTrustItem]
AS
SELECT point.ProjectId,point.UnitWorkId ,point.UnitId,point.DetectionTypeId,point.DetectionRateId,
--上面是条件
pipe.PipelineCode, --管线号
pipingClass.PipingClassCode, --管线等级
jot.WeldJointCode+isnull((select RepairMark from [dbo].[HJGL_RepairRecord] where [WeldJointId]=trustItem.WeldJointId),'')+(case when pointItem.PointState='2' then 'K' else '' end) as WeldJointCode, --焊口号
mat.MaterialCode, --材质
jot.JointArea, --焊接区域
welder.WelderCode AS WelderCode, --焊工号
weldType.WeldTypeCode, --焊缝类型
jot.Dia, --外径
jot.Size, --寸径
jot.Thickness, --壁厚
method.WeldingMethodCode, --焊接方法
rate.DetectionRateCode,
pointItem.PointDate, --点口日期
pointItem.PointBatchItemId,pointItem.PointBatchId,pointItem.WeldJointId
FROM dbo.HJGL_Batch_PointBatchItem pointItem
LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = pointItem.PointBatchId
LEFT JOIN dbo.HJGL_WeldJoint jot ON jot.WeldJointId = pointItem.WeldJointId
LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId = jot.PipelineId
LEFT JOIN Base_PipingClass AS pipingClass ON PipingClass.PipingClassId=pipe.PipingClassId
LEFT JOIN dbo.HJGL_Batch_BatchTrustItem trustItem ON trustItem.PointBatchItemId = pointItem.PointBatchItemId
LEFT JOIN dbo.Base_Material mat ON mat.MaterialId = jot.Material1Id
LEFT JOIN dbo.Base_WeldType weldType ON weldType.WeldTypeId = jot.WeldTypeId
LEFT JOIN dbo.SitePerson_Person welder ON welder.PersonId = jot.BackingWelderId and welder.ProjectId=point.ProjectId
LEFT JOIN dbo.Base_WeldingMethod method ON method.WeldingMethodId = jot.WeldingMethodId
LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId = point.DetectionRateId
WHERE pointItem.PointState IS NOT NULL AND pointItem.CutDate IS NULL
AND trustItem.TrustBatchItemId IS NULL
GO
@@ -0,0 +1,96 @@
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('EEC0D060-C15E-4D25-B015-C2B91F735DAC','车次管理','HJGL/PreDesign/TrainNumberManager.aspx',40,'1E36EA73-D536-4215-BFB9-A8771937BD89','Menu_HJGL',0,1,1)
GO
/*'车次管理*/
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('75ED227C-3DB8-4F6D-8AC3-B0B3FD8D21AC','EEC0D060-C15E-4D25-B015-C2B91F735DAC','增加',1)
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('B4295318-92C4-4072-9F30-6E50CB2E007D','EEC0D060-C15E-4D25-B015-C2B91F735DAC','修改',2)
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('35D1601D-ED59-4C0B-8069-178B2780310E','EEC0D060-C15E-4D25-B015-C2B91F735DAC','保存',3)
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('99A2A6C8-A679-4FAF-942C-B663BFE9B9D9','EEC0D060-C15E-4D25-B015-C2B91F735DAC','查看',4)
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('DC684D40-EE08-4689-A2D1-73AC4EB04B60','EEC0D060-C15E-4D25-B015-C2B91F735DAC','删除',5)
GO
alter table dbo.HJGL_PackagingManage
add TypeInt int
go
create table dbo.HJGL_PackagingManageDetail
(
Id nvarchar(50) not null
constraint HJGL_PackagingManageDetail_pk
primary key,
PackagingManageId nvarchar(50),
PipelineId nvarchar(50),
PipelineComponentId nvarchar(50),
MaterialCode nvarchar(50),
Number decimal(9, 2),
CreateTime datetime,
CreateUser nvarchar(50),
)
create table dbo.HJGL_TrainNumberManage
(
Id nvarchar(50) not null
constraint PK_HJGL_TrainNumberManage
primary key,
TrainNumber nvarchar(50),
ProjectId nvarchar(50),
State int,
DriverName nvarchar(50),
DriverPhone nvarchar(50),
LicensePlateNumber nvarchar(50),
ContactName nvarchar(50),
ContactPhone nvarchar(50),
Remark nvarchar(800),
)
go
exec sp_addextendedproperty 'MS_Description', N'主键', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
'Id'
go
exec sp_addextendedproperty 'MS_Description', N'驾驶员姓名', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
'DriverName'
go
exec sp_addextendedproperty 'MS_Description', N'驾驶员电话', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
'DriverPhone'
go
exec sp_addextendedproperty 'MS_Description', N'车牌号', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
'LicensePlateNumber'
go
exec sp_addextendedproperty 'MS_Description', N'联系人姓名', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
'ContactName'
go
exec sp_addextendedproperty 'MS_Description', N'联系人电话', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
'ContactPhone'
go
exec sp_addextendedproperty 'MS_Description', N'车次', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
'TrainNumber'
go
exec sp_addextendedproperty 'MS_Description', N'项目id', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
'ProjectId'
go
exec sp_addextendedproperty 'MS_Description', N'状态', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
'State'
go
exec sp_addextendedproperty 'MS_Description', N'备注', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage', 'COLUMN',
'Remark'
go
exec sp_addextendedproperty 'MS_Description', N'车次管理表', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_TrainNumberManage'
go
alter table dbo.HJGL_PackagingManage
add TrainNumberId varchar(50)
go
alter table dbo.HJGL_PackagingManage
add TypeInt int
go
exec sp_addextendedproperty 'MS_Description', N'车次管理主键id', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_PackagingManage',
'COLUMN', 'TrainNumberId'
go
exec sp_addextendedproperty 'MS_Description', N'包装类别', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_PackagingManage',
'COLUMN', 'TypeInt'
go
@@ -128,6 +128,16 @@ GO
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('41655145-E541-42A6-B975-4CF2B19DA31D','F18CFC0E-47E0-477A-9AB3-72B88D438299','查看',4)
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('5D69F8CE-44D4-44D7-9C52-4A379B894D38','F18CFC0E-47E0-477A-9AB3-72B88D438299','删除',5)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('EEC0D060-C15E-4D25-B015-C2B91F735DAC','车次管理','HJGL/PreDesign/TrainNumberManager.aspx',40,'1E36EA73-D536-4215-BFB9-A8771937BD89','Menu_HJGL',0,1,1)
GO
/*'包装管理*/
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('75ED227C-3DB8-4F6D-8AC3-B0B3FD8D21AC','EEC0D060-C15E-4D25-B015-C2B91F735DAC','增加',1)
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('B4295318-92C4-4072-9F30-6E50CB2E007D','EEC0D060-C15E-4D25-B015-C2B91F735DAC','修改',2)
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('35D1601D-ED59-4C0B-8069-178B2780310E','EEC0D060-C15E-4D25-B015-C2B91F735DAC','保存',3)
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('99A2A6C8-A679-4FAF-942C-B663BFE9B9D9','EEC0D060-C15E-4D25-B015-C2B91F735DAC','查看',4)
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('DC684D40-EE08-4689-A2D1-73AC4EB04B60','EEC0D060-C15E-4D25-B015-C2B91F735DAC','删除',5)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('25DED954-10C9-47CC-99F2-C44FDE9E0A81','包装管理','HJGL/PreDesign/PackagingManage.aspx',40,'1E36EA73-D536-4215-BFB9-A8771937BD89','Menu_HJGL',0,1,1)
GO