diff --git a/.vs/SGGL_CWCEC/v17/.wsuo b/.vs/SGGL_CWCEC/v17/.wsuo index 7a9829f7..f82841d4 100644 Binary files a/.vs/SGGL_CWCEC/v17/.wsuo and b/.vs/SGGL_CWCEC/v17/.wsuo differ diff --git a/DataBase/版本日志/SGGLDB_WH_2023-09-07.sql b/DataBase/版本日志/SGGLDB_WH_2023-09-07.sql new file mode 100644 index 00000000..25c4a9e7 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2023-09-07.sql @@ -0,0 +1,393 @@ +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B','ҵƱ','HSSE/License/FireWork.aspx',10,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('8DB0EAED-B67D-423A-BA13-E7872A11727A','2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F0283058-2CCF-4195-AEBC-878A2AE5067F','2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('2C3CD3AA-C07D-439F-97BE-FEA20CE512CB','2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BBB22814-70D3-4188-A7F8-8C0FD4557A27','2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9','ߴҵƱ','HSSE/License/HeightWork.aspx',20,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B3CD11DC-D359-4D60-8DB4-BD095CE52C17','DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6D9B6919-0677-4892-9C73-CDD6C124B855','DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('044C6FF2-2A30-4E08-88A6-9D85722AD89C','DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7C06CD77-402A-4F8C-A41B-1C69301707E5','DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('AEC9166D-1C91-45F0-8BFE-D3D0479A28C7','޿ռҵƱ','HSSE/License/LimitedSpace.aspx',30,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('904FD3D2-1520-48FB-BD8F-6BAA000653B7','AEC9166D-1C91-45F0-8BFE-D3D0479A28C7','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7F372BE4-E264-48FB-ACA6-8E7EE41393EC','AEC9166D-1C91-45F0-8BFE-D3D0479A28C7','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BE6D9AE8-069A-421A-8E3D-F3DDC18FCDB4','AEC9166D-1C91-45F0-8BFE-D3D0479A28C7','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('8CC252A0-F098-4FE3-AF21-4A7A7030DC5E','AEC9166D-1C91-45F0-8BFE-D3D0479A28C7','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('F72FF20B-D3EB-46A5-97F7-C99B2473A140','ҵƱ','HSSE/License/RadialWork.aspx',40,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('107EA8EA-4D8D-410B-B3DE-F0C29E9C3EDC','F72FF20B-D3EB-46A5-97F7-C99B2473A140','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('89010EF9-9E77-49EB-A00D-3142B9FBC29E','F72FF20B-D3EB-46A5-97F7-C99B2473A140','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F5EFEB84-7CCC-406D-ACFA-CA36CB6A8A1D','F72FF20B-D3EB-46A5-97F7-C99B2473A140','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('982333DA-42A2-40A3-8F3D-52BA7DE4E19D','F72FF20B-D3EB-46A5-97F7-C99B2473A140','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('4E607E83-41FC-4F49-B26F-A21CFE38328F','·(ռ)ҵƱ','HSSE/License/OpenCircuit.aspx',60,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6D90E4CD-D932-454A-8A8B-54FA3CC22FD4','4E607E83-41FC-4F49-B26F-A21CFE38328F','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('53BF21A8-38DA-4853-A527-8D392B901554','4E607E83-41FC-4F49-B26F-A21CFE38328F','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('06F8CEAB-7AF8-40C5-B6D0-6A91AE562AD7','4E607E83-41FC-4F49-B26F-A21CFE38328F','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C8BE46DF-2553-4A64-BE79-B69712C297A5','4E607E83-41FC-4F49-B26F-A21CFE38328F','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('755C6AC9-2E38-4D4F-AF33-33CB1744A907','ҵƱ','HSSE/License/BreakGround.aspx',70,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F3D52EF3-104F-42CF-B48A-443FCE5C800D','755C6AC9-2E38-4D4F-AF33-33CB1744A907','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7DFD6886-0F8B-4DA1-9C4B-1847A8B286AF','755C6AC9-2E38-4D4F-AF33-33CB1744A907','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F5F93A18-438F-4A19-982B-7E9E38EB6AE2','755C6AC9-2E38-4D4F-AF33-33CB1744A907','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('32937824-9F35-4C4E-8E13-984E784F8E9C','755C6AC9-2E38-4D4F-AF33-33CB1744A907','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('7BBAE649-7B00-4475-A911-BFE3A37AC55B','ҹʩҵƱ','HSSE/License/NightWork.aspx',80,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B040C80B-4216-4AF8-B9C9-A1303E31CFAC','7BBAE649-7B00-4475-A911-BFE3A37AC55B','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('60241503-BF4B-4159-AFA2-41186CD9329B','7BBAE649-7B00-4475-A911-BFE3A37AC55B','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3A192DC6-2338-4038-ADAD-46FA7364E20F','7BBAE649-7B00-4475-A911-BFE3A37AC55B','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6239BB95-33AF-4B36-97CB-787EF553D35A','7BBAE649-7B00-4475-A911-BFE3A37AC55B','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('A1BE3AB6-9D4A-41E7-8870-E73423165451','װҵƱ','HSSE/License/LiftingWork.aspx',80,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BDC9E201-0C51-4C02-9151-B6DF86CE4C27','A1BE3AB6-9D4A-41E7-8870-E73423165451','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('36EBA247-3051-4213-BD95-89DC948006E1','A1BE3AB6-9D4A-41E7-8870-E73423165451','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('46A93981-2D60-49C3-877A-7B66EBCBC927','A1BE3AB6-9D4A-41E7-8870-E73423165451','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3C5F18F7-459A-4666-B497-9400E637C975','A1BE3AB6-9D4A-41E7-8870-E73423165451','',4) + GO + +update sys_menu set menuname='HSSE¹ʴ' where menuname ='HSSE¹(δ)' + +--Ӷҵֶ +-- +ALTER TABLE License_FireWork +ADD WorkAreaId nvarchar(500) null; +--ԭ +ALTER TABLE License_FireWork +ADD Reason nvarchar(500) null; +--ҵ +ALTER TABLE License_FireWork +ADD FireLevel nvarchar(20) null; + + +--޿ռ +-- +ALTER TABLE License_LimitedSpace +ADD WorkAreaId nvarchar(500) null; +--ռڽ +ALTER TABLE License_LimitedSpace +ADD LimitedDescribe nvarchar(500) null; +--Ƿ +ALTER TABLE License_LimitedSpace +ADD IsBoolOther bit null; +--ҵǷжк +ALTER TABLE License_LimitedSpace +ADD IsBoolHarmfulGas bit null; +--Խ +ALTER TABLE License_LimitedSpace +ADD TestResult nvarchar(500) null; +--ʱ +ALTER TABLE License_LimitedSpace +ADD TestDate datetime null; +-- +ALTER TABLE License_LimitedSpace +ADD TestPerson nvarchar(100) null; +--ͨʩ +ALTER TABLE License_LimitedSpace +ADD VenStep nvarchar(20) null; + + +--ҵƱ +-- +ALTER TABLE License_BreakGround +ADD WorkAreaId nvarchar(500) null; +--ԭ +ALTER TABLE License_BreakGround +ADD Reason nvarchar(500) null; +--໤ +ALTER TABLE License_BreakGround +ADD FireWatchManName nvarchar(500) null; + + +--ߴҵƱ +-- +ALTER TABLE License_HeightWork +ADD WorkAreaId nvarchar(500) null; +--ҵ߶ +ALTER TABLE License_HeightWork +ADD WorkHeight nvarchar(20) null; +--ߴҵ +ALTER TABLE License_HeightWork +ADD HeightLevel nvarchar(20) null; +--໤ +ALTER TABLE License_HeightWork +ADD FireWatchManName nvarchar(500) null; + +-- +ALTER TABLE License_HeightWork +ADD WorkLeaderName nvarchar(200) null; +--˵绰 +ALTER TABLE License_HeightWork +ADD WorkLeaderTel nvarchar(200) null; + +--װ +-- +ALTER TABLE License_LiftingWork +ADD WorkAreaId nvarchar(500) null; +--װ߶ +ALTER TABLE License_LiftingWork +ADD LiftingHeight nvarchar(20) null; + +--໤ +ALTER TABLE License_LiftingWork +ADD FireWatchManName nvarchar(500) null; + +-- +ALTER TABLE License_LiftingWork +ADD WorkLeaderName nvarchar(200) null; +--˵绰 +ALTER TABLE License_LiftingWork +ADD WorkLeaderTel nvarchar(200) null; + +--ع +ALTER TABLE License_LiftingWork +ADD QzgName nvarchar(200) null; +--ع绰 +ALTER TABLE License_LiftingWork +ADD QzgPhone nvarchar(200) null; + +--·ҵ +-- +ALTER TABLE License_OpenCircuit +ADD WorkAreaId nvarchar(500) null; +--·ҵԭ +ALTER TABLE License_OpenCircuit +ADD Reason nvarchar(500) null; +--໤ +ALTER TABLE License_OpenCircuit +ADD FireWatchManName nvarchar(500) null; + + +--ҵ +-- +ALTER TABLE License_RadialWork +ADD WorkAreaId nvarchar(500) null; + +--ʱõ˵ +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','ʱõҵƱ','HSSE/License/Electricity.aspx',50,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) +GO +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('4D6FE464-B5D7-48BE-B68D-C55C9E8E6202','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','',1) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('0086D338-3864-4C90-BEDB-7E752622837D','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','޸',2) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('184C6276-C8B6-421B-B0F9-A74CDCBA53E9','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','ɾ',3) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('065EC96A-1AF4-457F-AA13-CEEAB5A0BD7C','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','',4) +GO +CREATE TABLE [dbo].[License_Electricity]( + [ElectricityId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [LicenseCode] [nvarchar](50) NULL, + [ApplyUnitId] [nvarchar](50) NULL, + [ApplyManId] [nvarchar](50) NULL, + [ApplyDate] [datetime] NULL, + [WorkPalce] [nvarchar](300) NULL, + [WorkDepth] [nvarchar](50) NULL, + [ValidityStartTime] [datetime] NULL, + [ValidityEndTime] [datetime] NULL, + [WorkMeasures] [nvarchar](500) NULL, + [CancelManId] [nvarchar](50) NULL, + [CancelReasons] [nvarchar](200) NULL, + [CancelTime] [datetime] NULL, + [CloseManId] [nvarchar](50) NULL, + [CloseReasons] [nvarchar](200) NULL, + [CloseTime] [datetime] NULL, + [States] [varchar](2) NULL, + [NextManId] [nvarchar](500) NULL, + [OldLicenseId] [nvarchar](50) NULL, + [WorkAreaId] [nvarchar](500) NULL, + [Reason] [nvarchar](500) NULL, + [FireWatchManName] [nvarchar](500) NULL, + CONSTRAINT [PK_License_Electricity] PRIMARY KEY CLUSTERED +( + [ElectricityId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +SET ANSI_PADDING OFF +GO + +ALTER TABLE [dbo].[License_Electricity] WITH CHECK ADD CONSTRAINT [FK_License_Electricity_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[License_Electricity] CHECK CONSTRAINT [FK_License_Electricity_Base_Project] +GO + +ALTER TABLE [dbo].[License_Electricity] WITH CHECK ADD CONSTRAINT [FK_License_Electricity_Base_Unit] FOREIGN KEY([ApplyUnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[License_Electricity] CHECK CONSTRAINT [FK_License_Electricity_Base_Unit] +GO + +ALTER TABLE [dbo].[License_Electricity] WITH CHECK ADD CONSTRAINT [FK_License_Electricity_Sys_User] FOREIGN KEY([ApplyManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_Electricity] CHECK CONSTRAINT [FK_License_Electricity_Sys_User] +GO + +ALTER TABLE [dbo].[License_Electricity] WITH CHECK ADD CONSTRAINT [FK_License_Electricity_Sys_User2] FOREIGN KEY([CancelManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_Electricity] CHECK CONSTRAINT [FK_License_Electricity_Sys_User2] +GO + +ALTER TABLE [dbo].[License_Electricity] WITH CHECK ADD CONSTRAINT [FK_License_Electricity_Sys_User3] FOREIGN KEY([CloseManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_Electricity] CHECK CONSTRAINT [FK_License_Electricity_Sys_User3] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ElectricityId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'LicenseCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'뵥ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ApplyUnitId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ApplyManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ApplyDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵص' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'WorkPalce' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'WorkDepth' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Чڿʼʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ValidityStartTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Чڽʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ValidityEndTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵݡ߼ȫʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'WorkMeasures' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȡID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CancelManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȡԭ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CancelReasons' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȡʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CancelTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'رID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CloseManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'رԭ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CloseReasons' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'رʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CloseTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'״̬(0-ύ1-У2-ɣ3-رգ-1ȡ)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'States' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'²ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'NextManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ԭ֤ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'OldLicenseId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵƱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity' +GO + +--ʱõ簲װ +ALTER TABLE License_Electricity +ADD WorkLeaderName nvarchar(200) null; +--ʱõ簲װ˵绰 +ALTER TABLE License_Electricity +ADD WorkLeaderTel nvarchar(200) null; + +--ʱҵƱ +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF51','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',1,1,1,'ʩλȫԱ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF52','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',2,1,1,'ܰλȫԱ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF53','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',3,1,1,'ܰλרҵʦ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF54','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',3,1,2,'ܰλʩ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF55','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',3,2,1,'λ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF56','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',3,2,2,'ҵλ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF57','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',4,1,1,'',1) + +--ҵ +insert into Sys_Const(id,ConstValue,ConstText,SortIndex,GroupId) +values('8A1DF18E-4CE6-4AA1-AD2C-625823BC4D8E','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','ʱõҵƱ',9,'LicenseType') + +--ҵһ +delete from Sys_MenuFlowOperate where flowStep!=1 +update Sys_MenuFlowOperate set auditflowname='' + + + diff --git a/DataBase/版本日志/SGGLDB_WH_2023-09-12.sql b/DataBase/版本日志/SGGLDB_WH_2023-09-12.sql new file mode 100644 index 00000000..1b359d50 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2023-09-12.sql @@ -0,0 +1,36 @@ +--ǩ +ALTER TABLE License_FireWork +ADD SignatureUrl nvarchar(500) null; + +ALTER TABLE License_LimitedSpace +ADD SignatureUrl nvarchar(500) null; + +ALTER TABLE License_BreakGround +ADD SignatureUrl nvarchar(500) null; + +ALTER TABLE License_HeightWork +ADD SignatureUrl nvarchar(500) null; + +ALTER TABLE License_LiftingWork +ADD SjName nvarchar(50) null; + +ALTER TABLE License_LiftingWork +ADD SjPhone nvarchar(100) null; + +ALTER TABLE License_LiftingWork +ADD SignatureUrl nvarchar(500) null; + +ALTER TABLE License_OpenCircuit +ADD SignatureUrl nvarchar(500) null; + +ALTER TABLE License_RadialWork +ADD SignatureUrl nvarchar(500) null; + +ALTER TABLE License_Electricity +ADD SignatureUrl nvarchar(500) null; + +ALTER TABLE License_NightWork +ADD SignatureUrl nvarchar(500) null; + +ALTER TABLE License_FlowOperate +ADD SignatureUrl nvarchar(500) null; \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_WH_2023-09-13.sql b/DataBase/版本日志/SGGLDB_WH_2023-09-13.sql new file mode 100644 index 00000000..f89f55ae --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2023-09-13.sql @@ -0,0 +1,6 @@ +--߱ͼ໤ֶ + ALTER TABLE License_RadialWork +ADD WorkLeaderName nvarchar(50) null; + + ALTER TABLE License_RadialWork +ADD FireWatchManName nvarchar(50) null; \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_WH_2023-09-14.sql b/DataBase/版本日志/SGGLDB_WH_2023-09-14.sql new file mode 100644 index 00000000..dd9d259d --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2023-09-14.sql @@ -0,0 +1,357 @@ + +--ȡǰ˴ +ALTER PROCEDURE [dbo].[Sp_APP_GetToDoItems] + @projectId NVARCHAR(50)=NULL, + @userId NVARCHAR(200)=NULL +AS +/*ȡǰ˴*/ +BEGIN +SELECT HazardRegisterId AS DataId + ,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId + ,'ȫѲ' AS MenuName + ,register.RegisterDef AS Content + ,UserId + ,users.UserName + ,register.RegisterDate AS DataTime + ,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr + ,'/pagesHSSE/safe/inspecitonconfirm' AS UrlStr +FROM HSSE_Hazard_HazardRegister AS register +LEFT JOIN Sys_User AS users ON users.UserId =@userId +WHERE register.ProjectId=@projectId AND +((register.states = '1' AND (register.ResponsibleMan =@userId OR register.CCManIds LIKE ('%'+@userId+'%') )) +OR (register.states = '2' AND register.CheckManId =@userId)) + +UNION ALL +SELECT PlanId AS DataId + ,'B782A26B-D85C-4F84-8B45-F7AA47B3159E' AS MenuId + ,'ѵƻ' AS MenuName + ,PlanName AS Content + ,UserId + ,users.UserName + ,DesignerDate AS DataTime + ,CONVERT(varchar(100),DesignerDate, 23) AS DataTimeStr + ,'/pagesTest/test/trainindex' AS UrlStr +FROM Training_Plan AS ePlan +LEFT JOIN Sys_User AS users ON ePlan.DesignerId= users.UserId +WHERE (ePlan.ProjectId=@projectId or (@projectId is null and ePlan.ProjectId is null)) + AND (States = '0' OR States = '1' ) AND ePlan.DesignerId =@userId + +UNION ALL +SELECT TestPlanId AS DataId + ,'FAF7F4A4-A4BC-4D94-9E88-0CF5A380DB34' AS MenuId + ,'Լƻ' AS MenuName + ,PlanName AS Content + ,UserId + ,users.UserName + ,PlanDate AS DataTime + ,CONVERT(varchar(100),PlanDate, 23) AS DataTimeStr + ,'/pagesTest/test/testplan' AS UrlStr +FROM Training_TestPlan AS TPlan +LEFT JOIN Sys_User AS users ON users.UserId =TPlan.PlanManId +WHERE (TPlan.ProjectId=@projectId or (@projectId is null and TPlan.ProjectId is null)) + AND (States = '0' OR States = '1' ) AND PlanManId =@userId + +UNION ALL +SELECT TaskId AS DataId + ,'E108F75D-89D0-4DCA-8356-A156C328805C' AS MenuId + ,'ѵ' AS MenuName + ,Plans.PlanName AS Content + ,users.UserId + ,users.UserName + ,TaskDate AS DataTime + ,CONVERT(varchar(100),TaskDate, 23) AS DataTimeStr + ,('/pagesTest/test/taskindex') AS UrlStr +FROM Training_Task AS Task + LEFT JOIN Sys_User AS users ON users.UserId =@userId + LEFT JOIN Training_Plan AS Plans ON Plans.PlanId =Task.PlanId +WHERE (Task.ProjectId=@projectId or (@projectId is null and Task.ProjectId is null)) + AND (Task.States IS NULL OR Task.States != 2) + AND Task.UserId = @userId + +UNION ALL +SELECT TestRecordId AS DataId + ,'0EEB138D-84F9-4686-8CBB-CAEAA6CF1B2A' AS MenuId + ,'ɨ뿼' AS MenuName + ,TestPlan.PlanName AS Content + ,TestRecord.TestManId + ,Person.PersonName + ,TestPlan.TestStartTime AS DataTime + ,CONVERT(varchar(100),TestPlan.TestStartTime, 23) AS DataTimeStr + ,('/pages/temp_index/index') AS UrlStr +FROM Training_TestRecord AS TestRecord +left join Training_TestPlan as TestPlan on TestRecord.TestPlanId = TestPlan.TestPlanId +left join SitePerson_Person as Person on Person.PersonId = TestRecord.TestManId +left join Sys_User as uses on Person.IdentityCard = uses.IdentityCard +WHERE (TestRecord.ProjectId=@projectId or (@projectId is null and TestRecord.ProjectId is null)) +AND TestPlan.States ='1' +AND TestRecord.TestEndTime IS NULL +AND (TestRecord.TestManId = @userId or uses.UserId = @userId) + +UNION ALL +SELECT FireWorkId AS DataId + ,'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B' AS MenuId + ,'ҵ' AS MenuName + ,LicenseCode AS Content + ,UserId + ,users.UserName + ,ApplyDate AS DataTime + ,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr + ,(CASE WHEN States = '0' THEN '/pagesWork/dhuo/add' + ELSE '/pagesWork/dhuo/approval' END) AS UrlStr +FROM License_FireWork AS License + LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId +WHERE License.ProjectId=@projectId + AND (States = '0' OR States = '1' ) + AND License.NextManId LIKE '%'+ @userId+'%' + +UNION ALL +SELECT HeightWorkId AS DataId + ,'DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9' AS MenuId + ,'ߴҵ' AS MenuName + ,LicenseCode AS Content + ,UserId + ,users.UserName + ,ApplyDate AS DataTime + ,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr + ,(CASE WHEN States = '0' THEN '/pagesWork/gchu/add' + ELSE '/pagesWork/dhuo/approval' END) AS UrlStr +FROM License_HeightWork AS License + LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId +WHERE License.ProjectId=@projectId + AND (States = '0' OR States = '1' ) + AND License.NextManId LIKE '%'+ @userId+'%' + +UNION ALL +SELECT LimitedSpaceId AS DataId + ,'AEC9166D-1C91-45F0-8BFE-D3D0479A28C7' AS MenuId + ,'޿ռ' AS MenuName + ,LicenseCode AS Content + ,UserId + ,users.UserName + ,ApplyDate AS DataTime + ,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr + ,(CASE WHEN States = '0' THEN '/pagesWork/sxkj/add' + ELSE '/pagesWork/dhuo/approval' END) AS UrlStr +FROM License_LimitedSpace AS License + LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId +WHERE License.ProjectId=@projectId + AND (States = '0' OR States = '1' ) + AND License.NextManId LIKE '%'+ @userId+'%' + +UNION ALL +SELECT RadialWorkId AS DataId + ,'F72FF20B-D3EB-46A5-97F7-C99B2473A140' AS MenuId + ,'ҵ' AS MenuName + ,LicenseCode AS Content + ,UserId + ,users.UserName + ,ApplyDate AS DataTime + ,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr + ,(CASE WHEN States = '0' THEN '/pagesWork/sx/add' + ELSE '/pagesWork/dhuo/approval' END) AS UrlStr +FROM License_RadialWork AS License + LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId +WHERE License.ProjectId=@projectId + AND (States = '0' OR States = '1' ) + AND License.NextManId LIKE '%'+ @userId+'%' + +UNION ALL +SELECT OpenCircuitId AS DataId + ,'4E607E83-41FC-4F49-B26F-A21CFE38328F' AS MenuId + ,'·(ռ)' AS MenuName + ,LicenseCode AS Content + ,UserId + ,users.UserName + ,ApplyDate AS DataTime + ,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr + ,(CASE WHEN States = '0' THEN '/pagesWork/dlu/add' + ELSE '/pagesWork/dhuo/approval' END) AS UrlStr +FROM License_OpenCircuit AS License + LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId +WHERE License.ProjectId=@projectId + AND (States = '0' OR States = '1' ) + AND License.NextManId LIKE '%'+ @userId+'%' + +UNION ALL +SELECT BreakGroundId AS DataId + ,'755C6AC9-2E38-4D4F-AF33-33CB1744A907' AS MenuId + ,'ҵ' AS MenuName + ,LicenseCode AS Content + ,UserId + ,users.UserName + ,ApplyDate AS DataTime + ,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr + ,(CASE WHEN States = '0' THEN '/pagesWork/dtu/add' + ELSE '/pagesWork/dhuo/approval' END) AS UrlStr +FROM License_BreakGround AS License + LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId +WHERE License.ProjectId=@projectId + AND (States = '0' OR States = '1' ) + AND License.NextManId LIKE '%'+ @userId+'%' + +UNION ALL +SELECT NightWorkId AS DataId + ,'7BBAE649-7B00-4475-A911-BFE3A37AC55B' AS MenuId + ,'ҹʩ' AS MenuName + ,LicenseCode AS Content + ,UserId + ,users.UserName + ,ApplyDate AS DataTime + ,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr + ,(CASE WHEN States = '0' THEN '/pagesWork/yjsg/add' + ELSE '/pagesWork/dhuo/approval' END) AS UrlStr +FROM License_NightWork AS License + LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId +WHERE License.ProjectId=@projectId + AND (States = '0' OR States = '1' ) + AND License.NextManId LIKE '%'+ @userId+'%' + +UNION ALL +SELECT LiftingWorkId AS DataId + ,'A1BE3AB6-9D4A-41E7-8870-E73423165451' AS MenuId + ,'װҵ' AS MenuName + ,LicenseCode AS Content + ,UserId + ,users.UserName + ,ApplyDate AS DataTime + ,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr + ,(CASE WHEN States = '0' THEN '/pagesWork/dzhuang/add' + ELSE '/pagesWork/dhuo/approval' END) AS UrlStr +FROM License_LiftingWork AS License + LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId +WHERE License.ProjectId=@projectId + AND (States = '0' OR States = '1' ) + AND License.NextManId LIKE '%'+ @userId+'%' + +UNION ALL +SELECT RectifyNoticesId AS DataId + ,'0038D764-D628-46F0-94FF-D0A22C3C45A3' AS MenuId + ,'' AS MenuName + ,(CASE WHEN Rectify.States =1 THEN 'ǩ' + WHEN Rectify.States =2 THEN 'ģ' + WHEN Rectify.States =3 THEN 'ˣ' + WHEN Rectify.States =4 THEN '飺' + WHEN Rectify.States =5 THEN 'ɣ' + ELSE 'ύ' END + RectifyNoticesCode) AS Content + ,users.UserId + ,users.UserName + ,CheckedDate AS DataTime + ,CONVERT(varchar(100),CheckedDate, 23) AS DataTimeStr + ,(CASE WHEN ISNULL(Rectify.States,0) =0 THEN '/pagesHSSE/rn/rn_add' --ύ + WHEN Rectify.States =1 THEN '/pagesHSSE/rn/rn_approval' --ǩ + WHEN Rectify.States =2 THEN '/pagesHSSE/rn/rn_rectify' -- + WHEN Rectify.States =3 THEN '/pagesHSSE/rn/rn_rectifycf' -- + WHEN Rectify.States =4 THEN '/pagesHSSE/rn/rn_confirm' -- + ELSE '/pagesHSSE/rn/rn_add' END) AS UrlStr +FROM Check_RectifyNotices AS Rectify + LEFT JOIN Sys_User AS users ON users.UserId =@userId +WHERE Rectify.Projectid=@projectId AND Rectify.States <> 5 + AND ((ISNULL(Rectify.States,0) =0 AND Rectify.CompleteManId LIKE '%'+ @userId+'%') + OR (Rectify.States =1 AND Rectify.SignPerson LIKE '%'+ @userId+'%') + OR (Rectify.States =2 AND Rectify.DutyPersonId LIKE '%'+ @userId+'%') + OR (Rectify.States =3 AND Rectify.UnitHeadManId LIKE '%'+ @userId+'%') + OR (Rectify.States =4 AND Rectify.CheckPerson LIKE '%'+ @userId+'%') + OR (Rectify.ProfessionalEngineerId LIKE '%'+ @userId+'%' AND (ProfessionalEngineerTime1 IS NULL OR ProfessionalEngineerTime2 IS NULL)) + OR (Rectify.ConstructionManagerId LIKE '%'+ @userId+'%' AND (ConstructionManagerTime1 IS NULL OR ConstructionManagerTime2 IS NULL)) + OR (Rectify.ProjectManagerId LIKE '%'+ @userId+'%' AND (ProjectManagerTime1 IS NULL OR ProjectManagerTime2 IS NULL))) + +UNION ALL +SELECT PersonId AS DataId + ,'EE260447-028F-46AF-8864-9A5DC9DAA5BD' AS MenuId + ,'ֳԱ' AS MenuName + ,Person.PersonName AS Content + ,users.UserId + ,users.UserName + ,Person.InTime AS DataTime + ,CONVERT(varchar(100),Person.InTime, 23) AS DataTimeStr + ,('/pagesHSSE/info/peopledetail') AS UrlStr +FROM SitePerson_Person AS Person + LEFT JOIN Sys_User AS users ON users.UserId =@userId +WHERE Person.ProjectId=@projectId AND (Person.IsUsed IS NULL OR Person.IsUsed= 0) + AND Person.AuditorId = @userId AND Person.AuditorDate IS NULL + + +UNION ALL +SELECT PauseNoticeId AS DataId + ,'C81DB7ED-165E-4C69-86B0-A3AAE37059FE' AS MenuId + ,'ͣ' AS MenuName + ,(CASE WHEN PauseNotice.PauseStates =1 THEN 'ǩ' + WHEN PauseNotice.PauseStates =2 THEN '׼' + WHEN PauseNotice.PauseStates =3 THEN 'գ' + ELSE 'ύ' END + PauseNoticeCode) AS Content + ,users.UserId + ,users.UserName + ,PauseTime AS DataTime + ,CONVERT(varchar(100),PauseTime, 23) AS DataTimeStr + ,(CASE WHEN ISNULL(PauseNotice.PauseStates,0) =0 THEN '/pagesHSSE/info/stop_add ' --ύ + WHEN PauseNotice.PauseStates =1 AND PauseNotice.SignManId=@userId THEN '/pagesHSSE/info/stop_approval' --ǩ + WHEN PauseNotice.PauseStates =2 AND PauseNotice.ApproveManId=@userId THEN '/pagesHSSE/info/stop_confirm' --׼ + WHEN PauseNotice.PauseStates =3 AND PauseNotice.DutyPersonId=@userId THEN '/pagesHSSE/info/stop_feedback' -- + ELSE '/pagesHSSE/info/stop_detail' END) AS UrlStr +FROM Check_PauseNotice AS PauseNotice + LEFT JOIN Sys_User AS users ON users.UserId =@userId +WHERE PauseNotice.ProjectId=@projectId AND PauseNotice.PauseStates <> 4 + AND ((ISNULL(PauseNotice.PauseStates,0) =0 AND PauseNotice.CompileManId LIKE '%'+ @userId+'%') + OR (PauseNotice.PauseStates =1 AND PauseNotice.SignManId LIKE '%'+ @userId+'%') + OR (PauseNotice.PauseStates =2 AND PauseNotice.ApproveManId LIKE '%'+ @userId+'%') + OR (PauseNotice.PauseStates =3 AND PauseNotice.DutyPersonId LIKE '%'+ @userId+'%') + OR (PauseNotice.ProfessionalEngineerId LIKE '%'+ @userId+'%' AND ProfessionalEngineerTime IS NULL) + OR (PauseNotice.ConstructionManagerId LIKE '%'+ @userId+'%' AND ConstructionManagerTime IS NULL) + OR (PauseNotice.UnitHeadManId LIKE '%'+ @userId+'%' AND UnitHeadManTime IS NULL) + OR (PauseNotice.SupervisorManId LIKE '%'+ @userId+'%' AND SupervisorManTime IS NULL) + OR (PauseNotice.OwnerId LIKE '%'+ @userId+'%' AND OwnerTime IS NULL)) +UNION ALL +SELECT PunishNoticeId AS DataId + ,'755F1C1D-2178-47D8-9F82-A501B53A2436' AS MenuId + ,'' AS MenuName + ,(CASE WHEN PunishNotice.PunishStates =1 THEN 'ǩ' + WHEN PunishNotice.PunishStates =2 THEN '׼' + WHEN PunishNotice.PunishStates =3 THEN 'ִ' + ELSE 'ύ' END + PunishNoticeCode) AS Content + ,users.UserId + ,users.UserName + ,PunishNoticeDate AS DataTime + ,CONVERT(varchar(100),PunishNoticeDate, 23) AS DataTimeStr + ,(CASE WHEN ISNULL(PunishNotice.PunishStates,0) =0 THEN '/pagesTest/punish/add' --ύ + WHEN PunishNotice.PunishStates =1 AND PunishNotice.SignMan=@userId THEN '/pagesTest/punish/approval' --ǩ + WHEN PunishNotice.PunishStates =2 AND PunishNotice.ApproveMan=@userId THEN '/pagesTest/punish/rectify' --׼ + WHEN PunishNotice.PunishStates =3 AND PunishNotice.DutyPersonId=@userId THEN '/pagesTest/punish/rectifycf' --ִ + ELSE '/pagesTest/punish/detail' END) AS UrlStr +FROM Check_PunishNotice AS PunishNotice + LEFT JOIN Sys_User AS users ON users.UserId =@userId +WHERE PunishNotice.ProjectId=@projectId AND PunishNotice.PunishStates <> 4 + AND ((ISNULL(PunishNotice.PunishStates,0) =0 AND PunishNotice.CompileMan LIKE '%'+ @userId+'%') + OR (PunishNotice.PunishStates =1 AND PunishNotice.SignMan LIKE '%'+ @userId+'%') + OR (PunishNotice.PunishStates =2 AND PunishNotice.ApproveMan LIKE '%'+ @userId+'%') + OR (PunishNotice.PunishStates =3 AND PunishNotice.DutyPersonId LIKE '%'+ @userId+'%') + OR (PunishNotice.ProfessionalEngineerId LIKE '%'+ @userId+'%' AND ProfessionalEngineerTime IS NULL) + OR (PunishNotice.ConstructionManagerId LIKE '%'+ @userId+'%' AND ConstructionManagerTime IS NULL) + OR (PunishNotice.UnitHeadManId LIKE '%'+ @userId+'%' AND UnitHeadManTime IS NULL)) +UNION ALL +SELECT ElectricityId AS DataId + ,'48F64E0F-38B2-4BDC-9B61-6200BD02CBF5' AS MenuId + ,'ʱõ' AS MenuName + ,LicenseCode AS Content + ,UserId + ,users.UserName + ,ApplyDate AS DataTime + ,CONVERT(varchar(100),ApplyDate, 23) AS DataTimeStr + ,(CASE WHEN States = '0' THEN '/pagesWork/ldian/add' + ELSE '/pagesWork/dhuo/approval' END) AS UrlStr +FROM License_Electricity AS License + LEFT JOIN Sys_User AS users ON users.UserId =License.NextManId +WHERE License.ProjectId=@projectId + AND (States = '0' OR States = '1' ) + AND License.NextManId LIKE '%'+ @userId+'%' + +ORDER BY DataTime DESC +END + + + + + + +GO + + diff --git a/DataBase/版本日志/SGGLDB_WH_2023-09-18.sql b/DataBase/版本日志/SGGLDB_WH_2023-09-18.sql new file mode 100644 index 00000000..7d7c6905 Binary files /dev/null and b/DataBase/版本日志/SGGLDB_WH_2023-09-18.sql differ diff --git a/DataBase/版本日志/SGGLDB_WH_2023-09-19.sql b/DataBase/版本日志/SGGLDB_WH_2023-09-19.sql new file mode 100644 index 00000000..0c0a1213 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2023-09-19.sql @@ -0,0 +1,322 @@ +--==ģ +--WP01 Գ +delete PreRun_WorkInspectTemplate where WorkInspectId='4A52BDAB-2143-4C61-8C7D-F91BE24A2B71' +delete PreRun_WorkInspectTemplate where WorkInspectId='4FCA00CE-391B-43D3-8B6D-D47052CE6565' +delete PreRun_WorkInspectTemplate where WorkInspectId='777B8494-09EC-480D-97C9-702C9FCCC0EB' +delete PreRun_WorkInspectTemplate where WorkInspectId='BC51D8E6-2689-4F04-90C5-79F1C84C41FB' +delete PreRun_WorkInspectTemplate where WorkInspectId='4560A417-F1B9-4121-B058-AFD983BEC194' +delete PreRun_WorkInspectTemplate where WorkInspectId='F504A7E2-ADB9-4BCE-8A7E-F3E971EB9DDD' +delete PreRun_WorkInspectTemplate where WorkInspectId='4FD78960-91ED-4A23-B8D5-E7189152E452' +delete PreRun_WorkInspectTemplate where WorkInspectId='72EAEDF3-DFB1-4B5F-A601-B80BBB718760' +delete PreRun_WorkInspectTemplate where WorkInspectId='A1929105-319D-4637-9251-B4300FDE4C0D' +delete PreRun_WorkInspectTemplate where WorkInspectId='6E1A98B5-7B1E-404D-847C-8E9B7889B13F' +delete PreRun_WorkInspectTemplate where WorkInspectId='78F1C600-EA2E-4CD4-B67A-B9C3432F981B' +delete PreRun_WorkInspectTemplate where WorkInspectId='0AFFD4A5-6853-4875-97AE-9C6B925C9334' +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('4A52BDAB-2143-4C61-8C7D-F91BE24A2B71','1C01150C-977E-499A-9173-95F319BEEF87','ðװȫƺ͹淶Ĺ涨װ¼ȫ','','',GETDATE(),1) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('4FCA00CE-391B-43D3-8B6D-D47052CE6565','1C01150C-977E-499A-9173-95F319BEEF87','ιཬѴﵽǿȣĨѾɡ','','',GETDATE(),2) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('777B8494-09EC-480D-97C9-702C9FCCC0EB','1C01150C-977E-499A-9173-95F319BEEF87','ܵϵͳѹϴɨϸϸ','','',GETDATE(),3) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('BC51D8E6-2689-4F04-90C5-79F1C84C41FB','1C01150C-977E-499A-9173-95F319BEEF87','ȫҪ','','',GETDATE(),4) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('4560A417-F1B9-4121-B058-AFD983BEC194','1C01150C-977E-499A-9173-95F319BEEF87','ܷ͹ܵ豸ϴϸ񣬲תϸ','','',GETDATE(),5) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('F504A7E2-ADB9-4BCE-8A7E-F3E971EB9DDD','1C01150C-977E-499A-9173-95F319BEEF87','ʴʩѻɡ','','',GETDATE(),6) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('4FD78960-91ED-4A23-B8D5-E7189152E452','1C01150C-977E-499A-9173-95F319BEEF87','ڴ涨','','',GETDATE(),7) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('72EAEDF3-DFB1-4B5F-A601-B80BBB718760','1C01150C-977E-499A-9173-95F319BEEF87','DZװ꣬ơĵԷҪ','','',GETDATE(),8) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('A1929105-319D-4637-9251-B4300FDE4C0D','1C01150C-977E-499A-9173-95F319BEEF87','߱ȴˮܷˮDZȷӦ','','',GETDATE(),9) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('6E1A98B5-7B1E-404D-847C-8E9B7889B13F','1C01150C-977E-499A-9173-95F319BEEF87','ֳȫʩͶƷ׼','','',GETDATE(),10) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('78F1C600-EA2E-4CD4-B67A-B9C3432F981B','1C01150C-977E-499A-9173-95F319BEEF87','DZߡ¼뱸Աλ','','',GETDATE(),11) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('0AFFD4A5-6853-4875-97AE-9C6B925C9334','1C01150C-977E-499A-9173-95F319BEEF87','','','',GETDATE(),12) +--WP02 ܵϴ +delete PreRun_WorkInspectTemplate where WorkInspectId='D114152C-AB8F-4A27-BB99-047EFC6A659B' +delete PreRun_WorkInspectTemplate where WorkInspectId='A9EE383E-9073-4C6A-9BF9-6A55D13DED78' +delete PreRun_WorkInspectTemplate where WorkInspectId='ECEAF45C-43E1-4DBD-9ECF-EB509B30C727' +delete PreRun_WorkInspectTemplate where WorkInspectId='123E15BA-8885-445A-8C88-FFEE69E6AAC3' +delete PreRun_WorkInspectTemplate where WorkInspectId='98E970F7-58E2-4EFC-B74F-0D724B968ED2' +delete PreRun_WorkInspectTemplate where WorkInspectId='2340CB66-6CB4-47A6-A80C-F7C523E7F19D' +delete PreRun_WorkInspectTemplate where WorkInspectId='FE74C3B5-33D7-4DB2-A234-CF61248AE508' +delete PreRun_WorkInspectTemplate where WorkInspectId='C57CBFFD-B11F-4F8F-A637-B7EF6344B818' +delete PreRun_WorkInspectTemplate where WorkInspectId='BDD6D5B1-C82C-46A1-BCC5-5F66BFCE4C72' +delete PreRun_WorkInspectTemplate where WorkInspectId='C6171D1B-9B3C-47A5-A5BE-BB21525C67A9' +delete PreRun_WorkInspectTemplate where WorkInspectId='2DA39968-C16D-4723-9932-80804B0F88E6' +delete PreRun_WorkInspectTemplate where WorkInspectId='11F562CB-9867-46E3-A42A-3DCF6C9B80A6' +delete PreRun_WorkInspectTemplate where WorkInspectId='435AF81B-23CD-4EE8-8023-7F26BF8672AA' +delete PreRun_WorkInspectTemplate where WorkInspectId='948611DC-519D-465A-BBA2-5BD26C70C62A' +delete PreRun_WorkInspectTemplate where WorkInspectId='2F77D05B-837C-4A74-AAAD-2BCDAF7444D7' +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('D114152C-AB8F-4A27-BB99-047EFC6A659B','641DA0F4-42A7-4DE3-9A57-95A606016655','ϴɨ·ڵĹܵѹϸ','','',GETDATE(),1) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('A9EE383E-9073-4C6A-9BF9-6A55D13DED78','641DA0F4-42A7-4DE3-9A57-95A606016655','װƵĿװȡ','','',GETDATE(),2) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('ECEAF45C-43E1-4DBD-9ECF-EB509B30C727','641DA0F4-42A7-4DE3-9A57-95A606016655','ҪѲȡЧʩ','','',GETDATE(),3) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('123E15BA-8885-445A-8C88-FFEE69E6AAC3','641DA0F4-42A7-4DE3-9A57-95A606016655','ڷѲѲȡʩ','','',GETDATE(),4) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('98E970F7-58E2-4EFC-B74F-0D724B968ED2','641DA0F4-42A7-4DE3-9A57-95A606016655','Ҫ¶ȼƲԪʱͷס','','',GETDATE(),5) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('2340CB66-6CB4-47A6-A80C-F7C523E7F19D','641DA0F4-42A7-4DE3-9A57-95A606016655','ҪDZѲȡЧʩ','','',GETDATE(),6) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('FE74C3B5-33D7-4DB2-A234-CF61248AE508','641DA0F4-42A7-4DE3-9A57-95A606016655','ͽλ״̬ϳϴɨҪ','','',GETDATE(),7) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('C57CBFFD-B11F-4F8F-A637-B7EF6344B818','641DA0F4-42A7-4DE3-9A57-95A606016655','֧״̬ϳϴɨҪ','','',GETDATE(),8) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('BDD6D5B1-C82C-46A1-BCC5-5F66BFCE4C72','641DA0F4-42A7-4DE3-9A57-95A606016655','ưѲä塣','','',GETDATE(),9) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('C6171D1B-9B3C-47A5-A5BE-BB21525C67A9','641DA0F4-42A7-4DE3-9A57-95A606016655','豸ڼĭ̵ѲȡЧʩ','','',GETDATE(),10) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('2DA39968-C16D-4723-9932-80804B0F88E6','641DA0F4-42A7-4DE3-9A57-95A606016655','ϴܵ޹ϵͳäʩƱʾ','','',GETDATE(),11) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('11F562CB-9867-46E3-A42A-3DCF6C9B80A6','641DA0F4-42A7-4DE3-9A57-95A606016655','ųѼӹ̣ʱ̶ʩϳϴɨҪ','','',GETDATE(),12) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('435AF81B-23CD-4EE8-8023-7F26BF8672AA','641DA0F4-42A7-4DE3-9A57-95A606016655','ȫʩϳϴɨҪ','','',GETDATE(),13) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('948611DC-519D-465A-BBA2-5BD26C70C62A','641DA0F4-42A7-4DE3-9A57-95A606016655','ʩϳϴɨҪ','','',GETDATE(),14) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('2F77D05B-837C-4A74-AAAD-2BCDAF7444D7','641DA0F4-42A7-4DE3-9A57-95A606016655','','','',GETDATE(),15) +--WP03 ܵɨ +delete PreRun_WorkInspectTemplate where WorkInspectId='BC693EF5-405B-4341-8D7F-E1A7DF613CB5' +delete PreRun_WorkInspectTemplate where WorkInspectId='D1977C77-1823-4EC6-8B6A-576ED5C664BC' +delete PreRun_WorkInspectTemplate where WorkInspectId='BC5B90E2-BE72-4957-98CF-0018F8F79900' +delete PreRun_WorkInspectTemplate where WorkInspectId='B8700369-6E43-4D4A-8D35-5D46E064511C' +delete PreRun_WorkInspectTemplate where WorkInspectId='4CBE76B2-1760-428C-9855-30FBD610157D' +delete PreRun_WorkInspectTemplate where WorkInspectId='CC5718D2-10D4-449E-8527-3ABD6E12F120' +delete PreRun_WorkInspectTemplate where WorkInspectId='99068D60-FD45-4435-890C-52E5BC743645' +delete PreRun_WorkInspectTemplate where WorkInspectId='A830F841-C86F-45F6-A888-7EFFA9914F9C' +delete PreRun_WorkInspectTemplate where WorkInspectId='7671F673-6BF1-4A65-9848-6ED60E541C38' +delete PreRun_WorkInspectTemplate where WorkInspectId='41B4C1ED-0D00-4C8F-BDB6-8C3450330255' +delete PreRun_WorkInspectTemplate where WorkInspectId='A0CD44CB-48FC-46E7-A7EA-177B8D880409' +delete PreRun_WorkInspectTemplate where WorkInspectId='3C5F0A0B-0A45-45BE-BDC8-8444415DFEAC' +delete PreRun_WorkInspectTemplate where WorkInspectId='AE04B9B6-0143-411D-BD45-C53FEC73D78C' +delete PreRun_WorkInspectTemplate where WorkInspectId='F51EAB4B-96E8-48C6-848D-DD0EBEDA7539' +delete PreRun_WorkInspectTemplate where WorkInspectId='7428215F-D5BE-4FE3-98B9-6D962B13224B' +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('BC693EF5-405B-4341-8D7F-E1A7DF613CB5','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','ϴɨ·ڵĹܵѹϸ','','',GETDATE(),1) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('D1977C77-1823-4EC6-8B6A-576ED5C664BC','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','װƵĿװȡ','','',GETDATE(),2) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('BC5B90E2-BE72-4957-98CF-0018F8F79900','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','ҪѲȡЧʩ','','',GETDATE(),3) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('B8700369-6E43-4D4A-8D35-5D46E064511C','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','ڷѲѲȡʩ','','',GETDATE(),4) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('4CBE76B2-1760-428C-9855-30FBD610157D','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','Ҫ¶ȼƲԪʱͷס','','',GETDATE(),5) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('CC5718D2-10D4-449E-8527-3ABD6E12F120','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','ҪDZѲȡЧʩ','','',GETDATE(),6) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('99068D60-FD45-4435-890C-52E5BC743645','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','ͽλ״̬ϳϴɨҪ','','',GETDATE(),7) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('A830F841-C86F-45F6-A888-7EFFA9914F9C','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','֧״̬ϳϴɨҪ','','',GETDATE(),8) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('7671F673-6BF1-4A65-9848-6ED60E541C38','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','ưѲä塣','','',GETDATE(),9) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('41B4C1ED-0D00-4C8F-BDB6-8C3450330255','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','豸ڼĭ̵ѲȡЧʩ','','',GETDATE(),10) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('A0CD44CB-48FC-46E7-A7EA-177B8D880409','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','ϴܵ޹ϵͳäʩƱʾ','','',GETDATE(),11) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('3C5F0A0B-0A45-45BE-BDC8-8444415DFEAC','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','ųѼӹ̣ʱ̶ʩϳϴɨҪ','','',GETDATE(),12) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('AE04B9B6-0143-411D-BD45-C53FEC73D78C','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','ȫʩϳϴɨҪ','','',GETDATE(),13) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('F51EAB4B-96E8-48C6-848D-DD0EBEDA7539','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','ʩϳϴɨҪ','','',GETDATE(),14) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('7428215F-D5BE-4FE3-98B9-6D962B13224B','BEB24AE8-F66D-458B-ADFD-3810405B5EB8','','','',GETDATE(),15) +--WP05 ѧϴ +delete PreRun_WorkInspectTemplate where WorkInspectId='2C74C5DE-D600-425E-9870-061715D0AA93' +delete PreRun_WorkInspectTemplate where WorkInspectId='F2F146F9-4A2A-40E2-9FA3-83B954DF4775' +delete PreRun_WorkInspectTemplate where WorkInspectId='EF527C06-4CAB-46EC-A6C6-FB5C9152C03B' +delete PreRun_WorkInspectTemplate where WorkInspectId='25D55B52-6083-4856-BEAA-F983DB250CE2' +delete PreRun_WorkInspectTemplate where WorkInspectId='14DBD15B-F40E-4FAD-B903-5FACEF1D85F4' +delete PreRun_WorkInspectTemplate where WorkInspectId='89D04B6E-16D0-4870-B006-7ADA9FED4F8D' +delete PreRun_WorkInspectTemplate where WorkInspectId='B534309B-1767-47A2-9729-46ACB732AAD2' +delete PreRun_WorkInspectTemplate where WorkInspectId='D76DB877-D8C6-45EB-BDB0-E33AC3EA3272' +delete PreRun_WorkInspectTemplate where WorkInspectId='6CB94B9D-2ED6-4C6D-A164-1AE8EE3CB02E' +delete PreRun_WorkInspectTemplate where WorkInspectId='F9B9A741-A9F1-4863-86C1-B061A4645B1F' +delete PreRun_WorkInspectTemplate where WorkInspectId='4C1F3A32-A3CF-48A9-83A5-ACD7C6CBE644' +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('2C74C5DE-D600-425E-9870-061715D0AA93','474F94B6-E927-4E9A-A544-F8E1AE63F6FF','ѧϴ·Ĺܵѹϸ','','',GETDATE(),1) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('F2F146F9-4A2A-40E2-9FA3-83B954DF4775','474F94B6-E927-4E9A-A544-F8E1AE63F6FF','ϵͳ·ıáѹѵԳϸ','','',GETDATE(),2) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('EF527C06-4CAB-46EC-A6C6-FB5C9152C03B','474F94B6-E927-4E9A-A544-F8E1AE63F6FF','ҪDZڷѲȡЧʩ','','',GETDATE(),3) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('25D55B52-6083-4856-BEAA-F983DB250CE2','474F94B6-E927-4E9A-A544-F8E1AE63F6FF','ϵͳе豸ڼѲȡʩ','','',GETDATE(),4) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('14DBD15B-F40E-4FAD-B903-5FACEF1D85F4','474F94B6-E927-4E9A-A544-F8E1AE63F6FF','ҪIJԪʱͷס','','',GETDATE(),5) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('89D04B6E-16D0-4870-B006-7ADA9FED4F8D','474F94B6-E927-4E9A-A544-F8E1AE63F6FF','֧ܵܰװϷҪ','','',GETDATE(),6) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('B534309B-1767-47A2-9729-46ACB732AAD2','474F94B6-E927-4E9A-A544-F8E1AE63F6FF','֧״̬ϻѧϴҪ','','',GETDATE(),7) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('D76DB877-D8C6-45EB-BDB0-E33AC3EA3272','474F94B6-E927-4E9A-A544-F8E1AE63F6FF','ưѲä塣','','',GETDATE(),8) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('6CB94B9D-2ED6-4C6D-A164-1AE8EE3CB02E','474F94B6-E927-4E9A-A544-F8E1AE63F6FF','ϴϵͳ޹ϵͳäʩƱʾ','','',GETDATE(),9) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('F9B9A741-A9F1-4863-86C1-B061A4645B1F','474F94B6-E927-4E9A-A544-F8E1AE63F6FF','ѧϴʱʩԴҩƷѧߵȽѱ롣','','',GETDATE(),10) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('4C1F3A32-A3CF-48A9-83A5-ACD7C6CBE644','474F94B6-E927-4E9A-A544-F8E1AE63F6FF','ȫʩϻѧϴҪ','','',GETDATE(),11) + +--WP06 ¯ +delete PreRun_WorkInspectTemplate where WorkInspectId='CB8F1765-C8BB-484C-9F26-21C8E9CB4CE7' +delete PreRun_WorkInspectTemplate where WorkInspectId='F2F29570-1975-4014-A99A-4A03DB4A536D' +delete PreRun_WorkInspectTemplate where WorkInspectId='1A00CB42-25E4-4F97-A1B5-3F7C4490F223' +delete PreRun_WorkInspectTemplate where WorkInspectId='9DECCBE6-65CC-419A-A048-979783FD6842' +delete PreRun_WorkInspectTemplate where WorkInspectId='21BF145B-EA14-4E55-B037-E819234F1F7A' +delete PreRun_WorkInspectTemplate where WorkInspectId='5E0511A0-C5A9-4B61-9685-4E6C8037F4C6' +delete PreRun_WorkInspectTemplate where WorkInspectId='C7593DCE-AA2A-4049-91E5-39E0E9B0E13A' +delete PreRun_WorkInspectTemplate where WorkInspectId='583F587F-DAC6-480B-9731-5BAC193E7F96' +delete PreRun_WorkInspectTemplate where WorkInspectId='5DFCD094-DDF7-4B2C-9734-37FF80763974' +delete PreRun_WorkInspectTemplate where WorkInspectId='FA2DCD68-F4CE-495A-AF9F-E368248D5386' +delete PreRun_WorkInspectTemplate where WorkInspectId='3DEF5BB6-E60F-4F7A-85AB-74FE48BE3E93' +delete PreRun_WorkInspectTemplate where WorkInspectId='ED369C77-1B1A-46DE-826E-DDD9E866A4D7' +delete PreRun_WorkInspectTemplate where WorkInspectId='A0C6A601-ABBE-4EBF-9193-2796F56ADD91' +delete PreRun_WorkInspectTemplate where WorkInspectId='177F8D2C-BE13-437E-92EB-B0C79797F161' +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('CB8F1765-C8BB-484C-9F26-21C8E9CB4CE7','3289A3D2-0691-4AD1-BDF3-1FD784564E71','¯ǽ(졢̵ͷ)½ڲɾ','','',GETDATE(),1) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('F2F29570-1975-4014-A99A-4A03DB4A536D','3289A3D2-0691-4AD1-BDF3-1FD784564E71','豸еĵºͨˮ֣ѲȡͨˮͨȴʩԷܵ¡','','',GETDATE(),2) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('1A00CB42-25E4-4F97-A1B5-3F7C4490F223','3289A3D2-0691-4AD1-BDF3-1FD784564E71','ߺ¯Ҫȷ¯ϵͳϵͳȫ롣','','',GETDATE(),3) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('9DECCBE6-65CC-419A-A048-979783FD6842','3289A3D2-0691-4AD1-BDF3-1FD784564E71','ָʾװϣָλ','','',GETDATE(),4) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('21BF145B-EA14-4E55-B037-E819234F1F7A','3289A3D2-0691-4AD1-BDF3-1FD784564E71','¯豸װϲкϸ','','',GETDATE(),5) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('5E0511A0-C5A9-4B61-9685-4E6C8037F4C6','3289A3D2-0691-4AD1-BDF3-1FD784564E71','¯õȹ͵DZװϲУϸ','','',GETDATE(),6) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('C7593DCE-AA2A-4049-91E5-39E0E9B0E13A','3289A3D2-0691-4AD1-BDF3-1FD784564E71','̵̵尲װϲԣ̵ųڰȫλá','','',GETDATE(),7) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('583F587F-DAC6-480B-9731-5BAC193E7F96','3289A3D2-0691-4AD1-BDF3-1FD784564E71','µѾҪúá','','',GETDATE(),8) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('5DFCD094-DDF7-4B2C-9734-37FF80763974','3289A3D2-0691-4AD1-BDF3-1FD784564E71','¯߱Ѿò¯ңͻϹӦ̣ȷϡ','','',GETDATE(),9) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('FA2DCD68-F4CE-495A-AF9F-E368248D5386','3289A3D2-0691-4AD1-BDF3-1FD784564E71','ͻϵѾòñ,¯ѡĸλá','','',GETDATE(),10) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('3DEF5BB6-E60F-4F7A-85AB-74FE48BE3E93','3289A3D2-0691-4AD1-BDF3-1FD784564E71','¯ȼϣͣȼȵλ','','',GETDATE(),11) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('ED369C77-1B1A-46DE-826E-DDD9E866A4D7','3289A3D2-0691-4AD1-BDF3-1FD784564E71','ʱ¯ϡ','','',GETDATE(),12) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('A0C6A601-ABBE-4EBF-9193-2796F56ADD91','3289A3D2-0691-4AD1-BDF3-1FD784564E71','𡢰ȫʩϺ¯Ҫ','','',GETDATE(),13) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('177F8D2C-BE13-437E-92EB-B0C79797F161','3289A3D2-0691-4AD1-BDF3-1FD784564E71','','','',GETDATE(),14) + +--WP12 Գ +delete PreRun_WorkInspectTemplate where WorkInspectId='19BE0861-1AD7-40A3-AA18-01C5CEB64131' +delete PreRun_WorkInspectTemplate where WorkInspectId='B55865DC-035D-48B5-84BE-7C34C3353B21' +delete PreRun_WorkInspectTemplate where WorkInspectId='0B8CB7D6-8D89-4427-A62E-739643E2F1C2' +delete PreRun_WorkInspectTemplate where WorkInspectId='2D114EBD-FE45-4D50-AF13-C79063C8D475' +delete PreRun_WorkInspectTemplate where WorkInspectId='F58D79AE-9579-4BB9-AA39-AC5B92D21059' +delete PreRun_WorkInspectTemplate where WorkInspectId='EC7F7D2E-CE08-4F89-9538-03650EFB45BD' +delete PreRun_WorkInspectTemplate where WorkInspectId='F71B00D0-2029-458F-A3AE-D4B624F0908A' +delete PreRun_WorkInspectTemplate where WorkInspectId='1427A267-A5A2-4D46-A2AA-EE3337966481' +delete PreRun_WorkInspectTemplate where WorkInspectId='A1EEC73A-7499-4E3E-BFF3-6C997E5F9122' +delete PreRun_WorkInspectTemplate where WorkInspectId='44EF73C6-AE42-4062-80FA-F9A9AD72E8BD' +delete PreRun_WorkInspectTemplate where WorkInspectId='94493ADE-6942-43B3-A91E-528C5F9A9494' +delete PreRun_WorkInspectTemplate where WorkInspectId='5A4BF482-A006-4C74-85E6-2CB819498435' +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('19BE0861-1AD7-40A3-AA18-01C5CEB64131','963E658B-CB53-4FEA-BA7D-723C538B2BD5','鰲װȫƺ͹淶Ĺ涨װ¼ȫ','','',GETDATE(),1) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('B55865DC-035D-48B5-84BE-7C34C3353B21','963E658B-CB53-4FEA-BA7D-723C538B2BD5','ܵϵͳѹϴɨϸϸ','','',GETDATE(),2) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('0B8CB7D6-8D89-4427-A62E-739643E2F1C2','963E658B-CB53-4FEA-BA7D-723C538B2BD5','·ϵͳѧϴͳϴϸ','','',GETDATE(),3) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('2D114EBD-FE45-4D50-AF13-C79063C8D475','963E658B-CB53-4FEA-BA7D-723C538B2BD5','DZװ꣬ϵͳơĵԷҪ','','',GETDATE(),4) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('F58D79AE-9579-4BB9-AA39-AC5B92D21059','963E658B-CB53-4FEA-BA7D-723C538B2BD5','ٻ١ΣϵͳװϡԺϸ','','',GETDATE(),5) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('EC7F7D2E-CE08-4F89-9538-03650EFB45BD','963E658B-CB53-4FEA-BA7D-723C538B2BD5','ʴʩѻɡ','','',GETDATE(),6) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('F71B00D0-2029-458F-A3AE-D4B624F0908A','963E658B-CB53-4FEA-BA7D-723C538B2BD5','鰲װҪ','','',GETDATE(),7) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('1427A267-A5A2-4D46-A2AA-EE3337966481','963E658B-CB53-4FEA-BA7D-723C538B2BD5','߱ȴˮDZȷӦ','','',GETDATE(),8) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('A1EEC73A-7499-4E3E-BFF3-6C997E5F9122','963E658B-CB53-4FEA-BA7D-723C538B2BD5','DZߡ¼뱸Աλ','','',GETDATE(),9) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('44EF73C6-AE42-4062-80FA-F9A9AD72E8BD','963E658B-CB53-4FEA-BA7D-723C538B2BD5','ֳȫʩͶƷ׼','','',GETDATE(),10) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('94493ADE-6942-43B3-A91E-528C5F9A9494','963E658B-CB53-4FEA-BA7D-723C538B2BD5','DZߡ¼룬Աλ','','',GETDATE(),11) +INSERT INTO dbo.PreRun_WorkInspectTemplate(WorkInspectId,WorkPackId,WorkInspectName,Remark,AddUser,AddTime,Sort) VALUES('5A4BF482-A006-4C74-85E6-2CB819498435','963E658B-CB53-4FEA-BA7D-723C538B2BD5','','','',GETDATE(),12) + +--ҵ߼ɾ +truncate table PreRun_SubInspectTerm +truncate table PreRun_SubInspectTermItem + +--Ӽβ˵ +delete Sys_Menu where MenuId='B6A6EA7D-EDAB-40C8-920D-A106731D0E08' +delete Sys_Menu where MenuId='8542644D-BD9B-4188-9FDE-AE5D6D6D9A40' +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)VALUES('B6A6EA7D-EDAB-40C8-920D-A106731D0E08','β',null,'TestRun/BeforeTestRun/InspectTailTermList.aspx',8,'AD6E08B6-5571-4FFB-BDBE-9E6811770BD6','Menu_TestRun',0,1,1) +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Icon,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)VALUES('8542644D-BD9B-4188-9FDE-AE5D6D6D9A40','',null,'TestRun/BeforeTestRun/TailTermApproveList.aspx',9,'AD6E08B6-5571-4FFB-BDBE-9E6811770BD6','Menu_TestRun',0,1,1) +GO + +--ְ +alter table PreRun_SubInspectTerm add Subcontractor varchar(50) null +--а +alter table PreRun_SubInspectTerm add Contractor varchar(50) null +-- +alter table PreRun_SubInspectTerm add Supervision varchar(50) null +--ҵ +alter table PreRun_SubInspectTerm add Owner varchar(50) null +--0=ȫ1=ܵ2=豸 +alter table PreRun_WorkPackage add WorkPackType int null +alter table PreRun_SubInspectTerm add WorkPackType int null +--ܵ豸 +alter table PreRun_SubInspectTerm add PropertyTechnologyId varchar(50) null +go + +--==ϵͳ +if object_id(N'PreRun_SubInspectTermItem',N'U') is not null +drop table dbo.PreRun_SubInspectTermItem +CREATE TABLE dbo.PreRun_SubInspectTermItem( + TermItemId varchar(50) NOT NULL,-- + SubItemId varchar(50) NULL,-- + SubInspectId varchar(50) NULL,-- + WorkPackId varchar(50) NULL,-- + ProjectId varchar(50) NULL,--Ŀ + WorkInspectId varchar(50) NOT NULL,--ģ + WorkInspectName varchar(500) NULL,-- + InstallationId varchar(50) NULL,--װ(ֶΣڹ) + ProcessesId varchar(50) NULL,--(ֶΣڹ) + SystemId varchar(50) NULL,--ϵͳ(ֶΣڹ) + SubSystemId varchar(50) NULL,--ϵͳ + InspectedUser varchar(50) NULL,-- + InspectionResults int NULL,--0:δͨ 1:ͨ + InspectionIllustrate varchar(200) NULL,--˵ + Subcontractor varchar(50) null,--ְ + Contractor varchar(50) null,--а + Supervision varchar(50) null,-- + Owner varchar(50) null,--ҵ + WorkPackType int null,--0=ȫ1=ܵ2=豸 + PropertyTechnologyId varchar(50) null,--ܵ豸 + Remark varchar(200) NULL,--ע + AddUser varchar(50) NULL,-- + AddTime datetime NULL,-- + Sort int NULL,-- + CONSTRAINT PK_PreRun_SubInspectTermItem PRIMARY KEY CLUSTERED +( + TermItemId ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO + +--Ԥ +delete PreRun_WorkPackage where WorkPackId='1C01150C-977E-499A-9173-95F319BEEF87' +delete PreRun_WorkPackage where WorkPackId='641DA0F4-42A7-4DE3-9A57-95A606016655' +delete PreRun_WorkPackage where WorkPackId='BEB24AE8-F66D-458B-ADFD-3810405B5EB8' +delete PreRun_WorkPackage where WorkPackId='02BC1E1E-E531-4738-B6EC-5CE5BDC47B43' +delete PreRun_WorkPackage where WorkPackId='474F94B6-E927-4E9A-A544-F8E1AE63F6FF' +delete PreRun_WorkPackage where WorkPackId='3289A3D2-0691-4AD1-BDF3-1FD784564E71' +delete PreRun_WorkPackage where WorkPackId='445B915B-3E6D-47BE-BFF4-8762695ADB20' +delete PreRun_WorkPackage where WorkPackId='73C7D1D7-6DA3-44DD-A88B-7DF0FF15AA4F' +delete PreRun_WorkPackage where WorkPackId='8845C52D-4C56-442E-9237-CE33E8FC66AA' +delete PreRun_WorkPackage where WorkPackId='B0D040D4-5867-4335-9258-75504E73987E' +delete PreRun_WorkPackage where WorkPackId='84C6DAD6-3ED8-4869-ADB4-2EDA3512DB16' +delete PreRun_WorkPackage where WorkPackId='963E658B-CB53-4FEA-BA7D-723C538B2BD5' +delete PreRun_WorkPackage where WorkPackId='598A028A-5812-40E3-9D9D-5180A36F4453' +delete PreRun_WorkPackage where WorkPackId='6D827784-6ABD-4327-ABB7-FDABAC99853F' +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('1C01150C-977E-499A-9173-95F319BEEF87','Գ',2,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),1) +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('641DA0F4-42A7-4DE3-9A57-95A606016655','ܵϴ',1,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),2) +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('BEB24AE8-F66D-458B-ADFD-3810405B5EB8','ܵɨ',1,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),3) +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('02BC1E1E-E531-4738-B6EC-5CE5BDC47B43','ɨ',1,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),4) +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('474F94B6-E927-4E9A-A544-F8E1AE63F6FF','ѧϴ',1,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),5) +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('3289A3D2-0691-4AD1-BDF3-1FD784564E71','¯',2,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),6) +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('445B915B-3E6D-47BE-BFF4-8762695ADB20','߻װ',2,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),7) +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('73C7D1D7-6DA3-44DD-A88B-7DF0FF15AA4F','ɸװ',2,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),8) +--INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +--VALUES('8845C52D-4C56-442E-9237-CE33E8FC66AA','','','','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),9) +--INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +--VALUES('B0D040D4-5867-4335-9258-75504E73987E','DZ','','','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),10) +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('84C6DAD6-3ED8-4869-ADB4-2EDA3512DB16','ֻԳ',2,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),11) +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('963E658B-CB53-4FEA-BA7D-723C538B2BD5','Գ',2,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),12) +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('598A028A-5812-40E3-9D9D-5180A36F4453','',1,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),13) +INSERT INTO dbo.PreRun_WorkPackage(WorkPackId,WorkPackName,WorkPackType,Remark,AddUser,AddTime,Sort) +VALUES('6D827784-6ABD-4327-ABB7-FDABAC99853F','ȼ',0,'','C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0',GETDATE(),14) +go + +--==β +if object_id(N'PreRun_InspectTailTerm',N'U') is not null +drop table dbo.PreRun_InspectTailTerm +CREATE TABLE dbo.PreRun_InspectTailTerm( + TailTermId varchar(50) NOT NULL,-- + ProjectId varchar(50) NULL,--Ŀ + ProjectName varchar(50) NULL,--Ŀ + TailTermCode varchar(50) NULL,--Ѳ + ConstructionUnit varchar(50) NULL,--ʩλ + ProblemType int NULL,--1:ܵ2:豸 + QuestionTechnologyId varchar(50) NULL,--ܵ豸 + TermItemId varchar(50) NULL,-- + WorkPackId varchar(50) NULL,-- + QuestionDesc varchar(max) NULL,-- + RectifyOpinion varchar(max) NULL,-- + RectifyTime datetime NULL,--ʱ + InspectUser varchar(50) NULL,-- + ApproveUser varchar(50) NULL,-- + ApproveState int NULL,--0:ύ1:˻2:3:ͨ + AddUser varchar(50) NULL,-- + AddTime datetime NULL,-- + CONSTRAINT PK_PreRun_InspectTailTerm PRIMARY KEY CLUSTERED +( + TailTermId ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO + +--==˼¼ +if object_id(N'PreRun_InspectTermApproveRecords',N'U') is not null +drop table dbo.PreRun_InspectTermApproveRecords +CREATE TABLE dbo.PreRun_InspectTermApproveRecords( + InspectTermId varchar(50) NOT NULL,-- + ProjectId varchar(50) NULL,--Ŀ + TermItemId varchar(50) NULL,-- + TailTermId varchar(50) NULL,--β + ApproveOpinion varchar(max) NULL,-- + ApproveTime datetime NULL,--ʱ + ApproveUser varchar(50) NULL,-- + ApproveState int NULL,--0:˻1:ͨ + AddUser varchar(50) NULL,-- + AddTime datetime NULL,-- + CONSTRAINT PK_PreRun_InspectTermApproveRecords PRIMARY KEY CLUSTERED +( + InspectTermId ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO diff --git a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs index 7a6318bf..03c4a833 100644 --- a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs +++ b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs @@ -237,7 +237,7 @@ namespace BLL CheckItemDetailSetId = x.CheckItemSetId, CheckItemDetailContent = x.CheckItemSetContent, - Rectification_Date = x.Rectification_Date + Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date), }; return getInfo.ToList(); } @@ -289,7 +289,7 @@ namespace BLL CheckItemDetailSetId=x.CheckItemSetId, CheckItemDetailContent=x.CheckItemSetContent, - Rectification_Date=x.Rectification_Date + Rectification_Date= string.Format("{0:yyyy-MM-dd}", x.Rectification_Date), }; return getInfo.First(); } @@ -328,7 +328,7 @@ namespace BLL //整改日期、检查内容、检查内容id CheckItemSetId= newDetail.CheckItemDetailSetId, CheckItemSetContent= newDetail.CheckItemDetailContent, - Rectification_Date=newDetail.Rectification_Date + Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date) }; if (newCheckSpecialDetail.CompleteStatus == false && newCheckSpecialDetail.HandleStep.Contains("1") && string.IsNullOrEmpty(newCheckSpecialDetail.HiddenHazardType)) { @@ -374,7 +374,7 @@ namespace BLL //整改日期、检查内容、检查内容id updateDetail.CheckItemSetId = newDetail.CheckItemDetailSetId; updateDetail.CheckItemSetContent = newDetail.CheckItemDetailContent; - updateDetail.Rectification_Date = newDetail.Rectification_Date; + updateDetail.Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date); db.SubmitChanges(); } ////保存附件 diff --git a/SGGL/BLL/API/HSSE/APILicenseDataService.cs b/SGGL/BLL/API/HSSE/APILicenseDataService.cs index 7fcf5dd7..431a9686 100644 --- a/SGGL/BLL/API/HSSE/APILicenseDataService.cs +++ b/SGGL/BLL/API/HSSE/APILicenseDataService.cs @@ -58,6 +58,12 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.FireWorkId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireLevel = x.FireLevel, + SignatureUrl=x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -96,6 +102,15 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.HeightWorkId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + WorkHeight = x.WorkHeight, + HeightLevel = x.HeightLevel, + FireWatchManName = x.FireWatchManName, + WorkLeaderName = x.WorkLeaderName, + WorkLeaderTel = x.WorkLeaderTel, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -134,6 +149,17 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.LimitedSpaceId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LimitedDescribe = x.LimitedDescribe, + IsBoolOther = x.IsBoolOther, + IsBoolHarmfulGas = x.IsBoolHarmfulGas, + TestResult = x.TestResult, + TestDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TestDate), + TestPerson = x.TestPerson, + VenStep = x.VenStep, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -155,14 +181,18 @@ namespace BLL ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate), RadialType = x.RadialType, WorkLeaderId = x.WorkLeaderId, - WorkLeaderName = db.Sys_User.First(u => u.UserId == x.WorkLeaderId).UserName, + //负责人 + // WorkLeaderName = db.Sys_User.First(u => u.UserId == x.WorkLeaderId).UserName, + WorkLeaderName=x.WorkLeaderName, WorkLeaderTel = x.WorkLeaderTel, ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), WorkPalce = x.WorkPalce, WorkMeasures = x.WorkMeasures, FireWatchManId = x.FireWatchManId, - FireWatchManName = db.Sys_User.First(u => u.UserId == x.FireWatchManId).UserName, + //监护人 + // FireWatchManName = db.Sys_User.First(u => u.UserId == x.FireWatchManId).UserName, + FireWatchManName=x.FireWatchManName, WatchManContact = x.WatchManContact, CancelManId = x.CancelManId, CancelManName = db.Sys_User.First(u => u.UserId == x.CancelManId).UserName, @@ -177,6 +207,10 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.RadialWorkId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -215,6 +249,12 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.OpenCircuitId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -252,6 +292,13 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.BreakGroundId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -294,6 +341,7 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.NightWorkId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -332,6 +380,64 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.LiftingWorkId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LiftingHeight = x.LiftingHeight, + FireWatchManName = x.FireWatchManName, + WorkLeaderName = x.WorkLeaderName, + WorkLeaderTel = x.WorkLeaderTel, + QzgName = x.QzgName, + QzgPhone = x.QzgPhone, + SignatureUrl = x.SignatureUrl, + SjPhone=x.SjPhone, + SjName=x.SjName + }).FirstOrDefault(); + } + #endregion + + #region 临时用电作业票 + if (strMenuId == Const.ProjectElectricityMenuId) + { + getInfo = (from x in db.License_Electricity + where x.ElectricityId == id + select new Model.LicenseDataItem + { + LicenseId = x.ElectricityId, + MenuId = strMenuId, + ProjectId = x.ProjectId, + LicenseCode = x.LicenseCode, + ApplyUnitId = x.ApplyUnitId, + ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.ApplyUnitId).UnitName, + ApplyManId = x.ApplyManId, + ApplyManName = db.Sys_User.First(u => u.UserId == x.ApplyManId).UserName, + ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate), + WorkPalce = x.WorkPalce, + WorkDepth = x.WorkDepth, + ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), + ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + WorkMeasures = x.WorkMeasures, + CancelManId = x.CancelManId, + CancelManName = db.Sys_User.First(u => u.UserId == x.CancelManId).UserName, + CancelReasons = x.CancelReasons, + CancelTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CancelTime), + CloseManId = x.CloseManId, + CloseManName = db.Sys_User.First(u => u.UserId == x.CloseManId).UserName, + CloseReasons = x.CloseReasons, + CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), + NextManId = x.NextManId, + NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName, + AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.ElectricityId).AttachUrl.Replace('\\', '/'), + States = x.States, + OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, + WorkLeaderName=x.WorkLeaderName, + WorkLeaderTel=x.WorkLeaderTel, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -419,6 +525,12 @@ namespace BLL CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason=x.Reason, + FireLevel=x.FireLevel, + SignatureUrl = x.SignatureUrl }).ToList(); } #endregion @@ -455,6 +567,16 @@ namespace BLL CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + WorkHeight=x.WorkHeight, + HeightLevel=x.HeightLevel, + FireWatchManName=x.FireWatchManName, + WorkLeaderName=x.WorkLeaderName, + WorkLeaderTel=x.WorkLeaderTel, + SignatureUrl = x.SignatureUrl + }).ToList(); } #endregion @@ -491,6 +613,20 @@ namespace BLL CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LimitedDescribe=x.LimitedDescribe, + IsBoolOther=x.IsBoolOther, + IsBoolHarmfulGas=x.IsBoolHarmfulGas, + TestResult=x.TestResult, + TestDate= string.Format("{0:yyyy-MM-dd HH:mm}", x.TestDate), + TestPerson=x.TestPerson, + VenStep=x.VenStep, + SignatureUrl = x.SignatureUrl + + + }).ToList(); } #endregion @@ -514,14 +650,16 @@ namespace BLL ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate), RadialType = x.RadialType, WorkLeaderId = x.WorkLeaderId, - WorkLeaderName = db.Sys_User.First(u => u.UserId == x.WorkLeaderId).UserName, + //WorkLeaderName = db.Sys_User.First(u => u.UserId == x.WorkLeaderId).UserName, + WorkLeaderName=x.WorkLeaderName, WorkLeaderTel = x.WorkLeaderTel, ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), WorkPalce = x.WorkPalce, WorkMeasures = x.WorkMeasures, FireWatchManId = x.FireWatchManId, - FireWatchManName = db.Sys_User.First(u => u.UserId == x.FireWatchManId).UserName, + //FireWatchManName = db.Sys_User.First(u => u.UserId == x.FireWatchManId).UserName, + FireWatchManName=x.FireWatchManName, WatchManContact = x.WatchManContact, CancelManId = x.CancelManId, CancelManName = db.Sys_User.First(u => u.UserId == x.CancelManId).UserName, @@ -534,6 +672,10 @@ namespace BLL NextManId = x.NextManId, NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName, States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + SignatureUrl = x.SignatureUrl }).ToList(); } #endregion @@ -570,6 +712,12 @@ namespace BLL CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason=x.Reason, + FireWatchManName=x.FireWatchManName, + SignatureUrl = x.SignatureUrl }).ToList(); } #endregion @@ -605,6 +753,12 @@ namespace BLL CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason=x.Reason, + FireWatchManName=x.FireWatchManName, + SignatureUrl = x.SignatureUrl }).ToList(); } #endregion @@ -647,6 +801,7 @@ namespace BLL NextManId = x.NextManId, NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName, States = x.States, + SignatureUrl = x.SignatureUrl }).ToList(); } #endregion @@ -685,6 +840,60 @@ namespace BLL NextManId = x.NextManId, NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName, States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LiftingHeight=x.LiftingHeight, + FireWatchManName=x.FireWatchManName, + WorkLeaderName=x.WorkLeaderName, + WorkLeaderTel=x.WorkLeaderTel, + QzgName=x.QzgName, + QzgPhone=x.QzgPhone, + SignatureUrl = x.SignatureUrl + }).ToList(); + } + #endregion + + #region 临时用电作业票 + if (strMenuId == Const.ProjectElectricityMenuId) + { + getInfoList = (from x in db.License_Electricity + where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) + && (states == null || x.States == states) + orderby x.LicenseCode descending + select new Model.LicenseDataItem + { + LicenseId = x.ElectricityId, + MenuId = strMenuId, + ProjectId = x.ProjectId, + LicenseCode = x.LicenseCode, + ApplyUnitId = x.ApplyUnitId, + ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.ApplyUnitId).UnitName, + ApplyManId = x.ApplyManId, + ApplyManName = db.Sys_User.First(u => u.UserId == x.ApplyManId).UserName, + ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate), + WorkPalce = x.WorkPalce, + WorkDepth = x.WorkDepth, + ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), + ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + WorkMeasures = x.WorkMeasures, + CancelManId = x.CancelManId, + CancelManName = db.Sys_User.First(u => u.UserId == x.CancelManId).UserName, + CancelReasons = x.CancelReasons, + CancelTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CancelTime), + CloseManId = x.CloseManId, + CloseManName = db.Sys_User.First(u => u.UserId == x.CloseManId).UserName, + CloseReasons = x.CloseReasons, + CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), + States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, + WorkLeaderName=x.WorkLeaderName, + WorkLeaderTel=x.WorkLeaderTel, + SignatureUrl = x.SignatureUrl }).ToList(); } #endregion @@ -760,6 +969,11 @@ namespace BLL ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireLevel = x.FireLevel, }).ToList(); if (getFireWork.Count() > 0) { @@ -788,6 +1002,14 @@ namespace BLL ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + WorkHeight = x.WorkHeight, + HeightLevel = x.HeightLevel, + FireWatchManName = x.FireWatchManName, + WorkLeaderName = x.WorkLeaderName, + WorkLeaderTel = x.WorkLeaderTel, }).ToList(); if (getHeightWork.Count() > 0) { @@ -815,6 +1037,17 @@ namespace BLL ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LimitedDescribe = x.LimitedDescribe, + IsBoolOther = x.IsBoolOther, + IsBoolHarmfulGas = x.IsBoolHarmfulGas, + TestResult = x.TestResult, + TestDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TestDate), + TestPerson = x.TestPerson, + VenStep = x.VenStep, + }).ToList(); if (getLimitedSpace.Count() > 0) { @@ -843,6 +1076,9 @@ namespace BLL ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), WorkPalce = x.WorkPalce, States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), }).ToList(); if (getRadialWork.Count() > 0) { @@ -871,6 +1107,11 @@ namespace BLL ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), RoadName = x.RoadName, States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, }).ToList(); if (getOpenCircuit.Count() > 0) { @@ -899,6 +1140,11 @@ namespace BLL ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, }).ToList(); if (getBreakGround.Count() > 0) { @@ -954,6 +1200,15 @@ namespace BLL ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LiftingHeight = x.LiftingHeight, + FireWatchManName = x.FireWatchManName, + WorkLeaderName = x.WorkLeaderName, + WorkLeaderTel = x.WorkLeaderTel, + QzgName = x.QzgName, + QzgPhone = x.QzgPhone, }).ToList(); if (getLiftingWork.Count() > 0) { @@ -961,6 +1216,41 @@ namespace BLL } #endregion + #region 临时用电作业票 + var getElectricity = (from x in db.License_Electricity + where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) + && (states == null || x.States == states) + select new Model.LicenseDataItem + { + LicenseId = x.ElectricityId, + MenuId = Const.ProjectElectricityMenuId, + MenuName = "临时用电", + ProjectId = x.ProjectId, + LicenseCode = x.LicenseCode, + ApplyUnitId = x.ApplyUnitId, + ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.ApplyUnitId).UnitName, + ApplyManId = x.ApplyManId, + ApplyManName = db.Sys_User.First(u => u.UserId == x.ApplyManId).UserName, + ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate), + WorkPalce = x.WorkPalce, + WorkDepth = x.WorkDepth, + ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), + ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, + WorkLeaderName=x.WorkLeaderName, + WorkLeaderTel=x.WorkLeaderTel, + }).ToList(); + if (getElectricity.Count() > 0) + { + getInfoList.AddRange(getElectricity); + } + #endregion + #region 作业票【定稿 】"待开工"="1";"作业中"="2";"已关闭"="3";"已取消"="-1" var getLicenseManager = (from x in db.License_LicenseManager where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null) @@ -1049,6 +1339,8 @@ namespace BLL IsAgree = x.IsAgree, Opinion = x.Opinion, IsFlowEnd = x.IsFlowEnd ?? false, + SignatureUrl = x.SignatureUrl, + AttachUrl = AttachFileService.getFileUrl(x.FlowOperateId) }).ToList(); return getInfoList; @@ -1106,6 +1398,11 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId=newItem.WorkAreaId, + Reason=newItem.Reason, + FireLevel=newItem.FireLevel, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) @@ -1156,6 +1453,11 @@ namespace BLL updateFireWork.WorkMeasures = newFireWork.WorkMeasures; updateFireWork.NextManId = newFireWork.NextManId; updateFireWork.States = newFireWork.States; + + updateFireWork.WorkAreaId = newItem.WorkAreaId; + updateFireWork.Reason = newItem.Reason; + updateFireWork.FireLevel = newItem.FireLevel; + updateFireWork.SignatureUrl = newItem.SignatureUrl; } updateFireWork.States = newFireWork.States; } @@ -1186,6 +1488,15 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId=newItem.WorkAreaId, + WorkHeight=newItem.WorkHeight, + HeightLevel=newItem.HeightLevel, + FireWatchManName=newItem.FireWatchManName, + WorkLeaderName=newItem.WorkLeaderName, + WorkLeaderTel=newItem.WorkLeaderTel, + SignatureUrl = newItem.SignatureUrl + }; if (newItem.States == Const.State_0) { @@ -1236,6 +1547,13 @@ namespace BLL updateHeightWork.EquipmentTools = newHeightWork.EquipmentTools; updateHeightWork.NextManId = newHeightWork.NextManId; updateHeightWork.States = newHeightWork.States; + updateHeightWork.WorkAreaId = newItem.WorkAreaId; + updateHeightWork.WorkHeight = newItem.WorkHeight; + updateHeightWork.HeightLevel = newItem.HeightLevel; + updateHeightWork.FireWatchManName = newItem.FireWatchManName; + updateHeightWork.WorkLeaderName = newItem.WorkLeaderName; + updateHeightWork.WorkLeaderTel = newItem.WorkLeaderTel; + updateHeightWork.SignatureUrl = newItem.SignatureUrl; } updateHeightWork.States = newHeightWork.States; } @@ -1266,6 +1584,16 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId=newItem.WorkAreaId, + LimitedDescribe =newItem.LimitedDescribe, + IsBoolOther=newItem.IsBoolOther, + IsBoolHarmfulGas=newItem.IsBoolHarmfulGas, + TestResult=newItem.TestResult, + TestDate= Funs.GetNewDateTime(newItem.TestDate), + TestPerson=newItem.TestPerson, + VenStep=newItem.VenStep, + SignatureUrl=newItem.SignatureUrl }; if (newItem.States == Const.State_0) { @@ -1315,6 +1643,16 @@ namespace BLL updateLimitedSpace.WorkMeasures = newLimitedSpace.WorkMeasures; updateLimitedSpace.NextManId = newLimitedSpace.NextManId; updateLimitedSpace.States = newLimitedSpace.States; + + updateLimitedSpace.WorkAreaId = newLimitedSpace.WorkAreaId; + updateLimitedSpace.LimitedDescribe = newLimitedSpace.LimitedDescribe; + updateLimitedSpace.IsBoolOther = newLimitedSpace.IsBoolOther; + updateLimitedSpace.IsBoolHarmfulGas = newLimitedSpace.IsBoolHarmfulGas; + updateLimitedSpace.TestResult = newLimitedSpace.TestResult; + updateLimitedSpace.TestDate = Funs.GetNewDateTime(newItem.TestDate); + updateLimitedSpace.TestPerson = newLimitedSpace.TestPerson; + updateLimitedSpace.VenStep = newLimitedSpace.VenStep; + updateLimitedSpace.SignatureUrl = newLimitedSpace.SignatureUrl; } updateLimitedSpace.States = newLimitedSpace.States; } @@ -1333,12 +1671,14 @@ namespace BLL ApplyDate = Funs.GetNewDateTime(newItem.ApplyDate), RadialType = newItem.RadialType, WorkLeaderId = newItem.WorkLeaderId, + WorkLeaderName = newItem.WorkLeaderName, WorkLeaderTel = newItem.WorkLeaderTel, ValidityStartTime = Funs.GetNewDateTime(newItem.ValidityStartTime), ValidityEndTime = Funs.GetNewDateTime(newItem.ValidityEndTime), WorkPalce = newItem.WorkPalce, WorkMeasures = newItem.WorkMeasures, FireWatchManId = newItem.FireWatchManId, + FireWatchManName=newItem.FireWatchManName, WatchManContact = newItem.WatchManContact, CancelManId = newItem.CancelManId, CancelReasons = newItem.CancelReasons, @@ -1348,6 +1688,9 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId = newItem.WorkAreaId, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) { @@ -1391,15 +1734,19 @@ namespace BLL { updateRadialWork.RadialType = newRadialWork.RadialType; updateRadialWork.WorkLeaderId = newRadialWork.WorkLeaderId; + updateRadialWork.WorkLeaderName = newRadialWork.WorkLeaderName; updateRadialWork.WorkLeaderTel = newRadialWork.WorkLeaderTel; updateRadialWork.ValidityStartTime = newRadialWork.ValidityStartTime; updateRadialWork.ValidityEndTime = newRadialWork.ValidityEndTime; updateRadialWork.WorkPalce = newRadialWork.WorkPalce; updateRadialWork.WorkMeasures = newRadialWork.WorkMeasures; updateRadialWork.FireWatchManId = newRadialWork.FireWatchManId; + updateRadialWork.FireWatchManName = newRadialWork.FireWatchManName; updateRadialWork.WatchManContact = newRadialWork.WatchManContact; updateRadialWork.NextManId = newRadialWork.NextManId; updateRadialWork.States = newRadialWork.States; + updateRadialWork.WorkAreaId = newRadialWork.WorkAreaId; + updateRadialWork.SignatureUrl = newRadialWork.SignatureUrl; } updateRadialWork.States = newRadialWork.States; } @@ -1430,6 +1777,12 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId = newItem.WorkAreaId, + Reason = newItem.Reason, + FireWatchManName = newItem.FireWatchManName, + SignatureUrl = newItem.SignatureUrl + }; if (newItem.States == Const.State_0) { @@ -1479,6 +1832,11 @@ namespace BLL updateOpenCircuit.SafeMeasures = newOpenCircuit.SafeMeasures; updateOpenCircuit.NextManId = newOpenCircuit.NextManId; updateOpenCircuit.States = newOpenCircuit.States; + + updateOpenCircuit.WorkAreaId = newOpenCircuit.WorkAreaId; + updateOpenCircuit.Reason = newOpenCircuit.Reason; + updateOpenCircuit.FireWatchManName = newOpenCircuit.FireWatchManName; + updateOpenCircuit.SignatureUrl = newOpenCircuit.SignatureUrl; } updateOpenCircuit.States = newOpenCircuit.States; } @@ -1508,6 +1866,11 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId = newItem.WorkAreaId, + Reason = newItem.Reason, + FireWatchManName = newItem.FireWatchManName, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) { @@ -1556,6 +1919,11 @@ namespace BLL updateBreakGround.WorkMeasures = newBreakGround.WorkMeasures; updateBreakGround.NextManId = newBreakGround.NextManId; updateBreakGround.States = newBreakGround.States; + + updateBreakGround.WorkAreaId = newBreakGround.WorkAreaId; + updateBreakGround.Reason = newBreakGround.Reason; + updateBreakGround.FireWatchManName = newBreakGround.FireWatchManName; + updateBreakGround.SignatureUrl = newBreakGround.SignatureUrl; } updateBreakGround.States = newBreakGround.States; } @@ -1588,6 +1956,7 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) { @@ -1639,6 +2008,7 @@ namespace BLL updateNightWork.SafeLeaderTel = newItem.SafeLeaderTel; updateNightWork.NextManId = newNightWork.NextManId; updateNightWork.States = newNightWork.States; + updateNightWork.SignatureUrl = newItem.SignatureUrl; } updateNightWork.States = newNightWork.States; } @@ -1669,6 +2039,18 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId = newItem.WorkAreaId, + LiftingHeight = newItem.LiftingHeight, + FireWatchManName = newItem.FireWatchManName, + WorkLeaderName = newItem.WorkLeaderName, + WorkLeaderTel = newItem.WorkLeaderTel, + QzgName = newItem.QzgName, + QzgPhone = newItem.QzgPhone, + SignatureUrl = newItem.SignatureUrl, + SjName=newItem.SjName, + SjPhone=newItem.SjPhone + }; if (newItem.States == Const.State_0) { @@ -1718,12 +2100,116 @@ namespace BLL updateLiftingWork.CraneCapacity = newLiftingWork.CraneCapacity; updateLiftingWork.NextManId = newLiftingWork.NextManId; updateLiftingWork.States = newLiftingWork.States; + + updateLiftingWork.WorkAreaId = newLiftingWork.WorkAreaId; + updateLiftingWork.LiftingHeight = newLiftingWork.LiftingHeight; + updateLiftingWork.FireWatchManName = newLiftingWork.FireWatchManName; + updateLiftingWork.WorkLeaderName = newLiftingWork.WorkLeaderName; + updateLiftingWork.WorkLeaderTel = newLiftingWork.WorkLeaderTel; + updateLiftingWork.QzgName = newLiftingWork.QzgName; + updateLiftingWork.QzgPhone = newLiftingWork.QzgPhone; + updateLiftingWork.SignatureUrl = newLiftingWork.SignatureUrl; + updateLiftingWork.SjName = newLiftingWork.SjName; + updateLiftingWork.SjPhone = newLiftingWork.SjPhone; } updateLiftingWork.States = newLiftingWork.States; } } #endregion + #region 临时用电作业票 + if (newItem.MenuId == Const.ProjectElectricityMenuId) + { + Model.License_Electricity newElectricity = new Model.License_Electricity + { + ElectricityId = strLicenseId, + ProjectId = projectId, + LicenseCode = newItem.LicenseCode, + ApplyUnitId = newItem.ApplyUnitId, + ApplyManId = newItem.ApplyManId, + ApplyDate = Funs.GetNewDateTime(newItem.ApplyDate), + WorkPalce = newItem.WorkPalce, + WorkDepth = newItem.WorkDepth, + ValidityStartTime = Funs.GetNewDateTime(newItem.ValidityStartTime), + ValidityEndTime = Funs.GetNewDateTime(newItem.ValidityEndTime), + WorkMeasures = newItem.WorkMeasures, + CancelManId = newItem.CancelManId, + CancelReasons = newItem.CancelReasons, + CancelTime = Funs.GetNewDateTime(newItem.CancelTime), + CloseManId = newItem.CloseManId, + CloseReasons = newItem.CloseReasons, + CloseTime = Funs.GetNewDateTime(newItem.CloseTime), + NextManId = newItem.NextManId, + States = newItem.States, + + WorkAreaId = newItem.WorkAreaId, + Reason = newItem.Reason, + FireWatchManName = newItem.FireWatchManName, + WorkLeaderName= newItem.WorkLeaderName, + WorkLeaderTel = newItem.WorkLeaderTel, + SignatureUrl=newItem.SignatureUrl + }; + if (newItem.States == Const.State_0) + { + newElectricity.NextManId = newItem.ApplyManId; + } + ////保存 + var updateElectricity = db.License_Electricity.FirstOrDefault(x => x.ElectricityId == strLicenseId); + if (updateElectricity == null) + { + newElectricity.ApplyDate = DateTime.Now; + strLicenseId = newElectricity.ElectricityId = SQLHelper.GetNewID(); + newElectricity.OldLicenseId = newItem.OldLicenseId; + newItem.LicenseCode = newElectricity.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectElectricityMenuId, newElectricity.ProjectId, newElectricity.ApplyUnitId); + db.License_Electricity.InsertOnSubmit(newElectricity); + ////增加一条编码记录 + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectElectricityMenuId, newElectricity.ProjectId, newElectricity.ApplyUnitId, newElectricity.ElectricityId, newElectricity.ApplyDate); + } + else + { + if (newItem.States == Const.State_3) + { + updateElectricity.CloseManId = newElectricity.CloseManId; + updateElectricity.CloseReasons = newElectricity.CloseReasons; + updateElectricity.CloseTime = DateTime.Now; + if (newElectricity.ValidityEndTime.HasValue && newElectricity.ValidityEndTime < DateTime.Now) + { + updateElectricity.CloseTime = newElectricity.ValidityEndTime; + } + } + else if (newItem.States == Const.State_R) + { + updateElectricity.CancelManId = newElectricity.CancelManId; + updateElectricity.CancelReasons = newElectricity.CancelReasons; + updateElectricity.CancelTime = DateTime.Now; + if (newElectricity.ValidityEndTime.HasValue && newElectricity.ValidityEndTime < DateTime.Now) + { + updateElectricity.CancelTime = newElectricity.ValidityEndTime; + } + } + else + { + updateElectricity.WorkPalce = newElectricity.WorkPalce; + updateElectricity.WorkDepth = newElectricity.WorkDepth; + updateElectricity.ValidityStartTime = newElectricity.ValidityStartTime; + updateElectricity.ValidityEndTime = newElectricity.ValidityEndTime; + updateElectricity.WorkMeasures = newElectricity.WorkMeasures; + updateElectricity.NextManId = newElectricity.NextManId; + updateElectricity.States = newElectricity.States; + + updateElectricity.WorkAreaId = newElectricity.WorkAreaId; + updateElectricity.Reason = newElectricity.Reason; + updateElectricity.FireWatchManName = newElectricity.FireWatchManName; + updateElectricity.WorkLeaderName = newElectricity.WorkLeaderName; + updateElectricity.WorkLeaderTel = newElectricity.WorkLeaderTel; + updateElectricity.SignatureUrl = newElectricity.SignatureUrl; + + } + updateElectricity.States = newElectricity.States; + } + } + #endregion + #region 作业票【定稿】 if (newItem.MenuId == Const.ProjectLicenseManagerMenuId) { @@ -1862,7 +2348,7 @@ namespace BLL updateFlowOperate.IsAgree = newItem.IsAgree; updateFlowOperate.Opinion = newItem.Opinion; updateFlowOperate.IsClosed = true; - + updateFlowOperate.SignatureUrl = newItem.SignatureUrl; db.SubmitChanges(); /////增加一条审核明细记录 @@ -1880,23 +2366,26 @@ namespace BLL #region 新增下一步审核记录 if (newItem.IsAgree == true) { - var getCloseAllOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && (!x.IsClosed.HasValue || x.IsClosed == false) && (!x.IsFlowEnd.HasValue || x.IsFlowEnd == false)); - if (getCloseAllOperate == null) - { - var getNextFlowOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && x.IsFlowEnd == true); - ////判断审核步骤是否结束 - if (getNextFlowOperate != null) - { - /////最后一步是关闭所有 步骤 - getNextFlowOperate.IsClosed = true; + //修改只需要一个人审批直接通过 + + //var getCloseAllOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && (!x.IsClosed.HasValue || x.IsClosed == false) && (!x.IsFlowEnd.HasValue || x.IsFlowEnd == false)); + //if (getCloseAllOperate == null) + //{ + //var getNextFlowOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && x.IsFlowEnd == true); + var getNextFlowOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId); + // ////判断审核步骤是否结束 + // if (getNextFlowOperate != null) + // { + /////最后一步是关闭所有 步骤 + getNextFlowOperate.IsClosed = true; getNextFlowOperate.OperaterTime = DateTime.Now; getNextFlowOperate.IsAgree = true; getNextFlowOperate.OperaterId = newItem.OperaterId; getNextFlowOperate.Opinion = "审核完成!"; boolIsFlowEnd = true; db.SubmitChanges(); - } - } + // } + //} #region 动火作业票 if (strMenuId == Const.ProjectFireWorkMenuId) @@ -2163,6 +2652,39 @@ namespace BLL } #endregion + #region 临时用电作业票 + if (strMenuId == Const.ProjectElectricityMenuId) + { + var getElectricity = db.License_Electricity.FirstOrDefault(x => x.ElectricityId == updateFlowOperate.DataId); + if (getElectricity != null) + { + getElectricity.NextManId = newItem.NextOperaterId; + if (newItem.IsAgree == true) + { + if (boolIsFlowEnd == true) + { + getElectricity.NextManId = null; + getElectricity.States = Const.State_2; + if (getElectricity.ValidityStartTime.HasValue && getElectricity.ValidityStartTime < DateTime.Now) + { + int days = 7; + if (getElectricity.ValidityEndTime.HasValue) + { + days = Convert.ToInt32((getElectricity.ValidityEndTime - getElectricity.ValidityStartTime).Value.TotalDays); + } + getElectricity.ValidityStartTime = DateTime.Now; + getElectricity.ValidityEndTime = DateTime.Now.AddDays(days); + } + } + } + else + { + getElectricity.States = Const.State_0; + } + db.SubmitChanges(); + } + } + #endregion if (!boolIsFlowEnd && !string.IsNullOrEmpty(newItem.NextOperaterId)) { List getUserIds = Funs.GetStrListByStr(newItem.NextOperaterId, ','); @@ -2270,7 +2792,8 @@ namespace BLL IsAgree = x.IsAgree, Opinion = x.Opinion, IsFlowEnd = x.IsFlowEnd ?? false, - SignatureUrl = db.Sys_User.First(y => y.UserId == x.OperaterId).SignatureUrl.Replace('\\', '/'), + SignatureUrl = x.SignatureUrl.Replace('\\', '/'), + AttachUrl = AttachFileService.getFileUrl(x.FlowOperateId) }; return getFlowOperate.FirstOrDefault(); } @@ -2291,6 +2814,7 @@ namespace BLL var getAllFlows = from x in db.License_FlowOperate where x.DataId == licenseInfo.LicenseId && (!x.IsFlowEnd.HasValue || x.IsFlowEnd == false) select x; + if (licenseInfo == null || string.IsNullOrEmpty(licenseInfo.LicenseId) || getAllFlows.Count() == 0) { getFlowOperate = (from x in db.Sys_MenuFlowOperate @@ -2617,6 +3141,17 @@ namespace BLL } #endregion + #region 临时用电作业票 + else if (newItem.MenuId == Const.ProjectElectricityMenuId) + { + var updateElectricity = db.License_Electricity.FirstOrDefault(x => x.ElectricityId == strLicenseId); + if (updateElectricity == null) + { + updateElectricity.NextManId = null; + updateElectricity.States = Const.State_C; + } + } + #endregion db.SubmitChanges(); } diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index aac29cc9..f1e8c5cc 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -296,6 +296,11 @@ namespace BLL /// public static string WorkPost_SafetyManager = "eac153fd-4cf3-4f5f-984d-022a636d47aa"; + /// + /// HSE副经理岗位Id + /// + public static string WorkPost_SafetyManagerFu = "46AA7960-1D35-4D5B-8C8F-AA4C874D63C8"; + /// /// 无损检测工岗位Id /// @@ -1951,6 +1956,10 @@ namespace BLL /// 吊装作业票 /// public const string ProjectLiftingWorkMenuId = "A1BE3AB6-9D4A-41E7-8870-E73423165451"; + /// + /// 临时用电作业票 + /// + public const string ProjectElectricityMenuId = "48F64E0F-38B2-4BDC-9B61-6200BD02CBF5"; #endregion #region HSSE检查管理 @@ -5543,5 +5552,10 @@ namespace BLL /// 实业 /// public const string SYHSEData_DataMenuId = "S89E5EC2-F725-4656-9110-5AF83C18FB6C"; + + /// + /// 检查表尾项管理 + /// + public const string InspectTailTerm = "B6A6EA7D-EDAB-40C8-920D-A106731D0E08"; } } \ No newline at end of file diff --git a/SGGL/BLL/HSSE/Check/Check_ProjectCheckItemSetService.cs b/SGGL/BLL/HSSE/Check/Check_ProjectCheckItemSetService.cs index ed18e1b8..381f4147 100644 --- a/SGGL/BLL/HSSE/Check/Check_ProjectCheckItemSetService.cs +++ b/SGGL/BLL/HSSE/Check/Check_ProjectCheckItemSetService.cs @@ -62,36 +62,42 @@ namespace BLL string type = string.Empty; if (CheckItem != null) { - Model.Check_ProjectCheckItemDetail detail = BLL.Check_ProjectCheckItemDetailService.GetCheckItemDetailById(CheckItem.ToString()); + //Model.Check_ProjectCheckItemDetail detail = BLL.Check_ProjectCheckItemDetailService.GetCheckItemDetailById(CheckItem.ToString()); + + //修改为项目安全检查项 + Model.Technique_CheckItemSet detail = Funs.DB.Technique_CheckItemSet.FirstOrDefault(x => x.CheckItemSetId == CheckItem.ToString()); + if (detail != null) { - Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(detail.CheckItemSetId); - if (item != null) - { - if (item.SupCheckItem == "0") - { - type = item.CheckItemName; - } - else - { - type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem); - } - } + type = detail.CheckItemName; + //Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(detail.CheckItemSetId); + //if (item != null) + //{ + // if (item.SupCheckItem == "0") + // { + // type = item.CheckItemName; + // } + // else + // { + // type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem); + // } + //} } else { - Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(CheckItem.ToString()); - if (item != null) - { - if (item.SupCheckItem == "0") - { - type = item.CheckItemName; - } - else - { - type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem); - } - } + type = "季节性/节假日检查(无类型)"; + //Model.Check_ProjectCheckItemSet item = BLL.Check_ProjectCheckItemSetService.GetCheckItemSetById(CheckItem.ToString()); + //if (item != null) + //{ + // if (item.SupCheckItem == "0") + // { + // type = item.CheckItemName; + // } + // else + // { + // type = BLL.Check_ProjectCheckItemSetService.GetCheckItemNameBySupCheckItem(item.SupCheckItem); + // } + //} } } return type; diff --git a/SGGL/BLL/HSSE/License/LicensePublicService.cs b/SGGL/BLL/HSSE/License/LicensePublicService.cs index cc73baf2..658271d8 100644 --- a/SGGL/BLL/HSSE/License/LicensePublicService.cs +++ b/SGGL/BLL/HSSE/License/LicensePublicService.cs @@ -76,6 +76,11 @@ namespace BLL CloseTime = fireWork.CloseTime, NextManId=fireWork.NextManId, States = fireWork.States, + + WorkAreaId=fireWork.WorkAreaId, + Reason=fireWork.Reason, + FireLevel=fireWork.FireLevel, + }; db.License_FireWork.InsertOnSubmit(newFireWork); db.SubmitChanges(); @@ -105,7 +110,11 @@ namespace BLL newFireWork.CloseReasons = fireWork.CloseReasons; newFireWork.CloseTime = fireWork.CloseTime; newFireWork.NextManId = fireWork.NextManId; - newFireWork.States = fireWork.States; + newFireWork.States = fireWork.States; + + newFireWork.WorkAreaId = fireWork.WorkAreaId; + newFireWork.Reason = fireWork.Reason; + newFireWork.FireLevel = fireWork.FireLevel; db.SubmitChanges(); } } @@ -172,6 +181,14 @@ namespace BLL CloseTime = heightWork.CloseTime, NextManId = heightWork.NextManId, States = heightWork.States, + + WorkAreaId=heightWork.WorkAreaId, + WorkHeight=heightWork.WorkHeight, + HeightLevel=heightWork.HeightLevel, + FireWatchManName=heightWork.FireWatchManName, + WorkLeaderName=heightWork.WorkLeaderName, + WorkLeaderTel= heightWork.WorkLeaderTel, + }; db.License_HeightWork.InsertOnSubmit(newHeightWork); db.SubmitChanges(); @@ -203,6 +220,13 @@ namespace BLL newHeightWork.CloseTime = heightWork.CloseTime; newHeightWork.NextManId = heightWork.NextManId; newHeightWork.States = heightWork.States; + + newHeightWork.WorkAreaId = heightWork.WorkAreaId; + newHeightWork.WorkHeight = heightWork.WorkHeight; + newHeightWork.HeightLevel = heightWork.HeightLevel; + newHeightWork.FireWatchManName = heightWork.FireWatchManName; + newHeightWork.WorkLeaderName = heightWork.WorkLeaderName; + newHeightWork.WorkLeaderTel = heightWork.WorkLeaderTel; db.SubmitChanges(); } } @@ -269,6 +293,16 @@ namespace BLL CloseTime = limitedSpace.CloseTime, NextManId = limitedSpace.NextManId, States = limitedSpace.States, + + WorkAreaId=limitedSpace.WorkAreaId, + LimitedDescribe=limitedSpace.LimitedDescribe, + IsBoolOther=limitedSpace.IsBoolOther, + IsBoolHarmfulGas=limitedSpace.IsBoolHarmfulGas, + TestResult=limitedSpace.TestResult, + TestDate=limitedSpace.TestDate, + TestPerson=limitedSpace.TestPerson, + VenStep=limitedSpace.VenStep, + }; db.License_LimitedSpace.InsertOnSubmit(newLimitedSpace); db.SubmitChanges(); @@ -299,6 +333,15 @@ namespace BLL newLimitedSpace.CloseTime = limitedSpace.CloseTime; newLimitedSpace.NextManId = limitedSpace.NextManId; newLimitedSpace.States = limitedSpace.States; + + newLimitedSpace.WorkAreaId = limitedSpace.WorkAreaId; + newLimitedSpace.LimitedDescribe = limitedSpace.LimitedDescribe; + newLimitedSpace.IsBoolOther = limitedSpace.IsBoolOther; + newLimitedSpace.IsBoolHarmfulGas = limitedSpace.IsBoolHarmfulGas; + newLimitedSpace.TestResult = limitedSpace.TestResult; + newLimitedSpace.TestDate = limitedSpace.TestDate; + newLimitedSpace.TestPerson = limitedSpace.TestPerson; + newLimitedSpace.VenStep = limitedSpace.VenStep; db.SubmitChanges(); } } @@ -368,6 +411,9 @@ namespace BLL CloseTime = radialWork.CloseTime, NextManId = radialWork.NextManId, States = radialWork.States, + + WorkAreaId=radialWork.WorkAreaId, + }; db.License_RadialWork.InsertOnSubmit(newRadialWork); db.SubmitChanges(); @@ -408,6 +454,8 @@ namespace BLL newRadialWork.CloseTime = radialWork.CloseTime; newRadialWork.NextManId = radialWork.NextManId; newRadialWork.States = radialWork.States; + + newRadialWork.WorkAreaId = radialWork.WorkAreaId; db.SubmitChanges(); } } @@ -476,6 +524,11 @@ namespace BLL CloseTime = openCircuit.CloseTime, NextManId = openCircuit.NextManId, States = openCircuit.States, + + WorkAreaId=openCircuit.WorkAreaId, + Reason=openCircuit.Reason, + FireWatchManName=openCircuit.FireWatchManName, + }; db.License_OpenCircuit.InsertOnSubmit(newOpenCircuit); db.SubmitChanges(); @@ -507,6 +560,10 @@ namespace BLL newOpenCircuit.CloseTime = openCircuit.CloseTime; newOpenCircuit.NextManId = openCircuit.NextManId; newOpenCircuit.States = openCircuit.States; + + newOpenCircuit.WorkAreaId = openCircuit.WorkAreaId; + newOpenCircuit.Reason = openCircuit.Reason; + newOpenCircuit.FireWatchManName = openCircuit.FireWatchManName; db.SubmitChanges(); } } @@ -572,6 +629,11 @@ namespace BLL CloseTime = breakGround.CloseTime, NextManId = breakGround.NextManId, States = breakGround.States, + + WorkAreaId=breakGround.WorkAreaId, + Reason=breakGround.Reason, + FireWatchManName=breakGround.FireWatchManName, + }; db.License_BreakGround.InsertOnSubmit(newBreakGround); db.SubmitChanges(); @@ -602,6 +664,10 @@ namespace BLL newBreakGround.CloseTime = breakGround.CloseTime; newBreakGround.NextManId = breakGround.NextManId; newBreakGround.States = breakGround.States; + + newBreakGround.WorkAreaId = breakGround.WorkAreaId; + newBreakGround.Reason = breakGround.Reason; + newBreakGround.FireWatchManName = breakGround.FireWatchManName; db.SubmitChanges(); } } @@ -771,6 +837,15 @@ namespace BLL CloseTime = liftingWork.CloseTime, NextManId = liftingWork.NextManId, States = liftingWork.States, + + WorkAreaId=liftingWork.WorkAreaId, + LiftingHeight=liftingWork.LiftingHeight, + FireWatchManName=liftingWork.FireWatchManName, + WorkLeaderName=liftingWork.WorkLeaderName, + WorkLeaderTel=liftingWork.WorkLeaderTel, + QzgName=liftingWork.QzgName, + QzgPhone=liftingWork.QzgPhone, + }; db.License_LiftingWork.InsertOnSubmit(newLiftingWork); db.SubmitChanges(); @@ -802,6 +877,14 @@ namespace BLL newLiftingWork.CloseTime = liftingWork.CloseTime; newLiftingWork.NextManId = liftingWork.NextManId; newLiftingWork.States = liftingWork.States; + + newLiftingWork.WorkAreaId = liftingWork.WorkAreaId; + newLiftingWork.LiftingHeight = liftingWork.LiftingHeight; + newLiftingWork.FireWatchManName = liftingWork.FireWatchManName; + newLiftingWork.WorkLeaderName = liftingWork.WorkLeaderName; + newLiftingWork.WorkLeaderTel = liftingWork.WorkLeaderTel; + newLiftingWork.QzgName = liftingWork.QzgName; + newLiftingWork.QzgPhone = liftingWork.QzgPhone; db.SubmitChanges(); } } @@ -828,6 +911,117 @@ namespace BLL } #endregion + #region 临时用电作业票 + /// + /// 根据主键获取临时用电作业票 + /// + /// + /// + public static Model.License_Electricity GetElectricityById(string ElectricityId) + { + return Funs.DB.License_Electricity.FirstOrDefault(e => e.ElectricityId == ElectricityId); + } + + /// + /// 添加临时用电作业票 + /// + /// + public static void AddElectricity(Model.License_Electricity Electricity) + { + Model.SGGLDB db = Funs.DB; + Model.License_Electricity newElectricity = new Model.License_Electricity + { + ElectricityId = Electricity.ElectricityId, + ProjectId = Electricity.ProjectId, + LicenseCode = Electricity.LicenseCode, + ApplyUnitId = Electricity.ApplyUnitId, + ApplyManId = Electricity.ApplyManId, + ApplyDate = Electricity.ApplyDate, + WorkPalce = Electricity.WorkPalce, + WorkDepth = Electricity.WorkDepth, + ValidityStartTime = Electricity.ValidityStartTime, + ValidityEndTime = Electricity.ValidityEndTime, + WorkMeasures = Electricity.WorkMeasures, + CancelManId = Electricity.CancelManId, + CancelReasons = Electricity.CancelReasons, + CancelTime = Electricity.CancelTime, + CloseManId = Electricity.CloseManId, + CloseReasons = Electricity.CloseReasons, + CloseTime = Electricity.CloseTime, + NextManId = Electricity.NextManId, + States = Electricity.States, + + WorkAreaId= Electricity.WorkAreaId, + Reason = Electricity.Reason, + FireWatchManName = Electricity.FireWatchManName, + WorkLeaderName = Electricity.WorkLeaderName, + WorkLeaderTel = Electricity.WorkLeaderTel, + + + }; + db.License_Electricity.InsertOnSubmit(newElectricity); + db.SubmitChanges(); + ////增加一条编码记录 + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectElectricityMenuId, Electricity.ProjectId, Electricity.ApplyUnitId, Electricity.ElectricityId, Electricity.ApplyDate); + } + + /// + /// 修改临时用电作业票 + /// + /// + public static void UpdateElectricity(Model.License_Electricity Electricity) + { + Model.SGGLDB db = Funs.DB; + Model.License_Electricity newElectricity = db.License_Electricity.FirstOrDefault(e => e.ElectricityId == Electricity.ElectricityId); + if (newElectricity != null) + { + newElectricity.WorkPalce = Electricity.WorkPalce; + newElectricity.WorkDepth = Electricity.WorkDepth; + newElectricity.ValidityStartTime = Electricity.ValidityStartTime; + newElectricity.ValidityEndTime = Electricity.ValidityEndTime; + newElectricity.WorkMeasures = Electricity.WorkMeasures; + newElectricity.CancelManId = Electricity.CancelManId; + newElectricity.CancelReasons = Electricity.CancelReasons; + newElectricity.CancelTime = Electricity.CancelTime; + newElectricity.CloseManId = Electricity.CloseManId; + newElectricity.CloseReasons = Electricity.CloseReasons; + newElectricity.CloseTime = Electricity.CloseTime; + newElectricity.NextManId = Electricity.NextManId; + newElectricity.States = Electricity.States; + + newElectricity.WorkAreaId = Electricity.WorkAreaId; + newElectricity.Reason = Electricity.Reason; + newElectricity.FireWatchManName = Electricity.FireWatchManName; + newElectricity.WorkLeaderName = Electricity.WorkLeaderName; + newElectricity.WorkLeaderTel = Electricity.WorkLeaderTel; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除临时用电作业票 + /// + /// + public static void DeleteElectricityById(string ElectricityId) + { + Model.SGGLDB db = Funs.DB; + Model.License_Electricity Electricity = db.License_Electricity.FirstOrDefault(e => e.ElectricityId == ElectricityId); + if (Electricity != null) + { + ///删除编码表记录 + CodeRecordsService.DeleteCodeRecordsByDataId(ElectricityId); + ////删除附件 + CommonService.DeleteAttachFileById(ElectricityId); + ///删除-安全措施 + DeleteLicenseItemByDataId(ElectricityId); + ///删除作业票审核信息 + DeleteFlowOperateByDataId(ElectricityId); + db.License_Electricity.DeleteOnSubmit(Electricity); + db.SubmitChanges(); + } + } + #endregion + #endregion #region 作业票-安全措施 diff --git a/SGGL/BLL/HSSE/Manager/HSSELogService.cs b/SGGL/BLL/HSSE/Manager/HSSELogService.cs index 6b39376a..690f45be 100644 --- a/SGGL/BLL/HSSE/Manager/HSSELogService.cs +++ b/SGGL/BLL/HSSE/Manager/HSSELogService.cs @@ -102,7 +102,7 @@ namespace BLL { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - Model.Manager_HSSELog newHSSELog =db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId); + Model.Manager_HSSELog newHSSELog = db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId); if (newHSSELog != null) { newHSSELog.CompileDate = updateHSSELog.CompileDate; @@ -980,5 +980,189 @@ namespace BLL } } #endregion + + #region 小程序接口 + /// + /// 返回列表 + /// + /// + /// + /// + public static List getHSSELogDataList(string projectId, string userId,string CompileMan,string CompileDate) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + List getInfoList = new List(); + getInfoList = (from x in db.Manager_HSSELog + join y in db.Sys_User on x.CompileMan equals y.UserId + join z in db.Sys_Const on x.Weather equals z.ConstValue + orderby x.CompileDate + where x.IsVisible != false && z.GroupId == BLL.ConstValue.Group_Weather && x.ProjectId == projectId + select new Model.HSSELogItem + { + HSSELogId = x.HSSELogId, + ProjectId = x.ProjectId, + CompileDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate), + CompileMan = x.CompileMan, + Weather = x.Weather, + IsVisible = x.IsVisible, + CompileManName = y.UserName, + WeatherName = z.ConstText + }).ToList(); + Model.Project_ProjectUser projectUser = BLL.ProjectUserService.GetProjectUserByUserIdProjectId(projectId, userId); + if (projectUser != null) + { + if (projectUser.RoleId.Contains(BLL.Const.HSSEEngineer)) //项目安全工程师只能看到自己的日志内容 + { + getInfoList = getInfoList.Where(x => x.CompileMan == userId).ToList(); + } + } + if (!string.IsNullOrEmpty(CompileMan)) + { + getInfoList = getInfoList.Where(x => x.CompileMan == CompileMan).ToList(); + } + if (!string.IsNullOrEmpty(CompileDate)) + { + getInfoList = getInfoList.Where(x => x.CompileDate == CompileDate).ToList(); + } + + return getInfoList; + } + } + + public static Model.HSSELogItem getHSSELogData(string HSSELogId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + Model.HSSELogItem model = new Model.HSSELogItem(); + model = (from x in db.Manager_HSSELog + join y in db.Sys_User on x.CompileMan equals y.UserId + join z in db.Sys_Const on x.Weather equals z.ConstValue + orderby x.CompileDate + where x.IsVisible != false && z.GroupId == BLL.ConstValue.Group_Weather && x.HSSELogId == HSSELogId + select new Model.HSSELogItem + { + HSSELogId = x.HSSELogId, + ProjectId = x.ProjectId, + CompileDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate), + CompileMan = x.CompileMan, + Weather = x.Weather, + IsVisible = x.IsVisible, + CompileManName = y.UserName, + WeatherName = z.ConstText, + + + Content1 = x.Num11.ToString(), + Content2= x.Contents12, + Content3= x.Contents13, + Content4= x.Contents21, + Content5= x.Num21.ToString(), + Content6= x.Contents22, + Content7 = x.Num22.ToString(), + Content8 = x.Contents23, + Content9 = x.Num23.ToString(), + Content10 = x.Contents24, + Content11 = x.Num24.ToString(), + Content12 = x.Contents210, + Content13 = x.Num210.ToString(), + Content14 = x.Num211.ToString(), + Content15 = x.Contents31, + Content16 = x.Num31.ToString(), + Content17 = x.Contents32, + Content18 = x.Num32.ToString(), + Content19 = x.Contents41, + Content20 = x.Contents42 + }).FirstOrDefault(); + + return model; + } + } + + /// + /// 增加HSSE日志暨管理数据收集 + /// + /// HSSE日志暨管理数据收集实体 + public static void AddHSSELogApi(Model.HSSELogItem HSSELog) + { + Model.Manager_HSSELog newHSSELog = new Model.Manager_HSSELog + { + HSSELogId = HSSELog.HSSELogId, + ProjectId = HSSELog.ProjectId, + CompileDate = Convert.ToDateTime(HSSELog.CompileDate), + CompileMan = HSSELog.CompileMan, + Weather = HSSELog.Weather, + IsVisible = HSSELog.IsVisible, + Num11 = Convert.ToInt32(HSSELog.Content1), + Contents12 = HSSELog.Content2, + Contents13 = HSSELog.Content3, + Contents21 = HSSELog.Content4, + Num21 = Convert.ToInt32(HSSELog.Content5), + Contents22 = HSSELog.Content6, + Num22 = Convert.ToInt32(HSSELog.Content7), + Contents23 = HSSELog.Content8, + Num23 = Convert.ToInt32(HSSELog.Content9), + Contents24 = HSSELog.Content10, + Num24 = Convert.ToInt32(HSSELog.Content11), + + Contents210 = HSSELog.Content12, + Num210 = Convert.ToInt32(HSSELog.Content13), + Num211 = Convert.ToInt32(HSSELog.Content14), + Contents31 = HSSELog.Content15, + Num31 = Convert.ToInt32(HSSELog.Content16), + Contents32 = HSSELog.Content17, + Num32 = Convert.ToInt32(HSSELog.Content18), + + Contents41 = HSSELog.Content19, + Contents42 = HSSELog.Content20 + }; + Funs.DB.Manager_HSSELog.InsertOnSubmit(newHSSELog); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改HSSE日志暨管理数据收集 + /// + /// + public static void UpdateHSSELogApi(Model.HSSELogItem updateHSSELog) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Manager_HSSELog newHSSELog = db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId); + if (newHSSELog != null) + { + newHSSELog.CompileDate = Convert.ToDateTime(updateHSSELog.CompileDate); + newHSSELog.CompileMan = updateHSSELog.CompileMan; + newHSSELog.Weather = updateHSSELog.Weather; + newHSSELog.IsVisible = updateHSSELog.IsVisible; + + newHSSELog.Num11 = Convert.ToInt32(updateHSSELog.Content1); + newHSSELog.Contents12 = updateHSSELog.Content2; + newHSSELog.Contents13 = updateHSSELog.Content3; + newHSSELog.Contents21 = updateHSSELog.Content4; + newHSSELog.Num21 = Convert.ToInt32(updateHSSELog.Content5); + newHSSELog.Contents22 = updateHSSELog.Content6; + newHSSELog.Num22 = Convert.ToInt32(updateHSSELog.Content7); + newHSSELog.Contents23 = updateHSSELog.Content8; + newHSSELog.Num23 = Convert.ToInt32(updateHSSELog.Content9); + newHSSELog.Contents24 = updateHSSELog.Content10; + newHSSELog.Num24 = Convert.ToInt32(updateHSSELog.Content11); + + newHSSELog.Contents210 = updateHSSELog.Content12; + newHSSELog.Num210 = Convert.ToInt32(updateHSSELog.Content13); + newHSSELog.Num211 = Convert.ToInt32(updateHSSELog.Content14); + newHSSELog.Contents31 = updateHSSELog.Content15; + newHSSELog.Num31 = Convert.ToInt32(updateHSSELog.Content16); + newHSSELog.Contents32 = updateHSSELog.Content17; + newHSSELog.Num32 = Convert.ToInt32(updateHSSELog.Content18); + + newHSSELog.Contents41 = updateHSSELog.Content19; + newHSSELog.Contents42 = updateHSSELog.Content20; + db.SubmitChanges(); + } + } + } + + + #endregion } } diff --git a/SGGL/BLL/HSSE/SitePerson/PersonService.cs b/SGGL/BLL/HSSE/SitePerson/PersonService.cs index 37d3e706..4dbd683d 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonService.cs @@ -397,7 +397,10 @@ namespace BLL /// HSE人员的数量 public static int GetHSEPersonCountByUnitId(string unitId, string projectId) { - var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && (x.WorkPostId == BLL.Const.WorkPost_HSSEEngineer || x.WorkPostId == BLL.Const.WorkPost_SafetyManager) && x.IsUsed == true select x).ToList(); + var q = (from x in Funs.DB.SitePerson_Person + join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId + where x.UnitId == unitId && x.ProjectId == projectId && y.IsHsse==true && x.IsUsed == true select x).ToList(); + //var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && (x.WorkPostId == BLL.Const.WorkPost_HSSEEngineer || x.WorkPostId == BLL.Const.WorkPost_SafetyManager) && x.IsUsed == true select x).ToList(); return q.Count(); } diff --git a/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs index d6f9ae17..34c56e87 100644 --- a/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Solution/ConstructSolution.aspx.cs @@ -304,11 +304,36 @@ namespace FineUIPro.Web.CQMS.Solution if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSConstructSolutionMenuId, Const.BtnDelete)) { var constructSolution = CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(id); - CQMSConstructSolutionApproveService.DeleteConstructSolutionApprovesByConstructSolutionId(id); - CQMSConstructSolutionService.DeleteConstructSolution(id); - LogService.AddSys_Log(CurrUser, constructSolution.Code, id, Const.CQMSConstructSolutionMenuId, "删除方案审查"); - BindGrid(); - Alert.ShowInTop("删除成功!", MessageBoxIcon.Success); + if (constructSolution.State== Const.CQMSConstructSolution_ReCompile|| constructSolution.State == Const.CQMSConstructSolution_Compile) + { + if (constructSolution.CompileMan==this.CurrUser.UserId|| this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId) + { + CQMSConstructSolutionApproveService.DeleteConstructSolutionApprovesByConstructSolutionId(id); + CQMSConstructSolutionService.DeleteConstructSolution(id); + LogService.AddSys_Log(CurrUser, constructSolution.Code, id, Const.CQMSConstructSolutionMenuId, "删除方案审查"); + BindGrid(); + Alert.ShowInTop("删除成功!", MessageBoxIcon.Success); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Success); + } + } + else + { + if (this.CurrUser.UserId==Const.hfnbdId|| this.CurrUser.UserId==Const.sysglyId) + { + + CQMSConstructSolutionApproveService.DeleteConstructSolutionApprovesByConstructSolutionId(id); + CQMSConstructSolutionService.DeleteConstructSolution(id); + LogService.AddSys_Log(CurrUser, constructSolution.Code, id, Const.CQMSConstructSolutionMenuId, "删除方案审查"); + BindGrid(); + Alert.ShowInTop("删除成功!", MessageBoxIcon.Success); + return; + } + Alert.ShowInTop("删除失败,方案正在审批中!", MessageBoxIcon.Success); + } + } else diff --git a/SGGL/FineUIPro.Web/DocManage/DocManageEdit.aspx b/SGGL/FineUIPro.Web/DocManage/DocManageEdit.aspx index cc5e25b4..d6ea4cd2 100644 --- a/SGGL/FineUIPro.Web/DocManage/DocManageEdit.aspx +++ b/SGGL/FineUIPro.Web/DocManage/DocManageEdit.aspx @@ -21,7 +21,7 @@ background-color: #FF7575; background-image: none; } - + .fontred { color: #FF7575; background-image: none; @@ -42,7 +42,7 @@ - + - - - - - - - - - - - - - - - - - - - - - - @@ -99,6 +72,15 @@ + + + + + + + + <%-- @@ -118,7 +100,7 @@ - + - - + + + + + + + + + + + + + + + @@ -153,6 +145,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + protected global::FineUIPro.DropDownList drpSendUnit; - /// - /// txtReceivUnit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList txtReceivUnit; - - /// - /// drpHandleMan 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpHandleMan; - - /// - /// trCopyMan 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tree trCopyMan; - /// /// txtDocName 控件。 /// @@ -113,15 +86,6 @@ namespace FineUIPro.Web.DocManage /// protected global::FineUIPro.TextBox txtDocName; - /// - /// txtDocCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtDocCode; - /// /// drpDocType 控件。 /// @@ -140,6 +104,15 @@ namespace FineUIPro.Web.DocManage /// protected global::FineUIPro.DropDownList drpProSubject; + /// + /// txtDocCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDocCode; + /// /// txtCompileMan 控件。 /// @@ -177,22 +150,13 @@ namespace FineUIPro.Web.DocManage protected global::FineUIPro.Button imgfile; /// - /// drpHandleType 控件。 + /// TabStrip1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.RadioButtonList drpHandleType; - - /// - /// txtFinishTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtFinishTime; + protected global::FineUIPro.TabStrip TabStrip1; /// /// txtDocContent 控件。 @@ -201,7 +165,7 @@ namespace FineUIPro.Web.DocManage /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextArea txtDocContent; + protected global::FineUIPro.HtmlEditor txtDocContent; /// /// Options 控件。 @@ -221,6 +185,78 @@ namespace FineUIPro.Web.DocManage /// protected global::FineUIPro.TextArea txtOpinions; + /// + /// next22 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow next22; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// Form3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form3; + + /// + /// drpHandleType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList drpHandleType; + + /// + /// txtFinishTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtFinishTime; + + /// + /// txtReceivUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList txtReceivUnit; + + /// + /// drpHandleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpHandleMan; + + /// + /// trCopyMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree trCopyMan; + /// /// next 控件。 /// diff --git a/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx b/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx index a561b1d7..370cf330 100644 --- a/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx +++ b/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx @@ -96,8 +96,9 @@ - - + + diff --git a/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx.cs b/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx.cs index 89934393..c82a8565 100644 --- a/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx.cs +++ b/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx.cs @@ -73,7 +73,7 @@ namespace FineUIPro.Web.DocManage { this.txtFinishTime.Text = string.Format("{0:yyyy-MM-dd}", doc.FinishTime); } - txtDocContent.Text = doc.DocContent; + txtDocContent.Text = HttpUtility.HtmlDecode(doc.DocContent); if (!string.IsNullOrEmpty(doc.State)) { State = doc.State; diff --git a/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx.designer.cs b/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx.designer.cs index a423bafd..5a1cc6a6 100644 --- a/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/DocManage/DocManageView.aspx.designer.cs @@ -147,7 +147,7 @@ namespace FineUIPro.Web.DocManage /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextArea txtDocContent; + protected global::FineUIPro.HtmlEditor txtDocContent; /// /// plApprove2 控件。 diff --git a/SGGL/FineUIPro.Web/File/Word/HSSE/临时用电作业票.doc b/SGGL/FineUIPro.Web/File/Word/HSSE/临时用电作业票.doc new file mode 100644 index 00000000..10c82e65 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Word/HSSE/临时用电作业票.doc differ diff --git a/SGGL/FineUIPro.Web/File/Word/HSSE/动火作业票.doc b/SGGL/FineUIPro.Web/File/Word/HSSE/动火作业票.doc index 774bd6af..d010ded1 100644 Binary files a/SGGL/FineUIPro.Web/File/Word/HSSE/动火作业票.doc and b/SGGL/FineUIPro.Web/File/Word/HSSE/动火作业票.doc differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index a3640e64..c215efda 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1062,6 +1062,8 @@ + + @@ -1653,6 +1655,8 @@ + + @@ -1662,6 +1666,8 @@ + + @@ -1992,6 +1998,7 @@ + @@ -11599,6 +11606,20 @@ BreakGroundView.aspx + + Electricity.aspx + ASPXCodeBehind + + + Electricity.aspx + + + ElectricityView.aspx + ASPXCodeBehind + + + ElectricityView.aspx + EquipmentSafetyList.aspx ASPXCodeBehind @@ -14952,6 +14973,20 @@ DeviceRunEdit.aspx + + InspectTailTermEdit.aspx + ASPXCodeBehind + + + InspectTailTermEdit.aspx + + + InspectTailTermList.aspx + ASPXCodeBehind + + + InspectTailTermList.aspx + InspectTemplate.aspx ASPXCodeBehind @@ -15015,6 +15050,20 @@ SysPipingDeviceImport.aspx + + TailTermApprove.aspx + ASPXCodeBehind + + + TailTermApprove.aspx + + + TailTermApproveList.aspx + ASPXCodeBehind + + + TailTermApproveList.aspx + GoodsBuy.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx b/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx index dbcddf7b..230a668b 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx @@ -35,15 +35,21 @@ - - + + - + + + + + + + @@ -70,13 +76,13 @@ HeaderText="序号" HeaderTextAlign="Center" TextAlign="Left" > + HeaderText="动土作业安全措施" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认人" HeaderTextAlign="Center" TextAlign="Left" > + HeaderText="是否合格" HeaderTextAlign="Center" TextAlign="Left" > @@ -105,121 +111,9 @@ - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.cs index e22d0a3b..1c90879e 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.cs @@ -46,9 +46,12 @@ { this.lbLicenseCode.Text = getBreakGround.LicenseCode; this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getBreakGround.ApplyUnitId); - this.txtApplyManName.Text = UserService.GetUserNameByUserId(getBreakGround.ApplyManId); + //this.txtApplyManName.Text = UserService.GetUserNameByUserId(getBreakGround.ApplyManId); + txtWorkAreaName.Text = UnitWorkService.GetUnitWorkName(getBreakGround.WorkAreaId); this.txtWorkPalce.Text = getBreakGround.WorkPalce; - this.txtWorkDepth.Text = getBreakGround.WorkDepth; + //this.txtWorkDepth.Text = getBreakGround.WorkDepth; + txtFireWatchManName.Text = getBreakGround.FireWatchManName; + txtReason.Text = getBreakGround.Reason; if (getBreakGround.ValidityStartTime.HasValue) { this.txtWorkDate.Text = getBreakGround.ValidityStartTime.Value.ToString("f") + " 至 "; @@ -112,96 +115,96 @@ this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } - var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); - if (getF2 != null) - { - this.txtForm2.Title = getF2.AuditFlowName + ":"; - if (getF2.OperaterTime.HasValue) - { - if (getF2.IsAgree == true) - { - this.txtOpinion2.Text = "同意。"; - } - else - { - this.txtOpinion2.Text = getF2.Opinion; - } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); - this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); - } - } - var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); - if (getF3 != null) - { - this.txtForm3.Title = getF3.AuditFlowName + ":"; - if (getF3.OperaterTime.HasValue) - { - if (getF3.IsAgree == true) - { - this.txtOpinion3.Text = "同意。"; - } - else - { - this.txtOpinion3.Text = getF3.Opinion; - } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); - this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); - } - } - var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); - if (getF4 != null) - { - this.txtForm4.Title = getF4.AuditFlowName + ":"; - if (getF4.OperaterTime.HasValue) - { - if (getF4.IsAgree == true) - { - this.txtOpinion4.Text = "同意。"; - } - else - { - this.txtOpinion4.Text = getF4.Opinion; - } - this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); - this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); - } - } - var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); - if (getF5 != null) - { - this.txtForm5.Title = getF5.AuditFlowName + ":"; - if (getF5.OperaterTime.HasValue) - { - if (getF5.IsAgree == true) - { - this.txtOpinion5.Text = "同意。"; - } - else - { - this.txtOpinion5.Text = getF5.Opinion; - } - this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); - this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); - } - } - var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); - if (getF6 != null) - { - this.txtForm6.Title = getF6.AuditFlowName + ":"; - if (getF6.OperaterTime.HasValue) - { - if (getF6.IsAgree == true) - { - this.txtOpinion6.Text = "同意。"; - } - else - { - this.txtOpinion6.Text = getF6.Opinion; - } - this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); - this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); - } - } + //var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + //if (getF2 != null) + //{ + // this.txtForm2.Title = getF2.AuditFlowName + ":"; + // if (getF2.OperaterTime.HasValue) + // { + // if (getF2.IsAgree == true) + // { + // this.txtOpinion2.Text = "同意。"; + // } + // else + // { + // this.txtOpinion2.Text = getF2.Opinion; + // } + // this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + // this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + // } + //} + //var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + //if (getF3 != null) + //{ + // this.txtForm3.Title = getF3.AuditFlowName + ":"; + // if (getF3.OperaterTime.HasValue) + // { + // if (getF3.IsAgree == true) + // { + // this.txtOpinion3.Text = "同意。"; + // } + // else + // { + // this.txtOpinion3.Text = getF3.Opinion; + // } + // this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + // this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + // } + //} + //var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); + //if (getF4 != null) + //{ + // this.txtForm4.Title = getF4.AuditFlowName + ":"; + // if (getF4.OperaterTime.HasValue) + // { + // if (getF4.IsAgree == true) + // { + // this.txtOpinion4.Text = "同意。"; + // } + // else + // { + // this.txtOpinion4.Text = getF4.Opinion; + // } + // this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + // this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + // } + //} + //var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + //if (getF5 != null) + //{ + // this.txtForm5.Title = getF5.AuditFlowName + ":"; + // if (getF5.OperaterTime.HasValue) + // { + // if (getF5.IsAgree == true) + // { + // this.txtOpinion5.Text = "同意。"; + // } + // else + // { + // this.txtOpinion5.Text = getF5.Opinion; + // } + // this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); + // this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + // } + //} + //var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); + //if (getF6 != null) + //{ + // this.txtForm6.Title = getF6.AuditFlowName + ":"; + // if (getF6.OperaterTime.HasValue) + // { + // if (getF6.IsAgree == true) + // { + // this.txtOpinion6.Text = "同意。"; + // } + // else + // { + // this.txtOpinion6.Text = getF6.Opinion; + // } + // this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); + // this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + // } + //} } } #endregion @@ -211,7 +214,7 @@ /// private void BindGrid() { - string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '适用' ELSE '不适用' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '合格' ELSE '不合格' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + @" FROM License_LicenseItem AS L " + @" LEFT JOIN Sys_User AS U ON L.ConfirmManId =U.UserId" + @" WHERE L.DataId ='" + this.BreakGroundId +"'"; diff --git a/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.designer.cs index 1795599b..274e3fa4 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.License { - - - public partial class BreakGroundView { - +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class BreakGroundView + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// lbLicenseCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbLicenseCode; - + /// /// lbImageUrl 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbImageUrl; - + /// /// txtApplyUnit 控件。 /// @@ -65,16 +67,16 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtApplyUnit; - + /// - /// txtApplyManName 控件。 + /// txtWorkAreaName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtApplyManName; - + protected global::FineUIPro.TextBox txtWorkAreaName; + /// /// txtWorkPalce 控件。 /// @@ -83,16 +85,25 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkPalce; - + /// - /// txtWorkDepth 控件。 + /// txtFireWatchManName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtWorkDepth; - + protected global::FineUIPro.TextBox txtFireWatchManName; + + /// + /// txtReason 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtReason; + /// /// txtWorkDate 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkDate; - + /// /// txtWorkMeasures 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkMeasures; - + /// /// Grid1 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// txtForm1 控件。 /// @@ -128,7 +139,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form txtForm1; - + /// /// txtOpinion1 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtOpinion1; - + /// /// Label6 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label6; - + /// /// txtName1 控件。 /// @@ -155,7 +166,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtName1; - + /// /// txtTime1 控件。 /// @@ -164,232 +175,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTime1; - - /// - /// txtForm2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm2; - - /// - /// txtOpinion2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion2; - - /// - /// Label1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label1; - - /// - /// txtName2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName2; - - /// - /// txtTime2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime2; - - /// - /// txtForm3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm3; - - /// - /// txtOpinion3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion3; - - /// - /// Label2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label2; - - /// - /// txtName3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName3; - - /// - /// txtTime3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime3; - - /// - /// txtForm4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm4; - - /// - /// txtOpinion4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion4; - - /// - /// Label5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label5; - - /// - /// txtName4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName4; - - /// - /// txtTime4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime4; - - /// - /// txtForm5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm5; - - /// - /// txtOpinion5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion5; - - /// - /// Label9 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label9; - - /// - /// txtName5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName5; - - /// - /// txtTime5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime5; - - /// - /// txtForm6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm6; - - /// - /// txtOpinion6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion6; - - /// - /// Label12 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label12; - - /// - /// txtName6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName6; - - /// - /// txtTime6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime6; - + /// /// txtCance 控件。 /// @@ -398,7 +184,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCance; - + /// /// txtClose 控件。 /// @@ -407,7 +193,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtClose; - + /// /// Toolbar1 控件。 /// @@ -416,7 +202,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// lbTemp 控件。 /// @@ -425,7 +211,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbTemp; - + /// /// btnAttachUrl 控件。 /// @@ -434,7 +220,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttachUrl; - + /// /// ToolbarFill1 控件。 /// @@ -443,7 +229,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnClose 控件。 /// @@ -452,7 +238,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx new file mode 100644 index 00000000..11b0ccba --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx @@ -0,0 +1,122 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Electricity.aspx.cs" Inherits="FineUIPro.Web.HSSE.License.Electricity" %> + + + + + + + 临时用电作业票 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.cs new file mode 100644 index 00000000..a6cb41e6 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.cs @@ -0,0 +1,1077 @@ +using Aspose.Words; +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; + +namespace FineUIPro.Web.HSSE.License +{ + public partial class Electricity : PageBase + { + #region 项目主键 + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ////权限按钮方法 + this.GetButtonPower(); + this.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) + { + this.ProjectId = Request.Params["projectId"]; + } + + UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true); + if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) + { + this.drpUnit.SelectedValue = this.CurrUser.UnitId; + this.drpUnit.Enabled = false; + } + + this.drpStates.DataValueField = "Value"; + this.drpStates.DataTextField = "Text"; + this.drpStates.DataSource = LicensePublicService.drpStatesItem(); + this.drpStates.DataBind(); + this.drpStates.SelectedValue = Const._Null; + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = "SELECT license.ElectricityId,license.ProjectId,license.LicenseCode,license.ApplyUnitId,ApplyUnit.UnitName AS ApplyUnitName,license.ApplyManId,license.ApplyDate,license.WorkPalce,license.ValidityStartTime,license.ValidityEndTime,license.WorkMeasures,license.WorkDepth,license.States,license.WorkLeaderTel,license.WorkLeaderName" + + @" ,(CASE WHEN license.States=0 THEN '待提交' WHEN license.States=1 THEN '审核中' WHEN license.States=2 THEN '作业中' WHEN license.States=3 THEN '已关闭' WHEN license.States=-1 THEN '已取消' ELSE '未知' END) AS StatesName " + + @" FROM dbo.License_Electricity AS license " + + @" LEFT JOIN Base_Unit AS ApplyUnit ON license.ApplyUnitId =ApplyUnit.UnitId" + + @" WHERE license.ProjectId= '" + this.ProjectId + "'"; + List listStr = new List(); + + if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) + { + strSql += " AND license.ApplyUnitId = @UnitId"; ///状态为已完成 + listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId)); + } + if (this.drpUnit.SelectedValue != Const._Null) + { + strSql += " AND license.ApplyUnitId = @UnitId2"; + listStr.Add(new SqlParameter("@UnitId2", this.drpUnit.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.drpStates.SelectedValue) && this.drpStates.SelectedValue != Const._Null) + { + strSql += " AND license.States = @States"; + listStr.Add(new SqlParameter("@States", this.drpStates.SelectedValue)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 编辑 + /// + /// 双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuView_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string id = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ElectricityView.aspx?ElectricityId={0}", id, "查看 - "))); + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var Electricity = LicensePublicService.GetElectricityById(rowID); + if (Electricity != null) + { + LogService.AddSys_Log(this.CurrUser, Electricity.LicenseCode, Electricity.ElectricityId, Const.ProjectElectricityMenuId, Const.BtnDelete); + LicensePublicService.DeleteElectricityById(rowID); + } + } + + this.BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectElectricityMenuId); + if (buttonList.Count() > 0) + { + //if (buttonList.Contains(BLL.Const.BtnAdd)) + //{ + // this.btnNew.Hidden = false; + //} + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuView.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("动土作业票" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + + #region 打印 + protected void btnPrinter_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string Id = Grid1.SelectedRowID; + + string rootPath = Server.MapPath("~/"); + string initTemplatePath = string.Empty; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + string filePath = string.Empty; + initTemplatePath = "File\\Word\\HSSE\\临时用电作业票.doc"; + uploadfilepath = rootPath + initTemplatePath; + newUrl = uploadfilepath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".doc"); + filePath = initTemplatePath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".pdf"); + File.Copy(uploadfilepath, newUrl); + ///更新书签 + var getElectricity = LicensePublicService.GetElectricityById(Id); + Document doc = new Aspose.Words.Document(newUrl); + Bookmark bookmarkLicenseCode = doc.Range.Bookmarks["LicenseCode"];//编号 + if (bookmarkLicenseCode != null) + { + if (getElectricity != null) + { + bookmarkLicenseCode.Text = getElectricity.LicenseCode; + } + } + Bookmark bookmarkApplyManName = doc.Range.Bookmarks["ApplyManName"];//申请人 + if (bookmarkApplyManName != null) + { + if (getElectricity != null) + { + var getUser = UserService.GetUserByUserId(getElectricity.ApplyManId); + if (getUser != null) + { + bookmarkApplyManName.Text = getUser.UserName; + } + + + } + } + Bookmark bookmarkUnitName = doc.Range.Bookmarks["UnitName"];//申请单位 + if (bookmarkUnitName != null) + { + if (getElectricity != null) + { + if (!string.IsNullOrEmpty(getElectricity.ApplyUnitId)) + { + bookmarkUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(getElectricity.ApplyUnitId); + } + + } + } + Bookmark bookmarkWorkPalce = doc.Range.Bookmarks["WorkPalce"];//作业地点 + if (bookmarkWorkPalce != null) + { + if (getElectricity != null) + { + bookmarkWorkPalce.Text = getElectricity.WorkPalce; + + } + } + Bookmark bookmarkWorkDepth = doc.Range.Bookmarks["WorkDepth"];//作业原因 + if (bookmarkWorkDepth != null) + { + if (getElectricity != null) + { + bookmarkWorkDepth.Text = getElectricity.Reason; + + } + } + Bookmark bookmarkValidityDate = doc.Range.Bookmarks["ValidityDate"];//有效期限 + if (bookmarkValidityDate != null) + { + if (getElectricity != null) + { + if (getElectricity.ValidityStartTime.HasValue) + { + + bookmarkValidityDate.Text = getElectricity.ValidityStartTime.Value.Year + "年" + getElectricity.ValidityStartTime.Value.Month + "月" + getElectricity.ValidityStartTime.Value.Day + "日" + getElectricity.ValidityStartTime.Value.Hour + "时至"; + if (getElectricity.ValidityEndTime.HasValue) + { + bookmarkValidityDate.Text += getElectricity.ValidityEndTime.Value.Year + "年" + getElectricity.ValidityEndTime.Value.Month + "月" + getElectricity.ValidityEndTime.Value.Day + "日" + getElectricity.ValidityEndTime.Value.Hour + "时"; + } + } + } + } + Bookmark bookmarkWorkMeasures = doc.Range.Bookmarks["WorkMeasures"];//作业内容 + if (bookmarkWorkMeasures != null) + { + if (getElectricity != null) + { + bookmarkWorkMeasures.Text = getElectricity.WorkMeasures; + + } + } + + + + + var GetLicenseItemList = LicensePublicService.GetLicenseItemListByDataId(Id); + if (GetLicenseItemList.Count > 0) + { + var item1 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 1); + if (item1 != null) + { + if (item1.IsUsed == true) + { + Bookmark bookmarkUser1 = doc.Range.Bookmarks["User1"];//确认执行 + if (bookmarkUser1 != null) + { + bookmarkUser1.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit1 = doc.Range.Bookmarks["IsFit1"]; + if (bookmarkIsFit1 != null) + { + if (item1 != null) + { + bookmarkIsFit1.Text = "×"; + } + } + } + } + + + + var item2 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 2); + if (item2 != null) + { + if (item2.IsUsed == true) + { + Bookmark bookmarkUser2 = doc.Range.Bookmarks["User2"];//确认执行 + if (bookmarkUser2 != null) + { + bookmarkUser2.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit2 = doc.Range.Bookmarks["IsFit2"]; + if (bookmarkIsFit2 != null) + { + if (item2 != null) + { + bookmarkIsFit2.Text = "×"; + } + } + } + } + var item3 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 3); + if (item3 != null) + { + if (item3.IsUsed == true) + { + Bookmark bookmarkUser3 = doc.Range.Bookmarks["User3"];//确认执行 + if (bookmarkUser3 != null) + { + bookmarkUser3.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit3 = doc.Range.Bookmarks["IsFit3"]; + if (bookmarkIsFit3 != null) + { + if (item3 != null) + { + bookmarkIsFit3.Text = "×"; + } + } + } + } + + var item4 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 4); + if (item4 != null) + { + if (item4.IsUsed == true) + { + Bookmark bookmarkUser4 = doc.Range.Bookmarks["User4"];//确认执行 + if (bookmarkUser4 != null) + { + bookmarkUser4.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit4 = doc.Range.Bookmarks["IsFit4"]; + if (bookmarkIsFit4 != null) + { + if (item4 != null) + { + bookmarkIsFit4.Text = "×"; + } + } + } + } + var item5 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 5); + if (item5 != null) + { + if (item5.IsUsed == true) + { + Bookmark bookmarkUser5 = doc.Range.Bookmarks["User5"];//确认执行 + if (bookmarkUser5 != null) + { + bookmarkUser5.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit5 = doc.Range.Bookmarks["IsFit5"]; + if (bookmarkIsFit5 != null) + { + if (item5 != null) + { + bookmarkIsFit5.Text = "×"; + } + } + } + } + + var item6 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 6); + if (item6 != null) + { + if (item6.IsUsed == true) + { + Bookmark bookmarkUser6 = doc.Range.Bookmarks["User6"];//确认执行 + if (bookmarkUser6 != null) + { + bookmarkUser6.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit6 = doc.Range.Bookmarks["IsFit6"]; + if (bookmarkIsFit6 != null) + { + if (item6 != null) + { + bookmarkIsFit6.Text = "×"; + } + } + } + } + var item7 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 7); + if (item7 != null) + { + if (item7.IsUsed == true) + { + Bookmark bookmarkUser7 = doc.Range.Bookmarks["User7"];//确认执行 + if (bookmarkUser7 != null) + { + bookmarkUser7.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit7 = doc.Range.Bookmarks["IsFit7"]; + if (bookmarkIsFit7 != null) + { + if (item7 != null) + { + bookmarkIsFit7.Text = "×"; + } + } + } + } + + var item8 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 8); + if (item8 != null) + { + if (item8.IsUsed == true) + { + Bookmark bookmarkUser8 = doc.Range.Bookmarks["User8"];//确认执行 + if (bookmarkUser8 != null) + { + bookmarkUser8.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit8 = doc.Range.Bookmarks["IsFit8"]; + if (bookmarkIsFit8 != null) + { + if (item8 != null) + { + bookmarkIsFit8.Text = "×"; + } + } + } + } + + var item9 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 9); + if (item9 != null) + { + if (item9.IsUsed == true) + { + Bookmark bookmarkUser9 = doc.Range.Bookmarks["User9"];//确认执行 + if (bookmarkUser9 != null) + { + bookmarkUser9.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit9 = doc.Range.Bookmarks["IsFit9"]; + if (bookmarkIsFit9 != null) + { + if (item9 != null) + { + bookmarkIsFit9.Text = "×"; + } + } + } + } + + var item10 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 10); + if (item10 != null) + { + if (item10.IsUsed == true) + { + Bookmark bookmarkUser10 = doc.Range.Bookmarks["User10"];//确认执行 + if (bookmarkUser10 != null) + { + bookmarkUser10.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit10 = doc.Range.Bookmarks["IsFit10"]; + if (bookmarkIsFit10 != null) + { + if (item10 != null) + { + bookmarkIsFit10.Text = "×"; + } + } + } + } + var item11 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 11); + if (item11 != null) + { + if (item11.IsUsed == true) + { + Bookmark bookmarkUser11 = doc.Range.Bookmarks["User11"];//确认执行 + if (bookmarkUser11 != null) + { + bookmarkUser11.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit11 = doc.Range.Bookmarks["IsFit11"]; + if (bookmarkIsFit11 != null) + { + if (item11 != null) + { + bookmarkIsFit11.Text = "×"; + } + } + } + } + + var item12 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 12); + if (item12 != null) + { + if (item12.IsUsed == true) + { + Bookmark bookmarkUser12 = doc.Range.Bookmarks["User12"];//确认执行 + if (bookmarkUser12 != null) + { + bookmarkUser12.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit12 = doc.Range.Bookmarks["IsFit12"]; + if (bookmarkIsFit12 != null) + { + if (item12 != null) + { + bookmarkIsFit12.Text = "×"; + } + } + } + } + + + } + //审核记录 + var getFlows = LicensePublicService.GetFlowOperateListByDataId(Id); + if (getFlows.Count() > 0) + { + var getF1 = getFlows.FirstOrDefault(x => x.SortIndex == 1); + if (getF1 != null) + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + Bookmark bookmarkOpinion1 = doc.Range.Bookmarks["Opinion1"]; + if (bookmarkOpinion1 != null) + { + + + if (getUser != null) + { + if (getF1.IsAgree == true) + { + bookmarkOpinion1.Text = getF1.Opinion; + } + else + { + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null) + { + if (getF1.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan1.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime1 = doc.Range.Bookmarks["OperaterTime1"]; + if (bookmarkOperaterTime1 != null) + { + if (getF1.OperaterTime.HasValue) + { + bookmarkOperaterTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); + } + } + } + var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + if (getF2 != null) + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + Bookmark bookmarkOpinion2 = doc.Range.Bookmarks["Opinion2"]; + if (bookmarkOpinion2 != null) + { + + + if (getUser != null) + { + if (getF2.IsAgree == true) + { + bookmarkOpinion2.Text = getF2.Opinion; + } + else + { + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null) + { + if (getF2.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan2.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime2 = doc.Range.Bookmarks["OperaterTime2"]; + if (bookmarkOperaterTime2 != null) + { + if (getF2.OperaterTime.HasValue) + { + bookmarkOperaterTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + } + } + } + var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + if (getF3 != null) + { + var getUser = UserService.GetUserByUserId(getF3.OperaterId); + Bookmark bookmarkOpinion3 = doc.Range.Bookmarks["Opinion3"]; + if (bookmarkOpinion3 != null) + { + + + if (getUser != null) + { + if (getF3.IsAgree == true) + { + bookmarkOpinion3.Text = getF3.Opinion; + } + else + { + bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null) + { + if (getF3.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan3.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime3 = doc.Range.Bookmarks["OperaterTime3"]; + if (bookmarkOperaterTime3 != null) + { + if (getF3.OperaterTime.HasValue) + { + bookmarkOperaterTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + } + } + } + var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); + if (getF4 != null) + { + var getUser = UserService.GetUserByUserId(getF4.OperaterId); + Bookmark bookmarkOpinion4 = doc.Range.Bookmarks["Opinion4"]; + if (bookmarkOpinion4 != null) + { + + + if (getUser != null) + { + if (getF4.IsAgree == true) + { + bookmarkOpinion4.Text = getF4.Opinion; + } + else + { + bookmarkOpinion4.Text = "不同意: " + getF4.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan4 = doc.Range.Bookmarks["OperaterMan4"]; + if (bookmarkOperaterMan4 != null) + { + if (getF4.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan4"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan4.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime4 = doc.Range.Bookmarks["OperaterTime4"]; + if (bookmarkOperaterTime4 != null) + { + if (getF4.OperaterTime.HasValue) + { + bookmarkOperaterTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + } + } + } + var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + if (getF5 != null) + { + var getUser = UserService.GetUserByUserId(getF5.OperaterId); + Bookmark bookmarkOpinion5 = doc.Range.Bookmarks["Opinion5"]; + if (bookmarkOpinion5 != null) + { + + + if (getUser != null) + { + if (getF5.IsAgree == true) + { + bookmarkOpinion5.Text = getF5.Opinion; + } + else + { + bookmarkOpinion5.Text = "不同意: " + getF5.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan5 = doc.Range.Bookmarks["OperaterMan5"]; + if (bookmarkOperaterMan5 != null) + { + if (getF5.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan5"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan5.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime5 = doc.Range.Bookmarks["OperaterTime5"]; + if (bookmarkOperaterTime5 != null) + { + if (getF5.OperaterTime.HasValue) + { + bookmarkOperaterTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + } + } + } + var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); + if (getF6 != null) + { + var getUser = UserService.GetUserByUserId(getF6.OperaterId); + Bookmark bookmarkOpinion6 = doc.Range.Bookmarks["Opinion6"]; + if (bookmarkOpinion6 != null) + { + + + if (getUser != null) + { + if (getF6.IsAgree == true) + { + bookmarkOpinion6.Text = getF6.Opinion; + } + else + { + bookmarkOpinion6.Text = "不同意: " + getF6.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan6 = doc.Range.Bookmarks["OperaterMan6"]; + if (bookmarkOperaterMan6 != null) + { + if (getF6.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan6"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan6.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime6 = doc.Range.Bookmarks["OperaterTime6"]; + if (bookmarkOperaterTime6 != null) + { + if (getF6.OperaterTime.HasValue) + { + bookmarkOperaterTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + } + } + } + } + + Bookmark bookmarkCance = doc.Range.Bookmarks["Cancel"];//取消 + if (bookmarkCance != null) + { + if (getElectricity != null) + { + if (!string.IsNullOrEmpty(getElectricity.CancelManId)) + { + var getUser = UserService.GetUserByUserId(getElectricity.CancelManId); + if (getUser != null) + { + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + DocumentBuilder builders = new DocumentBuilder(doc); + builders.MoveToBookmark("Cancel"); + builders.InsertImage(file, 80, 20); + builders.Write("取消原因:" + getElectricity.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CancelTime)); + } + else + { + bookmarkCance.Text = getUser.UserName + " 取消原因:" + getElectricity.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CancelTime); + } + } + } + } + } + + Bookmark bookmarkClose = doc.Range.Bookmarks["Close"];//关闭 + if (bookmarkClose != null) + { + if (getElectricity != null) + { + if (!string.IsNullOrEmpty(getElectricity.CloseManId)) + { + var getUser = UserService.GetUserByUserId(getElectricity.CloseManId); + if (getUser != null) + { + if (!string.IsNullOrEmpty(getElectricity.CloseReasons)) + { + bookmarkClose.Text = getElectricity.CloseReasons + " 关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CloseTime) + "。"; + } + else if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + DocumentBuilder builders = new DocumentBuilder(doc); + builders.MoveToBookmark("Close"); + builders.InsertImage(file, 80, 20); + builders.Write("关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CloseTime)); + } + else + { + bookmarkClose.Text = getUser.UserName + " 关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CloseTime); + } + } + } + } + } + + doc.Save(newUrl); + //生成PDF文件 + string pdfUrl = newUrl.Replace(".doc", ".pdf"); + Document doc1 = new Aspose.Words.Document(newUrl); + //验证参数 + if (doc1 == null) { throw new Exception("Word文件无效"); } + doc1.Save(pdfUrl, Aspose.Words.SaveFormat.Pdf);//还可以改成其它格式 + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(pdfUrl); + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(pdfUrl, 0, fileSize); + Response.Flush(); + Response.Close(); + File.Delete(newUrl); + File.Delete(pdfUrl); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.designer.cs new file mode 100644 index 00000000..eb4c8753 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class Electricity + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpStates 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList drpStates; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuView; + + /// + /// btnPrinter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnPrinter; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx new file mode 100644 index 00000000..f560f791 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx @@ -0,0 +1,157 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ElectricityView.aspx.cs" Inherits="FineUIPro.Web.HSSE.License.ElectricityView" %> + + + + + + + 临时用电作业票 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.cs new file mode 100644 index 00000000..74bdf22b --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.cs @@ -0,0 +1,246 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.HSSE.License +{ + public partial class ElectricityView : PageBase + { + #region 定义项 + /// + /// 主键 + /// + private string ElectricityId + { + get + { + return (string)ViewState["ElectricityId"]; + } + set + { + ViewState["ElectricityId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.SimpleForm1.Title = UnitService.GetUnitNameByUnitId(Const.UnitId_CWCEC) + this.Title; + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.ElectricityId = Request.Params["ElectricityId"]; + if (!string.IsNullOrEmpty(this.ElectricityId)) + { + var getElectricity = LicensePublicService.GetElectricityById(this.ElectricityId); + if (getElectricity != null) + { + this.lbLicenseCode.Text = getElectricity.LicenseCode; + this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getElectricity.ApplyUnitId); + //this.txtApplyManName.Text = UserService.GetUserNameByUserId(getElectricity.ApplyManId); + this.txtWorkPalce.Text = getElectricity.WorkPalce; + this.txtReason.Text = getElectricity.Reason; + if (getElectricity.ValidityStartTime.HasValue) + { + this.txtWorkDate.Text = getElectricity.ValidityStartTime.Value.ToString("f") + " 至 "; + if (getElectricity.ValidityEndTime.HasValue) + { + this.txtWorkDate.Text += getElectricity.ValidityEndTime.Value.ToString("f"); + } + } + //this.txtWorkMeasures.Text = getElectricity.WorkMeasures; + if (!string.IsNullOrEmpty(getElectricity.CancelManId)) + { + this.txtCance.Text = UserService.GetUserNameByUserId(getElectricity.CancelManId) + ";取消时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CancelTime) + ";原因:" + getElectricity.CancelReasons + "。"; + } + if (!string.IsNullOrEmpty(getElectricity.CloseManId)) + { + if (!string.IsNullOrEmpty(getElectricity.CloseReasons)) + { + this.txtClose.Text = getElectricity.CloseReasons + " 关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CloseTime) + "。"; + } + else + { + this.txtClose.Text = UserService.GetUserNameByUserId(getElectricity.CloseManId) + ";关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CloseTime) + "。"; + } + } + txtWorkAreaName.Text = UnitWorkService.GetUnitWorkName(getElectricity.WorkAreaId); + txtWorkLeaderName.Text = getElectricity.WorkLeaderName; + txtFireWatchManName.Text = getElectricity.FireWatchManName; + + } + } + // 绑定表格 + this.BindGrid(); + this.SetFlow(); + } + } + #endregion + + #region 获取审核记录信息 + /// + /// + /// + private void SetFlow() + { + var getFlows = LicensePublicService.GetFlowOperateListByDataId(this.ElectricityId); + if (getFlows.Count() > 0) + { + var getF1 = getFlows.FirstOrDefault(x => x.SortIndex == 1); + if (getF1 != null) + { + this.txtForm1.Title = getF1.AuditFlowName + ":"; + if (getF1.OperaterTime.HasValue) + { + if (getF1.IsAgree == true) + { + this.txtOpinion1.Text = "同意。"; + } + else + { + this.txtOpinion1.Text = getF1.Opinion; + } + this.txtName1.Text = UserService.GetUserNameByUserId(getF1.OperaterId); + this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); + } + } + //var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + //if (getF2 != null) + //{ + // this.txtForm2.Title = getF2.AuditFlowName + ":"; + // if (getF2.OperaterTime.HasValue) + // { + // if (getF2.IsAgree == true) + // { + // this.txtOpinion2.Text = "同意。"; + // } + // else + // { + // this.txtOpinion2.Text = getF2.Opinion; + // } + // this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + // this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + // } + //} + //var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + //if (getF3 != null) + //{ + // this.txtForm3.Title = getF3.AuditFlowName + ":"; + // if (getF3.OperaterTime.HasValue) + // { + // if (getF3.IsAgree == true) + // { + // this.txtOpinion3.Text = "同意。"; + // } + // else + // { + // this.txtOpinion3.Text = getF3.Opinion; + // } + // this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + // this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + // } + //} + //var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); + //if (getF4 != null) + //{ + // this.txtForm4.Title = getF4.AuditFlowName + ":"; + // if (getF4.OperaterTime.HasValue) + // { + // if (getF4.IsAgree == true) + // { + // this.txtOpinion4.Text = "同意。"; + // } + // else + // { + // this.txtOpinion4.Text = getF4.Opinion; + // } + // this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + // this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + // } + //} + //var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + //if (getF5 != null) + //{ + // this.txtForm5.Title = getF5.AuditFlowName + ":"; + // if (getF5.OperaterTime.HasValue) + // { + // if (getF5.IsAgree == true) + // { + // this.txtOpinion5.Text = "同意。"; + // } + // else + // { + // this.txtOpinion5.Text = getF5.Opinion; + // } + // this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); + // this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + // } + //} + //var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); + //if (getF6 != null) + //{ + // this.txtForm6.Title = getF6.AuditFlowName + ":"; + // if (getF6.OperaterTime.HasValue) + // { + // if (getF6.IsAgree == true) + // { + // this.txtOpinion6.Text = "同意。"; + // } + // else + // { + // this.txtOpinion6.Text = getF6.Opinion; + // } + // this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); + // this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + // } + //} + } + } + #endregion + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '适用' ELSE '不适用' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + + @" FROM License_LicenseItem AS L " + + @" LEFT JOIN Sys_User AS U ON L.ConfirmManId =U.UserId" + + @" WHERE L.DataId ='" + this.ElectricityId + "'"; + List listStr = new List(); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 附件查看 + /// + /// 附件查看 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.ElectricityId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&menuId={1}&type=-1", this.ElectricityId, Const.ProjectElectricityMenuId))); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.designer.cs new file mode 100644 index 00000000..e663d772 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.designer.cs @@ -0,0 +1,251 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class ElectricityView + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// lbLicenseCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbLicenseCode; + + /// + /// lbImageUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbImageUrl; + + /// + /// txtApplyUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApplyUnit; + + /// + /// txtWorkAreaName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkAreaName; + + /// + /// txtWorkPalce 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkPalce; + + /// + /// txtReason 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtReason; + + /// + /// txtWorkLeaderName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkLeaderName; + + /// + /// txtFireWatchManName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFireWatchManName; + + /// + /// txtWorkDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkDate; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm1; + + /// + /// txtOpinion1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion1; + + /// + /// Label6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label6; + + /// + /// txtName1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName1; + + /// + /// txtTime1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime1; + + /// + /// txtCance 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCance; + + /// + /// txtClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtClose; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx.cs index 0164a33a..c0a67319 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx.cs @@ -667,6 +667,30 @@ namespace FineUIPro.Web.HSSE.License } } + var item13 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 13); + if (item13 != null) + { + if (item13.IsUsed == true) + { + Bookmark bookmarkUser13 = doc.Range.Bookmarks["User13"];//确认执行 + if (bookmarkUser13 != null) + { + bookmarkUser13.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit13 = doc.Range.Bookmarks["IsFit13"]; + if (bookmarkIsFit13 != null) + { + if (item13 != null) + { + bookmarkIsFit13.Text = "×"; + } + } + } + } + } //审核记录 diff --git a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx index 247d5c16..c5cc62e5 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx @@ -29,15 +29,23 @@ - + + + - + + + + + + + @@ -47,12 +55,12 @@ - + <%-- - + --%> + HeaderText="动火作业安全措施" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认人" HeaderTextAlign="Center" TextAlign="Left" > + HeaderText="是否合格" HeaderTextAlign="Center" TextAlign="Left" > @@ -99,121 +107,11 @@ - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.cs index 08a8a821..00d96290 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.cs @@ -46,7 +46,10 @@ { this.lbLicenseCode.Text = getFireWork.LicenseCode; this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getFireWork.ApplyUnitId); - this.txtApplyManName.Text = UserService.GetUserNameByUserId(getFireWork.ApplyManId); + //this.txtApplyManName.Text = UserService.GetUserNameByUserId(getFireWork.ApplyManId); + txtWorkAreaName.Text = UnitWorkService.GetUnitWorkName(getFireWork.WorkAreaId); + txtReason.Text = getFireWork.Reason; + txtFireLevel.Text = getFireWork.FireLevel; this.txtWorkPalce.Text = getFireWork.WorkPalce; string name = getFireWork.FireWatchManName; if (string.IsNullOrEmpty(getFireWork.FireWatchManName)) @@ -62,7 +65,7 @@ this.txtWorkDate.Text += getFireWork.ValidityEndTime.Value.ToString("f"); } } - this.txtWorkMeasures.Text = getFireWork.WorkMeasures; + //this.txtWorkMeasures.Text = getFireWork.WorkMeasures; if (!string.IsNullOrEmpty(getFireWork.CancelManId)) { this.txtCance.Text = UserService.GetUserNameByUserId(getFireWork.CancelManId) + ";取消时间:" @@ -117,96 +120,96 @@ this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } - var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); - if (getF2 != null) - { - this.txtForm2.Title = getF2.AuditFlowName + ":"; - if (getF2.OperaterTime.HasValue) - { - if (getF2.IsAgree == true) - { - this.txtOpinion2.Text = "同意。"; - } - else - { - this.txtOpinion2.Text = getF2.Opinion; - } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); - this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); - } - } - var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); - if (getF3 != null) - { - this.txtForm3.Title = getF3.AuditFlowName + ":"; - if (getF3.OperaterTime.HasValue) - { - if (getF3.IsAgree == true) - { - this.txtOpinion3.Text = "同意。"; - } - else - { - this.txtOpinion3.Text = getF3.Opinion; - } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); - this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); - } - } - var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); - if (getF4 != null) - { - this.txtForm4.Title = getF4.AuditFlowName + ":"; - if (getF4.OperaterTime.HasValue) - { - if (getF4.IsAgree == true) - { - this.txtOpinion4.Text = "同意。"; - } - else - { - this.txtOpinion4.Text = getF4.Opinion; - } - this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); - this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); - } - } - var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); - if (getF5 != null) - { - this.txtForm5.Title = getF5.AuditFlowName + ":"; - if (getF5.OperaterTime.HasValue) - { - if (getF5.IsAgree == true) - { - this.txtOpinion5.Text = "同意。"; - } - else - { - this.txtOpinion5.Text = getF5.Opinion; - } - this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); - this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); - } - } - var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); - if (getF6 != null) - { - this.txtForm6.Title = getF6.AuditFlowName + ":"; - if (getF6.OperaterTime.HasValue) - { - if (getF6.IsAgree == true) - { - this.txtOpinion6.Text = "同意。"; - } - else - { - this.txtOpinion6.Text = getF6.Opinion; - } - this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); - this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); - } - } + //var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + //if (getF2 != null) + //{ + // this.txtForm2.Title = getF2.AuditFlowName + ":"; + // if (getF2.OperaterTime.HasValue) + // { + // if (getF2.IsAgree == true) + // { + // this.txtOpinion2.Text = "同意。"; + // } + // else + // { + // this.txtOpinion2.Text = getF2.Opinion; + // } + // this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + // this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + // } + //} + //var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + //if (getF3 != null) + //{ + // this.txtForm3.Title = getF3.AuditFlowName + ":"; + // if (getF3.OperaterTime.HasValue) + // { + // if (getF3.IsAgree == true) + // { + // this.txtOpinion3.Text = "同意。"; + // } + // else + // { + // this.txtOpinion3.Text = getF3.Opinion; + // } + // this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + // this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + // } + //} + //var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); + //if (getF4 != null) + //{ + // this.txtForm4.Title = getF4.AuditFlowName + ":"; + // if (getF4.OperaterTime.HasValue) + // { + // if (getF4.IsAgree == true) + // { + // this.txtOpinion4.Text = "同意。"; + // } + // else + // { + // this.txtOpinion4.Text = getF4.Opinion; + // } + // this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + // this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + // } + //} + //var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + //if (getF5 != null) + //{ + // this.txtForm5.Title = getF5.AuditFlowName + ":"; + // if (getF5.OperaterTime.HasValue) + // { + // if (getF5.IsAgree == true) + // { + // this.txtOpinion5.Text = "同意。"; + // } + // else + // { + // this.txtOpinion5.Text = getF5.Opinion; + // } + // this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); + // this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + // } + //} + //var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); + //if (getF6 != null) + //{ + // this.txtForm6.Title = getF6.AuditFlowName + ":"; + // if (getF6.OperaterTime.HasValue) + // { + // if (getF6.IsAgree == true) + // { + // this.txtOpinion6.Text = "同意。"; + // } + // else + // { + // this.txtOpinion6.Text = getF6.Opinion; + // } + // this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); + // this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + // } + //} } } #endregion @@ -216,7 +219,7 @@ ///
private void BindGrid() { - string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '适用' ELSE '不适用' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '合格' ELSE '不合格' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + @" FROM License_LicenseItem AS L " + @" LEFT JOIN Sys_User AS U ON L.ConfirmManId =U.UserId" + @" WHERE L.DataId ='" + this.FireWorkId +"'"; diff --git a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.designer.cs index fe8113a9..0eaeabc6 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.License { - - - public partial class FireWorkView { - +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class FireWorkView + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// lbLicenseCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbLicenseCode; - + /// /// txtApplyUnit 控件。 /// @@ -56,16 +58,25 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtApplyUnit; - + /// - /// txtApplyManName 控件。 + /// txtWorkAreaName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtApplyManName; - + protected global::FineUIPro.TextBox txtWorkAreaName; + + /// + /// txtReason 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtReason; + /// /// txtWorkPalce 控件。 /// @@ -74,7 +85,16 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkPalce; - + + /// + /// txtFireLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFireLevel; + /// /// txtFireWatchManName 控件。 /// @@ -83,7 +103,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtFireWatchManName; - + /// /// txtWorkDate 控件。 /// @@ -92,16 +112,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkDate; - - /// - /// txtWorkMeasures 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtWorkMeasures; - + /// /// Grid1 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// txtForm1 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form txtForm1; - + /// /// txtOpinion1 控件。 /// @@ -128,7 +139,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtOpinion1; - + /// /// Label6 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label6; - + /// /// txtName1 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtName1; - + /// /// txtTime1 控件。 /// @@ -155,232 +166,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTime1; - - /// - /// txtForm2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm2; - - /// - /// txtOpinion2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion2; - - /// - /// Label1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label1; - - /// - /// txtName2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName2; - - /// - /// txtTime2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime2; - - /// - /// txtForm3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm3; - - /// - /// txtOpinion3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion3; - - /// - /// Label2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label2; - - /// - /// txtName3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName3; - - /// - /// txtTime3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime3; - - /// - /// txtForm4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm4; - - /// - /// txtOpinion4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion4; - - /// - /// Label5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label5; - - /// - /// txtName4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName4; - - /// - /// txtTime4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime4; - - /// - /// txtForm5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm5; - - /// - /// txtOpinion5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion5; - - /// - /// Label9 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label9; - - /// - /// txtName5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName5; - - /// - /// txtTime5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime5; - - /// - /// txtForm6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm6; - - /// - /// txtOpinion6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion6; - - /// - /// Label12 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label12; - - /// - /// txtName6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName6; - - /// - /// txtTime6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime6; - + /// /// txtCance 控件。 /// @@ -389,7 +175,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCance; - + /// /// txtClose 控件。 /// @@ -398,7 +184,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtClose; - + /// /// Toolbar1 控件。 /// @@ -407,7 +193,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ToolbarFill1 控件。 /// @@ -416,7 +202,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnClose 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/HeightWork.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/HeightWork.aspx.cs index 959c7cb3..4bafa43b 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/HeightWork.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/HeightWork.aspx.cs @@ -345,7 +345,7 @@ namespace FineUIPro.Web.HSSE.License Bookmark bookmarkWorkType = doc.Range.Bookmarks["WorkType"];//作业类别 if (bookmarkWorkType != null) { - if (getHeightWork != null) + if (getHeightWork.WorkType != null) { bookmarkWorkType.Text = getHeightWork.WorkType; @@ -380,7 +380,7 @@ namespace FineUIPro.Web.HSSE.License Bookmark bookmarkEquipmentTools = doc.Range.Bookmarks["EquipmentTools"];//设备及工具 if (bookmarkEquipmentTools != null) { - if (getHeightWork != null) + if (getHeightWork.EquipmentTools != null) { bookmarkEquipmentTools.Text = getHeightWork.EquipmentTools; diff --git a/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx b/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx index 4a4caea2..a8597032 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx @@ -29,18 +29,35 @@ - - + +
- + + + + + + + + + + + + + + + + + + @@ -49,8 +66,7 @@ - - + @@ -70,13 +86,13 @@ HeaderText="序号" HeaderTextAlign="Center" TextAlign="Left" > + HeaderText="高处作业安全措施" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认人" HeaderTextAlign="Center" TextAlign="Left" > + HeaderText="是否合格" HeaderTextAlign="Center" TextAlign="Left" > @@ -105,121 +121,10 @@
- - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.cs index c3fd4e0d..3f521841 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.cs @@ -46,9 +46,13 @@ { this.lbLicenseCode.Text = getHeightWork.LicenseCode; this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getHeightWork.ApplyUnitId); - this.txtApplyManName.Text = UserService.GetUserNameByUserId(getHeightWork.ApplyManId); + //this.txtApplyManName.Text = UserService.GetUserNameByUserId(getHeightWork.ApplyManId); + txtWorkAreaName.Text = UnitWorkService.GetUnitWorkName(getHeightWork.WorkAreaId); this.txtWorkPalce.Text = getHeightWork.WorkPalce; this.txtWorkType.Text = getHeightWork.WorkType; + txtWorkLeaderName.Text = getHeightWork.WorkLeaderName; + txtFireWatchManName.Text = getHeightWork.FireWatchManName; + txtWorkHeight.Text = getHeightWork.WorkHeight; if (getHeightWork.ValidityStartTime.HasValue) { this.txtWorkDate.Text = getHeightWork.ValidityStartTime.Value.ToString("f") + " 至 "; @@ -113,96 +117,96 @@ this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } - var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); - if (getF2 != null) - { - this.txtForm2.Title = getF2.AuditFlowName + ":"; - if (getF2.OperaterTime.HasValue) - { - if (getF2.IsAgree == true) - { - this.txtOpinion2.Text = "同意。"; - } - else - { - this.txtOpinion2.Text = getF2.Opinion; - } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); - this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); - } - } - var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); - if (getF3 != null) - { - this.txtForm3.Title = getF3.AuditFlowName + ":"; - if (getF3.OperaterTime.HasValue) - { - if (getF3.IsAgree == true) - { - this.txtOpinion3.Text = "同意。"; - } - else - { - this.txtOpinion3.Text = getF3.Opinion; - } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); - this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); - } - } - var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); - if (getF4 != null) - { - this.txtForm4.Title = getF4.AuditFlowName + ":"; - if (getF4.OperaterTime.HasValue) - { - if (getF4.IsAgree == true) - { - this.txtOpinion4.Text = "同意。"; - } - else - { - this.txtOpinion4.Text = getF4.Opinion; - } - this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); - this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); - } - } - var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); - if (getF5 != null) - { - this.txtForm5.Title = getF5.AuditFlowName + ":"; - if (getF5.OperaterTime.HasValue) - { - if (getF5.IsAgree == true) - { - this.txtOpinion5.Text = "同意。"; - } - else - { - this.txtOpinion5.Text = getF5.Opinion; - } - this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); - this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); - } - } - var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); - if (getF6 != null) - { - this.txtForm6.Title = getF6.AuditFlowName + ":"; - if (getF6.OperaterTime.HasValue) - { - if (getF6.IsAgree == true) - { - this.txtOpinion6.Text = "同意。"; - } - else - { - this.txtOpinion6.Text = getF6.Opinion; - } - this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); - this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); - } - } + //var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + //if (getF2 != null) + //{ + // this.txtForm2.Title = getF2.AuditFlowName + ":"; + // if (getF2.OperaterTime.HasValue) + // { + // if (getF2.IsAgree == true) + // { + // this.txtOpinion2.Text = "同意。"; + // } + // else + // { + // this.txtOpinion2.Text = getF2.Opinion; + // } + // this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + // this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + // } + //} + //var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + //if (getF3 != null) + //{ + // this.txtForm3.Title = getF3.AuditFlowName + ":"; + // if (getF3.OperaterTime.HasValue) + // { + // if (getF3.IsAgree == true) + // { + // this.txtOpinion3.Text = "同意。"; + // } + // else + // { + // this.txtOpinion3.Text = getF3.Opinion; + // } + // this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + // this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + // } + //} + //var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); + //if (getF4 != null) + //{ + // this.txtForm4.Title = getF4.AuditFlowName + ":"; + // if (getF4.OperaterTime.HasValue) + // { + // if (getF4.IsAgree == true) + // { + // this.txtOpinion4.Text = "同意。"; + // } + // else + // { + // this.txtOpinion4.Text = getF4.Opinion; + // } + // this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + // this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + // } + //} + //var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + //if (getF5 != null) + //{ + // this.txtForm5.Title = getF5.AuditFlowName + ":"; + // if (getF5.OperaterTime.HasValue) + // { + // if (getF5.IsAgree == true) + // { + // this.txtOpinion5.Text = "同意。"; + // } + // else + // { + // this.txtOpinion5.Text = getF5.Opinion; + // } + // this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); + // this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + // } + //} + //var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); + //if (getF6 != null) + //{ + // this.txtForm6.Title = getF6.AuditFlowName + ":"; + // if (getF6.OperaterTime.HasValue) + // { + // if (getF6.IsAgree == true) + // { + // this.txtOpinion6.Text = "同意。"; + // } + // else + // { + // this.txtOpinion6.Text = getF6.Opinion; + // } + // this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); + // this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + // } + //} } } #endregion @@ -212,7 +216,7 @@ /// private void BindGrid() { - string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '适用' ELSE '不适用' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '合格' ELSE '不合格' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + @" FROM License_LicenseItem AS L " + @" LEFT JOIN Sys_User AS U ON L.ConfirmManId =U.UserId" + @" WHERE L.DataId ='" + this.HeightWorkId +"'"; diff --git a/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.designer.cs index f64cd080..9e34a8c0 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.License { - - - public partial class HeightWorkView { - +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class HeightWorkView + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// lbLicenseCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbLicenseCode; - + /// /// txtApplyUnit 控件。 /// @@ -56,16 +58,16 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtApplyUnit; - + /// - /// txtApplyManName 控件。 + /// txtWorkAreaName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtApplyManName; - + protected global::FineUIPro.TextBox txtWorkAreaName; + /// /// txtWorkPalce 控件。 /// @@ -74,25 +76,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkPalce; - - /// - /// txtWorkType 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtWorkType; - - /// - /// txtWorkDate 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtWorkDate; - + /// /// txtWorkMeasures 控件。 /// @@ -101,7 +85,52 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkMeasures; - + + /// + /// txtWorkLeaderName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkLeaderName; + + /// + /// txtFireWatchManName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFireWatchManName; + + /// + /// txtWorkHeight 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkHeight; + + /// + /// txtWorkType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkType; + + /// + /// txtWorkDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkDate; + /// /// txtEquipmentTools 控件。 /// @@ -110,7 +139,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtEquipmentTools; - + /// /// Grid1 控件。 /// @@ -119,7 +148,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// txtForm1 控件。 /// @@ -128,7 +157,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form txtForm1; - + /// /// txtOpinion1 控件。 /// @@ -137,7 +166,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtOpinion1; - + /// /// Label6 控件。 /// @@ -146,7 +175,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label6; - + /// /// txtName1 控件。 /// @@ -155,7 +184,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtName1; - + /// /// txtTime1 控件。 /// @@ -164,232 +193,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTime1; - - /// - /// txtForm2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm2; - - /// - /// txtOpinion2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion2; - - /// - /// Label1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label1; - - /// - /// txtName2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName2; - - /// - /// txtTime2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime2; - - /// - /// txtForm3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm3; - - /// - /// txtOpinion3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion3; - - /// - /// Label2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label2; - - /// - /// txtName3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName3; - - /// - /// txtTime3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime3; - - /// - /// txtForm4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm4; - - /// - /// txtOpinion4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion4; - - /// - /// Label5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label5; - - /// - /// txtName4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName4; - - /// - /// txtTime4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime4; - - /// - /// txtForm5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm5; - - /// - /// txtOpinion5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion5; - - /// - /// Label9 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label9; - - /// - /// txtName5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName5; - - /// - /// txtTime5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime5; - - /// - /// txtForm6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm6; - - /// - /// txtOpinion6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion6; - - /// - /// Label12 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label12; - - /// - /// txtName6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName6; - - /// - /// txtTime6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime6; - + /// /// txtCance 控件。 /// @@ -398,7 +202,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCance; - + /// /// txtClose 控件。 /// @@ -407,7 +211,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtClose; - + /// /// Toolbar1 控件。 /// @@ -416,7 +220,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ToolbarFill1 控件。 /// @@ -425,7 +229,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnClose 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx index aef591b6..2a140728 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx @@ -29,14 +29,36 @@ - + + + + + + + + + - + + + + + + + + + + + + + + + @@ -47,21 +69,11 @@ - - - - - - - - - - - - + + - @@ -73,10 +85,10 @@ HeaderText="检查单" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认人" HeaderTextAlign="Center" TextAlign="Left" > + HeaderText="是否合格" HeaderTextAlign="Center" TextAlign="Left" > @@ -105,121 +117,11 @@ - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.cs index d5f08b5a..b4a0f1b3 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.cs @@ -46,8 +46,8 @@ { this.lbLicenseCode.Text = getLiftingWork.LicenseCode; this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getLiftingWork.ApplyUnitId); - this.txtApplyManName.Text = UserService.GetUserNameByUserId(getLiftingWork.ApplyManId); - this.txtWorkPalce.Text = getLiftingWork.WorkPalce; + //this.txtApplyManName.Text = UserService.GetUserNameByUserId(getLiftingWork.ApplyManId); + //this.txtWorkPalce.Text = getLiftingWork.WorkPalce; this.txtWorkLevel.Text = getLiftingWork.WorkLevel; if (getLiftingWork.ValidityStartTime.HasValue) { @@ -77,6 +77,12 @@ + string.Format("{0:yyyy-MM-dd HH:mm}", getLiftingWork.CloseTime) + "。"; } } + + txtLiftingHeight.Text = getLiftingWork.LiftingHeight; + txtFireWatchManName.Text = getLiftingWork.FireWatchManName; + txtWorkLeaderName.Text = getLiftingWork.WorkLeaderName; + txtQzgName.Text = getLiftingWork.QzgName; + txtSjName.Text = getLiftingWork.SjName; } } // 绑定表格 @@ -113,96 +119,96 @@ this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } - var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); - if (getF2 != null) - { - this.txtForm2.Title = getF2.AuditFlowName + ":"; - if (getF2.OperaterTime.HasValue) - { - if (getF2.IsAgree == true) - { - this.txtOpinion2.Text = "同意。"; - } - else - { - this.txtOpinion2.Text = getF2.Opinion; - } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); - this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); - } - } - var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); - if (getF3 != null) - { - this.txtForm3.Title = getF3.AuditFlowName + ":"; - if (getF3.OperaterTime.HasValue) - { - if (getF3.IsAgree == true) - { - this.txtOpinion3.Text = "同意。"; - } - else - { - this.txtOpinion3.Text = getF3.Opinion; - } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); - this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); - } - } - var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); - if (getF4 != null) - { - this.txtForm4.Title = getF4.AuditFlowName + ":"; - if (getF4.OperaterTime.HasValue) - { - if (getF4.IsAgree == true) - { - this.txtOpinion4.Text = "同意。"; - } - else - { - this.txtOpinion4.Text = getF4.Opinion; - } - this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); - this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); - } - } - var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); - if (getF5 != null) - { - this.txtForm5.Title = getF5.AuditFlowName + ":"; - if (getF5.OperaterTime.HasValue) - { - if (getF5.IsAgree == true) - { - this.txtOpinion5.Text = "同意。"; - } - else - { - this.txtOpinion5.Text = getF5.Opinion; - } - this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); - this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); - } - } - var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); - if (getF6 != null) - { - this.txtForm6.Title = getF6.AuditFlowName + ":"; - if (getF6.OperaterTime.HasValue) - { - if (getF6.IsAgree == true) - { - this.txtOpinion6.Text = "同意。"; - } - else - { - this.txtOpinion6.Text = getF6.Opinion; - } - this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); - this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); - } - } + //var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + //if (getF2 != null) + //{ + // this.txtForm2.Title = getF2.AuditFlowName + ":"; + // if (getF2.OperaterTime.HasValue) + // { + // if (getF2.IsAgree == true) + // { + // this.txtOpinion2.Text = "同意。"; + // } + // else + // { + // this.txtOpinion2.Text = getF2.Opinion; + // } + // this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + // this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + // } + //} + //var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + //if (getF3 != null) + //{ + // this.txtForm3.Title = getF3.AuditFlowName + ":"; + // if (getF3.OperaterTime.HasValue) + // { + // if (getF3.IsAgree == true) + // { + // this.txtOpinion3.Text = "同意。"; + // } + // else + // { + // this.txtOpinion3.Text = getF3.Opinion; + // } + // this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + // this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + // } + //} + //var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); + //if (getF4 != null) + //{ + // this.txtForm4.Title = getF4.AuditFlowName + ":"; + // if (getF4.OperaterTime.HasValue) + // { + // if (getF4.IsAgree == true) + // { + // this.txtOpinion4.Text = "同意。"; + // } + // else + // { + // this.txtOpinion4.Text = getF4.Opinion; + // } + // this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + // this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + // } + //} + //var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + //if (getF5 != null) + //{ + // this.txtForm5.Title = getF5.AuditFlowName + ":"; + // if (getF5.OperaterTime.HasValue) + // { + // if (getF5.IsAgree == true) + // { + // this.txtOpinion5.Text = "同意。"; + // } + // else + // { + // this.txtOpinion5.Text = getF5.Opinion; + // } + // this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); + // this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + // } + //} + //var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); + //if (getF6 != null) + //{ + // this.txtForm6.Title = getF6.AuditFlowName + ":"; + // if (getF6.OperaterTime.HasValue) + // { + // if (getF6.IsAgree == true) + // { + // this.txtOpinion6.Text = "同意。"; + // } + // else + // { + // this.txtOpinion6.Text = getF6.Opinion; + // } + // this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); + // this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + // } + //} } } #endregion @@ -212,7 +218,7 @@ /// private void BindGrid() { - string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '适用' ELSE '不适用' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '合格' ELSE '不合格' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + @" FROM License_LicenseItem AS L " + @" LEFT JOIN Sys_User AS U ON L.ConfirmManId =U.UserId" + @" WHERE L.DataId ='" + this.LiftingWorkId +"'"; diff --git a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.designer.cs index 3664c3fb..7c590340 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.License { - - - public partial class LiftingWorkView { - +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class LiftingWorkView + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// lbLicenseCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbLicenseCode; - + /// /// txtApplyUnit 控件。 /// @@ -56,43 +58,16 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtApplyUnit; - + /// - /// txtApplyManName 控件。 + /// txtSjName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtApplyManName; - - /// - /// txtWorkPalce 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtWorkPalce; - - /// - /// txtWorkLevel 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtWorkLevel; - - /// - /// txtWorkDate 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtWorkDate; - + protected global::FineUIPro.TextBox txtSjName; + /// /// txtWorkMeasures 控件。 /// @@ -101,7 +76,34 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkMeasures; - + + /// + /// txtQzgName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtQzgName; + + /// + /// txtWorkLeaderName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkLeaderName; + + /// + /// txtFireWatchManName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFireWatchManName; + /// /// txtCraneCapacity 控件。 /// @@ -110,7 +112,34 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCraneCapacity; - + + /// + /// txtLiftingHeight 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLiftingHeight; + + /// + /// txtWorkLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkLevel; + + /// + /// txtWorkDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkDate; + /// /// Grid1 控件。 /// @@ -119,7 +148,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// txtForm1 控件。 /// @@ -128,7 +157,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form txtForm1; - + /// /// txtOpinion1 控件。 /// @@ -137,7 +166,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtOpinion1; - + /// /// Label6 控件。 /// @@ -146,7 +175,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label6; - + /// /// txtName1 控件。 /// @@ -155,7 +184,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtName1; - + /// /// txtTime1 控件。 /// @@ -164,232 +193,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTime1; - - /// - /// txtForm2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm2; - - /// - /// txtOpinion2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion2; - - /// - /// Label1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label1; - - /// - /// txtName2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName2; - - /// - /// txtTime2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime2; - - /// - /// txtForm3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm3; - - /// - /// txtOpinion3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion3; - - /// - /// Label2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label2; - - /// - /// txtName3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName3; - - /// - /// txtTime3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime3; - - /// - /// txtForm4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm4; - - /// - /// txtOpinion4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion4; - - /// - /// Label5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label5; - - /// - /// txtName4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName4; - - /// - /// txtTime4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime4; - - /// - /// txtForm5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm5; - - /// - /// txtOpinion5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion5; - - /// - /// Label9 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label9; - - /// - /// txtName5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName5; - - /// - /// txtTime5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime5; - - /// - /// txtForm6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm6; - - /// - /// txtOpinion6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion6; - - /// - /// Label12 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label12; - - /// - /// txtName6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName6; - - /// - /// txtTime6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime6; - + /// /// txtCance 控件。 /// @@ -398,7 +202,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCance; - + /// /// txtClose 控件。 /// @@ -407,7 +211,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtClose; - + /// /// Toolbar1 控件。 /// @@ -416,7 +220,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ToolbarFill1 控件。 /// @@ -425,7 +229,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnClose 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx index 4e27c2be..00ecf1a3 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx @@ -21,41 +21,79 @@ - + - + - - + + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + @@ -67,10 +105,10 @@ HeaderText="检查单" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认人" HeaderTextAlign="Center" TextAlign="Left" > + HeaderText="是否合格" HeaderTextAlign="Center" TextAlign="Left" > @@ -99,121 +137,11 @@ - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.cs index 1946f21f..72989e02 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.cs @@ -46,8 +46,11 @@ { this.lbLicenseCode.Text = getLimitedSpace.LicenseCode; this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getLimitedSpace.ApplyUnitId); - this.txtApplyManName.Text = UserService.GetUserNameByUserId(getLimitedSpace.ApplyManId); + //this.txtApplyManName.Text = UserService.GetUserNameByUserId(getLimitedSpace.ApplyManId); this.txtWorkPalce.Text = getLimitedSpace.WorkPalce; + txtWorkAreaName.Text = UnitWorkService.GetUnitWorkName(getLimitedSpace.WorkAreaId); + txtFireWatchManName.Text = getLimitedSpace.FireWatchManName; + txtLimitedDescribe.Text = getLimitedSpace.LimitedDescribe; string name = getLimitedSpace.FireWatchManName; if (string.IsNullOrEmpty(getLimitedSpace.FireWatchManName)) { @@ -63,6 +66,27 @@ } } this.txtWorkMeasures.Text = getLimitedSpace.WorkMeasures; + if (getLimitedSpace.IsBoolOther == true) + { + txtIsBoolOther.Text = "是"; + } + else { + txtIsBoolOther.Text = "否"; + } + + if (getLimitedSpace.IsBoolHarmfulGas == true) + { + txtIsBoolHarmfulGas.Text = "是"; + } + else + { + txtIsBoolHarmfulGas.Text = "否"; + } + txtTestResult.Text = getLimitedSpace.TestResult; + txtTestDate.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getLimitedSpace.TestDate); + txtTestPerson.Text = getLimitedSpace.TestPerson; + txtVenStep.Text = getLimitedSpace.VenStep; + if (!string.IsNullOrEmpty(getLimitedSpace.CancelManId)) { this.txtCance.Text = UserService.GetUserNameByUserId(getLimitedSpace.CancelManId) + ";取消时间:" @@ -81,6 +105,8 @@ + string.Format("{0:yyyy-MM-dd HH:mm}", getLimitedSpace.CloseTime) + "。"; } } + + } } // 绑定表格 @@ -117,96 +143,96 @@ this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } - var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); - if (getF2 != null) - { - this.txtForm2.Title = getF2.AuditFlowName + ":"; - if (getF2.OperaterTime.HasValue) - { - if (getF2.IsAgree == true) - { - this.txtOpinion2.Text = "同意。"; - } - else - { - this.txtOpinion2.Text = getF2.Opinion; - } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); - this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); - } - } - var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); - if (getF3 != null) - { - this.txtForm3.Title = getF3.AuditFlowName + ":"; - if (getF3.OperaterTime.HasValue) - { - if (getF3.IsAgree == true) - { - this.txtOpinion3.Text = "同意。"; - } - else - { - this.txtOpinion3.Text = getF3.Opinion; - } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); - this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); - } - } - var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); - if (getF4 != null) - { - this.txtForm4.Title = getF4.AuditFlowName + ":"; - if (getF4.OperaterTime.HasValue) - { - if (getF4.IsAgree == true) - { - this.txtOpinion4.Text = "同意。"; - } - else - { - this.txtOpinion4.Text = getF4.Opinion; - } - this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); - this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); - } - } - var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); - if (getF5 != null) - { - this.txtForm5.Title = getF5.AuditFlowName + ":"; - if (getF5.OperaterTime.HasValue) - { - if (getF5.IsAgree == true) - { - this.txtOpinion5.Text = "同意。"; - } - else - { - this.txtOpinion5.Text = getF5.Opinion; - } - this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); - this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); - } - } - var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); - if (getF6 != null) - { - this.txtForm6.Title = getF6.AuditFlowName + ":"; - if (getF6.OperaterTime.HasValue) - { - if (getF6.IsAgree == true) - { - this.txtOpinion6.Text = "同意。"; - } - else - { - this.txtOpinion6.Text = getF6.Opinion; - } - this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); - this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); - } - } + //var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + //if (getF2 != null) + //{ + // this.txtForm2.Title = getF2.AuditFlowName + ":"; + // if (getF2.OperaterTime.HasValue) + // { + // if (getF2.IsAgree == true) + // { + // this.txtOpinion2.Text = "同意。"; + // } + // else + // { + // this.txtOpinion2.Text = getF2.Opinion; + // } + // this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + // this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + // } + //} + //var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + //if (getF3 != null) + //{ + // this.txtForm3.Title = getF3.AuditFlowName + ":"; + // if (getF3.OperaterTime.HasValue) + // { + // if (getF3.IsAgree == true) + // { + // this.txtOpinion3.Text = "同意。"; + // } + // else + // { + // this.txtOpinion3.Text = getF3.Opinion; + // } + // this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + // this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + // } + //} + //var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); + //if (getF4 != null) + //{ + // this.txtForm4.Title = getF4.AuditFlowName + ":"; + // if (getF4.OperaterTime.HasValue) + // { + // if (getF4.IsAgree == true) + // { + // this.txtOpinion4.Text = "同意。"; + // } + // else + // { + // this.txtOpinion4.Text = getF4.Opinion; + // } + // this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + // this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + // } + //} + //var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + //if (getF5 != null) + //{ + // this.txtForm5.Title = getF5.AuditFlowName + ":"; + // if (getF5.OperaterTime.HasValue) + // { + // if (getF5.IsAgree == true) + // { + // this.txtOpinion5.Text = "同意。"; + // } + // else + // { + // this.txtOpinion5.Text = getF5.Opinion; + // } + // this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); + // this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + // } + //} + //var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); + //if (getF6 != null) + //{ + // this.txtForm6.Title = getF6.AuditFlowName + ":"; + // if (getF6.OperaterTime.HasValue) + // { + // if (getF6.IsAgree == true) + // { + // this.txtOpinion6.Text = "同意。"; + // } + // else + // { + // this.txtOpinion6.Text = getF6.Opinion; + // } + // this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); + // this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + // } + //} } } #endregion @@ -216,7 +242,7 @@ /// private void BindGrid() { - string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '适用' ELSE '不适用' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '合格' ELSE '不合格' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + @" FROM License_LicenseItem AS L " + @" LEFT JOIN Sys_User AS U ON L.ConfirmManId =U.UserId" + @" WHERE L.DataId ='" + this.LimitedSpaceId +"'"; diff --git a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.designer.cs index c5cafc68..2f4615e6 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.License { - - - public partial class LimitedSpaceView { - +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class LimitedSpaceView + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// lbLicenseCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbLicenseCode; - + /// /// txtApplyUnit 控件。 /// @@ -56,16 +58,16 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtApplyUnit; - + /// - /// txtApplyManName 控件。 + /// txtWorkAreaName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtApplyManName; - + protected global::FineUIPro.TextBox txtWorkAreaName; + /// /// txtWorkPalce 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkPalce; - + /// /// txtFireWatchManName 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtFireWatchManName; - + /// /// txtWorkMeasures 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkMeasures; - + /// /// txtWorkDate 控件。 /// @@ -101,7 +103,70 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkDate; - + + /// + /// txtLimitedDescribe 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLimitedDescribe; + + /// + /// txtIsBoolOther 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIsBoolOther; + + /// + /// txtTestResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTestResult; + + /// + /// txtTestDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTestDate; + + /// + /// txtTestPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTestPerson; + + /// + /// txtVenStep 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtVenStep; + + /// + /// txtIsBoolHarmfulGas 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIsBoolHarmfulGas; + /// /// Grid1 控件。 /// @@ -110,7 +175,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// txtForm1 控件。 /// @@ -119,7 +184,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form txtForm1; - + /// /// txtOpinion1 控件。 /// @@ -128,7 +193,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtOpinion1; - + /// /// Label6 控件。 /// @@ -137,7 +202,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label6; - + /// /// txtName1 控件。 /// @@ -146,7 +211,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtName1; - + /// /// txtTime1 控件。 /// @@ -155,232 +220,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTime1; - - /// - /// txtForm2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm2; - - /// - /// txtOpinion2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion2; - - /// - /// Label1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label1; - - /// - /// txtName2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName2; - - /// - /// txtTime2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime2; - - /// - /// txtForm3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm3; - - /// - /// txtOpinion3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion3; - - /// - /// Label2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label2; - - /// - /// txtName3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName3; - - /// - /// txtTime3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime3; - - /// - /// txtForm4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm4; - - /// - /// txtOpinion4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion4; - - /// - /// Label5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label5; - - /// - /// txtName4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName4; - - /// - /// txtTime4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime4; - - /// - /// txtForm5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm5; - - /// - /// txtOpinion5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion5; - - /// - /// Label9 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label9; - - /// - /// txtName5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName5; - - /// - /// txtTime5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime5; - - /// - /// txtForm6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm6; - - /// - /// txtOpinion6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion6; - - /// - /// Label12 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label12; - - /// - /// txtName6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName6; - - /// - /// txtTime6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime6; - + /// /// txtCance 控件。 /// @@ -389,7 +229,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCance; - + /// /// txtClose 控件。 /// @@ -398,7 +238,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtClose; - + /// /// Toolbar1 控件。 /// @@ -407,7 +247,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// lbTemp 控件。 /// @@ -416,7 +256,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbTemp; - + /// /// btnAttachUrl 控件。 /// @@ -425,7 +265,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttachUrl; - + /// /// ToolbarFill1 控件。 /// @@ -434,7 +274,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnClose 控件。 /// @@ -443,7 +283,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx index 35b43d14..e35febcc 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx @@ -29,39 +29,40 @@ - - + + - + + + + + + + - + - - - - - - - + + <%-- - + --%> - @@ -73,10 +74,10 @@ HeaderText="检查单" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认人" HeaderTextAlign="Center" TextAlign="Left" > + HeaderText="是否合格" HeaderTextAlign="Center" TextAlign="Left" > @@ -105,121 +106,10 @@ - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.cs index 0a79c868..7cdc55f1 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.cs @@ -46,7 +46,7 @@ { this.lbLicenseCode.Text = getOpenCircuit.LicenseCode; this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getOpenCircuit.ApplyUnitId); - this.txtApplyManName.Text = UserService.GetUserNameByUserId(getOpenCircuit.ApplyManId); + //this.txtApplyManName.Text = UserService.GetUserNameByUserId(getOpenCircuit.ApplyManId); this.txtWorkPalce.Text = getOpenCircuit.WorkPalce; if (getOpenCircuit.ValidityStartTime.HasValue) @@ -57,9 +57,9 @@ this.txtWorkDate.Text += getOpenCircuit.ValidityEndTime.Value.ToString("f"); } } - this.txtRoadName.Text = getOpenCircuit.RoadName; - this.txtSafeMeasures.Text = getOpenCircuit.SafeMeasures; - this.txtWorkMeasures.Text = getOpenCircuit.WorkMeasures; + //this.txtRoadName.Text = getOpenCircuit.RoadName; + //this.txtSafeMeasures.Text = getOpenCircuit.SafeMeasures; + //this.txtWorkMeasures.Text = getOpenCircuit.WorkMeasures; if (!string.IsNullOrEmpty(getOpenCircuit.CancelManId)) { this.txtCance.Text = UserService.GetUserNameByUserId(getOpenCircuit.CancelManId) + ";取消时间:" @@ -78,6 +78,11 @@ + string.Format("{0:yyyy-MM-dd HH:mm}", getOpenCircuit.CloseTime) + "。"; } } + txtWorkAreaName.Text = UnitWorkService.GetUnitWorkName(getOpenCircuit.WorkAreaId); + txtFireWatchManName.Text = getOpenCircuit.FireWatchManName; + txtReason.Text = getOpenCircuit.Reason; + + } } // 绑定表格 @@ -114,96 +119,96 @@ this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } - var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); - if (getF2 != null) - { - this.txtForm2.Title = getF2.AuditFlowName + ":"; - if (getF2.OperaterTime.HasValue) - { - if (getF2.IsAgree == true) - { - this.txtOpinion2.Text = "同意。"; - } - else - { - this.txtOpinion2.Text = getF2.Opinion; - } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); - this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); - } - } - var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); - if (getF3 != null) - { - this.txtForm3.Title = getF3.AuditFlowName + ":"; - if (getF3.OperaterTime.HasValue) - { - if (getF3.IsAgree == true) - { - this.txtOpinion3.Text = "同意。"; - } - else - { - this.txtOpinion3.Text = getF3.Opinion; - } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); - this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); - } - } - var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); - if (getF4 != null) - { - this.txtForm4.Title = getF4.AuditFlowName + ":"; - if (getF4.OperaterTime.HasValue) - { - if (getF4.IsAgree == true) - { - this.txtOpinion4.Text = "同意。"; - } - else - { - this.txtOpinion4.Text = getF4.Opinion; - } - this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); - this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); - } - } - var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); - if (getF5 != null) - { - this.txtForm5.Title = getF5.AuditFlowName + ":"; - if (getF5.OperaterTime.HasValue) - { - if (getF5.IsAgree == true) - { - this.txtOpinion5.Text = "同意。"; - } - else - { - this.txtOpinion5.Text = getF5.Opinion; - } - this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); - this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); - } - } - var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); - if (getF6 != null) - { - this.txtForm6.Title = getF6.AuditFlowName + ":"; - if (getF6.OperaterTime.HasValue) - { - if (getF6.IsAgree == true) - { - this.txtOpinion6.Text = "同意。"; - } - else - { - this.txtOpinion6.Text = getF6.Opinion; - } - this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); - this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); - } - } + //var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + //if (getF2 != null) + //{ + // this.txtForm2.Title = getF2.AuditFlowName + ":"; + // if (getF2.OperaterTime.HasValue) + // { + // if (getF2.IsAgree == true) + // { + // this.txtOpinion2.Text = "同意。"; + // } + // else + // { + // this.txtOpinion2.Text = getF2.Opinion; + // } + // this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + // this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + // } + //} + //var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + //if (getF3 != null) + //{ + // this.txtForm3.Title = getF3.AuditFlowName + ":"; + // if (getF3.OperaterTime.HasValue) + // { + // if (getF3.IsAgree == true) + // { + // this.txtOpinion3.Text = "同意。"; + // } + // else + // { + // this.txtOpinion3.Text = getF3.Opinion; + // } + // this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + // this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + // } + //} + //var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); + //if (getF4 != null) + //{ + // this.txtForm4.Title = getF4.AuditFlowName + ":"; + // if (getF4.OperaterTime.HasValue) + // { + // if (getF4.IsAgree == true) + // { + // this.txtOpinion4.Text = "同意。"; + // } + // else + // { + // this.txtOpinion4.Text = getF4.Opinion; + // } + // this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + // this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + // } + //} + //var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + //if (getF5 != null) + //{ + // this.txtForm5.Title = getF5.AuditFlowName + ":"; + // if (getF5.OperaterTime.HasValue) + // { + // if (getF5.IsAgree == true) + // { + // this.txtOpinion5.Text = "同意。"; + // } + // else + // { + // this.txtOpinion5.Text = getF5.Opinion; + // } + // this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); + // this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + // } + //} + //var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); + //if (getF6 != null) + //{ + // this.txtForm6.Title = getF6.AuditFlowName + ":"; + // if (getF6.OperaterTime.HasValue) + // { + // if (getF6.IsAgree == true) + // { + // this.txtOpinion6.Text = "同意。"; + // } + // else + // { + // this.txtOpinion6.Text = getF6.Opinion; + // } + // this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); + // this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + // } + //} } } #endregion @@ -213,7 +218,7 @@ /// private void BindGrid() { - string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '适用' ELSE '不适用' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '合格' ELSE '不合格' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + @" FROM License_LicenseItem AS L " + @" LEFT JOIN Sys_User AS U ON L.ConfirmManId =U.UserId" + @" WHERE L.DataId ='" + this.OpenCircuitId +"'"; diff --git a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.designer.cs index 49d422de..4b4810f0 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.License { - - - public partial class OpenCircuitView { - +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class OpenCircuitView + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// lbLicenseCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbLicenseCode; - + /// /// txtApplyUnit 控件。 /// @@ -56,16 +58,16 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtApplyUnit; - + /// - /// txtApplyManName 控件。 + /// txtWorkAreaName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtApplyManName; - + protected global::FineUIPro.TextBox txtWorkAreaName; + /// /// txtWorkPalce 控件。 /// @@ -74,16 +76,25 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkPalce; - + /// - /// txtWorkMeasures 控件。 + /// txtFireWatchManName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtWorkMeasures; - + protected global::FineUIPro.TextBox txtFireWatchManName; + + /// + /// txtReason 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtReason; + /// /// txtWorkDate 控件。 /// @@ -92,25 +103,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkDate; - - /// - /// txtRoadName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtRoadName; - - /// - /// txtSafeMeasures 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtSafeMeasures; - + /// /// Grid1 控件。 /// @@ -119,7 +112,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// txtForm1 控件。 /// @@ -128,7 +121,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form txtForm1; - + /// /// txtOpinion1 控件。 /// @@ -137,7 +130,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtOpinion1; - + /// /// Label6 控件。 /// @@ -146,7 +139,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label6; - + /// /// txtName1 控件。 /// @@ -155,7 +148,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtName1; - + /// /// txtTime1 控件。 /// @@ -164,232 +157,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTime1; - - /// - /// txtForm2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm2; - - /// - /// txtOpinion2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion2; - - /// - /// Label1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label1; - - /// - /// txtName2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName2; - - /// - /// txtTime2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime2; - - /// - /// txtForm3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm3; - - /// - /// txtOpinion3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion3; - - /// - /// Label2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label2; - - /// - /// txtName3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName3; - - /// - /// txtTime3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime3; - - /// - /// txtForm4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm4; - - /// - /// txtOpinion4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion4; - - /// - /// Label5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label5; - - /// - /// txtName4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName4; - - /// - /// txtTime4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime4; - - /// - /// txtForm5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm5; - - /// - /// txtOpinion5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion5; - - /// - /// Label9 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label9; - - /// - /// txtName5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName5; - - /// - /// txtTime5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime5; - - /// - /// txtForm6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm6; - - /// - /// txtOpinion6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion6; - - /// - /// Label12 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label12; - - /// - /// txtName6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName6; - - /// - /// txtTime6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime6; - + /// /// txtCance 控件。 /// @@ -398,7 +166,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCance; - + /// /// txtClose 控件。 /// @@ -407,7 +175,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtClose; - + /// /// Toolbar1 控件。 /// @@ -416,7 +184,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ToolbarFill1 控件。 /// @@ -425,7 +193,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnClose 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx b/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx index 9a0f1cb5..adbdf6ca 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx @@ -29,10 +29,19 @@ - + + + + + + + + + + @@ -41,35 +50,32 @@ + + + + + + + + + - - - - - - - + + <%-- - - + - + --%> + + - - - - - - - - - @@ -81,10 +87,10 @@ HeaderText="检查单" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认人" HeaderTextAlign="Center" TextAlign="Left" > + HeaderText="是否合格" HeaderTextAlign="Center" TextAlign="Left" > @@ -113,121 +119,10 @@ - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.cs index 59ae18e7..23e26957 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.cs @@ -46,12 +46,13 @@ { this.lbLicenseCode.Text = getRadialWork.LicenseCode; this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getRadialWork.ApplyUnitId); - this.txtApplyManName.Text = UserService.GetUserNameByUserId(getRadialWork.ApplyManId); + //this.txtApplyManName.Text = UserService.GetUserNameByUserId(getRadialWork.ApplyManId); this.txtRadialType.Text = getRadialWork.RadialType; this.txtWorkLeader.Text = UserService.GetUserNameByUserId(getRadialWork.WorkLeaderId) + "/" + getRadialWork.WorkLeaderTel; this.txtWorkPalce.Text = getRadialWork.WorkPalce; this.txtFireWatchManName.Text = UserService.GetUserNameByUserId(getRadialWork.FireWatchManId); this.txtWatchManContact.Text = getRadialWork.WatchManContact; + txtWorkAreaName.Text = UnitWorkService.GetUnitWorkName(getRadialWork.WorkAreaId); if (getRadialWork.ValidityStartTime.HasValue) { this.txtWorkDate.Text = getRadialWork.ValidityStartTime.Value.ToString("f") + " 至 "; @@ -115,96 +116,96 @@ this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } - var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); - if (getF2 != null) - { - this.txtForm2.Title = getF2.AuditFlowName + ":"; - if (getF2.OperaterTime.HasValue) - { - if (getF2.IsAgree == true) - { - this.txtOpinion2.Text = "同意。"; - } - else - { - this.txtOpinion2.Text = getF2.Opinion; - } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); - this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); - } - } - var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); - if (getF3 != null) - { - this.txtForm3.Title = getF3.AuditFlowName + ":"; - if (getF3.OperaterTime.HasValue) - { - if (getF3.IsAgree == true) - { - this.txtOpinion3.Text = "同意。"; - } - else - { - this.txtOpinion3.Text = getF3.Opinion; - } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); - this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); - } - } - var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); - if (getF4 != null) - { - this.txtForm4.Title = getF4.AuditFlowName + ":"; - if (getF4.OperaterTime.HasValue) - { - if (getF4.IsAgree == true) - { - this.txtOpinion4.Text = "同意。"; - } - else - { - this.txtOpinion4.Text = getF4.Opinion; - } - this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); - this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); - } - } - var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); - if (getF5 != null) - { - this.txtForm5.Title = getF5.AuditFlowName + ":"; - if (getF5.OperaterTime.HasValue) - { - if (getF5.IsAgree == true) - { - this.txtOpinion5.Text = "同意。"; - } - else - { - this.txtOpinion5.Text = getF5.Opinion; - } - this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); - this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); - } - } - var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); - if (getF6 != null) - { - this.txtForm6.Title = getF6.AuditFlowName + ":"; - if (getF6.OperaterTime.HasValue) - { - if (getF6.IsAgree == true) - { - this.txtOpinion6.Text = "同意。"; - } - else - { - this.txtOpinion6.Text = getF6.Opinion; - } - this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); - this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); - } - } + //var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + //if (getF2 != null) + //{ + // this.txtForm2.Title = getF2.AuditFlowName + ":"; + // if (getF2.OperaterTime.HasValue) + // { + // if (getF2.IsAgree == true) + // { + // this.txtOpinion2.Text = "同意。"; + // } + // else + // { + // this.txtOpinion2.Text = getF2.Opinion; + // } + // this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + // this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + // } + //} + //var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + //if (getF3 != null) + //{ + // this.txtForm3.Title = getF3.AuditFlowName + ":"; + // if (getF3.OperaterTime.HasValue) + // { + // if (getF3.IsAgree == true) + // { + // this.txtOpinion3.Text = "同意。"; + // } + // else + // { + // this.txtOpinion3.Text = getF3.Opinion; + // } + // this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + // this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + // } + //} + //var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); + //if (getF4 != null) + //{ + // this.txtForm4.Title = getF4.AuditFlowName + ":"; + // if (getF4.OperaterTime.HasValue) + // { + // if (getF4.IsAgree == true) + // { + // this.txtOpinion4.Text = "同意。"; + // } + // else + // { + // this.txtOpinion4.Text = getF4.Opinion; + // } + // this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + // this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + // } + //} + //var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + //if (getF5 != null) + //{ + // this.txtForm5.Title = getF5.AuditFlowName + ":"; + // if (getF5.OperaterTime.HasValue) + // { + // if (getF5.IsAgree == true) + // { + // this.txtOpinion5.Text = "同意。"; + // } + // else + // { + // this.txtOpinion5.Text = getF5.Opinion; + // } + // this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); + // this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + // } + //} + //var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); + //if (getF6 != null) + //{ + // this.txtForm6.Title = getF6.AuditFlowName + ":"; + // if (getF6.OperaterTime.HasValue) + // { + // if (getF6.IsAgree == true) + // { + // this.txtOpinion6.Text = "同意。"; + // } + // else + // { + // this.txtOpinion6.Text = getF6.Opinion; + // } + // this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); + // this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + // } + //} } } #endregion @@ -214,7 +215,7 @@ /// private void BindGrid() { - string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '适用' ELSE '不适用' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '合格' ELSE '不合格' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + @" FROM License_LicenseItem AS L " + @" LEFT JOIN Sys_User AS U ON L.ConfirmManId =U.UserId" + @" WHERE L.DataId ='" + this.RadialWorkId +"'"; diff --git a/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.designer.cs index 4901bbd7..bad502ca 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.License { - - - public partial class RadialWorkView { - +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class RadialWorkView + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// lbLicenseCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbLicenseCode; - + /// /// txtApplyUnit 控件。 /// @@ -56,43 +58,16 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtApplyUnit; - + /// - /// txtApplyManName 控件。 + /// txtWorkAreaName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtApplyManName; - - /// - /// txtRadialType 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtRadialType; - - /// - /// txtWorkLeader 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtWorkLeader; - - /// - /// txtWorkDate 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtWorkDate; - + protected global::FineUIPro.TextBox txtWorkAreaName; + /// /// txtWorkPalce 控件。 /// @@ -101,16 +76,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkPalce; - - /// - /// txtWorkMeasures 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtWorkMeasures; - + /// /// txtFireWatchManName 控件。 /// @@ -119,7 +85,25 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtFireWatchManName; - + + /// + /// txtRadialType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRadialType; + + /// + /// txtWorkLeader 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkLeader; + /// /// txtWatchManContact 控件。 /// @@ -128,7 +112,25 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWatchManContact; - + + /// + /// txtWorkMeasures 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMeasures; + + /// + /// txtWorkDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkDate; + /// /// Grid1 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// txtForm1 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form txtForm1; - + /// /// txtOpinion1 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtOpinion1; - + /// /// Label6 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label6; - + /// /// txtName1 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtName1; - + /// /// txtTime1 控件。 /// @@ -182,232 +184,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTime1; - - /// - /// txtForm2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm2; - - /// - /// txtOpinion2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion2; - - /// - /// Label1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label1; - - /// - /// txtName2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName2; - - /// - /// txtTime2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime2; - - /// - /// txtForm3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm3; - - /// - /// txtOpinion3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion3; - - /// - /// Label2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label2; - - /// - /// txtName3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName3; - - /// - /// txtTime3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime3; - - /// - /// txtForm4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm4; - - /// - /// txtOpinion4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion4; - - /// - /// Label5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label5; - - /// - /// txtName4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName4; - - /// - /// txtTime4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime4; - - /// - /// txtForm5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm5; - - /// - /// txtOpinion5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion5; - - /// - /// Label9 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label9; - - /// - /// txtName5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName5; - - /// - /// txtTime5 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime5; - - /// - /// txtForm6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form txtForm6; - - /// - /// txtOpinion6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtOpinion6; - - /// - /// Label12 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label12; - - /// - /// txtName6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtName6; - - /// - /// txtTime6 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label txtTime6; - + /// /// txtCance 控件。 /// @@ -416,7 +193,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCance; - + /// /// txtClose 控件。 /// @@ -425,7 +202,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtClose; - + /// /// Toolbar1 控件。 /// @@ -434,7 +211,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// lbTemp 控件。 /// @@ -443,7 +220,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbTemp; - + /// /// btnAttachUrl 控件。 /// @@ -452,7 +229,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttachUrl; - + /// /// ToolbarFill1 控件。 /// @@ -461,7 +238,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnClose 控件。 /// @@ -470,7 +247,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermEdit.aspx b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermEdit.aspx new file mode 100644 index 00000000..0c964cbb --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermEdit.aspx @@ -0,0 +1,171 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InspectTailTermEdit.aspx.cs" Inherits="FineUIPro.Web.TestRun.BeforeTestRun.InspectTailTermEdit" %> + + + + + + 质量巡检 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermEdit.aspx.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermEdit.aspx.cs new file mode 100644 index 00000000..4087645f --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermEdit.aspx.cs @@ -0,0 +1,500 @@ +using BLL; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.TestRun.BeforeTestRun +{ + public partial class InspectTailTermEdit : PageBase + { + /// + /// 主键 + /// + public string TailTermId + { + get { return (string)ViewState["TailTermId"]; } + set { ViewState["TailTermId"] = value; } + } + + /// + /// 是否查看 + /// + public bool IsView + { + get { return (bool)ViewState["IsView"]; } + set { ViewState["IsView"] = value; } + } + + /// + /// 问题图片是否可编辑 + /// + public int QuestionEditImg + { + get { return (int)ViewState["QuestionEditImg"]; } + set { ViewState["QuestionEditImg"] = value; } + } + + /// + /// 整改图片是否可编辑 + /// + public int RectifyEditImg + { + get { return (int)ViewState["RectifyEditImg"]; } + set { ViewState["RectifyEditImg"] = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.TailTermId = Request["TailTermId"]; + //是否查看 + this.IsView = string.IsNullOrWhiteSpace(Request["IsView"]) ? false : bool.Parse(Request["IsView"]); + //数据绑定 + PageInit(); + //审批已经绑定 + gvApproveBrid(); + //判断是否查看 + if (IsView) + { + btnSave.Hidden = true; + btnSubmit.Hidden = true; + QuestionEditImg = -1; + RectifyEditImg = -1; + txtTailTermCode.Enabled = false; + ddlConstructionUnit.Enabled = false; + ddlProblemType.Enabled = false; + ddlQuestionTechnologyId.Enabled = false; + ddlTermItemId.Enabled = false; + txtQuestionDesc.Enabled = false; + txtRectifyOpinion.Enabled = false; + txtRectifyTime.Enabled = false; + ddlInspectUser.Enabled = false; + ddlApproveUser.Enabled = false; + } + } + } + + /// + /// 默认绑定 + /// + public void PageInit() + { + QuestionEditImg = 0; + RectifyEditImg = 0; + //施工单位 + UnitService.InitUnitByProjectIdUnitTypeDropDownList(ddlConstructionUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, false); + //获取用户信息 + var users = from user in Funs.DB.Sys_User + join projectrole in Funs.DB.Project_ProjectUser on user.UserId equals projectrole.UserId + where projectrole.ProjectId == this.CurrUser.LoginProjectId + select user; + //检查人和审核人 + if (users.Count() > 0) + { + //检查人 + ddlInspectUser.DataTextField = "UserName"; + ddlInspectUser.DataValueField = "UserId"; + ddlInspectUser.DataSource = users; + ddlInspectUser.DataBind(); + //审核人 + ddlApproveUser.DataTextField = "UserName"; + ddlApproveUser.DataValueField = "UserId"; + ddlApproveUser.DataSource = users; + ddlApproveUser.DataBind(); + } + var model = Funs.DB.PreRun_InspectTailTerm.FirstOrDefault(x => x.TailTermId == this.TailTermId); + if (model != null) + { + //项目名称 + txtProjectName.Text = model.ProjectName; + //巡检编号 + txtTailTermCode.Text = model.TailTermCode; + //施工单位 + ddlConstructionUnit.SelectedValue = model.ConstructionUnit; + //问题类别 + ddlProblemType.SelectedValue = model.ProblemType.ToString(); + //绑定管道或者设备 + if (model.ProblemType == 1) + { + var sysPipingData = from proper in Funs.DB.PreRun_PropertySysPiping + join selectproper in Funs.DB.PreRun_SubPropertySelect on proper.PropertyId equals selectproper.PropertyId + join termitem in Funs.DB.PreRun_SubInspectTermItem on proper.PropertyId equals termitem.PropertyTechnologyId + where termitem.InspectionResults == 0 && termitem.InspectedUser == this.CurrUser.UserId + group proper by new { proper.PropertyId, proper.PipingCode } into t + select new + { + Id = t.Key.PropertyId, + Code = $"管道:({t.Key.PipingCode})" + }; + if (sysPipingData.Count() > 0) + { + ddlQuestionTechnologyId.DataTextField = "Code"; + ddlQuestionTechnologyId.DataValueField = "Id"; + ddlQuestionTechnologyId.DataSource = sysPipingData; + ddlQuestionTechnologyId.DataBind(); + } + } + else + { + var sysPipingData = from technology in Funs.DB.PreRun_TechnologySysPiping + join selecttechnology in Funs.DB.PreRun_SubTechnologySelect on technology.TechnologyId equals selecttechnology.TechnologyId + join termitem in Funs.DB.PreRun_SubInspectTermItem on technology.TechnologyId equals termitem.PropertyTechnologyId + where termitem.InspectionResults == 0 && termitem.InspectedUser == this.CurrUser.UserId + group technology by new { technology.TechnologyId, technology.TagNumber } into t + select new + { + Id = t.Key.TechnologyId, + Code = $"设备:({t.Key.TagNumber})" + }; + if (sysPipingData.Count() > 0) + { + ddlQuestionTechnologyId.DataTextField = "Code"; + ddlQuestionTechnologyId.DataValueField = "Id"; + ddlQuestionTechnologyId.DataSource = sysPipingData; + ddlQuestionTechnologyId.DataBind(); + } + } + //管道/设备 + ddlQuestionTechnologyId.SelectedValue = model.QuestionTechnologyId; + //绑定检查项 + if (!string.IsNullOrWhiteSpace(ddlQuestionTechnologyId.SelectedValue)) + { + var TermItemIds = Funs.DB.PreRun_InspectTailTerm.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.TailTermId != this.TailTermId).Select(a => a.TermItemId).ToList(); + var list = new List(); + if (TermItemIds.Count > 0) + { + list = Funs.DB.PreRun_SubInspectTermItem.Where(x => x.InspectionResults == 0 && x.PropertyTechnologyId == ddlQuestionTechnologyId.SelectedValue && !TermItemIds.Contains(x.TermItemId)).ToList(); + } + else + { + list = Funs.DB.PreRun_SubInspectTermItem.Where(x => x.InspectionResults == 0 && x.PropertyTechnologyId == ddlQuestionTechnologyId.SelectedValue).ToList(); + } + if (list.Count() > 0) + { + ddlTermItemId.DataTextField = "WorkInspectName"; + ddlTermItemId.DataValueField = "TermItemId"; + ddlTermItemId.DataSource = list; + ddlTermItemId.DataBind(); + } + } + //检查项 + ddlTermItemId.SelectedValue = model.TermItemId; + //问题描述 + txtQuestionDesc.Text = model.QuestionDesc; + //整改意见 + txtRectifyOpinion.Text = model.RectifyOpinion; + //整改时间 + txtRectifyTime.Text = model.RectifyTime != null ? model.RectifyTime.Value.ToString("yyyy-MM-dd hh:mm:ss") : string.Empty; + //检查人 + ddlInspectUser.SelectedValue = model.InspectUser; + //审核人 + ddlApproveUser.SelectedValue = model.ApproveUser; + if (model.ApproveState > 1) + { + QuestionEditImg = -1; + RectifyEditImg = -1; + } + } + else + { + this.TailTermId = Guid.NewGuid().ToString(); + var projectModel = Funs.DB.Base_Project.FirstOrDefault(e => e.ProjectId == this.CurrUser.LoginProjectId); + if (projectModel != null) + { + txtProjectName.Text = projectModel.ProjectName; + string code = projectModel.ProjectCode + "-06-CM03-XJ-"; + txtTailTermCode.Text = SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.PreRun_InspectTailTerm", "TailTermCode", code); + } + } + } + + /// + /// 审批意见绑定 + /// + public void gvApproveBrid() + { + string strSql = @"select a.InspectTermId,a.ApproveOpinion,a.ApproveTime,a.ApproveState,(case a.ApproveState when 0 then '退回' when 1 then '通过' else '' end) as ApproveStateName,a.AddUser,a.AddTime from PreRun_InspectTermApproveRecords as a inner join PreRun_InspectTailTerm as b on a.TailTermId=b.TailTermId inner join PreRun_SubInspectTermItem as c on c.TermItemId=a.TermItemId where 1=1 and a.ProjectId=@ProjectId and a.TailTermId=@TailTermId "; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + listStr.Add(new SqlParameter("@TailTermId", this.TailTermId)); + strSql += " order by a.AddTime asc"; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + gvApprove.DataSource = tb; + gvApprove.DataBind(); + } + + #region 按钮 + + /// + /// 保存 + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(ddlConstructionUnit.SelectedValue)) + { + ShowNotify("请选择施工单位!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlProblemType.SelectedValue)) + { + ShowNotify("请选择问题类别!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlQuestionTechnologyId.SelectedValue)) + { + ShowNotify("请选择管道/设备!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlTermItemId.SelectedValue)) + { + ShowNotify("请选择检查项!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlInspectUser.SelectedValue)) + { + ShowNotify("请选择检查人!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlApproveUser.SelectedValue)) + { + ShowNotify("请选择审核人!", MessageBoxIcon.Warning); + return; + } + var isAdd = false; + var model = Funs.DB.PreRun_InspectTailTerm.FirstOrDefault(x => x.TailTermId == this.TailTermId); + if (model == null) + { + isAdd = true; + model = new PreRun_InspectTailTerm(); + model.TailTermId = this.TailTermId; + model.ProjectId = this.CurrUser.LoginProjectId; + } + model.ProjectName = txtProjectName.Text; + model.TailTermCode = txtTailTermCode.Text; + model.ConstructionUnit = ddlConstructionUnit.SelectedValue; + model.ProblemType = int.Parse(ddlProblemType.SelectedValue); + model.QuestionTechnologyId = ddlQuestionTechnologyId.SelectedValue; + model.TermItemId = ddlTermItemId.SelectedValue; + model.QuestionDesc = txtQuestionDesc.Text.Trim(); + model.RectifyOpinion = txtRectifyOpinion.Text.Trim(); + model.RectifyTime = DateTime.Parse(txtRectifyTime.Text); + model.InspectUser = ddlInspectUser.SelectedValue; + model.ApproveUser = ddlApproveUser.SelectedValue; + model.ApproveState = 0; + model.AddUser = this.CurrUser.LoginProjectId; + model.AddTime = DateTime.Now; + var workPack = Funs.DB.PreRun_SubInspectTermItem.FirstOrDefault(x => x.TermItemId == model.TermItemId); + if (workPack != null) + { + model.WorkPackId = workPack.WorkPackId; + } + if (isAdd) + { + Funs.DB.PreRun_InspectTailTerm.InsertOnSubmit(model); + } + Funs.DB.SubmitChanges(); + ShowNotify("操作成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + /// + /// 保存并提交 + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(ddlConstructionUnit.SelectedValue)) + { + ShowNotify("请选择施工单位!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlProblemType.SelectedValue)) + { + ShowNotify("请选择问题类别!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlQuestionTechnologyId.SelectedValue)) + { + ShowNotify("请选择管道/设备!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlTermItemId.SelectedValue)) + { + ShowNotify("请选择检查项!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlInspectUser.SelectedValue)) + { + ShowNotify("请选择检查人!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlApproveUser.SelectedValue)) + { + ShowNotify("请选择审核人!", MessageBoxIcon.Warning); + return; + } + var isAdd = false; + var model = Funs.DB.PreRun_InspectTailTerm.FirstOrDefault(x => x.TailTermId == this.TailTermId); + if (model == null) + { + isAdd = true; + model = new PreRun_InspectTailTerm(); + model.TailTermId = this.TailTermId; + model.ProjectId = this.CurrUser.LoginProjectId; + } + model.ProjectName = txtProjectName.Text; + model.TailTermCode = txtTailTermCode.Text; + model.ConstructionUnit = ddlConstructionUnit.SelectedValue; + model.ProblemType = int.Parse(ddlProblemType.SelectedValue); + model.QuestionTechnologyId = ddlQuestionTechnologyId.SelectedValue; + model.TermItemId = ddlTermItemId.SelectedValue; + model.QuestionDesc = txtQuestionDesc.Text.Trim(); + model.RectifyOpinion = txtRectifyOpinion.Text.Trim(); + model.RectifyTime = DateTime.Parse(txtRectifyTime.Text); + model.InspectUser = ddlInspectUser.SelectedValue; + model.ApproveUser = ddlApproveUser.SelectedValue; + model.ApproveState = 2; + model.AddUser = this.CurrUser.LoginProjectId; + model.AddTime = DateTime.Now; + var workPack = Funs.DB.PreRun_SubInspectTermItem.FirstOrDefault(x => x.TermItemId == model.TermItemId); + if (workPack != null) + { + model.WorkPackId = workPack.WorkPackId; + } + if (isAdd) + { + Funs.DB.PreRun_InspectTailTerm.InsertOnSubmit(model); + } + Funs.DB.SubmitChanges(); + ShowNotify("操作成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + /// + /// 问题图片 + /// + protected void imgBtnQuestionFile_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/CheckControl&menuId={2}", QuestionEditImg, this.TailTermId + "q", Const.InspectTailTerm))); + } + + /// + /// 整改图片 + /// + protected void imgBtnRectifyFile_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/CheckControl&menuId={2}", RectifyEditImg, this.TailTermId + "h", Const.InspectTailTerm))); + } + + #endregion + + #region 事件 + + /// + /// 问题类别事件 + /// + protected void ddlProblemType_SelectedIndexChanged(object sender, EventArgs e) + { + if (!string.IsNullOrWhiteSpace(ddlProblemType.SelectedValue)) + { + if (ddlProblemType.SelectedValue == "1") + { + var sysPipingData = from proper in Funs.DB.PreRun_PropertySysPiping + join selectproper in Funs.DB.PreRun_SubPropertySelect on proper.PropertyId equals selectproper.PropertyId + join termitem in Funs.DB.PreRun_SubInspectTermItem on proper.PropertyId equals termitem.PropertyTechnologyId + where termitem.InspectionResults == 0 && termitem.InspectedUser == this.CurrUser.UserId + group proper by new { proper.PropertyId, proper.PipingCode } into t + select new + { + Id = t.Key.PropertyId, + Code = $"管道:({t.Key.PipingCode})" + }; + ddlQuestionTechnologyId.Items.Clear(); + if (sysPipingData.Count() > 0) + { + ddlQuestionTechnologyId.DataTextField = "Code"; + ddlQuestionTechnologyId.DataValueField = "Id"; + ddlQuestionTechnologyId.DataSource = sysPipingData; + ddlQuestionTechnologyId.DataBind(); + } + else + { + ddlQuestionTechnologyId.Items.Insert(0, new ListItem("==无数据==", "")); + } + } + else + { + var sysPipingData = from technology in Funs.DB.PreRun_TechnologySysPiping + join selecttechnology in Funs.DB.PreRun_SubTechnologySelect on technology.TechnologyId equals selecttechnology.TechnologyId + join termitem in Funs.DB.PreRun_SubInspectTermItem on technology.TechnologyId equals termitem.PropertyTechnologyId + where termitem.InspectionResults == 0 && termitem.InspectedUser == this.CurrUser.UserId + group technology by new { technology.TechnologyId, technology.TagNumber } into t + select new + { + Id = t.Key.TechnologyId, + Code = $"设备:({t.Key.TagNumber})" + }; + ddlQuestionTechnologyId.Items.Clear(); + if (sysPipingData.Count() > 0) + { + ddlQuestionTechnologyId.DataTextField = "Code"; + ddlQuestionTechnologyId.DataValueField = "Id"; + ddlQuestionTechnologyId.DataSource = sysPipingData; + ddlQuestionTechnologyId.DataBind(); + } + else + { + ddlQuestionTechnologyId.Items.Insert(0, new ListItem("==无数据==", "")); + } + } + } + } + + /// + /// 管道/设备 + /// + protected void ddlQuestionTechnologyId_SelectedIndexChanged(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(ddlQuestionTechnologyId.SelectedValue)) return; + var TermItemIds = Funs.DB.PreRun_InspectTailTerm.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.TailTermId != this.TailTermId).Select(a => a.TermItemId).ToList(); + var list = new List(); + if (TermItemIds.Count > 0) + { + list = Funs.DB.PreRun_SubInspectTermItem.Where(x => x.InspectionResults == 0 && x.PropertyTechnologyId == ddlQuestionTechnologyId.SelectedValue && !TermItemIds.Contains(x.TermItemId)).ToList(); + } + else + { + list = Funs.DB.PreRun_SubInspectTermItem.Where(x => x.InspectionResults == 0 && x.PropertyTechnologyId == ddlQuestionTechnologyId.SelectedValue).ToList(); + } + ddlTermItemId.Items.Clear(); + if (list.Count() > 0) + { + ddlTermItemId.DataTextField = "WorkInspectName"; + ddlTermItemId.DataValueField = "TermItemId"; + ddlTermItemId.DataSource = list; + ddlTermItemId.DataBind(); + } + else + { + ddlTermItemId.Items.Insert(0, new ListItem("==无数据==", "")); + } + } + + /// + /// + /// + protected void WindowAtt_Close(object sender, WindowCloseEventArgs e) + { + + } + } + + #endregion +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermEdit.aspx.designer.cs new file mode 100644 index 00000000..925aa731 --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermEdit.aspx.designer.cs @@ -0,0 +1,269 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.TestRun.BeforeTestRun +{ + + + public partial class InspectTailTermEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// txtProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectName; + + /// + /// txtTailTermCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTailTermCode; + + /// + /// ddlConstructionUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlConstructionUnit; + + /// + /// ddlProblemType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlProblemType; + + /// + /// ddlQuestionTechnologyId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlQuestionTechnologyId; + + /// + /// ddlTermItemId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlTermItemId; + + /// + /// txtQuestionDesc 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtQuestionDesc; + + /// + /// txtRectifyOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRectifyOpinion; + + /// + /// txtRectifyTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtRectifyTime; + + /// + /// ddlInspectUser 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlInspectUser; + + /// + /// ddlApproveUser 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlApproveUser; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// imgBtnQuestionFile 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button imgBtnQuestionFile; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// lblAttach 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblAttach; + + /// + /// imgBtnRectifyFile 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button imgBtnRectifyFile; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermList.aspx b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermList.aspx new file mode 100644 index 00000000..71295e4f --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermList.aspx @@ -0,0 +1,163 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InspectTailTermList.aspx.cs" Inherits="FineUIPro.Web.TestRun.BeforeTestRun.InspectTailTermList" %> + + + + + + + + + 质量巡检 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermList.aspx.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermList.aspx.cs new file mode 100644 index 00000000..6b3a6ad1 --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermList.aspx.cs @@ -0,0 +1,243 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.TestRun.BeforeTestRun +{ + public partial class InspectTailTermList : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //绑定数据 + BindGrid(); + } + } + + + #region 绑定数据 + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select * from (select a.TailTermId,a.ProjectId,d.ProjectCode,d.ProjectName,a.TailTermCode,a.ConstructionUnit,b.UnitName,a.ProblemType,'管道' as ProblemTypeName,a.QuestionTechnologyId,a.TermItemId,c.WorkInspectName,a.QuestionDesc,a.RectifyTime,a.RectifyOpinion,a.InspectUser,e.UserName as InspectUserName,a.ApproveUser,f.UserName as ApproveUserName,a.ApproveState,(case a.ApproveState when 0 then '待提交' when 1 then '退回' when 2 then '待审核' when 3 then '审核通过' else '待提交' end) as ApproveStateName,a.AddTime from PreRun_InspectTailTerm as a inner join Base_Unit as b on a.ConstructionUnit=b.UnitId inner join PreRun_SubInspectTermItem as c on c.TermItemId=a.TermItemId inner join Base_Project as d on d.ProjectId=a.ProjectId inner join Sys_User as e on e.UserId=a.InspectUser inner join Sys_User as f on f.UserId=a.ApproveUser where a.ProblemType=1 and a.ProjectId=@projectid and c.InspectedUser=@InspectedUser union all select a.TailTermId,a.ProjectId,d.ProjectCode,d.ProjectName,a.TailTermCode,a.ConstructionUnit,b.UnitName,a.ProblemType,'设备' as ProblemTypeName,a.QuestionTechnologyId,a.TermItemId,c.WorkInspectName,a.QuestionDesc,a.RectifyTime,a.RectifyOpinion,a.InspectUser,e.UserName as InspectUserName,a.ApproveUser,f.UserName as ApproveUserName,a.ApproveState,(case a.ApproveState when 0 then '待提交' when 1 then '退回' when 2 then '待审核' when 3 then '审核通过' else '待提交' end) as ApproveStateName,a.AddTime from PreRun_InspectTailTerm as a inner join Base_Unit as b on a.ConstructionUnit=b.UnitId inner join PreRun_SubInspectTermItem as c on c.TermItemId=a.TermItemId inner join Base_Project as d on d.ProjectId=a.ProjectId inner join Sys_User as e on e.UserId=a.InspectUser inner join Sys_User as f on f.UserId=a.ApproveUser where a.ProblemType=2 and a.ProjectId=@projectid and c.InspectedUser=@InspectedUser) as t where 1=1 "; + List listStr = new List(); + listStr.Add(new SqlParameter("@projectid", this.CurrUser.LoginProjectId)); + listStr.Add(new SqlParameter("@InspectedUser", this.CurrUser.UserId)); + //问题类别 + if (!string.IsNullOrWhiteSpace(ddlProblemType.SelectedValue)) + { + strSql += " and t.ProblemType=@ProblemType"; + listStr.Add(new SqlParameter("@ProblemType", ddlProblemType.SelectedValue)); + } + //审核状态 + if (!string.IsNullOrWhiteSpace(ddlApproveState.SelectedValue)) + { + strSql += " and t.ApproveState=@ApproveState"; + listStr.Add(new SqlParameter("@ApproveState", ddlApproveState.SelectedValue)); + } + //开始时间 + if (!string.IsNullOrWhiteSpace(txtStartTime.Text)) + { + strSql += $" and t.RectifyTime>='{DateTime.Parse(txtStartTime.Text.Trim()).ToString("yyyy-MM-dd")} 00:00:00'"; + } + //结束时间 + if (!string.IsNullOrWhiteSpace(txtEndTime.Text)) + { + strSql += $" and t.RectifyTime<='{DateTime.Parse(txtStartTime.Text.Trim()).ToString("yyyy-MM-dd")} 23:59:59'"; + } + strSql += " order by AddTime asc"; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 分页 + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 双击事件 + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + btnMenuModify_Click(null, null); + } + + /// + /// 分页下拉框 + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + #endregion + + #region 按钮 + + /// + /// 修改 + /// + protected void btnMenuModify_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + var model = Funs.DB.PreRun_InspectTailTerm.FirstOrDefault(x => x.TailTermId == Grid1.SelectedRowID); + if (model != null) + { + if (model.ApproveState > 1) + { + Alert.ShowInTop("只可编辑“待提交”和“退回”的记录!", MessageBoxIcon.Warning); + return; + } + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectTailTermEdit.aspx?TailTermId={0}", Grid1.SelectedRowID, "编辑 - "))); + } + + /// + /// 新增 + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectTailTermEdit.aspx?TailTermId=", "新增 - "))); + } + + /// + /// 查看 + /// + protected void btnMenuView_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectTailTermEdit.aspx?IsView=true&TailTermId={0}", Grid1.SelectedRowID, "查看 - "))); + } + + /// + /// 删除 + /// + protected void btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + var model = Funs.DB.PreRun_InspectTailTerm.FirstOrDefault(x => x.TailTermId == Grid1.SelectedRowID); + if (model != null) + { + if (model.ApproveState != 0) + { + Alert.ShowInTop("只可删除待提交的记录!", MessageBoxIcon.Warning); + return; + } + + Funs.DB.PreRun_InspectTailTerm.DeleteOnSubmit(model); + Funs.DB.SubmitChanges(); + BindGrid(); + Alert.ShowInTop("删除成功!", MessageBoxIcon.Success); + } + } + + /// + /// 查询 + /// + protected void btnQuery_Click(object sender, EventArgs e) + { + BindGrid(); + } + + /// + /// 弹框关闭 + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + + /// + /// 提交审核 + /// + protected void btnSubmitReview_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + var model = Funs.DB.PreRun_InspectTailTerm.FirstOrDefault(x => x.TailTermId == Grid1.SelectedRowID); + if (model != null) + { + if (model.ApproveState > 1) + { + Alert.ShowInTop("只可提交“待提交”和“退回”的记录!", MessageBoxIcon.Warning); + return; + } + model.ApproveState = 2; + Funs.DB.SubmitChanges(); + BindGrid(); + Alert.ShowInTop("提交成功!", MessageBoxIcon.Success); + } + } + + /// + /// 撤回提交 + /// + protected void btnwithdraw_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + var model = Funs.DB.PreRun_InspectTailTerm.FirstOrDefault(x => x.TailTermId == Grid1.SelectedRowID); + if (model != null) + { + if (model.ApproveState != 2) + { + Alert.ShowInTop("只可撤回“待审核”的记录!", MessageBoxIcon.Warning); + return; + } + model.ApproveState = 0; + Funs.DB.SubmitChanges(); + BindGrid(); + Alert.ShowInTop("撤回成功!", MessageBoxIcon.Success); + } + } + + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermList.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermList.aspx.designer.cs new file mode 100644 index 00000000..5094bc84 --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/InspectTailTermList.aspx.designer.cs @@ -0,0 +1,206 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.TestRun.BeforeTestRun +{ + + + public partial class InspectTailTermList + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ddlProblemType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlProblemType; + + /// + /// ddlApproveState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlApproveState; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnQuery; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnSubmitReview 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmitReview; + + /// + /// btnwithdraw 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnwithdraw; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuModify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuModify; + + /// + /// btnMenuView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuView; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx index a6a50fad..c24d23d3 100644 --- a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx @@ -18,7 +18,7 @@ + + + + + + + - + @@ -61,6 +91,21 @@ + + + + + + + + + + + + + + + @@ -76,8 +121,36 @@ //检查人 var ddlInspectedUser = '<%= ddlInspectedUser.ClientID %>'; function renderInspectedUser(value) { - return F(ddlInspectedUser).getTextByValue(value); + if (value == -1) { + return ''; + } else { + return F(ddlInspectedUser).getTextByValue(value); + } } + + var ddbSysPipingClientID = '<%= ddbSysPiping.ClientID %>'; + var cbSysPipingClientID = '<%= cbSysPiping.ClientID %>'; + function onSelectAllClick() { + var cbSysPiping = F(cbSysPipingClientID); + $.each(cbSysPiping.items, function (index, item) { + item.setValue(true); + }); + + // 将数据控件中的值同步到输入框 + F(ddbSysPipingClientID).syncToBox(); + } + + + function onClearAllClick() { + var cbSysPiping = F(cbSysPipingClientID); + $.each(cbSysPiping.items, function (index, item) { + item.setValue(false); + }); + + // 将数据控件中的值同步到输入框 + F(ddbSysPipingClientID).syncToBox(); + } + diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx.cs index 15a190f0..799456ec 100644 --- a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx.cs +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx.cs @@ -19,6 +19,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun if (!IsPostBack) { this.InitTreeMenu();//加载树 + PageInit(); } } @@ -37,6 +38,12 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun rootNode.ToolTip = ""; rootNode.EnableClickEvent = true; this.tvControlItem.Nodes.Add(rootNode); + + //var userSubInspects = Funs.DB.PreRun_SubInspectTermItem.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).ToList(); + //if (userSubInspects.Count == 0) return; + //var subSystemIds = userSubInspects.ConvertAll(x => x.SubSystemId); + //var workPackIds = userSubInspects.ConvertAll(x => x.WorkPackId); + var list = from a in Funs.DB.PreRun_SysDevice join b in Funs.DB.PreRun_SubSysWorkPackage on a.PreRunId equals b.SubSystemId join c in Funs.DB.PreRun_WorkPackage on b.WorkPackId equals c.WorkPackId @@ -45,6 +52,40 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun if (list.Count() > 0) { + var subSystemIds = list.Select(x => x.PreRunId).ToList(); + var workPackIds = list.Select(x => x.WorkPackId).ToList(); + var selectlist = new List(); + var sysPipingData = from proper in Funs.DB.PreRun_PropertySysPiping + join selectproper in Funs.DB.PreRun_SubPropertySelect on proper.PropertyId equals selectproper.PropertyId + join inspectterm in Funs.DB.PreRun_SubInspectTerm on selectproper.PropertyId equals inspectterm.PropertyTechnologyId + where subSystemIds.Contains(selectproper.SubSystemId) + select new SelectPropertyTechnology() + { + Id = proper.PropertyId, + Code = $"管道:({proper.PipingCode})", + WorkPackId = inspectterm.WorkPackId, + SubSystemId = selectproper.SubSystemId + }; + if (sysPipingData.Count() > 0) + { + selectlist.AddRange(sysPipingData); + } + var technologylist = from technology in Funs.DB.PreRun_TechnologySysPiping + join selecttechnology in Funs.DB.PreRun_SubTechnologySelect on technology.TechnologyId equals selecttechnology.TechnologyId + join inspectterm in Funs.DB.PreRun_SubInspectTerm on selecttechnology.TechnologyId equals inspectterm.PropertyTechnologyId + where subSystemIds.Contains(selecttechnology.SubSystemId) + select new SelectPropertyTechnology() + { + Id = technology.TechnologyId, + Code = $"设备:({technology.TagNumber})", + WorkPackId = inspectterm.WorkPackId, + SubSystemId = selecttechnology.SubSystemId + }; + if (technologylist.Count() > 0) + { + selectlist.AddRange(technologylist); + } + var subList = list.GroupBy(x => new { x.PreRunId, x.PreRunCode, x.PreRunName }); foreach (var item in subList) { @@ -53,8 +94,8 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun rootUnitNode.Text = item.Key.PreRunName; rootUnitNode.ToolTip = item.Key.PreRunName; rootUnitNode.CommandName = ""; - rootUnitNode.EnableClickEvent = true; - rootUnitNode.EnableExpandEvent = true; + rootUnitNode.EnableClickEvent = false; + rootUnitNode.EnableExpandEvent = false; rootNode.Nodes.Add(rootUnitNode); rootUnitNode.Expanded = true; var worklist = list.Where(a => a.PreRunId == item.Key.PreRunId).GroupBy(x => new { x.WorkPackId, x.WorkPackName }).ToList(); @@ -67,13 +108,66 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun newNode.NodeID = itemWork.Key.WorkPackId + "|" + item.Key.PreRunId; newNode.ToolTip = itemWork.Key.WorkPackName; newNode.CommandName = ""; - newNode.EnableClickEvent = true; - rootUnitNode.Nodes.Add(newNode); + newNode.Expanded = true; + var workselects = selectlist.Where(x => x.SubSystemId == item.Key.PreRunId && x.WorkPackId == itemWork.Key.WorkPackId); + if (workselects.Count() > 0) + { + newNode.EnableClickEvent = false; + newNode.EnableExpandEvent = false; + rootUnitNode.Nodes.Add(newNode); + foreach (var itemSelect in workselects) + { + TreeNode newNodeSelect = new TreeNode(); + newNodeSelect.Text = itemSelect.Code; + newNodeSelect.NodeID = itemWork.Key.WorkPackId + "|" + item.Key.PreRunId + "|" + itemSelect.Id; + newNodeSelect.ToolTip = itemSelect.Code; + newNodeSelect.CommandName = ""; + newNodeSelect.EnableClickEvent = true; + newNodeSelect.EnableExpandEvent = true; + newNode.Nodes.Add(newNodeSelect); + newNodeSelect.Expanded = true; + } + } + else + { + newNode.EnableClickEvent = true; + newNode.EnableExpandEvent = true; + rootUnitNode.Nodes.Add(newNode); + } } } } } + } + /// + /// 绑定下拉框 + /// + public void PageInit() + { + var userList = Funs.DB.Sys_User; + if (userList.Count() > 0) + { + ddlfbs.DataTextField = "UserName"; + ddlfbs.DataValueField = "UserId"; + ddlfbs.DataSource = userList; + ddlfbs.DataBind(); + + ddlcbs.DataTextField = "UserName"; + ddlcbs.DataValueField = "UserId"; + ddlcbs.DataSource = userList; + ddlcbs.DataBind(); + + ddljl.DataTextField = "UserName"; + ddljl.DataValueField = "UserId"; + ddljl.DataSource = userList; + ddljl.DataBind(); + + ddlyz.DataTextField = "UserName"; + ddlyz.DataValueField = "UserId"; + ddlyz.DataSource = userList; + ddlyz.DataBind(); + } } /// @@ -91,14 +185,125 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun /// /// 绑定数据 /// - public void BindGrid() + public void BindGrid(bool typechange = true) { var result = new List(); - var workPackId = this.tvControlItem.SelectedNodeID.Split('|').First(); - var subSystemId = this.tvControlItem.SelectedNodeID.Split('|').Last(); + var sysPipingData = new List(); + var workPackId = this.tvControlItem.SelectedNodeID.Split('|')[0]; + var subSystemId = this.tvControlItem.SelectedNodeID.Split('|')[1]; + var propertytechnologyid = string.Empty; + if (this.tvControlItem.SelectedNodeID.Split('|').Length > 2) + { + propertytechnologyid = this.tvControlItem.SelectedNodeID.Split('|').Last(); + } + if (typechange) + { + var workPage = Funs.DB.PreRun_WorkPackage.FirstOrDefault(x => x.WorkPackId == workPackId); + if (workPage != null) + { + //加载类型 + if (workPage.WorkPackType == 0) + { + ddlWorkPackType.Items.Clear(); + ddlWorkPackType.Items.Insert(0, new ListItem("管道", "1")); + ddlWorkPackType.Items.Insert(1, new ListItem("设备", "2")); + ddlWorkPackType.SelectedValue = "1"; + } + if (workPage.WorkPackType == 1) + { + ddlWorkPackType.Items.Clear(); + ddlWorkPackType.Items.Insert(0, new ListItem("管道", "1")); + ddlWorkPackType.SelectedValue = "1"; + } + if (workPage.WorkPackType == 2) + { + ddlWorkPackType.Items.Clear(); + ddlWorkPackType.Items.Insert(0, new ListItem("设备", "2")); + ddlWorkPackType.SelectedValue = "2"; + } + //加载数据 + if (ddlWorkPackType.SelectedValue == "1") + { + var sysData = from proper in Funs.DB.PreRun_PropertySysPiping + join selectproper in Funs.DB.PreRun_SubPropertySelect on proper.PropertyId equals selectproper.PropertyId + where selectproper.SubSystemId == subSystemId + select new SelectPropertyTechnology() + { + Id = proper.PropertyId, + Code = $"管道:({proper.PipingCode})" + }; + if (sysData.Count() > 0) + { + sysPipingData = sysData.ToList(); + cbSysPiping.DataTextField = "Code"; + cbSysPiping.DataValueField = "Id"; + cbSysPiping.DataSource = sysPipingData; + cbSysPiping.DataBind(); + } + else + { + cbSysPiping.Items.Clear(); + cbSysPiping.Items.Insert(0, new CheckItem("==无数据==", "")); + } + } + else + { + var sysData = from technology in Funs.DB.PreRun_TechnologySysPiping + join selecttechnology in Funs.DB.PreRun_SubTechnologySelect on technology.TechnologyId equals selecttechnology.TechnologyId + where selecttechnology.SubSystemId == subSystemId + select new SelectPropertyTechnology() + { + Id = technology.TechnologyId, + Code = $"设备:({technology.TagNumber})" + }; + if (sysData.Count() > 0) + { + sysPipingData = sysData.ToList(); + cbSysPiping.DataTextField = "Code"; + cbSysPiping.DataValueField = "Id"; + cbSysPiping.DataSource = sysPipingData; + cbSysPiping.DataBind(); + } + else + { + cbSysPiping.Items.Clear(); + cbSysPiping.Items.Insert(0, new CheckItem("==无数据==", "")); + } + } + } + } + //获取子系统 var subSysModel = Funs.DB.PreRun_SysDevice.FirstOrDefault(x => x.PreRunId == subSystemId); - var list = Funs.DB.PreRun_SubInspectTermItem.Where(x => x.WorkPackId == workPackId && x.SubSystemId == subSystemId).OrderBy(x => x.Sort).ToList(); + //获取主表数据 + var workPackType = int.Parse(ddlWorkPackType.SelectedValue); + var subModel = Funs.DB.PreRun_SubInspectTerm.FirstOrDefault(x => x.WorkPackId == workPackId && x.SubSystemId == subSystemId && x.WorkPackType == workPackType && x.PropertyTechnologyId == propertytechnologyid); + if (subModel != null) + { + if (subModel.WorkPackType != null) + { + ddlWorkPackType.SelectedValue = subModel.WorkPackType.ToString(); + ddlWorkPackType.Enabled = false; + } + var ddlsysModel = sysPipingData.FirstOrDefault(x => x.Id == subModel.PropertyTechnologyId); + if (ddlsysModel != null) + { + ddbSysPiping.Value = ddlsysModel.Id; + ddbSysPiping.Text = ddlsysModel.Code; + } + ddlfbs.SelectedValue = subModel.Subcontractor; + ddlcbs.SelectedValue = subModel.Contractor; + ddljl.SelectedValue = subModel.Supervision; + ddlyz.SelectedValue = subModel.Owner; + } + else + { + ddlfbs.SelectedValue = string.Empty; + ddlcbs.SelectedValue = string.Empty; + ddljl.SelectedValue = string.Empty; + ddlyz.SelectedValue = string.Empty; + } + var list = Funs.DB.PreRun_SubInspectTermItem.Where(x => x.WorkPackId == workPackId && x.SubSystemId == subSystemId && x.WorkPackType == workPackType && x.PropertyTechnologyId == propertytechnologyid).OrderBy(x => x.Sort).ToList(); if (list.Count > 0) { foreach (var item in list) @@ -114,6 +319,8 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun model.SystemId = subSysModel.SystemId; model.SubSystemId = subSysModel.PreRunId; model.InspectedUser = item.InspectedUser; + model.InspectionResults = item.InspectionResults; + model.InspectionIllustrate = item.InspectionIllustrate; model.Sort = item.Sort; model.isChick = true; result.Add(model); @@ -147,7 +354,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun } Grid1.DataSource = result; Grid1.DataBind(); - if(result.Count(x => x.isChick)>0) + if (result.Count(x => x.isChick) > 0) { //默认选中行 var checkids = result.Where(x => x.isChick).Select(a => a.SubItemId); @@ -169,58 +376,6 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun ddlInspectedUser.DataValueField = "UserId"; ddlInspectedUser.DataSource = data; ddlInspectedUser.DataBind(); - - - #region 注释 - //var workPackId = this.tvControlItem.SelectedNodeID.Split('|').First(); - //var subSystemId = this.tvControlItem.SelectedNodeID.Split('|').Last(); - ////获取子系统 - //var subSysModel = Funs.DB.PreRun_SysDevice.FirstOrDefault(x => x.PreRunId == subSystemId); - //var list = Funs.DB.PreRun_SubInspectTermItem.Where(x => x.WorkPackId == workPackId && x.SubSystemId == subSystemId).OrderBy(x => x.Sort).ToList(); - //if (list.Count == 0) - //{ - // list = new List(); - // var defaultDatas = Funs.DB.PreRun_WorkInspectTemplate.Where(s => s.WorkPackId == workPackId).OrderBy(x=>x.Sort).ToList(); - // if (defaultDatas.Count > 0) - // { - // int index = 0; - // foreach (var item in defaultDatas) - // { - // var model = new PreRun_SubInspectTermItem(); - // model.SubItemId = Guid.NewGuid().ToString(); - // model.ProjectId = this.CurrUser.LoginProjectId; - // model.WorkPackId = item.WorkPackId; - // model.WorkInspectId = item.WorkInspectId; - // model.WorkInspectName = item.WorkInspectName; - // model.InstallationId = subSysModel.InstallationId; - // model.ProcessesId = subSysModel.ProcessesId; - // model.SystemId = subSysModel.SystemId; - // model.SubSystemId = subSysModel.PreRunId; - // model.Sort = index + 1; - // list.Add(model); - // index++; - // } - // } - //} - - //Grid1.DataSource = list; - //Grid1.DataBind(); - ////检查人绑定 - //var userList = from user in Funs.DB.Sys_User join projectrole in Funs.DB.Project_ProjectUser on user.UserId equals projectrole.UserId where projectrole.ProjectId == this.CurrUser.LoginProjectId select user; - - //var userids = new List() { Const.sysglyId, Const.hfnbdId, Const.sedinId }; - //var addUserList = Funs.DB.Sys_User.Where(x => userids.Contains(x.UserId)); - //var data = userList.ToList(); - //if (addUserList.Count() > 0) - //{ - // data.AddRange(addUserList); - //} - //DropDownList ddlInspectedUser = Grid1.FindColumn("InspectedUser").FindControl("ddlInspectedUser") as DropDownList; - //ddlInspectedUser.DataTextField = "UserName"; - //ddlInspectedUser.DataValueField = "UserId"; - //ddlInspectedUser.DataSource = data; - //ddlInspectedUser.DataBind(); - #endregion } /// @@ -233,7 +388,6 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun BindGrid(); } - /// /// 行按钮事件 /// @@ -270,75 +424,129 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun { try { + if (string.IsNullOrWhiteSpace(ddlfbs.SelectedValue)) + { + ShowNotify("请选择分包商!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlcbs.SelectedValue)) + { + ShowNotify("请选择承包商!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddljl.SelectedValue)) + { + ShowNotify("请选择监理!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrWhiteSpace(ddlyz.SelectedValue)) + { + ShowNotify("请选择业主!", MessageBoxIcon.Warning); + return; + } + if (ddbSysPiping.Values.Length == 0) + { + ShowNotify("请选择设备!", MessageBoxIcon.Warning); + return; + } if (Grid1.SelectedRowIndexArray.Length == 0) { ShowNotify("请选择一条数据!", MessageBoxIcon.Warning); return; } - var workPackId = this.tvControlItem.SelectedNodeID.Split('|').First(); - var subSystemId = this.tvControlItem.SelectedNodeID.Split('|').Last(); - var subTrem = Funs.DB.PreRun_SubInspectTerm.FirstOrDefault(x => x.SubSystemId == subSystemId && x.WorkPackId == workPackId); - JArray mergedData = Grid1.GetMergedData(); - foreach (JObject mergedRow in mergedData) + + var workPackId = this.tvControlItem.SelectedNodeID.Split('|')[0]; + var subSystemId = this.tvControlItem.SelectedNodeID.Split('|')[1]; + var workPackType = int.Parse(ddlWorkPackType.SelectedValue); + + List subTrems = new List(); + List subTremItems = new List(); + + foreach (var item in ddbSysPiping.Values) { - string status = mergedRow.Value("status"); - JObject values = mergedRow.Value("values"); - int i = mergedRow.Value("index"); - var subItemId = this.Grid1.Rows[i].DataKeys[0].ToString(); - var workInspectId = this.Grid1.Rows[i].DataKeys[1].ToString(); - if (!Grid1.SelectedRowIndexArray.Contains(i)) continue; - - //获取子系统信息 - var list = new List(); - var subSysModel = Funs.DB.PreRun_SysDevice.FirstOrDefault(x => x.PreRunId == subSystemId); - if (subSysModel != null) + var subTrem = Funs.DB.PreRun_SubInspectTerm.FirstOrDefault(x => x.SubSystemId == subSystemId && x.WorkPackId == workPackId && x.WorkPackType == workPackType && x.PropertyTechnologyId == item); + JArray mergedData = Grid1.GetMergedData(); + foreach (JObject mergedRow in mergedData) { - //获取子系统工作包检查表,如果不存在则添加 - if (subTrem == null) - { - subTrem = new PreRun_SubInspectTerm(); - subTrem.SubInspectId = Guid.NewGuid().ToString(); - subTrem.WorkPackId = workPackId; - subTrem.ProjectId = this.CurrUser.LoginProjectId; - subTrem.InstallationId = subSysModel.InstallationId; - subTrem.ProcessesId = subSysModel.ProcessesId; - subTrem.SystemId = subSysModel.SystemId; - subTrem.SubSystemId = subSysModel.PreRunId; - subTrem.AddUser = this.CurrUser.UserId; - subTrem.AddTime = DateTime.Now; - Funs.DB.PreRun_SubInspectTerm.InsertOnSubmit(subTrem); - } + string status = mergedRow.Value("status"); + JObject values = mergedRow.Value("values"); + int i = mergedRow.Value("index"); + var subItemId = this.Grid1.Rows[i].DataKeys[0].ToString(); + var workInspectId = this.Grid1.Rows[i].DataKeys[1].ToString(); + if (!Grid1.SelectedRowIndexArray.Contains(i)) continue; - var model = Funs.DB.PreRun_SubInspectTermItem.FirstOrDefault(x => x.SubItemId == subItemId); - if (model == null) + //获取子系统信息 + var list = new List(); + var subSysModel = Funs.DB.PreRun_SysDevice.FirstOrDefault(x => x.PreRunId == subSystemId); + if (subSysModel != null) { - model = new PreRun_SubInspectTermItem(); - model.SubItemId = subItemId; - model.SubInspectId = subTrem.SubInspectId; - model.WorkPackId = workPackId; - model.ProjectId = this.CurrUser.LoginProjectId; - model.WorkInspectId = workInspectId; - model.WorkInspectName = values.Value("WorkInspectName"); - model.InstallationId = subSysModel.InstallationId; - model.ProcessesId = subSysModel.ProcessesId; - model.SystemId = subSysModel.SystemId; - model.SubSystemId = subSysModel.PreRunId; - model.InspectedUser = !string.IsNullOrWhiteSpace(values.Value("InspectedUser")) ? values.Value("InspectedUser") : string.Empty; - model.AddUser = this.CurrUser.UserId; - model.AddTime = DateTime.Now; - model.Sort = i + 1; - Funs.DB.PreRun_SubInspectTermItem.InsertOnSubmit(model); - } - else - { - model.InspectedUser = !string.IsNullOrWhiteSpace(values.Value("InspectedUser")) ? values.Value("InspectedUser") : string.Empty; - model.WorkInspectName = values.Value("WorkInspectName"); - Funs.DB.SubmitChanges(); + //获取子系统工作包检查表,如果不存在则添加 + if (subTrem == null) + { + subTrem = new PreRun_SubInspectTerm(); + subTrem.SubInspectId = Guid.NewGuid().ToString(); + subTrem.WorkPackId = workPackId; + subTrem.ProjectId = this.CurrUser.LoginProjectId; + subTrem.InstallationId = subSysModel.InstallationId; + subTrem.ProcessesId = subSysModel.ProcessesId; + subTrem.SystemId = subSysModel.SystemId; + subTrem.SubSystemId = subSysModel.PreRunId; + subTrem.Subcontractor = ddlfbs.SelectedValue; + subTrem.Contractor = ddlcbs.SelectedValue; + subTrem.Supervision = ddljl.SelectedValue; + subTrem.Owner = ddlyz.SelectedValue; + subTrem.PropertyTechnologyId = item; + subTrem.WorkPackType = int.Parse(ddlWorkPackType.SelectedValue); + subTrem.AddUser = this.CurrUser.UserId; + subTrem.AddTime = DateTime.Now; + subTrems.Add(subTrem); + //Funs.DB.PreRun_SubInspectTerm.InsertOnSubmit(subTrem); + } + + var model = Funs.DB.PreRun_SubInspectTermItem.FirstOrDefault(x => x.SubItemId == subItemId && x.PropertyTechnologyId == item); + if (model == null) + { + model = new PreRun_SubInspectTermItem(); + model.TermItemId = Guid.NewGuid().ToString(); + model.SubItemId = subItemId; + model.SubInspectId = subTrem.SubInspectId; + model.WorkPackId = workPackId; + model.ProjectId = this.CurrUser.LoginProjectId; + model.WorkInspectId = workInspectId; + model.WorkInspectName = values.Value("WorkInspectName"); + model.InstallationId = subSysModel.InstallationId; + model.ProcessesId = subSysModel.ProcessesId; + model.SystemId = subSysModel.SystemId; + model.SubSystemId = subSysModel.PreRunId; + model.InspectedUser = !string.IsNullOrWhiteSpace(values.Value("InspectedUser")) ? values.Value("InspectedUser") : string.Empty; + model.Subcontractor = ddlfbs.SelectedValue; + model.Contractor = ddlcbs.SelectedValue; + model.Supervision = ddljl.SelectedValue; + model.Owner = ddlyz.SelectedValue; + model.PropertyTechnologyId = item; + model.WorkPackType = int.Parse(ddlWorkPackType.SelectedValue); + model.AddUser = this.CurrUser.UserId; + model.AddTime = DateTime.Now; + model.Sort = i + 1; + subTremItems.Add(model); + //Funs.DB.PreRun_SubInspectTermItem.InsertOnSubmit(model); + } + else + { + model.InspectedUser = !string.IsNullOrWhiteSpace(values.Value("InspectedUser")) ? values.Value("InspectedUser") : string.Empty; + model.WorkInspectName = values.Value("WorkInspectName"); + Funs.DB.SubmitChanges(); + } } + //Funs.DB.SubmitChanges(); } - Funs.DB.SubmitChanges(); } - BindGrid(); + + Funs.DB.PreRun_SubInspectTerm.InsertAllOnSubmit(subTrems); + Funs.DB.PreRun_SubInspectTermItem.InsertAllOnSubmit(subTremItems); + Funs.DB.SubmitChanges(); + this.InitTreeMenu(); + //BindGrid(); ShowNotify("保存成功!"); } catch (Exception ex) @@ -353,8 +561,8 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun protected void btnAdd_Click(object sender, EventArgs e) { var list = gvList(); - var workPackId = this.tvControlItem.SelectedNodeID.Split('|').First(); - var subSystemId = this.tvControlItem.SelectedNodeID.Split('|').Last(); + var workPackId = this.tvControlItem.SelectedNodeID.Split('|')[0]; + var subSystemId = this.tvControlItem.SelectedNodeID.Split('|')[1]; //获取子系统 var subSysModel = Funs.DB.PreRun_SysDevice.FirstOrDefault(x => x.PreRunId == subSystemId); if (subSysModel != null) @@ -453,5 +661,91 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun public bool isChick { get; set; } } + /// + /// 类型 + /// + protected void ddlWorkPackType_SelectedIndexChanged(object sender, EventArgs e) + { + var workPackId = this.tvControlItem.SelectedNodeID.Split('|')[0]; + var subSystemId = this.tvControlItem.SelectedNodeID.Split('|')[1]; + if (ddlWorkPackType.SelectedValue == "1") + { + var sysPipingData = from proper in Funs.DB.PreRun_PropertySysPiping + join selectproper in Funs.DB.PreRun_SubPropertySelect on proper.PropertyId equals selectproper.PropertyId + where selectproper.SubSystemId == subSystemId + select new + { + Id = proper.PropertyId, + Code = $"管道:({proper.PipingCode})" + }; + if (sysPipingData.Count() > 0) + { + cbSysPiping.DataTextField = "Code"; + cbSysPiping.DataValueField = "Id"; + cbSysPiping.DataSource = sysPipingData; + cbSysPiping.DataBind(); + } + else + { + cbSysPiping.Items.Clear(); + cbSysPiping.Items.Insert(0, new CheckItem("==无数据==", "")); + } + } + else + { + var sysPipingData = from technology in Funs.DB.PreRun_TechnologySysPiping + join selecttechnology in Funs.DB.PreRun_SubTechnologySelect on technology.TechnologyId equals selecttechnology.TechnologyId + where selecttechnology.SubSystemId == subSystemId + select new + { + Id = technology.TechnologyId, + Code = $"设备:({technology.TagNumber})" + }; + if (sysPipingData.Count() > 0) + { + cbSysPiping.DataTextField = "Code"; + cbSysPiping.DataValueField = "Id"; + cbSysPiping.DataSource = sysPipingData; + cbSysPiping.DataBind(); + } + else + { + cbSysPiping.Items.Clear(); + cbSysPiping.Items.Insert(0, new CheckItem("==无数据==", "")); + } + } + + } + + /// + /// 设备选择 + /// + protected void ddlSysPiping_SelectedIndexChanged(object sender, EventArgs e) + { + BindGrid(false); + } + + /// + /// 子系统选择的管道/设备 + /// + public class SelectPropertyTechnology + { + /// + /// 主键 + /// + public string Id { get; set; } + /// + /// 编码 + /// + public string Code { get; set; } + /// + /// 工作包主键 + /// + public string WorkPackId { get; set; } + /// + /// 子系统主键 + /// + public string SubSystemId { get; set; } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx.designer.cs index 3e1fd3a0..c3219fca 100644 --- a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubInspectTerm.aspx.designer.cs @@ -77,6 +77,69 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun /// protected global::FineUIPro.Toolbar Toolbar1; + /// + /// ddlWorkPackType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlWorkPackType; + + /// + /// ddbSysPiping 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownBox ddbSysPiping; + + /// + /// SimpleForm2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.SimpleForm SimpleForm2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// cbSysPiping 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBoxList cbSysPiping; + + /// + /// btnSelectAll 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSelectAll; + + /// + /// btnClearAll 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClearAll; + /// /// ToolbarFill 控件。 /// @@ -130,5 +193,59 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblInspectionResults; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// ddlfbs 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlfbs; + + /// + /// ddlcbs 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlcbs; + + /// + /// ddljl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddljl; + + /// + /// ddlyz 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlyz; } } diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx index 78d19a08..79c7704c 100644 --- a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx @@ -18,7 +18,7 @@ - + @@ -41,7 +41,7 @@ - + diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx.cs index 34e7fc5f..b2a82a63 100644 --- a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx.cs +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx.cs @@ -28,8 +28,6 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun /// private void InitTreeMenu() { - - this.tvControlItem.Nodes.Clear(); TreeNode rootNode = new TreeNode(); rootNode.Text = "检查表"; @@ -48,9 +46,39 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun join c in Funs.DB.PreRun_WorkPackage on b.WorkPackId equals c.WorkPackId where a.ProjectId == this.CurrUser.LoginProjectId && subSystemIds.Contains(a.PreRunId) && workPackIds.Contains(c.WorkPackId) select new { a.PreRunId, a.PreRunCode, a.PreRunName, a.ProjectId, c.WorkPackId, c.WorkPackName }; - if (list.Count() > 0) { + var selectlist = new List(); + var sysPipingData = from proper in Funs.DB.PreRun_PropertySysPiping + join selectproper in Funs.DB.PreRun_SubPropertySelect on proper.PropertyId equals selectproper.PropertyId + join inspectterm in Funs.DB.PreRun_SubInspectTerm on selectproper.PropertyId equals inspectterm.PropertyTechnologyId + where subSystemIds.Contains(selectproper.SubSystemId) + select new SelectPropertyTechnology() + { + Id = proper.PropertyId, + Code = $"管道:({proper.PipingCode})", + WorkPackId = inspectterm.WorkPackId, + SubSystemId = selectproper.SubSystemId + }; + if (sysPipingData.Count() > 0) + { + selectlist.AddRange(sysPipingData); + } + var technologylist = from technology in Funs.DB.PreRun_TechnologySysPiping + join selecttechnology in Funs.DB.PreRun_SubTechnologySelect on technology.TechnologyId equals selecttechnology.TechnologyId + join inspectterm in Funs.DB.PreRun_SubInspectTerm on selecttechnology.TechnologyId equals inspectterm.PropertyTechnologyId + where subSystemIds.Contains(selecttechnology.SubSystemId) + select new SelectPropertyTechnology() + { + Id = technology.TechnologyId, + Code = $"设备:({technology.TagNumber})", + WorkPackId = inspectterm.WorkPackId, + SubSystemId = selecttechnology.SubSystemId + }; + if (technologylist.Count() > 0) + { + selectlist.AddRange(technologylist); + } var subList = list.GroupBy(x => new { x.PreRunId, x.PreRunCode, x.PreRunName }); foreach (var item in subList) { @@ -59,8 +87,8 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun rootUnitNode.Text = item.Key.PreRunName; rootUnitNode.ToolTip = item.Key.PreRunName; rootUnitNode.CommandName = ""; - rootUnitNode.EnableClickEvent = true; - rootUnitNode.EnableExpandEvent = true; + rootUnitNode.EnableClickEvent = false; + rootUnitNode.EnableExpandEvent = false; rootNode.Nodes.Add(rootUnitNode); rootUnitNode.Expanded = true; var worklist = list.Where(a => a.PreRunId == item.Key.PreRunId).GroupBy(x => new { x.WorkPackId, x.WorkPackName }).ToList(); @@ -73,13 +101,31 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun newNode.NodeID = itemWork.Key.WorkPackId + "|" + item.Key.PreRunId; newNode.ToolTip = itemWork.Key.WorkPackName; newNode.CommandName = ""; - newNode.EnableClickEvent = true; + newNode.EnableClickEvent = false; + newNode.EnableExpandEvent = false; rootUnitNode.Nodes.Add(newNode); + newNode.Expanded = true; + if (selectlist.Count > 0) + { + var workselects = selectlist.Where(x => x.SubSystemId == item.Key.PreRunId && x.WorkPackId == itemWork.Key.WorkPackId); + foreach (var itemSelect in workselects) + { + TreeNode newNodeSelect = new TreeNode(); + newNodeSelect.Text = itemSelect.Code; + newNodeSelect.NodeID = itemWork.Key.WorkPackId + "|" + item.Key.PreRunId + "|" + itemSelect.Id; + newNodeSelect.ToolTip = itemSelect.Code; + newNodeSelect.CommandName = ""; + newNodeSelect.EnableClickEvent = true; + newNodeSelect.EnableExpandEvent = true; + newNode.Nodes.Add(newNodeSelect); + newNodeSelect.Expanded = true; + } + } + } } } } - } /// @@ -100,10 +146,11 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun public void BindGrid() { var workPackId = this.tvControlItem.SelectedNodeID.Split('|').First(); - var subSystemId = this.tvControlItem.SelectedNodeID.Split('|').Last(); + var subSystemId = this.tvControlItem.SelectedNodeID.Split('|')[1]; + var propertytechnologyid = this.tvControlItem.SelectedNodeID.Split('|').Last(); //获取子系统 var subSysModel = Funs.DB.PreRun_SysDevice.FirstOrDefault(x => x.PreRunId == subSystemId); - var list = Funs.DB.PreRun_SubInspectTermItem.Where(x => x.WorkPackId == workPackId && x.SubSystemId == subSystemId && x.InspectedUser == this.CurrUser.UserId).ToList(); + var list = Funs.DB.PreRun_SubInspectTermItem.Where(x => x.WorkPackId == workPackId && x.SubSystemId == subSystemId && x.PropertyTechnologyId == propertytechnologyid && x.InspectedUser == this.CurrUser.UserId).OrderBy(x => x.Sort).ToList(); Grid1.DataSource = list; Grid1.DataBind(); } @@ -120,6 +167,8 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun #endregion + #region 保存 + /// /// 保存 /// @@ -134,13 +183,15 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun JObject values = mergedRow.Value("values"); int i = mergedRow.Value("index"); var subItemId = this.Grid1.Rows[i].DataKeys[0].ToString(); - //获取子系统信息 - var model = Funs.DB.PreRun_SubInspectTermItem.FirstOrDefault(x => x.SubItemId == subItemId); + var model = Funs.DB.PreRun_SubInspectTermItem.FirstOrDefault(x => x.TermItemId == subItemId); if (model != null) { model.InspectionIllustrate = !string.IsNullOrWhiteSpace(values.Value("InspectionIllustrate")) ? values.Value("InspectionIllustrate") : string.Empty; - model.InspectionResults = !string.IsNullOrWhiteSpace(values.Value("InspectionResults")) ? int.Parse(values.Value("InspectionResults")) : -1; + if (!string.IsNullOrWhiteSpace(values.Value("InspectionResults"))) + { + model.InspectionResults = int.Parse(values.Value("InspectionResults")); + } Funs.DB.SubmitChanges(); } } @@ -152,5 +203,31 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun ShowNotify(ex.Message, MessageBoxIcon.Error); } } + + #endregion + + /// + /// 子系统选择的管道/设备 + /// + public class SelectPropertyTechnology + { + /// + /// 主键 + /// + public string Id { get; set; } + /// + /// 编码 + /// + public string Code { get; set; } + /// + /// 工作包主键 + /// + public string WorkPackId { get; set; } + /// + /// 子系统主键 + /// + public string SubSystemId { get; set; } + } + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx.designer.cs index 438b75b9..7c66f4c6 100644 --- a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SubWorkInspect.aspx.designer.cs @@ -102,7 +102,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtInspectionIllustrate; + protected global::FineUIPro.TextArea txtInspectionIllustrate; /// /// ddlInspectionResults 控件。 diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApprove.aspx b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApprove.aspx new file mode 100644 index 00000000..3ece5bf3 --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApprove.aspx @@ -0,0 +1,139 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TailTermApprove.aspx.cs" Inherits="FineUIPro.Web.TestRun.BeforeTestRun.TailTermApprove" %> + + + + + + 质量巡检 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApprove.aspx.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApprove.aspx.cs new file mode 100644 index 00000000..9d666bea --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApprove.aspx.cs @@ -0,0 +1,221 @@ +using BLL; +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.TestRun.BeforeTestRun +{ + public partial class TailTermApprove : PageBase + { + /// + /// 主键 + /// + public string TailTermId + { + get { return (string)ViewState["TailTermId"]; } + set { ViewState["TailTermId"] = value; } + } + + /// + /// 问题图片是否可编辑 + /// + public int QuestionEditImg + { + get { return (int)ViewState["QuestionEditImg"]; } + set { ViewState["QuestionEditImg"] = value; } + } + + /// + /// 整改图片是否可编辑 + /// + public int RectifyEditImg + { + get { return (int)ViewState["RectifyEditImg"]; } + set { ViewState["RectifyEditImg"] = value; } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.TailTermId = Request["TailTermId"]; + this.QuestionEditImg = -1; + this.RectifyEditImg = -1; + //数据绑定 + PageInit(); + } + } + + /// + /// 绑定数据 + /// + public void PageInit() + { + //获取用户信息 + var users = from user in Funs.DB.Sys_User + join projectrole in Funs.DB.Project_ProjectUser on user.UserId equals projectrole.UserId + where projectrole.ProjectId == this.CurrUser.LoginProjectId + select user; + //检查人和审核人 + if (users.Count() > 0) + { + //检查人 + ddlApproveUser.DataTextField = "UserName"; + ddlApproveUser.DataValueField = "UserId"; + ddlApproveUser.DataSource = users; + ddlApproveUser.DataBind(); + } + txtApproveTime.Text = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"); + ddlApproveUser.SelectedValue = this.CurrUser.UserId; + + var data = from tail in Funs.DB.PreRun_InspectTailTerm + join unit in Funs.DB.Base_Unit on tail.ConstructionUnit equals unit.UnitId + join inspuser in Funs.DB.Sys_User on tail.InspectUser equals inspuser.UserId + join approuser in Funs.DB.Sys_User on tail.ApproveUser equals approuser.UserId + join termitem in Funs.DB.PreRun_SubInspectTermItem on tail.TermItemId equals termitem.TermItemId + where tail.TailTermId == this.TailTermId + select new + { + tail.ProjectName, + tail.TailTermCode, + unit.UnitName, + TermItemName = termitem.WorkInspectName, + tail.QuestionTechnologyId, + tail.QuestionDesc, + tail.RectifyOpinion, + tail.RectifyTime, + tail.ProblemType, + InspectUserName = inspuser.UserName, + ApproveUserName = approuser.UserName, + + }; + if (data.Count() > 0) + { + var model = data.FirstOrDefault(); + //项目名称 + lblProjectName.Text = model.ProjectName; + //巡检编号 + lblTailTermCode.Text = model.TailTermCode; + //施工单位 + lblConstructionUnit.Text = model.UnitName; + //问题类别 + lblProblemType.Text = model.ProblemType == 1 ? "管道" : "设备"; + //管道/设备 + if (model.ProblemType == 1) + { + var piping = Funs.DB.PreRun_PropertySysPiping.FirstOrDefault(x => x.PropertyId == model.QuestionTechnologyId); + if (piping != null) + { + lblQuestionTechnologyId.Text = $"管道:{piping.PipingCode}"; + } + } + else + { + var piping = Funs.DB.PreRun_TechnologySysPiping.FirstOrDefault(x => x.TechnologyId == model.QuestionTechnologyId); + if (piping != null) + { + lblQuestionTechnologyId.Text = $"设备:{piping.TagNumber}"; + } + } + //检查项 + lblTermItemId.Text = model.TermItemName; + //问题描述 + lblQuestionDesc.Text = model.QuestionDesc; + //整改意见 + lblRectifyOpinion.Text = model.RectifyOpinion; + //整改时间 + lblRectifyTime.Text = model.RectifyTime != null ? model.RectifyTime.Value.ToString("yyyy-MM-dd hh:mm:ss") : string.Empty; + //检查人 + lblInspectUser.Text = model.InspectUserName; + } + } + + /// + /// 问题图片 + /// + protected void imgBtnQuestionFile_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/CheckControl&menuId={2}", QuestionEditImg, this.TailTermId + "q", Const.InspectTailTerm))); + } + + /// + /// 整改图片 + /// + protected void imgBtnRectifyFile_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/CheckControl&menuId={2}", RectifyEditImg, this.TailTermId + "h", Const.InspectTailTerm))); + } + + /// + /// 退回 + /// + protected void btnReturn_Click(object sender, EventArgs e) + { + var tailTerm = Funs.DB.PreRun_InspectTailTerm.FirstOrDefault(x => x.TailTermId == this.TailTermId); + if (tailTerm != null) + { + tailTerm.ApproveState = 1; + var model = new PreRun_InspectTermApproveRecords(); + model.InspectTermId = Guid.NewGuid().ToString(); + model.ProjectId = this.CurrUser.LoginProjectId; + model.TermItemId = tailTerm.TermItemId; + model.TailTermId = this.TailTermId; + model.ApproveOpinion = txtApproveOpinion.Text; + model.ApproveTime = DateTime.Parse(txtApproveTime.Text); + model.ApproveUser = ddlApproveUser.SelectedValue; + model.ApproveState = 0; + model.AddUser = this.CurrUser.UserId; + model.AddTime = DateTime.Now; + Funs.DB.PreRun_InspectTermApproveRecords.InsertOnSubmit(model); + Funs.DB.SubmitChanges(); + ShowNotify("退回成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } + + /// + /// 通过 + /// + protected void btnPass_Click(object sender, EventArgs e) + { + var tailTerm = Funs.DB.PreRun_InspectTailTerm.FirstOrDefault(x => x.TailTermId == this.TailTermId); + if (tailTerm != null) + { + //获取审核项 + var termItemModel = Funs.DB.PreRun_SubInspectTermItem.FirstOrDefault(x => x.TermItemId == tailTerm.TermItemId); + if (termItemModel != null) + { + termItemModel.InspectionResults = 1; + } + tailTerm.ApproveState = 3; + var model = new PreRun_InspectTermApproveRecords(); + model.InspectTermId = Guid.NewGuid().ToString(); + model.ProjectId = this.CurrUser.LoginProjectId; + model.TermItemId = tailTerm.TermItemId; + model.TailTermId = this.TailTermId; + model.ApproveOpinion = txtApproveOpinion.Text; + model.ApproveTime = DateTime.Parse(txtApproveTime.Text); + model.ApproveUser = ddlApproveUser.SelectedValue; + model.ApproveState = 1; + model.AddUser = this.CurrUser.UserId; + model.AddTime = DateTime.Now; + Funs.DB.PreRun_InspectTermApproveRecords.InsertOnSubmit(model); + Funs.DB.SubmitChanges(); + ShowNotify("审核成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } + + /// + /// 关闭 + /// + protected void WindowAtt_Close(object sender, WindowCloseEventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApprove.aspx.designer.cs new file mode 100644 index 00000000..39880e3c --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApprove.aspx.designer.cs @@ -0,0 +1,269 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.TestRun.BeforeTestRun +{ + + + public partial class TailTermApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// lblProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblProjectName; + + /// + /// lblTailTermCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblTailTermCode; + + /// + /// lblConstructionUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblConstructionUnit; + + /// + /// lblProblemType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblProblemType; + + /// + /// lblQuestionTechnologyId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblQuestionTechnologyId; + + /// + /// lblTermItemId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblTermItemId; + + /// + /// lblQuestionDesc 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblQuestionDesc; + + /// + /// lblRectifyOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblRectifyOpinion; + + /// + /// lblInspectUser 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblInspectUser; + + /// + /// lblRectifyTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblRectifyTime; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// imgBtnQuestionFile 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button imgBtnQuestionFile; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// lblAttach 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblAttach; + + /// + /// imgBtnRectifyFile 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button imgBtnRectifyFile; + + /// + /// ddlApproveUser 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlApproveUser; + + /// + /// txtApproveTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtApproveTime; + + /// + /// txtApproveOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtApproveOpinion; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnReturn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnReturn; + + /// + /// btnPass 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPass; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApproveList.aspx b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApproveList.aspx new file mode 100644 index 00000000..3b1fe59c --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApproveList.aspx @@ -0,0 +1,145 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TailTermApproveList.aspx.cs" Inherits="FineUIPro.Web.TestRun.BeforeTestRun.TailTermApproveList" %> + + + + + + + + + 质量巡检审核 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApproveList.aspx.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApproveList.aspx.cs new file mode 100644 index 00000000..52a18145 --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApproveList.aspx.cs @@ -0,0 +1,138 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.TestRun.BeforeTestRun +{ + public partial class TailTermApproveList : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + //绑定数据 + BindGrid(); + } + } + + #region 绑定数据 + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select * from (select a.TailTermId,a.ProjectId,d.ProjectCode,d.ProjectName,a.TailTermCode,a.ConstructionUnit,b.UnitName,a.ProblemType,'管道' as ProblemTypeName,a.QuestionTechnologyId,a.TermItemId,c.WorkInspectName,a.QuestionDesc,a.RectifyTime,a.RectifyOpinion,a.InspectUser,e.UserName as InspectUserName,a.ApproveUser,f.UserName as ApproveUserName,a.ApproveState,(case a.ApproveState when 0 then '待提交' when 1 then '退回' when 2 then '待审核' when 3 then '审核通过' else '待提交' end) as ApproveStateName,a.AddTime from PreRun_InspectTailTerm as a inner join Base_Unit as b on a.ConstructionUnit=b.UnitId inner join PreRun_SubInspectTermItem as c on c.TermItemId=a.TermItemId inner join Base_Project as d on d.ProjectId=a.ProjectId inner join Sys_User as e on e.UserId=a.InspectUser inner join Sys_User as f on f.UserId=a.ApproveUser where a.ProblemType=1 and a.ApproveState>1 and a.ProjectId=@projectid and a.ApproveUser=@ApproveUser union all select a.TailTermId,a.ProjectId,d.ProjectCode,d.ProjectName,a.TailTermCode,a.ConstructionUnit,b.UnitName,a.ProblemType,'设备' as ProblemTypeName,a.QuestionTechnologyId,a.TermItemId,c.WorkInspectName,a.QuestionDesc,a.RectifyTime,a.RectifyOpinion,a.InspectUser,e.UserName as InspectUserName,a.ApproveUser,f.UserName as ApproveUserName,a.ApproveState,(case a.ApproveState when 0 then '待提交' when 1 then '退回' when 2 then '待审核' when 3 then '审核通过' else '待提交' end) as ApproveStateName,a.AddTime from PreRun_InspectTailTerm as a inner join Base_Unit as b on a.ConstructionUnit=b.UnitId inner join PreRun_SubInspectTermItem as c on c.TermItemId=a.TermItemId inner join Base_Project as d on d.ProjectId=a.ProjectId inner join Sys_User as e on e.UserId=a.InspectUser inner join Sys_User as f on f.UserId=a.ApproveUser where a.ProblemType=2 and a.ApproveState>1 and a.ProjectId=@projectid and a.ApproveUser=@ApproveUser) as t where 1=1 "; + List listStr = new List(); + listStr.Add(new SqlParameter("@projectid", this.CurrUser.LoginProjectId)); + listStr.Add(new SqlParameter("@ApproveUser", this.CurrUser.UserId)); + //问题类别 + if (!string.IsNullOrWhiteSpace(ddlProblemType.SelectedValue)) + { + strSql += " and t.ProblemType=@ProblemType"; + listStr.Add(new SqlParameter("@ProblemType", ddlProblemType.SelectedValue)); + } + //审核状态 + if (!string.IsNullOrWhiteSpace(ddlApproveState.SelectedValue)) + { + strSql += " and t.ApproveState=@ApproveState"; + listStr.Add(new SqlParameter("@ApproveState", ddlApproveState.SelectedValue)); + } + strSql += " order by AddTime asc"; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 分页 + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 双击事件 + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + btnMenuApprove_Click(null, null); + } + + /// + /// 分页下拉框 + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + #endregion + + /// + /// 关闭弹框 + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + + /// + /// 审核 + /// + protected void btnReview_Click(object sender, EventArgs e) + { + btnMenuApprove_Click(null, null); + } + + /// + /// 审核 + /// + protected void btnMenuApprove_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + var model = Funs.DB.PreRun_InspectTailTerm.FirstOrDefault(x => x.TailTermId == Grid1.SelectedRowID); + if (model != null) + { + if (model.ApproveState != 2) + { + Alert.ShowInTop("只可审核“待审核”的记录!", MessageBoxIcon.Warning); + return; + } + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TailTermApprove.aspx?TailTermId={0}", Grid1.SelectedRowID, "审核 - "))); + } + + /// + /// 搜索 + /// + protected void btnQuery_Click(object sender, EventArgs e) + { + BindGrid(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApproveList.aspx.designer.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApproveList.aspx.designer.cs new file mode 100644 index 00000000..ad651684 --- /dev/null +++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/TailTermApproveList.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.TestRun.BeforeTestRun +{ + + + public partial class TailTermApproveList + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ddlProblemType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlProblemType; + + /// + /// ddlApproveState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlApproveState; + + /// + /// btnQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnQuery; + + /// + /// btnReview 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnReview; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuApprove; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs index 93fa7ba8..8968a929 100644 --- a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs @@ -137,6 +137,8 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary public string ProjectId { get; set; } public DateTime? Mdate { get; set; } + + public string state { get; set; } } #region 生成按钮 @@ -171,7 +173,8 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary { ProblemTypes = x.ProblemTypes, ProjectId = x.ProjectId, - CheckTime=x.CheckTime + CheckTime=x.CheckTime, + States=x.States }).Where(x => x.ProblemTypes == "1").ToList(); //周例会 var list3 = Funs.DB.Meeting_WeekMeeting.Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.WeekMeetingDate }).ToList(); @@ -196,7 +199,7 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary var list7 = Funs.DB.Manager_MonthReportC.Select(x=> new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.Months }).ToList(); //质量巡检 - var list8 = Funs.DB.Check_CheckControl.Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.CheckDate }).ToList(); + var list8 = Funs.DB.Check_CheckControl.Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.CheckDate,state=x.State }).ToList(); //设备材料报验 var list10 = Funs.DB.Comprehensive_InspectionEquipment.Select @@ -335,6 +338,21 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary allList.Add(model); + //安全巡检已闭合 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "28"; + AqxjCount = list2.Where(x => x.ProjectId == pid && x.States=="3").ToList().Count(); + model.SummeryResult = AqxjCount.ToString(); + //时间 + if (AqxjCount > 0) + { + model.CompileDate = list2.Where(x => x.ProjectId == pid).OrderByDescending(x => x.CheckTime).FirstOrDefault().CheckTime; + } + + allList.Add(model); //周例会 model = new Inspection_Summary(); @@ -437,6 +455,23 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary } allList.Add(model); + //质量巡检已闭合项 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDate = DateTime.Now; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "29"; + //已闭合 + ZlxjCount = list8.Where(x => x.ProjectId == pid&&x.state=="7").ToList().Count; + model.SummeryResult = ZlxjCount.ToString(); + if (ZlxjCount > 0) + { + //巡检日期 + model.CompileDate = list8.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + allList.Add(model); + //WBS数据 model = new Inspection_Summary(); model.ProjectId = pid; diff --git a/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs b/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs index b9172d49..66316df1 100644 --- a/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs @@ -862,7 +862,7 @@ namespace FineUIPro.Web.common div_grlc.InnerHtml = getDataList.Count().ToString(); foreach (var item in getDataList) { - returnDbHtml += "
" + item.MenuName + "" + item.Content + "" + + returnDbHtml += "
" + item.MenuName + "" + item.Content + "" + item.DataTime.ToString().Replace('/', '-').Split(' ')[0] + "
"; } } diff --git a/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs b/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs index 707b91df..b5539e84 100644 --- a/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs +++ b/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs @@ -201,7 +201,7 @@ namespace Model /// /// 整改期限 /// - public DateTime? Rectification_Date { get; set; } + public string Rectification_Date { get; set; } } } diff --git a/SGGL/Model/APIItem/HSSE/FlowOperateItem.cs b/SGGL/Model/APIItem/HSSE/FlowOperateItem.cs index a13643a9..87a80195 100644 --- a/SGGL/Model/APIItem/HSSE/FlowOperateItem.cs +++ b/SGGL/Model/APIItem/HSSE/FlowOperateItem.cs @@ -170,5 +170,11 @@ namespace Model get; set; } + + public string AttachUrl + { + get; + set; + } } } diff --git a/SGGL/Model/APIItem/HSSE/HSSELogItem.cs b/SGGL/Model/APIItem/HSSE/HSSELogItem.cs new file mode 100644 index 00000000..9083866d --- /dev/null +++ b/SGGL/Model/APIItem/HSSE/HSSELogItem.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class HSSELogItem + { + public string HSSELogId { get; set; } + + public string ProjectId { get; set; } + public string CompileDate { get; set; } + public string CompileMan { get; set; } + public string Weather { get; set; } + public bool? IsVisible { get; set; } + public string CompileManName { get; set; } + public string WeatherName { get; set; } + + public int? Num11 { get; set; } + + + + public string Contents12 { get; set; } + public string Contents13 { get; set; } + public string Contents21 { get; set; } + + public int? Num21 { get; set; } + public string Contents22 { get; set; } + + public int? Num22 { get; set; } + public string Contents23 { get; set; } + public int? Num23 { get; set; } + public string Contents24 { get; set; } + public int? Num24 { get; set; } + public string Contents210 { get; set; } + public int? Num210 { get; set; } + public int? Num211 { get; set; } + public string Contents31 { get; set; } + public int? Num31 { get; set; } + public string Contents32 { get; set; } + public int? Num32 { get; set; } + public string Contents41 { get; set; } + public string Contents42 { get; set; } + + #region 添加修改时字段 + public string Content1 { get; set; } + public string Content2 { get; set; } + public string Content3 { get; set; } + public string Content4 { get; set; } + public string Content5 { get; set; } + public string Content6 { get; set; } + public string Content7 { get; set; } + public string Content8 { get; set; } + public string Content9 { get; set; } + public string Content10 { get; set; } + public string Content11 { get; set; } + public string Content12 { get; set; } + public string Content13 { get; set; } + public string Content14 { get; set; } + public string Content15 { get; set; } + public string Content16 { get; set; } + public string Content17 { get; set; } + public string Content18 { get; set; } + public string Content19 { get; set; } + public string Content20 { get; set; } + #endregion + } +} diff --git a/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs b/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs index 7b395285..f36217bc 100644 --- a/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs +++ b/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs @@ -277,7 +277,7 @@ namespace Model set; } /// - /// 作业负责人名字(射线、夜间) + /// 作业负责人名字(射线、夜间、高处) /// public string WorkLeaderName { @@ -285,7 +285,7 @@ namespace Model set; } /// - /// 作业负责人电话(射线、夜间) + /// 作业负责人电话(射线、夜间、高处) /// public string WorkLeaderTel { @@ -389,5 +389,133 @@ namespace Model get; set; } + + //新增 + public string WorkAreaName + { + get; + set; + } + /// + /// 区域 + /// + public string WorkAreaId + { + get; + set; + } + + /// + /// 原因 + /// + public string Reason + { + get; + set; + } + + /// + /// 动火作业级别 + /// + public string FireLevel + { + get; + set; + } + + /// + /// 空间内介质描述 + /// + public string LimitedDescribe + { + get; + set; + } + + /// + /// 是否存在其它介质 + /// + public bool? IsBoolOther + { + get; + set; + } + + /// + /// 作业是否耗氧或产生其它有毒有害气体 + /// + public bool? IsBoolHarmfulGas + { + get; + set; + } + + /// + /// 氧含量测试结果 + /// + public string TestResult + { + get; + set; + } + + /// + /// 测试时间 + /// + public string TestDate { get; set; } + + /// + /// 测试人 + /// + public string TestPerson { get; set; } + + /// + /// 通风措施 + /// + public string VenStep { get; set; } + + /// + /// 作业点高度 + /// + public string WorkHeight { get; set; } + + /// + /// 高处作业级别 + /// + public string HeightLevel { get; set; } + + /// + /// 吊装高度 + /// + public string LiftingHeight { get; set; } + + /// + /// 起重工姓名 + /// + public string QzgName { get; set; } + + /// + /// 起重工电话 + /// + public string QzgPhone { get; set; } + + /// + /// 司机姓名 + /// + public string SjName { get; set; } + + /// + /// 司机电话 + /// + public string SjPhone { get; set; } + + /// + /// 申请人签名 + /// + public string SignatureUrl + { + get; + set; + } } } diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index d3b6dde9..3cf30b00 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1271,6 +1271,9 @@ namespace Model partial void InsertLicense_BreakGround(License_BreakGround instance); partial void UpdateLicense_BreakGround(License_BreakGround instance); partial void DeleteLicense_BreakGround(License_BreakGround instance); + partial void InsertLicense_Electricity(License_Electricity instance); + partial void UpdateLicense_Electricity(License_Electricity instance); + partial void DeleteLicense_Electricity(License_Electricity instance); partial void InsertLicense_EquipmentSafetyList(License_EquipmentSafetyList instance); partial void UpdateLicense_EquipmentSafetyList(License_EquipmentSafetyList instance); partial void DeleteLicense_EquipmentSafetyList(License_EquipmentSafetyList instance); @@ -1640,6 +1643,12 @@ namespace Model partial void InsertPersonTrain_TrainPlan(PersonTrain_TrainPlan instance); partial void UpdatePersonTrain_TrainPlan(PersonTrain_TrainPlan instance); partial void DeletePersonTrain_TrainPlan(PersonTrain_TrainPlan instance); + partial void InsertPreRun_InspectTailTerm(PreRun_InspectTailTerm instance); + partial void UpdatePreRun_InspectTailTerm(PreRun_InspectTailTerm instance); + partial void DeletePreRun_InspectTailTerm(PreRun_InspectTailTerm instance); + partial void InsertPreRun_InspectTermApproveRecords(PreRun_InspectTermApproveRecords instance); + partial void UpdatePreRun_InspectTermApproveRecords(PreRun_InspectTermApproveRecords instance); + partial void DeletePreRun_InspectTermApproveRecords(PreRun_InspectTermApproveRecords instance); partial void InsertPreRun_PropertySysPiping(PreRun_PropertySysPiping instance); partial void UpdatePreRun_PropertySysPiping(PreRun_PropertySysPiping instance); partial void DeletePreRun_PropertySysPiping(PreRun_PropertySysPiping instance); @@ -5757,6 +5766,14 @@ namespace Model } } + public System.Data.Linq.Table License_Electricity + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table License_EquipmentSafetyList { get @@ -6741,6 +6758,22 @@ namespace Model } } + public System.Data.Linq.Table PreRun_InspectTailTerm + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table PreRun_InspectTermApproveRecords + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table PreRun_PropertySysPiping { get @@ -25307,6 +25340,8 @@ namespace Model private EntitySet _License_BreakGround; + private EntitySet _License_Electricity; + private EntitySet _License_EquipmentSafetyList; private EntitySet _License_FireWork; @@ -25795,6 +25830,7 @@ namespace Model this._JDGL_UndergroundPipeCompletion = new EntitySet(new Action(this.attach_JDGL_UndergroundPipeCompletion), new Action(this.detach_JDGL_UndergroundPipeCompletion)); this._Law_LawRegulationIdentify = new EntitySet(new Action(this.attach_Law_LawRegulationIdentify), new Action(this.detach_Law_LawRegulationIdentify)); this._License_BreakGround = new EntitySet(new Action(this.attach_License_BreakGround), new Action(this.detach_License_BreakGround)); + this._License_Electricity = new EntitySet(new Action(this.attach_License_Electricity), new Action(this.detach_License_Electricity)); this._License_EquipmentSafetyList = new EntitySet(new Action(this.attach_License_EquipmentSafetyList), new Action(this.detach_License_EquipmentSafetyList)); this._License_FireWork = new EntitySet(new Action(this.attach_License_FireWork), new Action(this.detach_License_FireWork)); this._License_HeightWork = new EntitySet(new Action(this.attach_License_HeightWork), new Action(this.detach_License_HeightWork)); @@ -28872,6 +28908,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Base_Project", Storage="_License_Electricity", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet License_Electricity + { + get + { + return this._License_Electricity; + } + set + { + this._License_Electricity.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_EquipmentSafetyList_Base_Project", Storage="_License_EquipmentSafetyList", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet License_EquipmentSafetyList { @@ -32444,6 +32493,18 @@ namespace Model entity.Base_Project = null; } + private void attach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_License_EquipmentSafetyList(License_EquipmentSafetyList entity) { this.SendPropertyChanging(); @@ -37441,6 +37502,8 @@ namespace Model private EntitySet _License_BreakGround; + private EntitySet _License_Electricity; + private EntitySet _License_EquipmentSafetyList; private EntitySet _License_FireWork; @@ -37739,6 +37802,7 @@ namespace Model this._JDGL_SteelStructureCompletion = new EntitySet(new Action(this.attach_JDGL_SteelStructureCompletion), new Action(this.detach_JDGL_SteelStructureCompletion)); this._JDGL_UndergroundPipeCompletion = new EntitySet(new Action(this.attach_JDGL_UndergroundPipeCompletion), new Action(this.detach_JDGL_UndergroundPipeCompletion)); this._License_BreakGround = new EntitySet(new Action(this.attach_License_BreakGround), new Action(this.detach_License_BreakGround)); + this._License_Electricity = new EntitySet(new Action(this.attach_License_Electricity), new Action(this.detach_License_Electricity)); this._License_EquipmentSafetyList = new EntitySet(new Action(this.attach_License_EquipmentSafetyList), new Action(this.detach_License_EquipmentSafetyList)); this._License_FireWork = new EntitySet(new Action(this.attach_License_FireWork), new Action(this.detach_License_FireWork)); this._License_HeightWork = new EntitySet(new Action(this.attach_License_HeightWork), new Action(this.detach_License_HeightWork)); @@ -39737,6 +39801,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Base_Unit", Storage="_License_Electricity", ThisKey="UnitId", OtherKey="ApplyUnitId", DeleteRule="NO ACTION")] + public EntitySet License_Electricity + { + get + { + return this._License_Electricity; + } + set + { + this._License_Electricity.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_EquipmentSafetyList_Base_Unit", Storage="_License_EquipmentSafetyList", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet License_EquipmentSafetyList { @@ -41922,6 +41999,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_License_EquipmentSafetyList(License_EquipmentSafetyList entity) { this.SendPropertyChanging(); @@ -206160,6 +206249,14 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _Reason; + + private string _FireWatchManName; + + private string _SignatureUrl; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -206214,6 +206311,14 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnReasonChanging(string value); + partial void OnReasonChanged(); + partial void OnFireWatchManNameChanging(string value); + partial void OnFireWatchManNameChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); #endregion public License_BreakGround() @@ -206646,6 +206751,86 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Reason", DbType="NVarChar(500)")] + public string Reason + { + get + { + return this._Reason; + } + set + { + if ((this._Reason != value)) + { + this.OnReasonChanging(value); + this.SendPropertyChanging(); + this._Reason = value; + this.SendPropertyChanged("Reason"); + this.OnReasonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireWatchManName", DbType="NVarChar(500)")] + public string FireWatchManName + { + get + { + return this._FireWatchManName; + } + set + { + if ((this._FireWatchManName != value)) + { + this.OnFireWatchManNameChanging(value); + this.SendPropertyChanging(); + this._FireWatchManName = value; + this.SendPropertyChanged("FireWatchManName"); + this.OnFireWatchManNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignatureUrl", DbType="NVarChar(500)")] + public string SignatureUrl + { + get + { + return this._SignatureUrl; + } + set + { + if ((this._SignatureUrl != value)) + { + this.OnSignatureUrlChanging(value); + this.SendPropertyChanging(); + this._SignatureUrl = value; + this.SendPropertyChanged("SignatureUrl"); + this.OnSignatureUrlChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_BreakGround_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -206837,6 +207022,873 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.License_Electricity")] + public partial class License_Electricity : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ElectricityId; + + private string _ProjectId; + + private string _LicenseCode; + + private string _ApplyUnitId; + + private string _ApplyManId; + + private System.Nullable _ApplyDate; + + private string _WorkPalce; + + private string _WorkDepth; + + private System.Nullable _ValidityStartTime; + + private System.Nullable _ValidityEndTime; + + private string _WorkMeasures; + + private string _CancelManId; + + private string _CancelReasons; + + private System.Nullable _CancelTime; + + private string _CloseManId; + + private string _CloseReasons; + + private System.Nullable _CloseTime; + + private string _States; + + private string _NextManId; + + private string _OldLicenseId; + + private string _WorkAreaId; + + private string _Reason; + + private string _FireWatchManName; + + private string _WorkLeaderName; + + private string _WorkLeaderTel; + + private string _SignatureUrl; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + private EntityRef _Sys_User; + + private EntityRef _CancelMan; + + private EntityRef _CloseMan; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnElectricityIdChanging(string value); + partial void OnElectricityIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnLicenseCodeChanging(string value); + partial void OnLicenseCodeChanged(); + partial void OnApplyUnitIdChanging(string value); + partial void OnApplyUnitIdChanged(); + partial void OnApplyManIdChanging(string value); + partial void OnApplyManIdChanged(); + partial void OnApplyDateChanging(System.Nullable value); + partial void OnApplyDateChanged(); + partial void OnWorkPalceChanging(string value); + partial void OnWorkPalceChanged(); + partial void OnWorkDepthChanging(string value); + partial void OnWorkDepthChanged(); + partial void OnValidityStartTimeChanging(System.Nullable value); + partial void OnValidityStartTimeChanged(); + partial void OnValidityEndTimeChanging(System.Nullable value); + partial void OnValidityEndTimeChanged(); + partial void OnWorkMeasuresChanging(string value); + partial void OnWorkMeasuresChanged(); + partial void OnCancelManIdChanging(string value); + partial void OnCancelManIdChanged(); + partial void OnCancelReasonsChanging(string value); + partial void OnCancelReasonsChanged(); + partial void OnCancelTimeChanging(System.Nullable value); + partial void OnCancelTimeChanged(); + partial void OnCloseManIdChanging(string value); + partial void OnCloseManIdChanged(); + partial void OnCloseReasonsChanging(string value); + partial void OnCloseReasonsChanged(); + partial void OnCloseTimeChanging(System.Nullable value); + partial void OnCloseTimeChanged(); + partial void OnStatesChanging(string value); + partial void OnStatesChanged(); + partial void OnNextManIdChanging(string value); + partial void OnNextManIdChanged(); + partial void OnOldLicenseIdChanging(string value); + partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnReasonChanging(string value); + partial void OnReasonChanged(); + partial void OnFireWatchManNameChanging(string value); + partial void OnFireWatchManNameChanged(); + partial void OnWorkLeaderNameChanging(string value); + partial void OnWorkLeaderNameChanged(); + partial void OnWorkLeaderTelChanging(string value); + partial void OnWorkLeaderTelChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + #endregion + + public License_Electricity() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Sys_User = default(EntityRef); + this._CancelMan = default(EntityRef); + this._CloseMan = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ElectricityId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ElectricityId + { + get + { + return this._ElectricityId; + } + set + { + if ((this._ElectricityId != value)) + { + this.OnElectricityIdChanging(value); + this.SendPropertyChanging(); + this._ElectricityId = value; + this.SendPropertyChanged("ElectricityId"); + this.OnElectricityIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LicenseCode", DbType="NVarChar(50)")] + public string LicenseCode + { + get + { + return this._LicenseCode; + } + set + { + if ((this._LicenseCode != value)) + { + this.OnLicenseCodeChanging(value); + this.SendPropertyChanging(); + this._LicenseCode = value; + this.SendPropertyChanged("LicenseCode"); + this.OnLicenseCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApplyUnitId", DbType="NVarChar(50)")] + public string ApplyUnitId + { + get + { + return this._ApplyUnitId; + } + set + { + if ((this._ApplyUnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnApplyUnitIdChanging(value); + this.SendPropertyChanging(); + this._ApplyUnitId = value; + this.SendPropertyChanged("ApplyUnitId"); + this.OnApplyUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApplyManId", DbType="NVarChar(50)")] + public string ApplyManId + { + get + { + return this._ApplyManId; + } + set + { + if ((this._ApplyManId != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnApplyManIdChanging(value); + this.SendPropertyChanging(); + this._ApplyManId = value; + this.SendPropertyChanged("ApplyManId"); + this.OnApplyManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApplyDate", DbType="DateTime")] + public System.Nullable ApplyDate + { + get + { + return this._ApplyDate; + } + set + { + if ((this._ApplyDate != value)) + { + this.OnApplyDateChanging(value); + this.SendPropertyChanging(); + this._ApplyDate = value; + this.SendPropertyChanged("ApplyDate"); + this.OnApplyDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPalce", DbType="NVarChar(300)")] + public string WorkPalce + { + get + { + return this._WorkPalce; + } + set + { + if ((this._WorkPalce != value)) + { + this.OnWorkPalceChanging(value); + this.SendPropertyChanging(); + this._WorkPalce = value; + this.SendPropertyChanged("WorkPalce"); + this.OnWorkPalceChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkDepth", DbType="NVarChar(50)")] + public string WorkDepth + { + get + { + return this._WorkDepth; + } + set + { + if ((this._WorkDepth != value)) + { + this.OnWorkDepthChanging(value); + this.SendPropertyChanging(); + this._WorkDepth = value; + this.SendPropertyChanged("WorkDepth"); + this.OnWorkDepthChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ValidityStartTime", DbType="DateTime")] + public System.Nullable ValidityStartTime + { + get + { + return this._ValidityStartTime; + } + set + { + if ((this._ValidityStartTime != value)) + { + this.OnValidityStartTimeChanging(value); + this.SendPropertyChanging(); + this._ValidityStartTime = value; + this.SendPropertyChanged("ValidityStartTime"); + this.OnValidityStartTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ValidityEndTime", DbType="DateTime")] + public System.Nullable ValidityEndTime + { + get + { + return this._ValidityEndTime; + } + set + { + if ((this._ValidityEndTime != value)) + { + this.OnValidityEndTimeChanging(value); + this.SendPropertyChanging(); + this._ValidityEndTime = value; + this.SendPropertyChanged("ValidityEndTime"); + this.OnValidityEndTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkMeasures", DbType="NVarChar(500)")] + public string WorkMeasures + { + get + { + return this._WorkMeasures; + } + set + { + if ((this._WorkMeasures != value)) + { + this.OnWorkMeasuresChanging(value); + this.SendPropertyChanging(); + this._WorkMeasures = value; + this.SendPropertyChanged("WorkMeasures"); + this.OnWorkMeasuresChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CancelManId", DbType="NVarChar(50)")] + public string CancelManId + { + get + { + return this._CancelManId; + } + set + { + if ((this._CancelManId != value)) + { + if (this._CancelMan.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCancelManIdChanging(value); + this.SendPropertyChanging(); + this._CancelManId = value; + this.SendPropertyChanged("CancelManId"); + this.OnCancelManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CancelReasons", DbType="NVarChar(200)")] + public string CancelReasons + { + get + { + return this._CancelReasons; + } + set + { + if ((this._CancelReasons != value)) + { + this.OnCancelReasonsChanging(value); + this.SendPropertyChanging(); + this._CancelReasons = value; + this.SendPropertyChanged("CancelReasons"); + this.OnCancelReasonsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CancelTime", DbType="DateTime")] + public System.Nullable CancelTime + { + get + { + return this._CancelTime; + } + set + { + if ((this._CancelTime != value)) + { + this.OnCancelTimeChanging(value); + this.SendPropertyChanging(); + this._CancelTime = value; + this.SendPropertyChanged("CancelTime"); + this.OnCancelTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CloseManId", DbType="NVarChar(50)")] + public string CloseManId + { + get + { + return this._CloseManId; + } + set + { + if ((this._CloseManId != value)) + { + if (this._CloseMan.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCloseManIdChanging(value); + this.SendPropertyChanging(); + this._CloseManId = value; + this.SendPropertyChanged("CloseManId"); + this.OnCloseManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CloseReasons", DbType="NVarChar(200)")] + public string CloseReasons + { + get + { + return this._CloseReasons; + } + set + { + if ((this._CloseReasons != value)) + { + this.OnCloseReasonsChanging(value); + this.SendPropertyChanging(); + this._CloseReasons = value; + this.SendPropertyChanged("CloseReasons"); + this.OnCloseReasonsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CloseTime", DbType="DateTime")] + public System.Nullable CloseTime + { + get + { + return this._CloseTime; + } + set + { + if ((this._CloseTime != value)) + { + this.OnCloseTimeChanging(value); + this.SendPropertyChanging(); + this._CloseTime = value; + this.SendPropertyChanged("CloseTime"); + this.OnCloseTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_States", DbType="VarChar(2)")] + public string States + { + get + { + return this._States; + } + set + { + if ((this._States != value)) + { + this.OnStatesChanging(value); + this.SendPropertyChanging(); + this._States = value; + this.SendPropertyChanged("States"); + this.OnStatesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NextManId", DbType="NVarChar(500)")] + public string NextManId + { + get + { + return this._NextManId; + } + set + { + if ((this._NextManId != value)) + { + this.OnNextManIdChanging(value); + this.SendPropertyChanging(); + this._NextManId = value; + this.SendPropertyChanged("NextManId"); + this.OnNextManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OldLicenseId", DbType="NVarChar(50)")] + public string OldLicenseId + { + get + { + return this._OldLicenseId; + } + set + { + if ((this._OldLicenseId != value)) + { + this.OnOldLicenseIdChanging(value); + this.SendPropertyChanging(); + this._OldLicenseId = value; + this.SendPropertyChanged("OldLicenseId"); + this.OnOldLicenseIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Reason", DbType="NVarChar(500)")] + public string Reason + { + get + { + return this._Reason; + } + set + { + if ((this._Reason != value)) + { + this.OnReasonChanging(value); + this.SendPropertyChanging(); + this._Reason = value; + this.SendPropertyChanged("Reason"); + this.OnReasonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireWatchManName", DbType="NVarChar(500)")] + public string FireWatchManName + { + get + { + return this._FireWatchManName; + } + set + { + if ((this._FireWatchManName != value)) + { + this.OnFireWatchManNameChanging(value); + this.SendPropertyChanging(); + this._FireWatchManName = value; + this.SendPropertyChanged("FireWatchManName"); + this.OnFireWatchManNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderName", DbType="NVarChar(200)")] + public string WorkLeaderName + { + get + { + return this._WorkLeaderName; + } + set + { + if ((this._WorkLeaderName != value)) + { + this.OnWorkLeaderNameChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderName = value; + this.SendPropertyChanged("WorkLeaderName"); + this.OnWorkLeaderNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderTel", DbType="NVarChar(200)")] + public string WorkLeaderTel + { + get + { + return this._WorkLeaderTel; + } + set + { + if ((this._WorkLeaderTel != value)) + { + this.OnWorkLeaderTelChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderTel = value; + this.SendPropertyChanged("WorkLeaderTel"); + this.OnWorkLeaderTelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignatureUrl", DbType="NVarChar(500)")] + public string SignatureUrl + { + get + { + return this._SignatureUrl; + } + set + { + if ((this._SignatureUrl != value)) + { + this.OnSignatureUrlChanging(value); + this.SendPropertyChanging(); + this._SignatureUrl = value; + this.SendPropertyChanged("SignatureUrl"); + this.OnSignatureUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.License_Electricity.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.License_Electricity.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Base_Unit", Storage="_Base_Unit", ThisKey="ApplyUnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.License_Electricity.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.License_Electricity.Add(this); + this._ApplyUnitId = value.UnitId; + } + else + { + this._ApplyUnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User", Storage="_Sys_User", ThisKey="ApplyManId", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.License_Electricity.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.License_Electricity.Add(this); + this._ApplyManId = value.UserId; + } + else + { + this._ApplyManId = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User2", Storage="_CancelMan", ThisKey="CancelManId", OtherKey="UserId", IsForeignKey=true)] + public Sys_User CancelMan + { + get + { + return this._CancelMan.Entity; + } + set + { + Sys_User previousValue = this._CancelMan.Entity; + if (((previousValue != value) + || (this._CancelMan.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._CancelMan.Entity = null; + previousValue.License_Electricity_Sys_User2.Remove(this); + } + this._CancelMan.Entity = value; + if ((value != null)) + { + value.License_Electricity_Sys_User2.Add(this); + this._CancelManId = value.UserId; + } + else + { + this._CancelManId = default(string); + } + this.SendPropertyChanged("CancelMan"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User3", Storage="_CloseMan", ThisKey="CloseManId", OtherKey="UserId", IsForeignKey=true)] + public Sys_User CloseMan + { + get + { + return this._CloseMan.Entity; + } + set + { + Sys_User previousValue = this._CloseMan.Entity; + if (((previousValue != value) + || (this._CloseMan.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._CloseMan.Entity = null; + previousValue.License_Electricity_Sys_User3.Remove(this); + } + this._CloseMan.Entity = value; + if ((value != null)) + { + value.License_Electricity_Sys_User3.Add(this); + this._CloseManId = value.UserId; + } + else + { + this._CloseManId = default(string); + } + this.SendPropertyChanged("CloseMan"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.License_EquipmentSafetyList")] public partial class License_EquipmentSafetyList : INotifyPropertyChanging, INotifyPropertyChanged { @@ -207351,6 +208403,14 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _Reason; + + private string _FireLevel; + + private string _SignatureUrl; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -207409,6 +208469,14 @@ namespace Model partial void OnFireWatchManNameChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnReasonChanging(string value); + partial void OnReasonChanged(); + partial void OnFireLevelChanging(string value); + partial void OnFireLevelChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); #endregion public License_FireWork() @@ -207866,6 +208934,86 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Reason", DbType="NVarChar(500)")] + public string Reason + { + get + { + return this._Reason; + } + set + { + if ((this._Reason != value)) + { + this.OnReasonChanging(value); + this.SendPropertyChanging(); + this._Reason = value; + this.SendPropertyChanged("Reason"); + this.OnReasonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireLevel", DbType="NVarChar(20)")] + public string FireLevel + { + get + { + return this._FireLevel; + } + set + { + if ((this._FireLevel != value)) + { + this.OnFireLevelChanging(value); + this.SendPropertyChanging(); + this._FireLevel = value; + this.SendPropertyChanged("FireLevel"); + this.OnFireLevelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignatureUrl", DbType="NVarChar(500)")] + public string SignatureUrl + { + get + { + return this._SignatureUrl; + } + set + { + if ((this._SignatureUrl != value)) + { + this.OnSignatureUrlChanging(value); + this.SendPropertyChanging(); + this._SignatureUrl = value; + this.SendPropertyChanged("SignatureUrl"); + this.OnSignatureUrlChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_FireWork_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -208127,6 +209275,8 @@ namespace Model private System.Nullable _OrderNum; + private string _SignatureUrl; + private EntityRef _Sys_User; private EntitySet _License_FlowOperateItem; @@ -208165,6 +209315,8 @@ namespace Model partial void OnGroupNumChanged(); partial void OnOrderNumChanging(System.Nullable value); partial void OnOrderNumChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); #endregion public License_FlowOperate() @@ -208478,6 +209630,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignatureUrl", DbType="NVarChar(500)")] + public string SignatureUrl + { + get + { + return this._SignatureUrl; + } + set + { + if ((this._SignatureUrl != value)) + { + this.OnSignatureUrlChanging(value); + this.SendPropertyChanging(); + this._SignatureUrl = value; + this.SendPropertyChanged("SignatureUrl"); + this.OnSignatureUrlChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_FlowOperate_Sys_User", Storage="_Sys_User", ThisKey="OperaterId", OtherKey="UserId", IsForeignKey=true)] public Sys_User Sys_User { @@ -208870,6 +210042,20 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _WorkHeight; + + private string _HeightLevel; + + private string _FireWatchManName; + + private string _WorkLeaderName; + + private string _WorkLeaderTel; + + private string _SignatureUrl; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -208926,6 +210112,20 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnWorkHeightChanging(string value); + partial void OnWorkHeightChanged(); + partial void OnHeightLevelChanging(string value); + partial void OnHeightLevelChanged(); + partial void OnFireWatchManNameChanging(string value); + partial void OnFireWatchManNameChanged(); + partial void OnWorkLeaderNameChanging(string value); + partial void OnWorkLeaderNameChanged(); + partial void OnWorkLeaderTelChanging(string value); + partial void OnWorkLeaderTelChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); #endregion public License_HeightWork() @@ -209378,6 +210578,146 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkHeight", DbType="NVarChar(20)")] + public string WorkHeight + { + get + { + return this._WorkHeight; + } + set + { + if ((this._WorkHeight != value)) + { + this.OnWorkHeightChanging(value); + this.SendPropertyChanging(); + this._WorkHeight = value; + this.SendPropertyChanged("WorkHeight"); + this.OnWorkHeightChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HeightLevel", DbType="NVarChar(20)")] + public string HeightLevel + { + get + { + return this._HeightLevel; + } + set + { + if ((this._HeightLevel != value)) + { + this.OnHeightLevelChanging(value); + this.SendPropertyChanging(); + this._HeightLevel = value; + this.SendPropertyChanged("HeightLevel"); + this.OnHeightLevelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireWatchManName", DbType="NVarChar(500)")] + public string FireWatchManName + { + get + { + return this._FireWatchManName; + } + set + { + if ((this._FireWatchManName != value)) + { + this.OnFireWatchManNameChanging(value); + this.SendPropertyChanging(); + this._FireWatchManName = value; + this.SendPropertyChanged("FireWatchManName"); + this.OnFireWatchManNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderName", DbType="NVarChar(200)")] + public string WorkLeaderName + { + get + { + return this._WorkLeaderName; + } + set + { + if ((this._WorkLeaderName != value)) + { + this.OnWorkLeaderNameChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderName = value; + this.SendPropertyChanged("WorkLeaderName"); + this.OnWorkLeaderNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderTel", DbType="NVarChar(200)")] + public string WorkLeaderTel + { + get + { + return this._WorkLeaderTel; + } + set + { + if ((this._WorkLeaderTel != value)) + { + this.OnWorkLeaderTelChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderTel = value; + this.SendPropertyChanged("WorkLeaderTel"); + this.OnWorkLeaderTelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignatureUrl", DbType="NVarChar(500)")] + public string SignatureUrl + { + get + { + return this._SignatureUrl; + } + set + { + if ((this._SignatureUrl != value)) + { + this.OnSignatureUrlChanging(value); + this.SendPropertyChanging(); + this._SignatureUrl = value; + this.SendPropertyChanged("SignatureUrl"); + this.OnSignatureUrlChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_HeightWork_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -210988,6 +212328,26 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _LiftingHeight; + + private string _FireWatchManName; + + private string _WorkLeaderName; + + private string _WorkLeaderTel; + + private string _QzgName; + + private string _QzgPhone; + + private string _SjName; + + private string _SjPhone; + + private string _SignatureUrl; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -211044,6 +212404,26 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnLiftingHeightChanging(string value); + partial void OnLiftingHeightChanged(); + partial void OnFireWatchManNameChanging(string value); + partial void OnFireWatchManNameChanged(); + partial void OnWorkLeaderNameChanging(string value); + partial void OnWorkLeaderNameChanged(); + partial void OnWorkLeaderTelChanging(string value); + partial void OnWorkLeaderTelChanged(); + partial void OnQzgNameChanging(string value); + partial void OnQzgNameChanged(); + partial void OnQzgPhoneChanging(string value); + partial void OnQzgPhoneChanged(); + partial void OnSjNameChanging(string value); + partial void OnSjNameChanged(); + partial void OnSjPhoneChanging(string value); + partial void OnSjPhoneChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); #endregion public License_LiftingWork() @@ -211496,6 +212876,206 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LiftingHeight", DbType="NVarChar(20)")] + public string LiftingHeight + { + get + { + return this._LiftingHeight; + } + set + { + if ((this._LiftingHeight != value)) + { + this.OnLiftingHeightChanging(value); + this.SendPropertyChanging(); + this._LiftingHeight = value; + this.SendPropertyChanged("LiftingHeight"); + this.OnLiftingHeightChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireWatchManName", DbType="NVarChar(500)")] + public string FireWatchManName + { + get + { + return this._FireWatchManName; + } + set + { + if ((this._FireWatchManName != value)) + { + this.OnFireWatchManNameChanging(value); + this.SendPropertyChanging(); + this._FireWatchManName = value; + this.SendPropertyChanged("FireWatchManName"); + this.OnFireWatchManNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderName", DbType="NVarChar(200)")] + public string WorkLeaderName + { + get + { + return this._WorkLeaderName; + } + set + { + if ((this._WorkLeaderName != value)) + { + this.OnWorkLeaderNameChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderName = value; + this.SendPropertyChanged("WorkLeaderName"); + this.OnWorkLeaderNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderTel", DbType="NVarChar(200)")] + public string WorkLeaderTel + { + get + { + return this._WorkLeaderTel; + } + set + { + if ((this._WorkLeaderTel != value)) + { + this.OnWorkLeaderTelChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderTel = value; + this.SendPropertyChanged("WorkLeaderTel"); + this.OnWorkLeaderTelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QzgName", DbType="NVarChar(200)")] + public string QzgName + { + get + { + return this._QzgName; + } + set + { + if ((this._QzgName != value)) + { + this.OnQzgNameChanging(value); + this.SendPropertyChanging(); + this._QzgName = value; + this.SendPropertyChanged("QzgName"); + this.OnQzgNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QzgPhone", DbType="NVarChar(200)")] + public string QzgPhone + { + get + { + return this._QzgPhone; + } + set + { + if ((this._QzgPhone != value)) + { + this.OnQzgPhoneChanging(value); + this.SendPropertyChanging(); + this._QzgPhone = value; + this.SendPropertyChanged("QzgPhone"); + this.OnQzgPhoneChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SjName", DbType="NVarChar(50)")] + public string SjName + { + get + { + return this._SjName; + } + set + { + if ((this._SjName != value)) + { + this.OnSjNameChanging(value); + this.SendPropertyChanging(); + this._SjName = value; + this.SendPropertyChanged("SjName"); + this.OnSjNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SjPhone", DbType="NVarChar(100)")] + public string SjPhone + { + get + { + return this._SjPhone; + } + set + { + if ((this._SjPhone != value)) + { + this.OnSjPhoneChanging(value); + this.SendPropertyChanging(); + this._SjPhone = value; + this.SendPropertyChanged("SjPhone"); + this.OnSjPhoneChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignatureUrl", DbType="NVarChar(500)")] + public string SignatureUrl + { + get + { + return this._SignatureUrl; + } + set + { + if ((this._SignatureUrl != value)) + { + this.OnSignatureUrlChanging(value); + this.SendPropertyChanging(); + this._SignatureUrl = value; + this.SendPropertyChanged("SignatureUrl"); + this.OnSignatureUrlChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_LiftingWork_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -211735,6 +213315,24 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _LimitedDescribe; + + private System.Nullable _IsBoolOther; + + private System.Nullable _IsBoolHarmfulGas; + + private string _TestResult; + + private System.Nullable _TestDate; + + private string _TestPerson; + + private string _VenStep; + + private string _SignatureUrl; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -211793,6 +213391,24 @@ namespace Model partial void OnFireWatchManNameChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnLimitedDescribeChanging(string value); + partial void OnLimitedDescribeChanged(); + partial void OnIsBoolOtherChanging(System.Nullable value); + partial void OnIsBoolOtherChanged(); + partial void OnIsBoolHarmfulGasChanging(System.Nullable value); + partial void OnIsBoolHarmfulGasChanged(); + partial void OnTestResultChanging(string value); + partial void OnTestResultChanged(); + partial void OnTestDateChanging(System.Nullable value); + partial void OnTestDateChanged(); + partial void OnTestPersonChanging(string value); + partial void OnTestPersonChanged(); + partial void OnVenStepChanging(string value); + partial void OnVenStepChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); #endregion public License_LimitedSpace() @@ -212250,6 +213866,186 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LimitedDescribe", DbType="NVarChar(500)")] + public string LimitedDescribe + { + get + { + return this._LimitedDescribe; + } + set + { + if ((this._LimitedDescribe != value)) + { + this.OnLimitedDescribeChanging(value); + this.SendPropertyChanging(); + this._LimitedDescribe = value; + this.SendPropertyChanged("LimitedDescribe"); + this.OnLimitedDescribeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsBoolOther", DbType="Bit")] + public System.Nullable IsBoolOther + { + get + { + return this._IsBoolOther; + } + set + { + if ((this._IsBoolOther != value)) + { + this.OnIsBoolOtherChanging(value); + this.SendPropertyChanging(); + this._IsBoolOther = value; + this.SendPropertyChanged("IsBoolOther"); + this.OnIsBoolOtherChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsBoolHarmfulGas", DbType="Bit")] + public System.Nullable IsBoolHarmfulGas + { + get + { + return this._IsBoolHarmfulGas; + } + set + { + if ((this._IsBoolHarmfulGas != value)) + { + this.OnIsBoolHarmfulGasChanging(value); + this.SendPropertyChanging(); + this._IsBoolHarmfulGas = value; + this.SendPropertyChanged("IsBoolHarmfulGas"); + this.OnIsBoolHarmfulGasChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestResult", DbType="NVarChar(500)")] + public string TestResult + { + get + { + return this._TestResult; + } + set + { + if ((this._TestResult != value)) + { + this.OnTestResultChanging(value); + this.SendPropertyChanging(); + this._TestResult = value; + this.SendPropertyChanged("TestResult"); + this.OnTestResultChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestDate", DbType="DateTime")] + public System.Nullable TestDate + { + get + { + return this._TestDate; + } + set + { + if ((this._TestDate != value)) + { + this.OnTestDateChanging(value); + this.SendPropertyChanging(); + this._TestDate = value; + this.SendPropertyChanged("TestDate"); + this.OnTestDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPerson", DbType="NVarChar(100)")] + public string TestPerson + { + get + { + return this._TestPerson; + } + set + { + if ((this._TestPerson != value)) + { + this.OnTestPersonChanging(value); + this.SendPropertyChanging(); + this._TestPerson = value; + this.SendPropertyChanged("TestPerson"); + this.OnTestPersonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VenStep", DbType="NVarChar(20)")] + public string VenStep + { + get + { + return this._VenStep; + } + set + { + if ((this._VenStep != value)) + { + this.OnVenStepChanging(value); + this.SendPropertyChanging(); + this._VenStep = value; + this.SendPropertyChanged("VenStep"); + this.OnVenStepChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignatureUrl", DbType="NVarChar(500)")] + public string SignatureUrl + { + get + { + return this._SignatureUrl; + } + set + { + if ((this._SignatureUrl != value)) + { + this.OnSignatureUrlChanging(value); + this.SendPropertyChanging(); + this._SignatureUrl = value; + this.SendPropertyChanged("SignatureUrl"); + this.OnSignatureUrlChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_LimitedSpace_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -212527,6 +214323,8 @@ namespace Model private string _OldLicenseId; + private string _SignatureUrl; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -212591,6 +214389,8 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); #endregion public License_NightWork() @@ -213093,6 +214893,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignatureUrl", DbType="NVarChar(500)")] + public string SignatureUrl + { + get + { + return this._SignatureUrl; + } + set + { + if ((this._SignatureUrl != value)) + { + this.OnSignatureUrlChanging(value); + this.SendPropertyChanging(); + this._SignatureUrl = value; + this.SendPropertyChanged("SignatureUrl"); + this.OnSignatureUrlChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_NightWork_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -213400,6 +215220,14 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _Reason; + + private string _FireWatchManName; + + private string _SignatureUrl; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -213456,6 +215284,14 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnReasonChanging(string value); + partial void OnReasonChanged(); + partial void OnFireWatchManNameChanging(string value); + partial void OnFireWatchManNameChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); #endregion public License_OpenCircuit() @@ -213908,6 +215744,86 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Reason", DbType="NVarChar(500)")] + public string Reason + { + get + { + return this._Reason; + } + set + { + if ((this._Reason != value)) + { + this.OnReasonChanging(value); + this.SendPropertyChanging(); + this._Reason = value; + this.SendPropertyChanged("Reason"); + this.OnReasonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireWatchManName", DbType="NVarChar(500)")] + public string FireWatchManName + { + get + { + return this._FireWatchManName; + } + set + { + if ((this._FireWatchManName != value)) + { + this.OnFireWatchManNameChanging(value); + this.SendPropertyChanging(); + this._FireWatchManName = value; + this.SendPropertyChanged("FireWatchManName"); + this.OnFireWatchManNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignatureUrl", DbType="NVarChar(500)")] + public string SignatureUrl + { + get + { + return this._SignatureUrl; + } + set + { + if ((this._SignatureUrl != value)) + { + this.OnSignatureUrlChanging(value); + this.SendPropertyChanging(); + this._SignatureUrl = value; + this.SendPropertyChanged("SignatureUrl"); + this.OnSignatureUrlChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_OpenCircuit_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -214153,6 +216069,14 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _SignatureUrl; + + private string _WorkLeaderName; + + private string _FireWatchManName; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -214219,6 +216143,14 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + partial void OnWorkLeaderNameChanging(string value); + partial void OnWorkLeaderNameChanged(); + partial void OnFireWatchManNameChanging(string value); + partial void OnFireWatchManNameChanged(); #endregion public License_RadialWork() @@ -214741,6 +216673,86 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SignatureUrl", DbType="NVarChar(500)")] + public string SignatureUrl + { + get + { + return this._SignatureUrl; + } + set + { + if ((this._SignatureUrl != value)) + { + this.OnSignatureUrlChanging(value); + this.SendPropertyChanging(); + this._SignatureUrl = value; + this.SendPropertyChanged("SignatureUrl"); + this.OnSignatureUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderName", DbType="NVarChar(50)")] + public string WorkLeaderName + { + get + { + return this._WorkLeaderName; + } + set + { + if ((this._WorkLeaderName != value)) + { + this.OnWorkLeaderNameChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderName = value; + this.SendPropertyChanged("WorkLeaderName"); + this.OnWorkLeaderNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireWatchManName", DbType="NVarChar(50)")] + public string FireWatchManName + { + get + { + return this._FireWatchManName; + } + set + { + if ((this._FireWatchManName != value)) + { + this.OnFireWatchManNameChanging(value); + this.SendPropertyChanging(); + this._FireWatchManName = value; + this.SendPropertyChanged("FireWatchManName"); + this.OnFireWatchManNameChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_RadialWork_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -259024,6 +261036,730 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PreRun_InspectTailTerm")] + public partial class PreRun_InspectTailTerm : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _TailTermId; + + private string _ProjectId; + + private string _ProjectName; + + private string _TailTermCode; + + private string _ConstructionUnit; + + private System.Nullable _ProblemType; + + private string _QuestionTechnologyId; + + private string _TermItemId; + + private string _WorkPackId; + + private string _QuestionDesc; + + private string _RectifyOpinion; + + private System.Nullable _RectifyTime; + + private string _InspectUser; + + private string _ApproveUser; + + private System.Nullable _ApproveState; + + private string _AddUser; + + private System.Nullable _AddTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnTailTermIdChanging(string value); + partial void OnTailTermIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnProjectNameChanging(string value); + partial void OnProjectNameChanged(); + partial void OnTailTermCodeChanging(string value); + partial void OnTailTermCodeChanged(); + partial void OnConstructionUnitChanging(string value); + partial void OnConstructionUnitChanged(); + partial void OnProblemTypeChanging(System.Nullable value); + partial void OnProblemTypeChanged(); + partial void OnQuestionTechnologyIdChanging(string value); + partial void OnQuestionTechnologyIdChanged(); + partial void OnTermItemIdChanging(string value); + partial void OnTermItemIdChanged(); + partial void OnWorkPackIdChanging(string value); + partial void OnWorkPackIdChanged(); + partial void OnQuestionDescChanging(string value); + partial void OnQuestionDescChanged(); + partial void OnRectifyOpinionChanging(string value); + partial void OnRectifyOpinionChanged(); + partial void OnRectifyTimeChanging(System.Nullable value); + partial void OnRectifyTimeChanged(); + partial void OnInspectUserChanging(string value); + partial void OnInspectUserChanged(); + partial void OnApproveUserChanging(string value); + partial void OnApproveUserChanged(); + partial void OnApproveStateChanging(System.Nullable value); + partial void OnApproveStateChanged(); + partial void OnAddUserChanging(string value); + partial void OnAddUserChanged(); + partial void OnAddTimeChanging(System.Nullable value); + partial void OnAddTimeChanged(); + #endregion + + public PreRun_InspectTailTerm() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TailTermId", DbType="VarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string TailTermId + { + get + { + return this._TailTermId; + } + set + { + if ((this._TailTermId != value)) + { + this.OnTailTermIdChanging(value); + this.SendPropertyChanging(); + this._TailTermId = value; + this.SendPropertyChanged("TailTermId"); + this.OnTailTermIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="VarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="VarChar(50)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this.OnProjectNameChanging(value); + this.SendPropertyChanging(); + this._ProjectName = value; + this.SendPropertyChanged("ProjectName"); + this.OnProjectNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TailTermCode", DbType="VarChar(50)")] + public string TailTermCode + { + get + { + return this._TailTermCode; + } + set + { + if ((this._TailTermCode != value)) + { + this.OnTailTermCodeChanging(value); + this.SendPropertyChanging(); + this._TailTermCode = value; + this.SendPropertyChanged("TailTermCode"); + this.OnTailTermCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionUnit", DbType="VarChar(50)")] + public string ConstructionUnit + { + get + { + return this._ConstructionUnit; + } + set + { + if ((this._ConstructionUnit != value)) + { + this.OnConstructionUnitChanging(value); + this.SendPropertyChanging(); + this._ConstructionUnit = value; + this.SendPropertyChanged("ConstructionUnit"); + this.OnConstructionUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemType", DbType="Int")] + public System.Nullable ProblemType + { + get + { + return this._ProblemType; + } + set + { + if ((this._ProblemType != value)) + { + this.OnProblemTypeChanging(value); + this.SendPropertyChanging(); + this._ProblemType = value; + this.SendPropertyChanged("ProblemType"); + this.OnProblemTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuestionTechnologyId", DbType="VarChar(50)")] + public string QuestionTechnologyId + { + get + { + return this._QuestionTechnologyId; + } + set + { + if ((this._QuestionTechnologyId != value)) + { + this.OnQuestionTechnologyIdChanging(value); + this.SendPropertyChanging(); + this._QuestionTechnologyId = value; + this.SendPropertyChanged("QuestionTechnologyId"); + this.OnQuestionTechnologyIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TermItemId", DbType="VarChar(50)")] + public string TermItemId + { + get + { + return this._TermItemId; + } + set + { + if ((this._TermItemId != value)) + { + this.OnTermItemIdChanging(value); + this.SendPropertyChanging(); + this._TermItemId = value; + this.SendPropertyChanged("TermItemId"); + this.OnTermItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackId", DbType="VarChar(50)")] + public string WorkPackId + { + get + { + return this._WorkPackId; + } + set + { + if ((this._WorkPackId != value)) + { + this.OnWorkPackIdChanging(value); + this.SendPropertyChanging(); + this._WorkPackId = value; + this.SendPropertyChanged("WorkPackId"); + this.OnWorkPackIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuestionDesc", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string QuestionDesc + { + get + { + return this._QuestionDesc; + } + set + { + if ((this._QuestionDesc != value)) + { + this.OnQuestionDescChanging(value); + this.SendPropertyChanging(); + this._QuestionDesc = value; + this.SendPropertyChanged("QuestionDesc"); + this.OnQuestionDescChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyOpinion", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string RectifyOpinion + { + get + { + return this._RectifyOpinion; + } + set + { + if ((this._RectifyOpinion != value)) + { + this.OnRectifyOpinionChanging(value); + this.SendPropertyChanging(); + this._RectifyOpinion = value; + this.SendPropertyChanged("RectifyOpinion"); + this.OnRectifyOpinionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RectifyTime", DbType="DateTime")] + public System.Nullable RectifyTime + { + get + { + return this._RectifyTime; + } + set + { + if ((this._RectifyTime != value)) + { + this.OnRectifyTimeChanging(value); + this.SendPropertyChanging(); + this._RectifyTime = value; + this.SendPropertyChanged("RectifyTime"); + this.OnRectifyTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectUser", DbType="VarChar(50)")] + public string InspectUser + { + get + { + return this._InspectUser; + } + set + { + if ((this._InspectUser != value)) + { + this.OnInspectUserChanging(value); + this.SendPropertyChanging(); + this._InspectUser = value; + this.SendPropertyChanged("InspectUser"); + this.OnInspectUserChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveUser", DbType="VarChar(50)")] + public string ApproveUser + { + get + { + return this._ApproveUser; + } + set + { + if ((this._ApproveUser != value)) + { + this.OnApproveUserChanging(value); + this.SendPropertyChanging(); + this._ApproveUser = value; + this.SendPropertyChanged("ApproveUser"); + this.OnApproveUserChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveState", DbType="Int")] + public System.Nullable ApproveState + { + get + { + return this._ApproveState; + } + set + { + if ((this._ApproveState != value)) + { + this.OnApproveStateChanging(value); + this.SendPropertyChanging(); + this._ApproveState = value; + this.SendPropertyChanged("ApproveState"); + this.OnApproveStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddUser", DbType="VarChar(50)")] + public string AddUser + { + get + { + return this._AddUser; + } + set + { + if ((this._AddUser != value)) + { + this.OnAddUserChanging(value); + this.SendPropertyChanging(); + this._AddUser = value; + this.SendPropertyChanged("AddUser"); + this.OnAddUserChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddTime", DbType="DateTime")] + public System.Nullable AddTime + { + get + { + return this._AddTime; + } + set + { + if ((this._AddTime != value)) + { + this.OnAddTimeChanging(value); + this.SendPropertyChanging(); + this._AddTime = value; + this.SendPropertyChanged("AddTime"); + this.OnAddTimeChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PreRun_InspectTermApproveRecords")] + public partial class PreRun_InspectTermApproveRecords : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InspectTermId; + + private string _ProjectId; + + private string _TermItemId; + + private string _TailTermId; + + private string _ApproveOpinion; + + private System.Nullable _ApproveTime; + + private string _ApproveUser; + + private System.Nullable _ApproveState; + + private string _AddUser; + + private System.Nullable _AddTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInspectTermIdChanging(string value); + partial void OnInspectTermIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnTermItemIdChanging(string value); + partial void OnTermItemIdChanged(); + partial void OnTailTermIdChanging(string value); + partial void OnTailTermIdChanged(); + partial void OnApproveOpinionChanging(string value); + partial void OnApproveOpinionChanged(); + partial void OnApproveTimeChanging(System.Nullable value); + partial void OnApproveTimeChanged(); + partial void OnApproveUserChanging(string value); + partial void OnApproveUserChanged(); + partial void OnApproveStateChanging(System.Nullable value); + partial void OnApproveStateChanged(); + partial void OnAddUserChanging(string value); + partial void OnAddUserChanged(); + partial void OnAddTimeChanging(System.Nullable value); + partial void OnAddTimeChanged(); + #endregion + + public PreRun_InspectTermApproveRecords() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectTermId", DbType="VarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InspectTermId + { + get + { + return this._InspectTermId; + } + set + { + if ((this._InspectTermId != value)) + { + this.OnInspectTermIdChanging(value); + this.SendPropertyChanging(); + this._InspectTermId = value; + this.SendPropertyChanged("InspectTermId"); + this.OnInspectTermIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="VarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TermItemId", DbType="VarChar(50)")] + public string TermItemId + { + get + { + return this._TermItemId; + } + set + { + if ((this._TermItemId != value)) + { + this.OnTermItemIdChanging(value); + this.SendPropertyChanging(); + this._TermItemId = value; + this.SendPropertyChanged("TermItemId"); + this.OnTermItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TailTermId", DbType="VarChar(50)")] + public string TailTermId + { + get + { + return this._TailTermId; + } + set + { + if ((this._TailTermId != value)) + { + this.OnTailTermIdChanging(value); + this.SendPropertyChanging(); + this._TailTermId = value; + this.SendPropertyChanged("TailTermId"); + this.OnTailTermIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveOpinion", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string ApproveOpinion + { + get + { + return this._ApproveOpinion; + } + set + { + if ((this._ApproveOpinion != value)) + { + this.OnApproveOpinionChanging(value); + this.SendPropertyChanging(); + this._ApproveOpinion = value; + this.SendPropertyChanged("ApproveOpinion"); + this.OnApproveOpinionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveTime", DbType="DateTime")] + public System.Nullable ApproveTime + { + get + { + return this._ApproveTime; + } + set + { + if ((this._ApproveTime != value)) + { + this.OnApproveTimeChanging(value); + this.SendPropertyChanging(); + this._ApproveTime = value; + this.SendPropertyChanged("ApproveTime"); + this.OnApproveTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveUser", DbType="VarChar(50)")] + public string ApproveUser + { + get + { + return this._ApproveUser; + } + set + { + if ((this._ApproveUser != value)) + { + this.OnApproveUserChanging(value); + this.SendPropertyChanging(); + this._ApproveUser = value; + this.SendPropertyChanged("ApproveUser"); + this.OnApproveUserChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveState", DbType="Int")] + public System.Nullable ApproveState + { + get + { + return this._ApproveState; + } + set + { + if ((this._ApproveState != value)) + { + this.OnApproveStateChanging(value); + this.SendPropertyChanging(); + this._ApproveState = value; + this.SendPropertyChanged("ApproveState"); + this.OnApproveStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddUser", DbType="VarChar(50)")] + public string AddUser + { + get + { + return this._AddUser; + } + set + { + if ((this._AddUser != value)) + { + this.OnAddUserChanging(value); + this.SendPropertyChanging(); + this._AddUser = value; + this.SendPropertyChanged("AddUser"); + this.OnAddUserChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AddTime", DbType="DateTime")] + public System.Nullable AddTime + { + get + { + return this._AddTime; + } + set + { + if ((this._AddTime != value)) + { + this.OnAddTimeChanging(value); + this.SendPropertyChanging(); + this._AddTime = value; + this.SendPropertyChanged("AddTime"); + this.OnAddTimeChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PreRun_PropertySysPiping")] public partial class PreRun_PropertySysPiping : INotifyPropertyChanging, INotifyPropertyChanged { @@ -259618,6 +262354,18 @@ namespace Model private System.Nullable _AddTime; + private string _Subcontractor; + + private string _Contractor; + + private string _Supervision; + + private string _Owner; + + private System.Nullable _WorkPackType; + + private string _PropertyTechnologyId; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -259644,6 +262392,18 @@ namespace Model partial void OnAddUserChanged(); partial void OnAddTimeChanging(System.Nullable value); partial void OnAddTimeChanged(); + partial void OnSubcontractorChanging(string value); + partial void OnSubcontractorChanged(); + partial void OnContractorChanging(string value); + partial void OnContractorChanged(); + partial void OnSupervisionChanging(string value); + partial void OnSupervisionChanged(); + partial void OnOwnerChanging(string value); + partial void OnOwnerChanged(); + partial void OnWorkPackTypeChanging(System.Nullable value); + partial void OnWorkPackTypeChanged(); + partial void OnPropertyTechnologyIdChanging(string value); + partial void OnPropertyTechnologyIdChanged(); #endregion public PreRun_SubInspectTerm() @@ -259871,6 +262631,126 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subcontractor", DbType="VarChar(50)")] + public string Subcontractor + { + get + { + return this._Subcontractor; + } + set + { + if ((this._Subcontractor != value)) + { + this.OnSubcontractorChanging(value); + this.SendPropertyChanging(); + this._Subcontractor = value; + this.SendPropertyChanged("Subcontractor"); + this.OnSubcontractorChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Contractor", DbType="VarChar(50)")] + public string Contractor + { + get + { + return this._Contractor; + } + set + { + if ((this._Contractor != value)) + { + this.OnContractorChanging(value); + this.SendPropertyChanging(); + this._Contractor = value; + this.SendPropertyChanged("Contractor"); + this.OnContractorChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Supervision", DbType="VarChar(50)")] + public string Supervision + { + get + { + return this._Supervision; + } + set + { + if ((this._Supervision != value)) + { + this.OnSupervisionChanging(value); + this.SendPropertyChanging(); + this._Supervision = value; + this.SendPropertyChanged("Supervision"); + this.OnSupervisionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Owner", DbType="VarChar(50)")] + public string Owner + { + get + { + return this._Owner; + } + set + { + if ((this._Owner != value)) + { + this.OnOwnerChanging(value); + this.SendPropertyChanging(); + this._Owner = value; + this.SendPropertyChanged("Owner"); + this.OnOwnerChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackType", DbType="Int")] + public System.Nullable WorkPackType + { + get + { + return this._WorkPackType; + } + set + { + if ((this._WorkPackType != value)) + { + this.OnWorkPackTypeChanging(value); + this.SendPropertyChanging(); + this._WorkPackType = value; + this.SendPropertyChanged("WorkPackType"); + this.OnWorkPackTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="VarChar(50)")] + public string PropertyTechnologyId + { + get + { + return this._PropertyTechnologyId; + } + set + { + if ((this._PropertyTechnologyId != value)) + { + this.OnPropertyTechnologyIdChanging(value); + this.SendPropertyChanging(); + this._PropertyTechnologyId = value; + this.SendPropertyChanged("PropertyTechnologyId"); + this.OnPropertyTechnologyIdChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -259898,6 +262778,8 @@ namespace Model private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + private string _TermItemId; + private string _SubItemId; private string _SubInspectId; @@ -259924,6 +262806,18 @@ namespace Model private string _InspectionIllustrate; + private string _Subcontractor; + + private string _Contractor; + + private string _Supervision; + + private string _Owner; + + private System.Nullable _WorkPackType; + + private string _PropertyTechnologyId; + private string _Remark; private string _AddUser; @@ -259936,6 +262830,8 @@ namespace Model partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); + partial void OnTermItemIdChanging(string value); + partial void OnTermItemIdChanged(); partial void OnSubItemIdChanging(string value); partial void OnSubItemIdChanged(); partial void OnSubInspectIdChanging(string value); @@ -259962,6 +262858,18 @@ namespace Model partial void OnInspectionResultsChanged(); partial void OnInspectionIllustrateChanging(string value); partial void OnInspectionIllustrateChanged(); + partial void OnSubcontractorChanging(string value); + partial void OnSubcontractorChanged(); + partial void OnContractorChanging(string value); + partial void OnContractorChanged(); + partial void OnSupervisionChanging(string value); + partial void OnSupervisionChanged(); + partial void OnOwnerChanging(string value); + partial void OnOwnerChanged(); + partial void OnWorkPackTypeChanging(System.Nullable value); + partial void OnWorkPackTypeChanged(); + partial void OnPropertyTechnologyIdChanging(string value); + partial void OnPropertyTechnologyIdChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); partial void OnAddUserChanging(string value); @@ -259977,7 +262885,27 @@ namespace Model OnCreated(); } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubItemId", DbType="VarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TermItemId", DbType="VarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string TermItemId + { + get + { + return this._TermItemId; + } + set + { + if ((this._TermItemId != value)) + { + this.OnTermItemIdChanging(value); + this.SendPropertyChanging(); + this._TermItemId = value; + this.SendPropertyChanged("TermItemId"); + this.OnTermItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubItemId", DbType="VarChar(50)")] public string SubItemId { get @@ -260237,6 +263165,126 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subcontractor", DbType="VarChar(50)")] + public string Subcontractor + { + get + { + return this._Subcontractor; + } + set + { + if ((this._Subcontractor != value)) + { + this.OnSubcontractorChanging(value); + this.SendPropertyChanging(); + this._Subcontractor = value; + this.SendPropertyChanged("Subcontractor"); + this.OnSubcontractorChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Contractor", DbType="VarChar(50)")] + public string Contractor + { + get + { + return this._Contractor; + } + set + { + if ((this._Contractor != value)) + { + this.OnContractorChanging(value); + this.SendPropertyChanging(); + this._Contractor = value; + this.SendPropertyChanged("Contractor"); + this.OnContractorChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Supervision", DbType="VarChar(50)")] + public string Supervision + { + get + { + return this._Supervision; + } + set + { + if ((this._Supervision != value)) + { + this.OnSupervisionChanging(value); + this.SendPropertyChanging(); + this._Supervision = value; + this.SendPropertyChanged("Supervision"); + this.OnSupervisionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Owner", DbType="VarChar(50)")] + public string Owner + { + get + { + return this._Owner; + } + set + { + if ((this._Owner != value)) + { + this.OnOwnerChanging(value); + this.SendPropertyChanging(); + this._Owner = value; + this.SendPropertyChanged("Owner"); + this.OnOwnerChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackType", DbType="Int")] + public System.Nullable WorkPackType + { + get + { + return this._WorkPackType; + } + set + { + if ((this._WorkPackType != value)) + { + this.OnWorkPackTypeChanging(value); + this.SendPropertyChanging(); + this._WorkPackType = value; + this.SendPropertyChanged("WorkPackType"); + this.OnWorkPackTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PropertyTechnologyId", DbType="VarChar(50)")] + public string PropertyTechnologyId + { + get + { + return this._PropertyTechnologyId; + } + set + { + if ((this._PropertyTechnologyId != value)) + { + this.OnPropertyTechnologyIdChanging(value); + this.SendPropertyChanging(); + this._PropertyTechnologyId = value; + this.SendPropertyChanged("PropertyTechnologyId"); + this.OnPropertyTechnologyIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="VarChar(200)")] public string Remark { @@ -262048,6 +265096,8 @@ namespace Model private System.Nullable _Sort; + private System.Nullable _WorkPackType; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -262064,6 +265114,8 @@ namespace Model partial void OnAddTimeChanged(); partial void OnSortChanging(System.Nullable value); partial void OnSortChanged(); + partial void OnWorkPackTypeChanging(System.Nullable value); + partial void OnWorkPackTypeChanged(); #endregion public PreRun_WorkPackage() @@ -262191,6 +265243,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackType", DbType="Int")] + public System.Nullable WorkPackType + { + get + { + return this._WorkPackType; + } + set + { + if ((this._WorkPackType != value)) + { + this.OnWorkPackTypeChanging(value); + this.SendPropertyChanging(); + this._WorkPackType = value; + this.SendPropertyChanged("WorkPackType"); + this.OnWorkPackTypeChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -325988,6 +329060,12 @@ namespace Model private EntitySet _License_BreakGround_Sys_User3; + private EntitySet _License_Electricity; + + private EntitySet _License_Electricity_Sys_User2; + + private EntitySet _License_Electricity_Sys_User3; + private EntitySet _License_EquipmentSafetyList; private EntitySet _License_FireWork; @@ -326611,6 +329689,9 @@ namespace Model this._License_BreakGround = new EntitySet(new Action(this.attach_License_BreakGround), new Action(this.detach_License_BreakGround)); this._License_BreakGround_Sys_User2 = new EntitySet(new Action(this.attach_License_BreakGround_Sys_User2), new Action(this.detach_License_BreakGround_Sys_User2)); this._License_BreakGround_Sys_User3 = new EntitySet(new Action(this.attach_License_BreakGround_Sys_User3), new Action(this.detach_License_BreakGround_Sys_User3)); + this._License_Electricity = new EntitySet(new Action(this.attach_License_Electricity), new Action(this.detach_License_Electricity)); + this._License_Electricity_Sys_User2 = new EntitySet(new Action(this.attach_License_Electricity_Sys_User2), new Action(this.detach_License_Electricity_Sys_User2)); + this._License_Electricity_Sys_User3 = new EntitySet(new Action(this.attach_License_Electricity_Sys_User3), new Action(this.detach_License_Electricity_Sys_User3)); this._License_EquipmentSafetyList = new EntitySet(new Action(this.attach_License_EquipmentSafetyList), new Action(this.detach_License_EquipmentSafetyList)); this._License_FireWork = new EntitySet(new Action(this.attach_License_FireWork), new Action(this.detach_License_FireWork)); this._License_FireWork_Sys_User1 = new EntitySet(new Action(this.attach_License_FireWork_Sys_User1), new Action(this.detach_License_FireWork_Sys_User1)); @@ -329844,6 +332925,45 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User", Storage="_License_Electricity", ThisKey="UserId", OtherKey="ApplyManId", DeleteRule="NO ACTION")] + public EntitySet License_Electricity + { + get + { + return this._License_Electricity; + } + set + { + this._License_Electricity.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User2", Storage="_License_Electricity_Sys_User2", ThisKey="UserId", OtherKey="CancelManId", DeleteRule="NO ACTION")] + public EntitySet License_Electricity_Sys_User2 + { + get + { + return this._License_Electricity_Sys_User2; + } + set + { + this._License_Electricity_Sys_User2.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User3", Storage="_License_Electricity_Sys_User3", ThisKey="UserId", OtherKey="CloseManId", DeleteRule="NO ACTION")] + public EntitySet License_Electricity_Sys_User3 + { + get + { + return this._License_Electricity_Sys_User3; + } + set + { + this._License_Electricity_Sys_User3.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_EquipmentSafetyList_Sys_User", Storage="_License_EquipmentSafetyList", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet License_EquipmentSafetyList { @@ -334135,6 +337255,42 @@ namespace Model entity.CloseMan = null; } + private void attach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_License_Electricity_Sys_User2(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.CancelMan = this; + } + + private void detach_License_Electricity_Sys_User2(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.CancelMan = null; + } + + private void attach_License_Electricity_Sys_User3(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.CloseMan = this; + } + + private void detach_License_Electricity_Sys_User3(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.CloseMan = null; + } + private void attach_License_EquipmentSafetyList(License_EquipmentSafetyList entity) { this.SendPropertyChanging(); diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index 021d6974..132bd4b1 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -94,6 +94,7 @@ + diff --git a/SGGL/WebAPI/Controllers/HSSE/HSSELogController.cs b/SGGL/WebAPI/Controllers/HSSE/HSSELogController.cs new file mode 100644 index 00000000..e1064260 --- /dev/null +++ b/SGGL/WebAPI/Controllers/HSSE/HSSELogController.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using BLL; +using Mvc.Controllers; + +namespace WebAPI.Controllers.HSSE +{ + public class HSSELogController : ApiController + { + /// + /// 加载日志列表 + /// + /// + /// + /// + /// + public Model.ResponeData getHSSELogDataList( string projectId, string userId,string CompileDate="",string CompileMan="", int pageIndex=0) + { + var responeData = new Model.ResponeData(); + try + { + var getDataList = HSSELogService.getHSSELogDataList(projectId, userId, CompileMan, CompileDate); + int pageCount = getDataList.Count; + if (pageCount > 0 && pageIndex > 0) + { + getDataList = (from x in getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize) + select x).ToList(); + } + responeData.data = new { pageCount, getDataList }; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + /// + /// 加载日志列表 + /// + /// + /// + /// + /// + public Model.ResponeData getHSSELogData(string HSSELogId) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = HSSELogService.getHSSELogData(HSSELogId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + /// + /// 加载天气 + /// + /// + public Model.ResponeData getWeatherDataList() + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = ConstValue.drpConstItemList(BLL.ConstValue.Group_Weather); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + /// + /// 保存日志 + /// + /// 作业票记录 + [HttpPost] + public Model.ResponeData SaveHSSELogData([FromBody] Model.HSSELogItem HSSELog) + { + var responeData = new Model.ResponeData(); + HSSELog.IsVisible = true; + try + { + if (!string.IsNullOrEmpty(HSSELog.HSSELogId)) + { + BLL.HSSELogService.UpdateHSSELogApi(HSSELog); + responeData.message = "修改成功"; + } + else + { + HSSELog.HSSELogId = SQLHelper.GetNewID(typeof(Model.Manager_HSSELog)); + BLL.HSSELogService.AddHSSELogApi(HSSELog); + responeData.message = "保存成功"; + } + + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + ErrLogInfo.WriteLog(string.Empty, ex); + } + + return responeData; + } + } +} \ No newline at end of file diff --git a/SGGL/WebAPI/Controllers/HSSE/LicenseController.cs b/SGGL/WebAPI/Controllers/HSSE/LicenseController.cs index 4f31fa11..2fad1d1d 100644 --- a/SGGL/WebAPI/Controllers/HSSE/LicenseController.cs +++ b/SGGL/WebAPI/Controllers/HSSE/LicenseController.cs @@ -5,6 +5,7 @@ using System.Net; using System.Net.Http; using System.Web.Http; using BLL; +using Mvc.Controllers; namespace WebAPI.Controllers { @@ -191,6 +192,7 @@ namespace WebAPI.Controllers try { APILicenseDataService.SaveLicenseFlowOperate(flowOperateItem); + CheckListController.SaveAttachFile(flowOperateItem.FlowOperateId, BLL.Const.CheckListMenuId, flowOperateItem.AttachUrl); } catch (Exception ex) { diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index c8a5f5f8..36935d17 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -181,6 +181,7 @@ +