diff --git a/DataBase/版本日志/SGGLDB_V2023-06-06.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-06.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-06.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-06.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-06-06修改明细.txt b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-06修改明细.txt similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-06修改明细.txt rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-06修改明细.txt diff --git a/DataBase/版本日志/SGGLDB_V2023-06-12.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-12.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-12.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-12.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-06-13.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-13.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-13.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-13.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-06-13修改明细.txt b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-13修改明细.txt similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-13修改明细.txt rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-13修改明细.txt diff --git a/DataBase/版本日志/SGGLDB_V2023-06-14.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-14.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-14.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-14.sql diff --git a/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-16.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-16.sql new file mode 100644 index 00000000..76d39302 --- /dev/null +++ b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-16.sql @@ -0,0 +1,196 @@ +UPDATE Sys_Menu SET Url='SmartSite/EquipmentManage.aspx?Type=D' WHERE MenuId='B972AE90-D40C-44E0-9A90-7B47B2A3399B' +GO +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('641B763D-0C0D-4E52-8803-2E5743328A1F','B972AE90-D40C-44E0-9A90-7B47B2A3399B','',1) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('DDE12996-0920-4BE9-A8EB-EB9CB1C7FB2F','B972AE90-D40C-44E0-9A90-7B47B2A3399B','޸',2) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('8DD3B631-750C-4E0D-AAE0-0B05586C3490','B972AE90-D40C-44E0-9A90-7B47B2A3399B','ɾ',3) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('EC0C885F-163C-4D3B-A301-8FF2C291F8D1','B972AE90-D40C-44E0-9A90-7B47B2A3399B','',4) +GO + +UPDATE Sys_Menu SET Url='SmartSite/EquipmentManage.aspx?Type=M' WHERE MenuId='908325CA-A50A-456D-8A7F-E193C629F2F9' +GO +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('26FC28FB-C3F2-44B5-8CF6-8AF2E153F2DF','908325CA-A50A-456D-8A7F-E193C629F2F9','',1) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('D5D95624-334C-489A-AE3B-A746D024C5A5','908325CA-A50A-456D-8A7F-E193C629F2F9','޸',2) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('9CB845F6-42BA-4297-91BD-1233CDB97112','908325CA-A50A-456D-8A7F-E193C629F2F9','ɾ',3) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('37C274EC-A2E2-4517-AB33-EDC4C36AC43D','908325CA-A50A-456D-8A7F-E193C629F2F9','',4) +GO + +UPDATE Sys_Menu SET Url='SmartSite/EquipmentManage.aspx?Type=E' WHERE MenuId='E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E' +GO +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('78439D40-B0DC-4BE2-B361-DF3B77F4D0E8','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','',1) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('3D0BC556-300A-4558-BFE8-4ABFF2A66473','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','޸',2) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('373C9D29-445D-4973-B6F6-19621D5BD4B5','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','ɾ',3) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('A07E64A2-4318-4E26-8F84-5A086D72EE9C','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','',4) +GO + +CREATE TABLE [dbo].[SmartSite_Equipment]( + [EquipmentId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Type] [varchar](2) NULL, + [EquipmentName] [nvarchar](200) NULL, + [EquipmentModel] [nvarchar](200) NULL, + [Number] [int] NULL, + [RunningState] [nvarchar](50) NULL, + [Supplier] [nvarchar](500) NULL, + [SupplierMan] [nvarchar](50) NULL, + [SupplierTel] [nvarchar](50) NULL, + CONSTRAINT [PK_SmartSite_Equipment] PRIMARY KEY CLUSTERED +( + [EquipmentId] 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].[SmartSite_Equipment] WITH CHECK ADD CONSTRAINT [FK_SmartSite_Equipment_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[SmartSite_Equipment] CHECK CONSTRAINT [FK_SmartSite_Equipment_Base_Project] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'豸ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'EquipmentId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͣDŽMƵE⣩' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'Type' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'豸' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'EquipmentName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'豸ͺ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'EquipmentModel' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'״̬' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'RunningState' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'Supplier' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۺϵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'SupplierMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۺϵ绰' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment', @level2type=N'COLUMN',@level2name=N'SupplierTel' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'豸ǻ۹أ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_Equipment' +GO + + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('C126F42A-09B0-43D1-8DCF-9EA049B800A8','Ž豸','SmartSite/SoftManage.aspx?Type=D',10,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1) +GO +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('C1945F59-AD5E-4301-9538-67511D0EB0EC','C126F42A-09B0-43D1-8DCF-9EA049B800A8','',1) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('68776A89-A250-4188-99B2-9CD1B3FB7E28','C126F42A-09B0-43D1-8DCF-9EA049B800A8','޸',2) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('79E96D30-B45F-47F5-8F1C-5E3FF009783C','C126F42A-09B0-43D1-8DCF-9EA049B800A8','ɾ',3) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('066CA266-027D-4E74-8F7C-8AFB4F4C9602','C126F42A-09B0-43D1-8DCF-9EA049B800A8','',4) +GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('9F95F836-E10C-4EFD-B436-5C9D1658BAED','豸','SmartSite/SoftManage.aspx?Type=M',20,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1) +GO +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('49057FC3-538A-4142-B192-D305B0CEF4A2','9F95F836-E10C-4EFD-B436-5C9D1658BAED','',1) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('379D1D1F-CDC1-4C6D-AD3A-CE2186888C0A','9F95F836-E10C-4EFD-B436-5C9D1658BAED','޸',2) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('AE6803C9-6923-481B-9CE5-AE85AC06B345','9F95F836-E10C-4EFD-B436-5C9D1658BAED','ɾ',3) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('08F57065-5251-4EF4-B7D5-EA5C04056BB0','9F95F836-E10C-4EFD-B436-5C9D1658BAED','',4) +GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('834EE5EA-3DDA-49E1-A951-825392893E85','豸','SmartSite/SoftManage.aspx?Type=E',30,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1) +GO +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('23EC254E-F074-426B-B105-3AB919416CE1','834EE5EA-3DDA-49E1-A951-825392893E85','',1) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('6E414A46-C07B-4780-9D83-1B1993A87229','834EE5EA-3DDA-49E1-A951-825392893E85','޸',2) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('C6A9D2D7-6A56-4508-9A3E-90986F57C125','834EE5EA-3DDA-49E1-A951-825392893E85','ɾ',3) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('AC37EA29-3A1B-4272-9994-ED7AC19970B7','834EE5EA-3DDA-49E1-A951-825392893E85','',4) +GO + +CREATE TABLE [dbo].[SmartSite_EquipmentSoft]( + [EquipmentSoftId] [nvarchar](50) NOT NULL, + [EquipmentId] [nvarchar](50) NULL, + [ProjectId] [nvarchar](50) NULL, + [Type] [varchar](2) NULL, + [EquipmentSoftName] [nvarchar](200) NULL, + [EquipmentSoftModel] [nvarchar](200) NULL, + [Number] [int] NULL, + [RunningState] [nvarchar](50) NULL, + [Supplier] [nvarchar](500) NULL, + [SupplierMan] [nvarchar](50) NULL, + [SupplierTel] [nvarchar](50) NULL, + CONSTRAINT [PK_SmartSite_EquipmentSoft] PRIMARY KEY CLUSTERED +( + [EquipmentSoftId] 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].[SmartSite_EquipmentSoft] WITH CHECK ADD CONSTRAINT [FK_SmartSite_EquipmentSoft_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[SmartSite_EquipmentSoft] CHECK CONSTRAINT [FK_SmartSite_EquipmentSoft_Base_Project] +GO + +ALTER TABLE [dbo].[SmartSite_EquipmentSoft] WITH CHECK ADD CONSTRAINT [FK_SmartSite_EquipmentSoft_SmartSite_Equipment] FOREIGN KEY([EquipmentId]) +REFERENCES [dbo].[SmartSite_Equipment] ([EquipmentId]) +GO + +ALTER TABLE [dbo].[SmartSite_EquipmentSoft] CHECK CONSTRAINT [FK_SmartSite_EquipmentSoft_SmartSite_Equipment] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'豸ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'EquipmentSoftId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'EquipmentId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͣ1Ž2Ƶ3⣩' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'Type' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'EquipmentSoftName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'汾' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'EquipmentSoftModel' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'״̬' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'RunningState' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'Supplier' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۺϵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'SupplierMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۺϵ绰' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft', @level2type=N'COLUMN',@level2name=N'SupplierTel' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'豸ǻ۹أ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SmartSite_EquipmentSoft' +GO diff --git a/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-16修改明细.txt b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-16修改明细.txt new file mode 100644 index 00000000..a9946fa5 --- /dev/null +++ b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-16修改明细.txt @@ -0,0 +1,5 @@ +--ADD BY YangHongwei 2023-06-16 +1、新增设备管理(门禁、监控、环境监测)页面 +2、新增设备软件管理(门禁、监控、环境监测)页面 +3、优化费用管理模块。 +--END \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/0-6智慧工地(Menu_SmartSite).sql b/DataBase/菜单初始化脚本/0-6智慧工地(Menu_SmartSite).sql index ed68da0f..dd9a247d 100644 --- a/DataBase/菜单初始化脚本/0-6智慧工地(Menu_SmartSite).sql +++ b/DataBase/菜单初始化脚本/0-6智慧工地(Menu_SmartSite).sql @@ -14,20 +14,91 @@ GO VALUES('15F04E9B-5893-4401-B864-BCDF7D67D13D','豸','',10,'C2C9C4BD-B10B-46AD-9468-66EF063517CF','Menu_SmartSite',1,0,1) GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('B972AE90-D40C-44E0-9A90-7B47B2A3399B','Ž豸','',10,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1) + VALUES('B972AE90-D40C-44E0-9A90-7B47B2A3399B','Ž豸','SmartSite/EquipmentManage.aspx?Type=D',10,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1) GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('641B763D-0C0D-4E52-8803-2E5743328A1F','B972AE90-D40C-44E0-9A90-7B47B2A3399B','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DDE12996-0920-4BE9-A8EB-EB9CB1C7FB2F','B972AE90-D40C-44E0-9A90-7B47B2A3399B','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('8DD3B631-750C-4E0D-AAE0-0B05586C3490','B972AE90-D40C-44E0-9A90-7B47B2A3399B','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('EC0C885F-163C-4D3B-A301-8FF2C291F8D1','B972AE90-D40C-44E0-9A90-7B47B2A3399B','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('908325CA-A50A-456D-8A7F-E193C629F2F9','豸','',20,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1) + VALUES('908325CA-A50A-456D-8A7F-E193C629F2F9','豸','SmartSite/EquipmentManage.aspx?Type=M',20,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1) GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('26FC28FB-C3F2-44B5-8CF6-8AF2E153F2DF','908325CA-A50A-456D-8A7F-E193C629F2F9','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('D5D95624-334C-489A-AE3B-A746D024C5A5','908325CA-A50A-456D-8A7F-E193C629F2F9','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9CB845F6-42BA-4297-91BD-1233CDB97112','908325CA-A50A-456D-8A7F-E193C629F2F9','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('37C274EC-A2E2-4517-AB33-EDC4C36AC43D','908325CA-A50A-456D-8A7F-E193C629F2F9','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','豸','',30,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1) + VALUES('E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','豸','SmartSite/EquipmentManage.aspx?Type=E',30,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1) GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('78439D40-B0DC-4BE2-B361-DF3B77F4D0E8','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3D0BC556-300A-4558-BFE8-4ABFF2A66473','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('373C9D29-445D-4973-B6F6-19621D5BD4B5','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A07E64A2-4318-4E26-8F84-5A086D72EE9C','E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('04A361BF-BFC5-4D23-BF3C-3E5472D94A55','Ԥչ','',40,'15F04E9B-5893-4401-B864-BCDF7D67D13D','Menu_SmartSite',1,1,1) GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','','',20,'C2C9C4BD-B10B-46AD-9468-66EF063517CF','Menu_SmartSite',1,0,1) GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('C126F42A-09B0-43D1-8DCF-9EA049B800A8','Ž豸','SmartSite/SoftManage.aspx?Type=D',10,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C1945F59-AD5E-4301-9538-67511D0EB0EC','C126F42A-09B0-43D1-8DCF-9EA049B800A8','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('68776A89-A250-4188-99B2-9CD1B3FB7E28','C126F42A-09B0-43D1-8DCF-9EA049B800A8','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('79E96D30-B45F-47F5-8F1C-5E3FF009783C','C126F42A-09B0-43D1-8DCF-9EA049B800A8','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('066CA266-027D-4E74-8F7C-8AFB4F4C9602','C126F42A-09B0-43D1-8DCF-9EA049B800A8','',4) + GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('9F95F836-E10C-4EFD-B436-5C9D1658BAED','豸','SmartSite/SoftManage.aspx?Type=M',20,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('49057FC3-538A-4142-B192-D305B0CEF4A2','9F95F836-E10C-4EFD-B436-5C9D1658BAED','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('379D1D1F-CDC1-4C6D-AD3A-CE2186888C0A','9F95F836-E10C-4EFD-B436-5C9D1658BAED','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AE6803C9-6923-481B-9CE5-AE85AC06B345','9F95F836-E10C-4EFD-B436-5C9D1658BAED','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('08F57065-5251-4EF4-B7D5-EA5C04056BB0','9F95F836-E10C-4EFD-B436-5C9D1658BAED','',4) + GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('834EE5EA-3DDA-49E1-A951-825392893E85','豸','SmartSite/SoftManage.aspx?Type=E',30,'5D9BD2EC-8CF4-4579-91B9-786EBB0ADD12','Menu_SmartSite',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('23EC254E-F074-426B-B105-3AB919416CE1','834EE5EA-3DDA-49E1-A951-825392893E85','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6E414A46-C07B-4780-9D83-1B1993A87229','834EE5EA-3DDA-49E1-A951-825392893E85','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C6A9D2D7-6A56-4508-9A3E-90986F57C125','834EE5EA-3DDA-49E1-A951-825392893E85','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AC37EA29-3A1B-4272-9994-ED7AC19970B7','834EE5EA-3DDA-49E1-A951-825392893E85','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('C724ADE0-F445-40C7-9B33-560809A1DBFE','ݽӿڹ','',30,'C2C9C4BD-B10B-46AD-9468-66EF063517CF','Menu_SmartSite',1,0,1) GO diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index a2f00b44..8d1969fe 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -629,6 +629,8 @@ Reference.svcmap + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 43ffea3a..6f9c25b7 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -699,8 +699,6 @@ /// public const string Menu_Notice = "Menu_Notice"; - - /*项目*/ /// /// 项目设置 @@ -3016,6 +3014,39 @@ #endregion #endregion + #region 智慧工地 + /// + /// 门禁设备管理 + /// + public const string EquipmentManageDMenuId = "B972AE90-D40C-44E0-9A90-7B47B2A3399B"; + + /// + /// 监控设备管理 + /// + public const string EquipmentManageMMenuId = "908325CA-A50A-456D-8A7F-E193C629F2F9"; + + /// + /// 环境设备管理 + /// + public const string EquipmentManageEMenuId = "E2C18D81-264E-4BAB-BCFC-DCB0DCFD582E"; + + /// + /// 门禁设备管理 + /// + public const string SoftManageDMenuId = "C126F42A-09B0-43D1-8DCF-9EA049B800A8"; + + /// + /// 监控设备管理 + /// + public const string SoftManageMMenuId = "9F95F836-E10C-4EFD-B436-5C9D1658BAED"; + + /// + /// 环境设备管理 + /// + public const string SoftManageEMenuId = "834EE5EA-3DDA-49E1-A951-825392893E85"; + + #endregion + #endregion #region 项目级菜单 diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index 5fc6aadc..a74ab175 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -356,7 +356,7 @@ } } - #region 项目表下拉框 + #region 项目表下拉框 --施工项目 /// /// 项目表下拉框 /// @@ -364,6 +364,7 @@ /// 是否显示请选择 public static void InitProjectDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { + dropName.Items.Clear(); dropName.DataValueField = "ProjectId"; dropName.DataTextField = "ProjectName"; dropName.DataSource = BLL.ProjectService.GetProjectWorkList(); @@ -381,6 +382,7 @@ /// 是否显示请选择 public static void InitProjectShortNameDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { + dropName.Items.Clear(); dropName.DataValueField = "ProjectId"; dropName.DataTextField = "ShortName"; dropName.DataSource = BLL.ProjectService.GetProjectWorkList(); @@ -392,7 +394,7 @@ } /// - /// 项目表下拉框 + /// 项目表下拉框 --所有项目 /// /// 下拉框名字 /// 是否显示请选择 @@ -422,6 +424,7 @@ /// public static void InitAllProjectShortNameDropDownList(FineUIPro.DropDownList dropName, string userId, bool isShowPlease) { + dropName.Items.Clear(); dropName.DataValueField = "ProjectId"; dropName.DataTextField = "ShortName"; var projectlist = GetProjectByUserIdDropDownList(userId); @@ -444,6 +447,7 @@ /// 是否显示请选择 public static void InitProjectByProjectTypeDropDownList(FineUIPro.DropDownList dropName, string projectType, bool isShowPlease) { + dropName.Items.Clear(); dropName.DataValueField = "ProjectId"; dropName.DataTextField = "ProjectName"; var projectlist = BLL.ProjectService.GetProjectByProjectTypeDropDownList(projectType); diff --git a/SGGL/BLL/ProjectData/ProjectUnitService.cs b/SGGL/BLL/ProjectData/ProjectUnitService.cs index 23eb78cf..bc03d2d0 100644 --- a/SGGL/BLL/ProjectData/ProjectUnitService.cs +++ b/SGGL/BLL/ProjectData/ProjectUnitService.cs @@ -133,7 +133,7 @@ var pUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(e => e.ProjectId == projectId && e.UnitId == unitId); if (pUnit != null) { - if (pUnit.UnitType == Const.ProjectUnitType_2 || pUnit.UnitType == Const.ProjectUnitType_0) + if (pUnit.UnitType == Const.ProjectUnitType_2 || pUnit.UnitType == Const.ProjectUnitType_6 || pUnit.UnitType == Const.ProjectUnitType_0) { isShow = true; } diff --git a/SGGL/BLL/SmartSite/EquipmentService.cs b/SGGL/BLL/SmartSite/EquipmentService.cs new file mode 100644 index 00000000..374fe59d --- /dev/null +++ b/SGGL/BLL/SmartSite/EquipmentService.cs @@ -0,0 +1,130 @@ +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// 设备管理 + /// + public static class EquipmentService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取设备管理 + /// + /// + /// + public static Model.SmartSite_Equipment GetEquipmentByEquipmentId(string EquipmentId) + { + return Funs.DB.SmartSite_Equipment.FirstOrDefault(e => e.EquipmentId == EquipmentId); + } + + /// + /// 获取设备管理名称是否存在 + /// + /// 设备管理id + /// 名称 + /// 是否存在 + public static bool IsExistEquipment(string EquipmentId, string EquipmentName) + { + bool isExist = false; + var role = Funs.DB.SmartSite_Equipment.FirstOrDefault(x => x.EquipmentName == EquipmentName && x.EquipmentId != EquipmentId); + if (role != null) + { + isExist = true; + } + return isExist; + } + + /// + /// 添加设备管理 + /// + /// + public static void AddEquipment(Model.SmartSite_Equipment Equipment) + { + Model.SmartSite_Equipment newEquipment = new Model.SmartSite_Equipment + { + EquipmentId = Equipment.EquipmentId, + ProjectId = Equipment.ProjectId, + Type = Equipment.Type, + EquipmentName = Equipment.EquipmentName, + EquipmentModel = Equipment.EquipmentModel, + Number = Equipment.Number, + RunningState = Equipment.RunningState, + Supplier = Equipment.Supplier, + SupplierMan = Equipment.SupplierMan, + SupplierTel = Equipment.SupplierTel, + }; + Funs.DB.SmartSite_Equipment.InsertOnSubmit(newEquipment); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改设备管理 + /// + /// + public static void UpdateEquipment(Model.SmartSite_Equipment Equipment) + { + Model.SmartSite_Equipment newEquipment = Funs.DB.SmartSite_Equipment.FirstOrDefault(e => e.EquipmentId == Equipment.EquipmentId); + if (newEquipment != null) + { + newEquipment.Type = Equipment.Type; + newEquipment.EquipmentName = Equipment.EquipmentName; + newEquipment.EquipmentModel = Equipment.EquipmentModel; + newEquipment.Number = Equipment.Number; + newEquipment.RunningState = Equipment.RunningState; + newEquipment.Supplier = Equipment.Supplier; + newEquipment.SupplierMan = Equipment.SupplierMan; + newEquipment.SupplierTel = Equipment.SupplierTel; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除设备管理 + /// + /// + public static void DeleteEquipmentById(string EquipmentId) + { + Model.SmartSite_Equipment Equipment = Funs.DB.SmartSite_Equipment.FirstOrDefault(e => e.EquipmentId == EquipmentId); + if (Equipment != null) + { + Funs.DB.SmartSite_Equipment.DeleteOnSubmit(Equipment); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据部门Id获取设备管理下拉选择项 + /// + /// + /// + public static List GetEquipmentList(string projectId, string type) + { + return (from x in Funs.DB.SmartSite_Equipment + where x.ProjectId == projectId && x.Type == type + orderby x.EquipmentName + select x).ToList(); + } + + #region 设备管理表下拉框 + /// + /// 设备管理表下拉框 + /// + /// 下拉框名字 + /// 是否显示请选择 + public static void InitEquipmentDropDownList(FineUIPro.DropDownList dropName, string projectId, string type, bool isShowPlease) + { + dropName.DataValueField = "EquipmentId"; + dropName.DataTextField = "Equipment"; + dropName.DataSource = BLL.EquipmentService.GetEquipmentList(projectId, type); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + #endregion + } +} diff --git a/SGGL/BLL/SmartSite/EquipmentSoftService.cs b/SGGL/BLL/SmartSite/EquipmentSoftService.cs new file mode 100644 index 00000000..19084553 --- /dev/null +++ b/SGGL/BLL/SmartSite/EquipmentSoftService.cs @@ -0,0 +1,131 @@ +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// 软件管理 + /// + public static class EquipmentSoftService + { + public static Model.SGGLDB db = Funs.DB; + + /// + /// 根据主键获取软件管理 + /// + /// + /// + public static Model.SmartSite_EquipmentSoft GetEquipmentSoftByEquipmentSoftId(string EquipmentSoftId) + { + return Funs.DB.SmartSite_EquipmentSoft.FirstOrDefault(e => e.EquipmentSoftId == EquipmentSoftId); + } + + /// + /// 获取软件管理名称是否存在 + /// + /// 软件管理id + /// 名称 + /// 是否存在 + public static bool IsExistEquipmentSoft(string EquipmentSoftId, string EquipmentSoftName) + { + bool isExist = false; + var role = Funs.DB.SmartSite_EquipmentSoft.FirstOrDefault(x => x.EquipmentSoftName == EquipmentSoftName && x.EquipmentSoftId != EquipmentSoftId); + if (role != null) + { + isExist = true; + } + return isExist; + } + + /// + /// 添加软件管理 + /// + /// + public static void AddEquipmentSoft(Model.SmartSite_EquipmentSoft EquipmentSoft) + { + Model.SmartSite_EquipmentSoft newEquipmentSoft = new Model.SmartSite_EquipmentSoft + { + EquipmentSoftId = EquipmentSoft.EquipmentSoftId, + ProjectId = EquipmentSoft.ProjectId, + EquipmentId = EquipmentSoft.EquipmentId, + Type = EquipmentSoft.Type, + EquipmentSoftName = EquipmentSoft.EquipmentSoftName, + EquipmentSoftModel = EquipmentSoft.EquipmentSoftModel, + Number = EquipmentSoft.Number, + RunningState = EquipmentSoft.RunningState, + Supplier = EquipmentSoft.Supplier, + SupplierMan = EquipmentSoft.SupplierMan, + SupplierTel = EquipmentSoft.SupplierTel, + }; + Funs.DB.SmartSite_EquipmentSoft.InsertOnSubmit(newEquipmentSoft); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改软件管理 + /// + /// + public static void UpdateEquipmentSoft(Model.SmartSite_EquipmentSoft EquipmentSoft) + { + Model.SmartSite_EquipmentSoft newEquipmentSoft = Funs.DB.SmartSite_EquipmentSoft.FirstOrDefault(e => e.EquipmentSoftId == EquipmentSoft.EquipmentSoftId); + if (newEquipmentSoft != null) + { + newEquipmentSoft.EquipmentId = EquipmentSoft.EquipmentId; + newEquipmentSoft.EquipmentSoftName = EquipmentSoft.EquipmentSoftName; + newEquipmentSoft.EquipmentSoftModel = EquipmentSoft.EquipmentSoftModel; + newEquipmentSoft.Number = EquipmentSoft.Number; + newEquipmentSoft.RunningState = EquipmentSoft.RunningState; + newEquipmentSoft.Supplier = EquipmentSoft.Supplier; + newEquipmentSoft.SupplierMan = EquipmentSoft.SupplierMan; + newEquipmentSoft.SupplierTel = EquipmentSoft.SupplierTel; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除软件管理 + /// + /// + public static void DeleteEquipmentSoftById(string EquipmentSoftId) + { + Model.SmartSite_EquipmentSoft EquipmentSoft = Funs.DB.SmartSite_EquipmentSoft.FirstOrDefault(e => e.EquipmentSoftId == EquipmentSoftId); + if (EquipmentSoft != null) + { + Funs.DB.SmartSite_EquipmentSoft.DeleteOnSubmit(EquipmentSoft); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据部门Id获取软件管理下拉选择项 + /// + /// + /// + public static List GetEquipmentSoftList(string projectId, string type) + { + return (from x in Funs.DB.SmartSite_EquipmentSoft + where x.ProjectId == projectId && x.Type == type + orderby x.EquipmentSoftName + select x).ToList(); + } + + #region 软件管理表下拉框 + /// + /// 软件管理表下拉框 + /// + /// 下拉框名字 + /// 是否显示请选择 + public static void InitEquipmentSoftDropDownList(FineUIPro.DropDownList dropName, string projectId, string type, bool isShowPlease) + { + dropName.DataValueField = "EquipmentSoftId"; + dropName.DataTextField = "EquipmentSoft"; + dropName.DataSource = BLL.EquipmentSoftService.GetEquipmentSoftList(projectId, type); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + #endregion + } +} diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 44199c5a..274887f7 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1502,6 +1502,10 @@ + + + + @@ -12878,6 +12882,34 @@ SafetyBriefingEdit.aspx + + SoftManage.aspx + ASPXCodeBehind + + + SoftManage.aspx + + + EquipmentManage.aspx + ASPXCodeBehind + + + EquipmentManage.aspx + + + SoftManageEdit.aspx + ASPXCodeBehind + + + SoftManageEdit.aspx + + + EquipmentManageEdit.aspx + ASPXCodeBehind + + + EquipmentManageEdit.aspx + CustomQuery.aspx ASPXCodeBehind @@ -13879,7 +13911,7 @@ True 0 / - http://localhost:8667/ + http://localhost:1773/ False False diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummary.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummary.aspx.cs index 5cb907a0..8d58f331 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummary.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummary.aspx.cs @@ -219,7 +219,7 @@ namespace FineUIPro.Web.HSSE.CostGoods var getCostManageItem = from x in Funs.DB.CostGoods_CostManageItem join y in Funs.DB.CostGoods_CostManage on x.CostManageId equals y.CostManageId - where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == unitId) + where y.ProjectId == this.ProjectId && (unitId == null || y.UnitId == unitId) && y.States==Const.State_2 select new { x.CostManageId, x.CostManageItemId, Year = y.CostManageDate.Value.Year, x.SupCostTypeId, x.CostTypeId, x.PriceMoney }; foreach (var item in getType) diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummaryUnit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummaryUnit.aspx.cs index db38c001..ea8eb445 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummaryUnit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostSummaryUnit.aspx.cs @@ -231,7 +231,7 @@ namespace FineUIPro.Web.HSSE.CostGoods var getCostManageItem = from x in Funs.DB.CostGoods_CostManageItem join y in Funs.DB.CostGoods_CostManage on x.CostManageId equals y.CostManageId - where y.ProjectId == this.ProjectId && (!year.HasValue || y.CostManageDate.Value.Year == year) + where y.ProjectId == this.ProjectId && (!year.HasValue || y.CostManageDate.Value.Year == year) && y.States == Const.State_2 select new { x.CostManageId, x.CostManageItemId, y.UnitId, Year = y.CostManageDate.Value.Year, x.SupCostTypeId, x.CostTypeId, x.PriceMoney }; var getType = (from x in getDetail select new { x.SupSortIndex, x.SortIndex, x.CostType }).Distinct(); diff --git a/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx b/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx new file mode 100644 index 00000000..bf52c97f --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx @@ -0,0 +1,103 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentManage.aspx.cs" Inherits="FineUIPro.Web.SmartSite.EquipmentManage" %> + + + + + 设备管理 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx.cs b/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx.cs new file mode 100644 index 00000000..03622ea7 --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx.cs @@ -0,0 +1,276 @@ +namespace FineUIPro.Web.SmartSite +{ + using BLL; + using System; + using System.Collections.Generic; + using System.Data; + using System.Data.SqlClient; + using System.Linq; + + public partial class EquipmentManage : PageBase + { + /// + /// 类型 + /// + public string Type + { + get + { + return (string)ViewState["Type"]; + } + set + { + ViewState["Type"] = value; + } + } + + /// + /// 菜单id + /// + public string MenuId + { + get + { + return (string)ViewState["MenuId"]; + } + set + { + ViewState["MenuId"] = value; + } + } + + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.Type = Request.Params["type"]; + if (this.Type == "D") + { + this.MenuId = Const.EquipmentManageDMenuId; + } + else if (this.Type == "M") + { + this.MenuId = Const.EquipmentManageMMenuId; + } + else + { + this.MenuId = Const.EquipmentManageEMenuId; + } + ////权限按钮方法 + this.GetButtonPower(); + this.btnNew.OnClientClick = Window1.GetShowReference("EquipmentManageEdit.aspx?type="+this.Type) + "return false;"; + Funs.DropDownPageSize(this.ddlPageSize); + // 绑定表格 + this.BindGrid(); + + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT EquipmentId,EQ.ProjectId,P.ProjectName,Type,EquipmentName,EquipmentModel,Number,RunningState + ,Supplier,SupplierMan,SupplierTel + FROM SmartSite_Equipment AS EQ + LEFT JOIN Base_Project AS P ON EQ.ProjectId=P.ProjectId WHERE 1 = 1"; + List listStr = new List(); + strSql += " AND Type = @Type"; + listStr.Add(new SqlParameter("@Type", this.Type)); + if (!string.IsNullOrEmpty(this.txtEquipmentName.Text.Trim())) + { + strSql += " AND EquipmentName LIKE @EquipmentName"; + listStr.Add(new SqlParameter("@EquipmentName", "%" + this.txtEquipmentName.Text.Trim() + "%")); + } + //if (this.drpLicenseType.SelectedValue != BLL.Const._Null) + //{ + // strSql += " AND EquipmentManage.LicenseType = @LicenseTypeId"; + // listStr.Add(new SqlParameter("@LicenseTypeId", this.drpLicenseType.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(); + } + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, this.MenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + } + } + #endregion + + #region 删除数据 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + this.DeleteData(); + } + + /// + /// 删除方法 + /// + private void DeleteData() + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + if (judgementDelete(rowID, false)) + { + var getD = EquipmentService.GetEquipmentByEquipmentId(rowID); + if (getD != null) + { + LogService.AddSys_Log(this.CurrUser, getD.EquipmentName.ToString(), getD.EquipmentId,this.MenuId, BLL.Const.BtnDelete); + BLL.EquipmentService.DeleteEquipmentById(rowID); + } + } + } + BindGrid(); + ShowNotify("删除数据成功!"); + } + } + #endregion + + #region 分页 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Funs.GetNewIntOrZero(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + BindGrid(); + } + #endregion + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string Id = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentManageEdit.aspx?EquipmentId={0}&type={1}", Id, this.Type, "编辑 - "))); + } + + #region 判断是否可删除 + /// + /// 判断是否可以删除 + /// + /// + private bool judgementDelete(string id, bool isShow) + { + string content = string.Empty; + //if (Funs.DB.Project_ProjectEquipmentManage.FirstOrDefault(x => x.EquipmentManageId == id) != null) + //{ + // content = "该用户已在【项目用户】中使用,不能删除!"; + //} + + if (string.IsNullOrEmpty(content)) + { + return true; + } + else + { + if (isShow) + { + Alert.ShowInTop(content); + } + return false; + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx.designer.cs b/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx.designer.cs new file mode 100644 index 00000000..a671002b --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/EquipmentManage.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.SmartSite +{ + + + public partial class EquipmentManage + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtEquipmentName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEquipmentName; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// 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; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx b/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx new file mode 100644 index 00000000..5cda3c8f --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx @@ -0,0 +1,67 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentManageEdit.aspx.cs" Inherits="FineUIPro.Web.SmartSite.EquipmentManageEdit" %> + + + + + 编辑设备管理 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx.cs b/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx.cs new file mode 100644 index 00000000..a608d5b0 --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx.cs @@ -0,0 +1,167 @@ +using BLL; +using FineUIPro.Web.CQMS.Material; +using System; +using System.Linq; + +namespace FineUIPro.Web.SmartSite +{ + public partial class EquipmentManageEdit : PageBase + { + #region 定义项 + /// + /// 安全措施主键 + /// + public string EquipmentId + { + get + { + return (string)ViewState["EquipmentId"]; + } + set + { + ViewState["EquipmentId"] = value; + } + } + /// + /// 类型 + /// + public string Type + { + get + { + return (string)ViewState["Type"]; + } + set + { + ViewState["Type"] = value; + } + } + /// + /// 菜单id + /// + public string MenuId + { + get + { + return (string)ViewState["MenuId"]; + } + set + { + ViewState["MenuId"] = value; + } + } + #endregion + + /// + /// 安全措施编辑页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + + this.EquipmentId = Request.Params["EquipmentId"]; + this.Type = Request.Params["type"]; + if (this.Type == "D") + { + this.MenuId = Const.EquipmentManageDMenuId; + } + else if (this.Type == "M") + { + this.MenuId = Const.EquipmentManageMMenuId; + } + else + { + this.MenuId = Const.EquipmentManageEMenuId; + } + ///权限 + this.GetButtonPower(); + + ProjectService.InitProjectDropDownList(this.drpProject, true); + if (!string.IsNullOrEmpty(this.EquipmentId)) + { + var Equipment = BLL.EquipmentService.GetEquipmentByEquipmentId(this.EquipmentId); + if (Equipment != null) + { + ProjectService.InitAllProjectDropDownList(this.drpProject, true); + this.drpProject.SelectedValue = Equipment.ProjectId; + this.Type = Equipment.Type; + this.txtEquipmentName.Text = Equipment.EquipmentName; + this.txtEquipmentModel.Text = Equipment.EquipmentModel; + this.txtNumber.Text = Equipment.Number.ToString(); + this.txtRunningState.Text = Equipment.RunningState; + this.txtSupplier.Text = Equipment.Supplier; + this.txtSupplierMan.Text = Equipment.SupplierMan; + this.txtSupplierTel.Text = Equipment.SupplierTel; + } + } + } + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (this.drpProject.SelectedValue == Const._Null) + { + Alert.ShowInParent("请选择项目!", MessageBoxIcon.Warning); + return; + } + + Model.SmartSite_Equipment newEquipment = new Model.SmartSite_Equipment + { + EquipmentName = this.txtEquipmentName.Text.Trim(), + Type = this.Type, + EquipmentModel = this.txtEquipmentModel.Text.Trim(), + Number = Funs.GetNewIntOrZero(this.txtNumber.Text.Trim()), + RunningState = this.txtRunningState.Text.Trim(), + Supplier = this.txtSupplier.Text.Trim(), + SupplierMan = this.txtSupplierMan.Text.Trim(), + SupplierTel = this.txtSupplierTel.Text.Trim(), + }; + + if (this.drpProject.SelectedValue != Const._Null) + { + newEquipment.ProjectId = this.drpProject.SelectedValue; + } + if (string.IsNullOrEmpty(this.EquipmentId)) + { + newEquipment.EquipmentId = SQLHelper.GetNewID(); + BLL.EquipmentService.AddEquipment(newEquipment); + BLL.LogService.AddSys_Log(this.CurrUser, newEquipment.EquipmentName, newEquipment.EquipmentId, this.MenuId, Const.BtnAdd); + } + else + { + newEquipment.EquipmentId = this.EquipmentId; + BLL.EquipmentService.UpdateEquipment(newEquipment); + BLL.LogService.AddSys_Log(this.CurrUser, newEquipment.EquipmentName, newEquipment.EquipmentId, this.MenuId, Const.BtnModify); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, this.MenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx.designer.cs new file mode 100644 index 00000000..9b9363a2 --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/EquipmentManageEdit.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.SmartSite +{ + + + public partial class EquipmentManageEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtEquipmentName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEquipmentName; + + /// + /// txtEquipmentModel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEquipmentModel; + + /// + /// txtNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtNumber; + + /// + /// txtRunningState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRunningState; + + /// + /// txtSupplier 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSupplier; + + /// + /// txtSupplierMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSupplierMan; + + /// + /// txtSupplierTel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSupplierTel; + + /// + /// lb 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + } +} diff --git a/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx b/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx new file mode 100644 index 00000000..fdcef636 --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx @@ -0,0 +1,106 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SoftManage.aspx.cs" Inherits="FineUIPro.Web.SmartSite.SoftManage" %> + + + + + 软件管理 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx.cs b/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx.cs new file mode 100644 index 00000000..e54ae6cc --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx.cs @@ -0,0 +1,277 @@ +namespace FineUIPro.Web.SmartSite +{ + using BLL; + using System; + using System.Collections.Generic; + using System.Data; + using System.Data.SqlClient; + using System.Linq; + + public partial class SoftManage : PageBase + { + /// + /// 类型 + /// + public string Type + { + get + { + return (string)ViewState["Type"]; + } + set + { + ViewState["Type"] = value; + } + } + + /// + /// 菜单id + /// + public string MenuId + { + get + { + return (string)ViewState["MenuId"]; + } + set + { + ViewState["MenuId"] = value; + } + } + + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.Type = Request.Params["type"]; + if (this.Type == "D") + { + this.MenuId = Const.SoftManageDMenuId; + } + else if (this.Type == "M") + { + this.MenuId = Const.SoftManageMMenuId; + } + else + { + this.MenuId = Const.SoftManageEMenuId; + } + ////权限按钮方法 + this.GetButtonPower(); + this.btnNew.OnClientClick = Window1.GetShowReference("SoftManageEdit.aspx?type=" + this.Type) + "return false;"; + Funs.DropDownPageSize(this.ddlPageSize); + // 绑定表格 + this.BindGrid(); + + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT EquipmentSoftId,Soft.ProjectId,P.ProjectName,Soft.Type,Soft.EquipmentSoftName,EQ.EquipmentName,EquipmentModel,Soft.Number,Soft.RunningState + ,Soft.Supplier,Soft.SupplierMan,Soft.SupplierTel + FROM SmartSite_EquipmentSoft AS Soft + LEFT JOIN Base_Project AS P ON Soft.ProjectId=P.ProjectId + LEFT JOIN SmartSite_Equipment AS EQ ON Soft.EquipmentId=EQ.EquipmentId WHERE 1 = 1"; + List listStr = new List(); + strSql += " AND Soft.Type = @Type"; + listStr.Add(new SqlParameter("@Type", this.Type)); + if (!string.IsNullOrEmpty(this.txtEquipmentName.Text.Trim())) + { + strSql += " AND EquipmentName LIKE @EquipmentName"; + listStr.Add(new SqlParameter("@EquipmentName", "%" + this.txtEquipmentName.Text.Trim() + "%")); + } + //if (this.drpLicenseType.SelectedValue != BLL.Const._Null) + //{ + // strSql += " AND EquipmentManage.LicenseType = @LicenseTypeId"; + // listStr.Add(new SqlParameter("@LicenseTypeId", this.drpLicenseType.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(); + } + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, this.MenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + } + } + #endregion + + #region 删除数据 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + this.DeleteData(); + } + + /// + /// 删除方法 + /// + private void DeleteData() + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + if (judgementDelete(rowID, false)) + { + var getD = EquipmentSoftService.GetEquipmentSoftByEquipmentSoftId(rowID); + if (getD != null) + { + LogService.AddSys_Log(this.CurrUser, getD.EquipmentSoftName.ToString(), getD.EquipmentSoftId,this.MenuId, BLL.Const.BtnDelete); + BLL.EquipmentSoftService.DeleteEquipmentSoftById(rowID); + } + } + } + BindGrid(); + ShowNotify("删除数据成功!"); + } + } + #endregion + + #region 分页 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Funs.GetNewIntOrZero(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + BindGrid(); + } + #endregion + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string Id = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SoftManageEdit.aspx?EquipmentSoftId={0}&type={1}", Id, this.Type, "编辑 - "))); + } + + #region 判断是否可删除 + /// + /// 判断是否可以删除 + /// + /// + private bool judgementDelete(string id, bool isShow) + { + string content = string.Empty; + //if (Funs.DB.Project_ProjectEquipmentManage.FirstOrDefault(x => x.EquipmentManageId == id) != null) + //{ + // content = "该用户已在【项目用户】中使用,不能删除!"; + //} + + if (string.IsNullOrEmpty(content)) + { + return true; + } + else + { + if (isShow) + { + Alert.ShowInTop(content); + } + return false; + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx.designer.cs b/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx.designer.cs new file mode 100644 index 00000000..3aa6924c --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/SoftManage.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.SmartSite +{ + + + public partial class SoftManage + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtEquipmentName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEquipmentName; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// 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; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx b/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx new file mode 100644 index 00000000..9cd8ae90 --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx @@ -0,0 +1,70 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SoftManageEdit.aspx.cs" Inherits="FineUIPro.Web.SmartSite.SoftManageEdit" %> + + + + + 编辑软件管理 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx.cs b/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx.cs new file mode 100644 index 00000000..ba50010a --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx.cs @@ -0,0 +1,180 @@ +using BLL; +using FineUIPro.Web.CQMS.Material; +using System; +using System.Linq; + +namespace FineUIPro.Web.SmartSite +{ + public partial class SoftManageEdit : PageBase + { + #region 定义项 + /// + /// 安全措施主键 + /// + public string EquipmentSoftId + { + get + { + return (string)ViewState["EquipmentSoftId"]; + } + set + { + ViewState["EquipmentSoftId"] = value; + } + } + /// + /// 类型 + /// + public string Type + { + get + { + return (string)ViewState["Type"]; + } + set + { + ViewState["Type"] = value; + } + } + /// + /// 菜单id + /// + public string MenuId + { + get + { + return (string)ViewState["MenuId"]; + } + set + { + ViewState["MenuId"] = value; + } + } + #endregion + + /// + /// 安全措施编辑页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + + this.EquipmentSoftId = Request.Params["EquipmentSoftId"]; + this.Type = Request.Params["type"]; + if (this.Type == "D") + { + this.MenuId = Const.SoftManageDMenuId; + } + else if (this.Type == "M") + { + this.MenuId = Const.SoftManageMMenuId; + } + else + { + this.MenuId = Const.SoftManageEMenuId; + } + ///权限 + this.GetButtonPower(); + + ProjectService.InitProjectDropDownList(this.drpProject, true); + EquipmentService.InitEquipmentDropDownList(this.drpEQ, this.drpProject.SelectedValue, this.Type, true); + if (!string.IsNullOrEmpty(this.EquipmentSoftId)) + { + var Equipment = BLL.EquipmentSoftService.GetEquipmentSoftByEquipmentSoftId(this.EquipmentSoftId); + if (Equipment != null) + { + ProjectService.InitAllProjectDropDownList(this.drpProject, true); + this.drpProject.SelectedValue = Equipment.ProjectId; + EquipmentService.InitEquipmentDropDownList(this.drpEQ, this.drpProject.SelectedValue, this.Type, true); + this.drpEQ.SelectedValue = Equipment.EquipmentId; + this.Type = Equipment.Type; + this.txtEquipmentSoftName.Text = Equipment.EquipmentSoftName; + this.txtEquipmentSoftModel.Text = Equipment.EquipmentSoftModel; + this.txtNumber.Text = Equipment.Number.ToString(); + this.txtRunningState.Text = Equipment.RunningState; + this.txtSupplier.Text = Equipment.Supplier; + this.txtSupplierMan.Text = Equipment.SupplierMan; + this.txtSupplierTel.Text = Equipment.SupplierTel; + } + } + } + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (this.drpProject.SelectedValue == Const._Null) + { + Alert.ShowInParent("请选择项目!", MessageBoxIcon.Warning); + return; + } + + Model.SmartSite_EquipmentSoft newEquipment = new Model.SmartSite_EquipmentSoft + { + EquipmentSoftName = this.txtEquipmentSoftName.Text.Trim(), + Type = this.Type, + EquipmentSoftModel = this.txtEquipmentSoftModel.Text.Trim(), + Number = Funs.GetNewIntOrZero(this.txtNumber.Text.Trim()), + RunningState = this.txtRunningState.Text.Trim(), + Supplier = this.txtSupplier.Text.Trim(), + SupplierMan = this.txtSupplierMan.Text.Trim(), + SupplierTel = this.txtSupplierTel.Text.Trim(), + }; + + if (this.drpProject.SelectedValue != Const._Null) + { + newEquipment.ProjectId = this.drpProject.SelectedValue; + } + + if (this.drpEQ.SelectedValue != Const._Null) + { + newEquipment.EquipmentId = this.drpEQ.SelectedValue; + } + if (string.IsNullOrEmpty(this.EquipmentSoftId)) + { + newEquipment.EquipmentSoftId = SQLHelper.GetNewID(); + BLL.EquipmentSoftService.AddEquipmentSoft(newEquipment); + BLL.LogService.AddSys_Log(this.CurrUser, newEquipment.EquipmentSoftName, newEquipment.EquipmentSoftId, this.MenuId, Const.BtnAdd); + } + else + { + newEquipment.EquipmentSoftId = this.EquipmentSoftId; + BLL.EquipmentSoftService.UpdateEquipmentSoft(newEquipment); + BLL.LogService.AddSys_Log(this.CurrUser, newEquipment.EquipmentSoftName, newEquipment.EquipmentSoftId, this.MenuId, Const.BtnModify); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, this.MenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + + protected void drpProject_SelectedIndexChanged(object sender, EventArgs e) + { + EquipmentService.InitEquipmentDropDownList(this.drpEQ, this.drpProject.SelectedValue,this.Type, true); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx.designer.cs new file mode 100644 index 00000000..06e93975 --- /dev/null +++ b/SGGL/FineUIPro.Web/SmartSite/SoftManageEdit.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.SmartSite +{ + + + public partial class SoftManageEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// drpEQ 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpEQ; + + /// + /// txtEquipmentSoftName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEquipmentSoftName; + + /// + /// txtEquipmentSoftModel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEquipmentSoftModel; + + /// + /// txtNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtNumber; + + /// + /// txtRunningState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRunningState; + + /// + /// txtSupplier 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSupplier; + + /// + /// txtSupplierMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSupplierMan; + + /// + /// txtSupplierTel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSupplierTel; + + /// + /// lb 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + } +} diff --git a/SGGL/FineUIPro.Web/common/Menu_SmartSite.xml b/SGGL/FineUIPro.Web/common/Menu_SmartSite.xml index c931acc6..5280a1aa 100644 --- a/SGGL/FineUIPro.Web/common/Menu_SmartSite.xml +++ b/SGGL/FineUIPro.Web/common/Menu_SmartSite.xml @@ -2,12 +2,15 @@ - - - + + + - + + + + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 1e49074f..73565949 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1394,6 +1394,12 @@ namespace Model partial void InsertSitePerson_PersonItem(SitePerson_PersonItem instance); partial void UpdateSitePerson_PersonItem(SitePerson_PersonItem instance); partial void DeleteSitePerson_PersonItem(SitePerson_PersonItem instance); + partial void InsertSmartSite_Equipment(SmartSite_Equipment instance); + partial void UpdateSmartSite_Equipment(SmartSite_Equipment instance); + partial void DeleteSmartSite_Equipment(SmartSite_Equipment instance); + partial void InsertSmartSite_EquipmentSoft(SmartSite_EquipmentSoft instance); + partial void UpdateSmartSite_EquipmentSoft(SmartSite_EquipmentSoft instance); + partial void DeleteSmartSite_EquipmentSoft(SmartSite_EquipmentSoft instance); partial void InsertSolution_ConstructSolution(Solution_ConstructSolution instance); partial void UpdateSolution_ConstructSolution(Solution_ConstructSolution instance); partial void DeleteSolution_ConstructSolution(Solution_ConstructSolution instance); @@ -5370,6 +5376,22 @@ namespace Model } } + public System.Data.Linq.Table SmartSite_Equipment + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table SmartSite_EquipmentSoft + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Solution_ConstructSolution { get @@ -23754,6 +23776,10 @@ namespace Model private EntitySet _SitePerson_PersonItem; + private EntitySet _SmartSite_Equipment; + + private EntitySet _SmartSite_EquipmentSoft; + private EntitySet _Solution_ConstructSolution; private EntitySet _Solution_CQMSConstructSolution; @@ -24021,6 +24047,8 @@ namespace Model this._SitePerson_PersonInOut = new EntitySet(new Action(this.attach_SitePerson_PersonInOut), new Action(this.detach_SitePerson_PersonInOut)); this._SitePerson_PersonInOutNumber = new EntitySet(new Action(this.attach_SitePerson_PersonInOutNumber), new Action(this.detach_SitePerson_PersonInOutNumber)); this._SitePerson_PersonItem = new EntitySet(new Action(this.attach_SitePerson_PersonItem), new Action(this.detach_SitePerson_PersonItem)); + this._SmartSite_Equipment = new EntitySet(new Action(this.attach_SmartSite_Equipment), new Action(this.detach_SmartSite_Equipment)); + this._SmartSite_EquipmentSoft = new EntitySet(new Action(this.attach_SmartSite_EquipmentSoft), new Action(this.detach_SmartSite_EquipmentSoft)); this._Solution_ConstructSolution = new EntitySet(new Action(this.attach_Solution_ConstructSolution), new Action(this.detach_Solution_ConstructSolution)); this._Solution_CQMSConstructSolution = new EntitySet(new Action(this.attach_Solution_CQMSConstructSolution), new Action(this.detach_Solution_CQMSConstructSolution)); this._Solution_ExpertArgument = new EntitySet(new Action(this.attach_Solution_ExpertArgument), new Action(this.detach_Solution_ExpertArgument)); @@ -26523,6 +26551,32 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_Equipment_Base_Project", Storage="_SmartSite_Equipment", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet SmartSite_Equipment + { + get + { + return this._SmartSite_Equipment; + } + set + { + this._SmartSite_Equipment.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_EquipmentSoft_Base_Project", Storage="_SmartSite_EquipmentSoft", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet SmartSite_EquipmentSoft + { + get + { + return this._SmartSite_EquipmentSoft; + } + set + { + this._SmartSite_EquipmentSoft.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_ConstructSolution_Base_Project", Storage="_Solution_ConstructSolution", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Solution_ConstructSolution { @@ -28625,6 +28679,30 @@ namespace Model entity.Base_Project = null; } + private void attach_SmartSite_Equipment(SmartSite_Equipment entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_SmartSite_Equipment(SmartSite_Equipment entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + + private void attach_SmartSite_EquipmentSoft(SmartSite_EquipmentSoft entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_SmartSite_EquipmentSoft(SmartSite_EquipmentSoft entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Solution_ConstructSolution(Solution_ConstructSolution entity) { this.SendPropertyChanging(); @@ -223472,6 +223550,737 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SmartSite_Equipment")] + public partial class SmartSite_Equipment : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _EquipmentId; + + private string _ProjectId; + + private string _Type; + + private string _EquipmentName; + + private string _EquipmentModel; + + private System.Nullable _Number; + + private string _RunningState; + + private string _Supplier; + + private string _SupplierMan; + + private string _SupplierTel; + + private EntityRef _Base_Project; + + private EntitySet _SmartSite_EquipmentSoft; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnEquipmentIdChanging(string value); + partial void OnEquipmentIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnTypeChanging(string value); + partial void OnTypeChanged(); + partial void OnEquipmentNameChanging(string value); + partial void OnEquipmentNameChanged(); + partial void OnEquipmentModelChanging(string value); + partial void OnEquipmentModelChanged(); + partial void OnNumberChanging(System.Nullable value); + partial void OnNumberChanged(); + partial void OnRunningStateChanging(string value); + partial void OnRunningStateChanged(); + partial void OnSupplierChanging(string value); + partial void OnSupplierChanged(); + partial void OnSupplierManChanging(string value); + partial void OnSupplierManChanged(); + partial void OnSupplierTelChanging(string value); + partial void OnSupplierTelChanged(); + #endregion + + public SmartSite_Equipment() + { + this._Base_Project = default(EntityRef); + this._SmartSite_EquipmentSoft = new EntitySet(new Action(this.attach_SmartSite_EquipmentSoft), new Action(this.detach_SmartSite_EquipmentSoft)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string EquipmentId + { + get + { + return this._EquipmentId; + } + set + { + if ((this._EquipmentId != value)) + { + this.OnEquipmentIdChanging(value); + this.SendPropertyChanging(); + this._EquipmentId = value; + this.SendPropertyChanged("EquipmentId"); + this.OnEquipmentIdChanged(); + } + } + } + + [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="_Type", DbType="VarChar(2)")] + public string Type + { + get + { + return this._Type; + } + set + { + if ((this._Type != value)) + { + this.OnTypeChanging(value); + this.SendPropertyChanging(); + this._Type = value; + this.SendPropertyChanged("Type"); + this.OnTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentName", DbType="NVarChar(200)")] + public string EquipmentName + { + get + { + return this._EquipmentName; + } + set + { + if ((this._EquipmentName != value)) + { + this.OnEquipmentNameChanging(value); + this.SendPropertyChanging(); + this._EquipmentName = value; + this.SendPropertyChanged("EquipmentName"); + this.OnEquipmentNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentModel", DbType="NVarChar(200)")] + public string EquipmentModel + { + get + { + return this._EquipmentModel; + } + set + { + if ((this._EquipmentModel != value)) + { + this.OnEquipmentModelChanging(value); + this.SendPropertyChanging(); + this._EquipmentModel = value; + this.SendPropertyChanged("EquipmentModel"); + this.OnEquipmentModelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Number", DbType="Int")] + public System.Nullable Number + { + get + { + return this._Number; + } + set + { + if ((this._Number != value)) + { + this.OnNumberChanging(value); + this.SendPropertyChanging(); + this._Number = value; + this.SendPropertyChanged("Number"); + this.OnNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RunningState", DbType="NVarChar(50)")] + public string RunningState + { + get + { + return this._RunningState; + } + set + { + if ((this._RunningState != value)) + { + this.OnRunningStateChanging(value); + this.SendPropertyChanging(); + this._RunningState = value; + this.SendPropertyChanged("RunningState"); + this.OnRunningStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Supplier", DbType="NVarChar(500)")] + public string Supplier + { + get + { + return this._Supplier; + } + set + { + if ((this._Supplier != value)) + { + this.OnSupplierChanging(value); + this.SendPropertyChanging(); + this._Supplier = value; + this.SendPropertyChanged("Supplier"); + this.OnSupplierChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupplierMan", DbType="NVarChar(50)")] + public string SupplierMan + { + get + { + return this._SupplierMan; + } + set + { + if ((this._SupplierMan != value)) + { + this.OnSupplierManChanging(value); + this.SendPropertyChanging(); + this._SupplierMan = value; + this.SendPropertyChanged("SupplierMan"); + this.OnSupplierManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupplierTel", DbType="NVarChar(50)")] + public string SupplierTel + { + get + { + return this._SupplierTel; + } + set + { + if ((this._SupplierTel != value)) + { + this.OnSupplierTelChanging(value); + this.SendPropertyChanging(); + this._SupplierTel = value; + this.SendPropertyChanged("SupplierTel"); + this.OnSupplierTelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_Equipment_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.SmartSite_Equipment.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.SmartSite_Equipment.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_EquipmentSoft_SmartSite_Equipment", Storage="_SmartSite_EquipmentSoft", ThisKey="EquipmentId", OtherKey="EquipmentId", DeleteRule="NO ACTION")] + public EntitySet SmartSite_EquipmentSoft + { + get + { + return this._SmartSite_EquipmentSoft; + } + set + { + this._SmartSite_EquipmentSoft.Assign(value); + } + } + + 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)); + } + } + + private void attach_SmartSite_EquipmentSoft(SmartSite_EquipmentSoft entity) + { + this.SendPropertyChanging(); + entity.SmartSite_Equipment = this; + } + + private void detach_SmartSite_EquipmentSoft(SmartSite_EquipmentSoft entity) + { + this.SendPropertyChanging(); + entity.SmartSite_Equipment = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.SmartSite_EquipmentSoft")] + public partial class SmartSite_EquipmentSoft : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _EquipmentSoftId; + + private string _EquipmentId; + + private string _ProjectId; + + private string _Type; + + private string _EquipmentSoftName; + + private string _EquipmentSoftModel; + + private System.Nullable _Number; + + private string _RunningState; + + private string _Supplier; + + private string _SupplierMan; + + private string _SupplierTel; + + private EntityRef _Base_Project; + + private EntityRef _SmartSite_Equipment; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnEquipmentSoftIdChanging(string value); + partial void OnEquipmentSoftIdChanged(); + partial void OnEquipmentIdChanging(string value); + partial void OnEquipmentIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnTypeChanging(string value); + partial void OnTypeChanged(); + partial void OnEquipmentSoftNameChanging(string value); + partial void OnEquipmentSoftNameChanged(); + partial void OnEquipmentSoftModelChanging(string value); + partial void OnEquipmentSoftModelChanged(); + partial void OnNumberChanging(System.Nullable value); + partial void OnNumberChanged(); + partial void OnRunningStateChanging(string value); + partial void OnRunningStateChanged(); + partial void OnSupplierChanging(string value); + partial void OnSupplierChanged(); + partial void OnSupplierManChanging(string value); + partial void OnSupplierManChanged(); + partial void OnSupplierTelChanging(string value); + partial void OnSupplierTelChanged(); + #endregion + + public SmartSite_EquipmentSoft() + { + this._Base_Project = default(EntityRef); + this._SmartSite_Equipment = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentSoftId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string EquipmentSoftId + { + get + { + return this._EquipmentSoftId; + } + set + { + if ((this._EquipmentSoftId != value)) + { + this.OnEquipmentSoftIdChanging(value); + this.SendPropertyChanging(); + this._EquipmentSoftId = value; + this.SendPropertyChanged("EquipmentSoftId"); + this.OnEquipmentSoftIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentId", DbType="NVarChar(50)")] + public string EquipmentId + { + get + { + return this._EquipmentId; + } + set + { + if ((this._EquipmentId != value)) + { + if (this._SmartSite_Equipment.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnEquipmentIdChanging(value); + this.SendPropertyChanging(); + this._EquipmentId = value; + this.SendPropertyChanged("EquipmentId"); + this.OnEquipmentIdChanged(); + } + } + } + + [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="_Type", DbType="VarChar(2)")] + public string Type + { + get + { + return this._Type; + } + set + { + if ((this._Type != value)) + { + this.OnTypeChanging(value); + this.SendPropertyChanging(); + this._Type = value; + this.SendPropertyChanged("Type"); + this.OnTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentSoftName", DbType="NVarChar(200)")] + public string EquipmentSoftName + { + get + { + return this._EquipmentSoftName; + } + set + { + if ((this._EquipmentSoftName != value)) + { + this.OnEquipmentSoftNameChanging(value); + this.SendPropertyChanging(); + this._EquipmentSoftName = value; + this.SendPropertyChanged("EquipmentSoftName"); + this.OnEquipmentSoftNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentSoftModel", DbType="NVarChar(200)")] + public string EquipmentSoftModel + { + get + { + return this._EquipmentSoftModel; + } + set + { + if ((this._EquipmentSoftModel != value)) + { + this.OnEquipmentSoftModelChanging(value); + this.SendPropertyChanging(); + this._EquipmentSoftModel = value; + this.SendPropertyChanged("EquipmentSoftModel"); + this.OnEquipmentSoftModelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Number", DbType="Int")] + public System.Nullable Number + { + get + { + return this._Number; + } + set + { + if ((this._Number != value)) + { + this.OnNumberChanging(value); + this.SendPropertyChanging(); + this._Number = value; + this.SendPropertyChanged("Number"); + this.OnNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RunningState", DbType="NVarChar(50)")] + public string RunningState + { + get + { + return this._RunningState; + } + set + { + if ((this._RunningState != value)) + { + this.OnRunningStateChanging(value); + this.SendPropertyChanging(); + this._RunningState = value; + this.SendPropertyChanged("RunningState"); + this.OnRunningStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Supplier", DbType="NVarChar(500)")] + public string Supplier + { + get + { + return this._Supplier; + } + set + { + if ((this._Supplier != value)) + { + this.OnSupplierChanging(value); + this.SendPropertyChanging(); + this._Supplier = value; + this.SendPropertyChanged("Supplier"); + this.OnSupplierChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupplierMan", DbType="NVarChar(50)")] + public string SupplierMan + { + get + { + return this._SupplierMan; + } + set + { + if ((this._SupplierMan != value)) + { + this.OnSupplierManChanging(value); + this.SendPropertyChanging(); + this._SupplierMan = value; + this.SendPropertyChanged("SupplierMan"); + this.OnSupplierManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupplierTel", DbType="NVarChar(50)")] + public string SupplierTel + { + get + { + return this._SupplierTel; + } + set + { + if ((this._SupplierTel != value)) + { + this.OnSupplierTelChanging(value); + this.SendPropertyChanging(); + this._SupplierTel = value; + this.SendPropertyChanged("SupplierTel"); + this.OnSupplierTelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_EquipmentSoft_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.SmartSite_EquipmentSoft.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.SmartSite_EquipmentSoft.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SmartSite_EquipmentSoft_SmartSite_Equipment", Storage="_SmartSite_Equipment", ThisKey="EquipmentId", OtherKey="EquipmentId", IsForeignKey=true)] + public SmartSite_Equipment SmartSite_Equipment + { + get + { + return this._SmartSite_Equipment.Entity; + } + set + { + SmartSite_Equipment previousValue = this._SmartSite_Equipment.Entity; + if (((previousValue != value) + || (this._SmartSite_Equipment.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._SmartSite_Equipment.Entity = null; + previousValue.SmartSite_EquipmentSoft.Remove(this); + } + this._SmartSite_Equipment.Entity = value; + if ((value != null)) + { + value.SmartSite_EquipmentSoft.Add(this); + this._EquipmentId = value.EquipmentId; + } + else + { + this._EquipmentId = default(string); + } + this.SendPropertyChanged("SmartSite_Equipment"); + } + } + } + + 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.Solution_ConstructSolution")] public partial class Solution_ConstructSolution : INotifyPropertyChanging, INotifyPropertyChanged { diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index c819228c..48bf43b9 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -361,7 +361,7 @@ True 0 / - http://localhost:9850/ + http://localhost:3528/ False False