From c4bcf04d7444911dcab6ca4c7103f412ab57565c Mon Sep 17 00:00:00 2001 From: 10191 <506754232@qq.com> Date: Sat, 10 Jun 2023 12:00:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=A4=A9=E8=BE=B0=20?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_CD_V2023-03-10-002.sql | 125 + .../版本日志/SGGLDB_CD_V2023-06-10-001.sql | 504 ++ SGGL/BLL/API/HSSE/APILicenseDataService.cs | 1511 +++++- SGGL/BLL/Common/Const.cs | 15 +- SGGL/BLL/HSSE/License/LicensePublicService.cs | 303 +- SGGL/FineUIPro.Web/ErrLog.txt | 17 + SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 48 + .../RepairManage/RepairManageEdit.aspx.cs | 4 +- .../HSSE/Check/RectifyNoticesAudit.aspx.cs | 2 +- .../HSSE/License/BreakGround.aspx | 3 + .../HSSE/License/BreakGround.aspx.cs | 233 +- .../HSSE/License/BreakGroundView.aspx | 100 +- .../HSSE/License/BreakGroundView.aspx.cs | 101 +- .../License/BreakGroundView.aspx.designer.cs | 173 +- SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx | 4 +- .../HSSE/License/FireWork.aspx.cs | 339 +- .../HSSE/License/FireWorkView.aspx | 42 +- .../HSSE/License/FireWorkView.aspx.cs | 34 +- .../License/FireWorkView.aspx.designer.cs | 45 + .../HSSE/License/HSETechnical.aspx | 6 +- .../HSSE/License/HSETechnicalEdit.aspx.cs | 9 + .../HSSE/License/HeightWork.aspx.cs | 427 +- .../HSSE/License/HeightWorkView.aspx | 30 +- .../HSSE/License/HeightWorkView.aspx.cs | 37 +- .../License/HeightWorkView.aspx.designer.cs | 49 +- SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx | 127 + .../FineUIPro.Web/HSSE/License/JiaBan.aspx.cs | 1031 +++++ .../HSSE/License/JiaBan.aspx.designer.cs | 179 + .../HSSE/License/JiaBanView.aspx | 242 + .../HSSE/License/JiaBanView.aspx.cs | 244 + .../HSSE/License/JiaBanView.aspx.designer.cs | 431 ++ .../HSSE/License/LicenseManager.aspx | 15 +- .../HSSE/License/LicenseManager.aspx.cs | 8 +- .../License/LicenseManager.aspx.designer.cs | 63 +- .../HSSE/License/LiftingWork.aspx.cs | 604 ++- .../HSSE/License/LiftingWorkView.aspx | 36 +- .../HSSE/License/LiftingWorkView.aspx.cs | 41 +- .../License/LiftingWorkView.aspx.designer.cs | 76 +- .../HSSE/License/LimitedSpace.aspx.cs | 439 +- .../HSSE/License/LimitedSpaceView.aspx | 74 +- .../HSSE/License/LimitedSpaceView.aspx.cs | 41 +- .../License/LimitedSpaceView.aspx.designer.cs | 92 +- .../HSSE/License/NightWork.aspx.cs | 455 +- .../HSSE/License/NightWorkView.aspx | 16 +- .../HSSE/License/NightWorkView.aspx.cs | 35 +- .../License/NightWorkView.aspx.designer.cs | 27 + .../HSSE/License/OpenCircuit.aspx.cs | 387 +- .../HSSE/License/OpenCircuitView.aspx | 23 +- .../HSSE/License/OpenCircuitView.aspx.cs | 38 +- .../License/OpenCircuitView.aspx.designer.cs | 44 +- .../HSSE/License/PressureTest.aspx | 122 + .../HSSE/License/PressureTest.aspx.cs | 978 ++++ .../License/PressureTest.aspx.designer.cs | 179 + .../HSSE/License/PressureTestView.aspx | 292 ++ .../HSSE/License/PressureTestView.aspx.cs | 238 + .../License/PressureTestView.aspx.designer.cs | 503 ++ .../HSSE/License/RadialWork.aspx.cs | 524 ++- .../HSSE/License/RadialWorkView.aspx | 67 +- .../HSSE/License/RadialWorkView.aspx.cs | 54 +- .../License/RadialWorkView.aspx.designer.cs | 107 +- .../HSSE/License/TempElectricity.aspx | 122 + .../HSSE/License/TempElectricity.aspx.cs | 909 ++++ .../License/TempElectricity.aspx.designer.cs | 179 + .../HSSE/License/TempElectricityView.aspx | 298 ++ .../HSSE/License/TempElectricityView.aspx.cs | 240 + .../TempElectricityView.aspx.designer.cs | 512 +++ SGGL/FineUIPro.Web/common/Menu_HSSE.xml | 14 +- .../common/mainMenu_HSSE.aspx.cs | 2 +- SGGL/Model/APIItem/HSSE/FlowOperateItem.cs | 13 + SGGL/Model/APIItem/HSSE/LicenseDataItem.cs | 159 + SGGL/Model/Model.cs | 4056 +++++++++++++++++ .../Controllers/HSSE/LicenseController.cs | 65 +- 72 files changed, 16423 insertions(+), 2139 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_CD_V2023-03-10-002.sql create mode 100644 DataBase/版本日志/SGGLDB_CD_V2023-06-10-001.sql create mode 100644 SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/JiaBanView.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/License/JiaBanView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/JiaBanView.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/PressureTest.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/License/PressureTest.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/PressureTest.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/PressureTestView.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/License/PressureTestView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/PressureTestView.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/TempElectricity.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/License/TempElectricity.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/TempElectricity.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/TempElectricityView.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/License/TempElectricityView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/TempElectricityView.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_CD_V2023-03-10-002.sql b/DataBase/版本日志/SGGLDB_CD_V2023-03-10-002.sql new file mode 100644 index 00000000..66891338 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_CD_V2023-03-10-002.sql @@ -0,0 +1,125 @@ +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D5B', N'ҵƱ', NULL, N'HSSE/License/Apply.aspx', '9', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B', N'ҵƱ', NULL, N'HSSE/License/FireWork.aspx', '10', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9', N'ߴҵƱ', NULL, N'HSSE/License/HeightWork.aspx', '20', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'AEC9166D-1C91-45F0-8BFE-D3D0479A28C7', N'޿ռҵƱ', NULL, N'HSSE/License/LimitedSpace.aspx', '30', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'F72FF20B-D3EB-46A5-97F7-C99B2473A140', N'ҵƱ', NULL, N'HSSE/License/RadialWork.aspx', '40', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'4E607E83-41FC-4F49-B26F-A21CFE38328F', N'·(ռ)ҵƱ', NULL, N'HSSE/License/OpenCircuit.aspx', '60', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'755C6AC9-2E38-4D4F-AF33-33CB1744A907', N'ҵƱ', NULL, N'HSSE/License/BreakGround.aspx', '70', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'7BBAE649-7B00-4475-A911-BFE3A37AC55B', N'ҹʩҵƱ', NULL, N'HSSE/License/NightWork.aspx', '80', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'A1BE3AB6-9D4A-41E7-8870-E73423165451', N'װҵƱ', NULL, N'HSSE/License/LiftingWork.aspx', '80', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'E9EF8980-C60C-4A87-8498-5A0A061844ED', N'ٵҵƱ', NULL, N'HSSE/License/TempElectricity.aspx', '100', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'F0EBACC6-DAED-4A3F-A174-9AB639409C4B', N'ѹҵƱ', NULL, N'HSSE/License/PressureTest.aspx', '110', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'7F1C5B31-10D7-49AB-8AA2-01FAC565C964', N'ӰҵƱ', NULL, N'HSSE/License/JiaBan.aspx', '120', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); +INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'0E9B7084-D021-4CA3-B9D2-9CBAA27A571B', N'ҵƱ()', NULL, N'HSSE/License/LicenseManager.aspx', '130', N'473A87D2-1365-4A68-BD38-06F312F81BC2', N'Menu_HSSE', '0', '1', '1'); + + +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'918DACA1-A573-4953-B982-46BFB8E0C1AC', N'0E9B7084-D021-4CA3-B9D2-9CBAA27A571B', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'039A974A-6989-44FC-B6CA-177A536ADA30', N'0E9B7084-D021-4CA3-B9D2-9CBAA27A571B', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'E5ADE297-2366-481E-B5F8-43FF2B371CDE', N'0E9B7084-D021-4CA3-B9D2-9CBAA27A571B', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'3AA2CAEC-3021-4EF5-966C-E7DF21F6473D', N'0E9B7084-D021-4CA3-B9D2-9CBAA27A571B', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'8DB0EAED-B67D-423A-BA13-E7872A11727A', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'F0283058-2CCF-4195-AEBC-878A2AE5067F', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'2C3CD3AA-C07D-439F-97BE-FEA20CE512CB', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'BBB22814-70D3-4188-A7F8-8C0FD4557A27', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'C3B44F7C-8820-4178-B8C7-7554F5273C3F', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D5B', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'9D6C6994-7E25-4286-80E2-7132F04E94F4', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D5B', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'39962AA4-F80A-4F58-AEDC-7AAE800118B3', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D5B', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'29D4551C-7C01-4545-B6B8-2B1AE5899D22', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D5B', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'6D90E4CD-D932-454A-8A8B-54FA3CC22FD4', N'4E607E83-41FC-4F49-B26F-A21CFE38328F', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'53BF21A8-38DA-4853-A527-8D392B901554', N'4E607E83-41FC-4F49-B26F-A21CFE38328F', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'06F8CEAB-7AF8-40C5-B6D0-6A91AE562AD7', N'4E607E83-41FC-4F49-B26F-A21CFE38328F', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'C8BE46DF-2553-4A64-BE79-B69712C297A5', N'4E607E83-41FC-4F49-B26F-A21CFE38328F', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'F3D52EF3-104F-42CF-B48A-443FCE5C800D', N'755C6AC9-2E38-4D4F-AF33-33CB1744A907', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'7DFD6886-0F8B-4DA1-9C4B-1847A8B286AF', N'755C6AC9-2E38-4D4F-AF33-33CB1744A907', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'F5F93A18-438F-4A19-982B-7E9E38EB6AE2', N'755C6AC9-2E38-4D4F-AF33-33CB1744A907', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'32937824-9F35-4C4E-8E13-984E784F8E9C', N'755C6AC9-2E38-4D4F-AF33-33CB1744A907', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'B040C80B-4216-4AF8-B9C9-A1303E31CFAC', N'7BBAE649-7B00-4475-A911-BFE3A37AC55B', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'60241503-BF4B-4159-AFA2-41186CD9329B', N'7BBAE649-7B00-4475-A911-BFE3A37AC55B', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'3A192DC6-2338-4038-ADAD-46FA7364E20F', N'7BBAE649-7B00-4475-A911-BFE3A37AC55B', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'6239BB95-33AF-4B36-97CB-787EF553D35A', N'7BBAE649-7B00-4475-A911-BFE3A37AC55B', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'909EB1F1-3BBC-47CD-BC00-420EBCD4B89F', N'7F1C5B31-10D7-49AB-8AA2-01FAC565C964', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'C4F92619-293C-4361-B61B-E333139CEE86', N'7F1C5B31-10D7-49AB-8AA2-01FAC565C964', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'DEAC1BCA-490B-448A-8DB8-7921DE938F9D', N'7F1C5B31-10D7-49AB-8AA2-01FAC565C964', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'FBAA0A02-BCCA-49D3-938F-0AFCC5B6A82E', N'7F1C5B31-10D7-49AB-8AA2-01FAC565C964', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'BDC9E201-0C51-4C02-9151-B6DF86CE4C27', N'A1BE3AB6-9D4A-41E7-8870-E73423165451', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'36EBA247-3051-4213-BD95-89DC948006E1', N'A1BE3AB6-9D4A-41E7-8870-E73423165451', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'46A93981-2D60-49C3-877A-7B66EBCBC927', N'A1BE3AB6-9D4A-41E7-8870-E73423165451', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'3C5F18F7-459A-4666-B497-9400E637C975', N'A1BE3AB6-9D4A-41E7-8870-E73423165451', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'904FD3D2-1520-48FB-BD8F-6BAA000653B7', N'AEC9166D-1C91-45F0-8BFE-D3D0479A28C7', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'7F372BE4-E264-48FB-ACA6-8E7EE41393EC', N'AEC9166D-1C91-45F0-8BFE-D3D0479A28C7', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'BE6D9AE8-069A-421A-8E3D-F3DDC18FCDB4', N'AEC9166D-1C91-45F0-8BFE-D3D0479A28C7', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'8CC252A0-F098-4FE3-AF21-4A7A7030DC5E', N'AEC9166D-1C91-45F0-8BFE-D3D0479A28C7', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'B3CD11DC-D359-4D60-8DB4-BD095CE52C17', N'DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'6D9B6919-0677-4892-9C73-CDD6C124B855', N'DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'044C6FF2-2A30-4E08-88A6-9D85722AD89C', N'DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'7C06CD77-402A-4F8C-A41B-1C69301707E5', N'DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'CC1BECFD-3B41-4210-97EE-DEBBB17A6A58', N'E9EF8980-C60C-4A87-8498-5A0A061844ED', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'B1E8D9F2-ACFD-48F1-A211-9740209926D5', N'E9EF8980-C60C-4A87-8498-5A0A061844ED', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'B879C02B-D509-46D0-B74F-23E5026FC562', N'E9EF8980-C60C-4A87-8498-5A0A061844ED', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'B3993064-9E0E-4D4F-A7B5-5935C1FEB25D', N'E9EF8980-C60C-4A87-8498-5A0A061844ED', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'FFA008B6-B579-4CC2-B683-51B95FFB894B', N'F0EBACC6-DAED-4A3F-A174-9AB639409C4B', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'F6C1E6C5-777D-4876-95B5-54B1D775882C', N'F0EBACC6-DAED-4A3F-A174-9AB639409C4B', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'F62D030C-7446-4835-8F69-E4B694FB9DA3', N'F0EBACC6-DAED-4A3F-A174-9AB639409C4B', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'CB58F7F7-DD4F-4F21-9362-A7ABBD3F1652', N'F0EBACC6-DAED-4A3F-A174-9AB639409C4B', N'', '4'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'107EA8EA-4D8D-410B-B3DE-F0C29E9C3EDC', N'F72FF20B-D3EB-46A5-97F7-C99B2473A140', N'', '1'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'89010EF9-9E77-49EB-A00D-3142B9FBC29E', N'F72FF20B-D3EB-46A5-97F7-C99B2473A140', N'޸', '2'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'F5EFEB84-7CCC-406D-ACFA-CA36CB6A8A1D', N'F72FF20B-D3EB-46A5-97F7-C99B2473A140', N'ɾ', '3'); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'982333DA-42A2-40A3-8F3D-52BA7DE4E19D', N'F72FF20B-D3EB-46A5-97F7-C99B2473A140', N'', '4'); + + +Alter TABLE [dbo].[Sys_MenuFlowOperate]add + [CanEndFlow] [bit] NULL + + + +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'0c1a6c13-1cb8-45e8-a415-d93c4f2dd4c0', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B', '1', N'ʩְ̰ȫԱ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', '1', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'211e7843-7986-4fd3-80ef-a0d01c0d1261', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B', '2', N'ܳаרҵʦ', N'GCB64EF3-AB0A-40BC-824D-CC314598D5DC,F7302DA3-B522-43F9-98CC-6317622A884E,661e91f9-1c65-4f3c-a288-03b43efd5ca4,e44542a8-c0ba-4634-8c35-a18720329e36,b2be5e3b-b46c-4569-b84b-6c2d95714a03', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'ac7d5fec-6bfe-4fbe-b385-1617691fa13f', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B', '3', N'ܳаʩHSEʦ', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'2D869BAE-3909-4C9B-95DF-A2F081E1F42F', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B', '4', N'λ', NULL, '0', '1', '1', '0', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'CEBB4FDF-C406-472C-A5A3-B3E1B5B99A52', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B', '5', N'赥λ', N'0a4cd952-de48-4ac5-b27f-84337317ce89', '0', '1', '1', '0', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'dc0fc1b6-f9bf-4810-94fb-473e8f9721d5', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B', '6', N'', NULL, '1', '1', '1', '0', '1'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'13FE0C64-AE97-47E9-8637-6904A89ECCE9', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D5B', '1', N'ύܰȫʦ', N'66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'1D75313C-8C94-416B-84CE-36A41E376A76', N'2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D5B', '2', N'ܰȫʦ', NULL, '1', '2', '2', NULL, '1'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'FE783A32-17ED-4BFC-917B-413C8DB246CC', N'4E607E83-41FC-4F49-B26F-A21CFE38328F', '1', N'ʩа̰ȫ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', '1', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'EEA2A984-C229-48A5-972B-1D99D2C18475', N'4E607E83-41FC-4F49-B26F-A21CFE38328F', '2', N'ܳа̣ʩ', N'GCB64EF3-AB0A-40BC-824D-CC314598D5DC,F7302DA3-B522-43F9-98CC-6317622A884E,661e91f9-1c65-4f3c-a288-03b43efd5ca4,e44542a8-c0ba-4634-8c35-a18720329e36,b2be5e3b-b46c-4569-b84b-6c2d95714a03', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'D0C91634-29A7-43E2-98A3-62FA148AA517', N'4E607E83-41FC-4F49-B26F-A21CFE38328F', '3', N'ܳаʩHSE', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'6BA6D160-3D1C-4333-92E1-996A3F13AECC', N'4E607E83-41FC-4F49-B26F-A21CFE38328F', '4', N'', NULL, '1', '1', '1', NULL, '1'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'755C6AC9-2E38-4D4F-AF33-33CB1744A9071', N'755C6AC9-2E38-4D4F-AF33-33CB1744A907', '1', N'ʩְ̰ȫ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', '1', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'755C6AC9-2E38-4D4F-AF33-33CB1744A9072', N'755C6AC9-2E38-4D4F-AF33-33CB1744A907', '2', N'ܰʦ', N'GCB64EF3-AB0A-40BC-824D-CC314598D5DC,F7302DA3-B522-43F9-98CC-6317622A884E,661e91f9-1c65-4f3c-a288-03b43efd5ca4,e44542a8-c0ba-4634-8c35-a18720329e36,b2be5e3b-b46c-4569-b84b-6c2d95714a03', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'755C6AC9-2E38-4D4F-AF33-33CB1744A9073', N'755C6AC9-2E38-4D4F-AF33-33CB1744A907', '3', N'ܳа̹ܵʦ', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'0566BC7A-85DD-440C-973A-166868A066F3', N'755C6AC9-2E38-4D4F-AF33-33CB1744A907', '4', N'ܳа̵ʦ', N'GCB64EF3-AB0A-40BC-824D-CC314598D5DC,F7302DA3-B522-43F9-98CC-6317622A884E,661e91f9-1c65-4f3c-a288-03b43efd5ca4,e44542a8-c0ba-4634-8c35-a18720329e36,b2be5e3b-b46c-4569-b84b-6c2d95714a03', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'486078C8-0A6D-447B-B1D0-E66717EF9F1E', N'755C6AC9-2E38-4D4F-AF33-33CB1744A907', '5', N'ܰʩHSEʦ', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'755C6AC9-2E38-4D4F-AF33-33CB1744A9077', N'755C6AC9-2E38-4D4F-AF33-33CB1744A907', '6', N'', NULL, '1', '1', '1', NULL, '1'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'7BBAE649-7B00-4475-A911-BFE3A37AC55B1', N'7BBAE649-7B00-4475-A911-BFE3A37AC55B', '1', N'ʩλȫԱ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', '1', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'7BBAE649-7B00-4475-A911-BFE3A37AC55B2', N'7BBAE649-7B00-4475-A911-BFE3A37AC55B', '2', N'ܰλרҵʦ', N'GCB64EF3-AB0A-40BC-824D-CC314598D5DC,F7302DA3-B522-43F9-98CC-6317622A884E,661e91f9-1c65-4f3c-a288-03b43efd5ca4,e44542a8-c0ba-4634-8c35-a18720329e36,b2be5e3b-b46c-4569-b84b-6c2d95714a03', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'7BBAE649-7B00-4475-A911-BFE3A37AC55B3', N'7BBAE649-7B00-4475-A911-BFE3A37AC55B', '3', N'ܰλȫԱ', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'7BBAE649-7B00-4475-A911-BFE3A37AC55B7', N'7BBAE649-7B00-4475-A911-BFE3A37AC55B', '4', N'', NULL, '1', '1', '1', NULL, '1'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'BAA13435-C701-49D7-A7D1-6061E0A94712', N'7F1C5B31-10D7-49AB-8AA2-01FAC565C964', '1', N'ʩаĿʩ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', '1', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'EB4E67B1-A2ED-4511-8E23-1DE4F139D5E9', N'7F1C5B31-10D7-49AB-8AA2-01FAC565C964', '2', N'ʩа̰ȫ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'2562DF5A-C99E-4212-911F-640FE5827C5E', N'7F1C5B31-10D7-49AB-8AA2-01FAC565C964', '3', N'ܳаʩ', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'7818CA16-6828-40EC-B3F9-CB0A6F630138', N'7F1C5B31-10D7-49AB-8AA2-01FAC565C964', '4', N'ܳаʩHSE', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'3DFF0081-D416-4B24-8C6B-85F4F3FEA230', N'7F1C5B31-10D7-49AB-8AA2-01FAC565C964', '5', N'', NULL, '1', '1', '1', NULL, '1'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'A1BE3AB6-9D4A-41E7-8870-E734231654511', N'A1BE3AB6-9D4A-41E7-8870-E73423165451', '1', N'ʩְ̰ȫ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', '1', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'A1BE3AB6-9D4A-41E7-8870-E734231654512', N'A1BE3AB6-9D4A-41E7-8870-E73423165451', '2', N'ܳаרҵʦ', N'GCB64EF3-AB0A-40BC-824D-CC314598D5DC,F7302DA3-B522-43F9-98CC-6317622A884E,661e91f9-1c65-4f3c-a288-03b43efd5ca4,e44542a8-c0ba-4634-8c35-a18720329e36,b2be5e3b-b46c-4569-b84b-6c2d95714a03', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'A1BE3AB6-9D4A-41E7-8870-E734231654513', N'A1BE3AB6-9D4A-41E7-8870-E73423165451', '3', N'ܳаʩHSEʦ', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'A1BE3AB6-9D4A-41E7-8870-E734231654517', N'A1BE3AB6-9D4A-41E7-8870-E73423165451', '4', N'', NULL, '1', '1', '1', NULL, '1'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'034452AD-92AB-4956-ACF6-BE89FE01BECE', N'AEC9166D-1C91-45F0-8BFE-D3D0479A28C7', '1', N'ʩְ̰ȫ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', '1', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'A0F4DE31-59C6-4DF9-B6AB-B559BC70FCAB', N'AEC9166D-1C91-45F0-8BFE-D3D0479A28C7', '2', N'ܳаרҵʦ', N'GCB64EF3-AB0A-40BC-824D-CC314598D5DC,F7302DA3-B522-43F9-98CC-6317622A884E,661e91f9-1c65-4f3c-a288-03b43efd5ca4,e44542a8-c0ba-4634-8c35-a18720329e36,b2be5e3b-b46c-4569-b84b-6c2d95714a03', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'A41B5815-8D40-4EB7-89EC-2A5E18D8EE8A', N'AEC9166D-1C91-45F0-8BFE-D3D0479A28C7', '3', N'ܳаʩHSEʦ', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'B34C3254-91A5-45B9-8592-CBE7BCA2AF60', N'AEC9166D-1C91-45F0-8BFE-D3D0479A28C7', '4', N'', NULL, '1', '1', '1', NULL, '1'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'817F4373-5A30-4197-9793-5ACB0152E80F', N'DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9', '1', N'ʩְ̰ȫ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', '1', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'BF3A7FAD-6265-4228-ACB4-03DCA3581270', N'DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9', '2', N'ܳаרҵʦ', N'GCB64EF3-AB0A-40BC-824D-CC314598D5DC,F7302DA3-B522-43F9-98CC-6317622A884E,661e91f9-1c65-4f3c-a288-03b43efd5ca4,e44542a8-c0ba-4634-8c35-a18720329e36,b2be5e3b-b46c-4569-b84b-6c2d95714a03', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'A71C71E1-9BAB-4AF6-A0DC-BFF18299FFEA', N'DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9', '3', N'ܳаʩHSEʦ', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'45CAC29E-986E-4FCE-BE6F-C1FE085A0AD6', N'DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9', '4', N'', NULL, '1', '1', '1', NULL, '1'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'73CE1334-6E51-418E-B52B-1CFB204E786B', N'E9EF8980-C60C-4A87-8498-5A0A061844ED', '1', N'ʩְ̰ȫ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', '1', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'4572C45E-5FFB-45CB-96E7-48990307A7D4', N'E9EF8980-C60C-4A87-8498-5A0A061844ED', '2', N'ܳаרҵʦ', N'GCB64EF3-AB0A-40BC-824D-CC314598D5DC,F7302DA3-B522-43F9-98CC-6317622A884E,661e91f9-1c65-4f3c-a288-03b43efd5ca4,e44542a8-c0ba-4634-8c35-a18720329e36,b2be5e3b-b46c-4569-b84b-6c2d95714a03', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'DAE0E2E6-B84B-450E-83E3-5607608EC8FE', N'E9EF8980-C60C-4A87-8498-5A0A061844ED', '3', N'ܳаʩHSEʦ', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'5E8B202E-5CAD-4E0B-A2E8-9F8202A71E12', N'E9EF8980-C60C-4A87-8498-5A0A061844ED', '4', N'', NULL, '1', '1', '1', NULL, '1'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'D9B99376-9F1C-4FC4-9004-55B9CF333F3A', N'F0EBACC6-DAED-4A3F-A174-9AB639409C4B', '1', N'ʩְ̰ȫ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', '1', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'D4791428-3B95-4AD3-BC19-3889910D54D1', N'F0EBACC6-DAED-4A3F-A174-9AB639409C4B', '2', N'ܳаרҵʦ', N'GCB64EF3-AB0A-40BC-824D-CC314598D5DC,F7302DA3-B522-43F9-98CC-6317622A884E,661e91f9-1c65-4f3c-a288-03b43efd5ca4,e44542a8-c0ba-4634-8c35-a18720329e36,b2be5e3b-b46c-4569-b84b-6c2d95714a03', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'C57C594C-64F4-4F12-B4F0-655684760B88', N'F0EBACC6-DAED-4A3F-A174-9AB639409C4B', '3', N'ܳаʩHSEʦ', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'514ED1FC-0987-4367-A09B-8A5ACF6B0B5C', N'F0EBACC6-DAED-4A3F-A174-9AB639409C4B', '4', N'', NULL, '1', '1', '1', NULL, '1'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'FD0271ED-6CAB-4FC2-8645-E530F0724A79', N'F72FF20B-D3EB-46A5-97F7-C99B2473A140', '1', N'ʩְ̰ȫ', N'b01b5d82-c0d9-44fc-b3b9-fca91da34d28', '0', '1', '1', '1', '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'98448443-8BB2-4D29-B174-FF0EADD4711D', N'F72FF20B-D3EB-46A5-97F7-C99B2473A140', '2', N'ܳаרҵʦ', N'GCB64EF3-AB0A-40BC-824D-CC314598D5DC,F7302DA3-B522-43F9-98CC-6317622A884E,661e91f9-1c65-4f3c-a288-03b43efd5ca4,e44542a8-c0ba-4634-8c35-a18720329e36,b2be5e3b-b46c-4569-b84b-6c2d95714a03', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'EAC9F894-0ED7-49D3-A397-88B53E5C1D74', N'F72FF20B-D3EB-46A5-97F7-C99B2473A140', '3', N'ܳаʩHSEʦ', N'3314753D-E295-4D87-B938-E8C8EF5C17BC,66D2ECB4-2946-4C6E-8E4B-1C4CD096B8A5', '0', '1', '1', NULL, '0'); +INSERT INTO [dbo].[Sys_MenuFlowOperate] ([FlowOperateId], [MenuId], [FlowStep], [AuditFlowName], [RoleId], [IsFlowEnd], [GroupNum], [OrderNum], [IsSelfRole], [CanEndFlow]) VALUES (N'1D75313C-8C94-416B-84CE-37A41E376A76', N'F72FF20B-D3EB-46A5-97F7-C99B2473A140', '4', N'', NULL, '1', '1', '1', NULL, '1'); diff --git a/DataBase/版本日志/SGGLDB_CD_V2023-06-10-001.sql b/DataBase/版本日志/SGGLDB_CD_V2023-06-10-001.sql new file mode 100644 index 00000000..00f09f5f --- /dev/null +++ b/DataBase/版本日志/SGGLDB_CD_V2023-06-10-001.sql @@ -0,0 +1,504 @@ +Alter TABLE [dbo].[License_BreakGround]add + [RealWorkDepth] [nvarchar](50) NULL, + [SignatureUrl] [nvarchar](500) NULL, + [WatchMan] [nvarchar](50) NULL, + [WorkMan] [nvarchar](50) NULL, + [IdNum] [nvarchar](50) NULL + + + Alter TABLE [dbo].[License_FireWork]add + [FireMan] [nvarchar](50) NULL, + [AnalysisData] [nvarchar](50) NULL, + [SignatureUrl] [nvarchar](500) NULL + + Alter TABLE [dbo].[License_FlowOperate]add + [SignatureUrl] [nvarchar](500) NULL, + [CanEndFlow] [bit] NULL + + + Alter TABLE [dbo].[License_HeightWork]add + [SignatureUrl] [nvarchar](500) NULL, + [SafeMan] [nvarchar](50) NULL, + [WatchMan] [nvarchar](50) NULL, + [WorkMan] [nvarchar](50) NULL + + + + CREATE TABLE [dbo].[License_JiaBan]( + [JiaBanId] [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, + [WorkType] [nvarchar](50) NULL, + [SafeLeader] [nvarchar](50) NULL, + [Reason] [nvarchar](500) NULL, + [WorkLeader] [nvarchar](50) NULL, + [PeopleNum] [nvarchar](50) NULL, + [ElectricalMan] [nvarchar](50) NULL, + [ValidityStartTime] [datetime] NULL, + [ValidityEndTime] [datetime] NULL, + [WorkMeasures] [nvarchar](500) NULL, + [EquipmentTools] [nvarchar](100) 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, + [SignatureUrl] [nvarchar](500) NULL, + CONSTRAINT [PK_License_JiaBan] PRIMARY KEY CLUSTERED +( + [JiaBanId] 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 + + + +ALTER TABLE [dbo].[License_JiaBan] WITH CHECK ADD CONSTRAINT [FK_License_JiaBan_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[License_JiaBan] CHECK CONSTRAINT [FK_License_JiaBan_Base_Project] +GO + +ALTER TABLE [dbo].[License_JiaBan] WITH CHECK ADD CONSTRAINT [FK_License_JiaBan_Base_Unit] FOREIGN KEY([ApplyUnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[License_JiaBan] CHECK CONSTRAINT [FK_License_JiaBan_Base_Unit] +GO + +ALTER TABLE [dbo].[License_JiaBan] WITH CHECK ADD CONSTRAINT [FK_License_JiaBan_Sys_User] FOREIGN KEY([ApplyManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_JiaBan] CHECK CONSTRAINT [FK_License_JiaBan_Sys_User] +GO + +ALTER TABLE [dbo].[License_JiaBan] WITH CHECK ADD CONSTRAINT [FK_License_JiaBan_Sys_User2] FOREIGN KEY([CancelManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_JiaBan] CHECK CONSTRAINT [FK_License_JiaBan_Sys_User2] +GO + +ALTER TABLE [dbo].[License_JiaBan] WITH CHECK ADD CONSTRAINT [FK_License_JiaBan_Sys_User3] FOREIGN KEY([CloseManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_JiaBan] CHECK CONSTRAINT [FK_License_JiaBan_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_JiaBan', @level2type=N'COLUMN',@level2name=N'JiaBanId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_JiaBan', @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_JiaBan', @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_JiaBan', @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_JiaBan', @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_JiaBan', @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_JiaBan', @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_JiaBan', @level2type=N'COLUMN',@level2name=N'WorkType' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Чڿʼʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_JiaBan', @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_JiaBan', @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_JiaBan', @level2type=N'COLUMN',@level2name=N'WorkMeasures' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'豸' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_JiaBan', @level2type=N'COLUMN',@level2name=N'EquipmentTools' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȡID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_JiaBan', @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_JiaBan', @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_JiaBan', @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_JiaBan', @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_JiaBan', @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_JiaBan', @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_JiaBan', @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_JiaBan', @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_JiaBan', @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_JiaBan' +GO + + + + + Alter TABLE [dbo].[License_LicenseManager]add + [IsHighRisk] [bit] NULL + + Alter TABLE [dbo].[License_LiftingWork]add + [SignatureUrl] [nvarchar](500) NULL, + [SafeMan] [nvarchar](50) NULL, + [ControlMan] [nvarchar](50) NULL, + [DriverMan] [nvarchar](50) NULL, + [CarNum] [nvarchar](50) NULL, + [OtherMan] [nvarchar](50) NULL, + [WatchMan] [nvarchar](50) NULL + + + Alter TABLE [dbo].[License_LimitedSpace]add + [SignatureUrl] [nvarchar](500) NULL, + [O2Density] [nvarchar](50) NULL, + [ManAndDate] [nvarchar](50) NULL, + [ResponsibleManPhone] [nvarchar](50) NULL, + [WorkMan] [nvarchar](100) NULL, + [Tools] [nvarchar](200) NULL + + + Alter TABLE [dbo].[License_NightWork]add + [SignatureUrl] [nvarchar](500) NULL + + Alter TABLE [dbo].[License_OpenCircuit]add + [SignatureUrl] [nvarchar](500) NULL, + [WatchMan] [nvarchar](50) NULL + + + + +CREATE TABLE [dbo].[License_PressureTest]( + [PressureTestId] [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, + [WatchManId] [nvarchar](50) NULL, + [ValidityStartTime] [datetime] NULL, + [ValidityEndTime] [datetime] NULL, + [WorkContent] [nvarchar](500) NULL, + [PressureAndType] [nvarchar](50) 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, + [WatchManName] [nvarchar](50) NULL, + [OldLicenseId] [nvarchar](50) NULL, + [SignatureUrl] [nvarchar](500) NULL, + CONSTRAINT [PK_License_PressureTest] PRIMARY KEY CLUSTERED +( + [PressureTestId] 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 + + + +ALTER TABLE [dbo].[License_PressureTest] WITH CHECK ADD CONSTRAINT [FK_License_PressureTest_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[License_PressureTest] CHECK CONSTRAINT [FK_License_PressureTest_Base_Project] +GO + +ALTER TABLE [dbo].[License_PressureTest] WITH CHECK ADD CONSTRAINT [FK_License_PressureTest_Base_Unit] FOREIGN KEY([ApplyUnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[License_PressureTest] CHECK CONSTRAINT [FK_License_PressureTest_Base_Unit] +GO + +ALTER TABLE [dbo].[License_PressureTest] WITH CHECK ADD CONSTRAINT [FK_License_PressureTest_Sys_User] FOREIGN KEY([ApplyManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_PressureTest] CHECK CONSTRAINT [FK_License_PressureTest_Sys_User] +GO + +ALTER TABLE [dbo].[License_PressureTest] WITH CHECK ADD CONSTRAINT [FK_License_PressureTest_Sys_User1] FOREIGN KEY([WatchManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_PressureTest] CHECK CONSTRAINT [FK_License_PressureTest_Sys_User1] +GO + +ALTER TABLE [dbo].[License_PressureTest] WITH CHECK ADD CONSTRAINT [FK_License_PressureTest_Sys_User2] FOREIGN KEY([CancelManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_PressureTest] CHECK CONSTRAINT [FK_License_PressureTest_Sys_User2] +GO + +ALTER TABLE [dbo].[License_PressureTest] WITH CHECK ADD CONSTRAINT [FK_License_PressureTest_Sys_User3] FOREIGN KEY([CloseManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_PressureTest] CHECK CONSTRAINT [FK_License_PressureTest_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_PressureTest', @level2type=N'COLUMN',@level2name=N'PressureTestId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_PressureTest', @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_PressureTest', @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_PressureTest', @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_PressureTest', @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_PressureTest', @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_PressureTest', @level2type=N'COLUMN',@level2name=N'WorkPalce' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'໤ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_PressureTest', @level2type=N'COLUMN',@level2name=N'WatchManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Чڿʼʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_PressureTest', @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_PressureTest', @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_PressureTest', @level2type=N'COLUMN',@level2name=N'WorkContent' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȡID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_PressureTest', @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_PressureTest', @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_PressureTest', @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_PressureTest', @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_PressureTest', @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_PressureTest', @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_PressureTest', @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_PressureTest', @level2type=N'COLUMN',@level2name=N'NextManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'໤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_PressureTest', @level2type=N'COLUMN',@level2name=N'WatchManName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ԭ֤ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_PressureTest', @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_PressureTest' +GO + + + +Alter TABLE [dbo].[License_RadialWork]add + [SignatureUrl] [nvarchar](500) NULL, + [WorkMan1] [nvarchar](50) NULL, + [WorkMan2] [nvarchar](50) NULL, + [WorkMan3] [nvarchar](50) NULL, + [WorkManCard1] [nvarchar](50) NULL, + [WorkManCard2] [nvarchar](50) NULL, + [WorkManCard3] [nvarchar](50) NULL, + [SafeDistance] [nvarchar](50) NULL + + + + + + + +CREATE TABLE [dbo].[License_TempElectricity]( + [TempElectricityId] [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, + [WatchManId] [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, + [WatchManName] [nvarchar](50) NULL, + [OldLicenseId] [nvarchar](50) NULL, + [SignatureUrl] [nvarchar](500) NULL, + [Electrician] [nvarchar](50) NULL, + [Tools] [nvarchar](50) NULL, + CONSTRAINT [PK_License_TempElectricity] PRIMARY KEY CLUSTERED +( + [TempElectricityId] 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 + + + +ALTER TABLE [dbo].[License_TempElectricity] WITH CHECK ADD CONSTRAINT [FK_License_TempElectricity_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[License_TempElectricity] CHECK CONSTRAINT [FK_License_TempElectricity_Base_Project] +GO + +ALTER TABLE [dbo].[License_TempElectricity] WITH CHECK ADD CONSTRAINT [FK_License_TempElectricity_Base_Unit] FOREIGN KEY([ApplyUnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[License_TempElectricity] CHECK CONSTRAINT [FK_License_TempElectricity_Base_Unit] +GO + +ALTER TABLE [dbo].[License_TempElectricity] WITH CHECK ADD CONSTRAINT [FK_License_TempElectricity_Sys_User] FOREIGN KEY([ApplyManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_TempElectricity] CHECK CONSTRAINT [FK_License_TempElectricity_Sys_User] +GO + +ALTER TABLE [dbo].[License_TempElectricity] WITH CHECK ADD CONSTRAINT [FK_License_TempElectricity_Sys_User1] FOREIGN KEY([WatchManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_TempElectricity] CHECK CONSTRAINT [FK_License_TempElectricity_Sys_User1] +GO + +ALTER TABLE [dbo].[License_TempElectricity] WITH CHECK ADD CONSTRAINT [FK_License_TempElectricity_Sys_User2] FOREIGN KEY([CancelManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_TempElectricity] CHECK CONSTRAINT [FK_License_TempElectricity_Sys_User2] +GO + +ALTER TABLE [dbo].[License_TempElectricity] WITH CHECK ADD CONSTRAINT [FK_License_TempElectricity_Sys_User3] FOREIGN KEY([CloseManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_TempElectricity] CHECK CONSTRAINT [FK_License_TempElectricity_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_TempElectricity', @level2type=N'COLUMN',@level2name=N'TempElectricityId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_TempElectricity', @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_TempElectricity', @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_TempElectricity', @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_TempElectricity', @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_TempElectricity', @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_TempElectricity', @level2type=N'COLUMN',@level2name=N'WorkPalce' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'໤ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_TempElectricity', @level2type=N'COLUMN',@level2name=N'WatchManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Чڿʼʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_TempElectricity', @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_TempElectricity', @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_TempElectricity', @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_TempElectricity', @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_TempElectricity', @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_TempElectricity', @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_TempElectricity', @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_TempElectricity', @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_TempElectricity', @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_TempElectricity', @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_TempElectricity', @level2type=N'COLUMN',@level2name=N'NextManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'໤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_TempElectricity', @level2type=N'COLUMN',@level2name=N'WatchManName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ԭ֤ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_TempElectricity', @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_TempElectricity' +GO + + diff --git a/SGGL/BLL/API/HSSE/APILicenseDataService.cs b/SGGL/BLL/API/HSSE/APILicenseDataService.cs index 7fdf47f4..0aeebd14 100644 --- a/SGGL/BLL/API/HSSE/APILicenseDataService.cs +++ b/SGGL/BLL/API/HSSE/APILicenseDataService.cs @@ -57,7 +57,10 @@ namespace BLL NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName, AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.FireWorkId).AttachUrl.Replace('\\', '/'), States = x.States, + WorkMan = x.FireMan, + AnalysisData = x.AnalysisData, OldLicenseId = x.OldLicenseId, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -95,7 +98,11 @@ namespace BLL NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName, AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.HeightWorkId).AttachUrl.Replace('\\', '/'), States = x.States, + SafeMan = x.SafeMan, + WorkMan = x.WorkMan, + WatchMan = x.WatchMan, OldLicenseId = x.OldLicenseId, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -134,6 +141,7 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.LimitedSpaceId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -177,6 +185,14 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.RadialWorkId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + SafeDistance = x.SafeDistance, + WorkMan1 = x.WorkMan1, + WorkMan2 = x.WorkMan2, + WorkMan3 = x.WorkMan3, + WorkManCard1 = x.WorkManCard1, + WorkManCard2 = x.WorkManCard2, + WorkManCard3 = x.WorkManCard3, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -215,6 +231,8 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.OpenCircuitId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + WatchMan = x.WatchMan, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -236,6 +254,7 @@ namespace BLL ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate), WorkPalce = x.WorkPalce, WorkDepth = x.WorkDepth, + RealWorkDepth = x.RealWorkDepth, 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, @@ -252,6 +271,7 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.BreakGroundId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion @@ -294,6 +314,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,9 +353,138 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.LiftingWorkId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + SafeMan = x.SafeMan, + SafeLeader = x.ControlMan, + WorkMan = x.DriverMan, + CarNum = x.CarNum, + OtherMan = x.OtherMan, + WatchMan = x.WatchMan, + SignatureUrl = x.SignatureUrl }).FirstOrDefault(); } #endregion + #region 临电作业票 + if (strMenuId == Const.ProjectTempElectricityMenuId) + { + getInfo = (from x in db.License_TempElectricity + where x.TempElectricityId == id + select new Model.LicenseDataItem + { + LicenseId = x.TempElectricityId, + 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, + FireWatchManId = x.WatchManId, + FireWatchManName = x.WatchManName, + 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.TempElectricityId).AttachUrl.Replace('\\', '/'), + States = x.States, + OldLicenseId = x.OldLicenseId, + SignatureUrl = x.SignatureUrl, + Electrician = x.Electrician, + Tools = x.Tools + }).FirstOrDefault(); + } + #endregion + #region 试压作业票 + if (strMenuId == Const.ProjectPressureTestMenuId) + { + getInfo = (from x in db.License_PressureTest + where x.PressureTestId == id + select new Model.LicenseDataItem + { + LicenseId = x.PressureTestId, + 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, + FireWatchManId = x.WatchManId, + FireWatchManName = x.WatchManName, + ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), + ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + WorkMeasures = x.WorkContent, + PressureAndType = x.PressureAndType, + 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.PressureTestId).AttachUrl.Replace('\\', '/'), + States = x.States, + OldLicenseId = x.OldLicenseId, + SignatureUrl = x.SignatureUrl + }).FirstOrDefault(); + } + #endregion + #region 加班作业票 + else if (strMenuId == Const.ProjectJiaBanWorkMenuId) + { + getInfo = (from x in db.License_JiaBan + where x.JiaBanId == id + orderby x.LicenseCode descending + select new Model.LicenseDataItem + { + LicenseId = x.JiaBanId, + 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, + Reason = x.Reason, + SafeLeader = x.SafeLeader, + WorkLeader = x.WorkLeader, + PeopleNum = x.PeopleNum, + ElectricalMan = x.ElectricalMan, + 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, + EquipmentTools = x.EquipmentTools, + 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), + SignatureUrl = x.SignatureUrl, + States = x.States, + }).FirstOrDefault(); + } + #endregion + #region 作业票【定稿】 if (strMenuId == Const.ProjectLicenseManagerMenuId) @@ -418,6 +568,7 @@ namespace BLL 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), + SignatureUrl = x.SignatureUrl, States = x.States, }).ToList(); } @@ -454,6 +605,7 @@ namespace BLL 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), + SignatureUrl = x.SignatureUrl, States = x.States, }).ToList(); } @@ -486,6 +638,7 @@ namespace BLL 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), + SignatureUrl = x.SignatureUrl, CloseManId = x.CloseManId, CloseManName = db.Sys_User.First(u => u.UserId == x.CloseManId).UserName, CloseReasons = x.CloseReasons, @@ -527,12 +680,20 @@ namespace BLL 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), + SignatureUrl = x.SignatureUrl, 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, + SafeDistance = x.SafeDistance, + WorkMan1 = x.WorkMan1, + WorkMan2 = x.WorkMan2, + WorkMan3 = x.WorkMan3, + WorkManCard1 = x.WorkManCard1, + WorkManCard2 = x.WorkManCard2, + WorkManCard3 = x.WorkManCard3, States = x.States, }).ToList(); } @@ -567,6 +728,7 @@ namespace BLL 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, + SignatureUrl = x.SignatureUrl, CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, @@ -593,6 +755,7 @@ namespace BLL ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate), WorkPalce = x.WorkPalce, WorkDepth = x.WorkDepth, + RealWorkDepth = x.RealWorkDepth, 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, @@ -603,6 +766,7 @@ namespace BLL CloseManId = x.CloseManId, CloseManName = db.Sys_User.First(u => u.UserId == x.CloseManId).UserName, CloseReasons = x.CloseReasons, + SignatureUrl = x.SignatureUrl, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, }).ToList(); @@ -645,6 +809,7 @@ namespace BLL CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), NextManId = x.NextManId, + SignatureUrl = x.SignatureUrl, NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName, States = x.States, }).ToList(); @@ -685,41 +850,160 @@ namespace BLL NextManId = x.NextManId, NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName, States = x.States, + SignatureUrl = x.SignatureUrl + }).ToList(); } #endregion - - #region 作业票 【定稿】"待开工"="1";"作业中"="2";"已关闭"="3";"已取消"="-1" - if (strMenuId == Const.ProjectLicenseManagerMenuId) + #region 临电作业票 + else if (strMenuId == Const.ProjectTempElectricityMenuId) { - getInfoList=(from x in db.License_LicenseManager + getInfoList = (from x in db.License_TempElectricity + where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) + && (states == null || x.States == states) + orderby x.LicenseCode descending + select new Model.LicenseDataItem + { + LicenseId = x.TempElectricityId, + 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, + FireWatchManId = x.WatchManId, + FireWatchManName = x.WatchManName, + 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, + Tools = x.Tools, + SignatureUrl = x.SignatureUrl, + Electrician = x.Electrician + }).ToList(); + } + #endregion + #region 试压作业票 + else if (strMenuId == Const.ProjectPressureTestMenuId) + { + getInfoList = (from x in db.License_PressureTest + where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) + && (states == null || x.States == states) + orderby x.LicenseCode descending + select new Model.LicenseDataItem + { + LicenseId = x.PressureTestId, + 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, + FireWatchManId = x.WatchManId, + FireWatchManName = x.WatchManName, + ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), + ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + WorkMeasures = x.WorkContent, + PressureAndType = x.PressureAndType, + 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, + SignatureUrl = x.SignatureUrl, + CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), + States = x.States + }).ToList(); + } + #endregion + #region 加班作业票 + else if (strMenuId == Const.ProjectJiaBanWorkMenuId) + { + getInfoList = (from x in db.License_JiaBan + where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) + && (states == null || x.States == states) + orderby x.LicenseCode descending + select new Model.LicenseDataItem + { + LicenseId = x.JiaBanId, + 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, + Reason = x.Reason, + SafeLeader = x.SafeLeader, + WorkLeader = x.WorkLeader, + PeopleNum = x.PeopleNum, + ElectricalMan = x.ElectricalMan, + 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, + EquipmentTools = x.EquipmentTools, + 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), + SignatureUrl = x.SignatureUrl, + States = x.States, + }).ToList(); + } + #endregion + #region 作业票 【定稿】"待开工"="1";"作业中"="2";"已关闭"="3";"已取消"="-1" + else if (strMenuId == Const.ProjectLicenseManagerMenuId) + { + getInfoList = (from x in db.License_LicenseManager where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null) && (states == null || x.WorkStates == states || (states == "1" && (x.WorkStates == "1" || x.WorkStates == "0"))) - orderby x.StartDate - select new Model.LicenseDataItem - { - LicenseId = x.LicenseManagerId, - MenuId = Const.ProjectLicenseManagerMenuId, - MenuName = db.Base_LicenseType.FirstOrDefault(y => y.LicenseTypeId == x.LicenseTypeId).LicenseTypeName, - LicenseTypeId = x.LicenseTypeId, - ProjectId = x.ProjectId, - LicenseCode = x.LicenseManagerCode, - ApplyUnitId = x.UnitId, - ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName, - ApplyManId = x.CompileMan, - ApplyManName = x.ApplicantMan, - ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate), - WorkPalce = UnitWorkService.GetUnitWorkName(x.WorkAreaId), - ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.StartDate), - ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.EndDate), - States = x.WorkStates, + orderby x.StartDate + select new Model.LicenseDataItem + { + LicenseId = x.LicenseManagerId, + MenuId = Const.ProjectLicenseManagerMenuId, + MenuName = db.Base_LicenseType.FirstOrDefault(y => y.LicenseTypeId == x.LicenseTypeId).LicenseTypeName, + LicenseTypeId = x.LicenseTypeId, + ProjectId = x.ProjectId, + LicenseCode = x.LicenseManagerCode, + ApplyUnitId = x.UnitId, + ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName, + ApplyManId = x.CompileMan, + ApplyManName = x.ApplicantMan, + ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.CompileDate), + WorkPalce = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.StartDate), + ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.EndDate), + States = x.WorkStates, + + AttachUrl = APIUpLoadFileService.getFileUrl(x.LicenseManagerId, null), + }).ToList(); - AttachUrl = APIUpLoadFileService.getFileUrl(x.LicenseManagerId, null), - }).ToList(); - } #endregion @@ -731,21 +1015,13 @@ namespace BLL #region 获取作业票列表信息-按状态 /// - /// - /// - public static int getLicenseDataStatesCount - { - get; - set; - } - /// /// 获取作业票列表信息-按状态 /// /// /// /// /// - public static List getLicenseDataListByStates(string projectId, string unitId, string states, int pageIndex) + public static List getLicenseDataListByStates(string projectId, string unitId, string states) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { @@ -753,7 +1029,8 @@ namespace BLL { unitId = null; } - IEnumerable getInfoList = null; + List getInfoList = new List(); + #region 动火作业票 var getFireWork = (from x in db.License_FireWork where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) @@ -773,9 +1050,15 @@ namespace BLL WorkPalce = x.WorkPalce, ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + SignatureUrl = x.SignatureUrl, States = x.States, - }); + }).ToList(); + if (getFireWork.Count() > 0) + { + getInfoList.AddRange(getFireWork); + } #endregion + #region 高处作业票 var getHeightWork = (from x in db.License_HeightWork where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) @@ -796,9 +1079,15 @@ namespace BLL WorkType = x.WorkType, ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + SignatureUrl = x.SignatureUrl, States = x.States, - }); + }).ToList(); + if (getHeightWork.Count() > 0) + { + getInfoList.AddRange(getHeightWork); + } #endregion + #region 受限空间作业票 var getLimitedSpace = (from x in db.License_LimitedSpace where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) @@ -818,9 +1107,15 @@ namespace BLL WorkPalce = x.WorkPalce, ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + SignatureUrl = x.SignatureUrl, States = x.States, - }); + }).ToList(); + if (getLimitedSpace.Count() > 0) + { + getInfoList.AddRange(getLimitedSpace); + } #endregion + #region 射线作业票 var getRadialWork = (from x in db.License_RadialWork where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) @@ -841,9 +1136,22 @@ namespace BLL 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, + SignatureUrl = x.SignatureUrl, + SafeDistance = x.SafeDistance, + WorkMan1 = x.WorkMan1, + WorkMan2 = x.WorkMan2, + WorkMan3 = x.WorkMan3, + WorkManCard1 = x.WorkManCard1, + WorkManCard2 = x.WorkManCard2, + WorkManCard3 = x.WorkManCard3, States = x.States, - }); + }).ToList(); + if (getRadialWork.Count() > 0) + { + getInfoList.AddRange(getRadialWork); + } #endregion + #region 断路(占道)作业票 var getOpenCircuit = (from x in db.License_OpenCircuit where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) @@ -864,10 +1172,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), RoadName = x.RoadName, + SignatureUrl = x.SignatureUrl, States = x.States, - }); - + }).ToList(); + if (getOpenCircuit.Count() > 0) + { + getInfoList.AddRange(getOpenCircuit); + } #endregion + #region 动土作业票 var getBreakGround = (from x in db.License_BreakGround where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) @@ -886,11 +1199,18 @@ namespace BLL ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate), WorkPalce = x.WorkPalce, WorkDepth = x.WorkDepth, + RealWorkDepth = x.RealWorkDepth, ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + SignatureUrl = x.SignatureUrl, States = x.States, - }); + }).ToList(); + if (getBreakGround.Count() > 0) + { + getInfoList.AddRange(getBreakGround); + } #endregion + #region 夜间作业票 var getNightWork = (from x in db.License_NightWork where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) @@ -910,10 +1230,15 @@ namespace BLL WorkPalce = x.WorkPalce, ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + SignatureUrl = x.SignatureUrl, States = x.States, - }); - + }).ToList(); + if (getNightWork.Count() > 0) + { + getInfoList.AddRange(getNightWork); + } #endregion + #region 吊装作业票 var getLiftingWork = (from x in db.License_LiftingWork where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) @@ -934,10 +1259,115 @@ namespace BLL WorkLevel = x.WorkLevel, ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + SignatureUrl = x.SignatureUrl, States = x.States, - }); - + }).ToList(); + if (getLiftingWork.Count() > 0) + { + getInfoList.AddRange(getLiftingWork); + } #endregion + + #region 临电作业票 + var getTempElectricity = (from x in db.License_TempElectricity + where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) + && (states == null || x.States == states) + select new Model.LicenseDataItem + { + LicenseId = x.TempElectricityId, + MenuId = Const.ProjectFireWorkMenuId, + 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, + ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), + ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + SignatureUrl = x.SignatureUrl, + States = x.States, + }).ToList(); + if (getFireWork.Count() > 0) + { + getInfoList.AddRange(getFireWork); + } + #endregion + + #region 试压作业票 + var getPressureTest = (from x in db.License_PressureTest + where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) + && (states == null || x.States == states) + select new Model.LicenseDataItem + { + LicenseId = x.PressureTestId, + MenuId = Const.ProjectFireWorkMenuId, + 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, + ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), + ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + SignatureUrl = x.SignatureUrl, + States = x.States, + }).ToList(); + if (getPressureTest.Count() > 0) + { + getInfoList.AddRange(getPressureTest); + } + #endregion + + #region 加班作业票 + + var getJiaBanList = (from x in db.License_JiaBan + where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) + && (states == null || x.States == states) + orderby x.LicenseCode descending + select new Model.LicenseDataItem + { + LicenseId = x.JiaBanId, + MenuId = Const.ProjectJiaBanWorkMenuId, + 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, + Reason = x.Reason, + SafeLeader = x.SafeLeader, + WorkLeader = x.WorkLeader, + PeopleNum = x.PeopleNum, + ElectricalMan = x.ElectricalMan, + 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, + EquipmentTools = x.EquipmentTools, + 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), + SignatureUrl = x.SignatureUrl, + States = x.States, + }).ToList(); + if (getJiaBanList.Count() > 0) + { + getInfoList.AddRange(getJiaBanList); + } + #endregion + #region 作业票【定稿 】"待开工"="1";"作业中"="2";"已关闭"="3";"已取消"="-1" var getLicenseManager = (from x in db.License_LicenseManager where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null) @@ -959,127 +1389,14 @@ namespace BLL ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.EndDate), States = x.WorkStates, AttachUrl = APIUpLoadFileService.getFileUrl(x.LicenseManagerId, null), - }); - #endregion - - #region 合集 - if (getFireWork.Count() > 0) - { - if (getInfoList == null) - { - getInfoList = getFireWork; - } - else - { - getInfoList = getInfoList.Union(getFireWork); - } - } - if (getHeightWork.Count() > 0) - { - if (getInfoList == null) - { - getInfoList = getHeightWork; - } - else - { - getInfoList = getInfoList.Union(getHeightWork); - } - } - if (getLimitedSpace.Count() > 0) - { - if (getInfoList == null) - { - getInfoList = getLimitedSpace; - } - else - { - getInfoList = getInfoList.Union(getLimitedSpace); - } - } - if (getRadialWork.Count() > 0) - { - if (getInfoList == null) - { - getInfoList = getRadialWork; - } - else - { - getInfoList = getInfoList.Union(getRadialWork); - } - } - if (getOpenCircuit.Count() > 0) - { - if (getInfoList == null) - { - getInfoList = getOpenCircuit; - } - else - { - getInfoList = getInfoList.Union(getOpenCircuit); - } - } - if (getBreakGround.Count() > 0) - { - if (getInfoList == null) - { - getInfoList = getBreakGround; - } - else - { - getInfoList = getInfoList.Union(getBreakGround); - } - } - if (getNightWork.Count() > 0) - { - if (getInfoList == null) - { - getInfoList = getNightWork; - } - else - { - getInfoList = getInfoList.Union(getNightWork); - } - } - if (getLiftingWork.Count() > 0) - { - if (getInfoList == null) - { - getInfoList = getLiftingWork; - } - else - { - getInfoList = getInfoList.Union(getLiftingWork); - } - } + }).ToList(); if (getLicenseManager.Count() > 0) { - if (getInfoList == null) - { - getInfoList = getLicenseManager; - } - else - { - getInfoList = getInfoList.Union(getLicenseManager); - } + getInfoList.AddRange(getLicenseManager); } #endregion - if (getInfoList == null || getInfoList.Count() == 0) - { - getLicenseDataStatesCount = 0; - return null; - } - else - { - getLicenseDataStatesCount = getInfoList.Count(); - if (pageIndex > 0) - { - return getInfoList.OrderByDescending(x => x.ValidityStartTime).Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList(); - } - else - { - return getInfoList.ToList(); - } - } + + return getInfoList.OrderByDescending(x => x.ValidityStartTime).ToList(); } } #endregion @@ -1139,8 +1456,9 @@ namespace BLL IsAgree = x.IsAgree, Opinion = x.Opinion, IsFlowEnd = x.IsFlowEnd ?? false, + SignatureUrl = x.SignatureUrl, AttachUrl = AttachFileService.getFileUrl(x.FlowOperateId) - }).ToList(); + }).ToList(); return getInfoList; } @@ -1196,7 +1514,10 @@ namespace BLL CloseReasons = newItem.CloseReasons, CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, + FireMan = newItem.WorkMan, + AnalysisData = newItem.AnalysisData, States = newItem.States, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) @@ -1210,7 +1531,7 @@ namespace BLL newFireWork.ApplyDate = DateTime.Now; strLicenseId = newFireWork.FireWorkId = SQLHelper.GetNewID(); newFireWork.OldLicenseId = newItem.OldLicenseId; - newItem.LicenseCode=newFireWork.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectFireWorkMenuId, newFireWork.ProjectId, newFireWork.ApplyUnitId); + newItem.LicenseCode = newFireWork.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectFireWorkMenuId, newFireWork.ProjectId, newFireWork.ApplyUnitId); db.License_FireWork.InsertOnSubmit(newFireWork); ////增加一条编码记录 CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectFireWorkMenuId, newFireWork.ProjectId, newFireWork.ApplyUnitId, newFireWork.FireWorkId, newFireWork.ApplyDate); @@ -1247,6 +1568,7 @@ namespace BLL updateFireWork.WorkMeasures = newFireWork.WorkMeasures; updateFireWork.NextManId = newFireWork.NextManId; updateFireWork.States = newFireWork.States; + updateFireWork.SignatureUrl = newFireWork.SignatureUrl; } updateFireWork.States = newFireWork.States; } @@ -1277,6 +1599,10 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + SafeMan = newItem.SafeMan, + WatchMan = newItem.WatchMan, + WorkMan = newItem.WorkMan, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) { @@ -1289,7 +1615,7 @@ namespace BLL newHeightWork.ApplyDate = DateTime.Now; strLicenseId = newHeightWork.HeightWorkId = SQLHelper.GetNewID(); newHeightWork.OldLicenseId = newItem.OldLicenseId; - newItem.LicenseCode= newHeightWork.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectHeightWorkMenuId, newHeightWork.ProjectId, newHeightWork.ApplyUnitId); + newItem.LicenseCode = newHeightWork.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectHeightWorkMenuId, newHeightWork.ProjectId, newHeightWork.ApplyUnitId); db.License_HeightWork.InsertOnSubmit(newHeightWork); ////增加一条编码记录 @@ -1327,6 +1653,8 @@ namespace BLL updateHeightWork.EquipmentTools = newHeightWork.EquipmentTools; updateHeightWork.NextManId = newHeightWork.NextManId; updateHeightWork.States = newHeightWork.States; + updateHeightWork.SignatureUrl = newHeightWork.SignatureUrl; + } updateHeightWork.States = newHeightWork.States; } @@ -1357,6 +1685,7 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) { @@ -1406,6 +1735,7 @@ namespace BLL updateLimitedSpace.WorkMeasures = newLimitedSpace.WorkMeasures; updateLimitedSpace.NextManId = newLimitedSpace.NextManId; updateLimitedSpace.States = newLimitedSpace.States; + updateLimitedSpace.SignatureUrl = newLimitedSpace.SignatureUrl; } updateLimitedSpace.States = newLimitedSpace.States; } @@ -1439,6 +1769,14 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + WorkMan1 = newItem.WorkMan1, + WorkMan2 = newItem.WorkMan2, + WorkMan3 = newItem.WorkMan3, + WorkManCard1 = newItem.WorkManCard1, + WorkManCard2 = newItem.WorkManCard2, + WorkManCard3 = newItem.WorkManCard3, + SafeDistance = newItem.SafeDistance, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) { @@ -1491,6 +1829,7 @@ namespace BLL updateRadialWork.WatchManContact = newRadialWork.WatchManContact; updateRadialWork.NextManId = newRadialWork.NextManId; updateRadialWork.States = newRadialWork.States; + updateRadialWork.SignatureUrl = newRadialWork.SignatureUrl; } updateRadialWork.States = newRadialWork.States; } @@ -1521,6 +1860,8 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + WatchMan = newItem.WatchMan, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) { @@ -1570,6 +1911,7 @@ namespace BLL updateOpenCircuit.SafeMeasures = newOpenCircuit.SafeMeasures; updateOpenCircuit.NextManId = newOpenCircuit.NextManId; updateOpenCircuit.States = newOpenCircuit.States; + updateOpenCircuit.SignatureUrl = newOpenCircuit.SignatureUrl; } updateOpenCircuit.States = newOpenCircuit.States; } @@ -1588,6 +1930,7 @@ namespace BLL ApplyDate = Funs.GetNewDateTime(newItem.ApplyDate), WorkPalce = newItem.WorkPalce, WorkDepth = newItem.WorkDepth, + RealWorkDepth = newItem.RealWorkDepth, ValidityStartTime = Funs.GetNewDateTime(newItem.ValidityStartTime), ValidityEndTime = Funs.GetNewDateTime(newItem.ValidityEndTime), WorkMeasures = newItem.WorkMeasures, @@ -1599,6 +1942,7 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) { @@ -1647,6 +1991,7 @@ namespace BLL updateBreakGround.WorkMeasures = newBreakGround.WorkMeasures; updateBreakGround.NextManId = newBreakGround.NextManId; updateBreakGround.States = newBreakGround.States; + updateBreakGround.SignatureUrl = newBreakGround.SignatureUrl; } updateBreakGround.States = newBreakGround.States; } @@ -1679,6 +2024,7 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) { @@ -1730,6 +2076,8 @@ namespace BLL updateNightWork.SafeLeaderTel = newItem.SafeLeaderTel; updateNightWork.NextManId = newNightWork.NextManId; updateNightWork.States = newNightWork.States; + updateNightWork.SignatureUrl = updateNightWork.SignatureUrl; + } updateNightWork.States = newNightWork.States; } @@ -1760,6 +2108,13 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + SafeMan = newItem.SafeMan, + ControlMan = newItem.SafeLeader, + DriverMan = newItem.WorkMan, + CarNum = newItem.CarNum, + OtherMan = newItem.OtherMan, + WatchMan = newItem.WatchMan, + SignatureUrl = newItem.SignatureUrl }; if (newItem.States == Const.State_0) { @@ -1809,12 +2164,275 @@ namespace BLL updateLiftingWork.CraneCapacity = newLiftingWork.CraneCapacity; updateLiftingWork.NextManId = newLiftingWork.NextManId; updateLiftingWork.States = newLiftingWork.States; + updateLiftingWork.SignatureUrl = newLiftingWork.SignatureUrl; } updateLiftingWork.States = newLiftingWork.States; } } #endregion + #region 临电作业票 + if (newItem.MenuId == Const.ProjectTempElectricityMenuId) + { + Model.License_TempElectricity newTempElectricity = new Model.License_TempElectricity + { + TempElectricityId = strLicenseId, + ProjectId = projectId, + LicenseCode = newItem.LicenseCode, + ApplyUnitId = newItem.ApplyUnitId, + ApplyManId = newItem.ApplyManId, + ApplyDate = Funs.GetNewDateTime(newItem.ApplyDate), + WorkPalce = newItem.WorkPalce, + WatchManId = newItem.FireWatchManId, + WatchManName = newItem.FireWatchManName, + 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, + Electrician = newItem.Electrician, + Tools = newItem.Tools, + SignatureUrl = newItem.SignatureUrl + }; + if (newItem.States == Const.State_0) + { + newTempElectricity.NextManId = newItem.ApplyManId; + } + ////保存 + var updateTempElectricity = db.License_TempElectricity.FirstOrDefault(x => x.TempElectricityId == strLicenseId); + if (updateTempElectricity == null) + { + newTempElectricity.ApplyDate = DateTime.Now; + strLicenseId = newTempElectricity.TempElectricityId = SQLHelper.GetNewID(); + newTempElectricity.OldLicenseId = newItem.OldLicenseId; + newItem.LicenseCode = newTempElectricity.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectTempElectricityMenuId, newTempElectricity.ProjectId, newTempElectricity.ApplyUnitId); + db.License_TempElectricity.InsertOnSubmit(newTempElectricity); + ////增加一条编码记录 + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTempElectricityMenuId, newTempElectricity.ProjectId, newTempElectricity.ApplyUnitId, newTempElectricity.TempElectricityId, newTempElectricity.ApplyDate); + } + else + { + if (newItem.States == Const.State_3) + { + updateTempElectricity.CloseManId = newTempElectricity.CloseManId; + updateTempElectricity.CloseReasons = newTempElectricity.CloseReasons; + updateTempElectricity.CloseTime = DateTime.Now; + if (newTempElectricity.ValidityEndTime.HasValue && newTempElectricity.ValidityEndTime < DateTime.Now) + { + updateTempElectricity.CloseTime = newTempElectricity.ValidityEndTime; + } + } + else if (newItem.States == Const.State_R) + { + updateTempElectricity.CancelManId = newTempElectricity.CancelManId; + updateTempElectricity.CancelReasons = newTempElectricity.CancelReasons; + updateTempElectricity.CancelTime = DateTime.Now; + if (newTempElectricity.ValidityEndTime.HasValue && newTempElectricity.ValidityEndTime < DateTime.Now) + { + updateTempElectricity.CancelTime = newTempElectricity.ValidityEndTime; + } + } + else + { + updateTempElectricity.WorkPalce = newTempElectricity.WorkPalce; + updateTempElectricity.WatchManId = newTempElectricity.WatchManId; + updateTempElectricity.WatchManName = newTempElectricity.WatchManName; + updateTempElectricity.ValidityStartTime = newTempElectricity.ValidityStartTime; + updateTempElectricity.ValidityEndTime = newTempElectricity.ValidityEndTime; + updateTempElectricity.WorkMeasures = newTempElectricity.WorkMeasures; + updateTempElectricity.Tools = newTempElectricity.Tools; + updateTempElectricity.Electrician = newTempElectricity.Electrician; + updateTempElectricity.NextManId = newTempElectricity.NextManId; + updateTempElectricity.States = newTempElectricity.States; + updateTempElectricity.SignatureUrl = newTempElectricity.SignatureUrl; + } + updateTempElectricity.States = newTempElectricity.States; + } + } + #endregion + #region 试压作业票 + if (newItem.MenuId == Const.ProjectPressureTestMenuId) + { + Model.License_PressureTest newPressureTest = new Model.License_PressureTest + { + PressureTestId = strLicenseId, + ProjectId = projectId, + LicenseCode = newItem.LicenseCode, + ApplyUnitId = newItem.ApplyUnitId, + ApplyManId = newItem.ApplyManId, + ApplyDate = Funs.GetNewDateTime(newItem.ApplyDate), + WorkPalce = newItem.WorkPalce, + WatchManId = newItem.FireWatchManId, + WatchManName = newItem.FireWatchManName, + ValidityStartTime = Funs.GetNewDateTime(newItem.ValidityStartTime), + ValidityEndTime = Funs.GetNewDateTime(newItem.ValidityEndTime), + WorkContent = newItem.WorkMeasures, + PressureAndType = newItem.PressureAndType, + 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, + SignatureUrl = newItem.SignatureUrl + }; + + if (newItem.States == Const.State_0) + { + newPressureTest.NextManId = newItem.ApplyManId; + } + ////保存 + var updatePressureTest = db.License_PressureTest.FirstOrDefault(x => x.PressureTestId == strLicenseId); + if (updatePressureTest == null) + { + newPressureTest.ApplyDate = DateTime.Now; + strLicenseId = newPressureTest.PressureTestId = SQLHelper.GetNewID(); + newPressureTest.OldLicenseId = newItem.OldLicenseId; + newItem.LicenseCode = newPressureTest.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectPressureTestMenuId, newPressureTest.ProjectId, newPressureTest.ApplyUnitId); + db.License_PressureTest.InsertOnSubmit(newPressureTest); + ////增加一条编码记录 + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTempElectricityMenuId, newPressureTest.ProjectId, newPressureTest.ApplyUnitId, newPressureTest.PressureTestId, newPressureTest.ApplyDate); + } + else + { + if (newItem.States == Const.State_3) + { + updatePressureTest.CloseManId = newPressureTest.CloseManId; + updatePressureTest.CloseReasons = newPressureTest.CloseReasons; + updatePressureTest.CloseTime = DateTime.Now; + if (newPressureTest.ValidityEndTime.HasValue && newPressureTest.ValidityEndTime < DateTime.Now) + { + updatePressureTest.CloseTime = newPressureTest.ValidityEndTime; + } + } + else if (newItem.States == Const.State_R) + { + updatePressureTest.CancelManId = newPressureTest.CancelManId; + updatePressureTest.CancelReasons = newPressureTest.CancelReasons; + updatePressureTest.CancelTime = DateTime.Now; + if (newPressureTest.ValidityEndTime.HasValue && newPressureTest.ValidityEndTime < DateTime.Now) + { + updatePressureTest.CancelTime = newPressureTest.ValidityEndTime; + } + } + else + { + updatePressureTest.WorkPalce = newPressureTest.WorkPalce; + updatePressureTest.WatchManId = newPressureTest.WatchManId; + updatePressureTest.WatchManName = newPressureTest.WatchManName; + updatePressureTest.ValidityStartTime = newPressureTest.ValidityStartTime; + updatePressureTest.ValidityEndTime = newPressureTest.ValidityEndTime; + updatePressureTest.WorkContent = newPressureTest.WorkContent; + updatePressureTest.PressureAndType = newPressureTest.PressureAndType; + updatePressureTest.NextManId = newPressureTest.NextManId; + updatePressureTest.States = newPressureTest.States; + updatePressureTest.SignatureUrl = newPressureTest.SignatureUrl; + + } + updatePressureTest.States = newPressureTest.States; + } + } + #endregion + #region 加班作业票 + else if (newItem.MenuId == Const.ProjectJiaBanWorkMenuId) + { + Model.License_JiaBan newJiaBan = new Model.License_JiaBan + { + JiaBanId = strLicenseId, + ProjectId = projectId, + LicenseCode = newItem.LicenseCode, + ApplyUnitId = newItem.ApplyUnitId, + ApplyManId = newItem.ApplyManId, + Reason = newItem.Reason, + SafeLeader = newItem.SafeLeader, + WorkLeader = newItem.WorkLeader, + PeopleNum = newItem.PeopleNum, + ElectricalMan = newItem.ElectricalMan, + ApplyDate = Funs.GetNewDateTime(newItem.ApplyDate), + WorkPalce = newItem.WorkPalce, + WorkType = newItem.WorkType, + ValidityStartTime = Funs.GetNewDateTime(newItem.ValidityStartTime), + ValidityEndTime = Funs.GetNewDateTime(newItem.ValidityEndTime), + WorkMeasures = newItem.WorkMeasures, + EquipmentTools = newItem.EquipmentTools, + 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, + SignatureUrl = newItem.SignatureUrl + }; + if (newItem.States == Const.State_0) + { + newJiaBan.NextManId = newItem.ApplyManId; + } + ////保存 + var updateJiaBan = db.License_JiaBan.FirstOrDefault(x => x.JiaBanId == strLicenseId); + if (updateJiaBan == null) + { + newJiaBan.ApplyDate = DateTime.Now; + strLicenseId = newJiaBan.JiaBanId = SQLHelper.GetNewID(); + newJiaBan.OldLicenseId = newItem.OldLicenseId; + newItem.LicenseCode = newJiaBan.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectJiaBanWorkMenuId, newJiaBan.ProjectId, newJiaBan.ApplyUnitId); + db.License_JiaBan.InsertOnSubmit(newJiaBan); + + ////增加一条编码记录 + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectJiaBanWorkMenuId, newJiaBan.ProjectId, newJiaBan.ApplyUnitId, newJiaBan.JiaBanId, newJiaBan.ApplyDate); + } + else + { + if (newItem.States == Const.State_3) + { + updateJiaBan.CloseManId = newJiaBan.CloseManId; + updateJiaBan.CloseReasons = newJiaBan.CloseReasons; + updateJiaBan.CloseTime = DateTime.Now; + if (updateJiaBan.ValidityEndTime.HasValue && newJiaBan.ValidityEndTime < DateTime.Now) + { + updateJiaBan.CloseTime = newJiaBan.ValidityEndTime; + } + } + else if (newItem.States == Const.State_R) + { + updateJiaBan.CancelManId = newJiaBan.CancelManId; + updateJiaBan.CancelReasons = newJiaBan.CancelReasons; + updateJiaBan.CancelTime = DateTime.Now; + if (updateJiaBan.ValidityEndTime.HasValue && newJiaBan.ValidityEndTime < DateTime.Now) + { + updateJiaBan.CancelTime = newJiaBan.ValidityEndTime; + } + } + else + { + updateJiaBan.WorkPalce = newJiaBan.WorkPalce; + updateJiaBan.Reason = newJiaBan.Reason; + updateJiaBan.SafeLeader = newJiaBan.SafeLeader; + updateJiaBan.WorkLeader = newJiaBan.WorkLeader; + updateJiaBan.PeopleNum = newJiaBan.PeopleNum; + updateJiaBan.ElectricalMan = newJiaBan.ElectricalMan; + updateJiaBan.ValidityStartTime = newJiaBan.ValidityStartTime; + updateJiaBan.ValidityEndTime = newJiaBan.ValidityEndTime; + updateJiaBan.WorkMeasures = newJiaBan.WorkMeasures; + updateJiaBan.EquipmentTools = newJiaBan.EquipmentTools; + updateJiaBan.NextManId = newJiaBan.NextManId; + updateJiaBan.States = newJiaBan.States; + updateJiaBan.SignatureUrl = newJiaBan.SignatureUrl; + + } + updateJiaBan.States = newJiaBan.States; + } + } + #endregion #region 作业票【定稿】 if (newItem.MenuId == Const.ProjectLicenseManagerMenuId) { @@ -1834,7 +2452,7 @@ namespace BLL States = Const.State_0, }; newLicenseManager.LicenseTypeId = string.IsNullOrEmpty(newItem.LicenseTypeId) ? null : newItem.LicenseTypeId; - + if (newLicenseManager.WorkStates == Const.State_3 || newLicenseManager.WorkStates == Const.State_R) { newLicenseManager.States = Const.State_2; @@ -1864,7 +2482,7 @@ namespace BLL updateLicenseManager.StartDate = newLicenseManager.StartDate; updateLicenseManager.EndDate = newLicenseManager.EndDate; } - + updateLicenseManager.WorkStates = newLicenseManager.WorkStates; updateLicenseManager.States = newLicenseManager.States; } @@ -1955,6 +2573,7 @@ namespace BLL updateFlowOperate.OperaterTime = DateTime.Now; updateFlowOperate.IsAgree = newItem.IsAgree; updateFlowOperate.Opinion = newItem.Opinion; + updateFlowOperate.SignatureUrl = newItem.SignatureUrl; updateFlowOperate.IsClosed = true; db.SubmitChanges(); @@ -1970,7 +2589,7 @@ namespace BLL Opinion = updateFlowOperate.Opinion, }; db.License_FlowOperateItem.InsertOnSubmit(newFlowOperateItem); - + #region 新增下一步审核记录 if (newItem.IsAgree == true) { @@ -1988,10 +2607,34 @@ namespace BLL getNextFlowOperate.OperaterId = newItem.OperaterId; getNextFlowOperate.Opinion = "审核完成!"; boolIsFlowEnd = true; - db.SubmitChanges(); + db.SubmitChanges(); } } - + else if (newItem.EndFlow.HasValue && newItem.EndFlow.Value == 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 flowOperates = db.License_FlowOperate.Where(x => x.DataId == updateFlowOperate.DataId); + foreach (var flowOperate in flowOperates) + { + flowOperate.IsClosed = true; + + if (flowOperate.IsFlowEnd == true) + { + /////最后一步是关闭所有 步骤 + flowOperate.IsClosed = true; + flowOperate.OperaterTime = DateTime.Now; + flowOperate.IsAgree = true; + flowOperate.OperaterId = newItem.OperaterId; + flowOperate.Opinion = "审核完成!"; + boolIsFlowEnd = true; + + } + } + db.SubmitChanges(); + + + } #region 动火作业票 if (strMenuId == Const.ProjectFireWorkMenuId) { @@ -2047,7 +2690,7 @@ namespace BLL { days = Convert.ToInt32((getHeightWork.ValidityEndTime - getHeightWork.ValidityStartTime).Value.TotalDays); } - // getHeightWork.ValidityStartTime = DateTime.Now; + // getHeightWork.ValidityStartTime = DateTime.Now; //getHeightWork.ValidityEndTime = DateTime.Now.AddDays(days); } } @@ -2116,7 +2759,7 @@ namespace BLL hours = Convert.ToInt32((getRadialWork.ValidityEndTime - getRadialWork.ValidityStartTime).Value.TotalHours); } //getRadialWork.ValidityStartTime = DateTime.Now; - // getRadialWork.ValidityEndTime = DateTime.Now.AddHours(hours); + // getRadialWork.ValidityEndTime = DateTime.Now.AddHours(hours); } } } @@ -2184,7 +2827,7 @@ namespace BLL days = Convert.ToInt32((getBreakGround.ValidityEndTime - getBreakGround.ValidityStartTime).Value.TotalDays); } //getBreakGround.ValidityStartTime = DateTime.Now; - // getBreakGround.ValidityEndTime = DateTime.Now.AddDays(days); + // getBreakGround.ValidityEndTime = DateTime.Now.AddDays(days); } } } @@ -2251,8 +2894,8 @@ namespace BLL { days = Convert.ToInt32((getLiftingWork.ValidityEndTime - getLiftingWork.ValidityStartTime).Value.TotalDays); } - // getLiftingWork.ValidityStartTime = DateTime.Now; - // getLiftingWork.ValidityEndTime = DateTime.Now.AddDays(days); + // getLiftingWork.ValidityStartTime = DateTime.Now; + // getLiftingWork.ValidityEndTime = DateTime.Now.AddDays(days); } } } @@ -2265,6 +2908,110 @@ namespace BLL } #endregion + #region 临电作业票 + if (strMenuId == Const.ProjectTempElectricityMenuId) + { + var getTempElectricity = db.License_TempElectricity.FirstOrDefault(x => x.TempElectricityId == updateFlowOperate.DataId); + if (getTempElectricity != null) + { + applyManId = getTempElectricity.ApplyManId; + getTempElectricity.NextManId = newItem.NextOperaterId; + if (newItem.IsAgree == true) + { + if (boolIsFlowEnd == true) + { + getTempElectricity.NextManId = null; + getTempElectricity.States = Const.State_2; + if (getTempElectricity.ValidityStartTime.HasValue && getTempElectricity.ValidityStartTime < DateTime.Now) + { + int days = 7; + if (getTempElectricity.ValidityEndTime.HasValue) + { + days = Convert.ToInt32((getTempElectricity.ValidityEndTime - getTempElectricity.ValidityStartTime).Value.TotalDays); + } + //getFireWork.ValidityStartTime = DateTime.Now; + //getFireWork.ValidityEndTime = DateTime.Now.AddDays(days); + } + } + } + else + { + getTempElectricity.States = Const.State_0; + } + db.SubmitChanges(); + } + } + #endregion + #region 加班作业票 + else if (strMenuId == Const.ProjectJiaBanWorkMenuId) + { + var getJiaBan = db.License_JiaBan.FirstOrDefault(x => x.JiaBanId == updateFlowOperate.DataId); + if (getJiaBan != null) + { + applyManId = getJiaBan.ApplyManId; + getJiaBan.NextManId = newItem.NextOperaterId; + if (newItem.IsAgree == true) + { + if (boolIsFlowEnd == true) + { + getJiaBan.NextManId = null; + getJiaBan.States = Const.State_2; + if (getJiaBan.ValidityStartTime.HasValue && getJiaBan.ValidityStartTime < DateTime.Now) + { + int days = 7; + if (getJiaBan.ValidityEndTime.HasValue) + { + days = Convert.ToInt32((getJiaBan.ValidityEndTime - getJiaBan.ValidityStartTime).Value.TotalDays); + } + // getHeightWork.ValidityStartTime = DateTime.Now; + //getHeightWork.ValidityEndTime = DateTime.Now.AddDays(days); + } + } + } + else + { + getJiaBan.States = Const.State_0; + } + db.SubmitChanges(); + } + } + #endregion + #region 试压作业票 + if (strMenuId == Const.ProjectPressureTestMenuId) + { + var getPressureTest = db.License_PressureTest.FirstOrDefault(x => x.PressureTestId == updateFlowOperate.DataId); + if (getPressureTest != null) + { + applyManId = getPressureTest.ApplyManId; + getPressureTest.NextManId = newItem.NextOperaterId; + if (newItem.IsAgree == true) + { + if (boolIsFlowEnd == true) + { + getPressureTest.NextManId = null; + getPressureTest.States = Const.State_2; + if (getPressureTest.ValidityStartTime.HasValue && getPressureTest.ValidityStartTime < DateTime.Now) + { + int days = 7; + if (getPressureTest.ValidityEndTime.HasValue) + { + days = Convert.ToInt32((getPressureTest.ValidityEndTime - getPressureTest.ValidityStartTime).Value.TotalDays); + } + //getFireWork.ValidityStartTime = DateTime.Now; + //getFireWork.ValidityEndTime = DateTime.Now.AddDays(days); + } + } + } + else + { + getPressureTest.States = Const.State_0; + } + db.SubmitChanges(); + } + } + #endregion + + if (!boolIsFlowEnd && !string.IsNullOrEmpty(newItem.NextOperaterId)) { List getUserIds = Funs.GetStrListByStr(newItem.NextOperaterId, ','); @@ -2272,7 +3019,8 @@ namespace BLL { APICommonService.SendSubscribeMessage(item, "作业票待您审核", UserService.GetUserNameByUserId(newItem.OperaterId), string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); } - }else if (boolIsFlowEnd) + } + else if (boolIsFlowEnd) { APICommonService.SendSubscribeMessage(applyManId, "作业票已审核完毕", UserService.GetUserNameByUserId(applyManId), string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); @@ -2320,6 +3068,7 @@ namespace BLL OrderNum = item.OrderNum, RoleIds = item.RoleId, IsFlowEnd = item.IsFlowEnd, + CanEndFlow = item.CanEndFlow }; db.License_FlowOperate.InsertOnSubmit(newFlowOperate); db.SubmitChanges(); @@ -2375,10 +3124,11 @@ namespace BLL OperaterName = db.Sys_User.First(y => y.UserId == x.OperaterId).UserName, IsAgree = x.IsAgree, Opinion = x.Opinion, - IsSelfRole=x.IsSelfRole, + IsSelfRole = x.IsSelfRole, IsFlowEnd = x.IsFlowEnd ?? false, - SignatureUrl = db.Sys_User.First(y => y.UserId == x.OperaterId).SignatureUrl.Replace('\\', '/'), - AttachUrl = AttachFileService.getFileUrl(x.FlowOperateId) + SignatureUrl = x.SignatureUrl.Replace('\\', '/'), + AttachUrl = AttachFileService.getFileUrl(x.FlowOperateId), + CanEndFlow = x.CanEndFlow ?? false, }; return getFlowOperate.FirstOrDefault(); } @@ -2414,6 +3164,7 @@ namespace BLL IsSelfRole = x.IsSelfRole, RoleIds = x.RoleId, IsFlowEnd = x.IsFlowEnd ?? false, + CanEndFlow = x.CanEndFlow ?? false, }).ToList(); } else @@ -2519,6 +3270,328 @@ namespace BLL } #endregion + + + public static string cancleLicenseFlowOperate(string strMenuId, string dataId, string useId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var getFlow = db.License_FlowOperate.Where(x => x.DataId == dataId && x.OperaterId == useId && x.OperaterTime != null).OrderBy(x => x.SortIndex).OrderBy(x => x.GroupNum).OrderBy(x => x.OrderNum).FirstOrDefault(); + if (getFlow != null) + { + var nextFlow = db.License_FlowOperate.Where(x => x.DataId == dataId && x.SortIndex == (getFlow.SortIndex + 1)).FirstOrDefault(); + if (nextFlow != null) + { + nextFlow.OperaterId = null; + } + getFlow.OperaterTime = null; + getFlow.Opinion = null; + getFlow.IsAgree = null; + getFlow.IsClosed = null; + getFlow.SignatureUrl = null; + var flowItem = db.License_FlowOperateItem.FirstOrDefault(x => x.FlowOperateId == getFlow.FlowOperateId); + if (flowItem != null) + { + db.License_FlowOperateItem.DeleteOnSubmit(flowItem); + } + #region 动火作业票 + if (strMenuId == Const.ProjectFireWorkMenuId) + { + var updateFireWork = db.License_FireWork.FirstOrDefault(x => x.FireWorkId == dataId); + if (updateFireWork != null) + { + if (updateFireWork.States == Const.State_3) + return "该作业票已完成"; + updateFireWork.NextManId = getFlow.OperaterId; + updateFireWork.States = Const.State_1; + + } + } + #endregion + #region 高处作业票 + else if (strMenuId == Const.ProjectHeightWorkMenuId) + { + var updateHeightWork = db.License_HeightWork.FirstOrDefault(x => x.HeightWorkId == dataId); + if (updateHeightWork != null) + { + if (updateHeightWork.States == Const.State_3) + return "该作业票已完成"; + updateHeightWork.NextManId = getFlow.OperaterId; + updateHeightWork.States = Const.State_1; + } + } + #endregion + #region 受限空间作业票 + else if (strMenuId == Const.ProjectLimitedSpaceMenuId) + { + var updateLimitedSpace = db.License_LimitedSpace.FirstOrDefault(x => x.LimitedSpaceId == dataId); + if (updateLimitedSpace != null) + { + if (updateLimitedSpace.States == Const.State_3) + return "该作业票已完成"; + updateLimitedSpace.NextManId = getFlow.OperaterId; + updateLimitedSpace.States = Const.State_1; + } + } + #endregion + #region 射线作业票 + else if (strMenuId == Const.ProjectRadialWorkMenuId) + { + var updateRadialWork = db.License_RadialWork.FirstOrDefault(x => x.RadialWorkId == dataId); + if (updateRadialWork != null) + { + if (updateRadialWork.States == Const.State_3) + return "该作业票已完成"; + updateRadialWork.NextManId = getFlow.OperaterId; + updateRadialWork.States = Const.State_1; + } + } + #endregion + #region 断路(占道)作业票 + else if (strMenuId == Const.ProjectOpenCircuitMenuId) + { + var updateOpenCircuit = db.License_OpenCircuit.FirstOrDefault(x => x.OpenCircuitId == dataId); + if (updateOpenCircuit != null) + { + if (updateOpenCircuit.States == Const.State_3) + return "该作业票已完成"; + updateOpenCircuit.NextManId = getFlow.OperaterId; + updateOpenCircuit.States = Const.State_1; + } + } + #endregion + #region 动土作业票 + else if (strMenuId == Const.ProjectBreakGroundMenuId) + { + var updateBreakGround = db.License_BreakGround.FirstOrDefault(x => x.BreakGroundId == dataId); + if (updateBreakGround != null) + { + if (updateBreakGround.States == Const.State_3) + return "该作业票已完成"; + updateBreakGround.NextManId = getFlow.OperaterId; + updateBreakGround.States = Const.State_1; + } + } + #endregion + #region 夜间施工作业票 + else if (strMenuId == Const.ProjectNightWorkMenuId) + { + var updateNightWork = db.License_NightWork.FirstOrDefault(x => x.NightWorkId == dataId); + if (updateNightWork != null) + { + if (updateNightWork.States == Const.State_3) + return "该作业票已完成"; + updateNightWork.NextManId = getFlow.OperaterId; + updateNightWork.States = Const.State_1; + } + } + #endregion + #region 吊装作业票 + else if (strMenuId == Const.ProjectLiftingWorkMenuId) + { + var updateLiftingWork = db.License_LiftingWork.FirstOrDefault(x => x.LiftingWorkId == dataId); + if (updateLiftingWork != null) + { + if (updateLiftingWork.States == Const.State_3) + return "该作业票已完成"; + updateLiftingWork.NextManId = getFlow.OperaterId; + updateLiftingWork.States = Const.State_1; + } + } + #endregion + #region 临电作业票 + else if (strMenuId == Const.ProjectTempElectricityMenuId) + { + var updateTempElectricity = db.License_TempElectricity.FirstOrDefault(x => x.TempElectricityId == dataId); + if (updateTempElectricity != null) + { + if (updateTempElectricity.States == Const.State_3) + return "该作业票已完成"; + updateTempElectricity.NextManId = getFlow.OperaterId; + updateTempElectricity.States = Const.State_1; + + } + } + #endregion + #region 试压作业票 + else if (strMenuId == Const.ProjectPressureTestMenuId) + { + var updatePressureTest = db.License_PressureTest.FirstOrDefault(x => x.PressureTestId == dataId); + if (updatePressureTest != null) + { + if (updatePressureTest.States == Const.State_3) + return "该作业票已完成"; + updatePressureTest.NextManId = getFlow.OperaterId; + updatePressureTest.States = Const.State_1; + + } + } + #endregion + #region 加班作业票 + else if (strMenuId == Const.ProjectJiaBanWorkMenuId) + { + var jiaBan = db.License_JiaBan.FirstOrDefault(x => x.JiaBanId == dataId); + if (jiaBan != null) + { + if (jiaBan.States == Const.State_3) + return "该作业票已完成"; + jiaBan.NextManId = getFlow.OperaterId; + jiaBan.States = Const.State_1; + } + } + #endregion + } + else + { + var getFlows = db.License_FlowOperate.Where(x => x.DataId == dataId).ToList(); + foreach (var item in getFlows) + { + var flowItem = db.License_FlowOperateItem.FirstOrDefault(x => x.FlowOperateId == item.FlowOperateId); + if (flowItem != null) + { + db.License_FlowOperateItem.DeleteOnSubmit(flowItem); + } + } + db.License_FlowOperate.DeleteAllOnSubmit(getFlows); + #region 动火作业票 + if (strMenuId == Const.ProjectFireWorkMenuId) + { + var updateFireWork = db.License_FireWork.FirstOrDefault(x => x.FireWorkId == dataId); + if (updateFireWork != null) + { + updateFireWork.NextManId = null; + updateFireWork.States = Const.State_0; + updateFireWork.SignatureUrl = null; + } + } + #endregion + #region 高处作业票 + else if (strMenuId == Const.ProjectHeightWorkMenuId) + { + var updateHeightWork = db.License_HeightWork.FirstOrDefault(x => x.HeightWorkId == dataId); + if (updateHeightWork != null) + { + updateHeightWork.NextManId = null; + updateHeightWork.States = Const.State_0; + updateHeightWork.SignatureUrl = null; + } + } + #endregion + #region 受限空间作业票 + else if (strMenuId == Const.ProjectLimitedSpaceMenuId) + { + var updateLimitedSpace = db.License_LimitedSpace.FirstOrDefault(x => x.LimitedSpaceId == dataId); + if (updateLimitedSpace != null) + { + updateLimitedSpace.NextManId = null; + updateLimitedSpace.States = Const.State_0; + updateLimitedSpace.SignatureUrl = null; + } + } + #endregion + #region 射线作业票 + else if (strMenuId == Const.ProjectRadialWorkMenuId) + { + var updateRadialWork = db.License_RadialWork.FirstOrDefault(x => x.RadialWorkId == dataId); + if (updateRadialWork != null) + { + updateRadialWork.NextManId = null; + updateRadialWork.States = Const.State_0; + updateRadialWork.SignatureUrl = null; + } + } + #endregion + #region 断路(占道)作业票 + else if (strMenuId == Const.ProjectOpenCircuitMenuId) + { + var updateOpenCircuit = db.License_OpenCircuit.FirstOrDefault(x => x.OpenCircuitId == dataId); + if (updateOpenCircuit != null) + { + updateOpenCircuit.NextManId = null; + updateOpenCircuit.States = Const.State_0; + updateOpenCircuit.SignatureUrl = null; + } + } + #endregion + #region 动土作业票 + else if (strMenuId == Const.ProjectBreakGroundMenuId) + { + var updateBreakGround = db.License_BreakGround.FirstOrDefault(x => x.BreakGroundId == dataId); + if (updateBreakGround != null) + { + updateBreakGround.NextManId = null; + updateBreakGround.States = Const.State_0; + updateBreakGround.SignatureUrl = null; + } + } + #endregion + #region 夜间施工作业票 + else if (strMenuId == Const.ProjectNightWorkMenuId) + { + var updateNightWork = db.License_NightWork.FirstOrDefault(x => x.NightWorkId == dataId); + if (updateNightWork != null) + { + updateNightWork.NextManId = null; + updateNightWork.States = Const.State_0; + updateNightWork.SignatureUrl = null; + } + } + #endregion + #region 吊装作业票 + else if (strMenuId == Const.ProjectLiftingWorkMenuId) + { + var updateLiftingWork = db.License_LiftingWork.FirstOrDefault(x => x.LiftingWorkId == dataId); + if (updateLiftingWork != null) + { + updateLiftingWork.NextManId = null; + updateLiftingWork.States = Const.State_0; + updateLiftingWork.SignatureUrl = null; + } + } + #endregion + #region 临电作业票 + else if (strMenuId == Const.ProjectTempElectricityMenuId) + { + var updateTempElectricity = db.License_TempElectricity.FirstOrDefault(x => x.TempElectricityId == dataId); + if (updateTempElectricity != null) + { + updateTempElectricity.NextManId = null; + updateTempElectricity.States = Const.State_0; + updateTempElectricity.SignatureUrl = null; + } + } + #endregion + #region 试压作业票 + else if (strMenuId == Const.ProjectPressureTestMenuId) + { + var updatePressureTest = db.License_PressureTest.FirstOrDefault(x => x.PressureTestId == dataId); + if (updatePressureTest != null) + { + updatePressureTest.NextManId = null; + updatePressureTest.States = Const.State_0; + updatePressureTest.SignatureUrl = null; + + } + } + #endregion + #region 加班作业票 + else if (strMenuId == Const.ProjectJiaBanWorkMenuId) + { + var updateJiaBan = db.License_JiaBan.FirstOrDefault(x => x.JiaBanId == dataId); + if (updateJiaBan != null) + { + updateJiaBan.NextManId = null; + updateJiaBan.States = Const.State_0; + updateJiaBan.SignatureUrl = null; + } + } + #endregion + } + db.SubmitChanges(); + return ""; + } + } + #region 删除审核步骤 /// /// 删除审核步骤 @@ -2607,13 +3680,47 @@ namespace BLL IsAgree = x.IsAgree, Opinion = x.Opinion, IsFlowEnd = x.IsFlowEnd ?? false, - IsSelfRole = x.IsSelfRole + IsSelfRole = x.IsSelfRole, + CanEndFlow = x.CanEndFlow ?? false }).ToList(); } return getNextFlowsList; } } + public static Model.FlowOperateItem getFinishLicenseFlowOperateGroupList(string dataId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + + var q = (from x in db.License_FlowOperate + where x.DataId == dataId + orderby x.SortIndex descending + select new Model.FlowOperateItem + { + FlowOperateId = x.FlowOperateId, + MenuId = x.MenuId, + ProjectId = x.ProjectId, + DataId = x.DataId, + AuditFlowName = x.AuditFlowName, + SortIndex = x.SortIndex ?? 0, + GroupNum = x.GroupNum ?? 1, + OrderNum = x.OrderNum ?? 1, + RoleIds = x.RoleIds, + OperaterId = x.OperaterId, + OperaterName = db.Sys_User.First(u => u.UserId == x.OperaterId).UserName, + OperaterTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.OperaterTime), + IsAgree = x.IsAgree, + Opinion = x.Opinion, + IsFlowEnd = x.IsFlowEnd ?? false, + IsSelfRole = x.IsSelfRole, + CanEndFlow = x.CanEndFlow ?? false + }).ToList(); + + + return q.FirstOrDefault(); + } + } #endregion #region 重申请作业票信息 @@ -2627,7 +3734,7 @@ namespace BLL string strLicenseId = newItem.LicenseId; string projectId = newItem.ProjectId; using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) - { + { //// 删除未审核的流程记录 var getDelFlows = from x in db.License_FlowOperate where x.DataId == strLicenseId && (!x.IsClosed.HasValue || x.IsClosed == false) @@ -2675,7 +3782,7 @@ namespace BLL else if (newItem.MenuId == Const.ProjectRadialWorkMenuId) { var updateRadialWork = db.License_RadialWork.FirstOrDefault(x => x.RadialWorkId == strLicenseId); - if (updateRadialWork == null) + if (updateRadialWork != null) { updateRadialWork.NextManId = null; updateRadialWork.States = Const.State_C; @@ -2686,7 +3793,7 @@ namespace BLL else if (newItem.MenuId == Const.ProjectOpenCircuitMenuId) { var updateOpenCircuit = db.License_OpenCircuit.FirstOrDefault(x => x.OpenCircuitId == strLicenseId); - if (updateOpenCircuit == null) + if (updateOpenCircuit != null) { updateOpenCircuit.NextManId = null; updateOpenCircuit.States = Const.State_C; @@ -2697,7 +3804,7 @@ namespace BLL else if (newItem.MenuId == Const.ProjectBreakGroundMenuId) { var updateBreakGround = db.License_BreakGround.FirstOrDefault(x => x.BreakGroundId == strLicenseId); - if (updateBreakGround == null) + if (updateBreakGround != null) { updateBreakGround.NextManId = null; updateBreakGround.States = Const.State_C; @@ -2726,7 +3833,39 @@ namespace BLL } } #endregion - + #region 临电作业票 + if (newItem.MenuId == Const.ProjectTempElectricityMenuId) + { + var updateTempElectricity = db.License_TempElectricity.FirstOrDefault(x => x.TempElectricityId == strLicenseId); + if (updateTempElectricity != null) + { + updateTempElectricity.NextManId = null; + updateTempElectricity.States = Const.State_C; + } + } + #endregion + #region 加班作业票 + else if (newItem.MenuId == Const.ProjectJiaBanWorkMenuId) + { + var updateJiaBan = db.License_JiaBan.FirstOrDefault(x => x.JiaBanId == strLicenseId); + if (updateJiaBan != null) + { + updateJiaBan.NextManId = null; + updateJiaBan.States = Const.State_C; + } + } + #endregion + #region 试压作业票 + if (newItem.MenuId == Const.ProjectPressureTestMenuId) + { + var updateTempElectricity = db.License_PressureTest.FirstOrDefault(x => x.PressureTestId == strLicenseId); + if (updateTempElectricity != null) + { + updateTempElectricity.NextManId = null; + updateTempElectricity.States = Const.State_C; + } + } + #endregion db.SubmitChanges(); } diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index f838bf92..0ccbb719 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -2445,7 +2445,14 @@ namespace BLL /// 作业票申请 /// public const string ProjectLicenseApplyMenuId = "2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D5B"; - + /// + /// 加班作业票 + /// + public const string ProjectJiaBanWorkMenuId = "7F1C5B31-10D7-49AB-8AA2-01FAC565C964"; + /// + /// 试压作业票 + /// + public const string ProjectPressureTestMenuId = "F0EBACC6-DAED-4A3F-A174-9AB639409C4B"; /// /// 动火作业票 /// @@ -2478,6 +2485,12 @@ namespace BLL /// 吊装作业票 /// public const string ProjectLiftingWorkMenuId = "A1BE3AB6-9D4A-41E7-8870-E73423165451"; + + /// + /// 临电作业票 + /// + public const string ProjectTempElectricityMenuId = "E9EF8980-C60C-4A87-8498-5A0A061844ED"; + #endregion #region HSSE检查管理 diff --git a/SGGL/BLL/HSSE/License/LicensePublicService.cs b/SGGL/BLL/HSSE/License/LicensePublicService.cs index 3531d5e4..d2a66f33 100644 --- a/SGGL/BLL/HSSE/License/LicensePublicService.cs +++ b/SGGL/BLL/HSSE/License/LicensePublicService.cs @@ -134,9 +134,9 @@ namespace BLL } #endregion - #region 动火作业票 + #region 作业票 /// - /// 根据主键获取动火作业票 + /// 根据主键获取作业票 /// /// /// @@ -212,7 +212,113 @@ namespace BLL } } #endregion + + #region 加班作业票 + /// + /// 根据主键获取加班作业票 + /// + /// + /// + public static Model.License_JiaBan GetJiaBanWorkById(string jiaBanId) + { + return Funs.DB.License_JiaBan.FirstOrDefault(e => e.JiaBanId == jiaBanId); + } + /// + /// 添加加班作业票 + /// + /// + public static void AddJiaBan(Model.License_JiaBan jiaBan) + { + Model.SGGLDB db = Funs.DB; + Model.License_JiaBan newJiaBan = new Model.License_JiaBan + { + JiaBanId = jiaBan.JiaBanId, + ProjectId = jiaBan.ProjectId, + LicenseCode = jiaBan.LicenseCode, + ApplyUnitId = jiaBan.ApplyUnitId, + ApplyManId = jiaBan.ApplyManId, + SafeLeader = jiaBan.SafeLeader, + Reason = jiaBan.Reason, + WorkLeader = jiaBan.WorkLeader, + PeopleNum = jiaBan.PeopleNum, + ElectricalMan = jiaBan.ElectricalMan, + ApplyDate = jiaBan.ApplyDate, + WorkPalce = jiaBan.WorkPalce, + WorkType = jiaBan.WorkType, + ValidityStartTime = jiaBan.ValidityStartTime, + ValidityEndTime = jiaBan.ValidityEndTime, + WorkMeasures = jiaBan.WorkMeasures, + EquipmentTools = jiaBan.EquipmentTools, + CancelManId = jiaBan.CancelManId, + CancelReasons = jiaBan.CancelReasons, + CancelTime = jiaBan.CancelTime, + CloseManId = jiaBan.CloseManId, + CloseReasons = jiaBan.CloseReasons, + CloseTime = jiaBan.CloseTime, + NextManId = jiaBan.NextManId, + States = jiaBan.States, + }; + db.License_JiaBan.InsertOnSubmit(newJiaBan); + db.SubmitChanges(); + ////增加一条编码记录 + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectJiaBanWorkMenuId, jiaBan.ProjectId, jiaBan.ApplyUnitId, jiaBan.JiaBanId, jiaBan.ApplyDate); + } + + /// + /// 修改加班作业票 + /// + /// + public static void UpdateJiaBan(Model.License_JiaBan jiaBan) + { + Model.SGGLDB db = Funs.DB; + Model.License_JiaBan newJiaBan = db.License_JiaBan.FirstOrDefault(e => e.JiaBanId == jiaBan.JiaBanId); + if (newJiaBan != null) + { + newJiaBan.SafeLeader = jiaBan.SafeLeader; + newJiaBan.Reason = jiaBan.Reason; + newJiaBan.WorkLeader = jiaBan.WorkLeader; + newJiaBan.PeopleNum = jiaBan.PeopleNum; + newJiaBan.ElectricalMan = jiaBan.ElectricalMan; + newJiaBan.WorkPalce = jiaBan.WorkPalce; + newJiaBan.WorkType = jiaBan.WorkType; + newJiaBan.ValidityStartTime = jiaBan.ValidityStartTime; + newJiaBan.ValidityEndTime = jiaBan.ValidityEndTime; + newJiaBan.WorkMeasures = jiaBan.WorkMeasures; + newJiaBan.EquipmentTools = jiaBan.EquipmentTools; + newJiaBan.CancelManId = jiaBan.CancelManId; + newJiaBan.CancelReasons = jiaBan.CancelReasons; + newJiaBan.CancelTime = jiaBan.CancelTime; + newJiaBan.CloseManId = jiaBan.CloseManId; + newJiaBan.CloseReasons = jiaBan.CloseReasons; + newJiaBan.CloseTime = jiaBan.CloseTime; + newJiaBan.NextManId = jiaBan.NextManId; + newJiaBan.States = jiaBan.States; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除加班作业票 + /// + /// + public static void DeleteJiaBanById(string jiaBanId) + { + Model.SGGLDB db = Funs.DB; + Model.License_JiaBan jiaBan = db.License_JiaBan.FirstOrDefault(e => e.JiaBanId == jiaBanId); + if (jiaBan != null) + { + ///删除编码表记录 + CodeRecordsService.DeleteCodeRecordsByDataId(jiaBanId); + ///删除-安全措施 + DeleteLicenseItemByDataId(jiaBanId); + ///删除作业票审核信息 + DeleteFlowOperateByDataId(jiaBanId); + db.License_JiaBan.DeleteOnSubmit(jiaBan); + db.SubmitChanges(); + } + } + #endregion #region 高处作业票 /// /// 根据主键获取高处作业票 @@ -223,6 +329,7 @@ namespace BLL { return Funs.DB.License_HeightWork.FirstOrDefault(e => e.HeightWorkId == heightWorkId); } + /// /// 添加高处作业票 @@ -909,6 +1016,198 @@ namespace BLL } #endregion + #region 临电作业票 + /// + /// 根据主键获取临电作业票 + /// + /// + /// + public static Model.License_TempElectricity GetTempElectricityById(string tempElectricityId) + { + return Funs.DB.License_TempElectricity.FirstOrDefault(e => e.TempElectricityId == tempElectricityId); + } + + /// + /// 添加临电作业票 + /// + /// + public static void AddTempElectricity(Model.License_TempElectricity tempElectricity) + { + Model.SGGLDB db = Funs.DB; + Model.License_TempElectricity newTempElectricity = new Model.License_TempElectricity + { + TempElectricityId = tempElectricity.TempElectricityId, + ProjectId = tempElectricity.ProjectId, + LicenseCode = tempElectricity.LicenseCode, + ApplyUnitId = tempElectricity.ApplyUnitId, + ApplyManId = tempElectricity.ApplyManId, + ApplyDate = tempElectricity.ApplyDate, + WorkPalce = tempElectricity.WorkPalce, + WatchManId = tempElectricity.WatchManId, + WatchManName = tempElectricity.WatchManName, + ValidityStartTime = tempElectricity.ValidityStartTime, + ValidityEndTime = tempElectricity.ValidityEndTime, + WorkMeasures = tempElectricity.WorkMeasures, + CancelManId = tempElectricity.CancelManId, + CancelReasons = tempElectricity.CancelReasons, + CancelTime = tempElectricity.CancelTime, + CloseManId = tempElectricity.CloseManId, + CloseReasons = tempElectricity.CloseReasons, + CloseTime = tempElectricity.CloseTime, + NextManId = tempElectricity.NextManId, + States = tempElectricity.States, + }; + db.License_TempElectricity.InsertOnSubmit(newTempElectricity); + db.SubmitChanges(); + ////增加一条编码记录 + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTempElectricityMenuId, newTempElectricity.ProjectId, newTempElectricity.ApplyUnitId, newTempElectricity.TempElectricityId, newTempElectricity.ApplyDate); + } + + /// + /// 修改临电作业票 + /// + /// + public static void UpdateTempElectricity(Model.License_TempElectricity tempElectricity) + { + Model.SGGLDB db = Funs.DB; + Model.License_TempElectricity newTempElectricity = db.License_TempElectricity.FirstOrDefault(e => e.TempElectricityId == tempElectricity.TempElectricityId); + if (newTempElectricity != null) + { + newTempElectricity.WorkPalce = tempElectricity.WorkPalce; + newTempElectricity.WatchManId = tempElectricity.WatchManId; + newTempElectricity.ValidityStartTime = tempElectricity.ValidityStartTime; + newTempElectricity.ValidityEndTime = tempElectricity.ValidityEndTime; + newTempElectricity.WorkMeasures = tempElectricity.WorkMeasures; + newTempElectricity.CancelManId = tempElectricity.CancelManId; + newTempElectricity.CancelReasons = tempElectricity.CancelReasons; + newTempElectricity.CancelTime = tempElectricity.CancelTime; + newTempElectricity.CloseManId = tempElectricity.CloseManId; + newTempElectricity.CloseReasons = tempElectricity.CloseReasons; + newTempElectricity.CloseTime = tempElectricity.CloseTime; + newTempElectricity.NextManId = tempElectricity.NextManId; + newTempElectricity.States = tempElectricity.States; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除临电作业票 + /// + /// + public static void DeleteTempElectricityById(string tempElectricityId) + { + Model.SGGLDB db = Funs.DB; + Model.License_TempElectricity tempElectricity = db.License_TempElectricity.FirstOrDefault(e => e.TempElectricityId == tempElectricityId); + if (tempElectricity != null) + { + ///删除编码表记录 + CodeRecordsService.DeleteCodeRecordsByDataId(tempElectricityId); + ///删除-安全措施 + DeleteLicenseItemByDataId(tempElectricityId); + ///删除作业票审核信息 + DeleteFlowOperateByDataId(tempElectricityId); + db.License_TempElectricity.DeleteOnSubmit(tempElectricity); + db.SubmitChanges(); + } + } + #endregion + + #region 试压作业票 + /// + /// 根据主键获取试压作业票 + /// + /// + /// + public static Model.License_PressureTest GetPressureTestById(string pressureTestId) + { + return Funs.DB.License_PressureTest.FirstOrDefault(e => e.PressureTestId == pressureTestId); + } + + /// + /// 添加试压作业票 + /// + /// + public static void AddPressureTest(Model.License_PressureTest pressureTest) + { + Model.SGGLDB db = Funs.DB; + Model.License_PressureTest newPressureTest = new Model.License_PressureTest + { + PressureTestId = pressureTest.PressureTestId, + ProjectId = pressureTest.ProjectId, + LicenseCode = pressureTest.LicenseCode, + ApplyUnitId = pressureTest.ApplyUnitId, + ApplyManId = pressureTest.ApplyManId, + ApplyDate = pressureTest.ApplyDate, + WorkPalce = pressureTest.WorkPalce, + WatchManId = pressureTest.WatchManId, + WatchManName = pressureTest.WatchManName, + ValidityStartTime = pressureTest.ValidityStartTime, + ValidityEndTime = pressureTest.ValidityEndTime, + WorkContent = pressureTest.WorkContent, + CancelManId = pressureTest.CancelManId, + CancelReasons = pressureTest.CancelReasons, + CancelTime = pressureTest.CancelTime, + CloseManId = pressureTest.CloseManId, + CloseReasons = pressureTest.CloseReasons, + CloseTime = pressureTest.CloseTime, + NextManId = pressureTest.NextManId, + States = pressureTest.States, + + }; + db.License_PressureTest.InsertOnSubmit(newPressureTest); + db.SubmitChanges(); + ////增加一条编码记录 + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTempElectricityMenuId, newPressureTest.ProjectId, newPressureTest.ApplyUnitId, newPressureTest.PressureTestId, newPressureTest.ApplyDate); + } + + /// + /// 修改试压作业票 + /// + /// + public static void UpdatePressureTest(Model.License_PressureTest pressureTest) + { + Model.SGGLDB db = Funs.DB; + Model.License_PressureTest newPressureTest = db.License_PressureTest.FirstOrDefault(e => e.PressureTestId == pressureTest.PressureTestId); + if (newPressureTest != null) + { + newPressureTest.WorkPalce = pressureTest.WorkPalce; + newPressureTest.WatchManId = pressureTest.WatchManId; + newPressureTest.ValidityStartTime = pressureTest.ValidityStartTime; + newPressureTest.ValidityEndTime = pressureTest.ValidityEndTime; + newPressureTest.WorkContent = pressureTest.WorkContent; + newPressureTest.CancelManId = pressureTest.CancelManId; + newPressureTest.CancelReasons = pressureTest.CancelReasons; + newPressureTest.CancelTime = pressureTest.CancelTime; + newPressureTest.CloseManId = pressureTest.CloseManId; + newPressureTest.CloseReasons = pressureTest.CloseReasons; + newPressureTest.CloseTime = pressureTest.CloseTime; + newPressureTest.NextManId = pressureTest.NextManId; + newPressureTest.States = pressureTest.States; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除试压作业票 + /// + /// + public static void DeletePressureTestById(string pressureTestId) + { + Model.SGGLDB db = Funs.DB; + Model.License_PressureTest pressureTest = db.License_PressureTest.FirstOrDefault(e => e.PressureTestId == pressureTestId); + if (pressureTest != null) + { + ///删除编码表记录 + CodeRecordsService.DeleteCodeRecordsByDataId(pressureTestId); + ///删除-安全措施 + DeleteLicenseItemByDataId(pressureTestId); + ///删除作业票审核信息 + DeleteFlowOperateByDataId(pressureTestId); + db.License_PressureTest.DeleteOnSubmit(pressureTest); + db.SubmitChanges(); + } + } + #endregion #endregion #region 作业票-安全措施 diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index e2eb3015..231cc5ff 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1646,3 +1646,20 @@ IP地址:::1 出错时间:06/09/2023 10:32:18 + +错误信息开始=====> +错误类型:JsonReaderException +错误信息:Unexpected character encountered while parsing value: 未. Path '', line 0, position 0. +错误堆栈: + 在 Newtonsoft.Json.JsonTextReader.ParseValue() + 在 Newtonsoft.Json.JsonTextReader.Read() + 在 Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) + 在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) + 在 Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value) + 在 BLL.WeatherService.GetWeather(String projectId) 位置 D:\project\vs\sggl_cd\SGGL\BLL\Common\WeatherService.cs:行号 96 +出错时间:06/10/2023 11:29:19 +出错时间:06/10/2023 11:29:19 + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 8366eac4..da70172e 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1067,6 +1067,8 @@ + + @@ -1079,10 +1081,14 @@ + + + + @@ -11929,6 +11935,20 @@ HSETechnicalView.aspx + + JiaBan.aspx + ASPXCodeBehind + + + JiaBan.aspx + + + JiaBanView.aspx + ASPXCodeBehind + + + JiaBanView.aspx + LicenseManager.aspx ASPXCodeBehind @@ -12013,6 +12033,20 @@ OpenCircuitView.aspx + + PressureTest.aspx + ASPXCodeBehind + + + PressureTest.aspx + + + PressureTestView.aspx + ASPXCodeBehind + + + PressureTestView.aspx + RadialWork.aspx ASPXCodeBehind @@ -12041,6 +12075,20 @@ SecurityLicenseEdit.aspx + + TempElectricity.aspx + ASPXCodeBehind + + + TempElectricity.aspx + + + TempElectricityView.aspx + ASPXCodeBehind + + + TempElectricityView.aspx + CompletionReport.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/RepairManage/RepairManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/RepairManage/RepairManageEdit.aspx.cs index 22736f5b..3d9788bc 100644 --- a/SGGL/FineUIPro.Web/HJGL/RepairManage/RepairManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/RepairManage/RepairManageEdit.aspx.cs @@ -918,7 +918,7 @@ namespace FineUIPro.Web.HJGL.RepairManage //{ // areaCode = workarea.WorkAreaCode; //} - //var epcUnitCode = BLL.UnitService.GetUnitCodeByUnitId(BLL.Const.UnitId_TCC); + //var epcUnitCode = BLL.UnitService.GetUnitCodeByUnitId(BLL.Const.UnitId_CD); //var trustUnitCode = BLL.UnitService.GetUnitCodeByUnitId(this.drpCH_TrustUnit.SelectedValue); //prefixCode = "RK-" + epcUnitCode + "-" + trustUnitCode + "-" + areaCode + "-"; @@ -944,7 +944,7 @@ namespace FineUIPro.Web.HJGL.RepairManage //{ // areaCode = workarea.WorkAreaCode; //} - //var epcUnitCode = BLL.UnitService.GetUnitCodeByUnitId(BLL.Const.UnitId_TCC); + //var epcUnitCode = BLL.UnitService.GetUnitCodeByUnitId(BLL.Const.UnitId_CD); //var trustUnitCode = BLL.UnitService.GetUnitCodeByUnitId(this.drpCH_TrustUnit.SelectedValue); //var ndtt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(this.drpCH_NDTMethod.SelectedValue); //if (ndtt != null) diff --git a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesAudit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesAudit.aspx.cs index 88af6d53..c73cdfce 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesAudit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesAudit.aspx.cs @@ -285,7 +285,7 @@ namespace FineUIPro.Web.HSSE.Check //else if (getRectifyNotices.States == Const.State_3) //{ // this.drpOperateMan.Label = "安全经理/安全工程师"; - // UserService.InitUserProjectIdUnitIdDropDownList(this.drpOperateMan, this.CurrUser.LoginProjectId, Const.UnitId_TCC, true); + // UserService.InitUserProjectIdUnitIdDropDownList(this.drpOperateMan, this.CurrUser.LoginProjectId, Const.UnitId_CD, true); // this.drpOperateMan.SelectedValue = getRectifyNotices.CompleteManId; //} } diff --git a/SGGL/FineUIPro.Web/HSSE/License/BreakGround.aspx b/SGGL/FineUIPro.Web/HSSE/License/BreakGround.aspx index 2d8da6a7..6d8e126f 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/BreakGround.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/BreakGround.aspx @@ -56,6 +56,9 @@ + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/BreakGround.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/BreakGround.aspx.cs index d271edd0..14dbf8db 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/BreakGround.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/BreakGround.aspx.cs @@ -74,7 +74,7 @@ namespace FineUIPro.Web.HSSE.License /// private void BindGrid() { - string strSql = "SELECT license.BreakGroundId,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" + string strSql = "SELECT license.BreakGroundId,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.RealWorkDepth,license.States" + @" ,(CASE WHEN license.States=-2 THEN '作废' 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_BreakGround AS license " + @" LEFT JOIN Base_Unit AS ApplyUnit ON license.ApplyUnitId =ApplyUnit.UnitId" @@ -291,8 +291,9 @@ namespace FineUIPro.Web.HSSE.License 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"); + string docfilename = Funs.GetNewFileName(); + newUrl = uploadfilepath.Replace(".doc", docfilename + ".doc"); + filePath = initTemplatePath.Replace(".doc", docfilename + ".pdf"); File.Copy(uploadfilepath, newUrl); ///更新书签 var getBreakGround = LicensePublicService.GetBreakGroundById(Id); @@ -306,6 +307,8 @@ namespace FineUIPro.Web.HSSE.License } } Bookmark bookmarkApplyManName = doc.Range.Bookmarks["ApplyManName"];//申请人 + Bookmark bookmarkApplyManName1 = doc.Range.Bookmarks["ApplyManName1"];//申请人 + Bookmark bookmarkApplyManPhone = doc.Range.Bookmarks["ApplyManPhone"];//申请人 if (bookmarkApplyManName != null) { if (getBreakGround != null) @@ -314,6 +317,14 @@ namespace FineUIPro.Web.HSSE.License if (getUser != null) { bookmarkApplyManName.Text = getUser.UserName; + if (bookmarkApplyManName1 != null) + { + bookmarkApplyManName1.Text = getUser.UserName; + } + if (bookmarkApplyManPhone != null) + { + bookmarkApplyManPhone.Text = getUser.Telephone; + } } @@ -334,18 +345,36 @@ namespace FineUIPro.Web.HSSE.License Bookmark bookmarkWorkPalce = doc.Range.Bookmarks["WorkPalce"];//作业地点 if (bookmarkWorkPalce != null) { - if (getBreakGround != null) + if (getBreakGround != null && !string.IsNullOrEmpty(getBreakGround.WorkPalce)) { bookmarkWorkPalce.Text = getBreakGround.WorkPalce; } } - Bookmark bookmarkWorkDepth = doc.Range.Bookmarks["WorkDepth"];//开挖深度 - if (bookmarkWorkDepth != null) + Bookmark bookmarkFireWatchManName = doc.Range.Bookmarks["FireWatchManName"];// + if (bookmarkFireWatchManName != null) { - if (getBreakGround != null) + if (getBreakGround != null&&!string.IsNullOrEmpty(getBreakGround.WatchMan)) { - bookmarkWorkDepth.Text = getBreakGround.WorkDepth; + bookmarkFireWatchManName.Text = getBreakGround.WatchMan; + + } + } + Bookmark bookmarkWorkMan = doc.Range.Bookmarks["WorkMan"];//开挖深度 + if (bookmarkWorkMan != null) + { + if (getBreakGround != null && !string.IsNullOrEmpty(getBreakGround.WorkMan)) + { + bookmarkWorkMan.Text = getBreakGround.WorkMan; + + } + } + Bookmark bookmarkIdNum = doc.Range.Bookmarks["IdNum"];//开挖深度 + if (bookmarkIdNum != null) + { + if (getBreakGround != null && !string.IsNullOrEmpty(getBreakGround.IdNum)) + { + bookmarkIdNum.Text = getBreakGround.IdNum; } } @@ -676,106 +705,104 @@ namespace FineUIPro.Web.HSSE.License 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) { - if (getF1.IsAgree == true) + if (!string.IsNullOrEmpty(getF1.Opinion)) { bookmarkOpinion1.Text = getF1.Opinion; } else { - bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + bookmarkOpinion1.Text = "同意。"; } } - - - } - Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; - if (bookmarkOperaterMan1 != null) - { - if (getF1.OperaterTime.HasValue) + else { - 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; - } - } + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; } } + if (!string.IsNullOrEmpty(getF1.SignatureUrl) && File.Exists(rootPath + getF1.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF1.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null && getF1.OperaterTime.HasValue) + { + 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); + 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) { - if (getF2.IsAgree == true) + if (!string.IsNullOrEmpty(getF2.Opinion)) { bookmarkOpinion2.Text = getF2.Opinion; } else { - bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + bookmarkOpinion2.Text = "同意。"; } } - - - } - Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; - if (bookmarkOperaterMan2 != null) - { - if (getF2.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + } + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl) && File.Exists(rootPath + getF2.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + + var file = rootPath + getF2.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + + if (getUser != null) + { + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null&& getF2.OperaterTime.HasValue) { - 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; - } + 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); + bookmarkOperaterTime2.Text = string.Format("{0:yyyy年MM月dd日 HH:mm}", getF2.OperaterTime); } } } @@ -785,50 +812,51 @@ namespace FineUIPro.Web.HSSE.License 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; + if (!string.IsNullOrEmpty(getF3.Opinion)) + { + bookmarkOpinion3.Text = getF1.Opinion; + } + else + { + bookmarkOpinion3.Text = "同意。"; + } } else { bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; } - } - - + } } - Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; - if (bookmarkOperaterMan3 != null) + if (!string.IsNullOrEmpty(getF3.SignatureUrl) && File.Exists(rootPath + getF3.SignatureUrl)) { - if (getF3.OperaterTime.HasValue) + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF3.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + } + else + { + if (getUser != null) { - if (getUser != null) + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != 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; - } + 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); + bookmarkOperaterTime3.Text = string.Format("{0:yyyy年MM月dd日 HH:mm}", getF3.OperaterTime); } } } @@ -845,7 +873,14 @@ namespace FineUIPro.Web.HSSE.License { if (getF4.IsAgree == true) { - bookmarkOpinion4.Text = getF4.Opinion; + if (!string.IsNullOrEmpty(getF4.Opinion)) + { + bookmarkOpinion4.Text = getF1.Opinion; + } + else + { + bookmarkOpinion4.Text = "同意。"; + } } else { @@ -881,7 +916,7 @@ namespace FineUIPro.Web.HSSE.License { if (getF4.OperaterTime.HasValue) { - bookmarkOperaterTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + bookmarkOperaterTime4.Text = string.Format("{0:yyyy年MM月dd日 HH:mm}", getF4.OperaterTime); } } } @@ -898,7 +933,14 @@ namespace FineUIPro.Web.HSSE.License { if (getF5.IsAgree == true) { - bookmarkOpinion5.Text = getF5.Opinion; + if (!string.IsNullOrEmpty(getF5.Opinion)) + { + bookmarkOpinion5.Text = getF1.Opinion; + } + else + { + bookmarkOpinion5.Text = "同意。"; + } } else { @@ -934,7 +976,7 @@ namespace FineUIPro.Web.HSSE.License { if (getF5.OperaterTime.HasValue) { - bookmarkOperaterTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + bookmarkOperaterTime5.Text = string.Format("{0:yyyy年MM月dd日 HH:mm}", getF5.OperaterTime); } } } @@ -951,7 +993,14 @@ namespace FineUIPro.Web.HSSE.License { if (getF6.IsAgree == true) { - bookmarkOpinion6.Text = getF6.Opinion; + if (!string.IsNullOrEmpty(getF6.Opinion)) + { + bookmarkOpinion6.Text = getF1.Opinion; + } + else + { + bookmarkOpinion6.Text = "同意。"; + } } else { @@ -987,7 +1036,7 @@ namespace FineUIPro.Web.HSSE.License { if (getF6.OperaterTime.HasValue) { - bookmarkOperaterTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + bookmarkOperaterTime6.Text = string.Format("{0:yyyy年MM月dd日 HH:mm}", getF6.OperaterTime); } } } diff --git a/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx b/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx index 8a7fc6ae..996b5142 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx @@ -41,14 +41,23 @@ - + - + + + + + + + + + + @@ -73,10 +82,10 @@ HeaderText="检查单" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认执行" HeaderTextAlign="Center" TextAlign="Center" > + HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center" > @@ -85,7 +94,7 @@ + BodyPadding="5px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Title="施工分包商安全经理审批意见:"> @@ -93,12 +102,14 @@ - + - + + @@ -106,7 +117,7 @@ + BodyPadding="5px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Title="总包商土建工程师审批意见:"> @@ -114,12 +125,14 @@ - + - + + @@ -131,7 +144,7 @@ + BodyPadding="5px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Title="总承包商管道工程师审批意见:"> @@ -139,20 +152,22 @@ - + - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.cs index 47917d0e..b68c1ef6 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.cs @@ -48,7 +48,9 @@ this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getBreakGround.ApplyUnitId); this.txtApplyManName.Text = UserService.GetUserNameByUserId(getBreakGround.ApplyManId); this.txtWorkPalce.Text = getBreakGround.WorkPalce; - this.txtWorkDepth.Text = getBreakGround.WorkDepth; + this.txtWatchMan.Text = getBreakGround.WatchMan; + this.txtWorkMan.Text = getBreakGround.WorkMan; + this.txtIdNum.Text = getBreakGround.IdNum; if (getBreakGround.ValidityStartTime.HasValue) { this.txtWorkDate.Text = getBreakGround.ValidityStartTime.Value.ToString("f") + " 至 "; @@ -89,6 +91,8 @@ public string FlowOperateId1; public string FlowOperateId2; public string FlowOperateId3; + public string FlowOperateId4; + public string FlowOperateId5; /// /// /// @@ -112,7 +116,16 @@ { this.txtOpinion1.Text = getF1.Opinion; } - this.txtName1.Text = UserService.GetUserNameByUserId(getF1.OperaterId); + if (!string.IsNullOrEmpty(getF1.SignatureUrl)) + { + this.Image1.ImageUrl = "~/" + getF1.SignatureUrl; + } + var signUser1 = UserService.GetUserByUserId(getF1.OperaterId); + if (signUser1 != null) + { + this.txtName1.Text = signUser1.UserName; + + } this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } @@ -131,7 +144,16 @@ { this.txtOpinion2.Text = getF2.Opinion; } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + if (!string.IsNullOrEmpty(getF2.SignatureUrl)) + { + this.Image2.ImageUrl = "~/" + getF2.SignatureUrl; + } + var signUser2 = UserService.GetUserByUserId(getF2.OperaterId); + if (signUser2 != null) + { + this.txtName2.Text = signUser2.UserName; + + } this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); } } @@ -150,28 +172,93 @@ { this.txtOpinion3.Text = getF3.Opinion; } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + if (!string.IsNullOrEmpty(getF3.SignatureUrl)) + { + this.Image3.ImageUrl = "~/" + getF3.SignatureUrl; + } + var signUser3 = UserService.GetUserByUserId(getF3.OperaterId); + if (signUser3 != null) + { + this.txtName3.Text = signUser3.UserName; + + } this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); } } var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); if (getF4 != null) { + FlowOperateId4 = getF4.FlowOperateId; this.txtForm4.Title = getF4.AuditFlowName + ":"; if (getF4.OperaterTime.HasValue) { if (getF4.IsAgree == true) { - // this.txtOpinion4.Text = "同意。"; + this.txtOpinion4.Text = "同意。"; } else { this.txtOpinion4.Text = getF4.Opinion; } - this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + if (!string.IsNullOrEmpty(getF4.SignatureUrl)) + { + this.Image4.ImageUrl = "~/" + getF4.SignatureUrl; + } + var signUser4 = UserService.GetUserByUserId(getF4.OperaterId); + if (signUser4 != null) + { + this.txtName4.Text = signUser4.UserName; + + } this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); } } + var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + if (getF5 != null) + { + FlowOperateId5 = getF5.FlowOperateId; + this.txtForm5.Title = getF5.AuditFlowName + ":"; + if (getF5.OperaterTime.HasValue) + { + if (getF5.IsAgree == true) + { + this.txtOpinion5.Text = "同意。"; + } + else + { + this.txtOpinion5.Text = getF5.Opinion; + } + if (!string.IsNullOrEmpty(getF5.SignatureUrl)) + { + this.Image5.ImageUrl = "~/" + getF5.SignatureUrl; + } + var signUser5= UserService.GetUserByUserId(getF5.OperaterId); + if (signUser5 != null) + { + this.txtName5.Text = signUser5.UserName; + + } + 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.txtOpinion4.Text = "同意。"; + } + else + { + this.txtOpinion6.Text = getF6.Opinion; + } + this.txtName6.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + } + } } } @@ -182,7 +269,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 11b61ebe..0214d996 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/BreakGroundView.aspx.designer.cs @@ -87,13 +87,31 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextBox txtWorkPalce; /// - /// txtWorkDepth 控件。 + /// txtWatchMan 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtWorkDepth; + protected global::FineUIPro.TextBox txtWatchMan; + + /// + /// txtWorkMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMan; + + /// + /// txtIdNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIdNum; /// /// txtWorkDate 控件。 @@ -141,13 +159,13 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextArea txtOpinion1; /// - /// HyperLink3 控件。 + /// HyperLink1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.HyperLink HyperLink3; + protected global::FineUIPro.HyperLink HyperLink1; /// /// txtName1 控件。 @@ -158,6 +176,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName1; + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; + /// /// txtTime1 控件。 /// @@ -186,13 +213,13 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextArea txtOpinion2; /// - /// HyperLink1 控件。 + /// HyperLink2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.HyperLink HyperLink1; + protected global::FineUIPro.HyperLink HyperLink2; /// /// txtName2 控件。 @@ -203,6 +230,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName2; + /// + /// Image2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image2; + /// /// txtTime2 控件。 /// @@ -231,13 +267,13 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextArea txtOpinion3; /// - /// HyperLink2 控件。 + /// HyperLink3 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.HyperLink HyperLink2; + protected global::FineUIPro.HyperLink HyperLink3; /// /// txtName3 控件。 @@ -248,6 +284,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName3; + /// + /// Image3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image3; + /// /// txtTime3 控件。 /// @@ -276,13 +321,13 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextArea txtOpinion4; /// - /// Label5 控件。 + /// HyperLink4 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label Label5; + protected global::FineUIPro.HyperLink HyperLink4; /// /// txtName4 控件。 @@ -293,6 +338,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName4; + /// + /// Image4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image4; + /// /// txtTime4 控件。 /// @@ -302,6 +356,105 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtTime4; + /// + /// txtForm5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm5; + + /// + /// txtOpinion5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion5; + + /// + /// HyperLink5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink5; + + /// + /// txtName5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName5; + + /// + /// Image5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image5; + + /// + /// txtTime5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime5; + + /// + /// txtForm6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm6; + + /// + /// txtOpinion6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion6; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtName6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName6; + + /// + /// txtTime6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime6; + /// /// txtCance 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx b/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx index 35109dbb..6f44ad21 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx @@ -66,13 +66,15 @@ HeaderTextAlign="Center" TextAlign="Center"> + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx.cs index 5ea8c7a5..22be0759 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/FireWork.aspx.cs @@ -293,8 +293,9 @@ namespace FineUIPro.Web.HSSE.License 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"); + string docfilename = Funs.GetNewFileName() ; + newUrl = uploadfilepath.Replace(".doc", docfilename + ".doc"); + filePath = initTemplatePath.Replace(".doc", docfilename + ".pdf"); File.Copy(uploadfilepath, newUrl); ///更新书签 var getFireWork = LicensePublicService.GetFireWorkById(Id); @@ -308,6 +309,8 @@ namespace FineUIPro.Web.HSSE.License } } Bookmark bookmarkApplyManName = doc.Range.Bookmarks["ApplyManName"];//申请人 + Bookmark bookmarkApplyManName1 = doc.Range.Bookmarks["ApplyManName1"];//申请人 + Bookmark bookmarkApplyManPhone = doc.Range.Bookmarks["ApplyManPhone"];//申请人 if (bookmarkApplyManName != null) { if (getFireWork != null) @@ -316,10 +319,21 @@ namespace FineUIPro.Web.HSSE.License if (getUser != null) { bookmarkApplyManName.Text = getUser.UserName; + if (bookmarkApplyManName1 != null) + { + bookmarkApplyManName1.Text = getUser.UserName; + } + if (bookmarkApplyManPhone != null) + { + bookmarkApplyManPhone.Text = getUser.Telephone; + } } } } + + + Bookmark bookmarkUnitName = doc.Range.Bookmarks["UnitName"];//申请单位 if (bookmarkUnitName != null) { @@ -346,11 +360,14 @@ namespace FineUIPro.Web.HSSE.License { if (getFireWork != null) { - var getUser = UserService.GetUserByUserId(getFireWork.FireWatchManId); - if (getUser != null) + //var getUser = UserService.GetUserByUserId(getFireWork.FireWatchManId); + //if (getUser != null) + //{ + if (!string.IsNullOrEmpty(getFireWork.FireWatchManName)) { bookmarkFireWatchManName.Text = getFireWork.FireWatchManName; } + //} } } @@ -379,6 +396,15 @@ namespace FineUIPro.Web.HSSE.License } } + Bookmark bookmarkAnalysisData = doc.Range.Bookmarks["AnalysisData"];//分析数据 + if (bookmarkAnalysisData != null&& getFireWork.AnalysisData!=null) + { + if (getFireWork != null) + { + bookmarkAnalysisData.Text = getFireWork.AnalysisData; + + } + } var GetLicenseItemList = LicensePublicService.GetLicenseItemListByDataId(Id); if (GetLicenseItemList.Count > 0) @@ -570,6 +596,12 @@ namespace FineUIPro.Web.HSSE.License } } } + Bookmark bookmarkMeasure8 = doc.Range.Bookmarks["Measure8"];// + if (bookmarkMeasure8 != null) + { + bookmarkMeasure8.Text = item8.SafetyMeasures; + } + } var item9 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 9); @@ -676,298 +708,159 @@ namespace FineUIPro.Web.HSSE.License 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) { - if (getF1.IsAgree == true) + if (!string.IsNullOrEmpty(getF1.Opinion)) { bookmarkOpinion1.Text = getF1.Opinion; } else { - bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + bookmarkOpinion1.Text = "同意。"; } } - - - } - Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; - if (bookmarkOperaterMan1 != null) - { - if (getF1.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + } + } + if (!string.IsNullOrEmpty(getF1.SignatureUrl) && File.Exists(rootPath + getF1.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF1.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null && getF1.OperaterTime.HasValue) { - 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; - } + 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); + 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) { - if (getF2.IsAgree == true) + if (!string.IsNullOrEmpty(getF2.Opinion)) { bookmarkOpinion2.Text = getF2.Opinion; } else { - bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + bookmarkOpinion2.Text = "同意。"; } } - } - Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; - if (bookmarkOperaterMan2 != null) - { - if (getF2.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + } + + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl) && File.Exists(rootPath + getF2.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + + var file = rootPath + getF2.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null && getF2.OperaterTime.HasValue) { - 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; - } + 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); + 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) { - if (getF3.IsAgree == true) + if (!string.IsNullOrEmpty(getF3.Opinion)) { bookmarkOpinion3.Text = getF3.Opinion; } else { - bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + bookmarkOpinion3.Text = "同意。"; } } - } - Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; - if (bookmarkOperaterMan3 != null) - { - if (getF3.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + } + } + if (!string.IsNullOrEmpty(getF3.SignatureUrl) && File.Exists(rootPath + getF3.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF3.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF3.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null && getF3.OperaterTime.HasValue) { - 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; - } + 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); + bookmarkOperaterTime3.Text = string.Format("{0:yyyy年MM月dd日 HH:mm}", getF3.OperaterTime); } } } @@ -988,7 +881,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Cancel"); - builders.InsertImage(file, 80, 20); + // builders.InsertImage(file, 80, 20); builders.Write("取消原因:" + getFireWork.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getFireWork.CancelTime)); } else @@ -1020,7 +913,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Close"); - builders.InsertImage(file, 80, 20); + // builders.InsertImage(file, 80, 20); builders.Write("关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getFireWork.CloseTime)); } else diff --git a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx index 36dc54b6..2d295737 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx @@ -37,7 +37,13 @@ - + + + + + + + @@ -49,7 +55,13 @@ - + + + + + + + @@ -67,10 +79,10 @@ HeaderText="检查单" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认执行" HeaderTextAlign="Center" TextAlign="Center" > + HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center" > @@ -81,19 +93,21 @@ - + - + - + + @@ -109,13 +123,15 @@ - + - + + @@ -135,13 +151,15 @@ - - - + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.cs index 9d813709..c6510fd3 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.cs @@ -117,7 +117,15 @@ { this.txtOpinion1.Text = getF1.Opinion; } - this.txtName1.Text = UserService.GetUserNameByUserId(getF1.OperaterId); + if (!string.IsNullOrEmpty(getF1.SignatureUrl)) + { + this.Image1.ImageUrl = "~/" + getF1.SignatureUrl; + } + var signUser1 = UserService.GetUserByUserId(getF1.OperaterId); + if (signUser1 != null) + { + this.txtName1.Text = signUser1.UserName; + } this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } @@ -137,7 +145,16 @@ { this.txtOpinion2.Text = getF2.Opinion; } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + if (!string.IsNullOrEmpty(getF2.SignatureUrl)) + { + this.Image2.ImageUrl = "~/" + getF2.SignatureUrl; + } + var signUser2 = UserService.GetUserByUserId(getF2.OperaterId); + if (signUser2 != null) + { + this.txtName2.Text = signUser2.UserName; + + } this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); } } @@ -157,7 +174,16 @@ { this.txtOpinion3.Text = getF3.Opinion; } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + if (!string.IsNullOrEmpty(getF3.SignatureUrl)) + { + this.Image3.ImageUrl = "~/" + getF3.SignatureUrl; + } + + var signUser3 = UserService.GetUserByUserId(getF3.OperaterId); + if (signUser3 != null) + { + this.txtName3.Text = signUser3.UserName; + } this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); } } @@ -188,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.FireWorkId +"'"; diff --git a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.designer.cs index dc917d32..f200dd8d 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/FireWorkView.aspx.designer.cs @@ -86,6 +86,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.TextBox txtFireWatchManName; + /// + /// TextBox1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox TextBox1; + /// /// txtWorkDate 控件。 /// @@ -104,6 +113,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.TextBox txtWorkMeasures; + /// + /// txtAnalysisData 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAnalysisData; + /// /// Grid1 控件。 /// @@ -149,6 +167,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName1; + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; + /// /// txtTime1 控件。 /// @@ -194,6 +221,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName2; + /// + /// Image2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image2; + /// /// txtTime2 控件。 /// @@ -239,6 +275,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName3; + /// + /// Image3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image3; + /// /// txtTime3 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/HSETechnical.aspx b/SGGL/FineUIPro.Web/HSSE/License/HSETechnical.aspx index edf3b190..48bcf1e4 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/HSETechnical.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/HSETechnical.aspx @@ -73,9 +73,9 @@ SortField="FlowOperateName" FieldType="String" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Left"> - <%-- --%> + diff --git a/SGGL/FineUIPro.Web/HSSE/License/HSETechnicalEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/HSETechnicalEdit.aspx.cs index 14862eb8..01bded25 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/HSETechnicalEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/HSETechnicalEdit.aspx.cs @@ -107,6 +107,15 @@ namespace FineUIPro.Web.HSSE.License private void InitDropDownList() { UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true); + + //var pUnit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId); + if (this.CurrUser.UnitId != Const.UnitId_CD) + { + this.drpUnitId.Enabled = false; + } + + + //参加人员 UserService.InitUserDropDownList(this.drpPartTechnicalMans, this.ProjectId, true); } diff --git a/SGGL/FineUIPro.Web/HSSE/License/HeightWork.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/HeightWork.aspx.cs index f1fd23ff..1b1b2760 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/HeightWork.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/HeightWork.aspx.cs @@ -293,8 +293,9 @@ namespace FineUIPro.Web.HSSE.License 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"); + string docfilename = Funs.GetNewFileName(); + newUrl = uploadfilepath.Replace(".doc", docfilename + ".doc"); + filePath = initTemplatePath.Replace(".doc", docfilename + ".pdf"); File.Copy(uploadfilepath, newUrl); ///更新书签 var getHeightWork = LicensePublicService.GetHeightWorkById(Id); @@ -308,6 +309,8 @@ namespace FineUIPro.Web.HSSE.License } } Bookmark bookmarkApplyManName = doc.Range.Bookmarks["ApplyManName"];//申请人 + Bookmark bookmarkApplyManName1 = doc.Range.Bookmarks["ApplyManName1"];//申请人 + Bookmark bookmarkApplyManPhone = doc.Range.Bookmarks["ApplyManPhone"];//申请人 if (bookmarkApplyManName != null) { if (getHeightWork != null) @@ -315,7 +318,15 @@ namespace FineUIPro.Web.HSSE.License var getUser = UserService.GetUserByUserId(getHeightWork.ApplyManId); if (getUser != null) { - bookmarkApplyManName.Text = getUser.UserName; + bookmarkApplyManName.Text = getUser.UserName; + if (bookmarkApplyManName1 != null) + { + bookmarkApplyManName1.Text = getUser.UserName; + } + if (bookmarkApplyManPhone != null) + { + bookmarkApplyManPhone.Text = getUser.Telephone; + } } @@ -674,9 +685,100 @@ 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 = "×"; + } + } + } + } + var item14 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 14); + if (item14 != null) + { + if (item14.IsUsed == true) + { + Bookmark bookmarkUser14 = doc.Range.Bookmarks["User14"];//确认执行 + if (bookmarkUser14 != null) + { + bookmarkUser14.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit14 = doc.Range.Bookmarks["IsFit14"]; + if (bookmarkIsFit14 != null) + { + if (item14 != null) + { + bookmarkIsFit14.Text = "×"; + } + } + } + } + var item15 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 15); + if (item15 != null) + { + if (item15.IsUsed == true) + { + Bookmark bookmarkUser15 = doc.Range.Bookmarks["User15"];//确认执行 + if (bookmarkUser15 != null) + { + bookmarkUser15.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit15 = doc.Range.Bookmarks["IsFit15"]; + if (bookmarkIsFit15 != null) + { + if (item15 != null) + { + bookmarkIsFit15.Text = "×"; + } + } + } + } + var item16 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 16); + if (item16 != null) + { + if (item16.IsUsed == true) + { + Bookmark bookmarkUser16 = doc.Range.Bookmarks["User16"];//确认执行 + if (bookmarkUser16 != null) + { + bookmarkUser16.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit16 = doc.Range.Bookmarks["IsFit16"]; + if (bookmarkIsFit16 != null) + { + if (item16 != null) + { + bookmarkIsFit16.Text = "×"; + } + } + } + } } + //审核记录 var getFlows = LicensePublicService.GetFlowOperateListByDataId(Id); if (getFlows.Count() > 0) @@ -684,106 +786,103 @@ namespace FineUIPro.Web.HSSE.License 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) { - if (getF1.IsAgree == true) + if (!string.IsNullOrEmpty(getF1.Opinion)) { bookmarkOpinion1.Text = getF1.Opinion; } else { - bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + bookmarkOpinion1.Text = "同意。"; } } - - - } - Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; - if (bookmarkOperaterMan1 != null) - { - if (getF1.OperaterTime.HasValue) + else { - 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; - } - } + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; } } + if (!string.IsNullOrEmpty(getF1.SignatureUrl) && File.Exists(rootPath + getF1.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF1.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null && getF1.OperaterTime.HasValue) + { + 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); + 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) { - if (getF2.IsAgree == true) + if (!string.IsNullOrEmpty(getF2.Opinion)) { bookmarkOpinion2.Text = getF2.Opinion; } else { - bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + bookmarkOpinion2.Text = "同意。"; } } - - - } - Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; - if (bookmarkOperaterMan2 != null) - { - if (getF2.OperaterTime.HasValue) + else { - 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; - } - } + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + } + + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl) && File.Exists(rootPath + getF2.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF2.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + + } + else + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null && getF2.OperaterTime.HasValue) + { + 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); + bookmarkOperaterTime2.Text = string.Format("{0:yyyy年MM月dd日 HH:mm}", getF2.OperaterTime); } } } @@ -800,202 +899,44 @@ namespace FineUIPro.Web.HSSE.License { if (getF3.IsAgree == true) { - bookmarkOpinion3.Text = getF3.Opinion; + if (!string.IsNullOrEmpty(getF3.Opinion)) + { + bookmarkOpinion3.Text = getF3.Opinion; + } + else + { + bookmarkOpinion3.Text = "同意。"; + } } else { bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; } } - - } - Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; - if (bookmarkOperaterMan3 != null) + if (!string.IsNullOrEmpty(getF3.SignatureUrl) && File.Exists(rootPath + getF3.SignatureUrl)) { - if (getF3.OperaterTime.HasValue) + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF3.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + + } + else + { + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null && 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; - } - } + 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); + bookmarkOperaterTime3.Text = string.Format("{0:yyyy年MM月dd日 HH:mm}", getF3.OperaterTime); } } } @@ -1016,7 +957,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Cancel"); - builders.InsertImage(file, 80, 20); + // builders.InsertImage(file, 80, 20); builders.Write("取消原因:" + getHeightWork.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.CancelTime)); } else @@ -1048,7 +989,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Close"); - builders.InsertImage(file, 80, 20); + // builders.InsertImage(file, 80, 20); builders.Write("关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.CloseTime)); } else diff --git a/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx b/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx index 201e45f5..b33ad6b3 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx @@ -37,7 +37,19 @@ - + + + + + + + + + + + + + @@ -73,10 +85,10 @@ HeaderText="检查单" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认执行" HeaderTextAlign="Center" TextAlign="Center" > + HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center" > @@ -93,12 +105,14 @@ - + + + @@ -114,12 +128,14 @@ - + + + @@ -139,12 +155,14 @@ - + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.cs index e089e798..c796ce5d 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.cs @@ -48,7 +48,9 @@ this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getHeightWork.ApplyUnitId); this.txtApplyManName.Text = UserService.GetUserNameByUserId(getHeightWork.ApplyManId); this.txtWorkPalce.Text = getHeightWork.WorkPalce; - this.txtWorkType.Text = getHeightWork.WorkType; + this.txtSafeMan.Text = getHeightWork.SafeMan; + this.txtWatchMan.Text = getHeightWork.WatchMan; + this.txtWorkMan.Text = getHeightWork.WorkMan; if (getHeightWork.ValidityStartTime.HasValue) { this.txtWorkDate.Text = getHeightWork.ValidityStartTime.Value.ToString("f") + " 至 "; @@ -113,7 +115,15 @@ { this.txtOpinion1.Text = getF1.Opinion; } - this.txtName1.Text = UserService.GetUserNameByUserId(getF1.OperaterId); + if (!string.IsNullOrEmpty(getF1.SignatureUrl)) + { + this.Image1.ImageUrl = "~/" + getF1.SignatureUrl; + } + var signUser1 = UserService.GetUserByUserId(getF1.OperaterId); + if (signUser1 != null) + { + this.txtName1.Text = signUser1.UserName; + } this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } @@ -133,7 +143,16 @@ { this.txtOpinion2.Text = getF2.Opinion; } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + if (!string.IsNullOrEmpty(getF2.SignatureUrl)) + { + this.Image2.ImageUrl = "~/" + getF2.SignatureUrl; + } + var signUser2 = UserService.GetUserByUserId(getF2.OperaterId); + if (signUser2 != null) + { + this.txtName2.Text = signUser2.UserName; + + } this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); } } @@ -153,7 +172,15 @@ { this.txtOpinion3.Text = getF3.Opinion; } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + if (!string.IsNullOrEmpty(getF3.SignatureUrl)) + { + this.Image3.ImageUrl = "~/" + getF3.SignatureUrl; + } + var signUser3 = UserService.GetUserByUserId(getF3.OperaterId); + if (signUser3 != null) + { + this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + } this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); } } @@ -185,7 +212,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 c8ccf503..1f8bd44e 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/HeightWorkView.aspx.designer.cs @@ -78,13 +78,31 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextBox txtWorkPalce; /// - /// txtWorkType 控件。 + /// txtSafeMan 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtWorkType; + protected global::FineUIPro.TextBox txtSafeMan; + + /// + /// txtWatchMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWatchMan; + + /// + /// txtWorkMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMan; /// /// txtWorkDate 控件。 @@ -158,6 +176,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName1; + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; + /// /// txtTime1 控件。 /// @@ -203,6 +230,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName2; + /// + /// Image2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image2; + /// /// txtTime2 控件。 /// @@ -248,6 +284,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName3; + /// + /// Image3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image3; + /// /// txtTime3 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx b/SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx new file mode 100644 index 00000000..01368700 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx @@ -0,0 +1,127 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JiaBan.aspx.cs" + Inherits="FineUIPro.Web.HSSE.License.JiaBan" %> + + + + + 加班作业票 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx.cs new file mode 100644 index 00000000..54667dfc --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx.cs @@ -0,0 +1,1031 @@ +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 JiaBan : 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.JiaBanId,license.ProjectId,license.LicenseCode,license.ApplyUnitId,ApplyUnit.UnitName AS ApplyUnitName,license.ApplyManId,license.ApplyDate,license.WorkPalce,license.ValidityStartTime,license.ValidityEndTime,license.WorkMeasures,license.States" + + @" ,(CASE WHEN license.States=-2 THEN '作废' 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,WorkType,EquipmentTools " + + @" FROM dbo.License_JiaBan 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) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + 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("JiaBanView.aspx?JiaBanId={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 jiaBan = LicensePublicService.GetJiaBanWorkById(rowID); + if (jiaBan != null) + { + LogService.AddSys_Log(this.CurrUser, jiaBan.LicenseCode, jiaBan.JiaBanId, Const.ProjectJiaBanWorkMenuId, Const.BtnDelete); + LicensePublicService.DeleteJiaBanById(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.ProjectJiaBanWorkMenuId); + 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; + string docfilename = Funs.GetNewFileName(); + newUrl = uploadfilepath.Replace(".doc", docfilename + ".doc"); + filePath = initTemplatePath.Replace(".doc", docfilename + ".pdf"); + File.Copy(uploadfilepath, newUrl); + ///更新书签 + var getHeightWork = LicensePublicService.GetJiaBanWorkById(Id); + Document doc = new Aspose.Words.Document(newUrl); + Bookmark bookmarkLicenseCode = doc.Range.Bookmarks["LicenseCode"];//编号 + if (bookmarkLicenseCode != null) + { + if (getHeightWork != null) + { + bookmarkLicenseCode.Text = getHeightWork.LicenseCode; + } + } + Bookmark bookmarkApplyManName = doc.Range.Bookmarks["ApplyManName"];//申请人 + if (bookmarkApplyManName != null) + { + if (getHeightWork != null) + { + var getUser = UserService.GetUserByUserId(getHeightWork.ApplyManId); + if (getUser != null) + { + bookmarkApplyManName.Text = getUser.UserName; + } + + + } + } + Bookmark bookmarkUnitName = doc.Range.Bookmarks["UnitName"];//申请单位 + if (bookmarkUnitName != null) + { + if (getHeightWork != null) + { + if (!string.IsNullOrEmpty(getHeightWork.ApplyUnitId)) + { + bookmarkUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(getHeightWork.ApplyUnitId); + } + + } + } + Bookmark bookmarkWorkPalce = doc.Range.Bookmarks["WorkPalce"];//作业地点 + if (bookmarkWorkPalce != null) + { + if (getHeightWork != null) + { + bookmarkWorkPalce.Text = getHeightWork.WorkPalce; + + } + } + Bookmark bookmarkWorkType = doc.Range.Bookmarks["WorkType"];//现场安全负责人 + if (bookmarkWorkType != null) + { + if (getHeightWork != null&&!string.IsNullOrEmpty(getHeightWork.SafeLeader)) + { + + bookmarkWorkType.Text = getHeightWork.SafeLeader; + + } + } + Bookmark bookmarkWorkLeader = doc.Range.Bookmarks["WorkLeader"];//现场负责人 + if (bookmarkWorkLeader != null) + { + if (bookmarkWorkLeader != null && !string.IsNullOrEmpty(getHeightWork.WorkLeader)) + { + + bookmarkWorkLeader.Text = getHeightWork.WorkLeader; + + } + } + Bookmark bookmarkPeopleNum = doc.Range.Bookmarks["PeopleNum"]; //加班人数 + if (bookmarkPeopleNum != null) + { + if (bookmarkPeopleNum != null && !string.IsNullOrEmpty(getHeightWork.PeopleNum)) + { + + bookmarkPeopleNum.Text = getHeightWork.PeopleNum; + + } + } + Bookmark bookmarkReason = doc.Range.Bookmarks["Reason"]; //加班事由 + if (bookmarkReason != null) + { + if (bookmarkReason != null && !string.IsNullOrEmpty(getHeightWork.Reason)) + { + + bookmarkReason.Text = getHeightWork.Reason; + + } + } + Bookmark bookmarkElectricalMan = doc.Range.Bookmarks["ElectricalMan"];//现场电工 + if (bookmarkElectricalMan != null) + { + if (bookmarkElectricalMan != null && !string.IsNullOrEmpty(getHeightWork.ElectricalMan)) + { + + bookmarkElectricalMan.Text = getHeightWork.ElectricalMan; + + } + } + + Bookmark bookmarkValidityDate = doc.Range.Bookmarks["ValidityDate"];//有效期限 + if (bookmarkValidityDate != null) + { + if (getHeightWork != null) + { + if (getHeightWork.ValidityStartTime.HasValue) + { + + bookmarkValidityDate.Text = getHeightWork.ValidityStartTime.Value.Year + "年" + getHeightWork.ValidityStartTime.Value.Month + "月" + getHeightWork.ValidityStartTime.Value.Day + "日" + getHeightWork.ValidityStartTime.Value.Hour + "时至"; + if (getHeightWork.ValidityEndTime.HasValue) + { + bookmarkValidityDate.Text += getHeightWork.ValidityEndTime.Value.Year + "年" + getHeightWork.ValidityEndTime.Value.Month + "月" + getHeightWork.ValidityEndTime.Value.Day + "日" + getHeightWork.ValidityEndTime.Value.Hour + "时"; + } + } + } + } + Bookmark bookmarkWorkMeasures = doc.Range.Bookmarks["WorkMeasures"];//作业内容 + if (bookmarkWorkMeasures != null) + { + if (getHeightWork != null) + { + bookmarkWorkMeasures.Text = getHeightWork.WorkMeasures; + + } + } + Bookmark bookmarkEquipmentTools = doc.Range.Bookmarks["EquipmentTools"];//设备及工具 + if (bookmarkEquipmentTools != null) + { + if (getHeightWork != null) + { + bookmarkEquipmentTools.Text = getHeightWork.EquipmentTools; + + } + } + 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) + { + Bookmark bookmarkOpinion1 = doc.Range.Bookmarks["Opinion1"]; + if (bookmarkOpinion1 != null) + { + if (getF1.IsAgree == true) + { + if (string.IsNullOrEmpty(getF1.Opinion)) + { + bookmarkOpinion1.Text = "同意。"; + + } + else + { + bookmarkOpinion1.Text = getF1.Opinion; + } + + } + else + { + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + } + } + if (!string.IsNullOrEmpty(getF1.SignatureUrl) && File.Exists(rootPath + getF1.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF1.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null && getF1.OperaterTime.HasValue) + { + 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) + { + Bookmark bookmarkOpinion2 = doc.Range.Bookmarks["Opinion2"]; + if (bookmarkOpinion2 != null) + { + + + + if (getF2.IsAgree == true) + { + if (string.IsNullOrEmpty(getF2.Opinion)) + { + bookmarkOpinion2.Text = "同意。"; + + } + else + { + bookmarkOpinion2.Text = getF2.Opinion; + } + } + else + { + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + } + + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl) && File.Exists(rootPath + getF2.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF2.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + + } + else + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null && getF2.OperaterTime.HasValue) + { + 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) + { + if (string.IsNullOrEmpty(getF3.Opinion)) + { + bookmarkOpinion3.Text = "同意。"; + + } + else + { + bookmarkOpinion3.Text = getF3.Opinion; + } + } + else + { + bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + } + } + } + if (!string.IsNullOrEmpty(getF3.SignatureUrl) && File.Exists(rootPath + getF3.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF3.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + + } + else + { + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null && getF3.OperaterTime.HasValue) + { + 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) + { + if (string.IsNullOrEmpty(getF4.Opinion)) + { + bookmarkOpinion4.Text = "同意。"; + + } + else + { + bookmarkOpinion4.Text = getF4.Opinion; + } + } + else + { + bookmarkOpinion4.Text = "不同意: " + getF4.Opinion; + } + } + } + if (!string.IsNullOrEmpty(getF4.SignatureUrl) && File.Exists(rootPath + getF4.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF4.SignatureUrl; + builders.MoveToBookmark("OperaterMan4"); + builders.InsertImage(file, 80, 20); + + } + else + { + Bookmark bookmarkOperaterMan4 = doc.Range.Bookmarks["OperaterMan4"]; + if (bookmarkOperaterMan4 != null && getF4.OperaterTime.HasValue) + { + 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); + } + } + } + + + + Bookmark bookmarkCance = doc.Range.Bookmarks["Cancel"];//取消 + if (bookmarkCance != null) + { + if (getHeightWork != null) + { + if (!string.IsNullOrEmpty(getHeightWork.CancelManId)) + { + var getUser = UserService.GetUserByUserId(getHeightWork.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("取消原因:" + getHeightWork.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.CancelTime)); + } + else + { + bookmarkCance.Text = getUser.UserName + " 取消原因:" + getHeightWork.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.CancelTime); + } + } + } + } + } + + Bookmark bookmarkClose = doc.Range.Bookmarks["Close"];//关闭 + if (bookmarkClose != null) + { + if (getHeightWork != null) + { + if (!string.IsNullOrEmpty(getHeightWork.CloseManId)) + { + var getUser = UserService.GetUserByUserId(getHeightWork.CloseManId); + if (getUser != null) + { + if (!string.IsNullOrEmpty(getHeightWork.CloseReasons)) + { + bookmarkClose.Text = getHeightWork.CloseReasons + " 关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.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}", getHeightWork.CloseTime)); + } + else + { + bookmarkClose.Text = getUser.UserName + " 关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.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/JiaBan.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx.designer.cs new file mode 100644 index 00000000..75875742 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/JiaBan.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class JiaBan + { + + /// + /// 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/JiaBanView.aspx b/SGGL/FineUIPro.Web/HSSE/License/JiaBanView.aspx new file mode 100644 index 00000000..5d16ae6d --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/JiaBanView.aspx @@ -0,0 +1,242 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JiaBanView.aspx.cs" + Inherits="FineUIPro.Web.HSSE.License.JiaBanView" %> + + + + + 高处作业票 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/License/JiaBanView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/JiaBanView.aspx.cs new file mode 100644 index 00000000..d2a3a769 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/JiaBanView.aspx.cs @@ -0,0 +1,244 @@ +namespace FineUIPro.Web.HSSE.License +{ + using BLL; + using System; + using System.Collections.Generic; + using System.Data; + using System.Data.SqlClient; + using System.Linq; + + public partial class JiaBanView : PageBase + { + #region 定义项 + /// + /// 主键 + /// + private string JiaBanId + { + get + { + return (string)ViewState["JiaBanId"]; + } + set + { + ViewState["JiaBanId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.SimpleForm1.Title = UnitService.GetUnitNameByUnitId(Const.UnitId_CD) + this.Title; + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.JiaBanId = Request.Params["JiaBanId"]; + if (!string.IsNullOrEmpty(this.JiaBanId)) + { + var getHeightWork = LicensePublicService.GetJiaBanWorkById(this.JiaBanId); + if (getHeightWork != null) + { + this.lbLicenseCode.Text = getHeightWork.LicenseCode; + this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getHeightWork.ApplyUnitId); + this.txtApplyManName.Text = UserService.GetUserNameByUserId(getHeightWork.ApplyManId); + this.txtWorkPalce.Text = getHeightWork.WorkPalce; + this.txtSafeLeader.Text = getHeightWork.SafeLeader; + this.txtWorkLeader.Text = getHeightWork.WorkLeader; + this.txtPeopleNum.Text = getHeightWork.PeopleNum; + this.txtReason.Text = getHeightWork.Reason; + this.txtElectricalMan.Text = getHeightWork.ElectricalMan; + if (getHeightWork.ValidityStartTime.HasValue) + { + this.txtWorkDate.Text = getHeightWork.ValidityStartTime.Value.ToString("f") + " 至 "; + if (getHeightWork.ValidityEndTime.HasValue) + { + this.txtWorkDate.Text += getHeightWork.ValidityEndTime.Value.ToString("f"); + } + } + this.txtEquipmentTools.Text = getHeightWork.EquipmentTools; + this.txtWorkMeasures.Text = getHeightWork.WorkMeasures; + if (!string.IsNullOrEmpty(getHeightWork.CancelManId)) + { + this.txtCance.Text = UserService.GetUserNameByUserId(getHeightWork.CancelManId) + ";取消时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.CancelTime) + ";原因:" + getHeightWork.CancelReasons + "。"; + } + if (!string.IsNullOrEmpty(getHeightWork.CloseManId)) + { + if (!string.IsNullOrEmpty(getHeightWork.CloseReasons)) + { + this.txtClose.Text = getHeightWork.CloseReasons + " 关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.CloseTime) + "。"; + } + else + { + this.txtClose.Text = UserService.GetUserNameByUserId(getHeightWork.CloseManId) + ";关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getHeightWork.CloseTime) + "。"; + } + } + } + } + // 绑定表格 + this.BindGrid(); + this.SetFlow(); + } + } + #endregion + + #region 获取审核记录信息 + public string FlowOperateId1; + public string FlowOperateId2; + public string FlowOperateId3; + public string FlowOperateId4; + /// + /// + /// + private void SetFlow() + { + var getFlows = LicensePublicService.GetFlowOperateListByDataId(this.JiaBanId); + if (getFlows.Count() > 0) + { + var getF1 = getFlows.FirstOrDefault(x => x.SortIndex == 1); + if (getF1 != null) + { + FlowOperateId1 = getF1.FlowOperateId; + this.txtForm1.Title = getF1.AuditFlowName + ":"; + if (getF1.OperaterTime.HasValue) + { + if (getF1.IsAgree == true) + { + this.txtOpinion1.Text = "同意。"; + } + else + { + this.txtOpinion1.Text = getF1.Opinion; + } + if (!string.IsNullOrEmpty(getF1.SignatureUrl)) + { + this.Image1.ImageUrl = "~/" + getF1.SignatureUrl; + } + var signUser1 = UserService.GetUserByUserId(getF1.OperaterId); + if (signUser1 != null) + { + this.txtName1.Text = signUser1.UserName; + } + this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); + } + } + var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + if (getF2 != null) + { + FlowOperateId2 = getF2.FlowOperateId; + + this.txtForm2.Title = getF2.AuditFlowName + ":"; + if (getF2.OperaterTime.HasValue) + { + if (getF2.IsAgree == true) + { + this.txtOpinion2.Text = "同意。"; + } + else + { + this.txtOpinion2.Text = getF2.Opinion; + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl)) + { + this.Image2.ImageUrl = "~/" + getF2.SignatureUrl; + } + var signUser2 = UserService.GetUserByUserId(getF2.OperaterId); + if (signUser2 != null) + { + this.txtName2.Text = signUser2.UserName; + + } + this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + } + } + var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + if (getF3 != null) + { + FlowOperateId3 = getF3.FlowOperateId; + + this.txtForm3.Title = getF3.AuditFlowName + ":"; + if (getF3.OperaterTime.HasValue) + { + if (getF3.IsAgree == true) + { + this.txtOpinion3.Text = "同意。"; + } + else + { + this.txtOpinion3.Text = getF3.Opinion; + } + if (!string.IsNullOrEmpty(getF3.SignatureUrl)) + { + this.Image3.ImageUrl = "~/" + getF3.SignatureUrl; + } + var signUser3 = UserService.GetUserByUserId(getF3.OperaterId); + if (signUser3 != null) + { + 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) + { + FlowOperateId4 = getF4.FlowOperateId; + + this.txtForm4.Title = getF4.AuditFlowName + ":"; + if (getF4.OperaterTime.HasValue) + { + if (getF4.IsAgree == true) + { + this.txtOpinion4.Text = "同意。"; + } + else + { + this.txtOpinion4.Text = getF4.Opinion; + } + if (!string.IsNullOrEmpty(getF4.SignatureUrl)) + { + this.Image4.ImageUrl = "~/" + getF4.SignatureUrl; + } + var signUser4 = UserService.GetUserByUserId(getF4.OperaterId); + if (signUser4 != null) + { + this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + } + this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.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.JiaBanId + "'"; + 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(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/License/JiaBanView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/JiaBanView.aspx.designer.cs new file mode 100644 index 00000000..e0f034ff --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/JiaBanView.aspx.designer.cs @@ -0,0 +1,431 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class JiaBanView + { + + /// + /// 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; + + /// + /// txtApplyUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApplyUnit; + + /// + /// txtApplyManName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApplyManName; + + /// + /// txtWorkPalce 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkPalce; + + /// + /// txtSafeLeader 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSafeLeader; + + /// + /// txtReason 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtReason; + + /// + /// txtWorkLeader 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkLeader; + + /// + /// txtPeopleNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPeopleNum; + + /// + /// txtElectricalMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtElectricalMan; + + /// + /// txtWorkDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkDate; + + /// + /// txtWorkMeasures 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMeasures; + + /// + /// txtEquipmentTools 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEquipmentTools; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm1; + + /// + /// txtOpinion1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion1; + + /// + /// HyperLink3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink3; + + /// + /// txtName1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName1; + + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; + + /// + /// txtTime1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime1; + + /// + /// txtForm2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm2; + + /// + /// txtOpinion2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion2; + + /// + /// HyperLink1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink1; + + /// + /// txtName2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName2; + + /// + /// Image2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image2; + + /// + /// txtTime2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime2; + + /// + /// txtForm3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm3; + + /// + /// txtOpinion3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion3; + + /// + /// HyperLink2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink2; + + /// + /// txtName3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName3; + + /// + /// Image3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image3; + + /// + /// txtTime3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime3; + + /// + /// txtForm4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm4; + + /// + /// txtOpinion4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion4; + + /// + /// HyperLink4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink4; + + /// + /// txtName4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName4; + + /// + /// Image4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image4; + + /// + /// txtTime4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime4; + + /// + /// txtCance 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCance; + + /// + /// txtClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtClose; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// 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/LicenseManager.aspx b/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx index 87304df9..08c1c3d5 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx @@ -25,10 +25,13 @@ AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" Width="220px" LabelWidth="50px" LabelAlign="right"> - - + + @@ -36,6 +39,11 @@ + + + + +
private void BindGrid() { - string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.LicenseTypeId,CodeRecords.Code AS LicenseManagerCode,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.UserName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate" + string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.LicenseTypeId,CodeRecords.Code AS LicenseManagerCode,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.UnitTypeName,LicenseManager.UserName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate" + @" ,(CASE WHEN LicenseManager.States = " + BLL.Const.State_0 + " OR LicenseManager.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN LicenseManager.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName" + @" FROM View_License_LicenseManager AS LicenseManager " + @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON LicenseManager.LicenseManagerId=CodeRecords.DataId " @@ -117,6 +118,11 @@ namespace FineUIPro.Web.HSSE.License strSql += " AND LicenseManager.UnitId = @UnitId2"; listStr.Add(new SqlParameter("@UnitId2", this.drpUnit.SelectedValue)); } + if (this.drpUnitType.SelectedValue!=BLL.Const._Null) + { + strSql += " AND LicenseManager.UnitTypeId = @UnitTypeId"; + listStr.Add(new SqlParameter("@UnitTypeId", this.drpUnitType.SelectedValue)); + } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); diff --git a/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.designer.cs index 31957023..46633d25 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/LicenseManager.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.License { - - - public partial class LicenseManager { - +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class LicenseManager + { + /// /// 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; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// drpLicenseType 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpLicenseType; - + /// /// drpUnit 控件。 /// @@ -74,7 +76,16 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + + /// + /// drpUnitType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitType; + /// /// txtStartDate 控件。 /// @@ -83,7 +94,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtStartDate; - + /// /// lblTo 控件。 /// @@ -92,7 +103,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lblTo; - + /// /// txtEndDate 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtEndDate; - + /// /// ToolbarFill1 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnNew 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnOut 控件。 /// @@ -128,7 +139,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// lblNumber 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblNumber; - + /// /// ToolbarSeparator1 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -155,7 +166,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -164,7 +175,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -173,7 +184,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// WindowAtt 控件。 /// @@ -182,7 +193,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowAtt; - + /// /// Menu1 控件。 /// @@ -191,7 +202,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuEdit 控件。 /// @@ -200,7 +211,7 @@ namespace FineUIPro.Web.HSSE.License { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuDelete 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/LiftingWork.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/LiftingWork.aspx.cs index 5132ffc2..36c8c730 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LiftingWork.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/LiftingWork.aspx.cs @@ -294,8 +294,9 @@ namespace FineUIPro.Web.HSSE.License 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"); + string docfilename = Funs.GetNewFileName(); + newUrl = uploadfilepath.Replace(".doc", docfilename + ".doc"); + filePath = initTemplatePath.Replace(".doc", docfilename + ".pdf"); File.Copy(uploadfilepath, newUrl); ///更新书签 var getLiftingWork = LicensePublicService.GetLiftingWorkById(Id); @@ -309,6 +310,8 @@ namespace FineUIPro.Web.HSSE.License } } Bookmark bookmarkApplyManName = doc.Range.Bookmarks["ApplyManName"];//申请人 + Bookmark bookmarkApplyManName1 = doc.Range.Bookmarks["ApplyManName1"];//申请人 + Bookmark bookmarkApplyManPhone = doc.Range.Bookmarks["ApplyManPhone"];//申请人 if (bookmarkApplyManName != null) { if (getLiftingWork != null) @@ -316,7 +319,15 @@ namespace FineUIPro.Web.HSSE.License var getUser = UserService.GetUserByUserId(getLiftingWork.ApplyManId); if (getUser != null) { - bookmarkApplyManName.Text = getUser.UserName; + bookmarkApplyManName.Text = getUser.UserName; + if (bookmarkApplyManName1 != null) + { + bookmarkApplyManName1.Text = getUser.UserName; + } + if (bookmarkApplyManPhone != null) + { + bookmarkApplyManPhone.Text = getUser.Telephone; + } } @@ -343,12 +354,57 @@ namespace FineUIPro.Web.HSSE.License } } - Bookmark bookmarkWorkLevel = doc.Range.Bookmarks["WorkLevel"];//级别 - if (bookmarkWorkLevel != null) + Bookmark bookmarkSafeMan = doc.Range.Bookmarks["SafeMan"];// + if (bookmarkSafeMan != null) { - if (getLiftingWork != null) + if (getLiftingWork != null&&!string.IsNullOrEmpty(getLiftingWork.SafeMan)) { - bookmarkWorkLevel.Text = getLiftingWork.WorkLevel; + bookmarkSafeMan.Text = getLiftingWork.SafeMan; + + } + } + Bookmark bookmarkControlMan = doc.Range.Bookmarks["ControlMan"];// + if (bookmarkControlMan != null) + { + if (getLiftingWork != null && !string.IsNullOrEmpty(getLiftingWork.ControlMan)) + { + bookmarkControlMan.Text = getLiftingWork.ControlMan; + + } + } + Bookmark bookmarkCarNum = doc.Range.Bookmarks["CarNum"];// + if (bookmarkCarNum != null) + { + if (getLiftingWork != null && !string.IsNullOrEmpty(getLiftingWork.CarNum)) + { + bookmarkCarNum.Text = getLiftingWork.CarNum; + + } + } + Bookmark bookmarkDriverMan = doc.Range.Bookmarks["DriverMan"];// + if (bookmarkDriverMan != null) + { + if (getLiftingWork != null && !string.IsNullOrEmpty(getLiftingWork.DriverMan)) + { + bookmarkDriverMan.Text = getLiftingWork.DriverMan; + + } + } + Bookmark bookmarkOtherMan = doc.Range.Bookmarks["OtherMan"];// + if (bookmarkOtherMan != null) + { + if (getLiftingWork != null && !string.IsNullOrEmpty(getLiftingWork.OtherMan)) + { + bookmarkOtherMan.Text = getLiftingWork.OtherMan; + + } + } + Bookmark bookmarkWatchMan = doc.Range.Bookmarks["WatchMan"];// + if (bookmarkWatchMan != null) + { + if (getLiftingWork != null && !string.IsNullOrEmpty(getLiftingWork.WatchMan)) + { + bookmarkWatchMan.Text = getLiftingWork.WatchMan; } } @@ -674,8 +730,75 @@ 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 = "×"; + } + } + } + } + var item14 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 14); + if (item14 != null) + { + if (item14.IsUsed == true) + { + Bookmark bookmarkUser14 = doc.Range.Bookmarks["User14"];//确认执行 + if (bookmarkUser14 != null) + { + bookmarkUser14.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit14 = doc.Range.Bookmarks["IsFit14"]; + if (bookmarkIsFit14 != null) + { + if (item14 != null) + { + bookmarkIsFit14.Text = "×"; + } + } + } + } + var item15 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 15); + if (item15 != null) + { + if (item15.IsUsed == true) + { + Bookmark bookmarkUser15 = doc.Range.Bookmarks["User15"];//确认执行 + if (bookmarkUser15 != null) + { + bookmarkUser15.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit15 = doc.Range.Bookmarks["IsFit15"]; + if (bookmarkIsFit15 != null) + { + if (item15 != null) + { + bookmarkIsFit15.Text = "×"; + } + } + } + } } //审核记录 var getFlows = LicensePublicService.GetFlowOperateListByDataId(Id); @@ -684,321 +807,318 @@ namespace FineUIPro.Web.HSSE.License var getF1 = getFlows.FirstOrDefault(x => x.SortIndex == 1); if (getF1 != null) { - var getUser = UserService.GetUserByUserId(getF1.OperaterId); - Bookmark bookmarkOpinion1 = doc.Range.Bookmarks["Opinion1"]; + Bookmark bookmarkOpinion1 = doc.Range.Bookmarks["Opinion1"]; if (bookmarkOpinion1 != null) { - - - if (getUser != null) + if (getF1.IsAgree == true) { - if (getF1.IsAgree == true) + if (string.IsNullOrEmpty(getF1.Opinion)) { - bookmarkOpinion1.Text = getF1.Opinion; + bookmarkOpinion1.Text = "同意。"; } else { - bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + bookmarkOpinion1.Text = getF1.Opinion; } } - - - } - Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; - if (bookmarkOperaterMan1 != null) - { - if (getF1.OperaterTime.HasValue) + else { - 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; - } - } + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; } } + if (!string.IsNullOrEmpty(getF1.SignatureUrl) && File.Exists(rootPath + getF1.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF1.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null && getF1.OperaterTime.HasValue) + { + 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); + 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) { - if (getF2.IsAgree == true) + if (string.IsNullOrEmpty(getF2.Opinion)) { - bookmarkOpinion2.Text = getF2.Opinion; + bookmarkOpinion2.Text = "同意。"; } else { - bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + bookmarkOpinion2.Text = getF2.Opinion; } } - - - } - Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; - if (bookmarkOperaterMan2 != null) - { - if (getF2.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + } + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl) && File.Exists(rootPath + getF2.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF2.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null && getF2.OperaterTime.HasValue) { - 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; - } + 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); + 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) { - if (getF3.IsAgree == true) + if (string.IsNullOrEmpty(getF3.Opinion)) { - bookmarkOpinion3.Text = getF3.Opinion; + bookmarkOpinion3.Text = "同意。"; } else { - bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + bookmarkOpinion3.Text = getF3.Opinion; } } - - - } - Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; - if (bookmarkOperaterMan3 != null) - { - if (getF3.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + } + } + if (!string.IsNullOrEmpty(getF3.SignatureUrl) && File.Exists(rootPath + getF3.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + + var file = rootPath + getF3.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF3.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null && getF3.OperaterTime.HasValue) { - 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; - } + 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); + 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) - { + //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; - } - } + // 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) - { + // } + // 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; - } - } + // 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) - { + // } + // 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; - } - } + // 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 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"];//取消 @@ -1016,7 +1136,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Cancel"); - builders.InsertImage(file, 80, 20); + //builders.InsertImage(file, 80, 20); builders.Write("取消原因:" + getLiftingWork.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getLiftingWork.CancelTime)); } else @@ -1048,7 +1168,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Close"); - builders.InsertImage(file, 80, 20); + // builders.InsertImage(file, 80, 20); builders.Write("关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getLiftingWork.CloseTime)); } else diff --git a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx index b34ac443..4ecee326 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx @@ -37,10 +37,28 @@ - + + + + + + + + + + + + + + + + + + + @@ -73,10 +91,10 @@ HeaderText="检查单" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认执行" HeaderTextAlign="Center" TextAlign="Center" > + HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center" > @@ -93,12 +111,14 @@ - + + + @@ -114,12 +134,14 @@ - + + + @@ -139,12 +161,14 @@ - + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.cs index 1172a436..4610c953 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.cs @@ -48,7 +48,12 @@ this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getLiftingWork.ApplyUnitId); this.txtApplyManName.Text = UserService.GetUserNameByUserId(getLiftingWork.ApplyManId); this.txtWorkPalce.Text = getLiftingWork.WorkPalce; - this.txtWorkLevel.Text = getLiftingWork.WorkLevel; + this.txtSafeMan.Text = getLiftingWork.SafeMan; + this.txtControlMan.Text = getLiftingWork.ControlMan; + this.txtDriverMan.Text = getLiftingWork.DriverMan; + this.txtCarNum.Text = getLiftingWork.CarNum; + this.txtOtherMan.Text = getLiftingWork.OtherMan; + this.txtWatchMan.Text = getLiftingWork.WatchMan; if (getLiftingWork.ValidityStartTime.HasValue) { this.txtWorkDate.Text = getLiftingWork.ValidityStartTime.Value.ToString("f") + " 至 "; @@ -114,7 +119,15 @@ { this.txtOpinion1.Text = getF1.Opinion; } - this.txtName1.Text = UserService.GetUserNameByUserId(getF1.OperaterId); + if (!string.IsNullOrEmpty(getF1.SignatureUrl)) + { + this.Image1.ImageUrl = "~/" + getF1.SignatureUrl; + } + var signUser1 = UserService.GetUserByUserId(getF1.OperaterId); + if (signUser1 != null) + { + this.txtName1.Text = signUser1.UserName; + } this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } @@ -134,7 +147,16 @@ { this.txtOpinion2.Text = getF2.Opinion; } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + if (!string.IsNullOrEmpty(getF2.SignatureUrl)) + { + this.Image2.ImageUrl = "~/" + getF2.SignatureUrl; + } + var signUser2 = UserService.GetUserByUserId(getF2.OperaterId); + if (signUser2 != null) + { + this.txtName2.Text = signUser2.UserName; + + } this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); } } @@ -154,7 +176,16 @@ { this.txtOpinion3.Text = getF3.Opinion; } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + if (!string.IsNullOrEmpty(getF3.SignatureUrl)) + { + this.Image3.ImageUrl = "~/" + getF3.SignatureUrl; + } + var signUser3 = UserService.GetUserByUserId(getF3.OperaterId); + if (signUser3 != null) + { + this.txtName3.Text = signUser3.UserName; + + } this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); } } @@ -185,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.LiftingWorkId +"'"; diff --git a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.designer.cs index 80f65e09..dcd64360 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/LiftingWorkView.aspx.designer.cs @@ -78,13 +78,58 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextBox txtWorkPalce; /// - /// txtWorkLevel 控件。 + /// txtSafeMan 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtWorkLevel; + protected global::FineUIPro.TextBox txtSafeMan; + + /// + /// txtControlMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtControlMan; + + /// + /// txtDriverMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDriverMan; + + /// + /// txtCarNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCarNum; + + /// + /// txtOtherMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtOtherMan; + + /// + /// txtWatchMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWatchMan; /// /// txtWorkDate 控件。 @@ -158,6 +203,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName1; + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; + /// /// txtTime1 控件。 /// @@ -203,6 +257,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName2; + /// + /// Image2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image2; + /// /// txtTime2 控件。 /// @@ -248,6 +311,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName3; + /// + /// Image3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image3; + /// /// txtTime3 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpace.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpace.aspx.cs index 09b7ec7b..4f9cd671 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpace.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpace.aspx.cs @@ -78,14 +78,14 @@ namespace FineUIPro.Web.HSSE.License + @" ,(CASE WHEN license.States=-2 THEN '作废' 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_LimitedSpace AS license " + @" LEFT JOIN Base_Unit AS ApplyUnit ON license.ApplyUnitId =ApplyUnit.UnitId" - + @" WHERE license.ProjectId= '" + this.ProjectId +"'"; + + @" 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"; @@ -100,7 +100,7 @@ namespace FineUIPro.Web.HSSE.License DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; - + var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; Grid1.DataBind(); @@ -293,8 +293,9 @@ namespace FineUIPro.Web.HSSE.License 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"); + string docfilename = Funs.GetNewFileName(); + newUrl = uploadfilepath.Replace(".doc", docfilename + ".doc"); + filePath = initTemplatePath.Replace(".doc", docfilename + ".pdf"); File.Copy(uploadfilepath, newUrl); ///更新书签 var getLimitedSpace = LicensePublicService.GetLimitedSpaceById(Id); @@ -308,6 +309,8 @@ namespace FineUIPro.Web.HSSE.License } } Bookmark bookmarkApplyManName = doc.Range.Bookmarks["ApplyManName"];//申请人 + Bookmark bookmarkApplyManName1 = doc.Range.Bookmarks["ApplyManName1"];//申请人 + Bookmark bookmarkApplyManPhone = doc.Range.Bookmarks["ApplyManPhone"];//申请人 if (bookmarkApplyManName != null) { if (getLimitedSpace != null) @@ -315,7 +318,15 @@ namespace FineUIPro.Web.HSSE.License var getUser = UserService.GetUserByUserId(getLimitedSpace.ApplyManId); if (getUser != null) { - bookmarkApplyManName.Text = getUser.UserName; + bookmarkApplyManName.Text = getUser.UserName; + if (bookmarkApplyManName1 != null) + { + bookmarkApplyManName1.Text = getUser.UserName; + } + if (bookmarkApplyManPhone != null) + { + bookmarkApplyManPhone.Text = getUser.Telephone; + } } @@ -333,6 +344,54 @@ namespace FineUIPro.Web.HSSE.License } } + Bookmark bookmarkO2Density = doc.Range.Bookmarks["O2Density"];//氧气含量 + if (bookmarkO2Density != null) + { + if (getLimitedSpace != null) + { + if (!string.IsNullOrEmpty(getLimitedSpace.O2Density)) + { + bookmarkO2Density.Text = getLimitedSpace.O2Density; + } + + } + } + Bookmark bookmarkManAndDate = doc.Range.Bookmarks["ManAndDate"];//测定人及日期 + if (bookmarkManAndDate != null) + { + if (getLimitedSpace != null) + { + if (!string.IsNullOrEmpty(getLimitedSpace.ManAndDate)) + { + bookmarkManAndDate.Text = getLimitedSpace.ManAndDate; + } + + } + } + Bookmark bookmarkResponsibleManPhone = doc.Range.Bookmarks["ResponsibleManPhone"];//负责人电话 + if (bookmarkResponsibleManPhone != null) + { + if (getLimitedSpace != null) + { + if (!string.IsNullOrEmpty(getLimitedSpace.ResponsibleManPhone)) + { + bookmarkResponsibleManPhone.Text = getLimitedSpace.ResponsibleManPhone; + } + + } + } + Bookmark bookmarkWorkMan = doc.Range.Bookmarks["WorkMan"];//工作人员 + if (bookmarkWorkMan != null) + { + if (getLimitedSpace != null) + { + if (!string.IsNullOrEmpty(getLimitedSpace.WorkMan)) + { + bookmarkWorkMan.Text = getLimitedSpace.WorkMan; + } + + } + } Bookmark bookmarkWorkPalce = doc.Range.Bookmarks["WorkPalce"];//作业地点 if (bookmarkWorkPalce != null) { @@ -350,7 +409,7 @@ namespace FineUIPro.Web.HSSE.License var getUser = UserService.GetUserByUserId(getLimitedSpace.FireWatchManId); if (getUser != null) { - bookmarkFireWatchManName.Text = getUser.UserName; + bookmarkFireWatchManName.Text = getUser.UserName; } else { @@ -384,7 +443,15 @@ namespace FineUIPro.Web.HSSE.License } } + Bookmark bookmarkTools = doc.Range.Bookmarks["Tools"];//工具 + if (bookmarkTools != null) + { + if (getLimitedSpace != null&&!string.IsNullOrEmpty(getLimitedSpace.Tools)) + { + bookmarkTools.Text = getLimitedSpace.Tools; + } + } var GetLicenseItemList = LicensePublicService.GetLicenseItemListByDataId(Id); if (GetLicenseItemList.Count > 0) { @@ -673,7 +740,29 @@ 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 = "×"; + } + } + } + } } //审核记录 @@ -689,315 +778,163 @@ namespace FineUIPro.Web.HSSE.License { - if (getUser != null) + + if (getF1.IsAgree == true) { - if (getF1.IsAgree == true) + if (string.IsNullOrEmpty(getF1.Opinion)) { - bookmarkOpinion1.Text = getF1.Opinion; + bookmarkOpinion1.Text = "同意。"; } else { - bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + bookmarkOpinion1.Text = getF1.Opinion; } } - - - } - Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; - if (bookmarkOperaterMan1 != null) - { - if (getF1.OperaterTime.HasValue) + else { - 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; - } - } + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; } } + if (!string.IsNullOrEmpty(getF1.SignatureUrl) && File.Exists(rootPath + getF1.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + + var file = rootPath + getF1.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else if (getUser != null) + { + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null && getF1.OperaterTime.HasValue) + { + 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); + 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) { - if (getF2.IsAgree == true) + if (string.IsNullOrEmpty(getF2.Opinion)) { - bookmarkOpinion2.Text = getF2.Opinion; + bookmarkOpinion2.Text = "同意。"; } else { - bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + bookmarkOpinion2.Text = getF2.Opinion; } } - - - } - Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; - if (bookmarkOperaterMan2 != null) - { - if (getF2.OperaterTime.HasValue) + else { - 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; - } - } + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; } } + if (!string.IsNullOrEmpty(getF2.SignatureUrl) && File.Exists(rootPath + getF2.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF2.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null) + { + 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); + 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) { - if (getF3.IsAgree == true) + if (string.IsNullOrEmpty(getF3.Opinion)) { - bookmarkOpinion3.Text = getF3.Opinion; + bookmarkOpinion3.Text = "同意。"; } else { - bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + bookmarkOpinion3.Text = getF3.Opinion; } } - - - } - Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; - if (bookmarkOperaterMan3 != null) - { - if (getF3.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + } + } + if (!string.IsNullOrEmpty(getF3.SignatureUrl) && File.Exists(rootPath + getF3.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF3.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF3.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null && getF3.OperaterTime.HasValue) { - 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; - } + 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); + bookmarkOperaterTime3.Text = string.Format("{0:yyyy年MM月dd日 HH:mm}", getF3.OperaterTime); } } } + } Bookmark bookmarkCance = doc.Range.Bookmarks["Cance"];//取消 @@ -1015,7 +952,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Cance"); - builders.InsertImage(file, 80, 20); + // builders.InsertImage(file, 80, 20); builders.Write("取消原因:" + getLimitedSpace.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getLimitedSpace.CancelTime)); } else @@ -1047,7 +984,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Close"); - builders.InsertImage(file, 80, 20); + //builders.InsertImage(file, 80, 20); builders.Write("关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getLimitedSpace.CloseTime)); } else diff --git a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx index 9f605ec5..ae7fa307 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx @@ -32,27 +32,56 @@ - + - - - + + + - - - + + + + + + + + + + + + + - + + + + + + + + - + + + + + + + + + + + + + + HeaderText="确认执行" HeaderTextAlign="Center" TextAlign="Center" > + HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center" > @@ -87,12 +116,14 @@ - + - + + @@ -108,12 +139,14 @@ - + - + + @@ -133,12 +166,15 @@ - + - - - + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.cs index b77c38a2..ceb82e62 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.cs @@ -48,6 +48,13 @@ this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getLimitedSpace.ApplyUnitId); this.txtApplyManName.Text = UserService.GetUserNameByUserId(getLimitedSpace.ApplyManId); this.txtWorkPalce.Text = getLimitedSpace.WorkPalce; + this.txtO2Density.Text = getLimitedSpace.O2Density; + this.txtManAndDate.Text = getLimitedSpace.ManAndDate; + this.txtResponsibleManPhone.Text = getLimitedSpace.ResponsibleManPhone; + this.txtWorkMan.Text = getLimitedSpace.WorkMan; + this.txtTools.Text = getLimitedSpace.Tools; + + string name = getLimitedSpace.FireWatchManName; if (string.IsNullOrEmpty(getLimitedSpace.FireWatchManName)) { @@ -117,7 +124,16 @@ { this.txtOpinion1.Text = getF1.Opinion; } - this.txtName1.Text = UserService.GetUserNameByUserId(getF1.OperaterId); + if (!string.IsNullOrEmpty(getF1.SignatureUrl)) + { + this.Image1.ImageUrl = "~/" + getF1.SignatureUrl; + } + var signUser1 = UserService.GetUserByUserId(getF1.OperaterId); + if (signUser1 != null) + { + this.txtName1.Text = signUser1.UserName; + + } this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } @@ -137,7 +153,16 @@ { this.txtOpinion2.Text = getF2.Opinion; } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + if (!string.IsNullOrEmpty(getF2.SignatureUrl)) + { + this.Image2.ImageUrl = "~/" + getF2.SignatureUrl; + } + var signUser2 = UserService.GetUserByUserId(getF2.OperaterId); + if (signUser2 != null) + { + this.txtName2.Text = signUser2.UserName; + + } this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); } } @@ -157,7 +182,15 @@ { this.txtOpinion3.Text = getF3.Opinion; } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + if (!string.IsNullOrEmpty(getF3.SignatureUrl)) + { + this.Image3.ImageUrl = "~/" + getF3.SignatureUrl; + } + var signUser3 = UserService.GetUserByUserId(getF3.OperaterId); + if (signUser3 != null) + { + this.txtName3.Text = signUser3.UserName; + } this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); } } @@ -189,7 +222,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 09c200a4..fa431cab 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/LimitedSpaceView.aspx.designer.cs @@ -69,13 +69,22 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextBox txtApplyManName; /// - /// txtWorkPalce 控件。 + /// txtO2Density 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtWorkPalce; + protected global::FineUIPro.TextBox txtO2Density; + + /// + /// txtManAndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtManAndDate; /// /// txtFireWatchManName 控件。 @@ -87,13 +96,31 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextBox txtFireWatchManName; /// - /// txtWorkMeasures 控件。 + /// txtResponsibleManPhone 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtWorkMeasures; + protected global::FineUIPro.TextBox txtResponsibleManPhone; + + /// + /// txtWorkMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMan; + + /// + /// txtWorkPalce 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkPalce; /// /// txtWorkDate 控件。 @@ -104,6 +131,24 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.TextBox txtWorkDate; + /// + /// txtWorkMeasures 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMeasures; + + /// + /// txtTools 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTools; + /// /// Grid1 控件。 /// @@ -132,13 +177,13 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextArea txtOpinion1; /// - /// HyperLink3 控件。 + /// HyperLink1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.HyperLink HyperLink3; + protected global::FineUIPro.HyperLink HyperLink1; /// /// txtName1 控件。 @@ -149,6 +194,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName1; + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; + /// /// txtTime1 控件。 /// @@ -177,13 +231,13 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextArea txtOpinion2; /// - /// HyperLink1 控件。 + /// HyperLink2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.HyperLink HyperLink1; + protected global::FineUIPro.HyperLink HyperLink2; /// /// txtName2 控件。 @@ -194,6 +248,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName2; + /// + /// Image2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image2; + /// /// txtTime2 控件。 /// @@ -222,13 +285,13 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextArea txtOpinion3; /// - /// HyperLink2 控件。 + /// HyperLink3 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.HyperLink HyperLink2; + protected global::FineUIPro.HyperLink HyperLink3; /// /// txtName3 控件。 @@ -239,6 +302,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName3; + /// + /// Image3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image3; + /// /// txtTime3 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/NightWork.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/NightWork.aspx.cs index 17bfb657..f98fa157 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/NightWork.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/NightWork.aspx.cs @@ -293,8 +293,9 @@ namespace FineUIPro.Web.HSSE.License 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"); + string docfilename = Funs.GetNewFileName(); + newUrl = uploadfilepath.Replace(".doc", docfilename + ".doc"); + filePath = initTemplatePath.Replace(".doc", docfilename + ".pdf"); File.Copy(uploadfilepath, newUrl); ///更新书签 var getNightWork = LicensePublicService.GetNightWorkById(Id); @@ -691,47 +692,45 @@ namespace FineUIPro.Web.HSSE.License 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) { - if (getF1.IsAgree == true) - { - bookmarkOpinion1.Text = getF1.Opinion; - } - else - { - bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; - } + bookmarkOpinion1.Text = getF1.Opinion; } - - - } - Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; - if (bookmarkOperaterMan1 != null) - { - if (getF1.OperaterTime.HasValue) + else { + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + } + if (!string.IsNullOrEmpty(getF1.SignatureUrl) && File.Exists(rootPath + getF1.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + + var file = rootPath + getF1.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + 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 + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null && getF1.OperaterTime.HasValue) { bookmarkOperaterMan1.Text = getUser.UserName; } + } + } } + Bookmark bookmarkOperaterTime1 = doc.Range.Bookmarks["OperaterTime1"]; if (bookmarkOperaterTime1 != null) { @@ -744,47 +743,43 @@ namespace FineUIPro.Web.HSSE.License 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 (getF2.IsAgree == true) + { + bookmarkOpinion2.Text = getF2.Opinion; + } + else + { + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + } + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl) && File.Exists(rootPath + getF2.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + + var file = rootPath + getF2.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + if (getUser != null) { - if (getF2.IsAgree == true) + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null && getF2.OperaterTime.HasValue) { - 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; - } + bookmarkOperaterMan2.Text = getUser.UserName; } } } + + Bookmark bookmarkOperaterTime2 = doc.Range.Bookmarks["OperaterTime2"]; if (bookmarkOperaterTime2 != null) { @@ -803,41 +798,33 @@ namespace FineUIPro.Web.HSSE.License { - if (getUser != null) + + if (getF3.IsAgree == true) { - if (getF3.IsAgree == true) - { - bookmarkOpinion3.Text = getF3.Opinion; - } - else - { - bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; - } + bookmarkOpinion3.Text = getF3.Opinion; + } + else + { + bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; } - - } - Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; - if (bookmarkOperaterMan3 != null) + if (!string.IsNullOrEmpty(getF3.SignatureUrl) && File.Exists(rootPath + getF3.SignatureUrl)) { - if (getF3.OperaterTime.HasValue) + DocumentBuilder builders = new DocumentBuilder(doc); + + var file = rootPath + getF3.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + } + if (getUser != null) + { + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null) { - 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; - } - } + bookmarkOperaterMan3.Text = getUser.UserName; } } + Bookmark bookmarkOperaterTime3 = doc.Range.Bookmarks["OperaterTime3"]; if (bookmarkOperaterTime3 != null) { @@ -847,165 +834,165 @@ namespace FineUIPro.Web.HSSE.License } } } - 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) - { + //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; - } - } + // 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) - { + // } + // 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; - } - } + // 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) - { + // } + // 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; - } - } + // 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 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"];//取消 @@ -1023,7 +1010,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Cancel"); - builders.InsertImage(file, 80, 20); + //builders.InsertImage(file, 80, 20); builders.Write("取消原因:" + getNightWork.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getNightWork.CancelTime)); } else @@ -1055,7 +1042,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Close"); - builders.InsertImage(file, 80, 20); + // builders.InsertImage(file, 80, 20); builders.Write("关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getNightWork.CloseTime)); } else diff --git a/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx b/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx index 5e28e2ae..d8981c3f 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx @@ -73,10 +73,10 @@ HeaderText="检查单" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true"> + HeaderText="确认执行" HeaderTextAlign="Center" TextAlign="Center" > + HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center" > @@ -93,12 +93,14 @@ - + + + @@ -114,12 +116,14 @@ - + + + @@ -139,12 +143,14 @@ - + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx.cs index ccc136b9..420855d0 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx.cs @@ -114,7 +114,16 @@ { this.txtOpinion1.Text = getF1.Opinion; } - this.txtName1.Text = UserService.GetUserNameByUserId(getF1.OperaterId); + if (!string.IsNullOrEmpty(getF1.SignatureUrl)) + { + this.Image1.ImageUrl = "~/" + getF1.SignatureUrl; + } + var signUser1 = UserService.GetUserByUserId(getF1.OperaterId); + if (signUser1 != null) + { + this.txtName1.Text = signUser1.UserName; + + } this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } @@ -134,7 +143,16 @@ { this.txtOpinion2.Text = getF2.Opinion; } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + if (!string.IsNullOrEmpty(getF2.SignatureUrl)) + { + this.Image2.ImageUrl = "~/" + getF2.SignatureUrl; + } + var signUser2 = UserService.GetUserByUserId(getF2.OperaterId); + if (signUser2 != null) + { + this.txtName2.Text = signUser2.UserName; + + } this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); } } @@ -154,7 +172,16 @@ { this.txtOpinion3.Text = getF3.Opinion; } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + if (!string.IsNullOrEmpty(getF3.SignatureUrl)) + { + this.Image3.ImageUrl = "~/" + getF3.SignatureUrl; + } + var signUser3 = UserService.GetUserByUserId(getF3.OperaterId); + if (signUser3 != null) + { + this.txtName3.Text = signUser3.UserName; + + } this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); } } @@ -186,7 +213,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.NightWorkId +"'"; diff --git a/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx.designer.cs index d45dfed2..492ab5c2 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/NightWorkView.aspx.designer.cs @@ -158,6 +158,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName1; + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; + /// /// txtTime1 控件。 /// @@ -203,6 +212,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName2; + /// + /// Image2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image2; + /// /// txtTime2 控件。 /// @@ -248,6 +266,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName3; + /// + /// Image3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image3; + /// /// txtTime3 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuit.aspx.cs index 7d7f7f6e..48671a44 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuit.aspx.cs @@ -294,8 +294,9 @@ namespace FineUIPro.Web.HSSE.License 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"); + string docfilename = Funs.GetNewFileName(); + newUrl = uploadfilepath.Replace(".doc", docfilename + ".doc"); + filePath = initTemplatePath.Replace(".doc", docfilename + ".pdf"); File.Copy(uploadfilepath, newUrl); ///更新书签 var getOpenCircuit = LicensePublicService.GetOpenCircuitById(Id); @@ -343,6 +344,15 @@ namespace FineUIPro.Web.HSSE.License } } + Bookmark bookmarkWatchMan = doc.Range.Bookmarks["WatchMan"];//作业地点 + if (bookmarkWorkPalce != null) + { + if (getOpenCircuit != null &&!string.IsNullOrEmpty(getOpenCircuit.WatchMan)) + { + bookmarkWatchMan.Text = getOpenCircuit.WatchMan ; + + } + } Bookmark bookmarkWorkMeasures = doc.Range.Bookmarks["WorkMeasures"];//作业内容 if (bookmarkWorkMeasures != null) { @@ -684,44 +694,41 @@ namespace FineUIPro.Web.HSSE.License 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) { - if (getF1.IsAgree == true) + if (string.IsNullOrEmpty(getF1.Opinion)) { - bookmarkOpinion1.Text = getF1.Opinion; + bookmarkOpinion1.Text = "同意。"; } else { - bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + bookmarkOpinion1.Text = getF1.Opinion; } } - - - } - Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; - if (bookmarkOperaterMan1 != null) - { - if (getF1.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + } + } + if (!string.IsNullOrEmpty(getF1.SignatureUrl) && File.Exists(rootPath + getF1.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF1.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null && getF1.OperaterTime.HasValue) { - 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; - } + bookmarkOperaterMan1.Text = getUser.UserName; } } } @@ -730,113 +737,112 @@ namespace FineUIPro.Web.HSSE.License { if (getF1.OperaterTime.HasValue) { - bookmarkOperaterTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); + 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) { - if (getF2.IsAgree == true) + if (string.IsNullOrEmpty(getF2.Opinion)) { - bookmarkOpinion2.Text = getF2.Opinion; + bookmarkOpinion2.Text = "同意。"; } else { - bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + bookmarkOpinion2.Text = getF2.Opinion; } } - - - } - Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; - if (bookmarkOperaterMan2 != null) - { - if (getF2.OperaterTime.HasValue) + else { - 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; - } - } + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; } } + if (!string.IsNullOrEmpty(getF2.SignatureUrl) && File.Exists(rootPath + getF2.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF2.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null && getF2.OperaterTime.HasValue) + { + 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); + 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) { - if (getF3.IsAgree == true) + if (string.IsNullOrEmpty(getF3.Opinion)) { - bookmarkOpinion3.Text = getF3.Opinion; + bookmarkOpinion3.Text = "同意。"; } else { - bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + bookmarkOpinion3.Text = getF3.Opinion; } } - - - } - Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; - if (bookmarkOperaterMan3 != null) - { - if (getF3.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + } + } + if (!string.IsNullOrEmpty(getF3.SignatureUrl) && File.Exists(rootPath + getF3.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + + var file = rootPath + getF3.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF3.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null && getF3.OperaterTime.HasValue) { - 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; - } + 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); + bookmarkOperaterTime3.Text = string.Format("{0:yyyy年MM月dd日HH:mm}", getF3.OperaterTime); } } } @@ -853,7 +859,14 @@ namespace FineUIPro.Web.HSSE.License { if (getF4.IsAgree == true) { - bookmarkOpinion4.Text = getF4.Opinion; + if (string.IsNullOrEmpty(getF4.Opinion)) + { + bookmarkOpinion4.Text = "同意。"; + } + else + { + bookmarkOpinion4.Text = getF4.Opinion; + } } else { @@ -889,117 +902,117 @@ namespace FineUIPro.Web.HSSE.License { if (getF4.OperaterTime.HasValue) { - bookmarkOperaterTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + 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) - { + //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; - } - } + // 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) - { + // } + // 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; - } - } + // 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 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) @@ -1016,7 +1029,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Cancel"); - builders.InsertImage(file, 80, 20); + //builders.InsertImage(file, 80, 20); builders.Write("取消原因:" + getOpenCircuit.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getOpenCircuit.CancelTime)); } else @@ -1048,7 +1061,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Close"); - builders.InsertImage(file, 80, 20); + //builders.InsertImage(file, 80, 20); builders.Write("关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getOpenCircuit.CloseTime)); } else diff --git a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx index 50f3fb91..1aa71ef5 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx @@ -37,28 +37,23 @@ - + - + - - - - - - - + + + HeaderText="确认执行" HeaderTextAlign="Center" TextAlign="Center" > + HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center" > @@ -99,6 +94,8 @@ runat="server"> + + @@ -120,6 +117,8 @@ runat="server"> + + @@ -145,6 +144,8 @@ runat="server"> + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.cs index 9145a170..e2302dcc 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.cs @@ -57,8 +57,7 @@ this.txtWorkDate.Text += getOpenCircuit.ValidityEndTime.Value.ToString("f"); } } - this.txtRoadName.Text = getOpenCircuit.RoadName; - this.txtSafeMeasures.Text = getOpenCircuit.SafeMeasures; + this.txtWatchMan.Text = getOpenCircuit.WatchMan; this.txtWorkMeasures.Text = getOpenCircuit.WorkMeasures; if (!string.IsNullOrEmpty(getOpenCircuit.CancelManId)) { @@ -114,7 +113,16 @@ { this.txtOpinion1.Text = getF1.Opinion; } - this.txtName1.Text = UserService.GetUserNameByUserId(getF1.OperaterId); + if (!string.IsNullOrEmpty(getF1.SignatureUrl)) + { + this.Image1.ImageUrl = "~/" + getF1.SignatureUrl; + } + var signUser1 = UserService.GetUserByUserId(getF1.OperaterId); + if (signUser1 != null) + { + this.txtName1.Text = signUser1.UserName; + + } this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } @@ -133,7 +141,16 @@ { this.txtOpinion2.Text = getF2.Opinion; } - this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + if (!string.IsNullOrEmpty(getF2.SignatureUrl)) + { + this.Image2.ImageUrl = "~/" + getF2.SignatureUrl; + } + var signUser2 = UserService.GetUserByUserId(getF2.OperaterId); + if (signUser2 != null) + { + this.txtName2.Text = signUser2.UserName; + + } this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); } } @@ -152,7 +169,16 @@ { this.txtOpinion3.Text = getF3.Opinion; } - this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + if (!string.IsNullOrEmpty(getF3.SignatureUrl)) + { + this.Image3.ImageUrl = "~/" + getF3.SignatureUrl; + } + var signUser3 = UserService.GetUserByUserId(getF3.OperaterId); + if (signUser3 != null) + { + this.txtName3.Text = signUser3.UserName; + + } this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); } } @@ -184,7 +210,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 5300db99..9855ce60 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/OpenCircuitView.aspx.designer.cs @@ -78,13 +78,13 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextBox txtWorkPalce; /// - /// txtWorkMeasures 控件。 + /// txtWatchMan 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtWorkMeasures; + protected global::FineUIPro.TextBox txtWatchMan; /// /// txtWorkDate 控件。 @@ -96,22 +96,13 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextBox txtWorkDate; /// - /// txtRoadName 控件。 + /// txtWorkMeasures 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtRoadName; - - /// - /// txtSafeMeasures 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtSafeMeasures; + protected global::FineUIPro.TextBox txtWorkMeasures; /// /// Grid1 控件。 @@ -158,6 +149,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName1; + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; + /// /// txtTime1 控件。 /// @@ -203,6 +203,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName2; + /// + /// Image2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image2; + /// /// txtTime2 控件。 /// @@ -248,6 +257,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName3; + /// + /// Image3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image3; + /// /// txtTime3 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/PressureTest.aspx b/SGGL/FineUIPro.Web/HSSE/License/PressureTest.aspx new file mode 100644 index 00000000..94d62126 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/PressureTest.aspx @@ -0,0 +1,122 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PressureTest.aspx.cs" + Inherits="FineUIPro.Web.HSSE.License.PressureTest" %> + + + + + 动火作业票 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/PressureTest.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/PressureTest.aspx.cs new file mode 100644 index 00000000..637f0cec --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/PressureTest.aspx.cs @@ -0,0 +1,978 @@ +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 PressureTest : 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.PressureTestId,license.ProjectId,license.LicenseCode,license.ApplyUnitId,ApplyUnit.UnitName AS ApplyUnitName,license.ApplyManId,license.ApplyDate,license.WorkPalce,license.ValidityStartTime,license.ValidityEndTime,license.WorkContent,license.States" + + @" ,(CASE WHEN license.States=-2 THEN '作废' 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_PressureTest 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) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + 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("PressureTestView.aspx?PressureTestId={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 PressureTest = LicensePublicService.GetPressureTestById(rowID); + if (PressureTest != null) + { + LogService.AddSys_Log(this.CurrUser, PressureTest.LicenseCode, PressureTest.PressureTestId, Const.ProjectPressureTestMenuId, Const.BtnDelete); + LicensePublicService.DeletePressureTestById(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.ProjectPressureTestMenuId); + 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; + string docfilename = Funs.GetNewFileName() ; + newUrl = uploadfilepath.Replace(".doc", docfilename + ".doc"); + filePath = initTemplatePath.Replace(".doc", docfilename + ".pdf"); + File.Copy(uploadfilepath, newUrl); + ///更新书签 + var getPressureTest = LicensePublicService.GetPressureTestById(Id); + Document doc = new Aspose.Words.Document(newUrl); + Bookmark bookmarkLicenseCode = doc.Range.Bookmarks["LicenseCode"];//编号 + if (bookmarkLicenseCode != null) + { + if (getPressureTest != null) + { + bookmarkLicenseCode.Text = getPressureTest.LicenseCode; + } + } + Bookmark bookmarkApplyManName = doc.Range.Bookmarks["ApplyManName"];//申请人 + if (bookmarkApplyManName != null) + { + if (getPressureTest != null) + { + var getUser = UserService.GetUserByUserId(getPressureTest.ApplyManId); + if (getUser != null) + { + bookmarkApplyManName.Text = getUser.UserName; + } + + } + } + Bookmark bookmarkUnitName = doc.Range.Bookmarks["UnitName"];//申请单位 + if (bookmarkUnitName != null) + { + if (getPressureTest != null) + { + if (!string.IsNullOrEmpty(getPressureTest.ApplyUnitId)) + { + bookmarkUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(getPressureTest.ApplyUnitId); + } + + } + } + Bookmark bookmarkWorkPalce = doc.Range.Bookmarks["WorkPalce"];//作业地点 + if (bookmarkWorkPalce != null) + { + if (getPressureTest != null) + { + bookmarkWorkPalce.Text = getPressureTest.WorkPalce; + + } + } + + Bookmark bookmarkWatchManName = doc.Range.Bookmarks["WatchManName"];//监火人员 + if (bookmarkWatchManName != null) + { + if (getPressureTest != null) + { + var getUser = UserService.GetUserByUserId(getPressureTest.WatchManId); + if (getUser != null) + { + bookmarkWatchManName.Text = getUser.UserName; + } + else + { + bookmarkWatchManName.Text = getPressureTest.WatchManName; + + } + + } + } + Bookmark bookmarkValidityDate = doc.Range.Bookmarks["ValidityDate"];//有效期限 + if (bookmarkValidityDate != null) + { + if (getPressureTest != null) + { + if (getPressureTest.ValidityStartTime.HasValue) + { + + bookmarkValidityDate.Text = getPressureTest.ValidityStartTime.Value.Year + "年" + getPressureTest.ValidityStartTime.Value.Month + "月" + getPressureTest.ValidityStartTime.Value.Day + "日" + getPressureTest.ValidityStartTime.Value.Hour + "时至"; + if (getPressureTest.ValidityEndTime.HasValue) + { + bookmarkValidityDate.Text += getPressureTest.ValidityEndTime.Value.Year + "年" + getPressureTest.ValidityEndTime.Value.Month + "月" + getPressureTest.ValidityEndTime.Value.Day + "日" + getPressureTest.ValidityEndTime.Value.Hour + "时"; + } + } + } + } + + Bookmark bookmarkWorkMeasures = doc.Range.Bookmarks["WorkMeasures"];//作业内容 + if (bookmarkWorkMeasures != null) + { + if (getPressureTest != null) + { + bookmarkWorkMeasures.Text = getPressureTest.WorkContent; + + } + } + Bookmark bookmarkPressureAndType = doc.Range.Bookmarks["PressureAndType"];//作业内容 + if (bookmarkPressureAndType != null) + { + if (getPressureTest != null) + { + bookmarkPressureAndType.Text = getPressureTest.PressureAndType; + + } + } + 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 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 = "×"; + } + } + } + } + var item14 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 14); + if (item14 != null) + { + if (item14.IsUsed == true) + { + Bookmark bookmarkUser14 = doc.Range.Bookmarks["User14"];//确认执行 + if (bookmarkUser14 != null) + { + bookmarkUser14.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit14 = doc.Range.Bookmarks["IsFit14"]; + if (bookmarkIsFit14 != null) + { + if (item14 != null) + { + bookmarkIsFit14.Text = "×"; + } + } + } + } + + } + //审核记录 + var getFlows = LicensePublicService.GetFlowOperateListByDataId(Id); + if (getFlows.Count() > 0) + { + var getF1 = getFlows.FirstOrDefault(x => x.SortIndex == 1); + if (getF1 != null) + { + Bookmark bookmarkOpinion1 = doc.Range.Bookmarks["Opinion1"]; + if (bookmarkOpinion1 != null) + { + if (getF1.IsAgree == true) + { + if (string.IsNullOrEmpty(getF1.Opinion)) + { + bookmarkOpinion1.Text = "同意。"; + } + else + { + bookmarkOpinion1.Text = getF1.Opinion; + } + } + else + { + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + } + } + if (!string.IsNullOrEmpty(getF1.SignatureUrl) && File.Exists(rootPath + getF1.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF1.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null && getF1.OperaterTime.HasValue) + { + 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) + { + Bookmark bookmarkOpinion2 = doc.Range.Bookmarks["Opinion2"]; + if (bookmarkOpinion2 != null) + { + + if (getF2.IsAgree == true) + { + if (string.IsNullOrEmpty(getF2.Opinion)) + { + bookmarkOpinion2.Text = "同意。"; + } + else + { + bookmarkOpinion2.Text = getF2.Opinion; + } + } + else + { + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + } + + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl) && File.Exists(rootPath + getF2.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + + var file = rootPath + getF2.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null && getF2.OperaterTime.HasValue) + { + 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) + { + Bookmark bookmarkOpinion3 = doc.Range.Bookmarks["Opinion3"]; + if (bookmarkOpinion3 != null) + { + + if (getF3.IsAgree == true) + { + if (string.IsNullOrEmpty(getF3.Opinion)) + { + bookmarkOpinion3.Text = "同意。"; + } + else + { + bookmarkOpinion3.Text = getF3.Opinion; + } + } + else + { + bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + } + } + if (!string.IsNullOrEmpty(getF3.SignatureUrl) && File.Exists(rootPath + getF3.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF3.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF3.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null && getF3.OperaterTime.HasValue) + { + 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); + } + } + } + } + + Bookmark bookmarkCance = doc.Range.Bookmarks["Cancel"];//取消 + if (bookmarkCance != null) + { + if (getPressureTest != null) + { + if (!string.IsNullOrEmpty(getPressureTest.CancelManId)) + { + var getUser = UserService.GetUserByUserId(getPressureTest.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("取消原因:" + getPressureTest.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getPressureTest.CancelTime)); + } + else + { + bookmarkCance.Text = getUser.UserName + " 取消原因:" + getPressureTest.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getPressureTest.CancelTime); + } + } + } + } + } + + Bookmark bookmarkClose = doc.Range.Bookmarks["Close"];//关闭 + if (bookmarkClose != null) + { + if (getPressureTest != null) + { + if (!string.IsNullOrEmpty(getPressureTest.CloseManId)) + { + var getUser = UserService.GetUserByUserId(getPressureTest.CloseManId); + if (getUser != null) + { + if (!string.IsNullOrEmpty(getPressureTest.CloseReasons)) + { + bookmarkClose.Text = getPressureTest.CloseReasons + " 关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getPressureTest.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}", getPressureTest.CloseTime)); + } + else + { + bookmarkClose.Text = getUser.UserName + " 关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getPressureTest.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/PressureTest.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/PressureTest.aspx.designer.cs new file mode 100644 index 00000000..2f635a85 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/PressureTest.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class PressureTest + { + + /// + /// 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/PressureTestView.aspx b/SGGL/FineUIPro.Web/HSSE/License/PressureTestView.aspx new file mode 100644 index 00000000..e882fd55 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/PressureTestView.aspx @@ -0,0 +1,292 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PressureTestView.aspx.cs" + Inherits="FineUIPro.Web.HSSE.License.PressureTestView" %> + + + + + 临电作业票 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/PressureTestView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/PressureTestView.aspx.cs new file mode 100644 index 00000000..5dbfe496 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/PressureTestView.aspx.cs @@ -0,0 +1,238 @@ +namespace FineUIPro.Web.HSSE.License +{ + using BLL; + using System; + using System.Collections.Generic; + using System.Data; + using System.Data.SqlClient; + using System.Linq; + + public partial class PressureTestView : PageBase + { + #region 定义项 + /// + /// 主键 + /// + private string PressureTestId + { + get + { + return (string)ViewState["PressureTestId"]; + } + set + { + ViewState["PressureTestId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.SimpleForm1.Title = UnitService.GetUnitNameByUnitId(Const.UnitId_CD) + this.Title; + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.PressureTestId = Request.Params["PressureTestId"]; + if (!string.IsNullOrEmpty(this.PressureTestId)) + { + var getPressureTest = LicensePublicService.GetPressureTestById(this.PressureTestId); + if (getPressureTest != null) + { + this.lbLicenseCode.Text = getPressureTest.LicenseCode; + this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getPressureTest.ApplyUnitId); + this.txtApplyManName.Text = UserService.GetUserNameByUserId(getPressureTest.ApplyManId); + this.txtWorkPalce.Text = getPressureTest.WorkPalce; + string name = getPressureTest.WatchManName; + if (string.IsNullOrEmpty(getPressureTest.WatchManName)) + { + name = UserService.GetUserNameByUserId(getPressureTest.WatchManId); + } + this.txtFireWatchManName.Text = name; + if (getPressureTest.ValidityStartTime.HasValue) + { + this.txtWorkDate.Text = getPressureTest.ValidityStartTime.Value.ToString("f") + " 至 "; + if (getPressureTest.ValidityEndTime.HasValue) + { + this.txtWorkDate.Text += getPressureTest.ValidityEndTime.Value.ToString("f"); + } + } + this.txtWorkMeasures.Text = getPressureTest.WorkContent; + if (!string.IsNullOrEmpty(getPressureTest.SignatureUrl)) + { + this.txtTime0.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getPressureTest.ApplyDate); + this.txtOpinion0.Text = "同意。"; + this.txtName0.Text = this.txtApplyManName.Text; + this.Image0.ImageUrl = "~/" + getPressureTest.SignatureUrl; + } + + if (!string.IsNullOrEmpty(getPressureTest.CancelManId)) + { + this.txtCance.Text = UserService.GetUserNameByUserId(getPressureTest.CancelManId) + ";取消时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getPressureTest.CancelTime) + ";原因:" + getPressureTest.CancelReasons + "。"; + } + if (!string.IsNullOrEmpty(getPressureTest.CloseManId)) + { + if (!string.IsNullOrEmpty(getPressureTest.CloseReasons)) + { + this.txtClose.Text = getPressureTest.CloseReasons + " 关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getPressureTest.CloseTime) + "。"; + } + else + { + this.txtClose.Text = UserService.GetUserNameByUserId(getPressureTest.CloseManId) + "关闭;关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getPressureTest.CloseTime) + "。"; + } + } + } + } + // 绑定表格 + this.BindGrid(); + this.SetFlow(); + } + } + #endregion + + #region 获取审核记录信息 + public string FlowOperateId1; + public string FlowOperateId2; + public string FlowOperateId3; + /// + /// + /// + private void SetFlow() + { + var getFlows = LicensePublicService.GetFlowOperateListByDataId(this.PressureTestId); + if (getFlows.Count() > 0) + { + var getF1 = getFlows.FirstOrDefault(x => x.SortIndex == 1); + if (getF1 != null) + { + FlowOperateId1 = getF1.FlowOperateId; + this.txtForm1.Title = getF1.AuditFlowName + ":"; + if (getF1.OperaterTime.HasValue) + { + if (getF1.IsAgree == true) + { + this.txtOpinion1.Text = "同意。"; + } + else + { + this.txtOpinion1.Text = getF1.Opinion; + } + if (!string.IsNullOrEmpty(getF1.SignatureUrl)) + { + this.Image1.ImageUrl = "~/" + getF1.SignatureUrl; + } + var signUser1 = UserService.GetUserByUserId(getF1.OperaterId); + if (signUser1 != null) + { + this.txtName1.Text = signUser1.UserName; + } + this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); + } + } + var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + if (getF2 != null) + { + FlowOperateId2 = getF2.FlowOperateId; + + this.txtForm2.Title = getF2.AuditFlowName + ":"; + if (getF2.OperaterTime.HasValue) + { + if (getF2.IsAgree == true) + { + this.txtOpinion2.Text = "同意。"; + } + else + { + this.txtOpinion2.Text = getF2.Opinion; + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl)) + { + this.Image2.ImageUrl = "~/" + getF2.SignatureUrl; + } + var signUser2 = UserService.GetUserByUserId(getF2.OperaterId); + if (signUser2 != null) + { + this.txtName2.Text = signUser2.UserName; + + } + this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + } + } + var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + if (getF3 != null) + { + FlowOperateId3 = getF3.FlowOperateId; + + this.txtForm3.Title = getF3.AuditFlowName + ":"; + if (getF3.OperaterTime.HasValue) + { + if (getF3.IsAgree == true) + { + this.txtOpinion3.Text = "同意。"; + } + else + { + this.txtOpinion3.Text = getF3.Opinion; + } + if (!string.IsNullOrEmpty(getF3.SignatureUrl)) + { + this.Image3.ImageUrl = "~/" + getF3.SignatureUrl; + } + + var signUser3 = UserService.GetUserByUserId(getF3.OperaterId); + if (signUser3 != null) + { + this.txtName3.Text = signUser3.UserName; + } + 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); + } + } + } + } + #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.PressureTestId + "'"; + 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(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/License/PressureTestView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/PressureTestView.aspx.designer.cs new file mode 100644 index 00000000..f9a623f0 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/PressureTestView.aspx.designer.cs @@ -0,0 +1,503 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class PressureTestView + { + + /// + /// 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; + + /// + /// txtApplyUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApplyUnit; + + /// + /// txtApplyManName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApplyManName; + + /// + /// txtWorkPalce 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkPalce; + + /// + /// txtFireWatchManName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFireWatchManName; + + /// + /// txtWorkDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkDate; + + /// + /// txtWorkMeasures 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMeasures; + + /// + /// txtTools 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTools; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtForm0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm0; + + /// + /// txtOpinion0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion0; + + /// + /// HyperLink0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink0; + + /// + /// txtName0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName0; + + /// + /// Image0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image0; + + /// + /// txtTime0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime0; + + /// + /// txtForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm1; + + /// + /// txtOpinion1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion1; + + /// + /// HyperLink2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink2; + + /// + /// txtName1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName1; + + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; + + /// + /// txtTime1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime1; + + /// + /// txtForm2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm2; + + /// + /// txtOpinion2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion2; + + /// + /// HyperLink1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink1; + + /// + /// txtName2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName2; + + /// + /// Image2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image2; + + /// + /// txtTime2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime2; + + /// + /// txtForm3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm3; + + /// + /// txtOpinion3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion3; + + /// + /// HyperLink3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink3; + + /// + /// txtName3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName3; + + /// + /// Image3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image3; + + /// + /// txtTime3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime3; + + /// + /// txtForm4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm4; + + /// + /// txtOpinion4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion4; + + /// + /// HyperLink4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink4; + + /// + /// txtName4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName4; + + /// + /// Image4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image4; + + /// + /// txtTime4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime4; + + /// + /// Form5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form5; + + /// + /// TextArea2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea TextArea2; + + /// + /// HyperLink5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink5; + + /// + /// txtName5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName5; + + /// + /// Image5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image5; + + /// + /// txtTime5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime5; + + /// + /// txtCance 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCance; + + /// + /// txtClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtClose; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// 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/RadialWork.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/RadialWork.aspx.cs index 192b4e51..9c1cc320 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/RadialWork.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/RadialWork.aspx.cs @@ -292,8 +292,9 @@ namespace FineUIPro.Web.HSSE.License 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"); + string docfilename = Funs.GetNewFileName(); + newUrl = uploadfilepath.Replace(".doc", docfilename + ".doc"); + filePath = initTemplatePath.Replace(".doc", docfilename + ".pdf"); File.Copy(uploadfilepath, newUrl); ///更新书签 var getRadialWork = LicensePublicService.GetRadialWorkById(Id); @@ -337,7 +338,70 @@ namespace FineUIPro.Web.HSSE.License { if (getRadialWork != null) { - bookmarkRadialType.Text = getRadialWork.RadialType; + bookmarkRadialType.Text = getRadialWork.RadialType ?? " "; + + } + } + Bookmark bookmarkWorkMan1 = doc.Range.Bookmarks["WorkMan1"];//作业地点 + if (bookmarkWorkMan1 != null) + { + if (getRadialWork != null) + { + bookmarkWorkMan1.Text = getRadialWork.WorkMan1 ?? " "; + + } + } + Bookmark bookmarkWorkManCard1 = doc.Range.Bookmarks["WorkManCard1"];//作业地点 + if (bookmarkWorkManCard1 != null) + { + if (getRadialWork != null) + { + bookmarkWorkManCard1.Text = getRadialWork.WorkManCard1 ?? " "; + + } + } + Bookmark bookmarkWorkMan2 = doc.Range.Bookmarks["WorkMan2"];//作业地点 + if (bookmarkWorkMan2 != null) + { + if (getRadialWork != null) + { + bookmarkWorkMan2.Text = getRadialWork.WorkMan2 ?? " "; + + } + } + Bookmark bookmarkWorkManCard2 = doc.Range.Bookmarks["WorkManCard2"];//作业地点 + if (bookmarkWorkManCard2 != null) + { + if (getRadialWork != null) + { + bookmarkWorkManCard2.Text = getRadialWork.WorkManCard2 ?? " "; + + } + } + Bookmark bookmarkWorkMan3 = doc.Range.Bookmarks["WorkMan3"];//作业地点 + if (bookmarkWorkMan3 != null) + { + if (getRadialWork != null) + { + bookmarkWorkMan3.Text = getRadialWork.WorkMan3 ?? " "; + + } + } + Bookmark bookmarkWorkManCard3 = doc.Range.Bookmarks["WorkManCard3"];//作业地点 + if (bookmarkWorkManCard3 != null) + { + if (getRadialWork != null) + { + bookmarkWorkManCard3.Text = getRadialWork.WorkManCard3 ?? " "; + + } + } + Bookmark bookmarkSafeDistance = doc.Range.Bookmarks["SafeDistance"];//作业地点 + if (bookmarkSafeDistance != null) + { + if (getRadialWork != null) + { + bookmarkSafeDistance.Text = getRadialWork.SafeDistance ?? " "; } } @@ -375,7 +439,7 @@ namespace FineUIPro.Web.HSSE.License { if (getRadialWork != null) { - bookmarkWorkPalce.Text = getRadialWork.WorkPalce; + bookmarkWorkPalce.Text = getRadialWork.WorkPalce ?? ""; } } @@ -384,7 +448,7 @@ namespace FineUIPro.Web.HSSE.License { if (getRadialWork != null) { - bookmarkWorkMeasures.Text = getRadialWork.WorkMeasures; + bookmarkWorkMeasures.Text = getRadialWork.WorkMeasures ?? ""; } } @@ -405,7 +469,7 @@ namespace FineUIPro.Web.HSSE.License { if (getRadialWork != null) { - bookmarkWatchManContact.Text = getRadialWork.WatchManContact; + bookmarkWatchManContact.Text = getRadialWork.WatchManContact ?? ""; } } @@ -709,44 +773,43 @@ namespace FineUIPro.Web.HSSE.License 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) { - if (getF1.IsAgree == true) + if (!string.IsNullOrEmpty(getF1.Opinion)) { bookmarkOpinion1.Text = getF1.Opinion; } else { - bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + bookmarkOpinion1.Text = "同意。"; } } - - - } - Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; - if (bookmarkOperaterMan1 != null) - { - if (getF1.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + } + } + if (!string.IsNullOrEmpty(getF1.SignatureUrl) && File.Exists(rootPath + getF1.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + + var file = rootPath + getF1.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + + if (getUser != null) + { + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null && getF1.OperaterTime.HasValue) { - 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; - } + bookmarkOperaterMan1.Text = getUser.UserName; } } } @@ -755,51 +818,49 @@ namespace FineUIPro.Web.HSSE.License { if (getF1.OperaterTime.HasValue) { - bookmarkOperaterTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); + 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) { - if (getF2.IsAgree == true) + if (!string.IsNullOrEmpty(getF2.Opinion)) { bookmarkOpinion2.Text = getF2.Opinion; } else { - bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + bookmarkOpinion2.Text = "同意。"; } } - - - } - Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; - if (bookmarkOperaterMan2 != null) - { - if (getF2.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + } + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl) && File.Exists(rootPath + getF2.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF2.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + + if (getUser != null) + { + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null && getF2.OperaterTime.HasValue) { - 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; - } + bookmarkOperaterMan2.Text = getUser.UserName; } } } @@ -808,51 +869,48 @@ namespace FineUIPro.Web.HSSE.License { if (getF2.OperaterTime.HasValue) { - bookmarkOperaterTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + 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) { - if (getF3.IsAgree == true) + if (!string.IsNullOrEmpty(getF3.Opinion)) { bookmarkOpinion3.Text = getF3.Opinion; } else { - bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + bookmarkOpinion3.Text = "同意。"; } } - - - } - Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; - if (bookmarkOperaterMan3 != null) - { - if (getF3.OperaterTime.HasValue) + else { - if (getUser != null) + bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + } + } + if (!string.IsNullOrEmpty(getF3.SignatureUrl) && File.Exists(rootPath + getF3.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF3.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF3.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null && getF3.OperaterTime.HasValue) { - 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; - } + bookmarkOperaterMan3.Text = getUser.UserName; } } } @@ -861,169 +919,169 @@ namespace FineUIPro.Web.HSSE.License { if (getF3.OperaterTime.HasValue) { - bookmarkOperaterTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + 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) - { + //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; - } - } + // 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) - { + // } + // 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; - } - } + // 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) - { + // } + // 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; - } - } + // 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 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"];//取消 @@ -1041,7 +1099,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Cancel"); - builders.InsertImage(file, 80, 20); + //builders.InsertImage(file, 80, 20); builders.Write("取消原因:" + getRadialWork.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getRadialWork.CancelTime)); } else @@ -1073,7 +1131,7 @@ namespace FineUIPro.Web.HSSE.License var file = rootPath + getUser.SignatureUrl; DocumentBuilder builders = new DocumentBuilder(doc); builders.MoveToBookmark("Close"); - builders.InsertImage(file, 80, 20); + // builders.InsertImage(file, 80, 20); builders.Write("关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getRadialWork.CloseTime)); } else diff --git a/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx b/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx index fcd1d67b..164d0fe9 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx @@ -34,39 +34,58 @@ - - - - + + + + + - - + + + + - - - - - - + + + + + + + + + + + + + + + + - + - - - + + + + + + + + + + HeaderText="确认执行" HeaderTextAlign="Center" TextAlign="Center" > + HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center" > @@ -101,12 +120,14 @@ - + + + @@ -122,12 +143,14 @@ - + + + @@ -147,12 +170,14 @@ - + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.cs index 5080b060..3a071114 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.cs @@ -47,12 +47,19 @@ this.lbLicenseCode.Text = getRadialWork.LicenseCode; this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getRadialWork.ApplyUnitId); this.txtApplyManName.Text = UserService.GetUserNameByUserId(getRadialWork.ApplyManId); - this.txtRadialType.Text = getRadialWork.RadialType; - this.txtWorkLeader.Text = UserService.GetUserNameByUserId(getRadialWork.WorkLeaderId) + "/" + getRadialWork.WorkLeaderTel; + this.txtWorkMan1.Text = getRadialWork.WorkMan1; + this.txtWorkMan2.Text = getRadialWork.WorkMan2; + this.txtWorkMan3.Text = getRadialWork.WorkMan3; + this.txtWorkManCard1.Text = getRadialWork.WorkManCard1; + this.txtWorkManCard2.Text = getRadialWork.WorkManCard2; + this.txtWorkManCard3.Text = getRadialWork.WorkManCard3; + this.txtSafeDistance.Text = getRadialWork.SafeDistance; + + + //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; - if (getRadialWork.ValidityStartTime.HasValue) + if (getRadialWork.ValidityStartTime.HasValue) { this.txtWorkDate.Text = getRadialWork.ValidityStartTime.Value.ToString("f") + " 至 "; if (getRadialWork.ValidityEndTime.HasValue) @@ -116,7 +123,16 @@ { this.txtOpinion1.Text = getF1.Opinion; } - this.txtName1.Text = UserService.GetUserNameByUserId(getF1.OperaterId); + if (!string.IsNullOrEmpty(getF1.SignatureUrl)) + { + this.Image1.ImageUrl = "~/" + getF1.SignatureUrl; + } + var signUser1 = UserService.GetUserByUserId(getF1.OperaterId); + if (signUser1 != null) + { + this.txtName1.Text = signUser1.UserName; + + } this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); } } @@ -136,8 +152,17 @@ { 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); + if (!string.IsNullOrEmpty(getF2.SignatureUrl)) + { + this.Image2.ImageUrl = "~/" + getF2.SignatureUrl; + } + var signUser2 = UserService.GetUserByUserId(getF2.OperaterId); + if (signUser2 != null) + { + this.txtName2.Text = signUser2.UserName; + + } + this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); } } var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); @@ -156,8 +181,17 @@ { 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); + if (!string.IsNullOrEmpty(getF3.SignatureUrl)) + { + this.Image3.ImageUrl = "~/" + getF3.SignatureUrl; + } + var signUser3 = UserService.GetUserByUserId(getF3.OperaterId); + if (signUser3 != null) + { + this.txtName3.Text = signUser3.UserName; + + } + this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); } } var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); @@ -188,7 +222,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 48cfe6d3..72bba9d4 100644 --- a/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/License/RadialWorkView.aspx.designer.cs @@ -69,22 +69,76 @@ namespace FineUIPro.Web.HSSE.License protected global::FineUIPro.TextBox txtApplyManName; /// - /// txtRadialType 控件。 + /// txtSafeDistance 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtRadialType; + protected global::FineUIPro.TextBox txtSafeDistance; /// - /// txtWorkLeader 控件。 + /// txtFireWatchManName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtWorkLeader; + protected global::FineUIPro.TextBox txtFireWatchManName; + + /// + /// txtWorkMan1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMan1; + + /// + /// txtWorkManCard1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkManCard1; + + /// + /// txtWorkMan2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMan2; + + /// + /// txtWorkManCard2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkManCard2; + + /// + /// txtWorkMan3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMan3; + + /// + /// txtWorkManCard3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkManCard3; /// /// txtWorkDate 控件。 @@ -113,24 +167,6 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.TextBox txtWorkMeasures; - /// - /// txtFireWatchManName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtFireWatchManName; - - /// - /// txtWatchManContact 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtWatchManContact; - /// /// Grid1 控件。 /// @@ -176,6 +212,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName1; + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; + /// /// txtTime1 控件。 /// @@ -221,6 +266,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName2; + /// + /// Image2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image2; + /// /// txtTime2 控件。 /// @@ -266,6 +320,15 @@ namespace FineUIPro.Web.HSSE.License /// protected global::FineUIPro.Label txtName3; + /// + /// Image3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image3; + /// /// txtTime3 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/License/TempElectricity.aspx b/SGGL/FineUIPro.Web/HSSE/License/TempElectricity.aspx new file mode 100644 index 00000000..5304ea77 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/TempElectricity.aspx @@ -0,0 +1,122 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TempElectricity.aspx.cs" + Inherits="FineUIPro.Web.HSSE.License.TempElectricity" %> + + + + + 动火作业票 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/TempElectricity.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/TempElectricity.aspx.cs new file mode 100644 index 00000000..122de82b --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/TempElectricity.aspx.cs @@ -0,0 +1,909 @@ +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 TempElectricity : 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.TempElectricityId,license.ProjectId,license.LicenseCode,license.ApplyUnitId,ApplyUnit.UnitName AS ApplyUnitName,license.ApplyManId,license.ApplyDate,license.WorkPalce,license.ValidityStartTime,license.ValidityEndTime,license.WorkMeasures,license.States" + + @" ,(CASE WHEN license.States=-2 THEN '作废' 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_TempElectricity 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) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + 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("TempElectricityView.aspx?TempElectricityId={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 TempElectricity = LicensePublicService.GetTempElectricityById(rowID); + if (TempElectricity != null) + { + LogService.AddSys_Log(this.CurrUser, TempElectricity.LicenseCode, TempElectricity.TempElectricityId, Const.ProjectTempElectricityMenuId, Const.BtnDelete); + LicensePublicService.DeleteTempElectricityById(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.ProjectTempElectricityMenuId); + 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; + string docfilename = Funs.GetNewFileName() ; + newUrl = uploadfilepath.Replace(".doc", docfilename + ".doc"); + filePath = initTemplatePath.Replace(".doc", docfilename + ".pdf"); + File.Copy(uploadfilepath, newUrl); + ///更新书签 + var getTempElectricity = LicensePublicService.GetTempElectricityById(Id); + Document doc = new Aspose.Words.Document(newUrl); + Bookmark bookmarkLicenseCode = doc.Range.Bookmarks["LicenseCode"];//编号 + if (bookmarkLicenseCode != null) + { + if (getTempElectricity != null) + { + bookmarkLicenseCode.Text = getTempElectricity.LicenseCode; + } + } + Bookmark bookmarkApplyManName = doc.Range.Bookmarks["ApplyManName"];//申请人 + Bookmark bookmarkApplyManName1= doc.Range.Bookmarks["ApplyManName1"];//申请人 + Bookmark bookmarkApplyManPhone = doc.Range.Bookmarks["ApplyManPhone"];//申请人 + if (bookmarkApplyManName != null) + { + if (getTempElectricity != null) + { + var getUser = UserService.GetUserByUserId(getTempElectricity.ApplyManId); + if (getUser != null) + { + bookmarkApplyManName.Text = getUser.UserName; + if (bookmarkApplyManName1 != null) + { + bookmarkApplyManName1.Text = getUser.UserName; + } + if (bookmarkApplyManPhone != null) + { + bookmarkApplyManPhone.Text = getUser.Telephone; + } + } + + } + } + Bookmark bookmarkUnitName = doc.Range.Bookmarks["UnitName"];//申请单位 + if (bookmarkUnitName != null) + { + if (getTempElectricity != null) + { + if (!string.IsNullOrEmpty(getTempElectricity.ApplyUnitId)) + { + bookmarkUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(getTempElectricity.ApplyUnitId); + } + + } + } + Bookmark bookmarkWorkPalce = doc.Range.Bookmarks["WorkPalce"];//作业地点 + if (bookmarkWorkPalce != null) + { + if (getTempElectricity != null) + { + bookmarkWorkPalce.Text = getTempElectricity.WorkPalce; + + } + } + Bookmark bookmarkElectrician = doc.Range.Bookmarks["Electrician"];//监火人员 + if (bookmarkElectrician != null) + { + if (getTempElectricity != null) + { + var getUser = UserService.GetUserByUserId(getTempElectricity.Electrician); + if (getUser != null) + { + bookmarkElectrician.Text = getUser.UserName; + } + + } + } + Bookmark bookmarkWatchManName = doc.Range.Bookmarks["WatchManName"];//监火人员 + if (bookmarkWatchManName != null) + { + if (getTempElectricity != null) + { + var getUser = UserService.GetUserByUserId(getTempElectricity.WatchManId); + if (getUser != null) + { + bookmarkWatchManName.Text = getUser.UserName; + } + else + { + bookmarkWatchManName.Text = getTempElectricity.WatchManName; + + } + + } + } + Bookmark bookmarkValidityDate = doc.Range.Bookmarks["ValidityDate"];//有效期限 + if (bookmarkValidityDate != null) + { + if (getTempElectricity != null) + { + if (getTempElectricity.ValidityStartTime.HasValue) + { + + bookmarkValidityDate.Text = getTempElectricity.ValidityStartTime.Value.Year + "年" + getTempElectricity.ValidityStartTime.Value.Month + "月" + getTempElectricity.ValidityStartTime.Value.Day + "日" + getTempElectricity.ValidityStartTime.Value.Hour + "时至"; + if (getTempElectricity.ValidityEndTime.HasValue) + { + bookmarkValidityDate.Text += getTempElectricity.ValidityEndTime.Value.Year + "年" + getTempElectricity.ValidityEndTime.Value.Month + "月" + getTempElectricity.ValidityEndTime.Value.Day + "日" + getTempElectricity.ValidityEndTime.Value.Hour + "时"; + } + } + } + } + Bookmark bookmarkTools = doc.Range.Bookmarks["Tools"];//监火人员 + if (bookmarkTools != null) + { + if (getTempElectricity != null&&!string.IsNullOrEmpty(getTempElectricity.Tools)) + { + bookmarkTools.Text = getTempElectricity.Tools; + + } + } + Bookmark bookmarkWorkMeasures = doc.Range.Bookmarks["WorkMeasures"];//作业内容 + if (bookmarkWorkMeasures != null) + { + if (getTempElectricity != null) + { + bookmarkWorkMeasures.Text = getTempElectricity.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 getFlows = LicensePublicService.GetFlowOperateListByDataId(Id); + if (getFlows.Count() > 0) + { + var getF1 = getFlows.FirstOrDefault(x => x.SortIndex == 1); + if (getF1 != null) + { + Bookmark bookmarkOpinion1 = doc.Range.Bookmarks["Opinion1"]; + if (bookmarkOpinion1 != null) + { + if (getF1.IsAgree == true) + { + if (string.IsNullOrEmpty(getF1.Opinion)) + { + bookmarkOpinion1.Text = "同意。"; + } + else + { + bookmarkOpinion1.Text = getF1.Opinion; + } + } + else + { + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + } + } + if (!string.IsNullOrEmpty(getF1.SignatureUrl) && File.Exists(rootPath + getF1.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF1.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null && getF1.OperaterTime.HasValue) + { + 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) + { + Bookmark bookmarkOpinion2 = doc.Range.Bookmarks["Opinion2"]; + if (bookmarkOpinion2 != null) + { + + if (getF2.IsAgree == true) + { + if (string.IsNullOrEmpty(getF2.Opinion)) + { + bookmarkOpinion2.Text = "同意。"; + } + else + { + bookmarkOpinion2.Text = getF2.Opinion; + } + } + else + { + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + } + + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl) && File.Exists(rootPath + getF2.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + + var file = rootPath + getF2.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null && getF2.OperaterTime.HasValue) + { + 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) + { + Bookmark bookmarkOpinion3 = doc.Range.Bookmarks["Opinion3"]; + if (bookmarkOpinion3 != null) + { + + if (getF3.IsAgree == true) + { + if (string.IsNullOrEmpty(getF3.Opinion)) + { + bookmarkOpinion3.Text = "同意。"; + } + else + { + bookmarkOpinion3.Text = getF1.Opinion; + } + } + else + { + bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + } + } + if (!string.IsNullOrEmpty(getF3.SignatureUrl) && File.Exists(rootPath + getF3.SignatureUrl)) + { + DocumentBuilder builders = new DocumentBuilder(doc); + var file = rootPath + getF3.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + } + else + { + var getUser = UserService.GetUserByUserId(getF3.OperaterId); + if (getUser != null) + { + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null && getF3.OperaterTime.HasValue) + { + 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); + } + } + } + } + + Bookmark bookmarkCance = doc.Range.Bookmarks["Cancel"];//取消 + if (bookmarkCance != null) + { + if (getTempElectricity != null) + { + if (!string.IsNullOrEmpty(getTempElectricity.CancelManId)) + { + var getUser = UserService.GetUserByUserId(getTempElectricity.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("取消原因:" + getTempElectricity.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getTempElectricity.CancelTime)); + } + else + { + bookmarkCance.Text = getUser.UserName + " 取消原因:" + getTempElectricity.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getTempElectricity.CancelTime); + } + } + } + } + } + + Bookmark bookmarkClose = doc.Range.Bookmarks["Close"];//关闭 + if (bookmarkClose != null) + { + if (getTempElectricity != null) + { + if (!string.IsNullOrEmpty(getTempElectricity.CloseManId)) + { + var getUser = UserService.GetUserByUserId(getTempElectricity.CloseManId); + if (getUser != null) + { + if (!string.IsNullOrEmpty(getTempElectricity.CloseReasons)) + { + bookmarkClose.Text = getTempElectricity.CloseReasons + " 关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getTempElectricity.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}", getTempElectricity.CloseTime)); + } + else + { + bookmarkClose.Text = getUser.UserName + " 关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getTempElectricity.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/TempElectricity.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/TempElectricity.aspx.designer.cs new file mode 100644 index 00000000..20e54937 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/TempElectricity.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class TempElectricity + { + + /// + /// 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/TempElectricityView.aspx b/SGGL/FineUIPro.Web/HSSE/License/TempElectricityView.aspx new file mode 100644 index 00000000..a3e07e11 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/TempElectricityView.aspx @@ -0,0 +1,298 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TempElectricityView.aspx.cs" + Inherits="FineUIPro.Web.HSSE.License.TempElectricityView" %> + + + + + 临电作业票 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/TempElectricityView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/TempElectricityView.aspx.cs new file mode 100644 index 00000000..f6c0ddd6 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/TempElectricityView.aspx.cs @@ -0,0 +1,240 @@ +namespace FineUIPro.Web.HSSE.License +{ + using BLL; + using System; + using System.Collections.Generic; + using System.Data; + using System.Data.SqlClient; + using System.Linq; + + public partial class TempElectricityView : PageBase + { + #region 定义项 + /// + /// 主键 + /// + private string TempElectricityId + { + get + { + return (string)ViewState["TempElectricityId"]; + } + set + { + ViewState["TempElectricityId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.SimpleForm1.Title = UnitService.GetUnitNameByUnitId(Const.UnitId_CD) + this.Title; + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.TempElectricityId = Request.Params["TempElectricityId"]; + if (!string.IsNullOrEmpty(this.TempElectricityId)) + { + var getFireWork = LicensePublicService.GetTempElectricityById(this.TempElectricityId); + if (getFireWork != null) + { + this.lbLicenseCode.Text = getFireWork.LicenseCode; + this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getFireWork.ApplyUnitId); + this.txtApplyManName.Text = UserService.GetUserNameByUserId(getFireWork.ApplyManId); + this.txtWorkPalce.Text = getFireWork.WorkPalce; + this.txtTools.Text = getFireWork.Tools; + this.txtElectrician.Text = getFireWork.Electrician; + string name = getFireWork.WatchManName; + if (string.IsNullOrEmpty(getFireWork.WatchManName)) + { + name = UserService.GetUserNameByUserId(getFireWork.WatchManId); + } + this.txtFireWatchManName.Text = name; + if (getFireWork.ValidityStartTime.HasValue) + { + this.txtWorkDate.Text = getFireWork.ValidityStartTime.Value.ToString("f") + " 至 "; + if (getFireWork.ValidityEndTime.HasValue) + { + this.txtWorkDate.Text += getFireWork.ValidityEndTime.Value.ToString("f"); + } + } + this.txtWorkMeasures.Text = getFireWork.WorkMeasures; + if (!string.IsNullOrEmpty(getFireWork.SignatureUrl)) + { + this.txtTime0.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getFireWork.ApplyDate); + this.txtOpinion0.Text = "同意。"; + this.txtName0.Text = this.txtApplyManName.Text; + this.Image0.ImageUrl = "~/" + getFireWork.SignatureUrl; + } + + if (!string.IsNullOrEmpty(getFireWork.CancelManId)) + { + this.txtCance.Text = UserService.GetUserNameByUserId(getFireWork.CancelManId) + ";取消时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getFireWork.CancelTime) + ";原因:" + getFireWork.CancelReasons + "。"; + } + if (!string.IsNullOrEmpty(getFireWork.CloseManId)) + { + if (!string.IsNullOrEmpty(getFireWork.CloseReasons)) + { + this.txtClose.Text = getFireWork.CloseReasons + " 关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getFireWork.CloseTime) + "。"; + } + else + { + this.txtClose.Text = UserService.GetUserNameByUserId(getFireWork.CloseManId) + "关闭;关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getFireWork.CloseTime) + "。"; + } + } + } + } + // 绑定表格 + this.BindGrid(); + this.SetFlow(); + } + } + #endregion + + #region 获取审核记录信息 + public string FlowOperateId1; + public string FlowOperateId2; + public string FlowOperateId3; + /// + /// + /// + private void SetFlow() + { + var getFlows = LicensePublicService.GetFlowOperateListByDataId(this.TempElectricityId); + if (getFlows.Count() > 0) + { + var getF1 = getFlows.FirstOrDefault(x => x.SortIndex == 1); + if (getF1 != null) + { + FlowOperateId1 = getF1.FlowOperateId; + this.txtForm1.Title = getF1.AuditFlowName + ":"; + if (getF1.OperaterTime.HasValue) + { + if (getF1.IsAgree == true) + { + this.txtOpinion1.Text = "同意。"; + } + else + { + this.txtOpinion1.Text = getF1.Opinion; + } + if (!string.IsNullOrEmpty(getF1.SignatureUrl)) + { + this.Image1.ImageUrl = "~/" + getF1.SignatureUrl; + } + var signUser1 = UserService.GetUserByUserId(getF1.OperaterId); + if (signUser1 != null) + { + this.txtName1.Text = signUser1.UserName; + } + this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); + } + } + var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + if (getF2 != null) + { + FlowOperateId2 = getF2.FlowOperateId; + + this.txtForm2.Title = getF2.AuditFlowName + ":"; + if (getF2.OperaterTime.HasValue) + { + if (getF2.IsAgree == true) + { + this.txtOpinion2.Text = "同意。"; + } + else + { + this.txtOpinion2.Text = getF2.Opinion; + } + if (!string.IsNullOrEmpty(getF2.SignatureUrl)) + { + this.Image2.ImageUrl = "~/" + getF2.SignatureUrl; + } + var signUser2 = UserService.GetUserByUserId(getF2.OperaterId); + if (signUser2 != null) + { + this.txtName2.Text = signUser2.UserName; + + } + this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + } + } + var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + if (getF3 != null) + { + FlowOperateId3 = getF3.FlowOperateId; + + this.txtForm3.Title = getF3.AuditFlowName + ":"; + if (getF3.OperaterTime.HasValue) + { + if (getF3.IsAgree == true) + { + this.txtOpinion3.Text = "同意。"; + } + else + { + this.txtOpinion3.Text = getF3.Opinion; + } + if (!string.IsNullOrEmpty(getF3.SignatureUrl)) + { + this.Image3.ImageUrl = "~/" + getF3.SignatureUrl; + } + + var signUser3 = UserService.GetUserByUserId(getF3.OperaterId); + if (signUser3 != null) + { + this.txtName3.Text = signUser3.UserName; + } + 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); + } + } + } + } + #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.TempElectricityId + "'"; + 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(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/License/TempElectricityView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/TempElectricityView.aspx.designer.cs new file mode 100644 index 00000000..08fff87f --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/TempElectricityView.aspx.designer.cs @@ -0,0 +1,512 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class TempElectricityView + { + + /// + /// 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; + + /// + /// txtApplyUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApplyUnit; + + /// + /// txtApplyManName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApplyManName; + + /// + /// txtWorkPalce 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkPalce; + + /// + /// txtElectrician 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtElectrician; + + /// + /// txtFireWatchManName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFireWatchManName; + + /// + /// txtWorkDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkDate; + + /// + /// txtWorkMeasures 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMeasures; + + /// + /// txtTools 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTools; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtForm0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm0; + + /// + /// txtOpinion0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion0; + + /// + /// HyperLink0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink0; + + /// + /// txtName0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName0; + + /// + /// Image0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image0; + + /// + /// txtTime0 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime0; + + /// + /// txtForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm1; + + /// + /// txtOpinion1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion1; + + /// + /// HyperLink2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink2; + + /// + /// txtName1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName1; + + /// + /// Image1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image1; + + /// + /// txtTime1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime1; + + /// + /// txtForm2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm2; + + /// + /// txtOpinion2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion2; + + /// + /// HyperLink1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink1; + + /// + /// txtName2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName2; + + /// + /// Image2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image2; + + /// + /// txtTime2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime2; + + /// + /// txtForm3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm3; + + /// + /// txtOpinion3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion3; + + /// + /// HyperLink3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink3; + + /// + /// txtName3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName3; + + /// + /// Image3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image3; + + /// + /// txtTime3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime3; + + /// + /// txtForm4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm4; + + /// + /// txtOpinion4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion4; + + /// + /// HyperLink4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink4; + + /// + /// txtName4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName4; + + /// + /// Image4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image4; + + /// + /// txtTime4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime4; + + /// + /// Form5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form5; + + /// + /// TextArea2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea TextArea2; + + /// + /// HyperLink5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HyperLink HyperLink5; + + /// + /// txtName5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName5; + + /// + /// Image5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Image Image5; + + /// + /// txtTime5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime5; + + /// + /// txtCance 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCance; + + /// + /// txtClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtClose; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index 9c8de6b9..7cf9c468 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -87,7 +87,19 @@ - + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.cs index d51cef53..bbc9f94e 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HSSE.aspx.cs @@ -170,7 +170,7 @@ namespace FineUIPro.Web List stateList = new List(); List countList = new List(); var getStates = LicensePublicService.drpStatesItem().Where(x => x.Value != Const._Null); - var getLicense = APILicenseDataService.getLicenseDataListByStates(this.CurrUser.LoginProjectId, Const.UnitId_CD, null, 0); + var getLicense = APILicenseDataService.getLicenseDataListByStates(this.CurrUser.LoginProjectId, Const.UnitId_CD, null ); foreach (var itemStates in getStates) { stateList.Add(itemStates.Text); diff --git a/SGGL/Model/APIItem/HSSE/FlowOperateItem.cs b/SGGL/Model/APIItem/HSSE/FlowOperateItem.cs index 1941f5bd..4f9eb0ff 100644 --- a/SGGL/Model/APIItem/HSSE/FlowOperateItem.cs +++ b/SGGL/Model/APIItem/HSSE/FlowOperateItem.cs @@ -164,6 +164,19 @@ namespace Model set; } /// + /// 当前步骤是否可以结束 + /// + public bool CanEndFlow + { + get; + set; + } + public bool? EndFlow + { + get; + set; + } + /// /// 下一步审核人ID /// public string NextOperaterId diff --git a/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs b/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs index 7b395285..b74af76c 100644 --- a/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs +++ b/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs @@ -115,6 +115,15 @@ namespace Model get; set; } + + /// + /// 电工名称 + /// + public string Electrician + { + get; + set; + } /// /// 有效期开始时间 /// @@ -141,6 +150,23 @@ namespace Model set; } /// + /// 试压压力和种类(气体/气压) + /// + public string PressureAndType + { + get; + set; + } + + /// + /// 使用工器具 + /// + public string Tools + { + get; + set; + } + /// /// 取消人ID /// public string CancelManId @@ -348,6 +374,15 @@ namespace Model get; set; } + /// + /// 实际开挖深度(动土) + /// + public string RealWorkDepth + { + get; + set; + } + /// /// 级别(吊装) /// @@ -389,5 +424,129 @@ namespace Model get; set; } + /// + /// 申请人签名 + /// + public string SignatureUrl + { + get; + set; + } + /// + /// 加班理由 + /// + public string Reason + { + get; + set; + } + /// + /// 现场安全负责人 + /// + public string SafeLeader + { + get; + set; + } + /// + /// 现场负责人 + /// + public string WorkLeader + { + get; + set; + } + /// + /// 加班人数 + /// + public string PeopleNum + { + get; + set; + } + /// + /// 现场电工 + /// + public string ElectricalMan + { + get; + set; + } + /// + /// 动火作业人 + /// + public string WorkMan + { + get; + set; + } + /// + /// 易燃易爆气体采样地点、时间和分析数据 + /// + public string AnalysisData + { + get; + set; + } + /// + /// 安全人员 + /// + public string SafeMan + { + get; set; + } + /// + /// 吊车 车牌 + /// + public string CarNum + { + get; set; + } + /// + /// 其他工作人员 + /// + public string OtherMan + { + get; set; + } + /// + /// 安全距离 + /// + public string SafeDistance + { + get; + set; + } + + public string WorkMan1 + { + get; set; + } + public string WorkMan2 + { + get; set; + } + public string WorkMan3 + { + get; set; + } + public string WorkManCard1 + { + get; set; + } + public string WorkManCard2 + { + get; set; + } + public string WorkManCard3 + { + get; set; + } + public string WatchMan + { + get; + set; + } + } } diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index f4cc28ae..0899b369 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1328,6 +1328,9 @@ namespace Model partial void InsertLicense_HSETechnical(License_HSETechnical instance); partial void UpdateLicense_HSETechnical(License_HSETechnical instance); partial void DeleteLicense_HSETechnical(License_HSETechnical instance); + partial void InsertLicense_JiaBan(License_JiaBan instance); + partial void UpdateLicense_JiaBan(License_JiaBan instance); + partial void DeleteLicense_JiaBan(License_JiaBan instance); partial void InsertLicense_LicenseItem(License_LicenseItem instance); partial void UpdateLicense_LicenseItem(License_LicenseItem instance); partial void DeleteLicense_LicenseItem(License_LicenseItem instance); @@ -1346,12 +1349,18 @@ namespace Model partial void InsertLicense_OpenCircuit(License_OpenCircuit instance); partial void UpdateLicense_OpenCircuit(License_OpenCircuit instance); partial void DeleteLicense_OpenCircuit(License_OpenCircuit instance); + partial void InsertLicense_PressureTest(License_PressureTest instance); + partial void UpdateLicense_PressureTest(License_PressureTest instance); + partial void DeleteLicense_PressureTest(License_PressureTest instance); partial void InsertLicense_RadialWork(License_RadialWork instance); partial void UpdateLicense_RadialWork(License_RadialWork instance); partial void DeleteLicense_RadialWork(License_RadialWork instance); partial void InsertLicense_SecurityLicense(License_SecurityLicense instance); partial void UpdateLicense_SecurityLicense(License_SecurityLicense instance); partial void DeleteLicense_SecurityLicense(License_SecurityLicense instance); + partial void InsertLicense_TempElectricity(License_TempElectricity instance); + partial void UpdateLicense_TempElectricity(License_TempElectricity instance); + partial void DeleteLicense_TempElectricity(License_TempElectricity instance); partial void InsertManagementReport_ReportRemind(ManagementReport_ReportRemind instance); partial void UpdateManagementReport_ReportRemind(ManagementReport_ReportRemind instance); partial void DeleteManagementReport_ReportRemind(ManagementReport_ReportRemind instance); @@ -5907,6 +5916,14 @@ namespace Model } } + public System.Data.Linq.Table License_JiaBan + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table License_LicenseItem { get @@ -5955,6 +5972,14 @@ namespace Model } } + public System.Data.Linq.Table License_PressureTest + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table License_RadialWork { get @@ -5971,6 +5996,14 @@ namespace Model } } + public System.Data.Linq.Table License_TempElectricity + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table ManagementReport_ReportRemind { get @@ -25065,6 +25098,8 @@ namespace Model private EntitySet _License_HSETechnical; + private EntitySet _License_JiaBan; + private EntitySet _License_LicenseManager; private EntitySet _License_LiftingWork; @@ -25075,10 +25110,14 @@ namespace Model private EntitySet _License_OpenCircuit; + private EntitySet _License_PressureTest; + private EntitySet _License_RadialWork; private EntitySet _License_SecurityLicense; + private EntitySet _License_TempElectricity; + private EntitySet _ManagementReport_ReportRemind; private EntitySet _Manager_CompletionReport; @@ -25546,13 +25585,16 @@ namespace Model 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)); this._License_HSETechnical = new EntitySet(new Action(this.attach_License_HSETechnical), new Action(this.detach_License_HSETechnical)); + this._License_JiaBan = new EntitySet(new Action(this.attach_License_JiaBan), new Action(this.detach_License_JiaBan)); this._License_LicenseManager = new EntitySet(new Action(this.attach_License_LicenseManager), new Action(this.detach_License_LicenseManager)); this._License_LiftingWork = new EntitySet(new Action(this.attach_License_LiftingWork), new Action(this.detach_License_LiftingWork)); this._License_LimitedSpace = new EntitySet(new Action(this.attach_License_LimitedSpace), new Action(this.detach_License_LimitedSpace)); this._License_NightWork = new EntitySet(new Action(this.attach_License_NightWork), new Action(this.detach_License_NightWork)); this._License_OpenCircuit = new EntitySet(new Action(this.attach_License_OpenCircuit), new Action(this.detach_License_OpenCircuit)); + this._License_PressureTest = new EntitySet(new Action(this.attach_License_PressureTest), new Action(this.detach_License_PressureTest)); this._License_RadialWork = new EntitySet(new Action(this.attach_License_RadialWork), new Action(this.detach_License_RadialWork)); this._License_SecurityLicense = new EntitySet(new Action(this.attach_License_SecurityLicense), new Action(this.detach_License_SecurityLicense)); + this._License_TempElectricity = new EntitySet(new Action(this.attach_License_TempElectricity), new Action(this.detach_License_TempElectricity)); this._ManagementReport_ReportRemind = new EntitySet(new Action(this.attach_ManagementReport_ReportRemind), new Action(this.detach_ManagementReport_ReportRemind)); this._Manager_CompletionReport = new EntitySet(new Action(this.attach_Manager_CompletionReport), new Action(this.detach_Manager_CompletionReport)); this._Manager_HSSELog = new EntitySet(new Action(this.attach_Manager_HSSELog), new Action(this.detach_Manager_HSSELog)); @@ -28657,6 +28699,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_JiaBan_Base_Project", Storage="_License_JiaBan", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet License_JiaBan + { + get + { + return this._License_JiaBan; + } + set + { + this._License_JiaBan.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_LicenseManager_Base_Project", Storage="_License_LicenseManager", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet License_LicenseManager { @@ -28722,6 +28777,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_PressureTest_Base_Project", Storage="_License_PressureTest", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet License_PressureTest + { + get + { + return this._License_PressureTest; + } + set + { + this._License_PressureTest.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_RadialWork_Base_Project", Storage="_License_RadialWork", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet License_RadialWork { @@ -28748,6 +28816,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_TempElectricity_Base_Project", Storage="_License_TempElectricity", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet License_TempElectricity + { + get + { + return this._License_TempElectricity; + } + set + { + this._License_TempElectricity.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ManagementReport_ReportRemind_Base_Project", Storage="_ManagementReport_ReportRemind", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet ManagementReport_ReportRemind { @@ -32200,6 +32281,18 @@ namespace Model entity.Base_Project = null; } + private void attach_License_JiaBan(License_JiaBan entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_License_JiaBan(License_JiaBan entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_License_LicenseManager(License_LicenseManager entity) { this.SendPropertyChanging(); @@ -32260,6 +32353,18 @@ namespace Model entity.Base_Project = null; } + private void attach_License_PressureTest(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_License_PressureTest(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_License_RadialWork(License_RadialWork entity) { this.SendPropertyChanging(); @@ -32284,6 +32389,18 @@ namespace Model entity.Base_Project = null; } + private void attach_License_TempElectricity(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_License_TempElectricity(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_ManagementReport_ReportRemind(ManagementReport_ReportRemind entity) { this.SendPropertyChanging(); @@ -37691,6 +37808,8 @@ namespace Model private EntitySet _License_HSETechnical; + private EntitySet _License_JiaBan; + private EntitySet _License_LicenseManager; private EntitySet _License_LiftingWork; @@ -37701,10 +37820,14 @@ namespace Model private EntitySet _License_OpenCircuit; + private EntitySet _License_PressureTest; + private EntitySet _License_RadialWork; private EntitySet _License_SecurityLicense; + private EntitySet _License_TempElectricity; + private EntitySet _Manager_HseCostB; private EntitySet _Manager_HseCostC; @@ -37998,13 +38121,16 @@ namespace Model 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)); this._License_HSETechnical = new EntitySet(new Action(this.attach_License_HSETechnical), new Action(this.detach_License_HSETechnical)); + this._License_JiaBan = new EntitySet(new Action(this.attach_License_JiaBan), new Action(this.detach_License_JiaBan)); this._License_LicenseManager = new EntitySet(new Action(this.attach_License_LicenseManager), new Action(this.detach_License_LicenseManager)); this._License_LiftingWork = new EntitySet(new Action(this.attach_License_LiftingWork), new Action(this.detach_License_LiftingWork)); this._License_LimitedSpace = new EntitySet(new Action(this.attach_License_LimitedSpace), new Action(this.detach_License_LimitedSpace)); this._License_NightWork = new EntitySet(new Action(this.attach_License_NightWork), new Action(this.detach_License_NightWork)); this._License_OpenCircuit = new EntitySet(new Action(this.attach_License_OpenCircuit), new Action(this.detach_License_OpenCircuit)); + this._License_PressureTest = new EntitySet(new Action(this.attach_License_PressureTest), new Action(this.detach_License_PressureTest)); this._License_RadialWork = new EntitySet(new Action(this.attach_License_RadialWork), new Action(this.detach_License_RadialWork)); this._License_SecurityLicense = new EntitySet(new Action(this.attach_License_SecurityLicense), new Action(this.detach_License_SecurityLicense)); + this._License_TempElectricity = new EntitySet(new Action(this.attach_License_TempElectricity), new Action(this.detach_License_TempElectricity)); this._Manager_HseCostB = new EntitySet(new Action(this.attach_Manager_HseCostB), new Action(this.detach_Manager_HseCostB)); this._Manager_HseCostC = new EntitySet(new Action(this.attach_Manager_HseCostC), new Action(this.detach_Manager_HseCostC)); this._Manager_ManhoursSortB = new EntitySet(new Action(this.attach_Manager_ManhoursSortB), new Action(this.detach_Manager_ManhoursSortB)); @@ -40113,6 +40239,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_JiaBan_Base_Unit", Storage="_License_JiaBan", ThisKey="UnitId", OtherKey="ApplyUnitId", DeleteRule="NO ACTION")] + public EntitySet License_JiaBan + { + get + { + return this._License_JiaBan; + } + set + { + this._License_JiaBan.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_LicenseManager_Base_Unit", Storage="_License_LicenseManager", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet License_LicenseManager { @@ -40178,6 +40317,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_PressureTest_Base_Unit", Storage="_License_PressureTest", ThisKey="UnitId", OtherKey="ApplyUnitId", DeleteRule="NO ACTION")] + public EntitySet License_PressureTest + { + get + { + return this._License_PressureTest; + } + set + { + this._License_PressureTest.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_RadialWork_Base_Unit", Storage="_License_RadialWork", ThisKey="UnitId", OtherKey="ApplyUnitId", DeleteRule="NO ACTION")] public EntitySet License_RadialWork { @@ -40204,6 +40356,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_TempElectricity_Base_Unit", Storage="_License_TempElectricity", ThisKey="UnitId", OtherKey="ApplyUnitId", DeleteRule="NO ACTION")] + public EntitySet License_TempElectricity + { + get + { + return this._License_TempElectricity; + } + set + { + this._License_TempElectricity.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Manager_HseCostB_Base_Unit", Storage="_Manager_HseCostB", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet Manager_HseCostB { @@ -42406,6 +42571,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_License_JiaBan(License_JiaBan entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_License_JiaBan(License_JiaBan entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_License_LicenseManager(License_LicenseManager entity) { this.SendPropertyChanging(); @@ -42466,6 +42643,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_License_PressureTest(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_License_PressureTest(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_License_RadialWork(License_RadialWork entity) { this.SendPropertyChanging(); @@ -42490,6 +42679,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_License_TempElectricity(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_License_TempElectricity(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Manager_HseCostB(Manager_HseCostB entity) { this.SendPropertyChanging(); @@ -212486,6 +212687,16 @@ namespace Model private string _OldLicenseId; + private string _RealWorkDepth; + + private string _SignatureUrl; + + private string _WatchMan; + + private string _WorkMan; + + private string _IdNum; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -212540,6 +212751,16 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnRealWorkDepthChanging(string value); + partial void OnRealWorkDepthChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + partial void OnWatchManChanging(string value); + partial void OnWatchManChanged(); + partial void OnWorkManChanging(string value); + partial void OnWorkManChanged(); + partial void OnIdNumChanging(string value); + partial void OnIdNumChanged(); #endregion public License_BreakGround() @@ -212972,6 +213193,106 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealWorkDepth", DbType="NVarChar(50)")] + public string RealWorkDepth + { + get + { + return this._RealWorkDepth; + } + set + { + if ((this._RealWorkDepth != value)) + { + this.OnRealWorkDepthChanging(value); + this.SendPropertyChanging(); + this._RealWorkDepth = value; + this.SendPropertyChanged("RealWorkDepth"); + this.OnRealWorkDepthChanged(); + } + } + } + + [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="_WatchMan", DbType="NVarChar(50)")] + public string WatchMan + { + get + { + return this._WatchMan; + } + set + { + if ((this._WatchMan != value)) + { + this.OnWatchManChanging(value); + this.SendPropertyChanging(); + this._WatchMan = value; + this.SendPropertyChanged("WatchMan"); + this.OnWatchManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkMan", DbType="NVarChar(50)")] + public string WorkMan + { + get + { + return this._WorkMan; + } + set + { + if ((this._WorkMan != value)) + { + this.OnWorkManChanging(value); + this.SendPropertyChanging(); + this._WorkMan = value; + this.SendPropertyChanged("WorkMan"); + this.OnWorkManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IdNum", DbType="NVarChar(50)")] + public string IdNum + { + get + { + return this._IdNum; + } + set + { + if ((this._IdNum != value)) + { + this.OnIdNumChanging(value); + this.SendPropertyChanging(); + this._IdNum = value; + this.SendPropertyChanged("IdNum"); + this.OnIdNumChanged(); + } + } + } + [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 { @@ -213677,6 +213998,12 @@ namespace Model private string _OldLicenseId; + private string _FireMan; + + private string _AnalysisData; + + private string _SignatureUrl; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -213735,6 +214062,12 @@ namespace Model partial void OnFireWatchManNameChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnFireManChanging(string value); + partial void OnFireManChanged(); + partial void OnAnalysisDataChanging(string value); + partial void OnAnalysisDataChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); #endregion public License_FireWork() @@ -214192,6 +214525,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireMan", DbType="NVarChar(50)")] + public string FireMan + { + get + { + return this._FireMan; + } + set + { + if ((this._FireMan != value)) + { + this.OnFireManChanging(value); + this.SendPropertyChanging(); + this._FireMan = value; + this.SendPropertyChanged("FireMan"); + this.OnFireManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AnalysisData", DbType="NVarChar(50)")] + public string AnalysisData + { + get + { + return this._AnalysisData; + } + set + { + if ((this._AnalysisData != value)) + { + this.OnAnalysisDataChanging(value); + this.SendPropertyChanging(); + this._AnalysisData = value; + this.SendPropertyChanged("AnalysisData"); + this.OnAnalysisDataChanged(); + } + } + } + + [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 { @@ -214455,6 +214848,10 @@ namespace Model private System.Nullable _IsSelfRole; + private string _SignatureUrl; + + private System.Nullable _CanEndFlow; + private EntityRef _Sys_User; private EntitySet _License_FlowOperateItem; @@ -214495,6 +214892,10 @@ namespace Model partial void OnOrderNumChanged(); partial void OnIsSelfRoleChanging(System.Nullable value); partial void OnIsSelfRoleChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + partial void OnCanEndFlowChanging(System.Nullable value); + partial void OnCanEndFlowChanged(); #endregion public License_FlowOperate() @@ -214828,6 +215229,46 @@ 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.ColumnAttribute(Storage="_CanEndFlow", DbType="Bit")] + public System.Nullable CanEndFlow + { + get + { + return this._CanEndFlow; + } + set + { + if ((this._CanEndFlow != value)) + { + this.OnCanEndFlowChanging(value); + this.SendPropertyChanging(); + this._CanEndFlow = value; + this.SendPropertyChanged("CanEndFlow"); + this.OnCanEndFlowChanged(); + } + } + } + [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 { @@ -215220,6 +215661,14 @@ namespace Model private string _OldLicenseId; + private string _SignatureUrl; + + private string _SafeMan; + + private string _WatchMan; + + private string _WorkMan; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -215276,6 +215725,14 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + partial void OnSafeManChanging(string value); + partial void OnSafeManChanged(); + partial void OnWatchManChanging(string value); + partial void OnWatchManChanged(); + partial void OnWorkManChanging(string value); + partial void OnWorkManChanged(); #endregion public License_HeightWork() @@ -215728,6 +216185,86 @@ 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.ColumnAttribute(Storage="_SafeMan", DbType="NVarChar(50)")] + public string SafeMan + { + get + { + return this._SafeMan; + } + set + { + if ((this._SafeMan != value)) + { + this.OnSafeManChanging(value); + this.SendPropertyChanging(); + this._SafeMan = value; + this.SendPropertyChanged("SafeMan"); + this.OnSafeManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WatchMan", DbType="NVarChar(50)")] + public string WatchMan + { + get + { + return this._WatchMan; + } + set + { + if ((this._WatchMan != value)) + { + this.OnWatchManChanging(value); + this.SendPropertyChanging(); + this._WatchMan = value; + this.SendPropertyChanged("WatchMan"); + this.OnWatchManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkMan", DbType="NVarChar(50)")] + public string WorkMan + { + get + { + return this._WorkMan; + } + set + { + if ((this._WorkMan != value)) + { + this.OnWorkManChanging(value); + this.SendPropertyChanging(); + this._WorkMan = value; + this.SendPropertyChanged("WorkMan"); + this.OnWorkManChanged(); + } + } + } + [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 { @@ -216457,6 +216994,897 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.License_JiaBan")] + public partial class License_JiaBan : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _JiaBanId; + + private string _ProjectId; + + private string _LicenseCode; + + private string _ApplyUnitId; + + private string _ApplyManId; + + private System.Nullable _ApplyDate; + + private string _WorkPalce; + + private string _WorkType; + + private string _SafeLeader; + + private string _Reason; + + private string _WorkLeader; + + private string _PeopleNum; + + private string _ElectricalMan; + + private System.Nullable _ValidityStartTime; + + private System.Nullable _ValidityEndTime; + + private string _WorkMeasures; + + private string _EquipmentTools; + + 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 _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 OnJiaBanIdChanging(string value); + partial void OnJiaBanIdChanged(); + 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 OnWorkTypeChanging(string value); + partial void OnWorkTypeChanged(); + partial void OnSafeLeaderChanging(string value); + partial void OnSafeLeaderChanged(); + partial void OnReasonChanging(string value); + partial void OnReasonChanged(); + partial void OnWorkLeaderChanging(string value); + partial void OnWorkLeaderChanged(); + partial void OnPeopleNumChanging(string value); + partial void OnPeopleNumChanged(); + partial void OnElectricalManChanging(string value); + partial void OnElectricalManChanged(); + 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 OnEquipmentToolsChanging(string value); + partial void OnEquipmentToolsChanged(); + 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 OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + #endregion + + public License_JiaBan() + { + 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="_JiaBanId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string JiaBanId + { + get + { + return this._JiaBanId; + } + set + { + if ((this._JiaBanId != value)) + { + this.OnJiaBanIdChanging(value); + this.SendPropertyChanging(); + this._JiaBanId = value; + this.SendPropertyChanged("JiaBanId"); + this.OnJiaBanIdChanged(); + } + } + } + + [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="_WorkType", DbType="NVarChar(50)")] + public string WorkType + { + get + { + return this._WorkType; + } + set + { + if ((this._WorkType != value)) + { + this.OnWorkTypeChanging(value); + this.SendPropertyChanging(); + this._WorkType = value; + this.SendPropertyChanged("WorkType"); + this.OnWorkTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafeLeader", DbType="NVarChar(50)")] + public string SafeLeader + { + get + { + return this._SafeLeader; + } + set + { + if ((this._SafeLeader != value)) + { + this.OnSafeLeaderChanging(value); + this.SendPropertyChanging(); + this._SafeLeader = value; + this.SendPropertyChanged("SafeLeader"); + this.OnSafeLeaderChanged(); + } + } + } + + [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="_WorkLeader", DbType="NVarChar(50)")] + public string WorkLeader + { + get + { + return this._WorkLeader; + } + set + { + if ((this._WorkLeader != value)) + { + this.OnWorkLeaderChanging(value); + this.SendPropertyChanging(); + this._WorkLeader = value; + this.SendPropertyChanged("WorkLeader"); + this.OnWorkLeaderChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PeopleNum", DbType="NVarChar(50)")] + public string PeopleNum + { + get + { + return this._PeopleNum; + } + set + { + if ((this._PeopleNum != value)) + { + this.OnPeopleNumChanging(value); + this.SendPropertyChanging(); + this._PeopleNum = value; + this.SendPropertyChanged("PeopleNum"); + this.OnPeopleNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ElectricalMan", DbType="NVarChar(50)")] + public string ElectricalMan + { + get + { + return this._ElectricalMan; + } + set + { + if ((this._ElectricalMan != value)) + { + this.OnElectricalManChanging(value); + this.SendPropertyChanging(); + this._ElectricalMan = value; + this.SendPropertyChanged("ElectricalMan"); + this.OnElectricalManChanged(); + } + } + } + + [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="_EquipmentTools", DbType="NVarChar(100)")] + public string EquipmentTools + { + get + { + return this._EquipmentTools; + } + set + { + if ((this._EquipmentTools != value)) + { + this.OnEquipmentToolsChanging(value); + this.SendPropertyChanging(); + this._EquipmentTools = value; + this.SendPropertyChanged("EquipmentTools"); + this.OnEquipmentToolsChanged(); + } + } + } + + [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="_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_JiaBan_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_JiaBan.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.License_JiaBan.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_JiaBan_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_JiaBan.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.License_JiaBan.Add(this); + this._ApplyUnitId = value.UnitId; + } + else + { + this._ApplyUnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_JiaBan_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_JiaBan.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.License_JiaBan.Add(this); + this._ApplyManId = value.UserId; + } + else + { + this._ApplyManId = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_JiaBan_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_JiaBan_Sys_User2.Remove(this); + } + this._CancelMan.Entity = value; + if ((value != null)) + { + value.License_JiaBan_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_JiaBan_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_JiaBan_Sys_User3.Remove(this); + } + this._CloseMan.Entity = value; + if ((value != null)) + { + value.License_JiaBan_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_LicenseItem")] public partial class License_LicenseItem : INotifyPropertyChanging, INotifyPropertyChanged { @@ -216716,6 +218144,8 @@ namespace Model private string _WorkStates; + private System.Nullable _IsHighRisk; + private EntityRef _Base_LicenseType; private EntityRef _Base_Project; @@ -216758,6 +218188,8 @@ namespace Model partial void OnApplicantManChanged(); partial void OnWorkStatesChanging(string value); partial void OnWorkStatesChanged(); + partial void OnIsHighRiskChanging(System.Nullable value); + partial void OnIsHighRiskChanged(); #endregion public License_LicenseManager() @@ -217085,6 +218517,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsHighRisk", DbType="Bit")] + public System.Nullable IsHighRisk + { + get + { + return this._IsHighRisk; + } + set + { + if ((this._IsHighRisk != value)) + { + this.OnIsHighRiskChanging(value); + this.SendPropertyChanging(); + this._IsHighRisk = value; + this.SendPropertyChanged("IsHighRisk"); + this.OnIsHighRiskChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_LicenseManager_Base_LicenseType", Storage="_Base_LicenseType", ThisKey="LicenseTypeId", OtherKey="LicenseTypeId", IsForeignKey=true)] public Base_LicenseType Base_LicenseType { @@ -217290,6 +218742,20 @@ namespace Model private string _OldLicenseId; + private string _SignatureUrl; + + private string _SafeMan; + + private string _ControlMan; + + private string _DriverMan; + + private string _CarNum; + + private string _OtherMan; + + private string _WatchMan; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -217346,6 +218812,20 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + partial void OnSafeManChanging(string value); + partial void OnSafeManChanged(); + partial void OnControlManChanging(string value); + partial void OnControlManChanged(); + partial void OnDriverManChanging(string value); + partial void OnDriverManChanged(); + partial void OnCarNumChanging(string value); + partial void OnCarNumChanged(); + partial void OnOtherManChanging(string value); + partial void OnOtherManChanged(); + partial void OnWatchManChanging(string value); + partial void OnWatchManChanged(); #endregion public License_LiftingWork() @@ -217798,6 +219278,146 @@ 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.ColumnAttribute(Storage="_SafeMan", DbType="NVarChar(50)")] + public string SafeMan + { + get + { + return this._SafeMan; + } + set + { + if ((this._SafeMan != value)) + { + this.OnSafeManChanging(value); + this.SendPropertyChanging(); + this._SafeMan = value; + this.SendPropertyChanged("SafeMan"); + this.OnSafeManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ControlMan", DbType="NVarChar(50)")] + public string ControlMan + { + get + { + return this._ControlMan; + } + set + { + if ((this._ControlMan != value)) + { + this.OnControlManChanging(value); + this.SendPropertyChanging(); + this._ControlMan = value; + this.SendPropertyChanged("ControlMan"); + this.OnControlManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DriverMan", DbType="NVarChar(50)")] + public string DriverMan + { + get + { + return this._DriverMan; + } + set + { + if ((this._DriverMan != value)) + { + this.OnDriverManChanging(value); + this.SendPropertyChanging(); + this._DriverMan = value; + this.SendPropertyChanged("DriverMan"); + this.OnDriverManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CarNum", DbType="NVarChar(50)")] + public string CarNum + { + get + { + return this._CarNum; + } + set + { + if ((this._CarNum != value)) + { + this.OnCarNumChanging(value); + this.SendPropertyChanging(); + this._CarNum = value; + this.SendPropertyChanged("CarNum"); + this.OnCarNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OtherMan", DbType="NVarChar(50)")] + public string OtherMan + { + get + { + return this._OtherMan; + } + set + { + if ((this._OtherMan != value)) + { + this.OnOtherManChanging(value); + this.SendPropertyChanging(); + this._OtherMan = value; + this.SendPropertyChanged("OtherMan"); + this.OnOtherManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WatchMan", DbType="NVarChar(50)")] + public string WatchMan + { + get + { + return this._WatchMan; + } + set + { + if ((this._WatchMan != value)) + { + this.OnWatchManChanging(value); + this.SendPropertyChanging(); + this._WatchMan = value; + this.SendPropertyChanged("WatchMan"); + this.OnWatchManChanged(); + } + } + } + [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 { @@ -218037,6 +219657,18 @@ namespace Model private string _OldLicenseId; + private string _SignatureUrl; + + private string _O2Density; + + private string _ManAndDate; + + private string _ResponsibleManPhone; + + private string _WorkMan; + + private string _Tools; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -218095,6 +219727,18 @@ namespace Model partial void OnFireWatchManNameChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + partial void OnO2DensityChanging(string value); + partial void OnO2DensityChanged(); + partial void OnManAndDateChanging(string value); + partial void OnManAndDateChanged(); + partial void OnResponsibleManPhoneChanging(string value); + partial void OnResponsibleManPhoneChanged(); + partial void OnWorkManChanging(string value); + partial void OnWorkManChanged(); + partial void OnToolsChanging(string value); + partial void OnToolsChanged(); #endregion public License_LimitedSpace() @@ -218552,6 +220196,126 @@ 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.ColumnAttribute(Storage="_O2Density", DbType="NVarChar(50)")] + public string O2Density + { + get + { + return this._O2Density; + } + set + { + if ((this._O2Density != value)) + { + this.OnO2DensityChanging(value); + this.SendPropertyChanging(); + this._O2Density = value; + this.SendPropertyChanged("O2Density"); + this.OnO2DensityChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ManAndDate", DbType="NVarChar(50)")] + public string ManAndDate + { + get + { + return this._ManAndDate; + } + set + { + if ((this._ManAndDate != value)) + { + this.OnManAndDateChanging(value); + this.SendPropertyChanging(); + this._ManAndDate = value; + this.SendPropertyChanged("ManAndDate"); + this.OnManAndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibleManPhone", DbType="NVarChar(50)")] + public string ResponsibleManPhone + { + get + { + return this._ResponsibleManPhone; + } + set + { + if ((this._ResponsibleManPhone != value)) + { + this.OnResponsibleManPhoneChanging(value); + this.SendPropertyChanging(); + this._ResponsibleManPhone = value; + this.SendPropertyChanged("ResponsibleManPhone"); + this.OnResponsibleManPhoneChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkMan", DbType="NVarChar(100)")] + public string WorkMan + { + get + { + return this._WorkMan; + } + set + { + if ((this._WorkMan != value)) + { + this.OnWorkManChanging(value); + this.SendPropertyChanging(); + this._WorkMan = value; + this.SendPropertyChanged("WorkMan"); + this.OnWorkManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Tools", DbType="NVarChar(200)")] + public string Tools + { + get + { + return this._Tools; + } + set + { + if ((this._Tools != value)) + { + this.OnToolsChanging(value); + this.SendPropertyChanging(); + this._Tools = value; + this.SendPropertyChanged("Tools"); + this.OnToolsChanged(); + } + } + } + [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 { @@ -218829,6 +220593,8 @@ namespace Model private string _OldLicenseId; + private string _SignatureUrl; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -218893,6 +220659,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() @@ -219395,6 +221163,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 { @@ -219702,6 +221490,10 @@ namespace Model private string _OldLicenseId; + private string _SignatureUrl; + + private string _WatchMan; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -219758,6 +221550,10 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + partial void OnWatchManChanging(string value); + partial void OnWatchManChanged(); #endregion public License_OpenCircuit() @@ -220210,6 +222006,46 @@ 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.ColumnAttribute(Storage="_WatchMan", DbType="NVarChar(50)")] + public string WatchMan + { + get + { + return this._WatchMan; + } + set + { + if ((this._WatchMan != value)) + { + this.OnWatchManChanging(value); + this.SendPropertyChanging(); + this._WatchMan = value; + this.SendPropertyChanged("WatchMan"); + this.OnWatchManChanged(); + } + } + } + [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 { @@ -220401,6 +222237,842 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.License_PressureTest")] + public partial class License_PressureTest : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _PressureTestId; + + private string _ProjectId; + + private string _LicenseCode; + + private string _ApplyUnitId; + + private string _ApplyManId; + + private System.Nullable _ApplyDate; + + private string _WorkPalce; + + private string _WatchManId; + + private System.Nullable _ValidityStartTime; + + private System.Nullable _ValidityEndTime; + + private string _WorkContent; + + private string _PressureAndType; + + 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 _WatchManName; + + private string _OldLicenseId; + + private string _SignatureUrl; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + private EntityRef _Sys_User; + + private EntityRef _WatchMan; + + private EntityRef _CancelMan; + + private EntityRef _CloseMan; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnPressureTestIdChanging(string value); + partial void OnPressureTestIdChanged(); + 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 OnWatchManIdChanging(string value); + partial void OnWatchManIdChanged(); + partial void OnValidityStartTimeChanging(System.Nullable value); + partial void OnValidityStartTimeChanged(); + partial void OnValidityEndTimeChanging(System.Nullable value); + partial void OnValidityEndTimeChanged(); + partial void OnWorkContentChanging(string value); + partial void OnWorkContentChanged(); + partial void OnPressureAndTypeChanging(string value); + partial void OnPressureAndTypeChanged(); + 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 OnWatchManNameChanging(string value); + partial void OnWatchManNameChanged(); + partial void OnOldLicenseIdChanging(string value); + partial void OnOldLicenseIdChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + #endregion + + public License_PressureTest() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Sys_User = default(EntityRef); + this._WatchMan = default(EntityRef); + this._CancelMan = default(EntityRef); + this._CloseMan = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PressureTestId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string PressureTestId + { + get + { + return this._PressureTestId; + } + set + { + if ((this._PressureTestId != value)) + { + this.OnPressureTestIdChanging(value); + this.SendPropertyChanging(); + this._PressureTestId = value; + this.SendPropertyChanged("PressureTestId"); + this.OnPressureTestIdChanged(); + } + } + } + + [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="_WatchManId", DbType="NVarChar(50)")] + public string WatchManId + { + get + { + return this._WatchManId; + } + set + { + if ((this._WatchManId != value)) + { + if (this._WatchMan.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnWatchManIdChanging(value); + this.SendPropertyChanging(); + this._WatchManId = value; + this.SendPropertyChanged("WatchManId"); + this.OnWatchManIdChanged(); + } + } + } + + [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="_WorkContent", DbType="NVarChar(500)")] + public string WorkContent + { + get + { + return this._WorkContent; + } + set + { + if ((this._WorkContent != value)) + { + this.OnWorkContentChanging(value); + this.SendPropertyChanging(); + this._WorkContent = value; + this.SendPropertyChanged("WorkContent"); + this.OnWorkContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PressureAndType", DbType="NVarChar(50)")] + public string PressureAndType + { + get + { + return this._PressureAndType; + } + set + { + if ((this._PressureAndType != value)) + { + this.OnPressureAndTypeChanging(value); + this.SendPropertyChanging(); + this._PressureAndType = value; + this.SendPropertyChanged("PressureAndType"); + this.OnPressureAndTypeChanged(); + } + } + } + + [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="_WatchManName", DbType="NVarChar(50)")] + public string WatchManName + { + get + { + return this._WatchManName; + } + set + { + if ((this._WatchManName != value)) + { + this.OnWatchManNameChanging(value); + this.SendPropertyChanging(); + this._WatchManName = value; + this.SendPropertyChanged("WatchManName"); + this.OnWatchManNameChanged(); + } + } + } + + [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="_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_PressureTest_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_PressureTest.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.License_PressureTest.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_PressureTest_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_PressureTest.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.License_PressureTest.Add(this); + this._ApplyUnitId = value.UnitId; + } + else + { + this._ApplyUnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_PressureTest_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_PressureTest.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.License_PressureTest.Add(this); + this._ApplyManId = value.UserId; + } + else + { + this._ApplyManId = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_PressureTest_Sys_User1", Storage="_WatchMan", ThisKey="WatchManId", OtherKey="UserId", IsForeignKey=true)] + public Sys_User WatchMan + { + get + { + return this._WatchMan.Entity; + } + set + { + Sys_User previousValue = this._WatchMan.Entity; + if (((previousValue != value) + || (this._WatchMan.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._WatchMan.Entity = null; + previousValue.License_PressureTest_Sys_User1.Remove(this); + } + this._WatchMan.Entity = value; + if ((value != null)) + { + value.License_PressureTest_Sys_User1.Add(this); + this._WatchManId = value.UserId; + } + else + { + this._WatchManId = default(string); + } + this.SendPropertyChanged("WatchMan"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_PressureTest_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_PressureTest_Sys_User2.Remove(this); + } + this._CancelMan.Entity = value; + if ((value != null)) + { + value.License_PressureTest_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_PressureTest_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_PressureTest_Sys_User3.Remove(this); + } + this._CloseMan.Entity = value; + if ((value != null)) + { + value.License_PressureTest_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_RadialWork")] public partial class License_RadialWork : INotifyPropertyChanging, INotifyPropertyChanged { @@ -220455,6 +223127,22 @@ namespace Model private string _OldLicenseId; + private string _SignatureUrl; + + private string _WorkMan1; + + private string _WorkMan2; + + private string _WorkMan3; + + private string _WorkManCard1; + + private string _WorkManCard2; + + private string _WorkManCard3; + + private string _SafeDistance; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -220521,6 +223209,22 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + partial void OnWorkMan1Changing(string value); + partial void OnWorkMan1Changed(); + partial void OnWorkMan2Changing(string value); + partial void OnWorkMan2Changed(); + partial void OnWorkMan3Changing(string value); + partial void OnWorkMan3Changed(); + partial void OnWorkManCard1Changing(string value); + partial void OnWorkManCard1Changed(); + partial void OnWorkManCard2Changing(string value); + partial void OnWorkManCard2Changed(); + partial void OnWorkManCard3Changing(string value); + partial void OnWorkManCard3Changed(); + partial void OnSafeDistanceChanging(string value); + partial void OnSafeDistanceChanged(); #endregion public License_RadialWork() @@ -221043,6 +223747,166 @@ 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.ColumnAttribute(Storage="_WorkMan1", DbType="NVarChar(50)")] + public string WorkMan1 + { + get + { + return this._WorkMan1; + } + set + { + if ((this._WorkMan1 != value)) + { + this.OnWorkMan1Changing(value); + this.SendPropertyChanging(); + this._WorkMan1 = value; + this.SendPropertyChanged("WorkMan1"); + this.OnWorkMan1Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkMan2", DbType="NVarChar(50)")] + public string WorkMan2 + { + get + { + return this._WorkMan2; + } + set + { + if ((this._WorkMan2 != value)) + { + this.OnWorkMan2Changing(value); + this.SendPropertyChanging(); + this._WorkMan2 = value; + this.SendPropertyChanged("WorkMan2"); + this.OnWorkMan2Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkMan3", DbType="NVarChar(50)")] + public string WorkMan3 + { + get + { + return this._WorkMan3; + } + set + { + if ((this._WorkMan3 != value)) + { + this.OnWorkMan3Changing(value); + this.SendPropertyChanging(); + this._WorkMan3 = value; + this.SendPropertyChanged("WorkMan3"); + this.OnWorkMan3Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkManCard1", DbType="NVarChar(50)")] + public string WorkManCard1 + { + get + { + return this._WorkManCard1; + } + set + { + if ((this._WorkManCard1 != value)) + { + this.OnWorkManCard1Changing(value); + this.SendPropertyChanging(); + this._WorkManCard1 = value; + this.SendPropertyChanged("WorkManCard1"); + this.OnWorkManCard1Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkManCard2", DbType="NVarChar(50)")] + public string WorkManCard2 + { + get + { + return this._WorkManCard2; + } + set + { + if ((this._WorkManCard2 != value)) + { + this.OnWorkManCard2Changing(value); + this.SendPropertyChanging(); + this._WorkManCard2 = value; + this.SendPropertyChanged("WorkManCard2"); + this.OnWorkManCard2Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkManCard3", DbType="NVarChar(50)")] + public string WorkManCard3 + { + get + { + return this._WorkManCard3; + } + set + { + if ((this._WorkManCard3 != value)) + { + this.OnWorkManCard3Changing(value); + this.SendPropertyChanging(); + this._WorkManCard3 = value; + this.SendPropertyChanged("WorkManCard3"); + this.OnWorkManCard3Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafeDistance", DbType="NVarChar(50)")] + public string SafeDistance + { + get + { + return this._SafeDistance; + } + set + { + if ((this._SafeDistance != value)) + { + this.OnSafeDistanceChanging(value); + this.SendPropertyChanging(); + this._SafeDistance = value; + this.SendPropertyChanged("SafeDistance"); + this.OnSafeDistanceChanged(); + } + } + } + [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 { @@ -221799,6 +224663,866 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.License_TempElectricity")] + public partial class License_TempElectricity : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _TempElectricityId; + + private string _ProjectId; + + private string _LicenseCode; + + private string _ApplyUnitId; + + private string _ApplyManId; + + private System.Nullable _ApplyDate; + + private string _WorkPalce; + + private string _WatchManId; + + 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 _WatchManName; + + private string _OldLicenseId; + + private string _SignatureUrl; + + private string _Electrician; + + private string _Tools; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + private EntityRef _Sys_User; + + private EntityRef _WatchMan; + + private EntityRef _CancelMan; + + private EntityRef _CloseMan; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnTempElectricityIdChanging(string value); + partial void OnTempElectricityIdChanged(); + 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 OnWatchManIdChanging(string value); + partial void OnWatchManIdChanged(); + 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 OnWatchManNameChanging(string value); + partial void OnWatchManNameChanged(); + partial void OnOldLicenseIdChanging(string value); + partial void OnOldLicenseIdChanged(); + partial void OnSignatureUrlChanging(string value); + partial void OnSignatureUrlChanged(); + partial void OnElectricianChanging(string value); + partial void OnElectricianChanged(); + partial void OnToolsChanging(string value); + partial void OnToolsChanged(); + #endregion + + public License_TempElectricity() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Sys_User = default(EntityRef); + this._WatchMan = default(EntityRef); + this._CancelMan = default(EntityRef); + this._CloseMan = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TempElectricityId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string TempElectricityId + { + get + { + return this._TempElectricityId; + } + set + { + if ((this._TempElectricityId != value)) + { + this.OnTempElectricityIdChanging(value); + this.SendPropertyChanging(); + this._TempElectricityId = value; + this.SendPropertyChanged("TempElectricityId"); + this.OnTempElectricityIdChanged(); + } + } + } + + [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="_WatchManId", DbType="NVarChar(50)")] + public string WatchManId + { + get + { + return this._WatchManId; + } + set + { + if ((this._WatchManId != value)) + { + if (this._WatchMan.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnWatchManIdChanging(value); + this.SendPropertyChanging(); + this._WatchManId = value; + this.SendPropertyChanged("WatchManId"); + this.OnWatchManIdChanged(); + } + } + } + + [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="_WatchManName", DbType="NVarChar(50)")] + public string WatchManName + { + get + { + return this._WatchManName; + } + set + { + if ((this._WatchManName != value)) + { + this.OnWatchManNameChanging(value); + this.SendPropertyChanging(); + this._WatchManName = value; + this.SendPropertyChanged("WatchManName"); + this.OnWatchManNameChanged(); + } + } + } + + [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="_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="_Electrician", DbType="NVarChar(50)")] + public string Electrician + { + get + { + return this._Electrician; + } + set + { + if ((this._Electrician != value)) + { + this.OnElectricianChanging(value); + this.SendPropertyChanging(); + this._Electrician = value; + this.SendPropertyChanged("Electrician"); + this.OnElectricianChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Tools", DbType="NVarChar(50)")] + public string Tools + { + get + { + return this._Tools; + } + set + { + if ((this._Tools != value)) + { + this.OnToolsChanging(value); + this.SendPropertyChanging(); + this._Tools = value; + this.SendPropertyChanged("Tools"); + this.OnToolsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_TempElectricity_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_TempElectricity.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.License_TempElectricity.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_TempElectricity_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_TempElectricity.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.License_TempElectricity.Add(this); + this._ApplyUnitId = value.UnitId; + } + else + { + this._ApplyUnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_TempElectricity_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_TempElectricity.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.License_TempElectricity.Add(this); + this._ApplyManId = value.UserId; + } + else + { + this._ApplyManId = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_TempElectricity_Sys_User1", Storage="_WatchMan", ThisKey="WatchManId", OtherKey="UserId", IsForeignKey=true)] + public Sys_User WatchMan + { + get + { + return this._WatchMan.Entity; + } + set + { + Sys_User previousValue = this._WatchMan.Entity; + if (((previousValue != value) + || (this._WatchMan.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._WatchMan.Entity = null; + previousValue.License_TempElectricity_Sys_User1.Remove(this); + } + this._WatchMan.Entity = value; + if ((value != null)) + { + value.License_TempElectricity_Sys_User1.Add(this); + this._WatchManId = value.UserId; + } + else + { + this._WatchManId = default(string); + } + this.SendPropertyChanged("WatchMan"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_TempElectricity_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_TempElectricity_Sys_User2.Remove(this); + } + this._CancelMan.Entity = value; + if ((value != null)) + { + value.License_TempElectricity_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_TempElectricity_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_TempElectricity_Sys_User3.Remove(this); + } + this._CloseMan.Entity = value; + if ((value != null)) + { + value.License_TempElectricity_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.ManagementReport_ReportRemind")] public partial class ManagementReport_ReportRemind : INotifyPropertyChanging, INotifyPropertyChanged { @@ -330726,6 +334450,8 @@ namespace Model private System.Nullable _IsSelfRole; + private System.Nullable _CanEndFlow; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -330748,6 +334474,8 @@ namespace Model partial void OnOrderNumChanged(); partial void OnIsSelfRoleChanging(System.Nullable value); partial void OnIsSelfRoleChanged(); + partial void OnCanEndFlowChanging(System.Nullable value); + partial void OnCanEndFlowChanged(); #endregion public Sys_MenuFlowOperate() @@ -330935,6 +334663,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanEndFlow", DbType="Bit")] + public System.Nullable CanEndFlow + { + get + { + return this._CanEndFlow; + } + set + { + if ((this._CanEndFlow != value)) + { + this.OnCanEndFlowChanging(value); + this.SendPropertyChanging(); + this._CanEndFlow = value; + this.SendPropertyChanged("CanEndFlow"); + this.OnCanEndFlowChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -333611,6 +337359,12 @@ namespace Model private EntitySet _License_HSETechnical; + private EntitySet _License_JiaBan; + + private EntitySet _License_JiaBan_Sys_User2; + + private EntitySet _License_JiaBan_Sys_User3; + private EntitySet _License_LicenseItem; private EntitySet _License_LicenseManager; @@ -333645,6 +337399,14 @@ namespace Model private EntitySet _License_OpenCircuit_Sys_User3; + private EntitySet _License_PressureTest; + + private EntitySet _License_PressureTest_Sys_User1; + + private EntitySet _License_PressureTest_Sys_User2; + + private EntitySet _License_PressureTest_Sys_User3; + private EntitySet _License_RadialWork; private EntitySet _License_RadialWork_Sys_User1; @@ -333657,6 +337419,14 @@ namespace Model private EntitySet _License_SecurityLicense; + private EntitySet _License_TempElectricity; + + private EntitySet _License_TempElectricity_Sys_User1; + + private EntitySet _License_TempElectricity_Sys_User2; + + private EntitySet _License_TempElectricity_Sys_User3; + private EntitySet _Manager_CompletionReport; private EntitySet _Manager_HSSELog; @@ -334188,6 +337958,9 @@ namespace Model this._License_HeightWork_Sys_User2 = new EntitySet(new Action(this.attach_License_HeightWork_Sys_User2), new Action(this.detach_License_HeightWork_Sys_User2)); this._License_HeightWork_Sys_User3 = new EntitySet(new Action(this.attach_License_HeightWork_Sys_User3), new Action(this.detach_License_HeightWork_Sys_User3)); this._License_HSETechnical = new EntitySet(new Action(this.attach_License_HSETechnical), new Action(this.detach_License_HSETechnical)); + this._License_JiaBan = new EntitySet(new Action(this.attach_License_JiaBan), new Action(this.detach_License_JiaBan)); + this._License_JiaBan_Sys_User2 = new EntitySet(new Action(this.attach_License_JiaBan_Sys_User2), new Action(this.detach_License_JiaBan_Sys_User2)); + this._License_JiaBan_Sys_User3 = new EntitySet(new Action(this.attach_License_JiaBan_Sys_User3), new Action(this.detach_License_JiaBan_Sys_User3)); this._License_LicenseItem = new EntitySet(new Action(this.attach_License_LicenseItem), new Action(this.detach_License_LicenseItem)); this._License_LicenseManager = new EntitySet(new Action(this.attach_License_LicenseManager), new Action(this.detach_License_LicenseManager)); this._License_LiftingWork = new EntitySet(new Action(this.attach_License_LiftingWork), new Action(this.detach_License_LiftingWork)); @@ -334205,12 +337978,20 @@ namespace Model this._License_OpenCircuit = new EntitySet(new Action(this.attach_License_OpenCircuit), new Action(this.detach_License_OpenCircuit)); this._License_OpenCircuit_Sys_User2 = new EntitySet(new Action(this.attach_License_OpenCircuit_Sys_User2), new Action(this.detach_License_OpenCircuit_Sys_User2)); this._License_OpenCircuit_Sys_User3 = new EntitySet(new Action(this.attach_License_OpenCircuit_Sys_User3), new Action(this.detach_License_OpenCircuit_Sys_User3)); + this._License_PressureTest = new EntitySet(new Action(this.attach_License_PressureTest), new Action(this.detach_License_PressureTest)); + this._License_PressureTest_Sys_User1 = new EntitySet(new Action(this.attach_License_PressureTest_Sys_User1), new Action(this.detach_License_PressureTest_Sys_User1)); + this._License_PressureTest_Sys_User2 = new EntitySet(new Action(this.attach_License_PressureTest_Sys_User2), new Action(this.detach_License_PressureTest_Sys_User2)); + this._License_PressureTest_Sys_User3 = new EntitySet(new Action(this.attach_License_PressureTest_Sys_User3), new Action(this.detach_License_PressureTest_Sys_User3)); this._License_RadialWork = new EntitySet(new Action(this.attach_License_RadialWork), new Action(this.detach_License_RadialWork)); this._License_RadialWork_Sys_User1 = new EntitySet(new Action(this.attach_License_RadialWork_Sys_User1), new Action(this.detach_License_RadialWork_Sys_User1)); this._License_RadialWork_Sys_User2 = new EntitySet(new Action(this.attach_License_RadialWork_Sys_User2), new Action(this.detach_License_RadialWork_Sys_User2)); this._License_RadialWork_Sys_User3 = new EntitySet(new Action(this.attach_License_RadialWork_Sys_User3), new Action(this.detach_License_RadialWork_Sys_User3)); this._License_RadialWork_Sys_User5 = new EntitySet(new Action(this.attach_License_RadialWork_Sys_User5), new Action(this.detach_License_RadialWork_Sys_User5)); this._License_SecurityLicense = new EntitySet(new Action(this.attach_License_SecurityLicense), new Action(this.detach_License_SecurityLicense)); + this._License_TempElectricity = new EntitySet(new Action(this.attach_License_TempElectricity), new Action(this.detach_License_TempElectricity)); + this._License_TempElectricity_Sys_User1 = new EntitySet(new Action(this.attach_License_TempElectricity_Sys_User1), new Action(this.detach_License_TempElectricity_Sys_User1)); + this._License_TempElectricity_Sys_User2 = new EntitySet(new Action(this.attach_License_TempElectricity_Sys_User2), new Action(this.detach_License_TempElectricity_Sys_User2)); + this._License_TempElectricity_Sys_User3 = new EntitySet(new Action(this.attach_License_TempElectricity_Sys_User3), new Action(this.detach_License_TempElectricity_Sys_User3)); this._Manager_CompletionReport = new EntitySet(new Action(this.attach_Manager_CompletionReport), new Action(this.detach_Manager_CompletionReport)); this._Manager_HSSELog = new EntitySet(new Action(this.attach_Manager_HSSELog), new Action(this.detach_Manager_HSSELog)); this._Manager_HSSELogMonth = new EntitySet(new Action(this.attach_Manager_HSSELogMonth), new Action(this.detach_Manager_HSSELogMonth)); @@ -337504,6 +341285,45 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_JiaBan_Sys_User", Storage="_License_JiaBan", ThisKey="UserId", OtherKey="ApplyManId", DeleteRule="NO ACTION")] + public EntitySet License_JiaBan + { + get + { + return this._License_JiaBan; + } + set + { + this._License_JiaBan.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_JiaBan_Sys_User2", Storage="_License_JiaBan_Sys_User2", ThisKey="UserId", OtherKey="CancelManId", DeleteRule="NO ACTION")] + public EntitySet License_JiaBan_Sys_User2 + { + get + { + return this._License_JiaBan_Sys_User2; + } + set + { + this._License_JiaBan_Sys_User2.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_JiaBan_Sys_User3", Storage="_License_JiaBan_Sys_User3", ThisKey="UserId", OtherKey="CloseManId", DeleteRule="NO ACTION")] + public EntitySet License_JiaBan_Sys_User3 + { + get + { + return this._License_JiaBan_Sys_User3; + } + set + { + this._License_JiaBan_Sys_User3.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_LicenseItem_Sys_User", Storage="_License_LicenseItem", ThisKey="UserId", OtherKey="ConfirmManId", DeleteRule="NO ACTION")] public EntitySet License_LicenseItem { @@ -337725,6 +341545,58 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_PressureTest_Sys_User", Storage="_License_PressureTest", ThisKey="UserId", OtherKey="ApplyManId", DeleteRule="NO ACTION")] + public EntitySet License_PressureTest + { + get + { + return this._License_PressureTest; + } + set + { + this._License_PressureTest.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_PressureTest_Sys_User1", Storage="_License_PressureTest_Sys_User1", ThisKey="UserId", OtherKey="WatchManId", DeleteRule="NO ACTION")] + public EntitySet License_PressureTest_Sys_User1 + { + get + { + return this._License_PressureTest_Sys_User1; + } + set + { + this._License_PressureTest_Sys_User1.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_PressureTest_Sys_User2", Storage="_License_PressureTest_Sys_User2", ThisKey="UserId", OtherKey="CancelManId", DeleteRule="NO ACTION")] + public EntitySet License_PressureTest_Sys_User2 + { + get + { + return this._License_PressureTest_Sys_User2; + } + set + { + this._License_PressureTest_Sys_User2.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_PressureTest_Sys_User3", Storage="_License_PressureTest_Sys_User3", ThisKey="UserId", OtherKey="CloseManId", DeleteRule="NO ACTION")] + public EntitySet License_PressureTest_Sys_User3 + { + get + { + return this._License_PressureTest_Sys_User3; + } + set + { + this._License_PressureTest_Sys_User3.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_RadialWork_Sys_User", Storage="_License_RadialWork", ThisKey="UserId", OtherKey="ApplyManId", DeleteRule="NO ACTION")] public EntitySet License_RadialWork { @@ -337803,6 +341675,58 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_TempElectricity_Sys_User", Storage="_License_TempElectricity", ThisKey="UserId", OtherKey="ApplyManId", DeleteRule="NO ACTION")] + public EntitySet License_TempElectricity + { + get + { + return this._License_TempElectricity; + } + set + { + this._License_TempElectricity.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_TempElectricity_Sys_User1", Storage="_License_TempElectricity_Sys_User1", ThisKey="UserId", OtherKey="WatchManId", DeleteRule="NO ACTION")] + public EntitySet License_TempElectricity_Sys_User1 + { + get + { + return this._License_TempElectricity_Sys_User1; + } + set + { + this._License_TempElectricity_Sys_User1.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_TempElectricity_Sys_User2", Storage="_License_TempElectricity_Sys_User2", ThisKey="UserId", OtherKey="CancelManId", DeleteRule="NO ACTION")] + public EntitySet License_TempElectricity_Sys_User2 + { + get + { + return this._License_TempElectricity_Sys_User2; + } + set + { + this._License_TempElectricity_Sys_User2.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_TempElectricity_Sys_User3", Storage="_License_TempElectricity_Sys_User3", ThisKey="UserId", OtherKey="CloseManId", DeleteRule="NO ACTION")] + public EntitySet License_TempElectricity_Sys_User3 + { + get + { + return this._License_TempElectricity_Sys_User3; + } + set + { + this._License_TempElectricity_Sys_User3.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Manager_CompletionReport_Sys_User", Storage="_Manager_CompletionReport", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet Manager_CompletionReport { @@ -341564,6 +345488,42 @@ namespace Model entity.Sys_User = null; } + private void attach_License_JiaBan(License_JiaBan entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_License_JiaBan(License_JiaBan entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_License_JiaBan_Sys_User2(License_JiaBan entity) + { + this.SendPropertyChanging(); + entity.CancelMan = this; + } + + private void detach_License_JiaBan_Sys_User2(License_JiaBan entity) + { + this.SendPropertyChanging(); + entity.CancelMan = null; + } + + private void attach_License_JiaBan_Sys_User3(License_JiaBan entity) + { + this.SendPropertyChanging(); + entity.CloseMan = this; + } + + private void detach_License_JiaBan_Sys_User3(License_JiaBan entity) + { + this.SendPropertyChanging(); + entity.CloseMan = null; + } + private void attach_License_LicenseItem(License_LicenseItem entity) { this.SendPropertyChanging(); @@ -341768,6 +345728,54 @@ namespace Model entity.CloseMan = null; } + private void attach_License_PressureTest(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_License_PressureTest(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_License_PressureTest_Sys_User1(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.WatchMan = this; + } + + private void detach_License_PressureTest_Sys_User1(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.WatchMan = null; + } + + private void attach_License_PressureTest_Sys_User2(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.CancelMan = this; + } + + private void detach_License_PressureTest_Sys_User2(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.CancelMan = null; + } + + private void attach_License_PressureTest_Sys_User3(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.CloseMan = this; + } + + private void detach_License_PressureTest_Sys_User3(License_PressureTest entity) + { + this.SendPropertyChanging(); + entity.CloseMan = null; + } + private void attach_License_RadialWork(License_RadialWork entity) { this.SendPropertyChanging(); @@ -341840,6 +345848,54 @@ namespace Model entity.Sys_User = null; } + private void attach_License_TempElectricity(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_License_TempElectricity(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_License_TempElectricity_Sys_User1(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.WatchMan = this; + } + + private void detach_License_TempElectricity_Sys_User1(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.WatchMan = null; + } + + private void attach_License_TempElectricity_Sys_User2(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.CancelMan = this; + } + + private void detach_License_TempElectricity_Sys_User2(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.CancelMan = null; + } + + private void attach_License_TempElectricity_Sys_User3(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.CloseMan = this; + } + + private void detach_License_TempElectricity_Sys_User3(License_TempElectricity entity) + { + this.SendPropertyChanging(); + entity.CloseMan = null; + } + private void attach_Manager_CompletionReport(Manager_CompletionReport entity) { this.SendPropertyChanging(); diff --git a/SGGL/WebAPI/Controllers/HSSE/LicenseController.cs b/SGGL/WebAPI/Controllers/HSSE/LicenseController.cs index 90ab9ac2..9d44f5f9 100644 --- a/SGGL/WebAPI/Controllers/HSSE/LicenseController.cs +++ b/SGGL/WebAPI/Controllers/HSSE/LicenseController.cs @@ -26,9 +26,9 @@ namespace WebAPI.Controllers /// public Model.ResponeData getLicenseDataList(string strMenuId, string projectId, string unitId, string states, int pageIndex) { - var responeData = new Model.ResponeData(); + var responeData = new Model.ResponeData(); try - { + { var getDataList = APILicenseDataService.getLicenseDataList(strMenuId, projectId, unitId, states); int pageCount = getDataList.Count; if (pageCount > 0 && pageIndex > 0) @@ -61,8 +61,13 @@ namespace WebAPI.Controllers var responeData = new Model.ResponeData(); try { - var getDataList = APILicenseDataService.getLicenseDataListByStates(projectId, unitId, states, pageIndex); - int pageCount = APILicenseDataService.getLicenseDataStatesCount; + var getDataList = APILicenseDataService.getLicenseDataListByStates(projectId, unitId, states); + 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) @@ -224,6 +229,35 @@ namespace WebAPI.Controllers } #endregion + + #region 撤回作业票当前步骤 + /// + /// 删除作业票步骤 + /// + /// 审核步骤ID + /// + [HttpGet] + public Model.ResponeData cancleLicenseFlowOperate(string strMenuId, string dataId, string userId) + { + var responeData = new Model.ResponeData(); + try + { + responeData.message = APILicenseDataService.cancleLicenseFlowOperate(strMenuId, dataId, userId); + if (!string.IsNullOrEmpty(responeData.message)) + { + responeData.code = 0; + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + #endregion + #region 删除作业票步骤 /// /// 删除作业票步骤 @@ -269,8 +303,29 @@ namespace WebAPI.Controllers return responeData; } #endregion + #region 获取作业票审核步骤下步分支 + /// + /// 获取作业票审核步骤下步分支 + /// + /// 审核步骤ID + /// + public Model.ResponeData getFinishLicenseFlowOperateGroupList(string dataId) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = APILicenseDataService.getFinishLicenseFlowOperateGroupList(dataId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } - #region 重申请保存作业票信息 + return responeData; + } + #endregion + #region 重申请保存作业票信息getLicenseDataById /// /// 重申请保存作业票信息 ///