From 22661b6f0e5bec963a2ca33000b125cd38ba88aa Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Sat, 25 Jan 2025 11:56:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SGGLDB_V2025-01-25-001-gaofei.sql | 37 + .../SGGLDB_V2025-01-25-002-gaofei.sql | 301 ++ SGGL/BLL/BLL.csproj | 3 + SGGL/BLL/Common/Const.cs | 15 + .../DCGLCheckRectifyItemService.cs | 61 + .../ServerCheck/DCGLCheckRectifyService.cs | 63 + SGGL/BLL/OpenService/FileInsertService.cs | 138 + SGGL/BLL/WebService/CNCECHSSEWebService.cs | 84 + .../DCGL/ServerCheck/CheckNotice.aspx | 232 ++ .../DCGL/ServerCheck/CheckNotice.aspx.cs | 547 +++ .../ServerCheck/CheckNotice.aspx.designer.cs | 314 ++ .../DCGL/ServerCheck/CheckRectify.aspx | 135 + .../DCGL/ServerCheck/CheckRectify.aspx.cs | 622 ++++ .../ServerCheck/CheckRectify.aspx.designer.cs | 161 + .../DCGL/ServerCheck/CheckRectifyEdit.aspx | 147 + .../DCGL/ServerCheck/CheckRectifyEdit.aspx.cs | 192 + .../CheckRectifyEdit.aspx.designer.cs | 224 ++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 25 +- SGGL/FineUIPro.Web/common/Menu_HSSE.xml | 1 - SGGL/FineUIPro.Web/common/Menu_PHTGL.xml | 2 +- SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 3 + SGGL/Model/APIItem/DCGLCheckRectifyItem.cs | 295 ++ SGGL/Model/Model.cs | 3170 +++++++++++++++++ SGGL/Model/Model.csproj | 1 + 24 files changed, 6770 insertions(+), 3 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2025-01-25-001-gaofei.sql create mode 100644 DataBase/版本日志/SGGLDB_V2025-01-25-002-gaofei.sql create mode 100644 SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyItemService.cs create mode 100644 SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs create mode 100644 SGGL/BLL/OpenService/FileInsertService.cs create mode 100644 SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx create mode 100644 SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.cs create mode 100644 SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx create mode 100644 SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.cs create mode 100644 SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx create mode 100644 SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.designer.cs create mode 100644 SGGL/Model/APIItem/DCGLCheckRectifyItem.cs diff --git a/DataBase/版本日志/SGGLDB_V2025-01-25-001-gaofei.sql b/DataBase/版本日志/SGGLDB_V2025-01-25-001-gaofei.sql new file mode 100644 index 00000000..f12d36c1 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-01-25-001-gaofei.sql @@ -0,0 +1,37 @@ + + +--ע⣡ִ֮ǰ¿ͻûϱ˵Menu_ZHGLûMenuTypeΪMenu_ZHGL + +--Ŷ +IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '8B9C0F42-D36F-4798-94AB-F56723E8B714') +BEGIN + --Ŷ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('8B9C0F42-D36F-4798-94AB-F56723E8B714','Ŷ',null,60,'0','Menu_ZHGL',1,0,1) + + --֪ͨ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('15443DE9-4AC2-43F9-A622-9F9253ECB157','֪ͨ','DCGL/ServerCheck/CheckNotice.aspx',10,'8B9C0F42-D36F-4798-94AB-F56723E8B714','Menu_ZHGL',1,1,1) + + --· + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('2E4A3E58-44B7-41B0-BFE3-634DF29AAE27','·','DCGL/ServerCheck/CheckRectify.aspx',20,'8B9C0F42-D36F-4798-94AB-F56723E8B714','Menu_ZHGL',1,1,1) +END +GO + + +--·İť +IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '2E4A3E58-44B7-41B0-BFE3-634DF29AAE27') +BEGIN + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('002D5E43-8A3B-4B48-8058-5175347224BD','2E4A3E58-44B7-41B0-BFE3-634DF29AAE27','޸',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('D8548A9A-5522-4DBC-BF17-31EE21AA97E9','2E4A3E58-44B7-41B0-BFE3-634DF29AAE27','',2) +END +GO + + + + + + diff --git a/DataBase/版本日志/SGGLDB_V2025-01-25-002-gaofei.sql b/DataBase/版本日志/SGGLDB_V2025-01-25-002-gaofei.sql new file mode 100644 index 00000000..715a0112 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-01-25-002-gaofei.sql @@ -0,0 +1,301 @@ + + +--DCGL_Check_CheckInfo +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'DCGL_Check_CheckInfo') AND type = N'U') +BEGIN + +CREATE TABLE [dbo].[DCGL_Check_CheckInfo]( + [CheckInfoId] [nvarchar](50) NOT NULL, + [CheckTypeName] [nvarchar](50) NOT NULL, + [SubjectUnitId] [nvarchar](50) NOT NULL, + [SubjectUnitAdd] [nvarchar](500) NULL, + [SubjectUnitMan] [nvarchar](50) NULL, + [SubjectUnitTel] [nvarchar](50) NULL, + [CheckStartTime] [datetime] NOT NULL, + [CheckEndTime] [datetime] NOT NULL, + [SubjectObject] [nvarchar](500) NULL, + [CheckTeamLeader] [nvarchar](50) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [CheckTeamLeaderName] [nvarchar](50) NULL, + [UnitId] [nvarchar](50) NULL, + [SexName] [nvarchar](5) NULL, + [SupervisionGroupId] [nvarchar](50) NULL, + [SupervisionGroupName] [nvarchar](50) NULL, + [SubjectProjectId] [nvarchar](50) NULL, + [SubjectProjectName] [nvarchar](200) NULL, + [SubjectUnitManId] [nvarchar](50) NULL, + [CheckManId] [nvarchar](50) NULL, + [CheckManName] [nvarchar](50) NULL, + CONSTRAINT [PK_DCGL_Check_CheckInfo] PRIMARY KEY CLUSTERED +( + [CheckInfoId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +ALTER TABLE [dbo].[DCGL_Check_CheckInfo] WITH CHECK ADD CONSTRAINT [FK_DCGL_Check_CheckInfo_Base_Unit] FOREIGN KEY([SubjectUnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +ALTER TABLE [dbo].[DCGL_Check_CheckInfo] CHECK CONSTRAINT [FK_DCGL_Check_CheckInfo_Base_Unit] +ALTER TABLE [dbo].[DCGL_Check_CheckInfo] WITH CHECK ADD CONSTRAINT [FK_DCGL_Check_CheckInfo_Base_Unit1] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +ALTER TABLE [dbo].[DCGL_Check_CheckInfo] CHECK CONSTRAINT [FK_DCGL_Check_CheckInfo_Base_Unit1] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'鷽ʽ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'CheckTypeName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܼ쵥λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'SubjectUnitId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܼ쵥λַ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'SubjectUnitAdd' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܼ쵥λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'SubjectUnitMan' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܼ쵥λ绰' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'SubjectUnitTel' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'鿪ʼʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'CheckStartTime' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'CheckEndTime' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'SubjectObject' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'鳤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'CheckTeamLeader' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'鳤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'CheckTeamLeaderName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'鳤λID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'UnitId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ա' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo', @level2type=N'COLUMN',@level2name=N'SexName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo' + +END +GO + + + +--DCGL_Check_CheckInfo_CheckFile +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'DCGL_Check_CheckInfo_CheckFile') AND type = N'U') +BEGIN +CREATE TABLE [dbo].[DCGL_Check_CheckInfo_CheckFile]( + [CheckFileId] [nvarchar](50) NOT NULL, + [CheckInfoId] [nvarchar](50) NULL, + [CheckFileName] [nvarchar](500) NULL, + [SortIndex] [int] NULL, + [Remark] [nvarchar](500) NULL, + CONSTRAINT [PK_DCGL_Check_CheckInfo_CheckFile] PRIMARY KEY CLUSTERED +( + [CheckFileId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +ALTER TABLE [dbo].[DCGL_Check_CheckInfo_CheckFile] WITH CHECK ADD CONSTRAINT [FK_DCGL_Check_CheckInfo_CheckFile_DCGL_Check_CheckInfo] FOREIGN KEY([CheckInfoId]) +REFERENCES [dbo].[DCGL_Check_CheckInfo] ([CheckInfoId]) +ALTER TABLE [dbo].[DCGL_Check_CheckInfo_CheckFile] CHECK CONSTRAINT [FK_DCGL_Check_CheckInfo_CheckFile_DCGL_Check_CheckInfo] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ලid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckFile', @level2type=N'COLUMN',@level2name=N'CheckInfoId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckFile', @level2type=N'COLUMN',@level2name=N'CheckFileName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckFile', @level2type=N'COLUMN',@level2name=N'SortIndex' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckFile', @level2type=N'COLUMN',@level2name=N'Remark' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckFile' +END +GO + + + +--DCGL_Check_CheckInfo_CheckTeam +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'DCGL_Check_CheckInfo_CheckTeam') AND type = N'U') +BEGIN + +CREATE TABLE [dbo].[DCGL_Check_CheckInfo_CheckTeam]( + [CheckTeamId] [nvarchar](50) NOT NULL, + [CheckInfoId] [nvarchar](50) NULL, + [UserId] [nvarchar](50) NULL, + [SortIndex] [int] NULL, + [PostName] [nvarchar](200) NULL, + [WorkTitle] [nvarchar](200) NULL, + [CheckPostName] [nvarchar](200) NULL, + [CheckDate] [datetime] NULL, + [UserName] [nvarchar](50) NULL, + [UnitId] [nvarchar](50) NULL, + [SexName] [nvarchar](5) NULL, + [SupervisionGroupId] [nvarchar](50) NULL, + [SupervisionGroupName] [nvarchar](50) NULL, + CONSTRAINT [PK_DCGL_Check_CheckInfo_CheckTeam] PRIMARY KEY CLUSTERED +( + [CheckTeamId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +ALTER TABLE [dbo].[DCGL_Check_CheckInfo_CheckTeam] WITH CHECK ADD CONSTRAINT [FK_DCGL_Check_CheckInfo_CheckTeam_Base_Unit1] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +ALTER TABLE [dbo].[DCGL_Check_CheckInfo_CheckTeam] CHECK CONSTRAINT [FK_DCGL_Check_CheckInfo_CheckTeam_Base_Unit1] +ALTER TABLE [dbo].[DCGL_Check_CheckInfo_CheckTeam] WITH CHECK ADD CONSTRAINT [FK_DCGL_Check_CheckInfo_CheckTeam_Check_CheckInfo] FOREIGN KEY([CheckInfoId]) +REFERENCES [dbo].[DCGL_Check_CheckInfo] ([CheckInfoId]) +ALTER TABLE [dbo].[DCGL_Check_CheckInfo_CheckTeam] CHECK CONSTRAINT [FK_DCGL_Check_CheckInfo_CheckTeam_Check_CheckInfo] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckTeam', @level2type=N'COLUMN',@level2name=N'CheckInfoId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ԱId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckTeam', @level2type=N'COLUMN',@level2name=N'UserId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckTeam', @level2type=N'COLUMN',@level2name=N'SortIndex' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ְ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckTeam', @level2type=N'COLUMN',@level2name=N'PostName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ְ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckTeam', @level2type=N'COLUMN',@level2name=N'WorkTitle' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Сְ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckTeam', @level2type=N'COLUMN',@level2name=N'CheckPostName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckTeam', @level2type=N'COLUMN',@level2name=N'CheckDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ա' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckTeam', @level2type=N'COLUMN',@level2name=N'UserName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ԱλID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckTeam', @level2type=N'COLUMN',@level2name=N'UnitId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ա' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckTeam', @level2type=N'COLUMN',@level2name=N'SexName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'鹤Ա' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_CheckTeam' +END +GO + + + + + +--DCGL_Check_CheckInfo_TableNoticeItem +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'DCGL_Check_CheckInfo_TableNoticeItem') AND type = N'U') +BEGIN +CREATE TABLE [dbo].[DCGL_Check_CheckInfo_TableNoticeItem]( + [ID] [nvarchar](50) NOT NULL, + [CheckInfoId] [nvarchar](50) NULL, + [SortIndex] [int] NULL, + [Describe] [nvarchar](800) NULL, + [Standards] [nvarchar](800) NULL, + [Advice] [nvarchar](800) NULL, + [LimitTime] [datetime] NULL, + [Situation] [nvarchar](800) NULL, + [Remark] [nvarchar](800) NULL, + [Url] [nvarchar](2000) NULL, + [AffUrl] [nvarchar](2000) NULL, + [RiskLevel] [nvarchar](50) NULL, + [ProblemTypes] [char](1) NULL, + [ProblemSubTypeId] [nvarchar](50) NULL, + [ProblemSubType] [nvarchar](100) NULL, + [States] [nvarchar](2) NULL, + CONSTRAINT [PK_Check_CheckInfo_TableNoticeItem] PRIMARY KEY CLUSTERED +( + [ID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ල' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_TableNoticeItem', @level2type=N'COLUMN',@level2name=N'CheckInfoId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_TableNoticeItem', @level2type=N'COLUMN',@level2name=N'SortIndex' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_TableNoticeItem', @level2type=N'COLUMN',@level2name=N'Describe' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ݱ׼' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_TableNoticeItem', @level2type=N'COLUMN',@level2name=N'Standards' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_TableNoticeItem', @level2type=N'COLUMN',@level2name=N'Advice' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_TableNoticeItem', @level2type=N'COLUMN',@level2name=N'LimitTime' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_TableNoticeItem', @level2type=N'COLUMN',@level2name=N'Situation' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ǰƬ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_TableNoticeItem', @level2type=N'COLUMN',@level2name=N'Url' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĺƬ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_TableNoticeItem', @level2type=N'COLUMN',@level2name=N'AffUrl' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȼϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckInfo_TableNoticeItem' + +END +GO + + + +--DCGL_Check_CheckRectify +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'DCGL_Check_CheckRectify') AND type = N'U') +BEGIN +CREATE TABLE [dbo].[DCGL_Check_CheckRectify]( + [CheckRectifyId] [nvarchar](50) NOT NULL, + [CheckRectifyCode] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [UnitId] [nvarchar](50) NULL, + [CheckDate] [datetime] NULL, + [IssueMan] [nvarchar](50) NULL, + [IssueDate] [datetime] NULL, + [HandleState] [char](1) NULL, + [ProjectName] [nvarchar](500) NULL, + CONSTRAINT [PK_DCGL_Check_CheckRectify] PRIMARY KEY CLUSTERED +( + [CheckRectifyId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +ALTER TABLE [dbo].[DCGL_Check_CheckRectify] WITH CHECK ADD CONSTRAINT [FK_DCGL_Check_CheckRectify_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +ALTER TABLE [dbo].[DCGL_Check_CheckRectify] CHECK CONSTRAINT [FK_DCGL_Check_CheckRectify_Base_Unit] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectify', @level2type=N'COLUMN',@level2name=N'CheckRectifyId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectify', @level2type=N'COLUMN',@level2name=N'CheckRectifyCode' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectify', @level2type=N'COLUMN',@level2name=N'ProjectId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'鵥λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectify', @level2type=N'COLUMN',@level2name=N'UnitId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܼʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectify', @level2type=N'COLUMN',@level2name=N'CheckDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ǩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectify', @level2type=N'COLUMN',@level2name=N'IssueMan' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ǩʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectify', @level2type=N'COLUMN',@level2name=N'IssueDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectify', @level2type=N'COLUMN',@level2name=N'ProjectName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ı' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectify' +END +GO + + +--DCGL_Check_CheckRectifyItem +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'DCGL_Check_CheckRectifyItem') AND type = N'U') +BEGIN + +CREATE TABLE [dbo].[DCGL_Check_CheckRectifyItem]( + [CheckRectifyItemId] [nvarchar](50) NOT NULL, + [CheckRectifyId] [nvarchar](50) NULL, + [NoticeItemId] [nvarchar](50) NULL, + [ConfirmMan] [nvarchar](50) NULL, + [ConfirmManName] [nvarchar](50) NULL, + [ConfirmDate] [datetime] NULL, + [OrderEndDate] [datetime] NULL, + [OrderEndPerson] [nvarchar](50) NULL, + [RealEndDate] [datetime] NULL, + [Verification] [nvarchar](50) NULL, + CONSTRAINT [PK_DCGL_Check_CheckRectifyItem] PRIMARY KEY CLUSTERED +( + [CheckRectifyItemId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +ALTER TABLE [dbo].[DCGL_Check_CheckRectifyItem] WITH CHECK ADD CONSTRAINT [FK_DCGL_Check_CheckRectifyItem_Check_CheckRectify] FOREIGN KEY([CheckRectifyId]) +REFERENCES [dbo].[DCGL_Check_CheckRectify] ([CheckRectifyId]) +ALTER TABLE [dbo].[DCGL_Check_CheckRectifyItem] CHECK CONSTRAINT [FK_DCGL_Check_CheckRectifyItem_Check_CheckRectify] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectifyItem', @level2type=N'COLUMN',@level2name=N'CheckRectifyItemId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectifyItem', @level2type=N'COLUMN',@level2name=N'CheckRectifyId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectifyItem', @level2type=N'COLUMN',@level2name=N'NoticeItemId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectifyItem', @level2type=N'COLUMN',@level2name=N'ConfirmMan' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectifyItem', @level2type=N'COLUMN',@level2name=N'ConfirmManName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectifyItem', @level2type=N'COLUMN',@level2name=N'ConfirmDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ҫʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectifyItem', @level2type=N'COLUMN',@level2name=N'OrderEndDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectifyItem', @level2type=N'COLUMN',@level2name=N'OrderEndPerson' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʵʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectifyItem', @level2type=N'COLUMN',@level2name=N'RealEndDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵȫ֤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectifyItem', @level2type=N'COLUMN',@level2name=N'Verification' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'DCGL_Check_CheckRectifyItem' +END +GO + + + +--View_DCGL_CheckRectifyListFromSUB +CREATE VIEW [dbo].[View_DCGL_CheckRectifyListFromSUB] +AS +/*ӹ˾ĵͼ*/ +SELECT CheckRectifyItem.CheckRectifyItemId + ,CheckRectifyItem.CheckRectifyId + ,CheckRectifyItem.NoticeItemId + ,CheckRectifyItem.ConfirmMan + ,CheckRectifyItem.ConfirmManName + ,CheckRectifyItem.ConfirmDate + ,CheckRectifyItem.OrderEndDate + ,CheckRectifyItem.OrderEndPerson + ,CheckRectifyItem.RealEndDate + ,CheckRectifyItem.Verification + ,CheckRectify.CheckRectifyCode + ,CheckRectify.ProjectId + ,CheckRectify.UnitId + ,CheckRectify.CheckDate + ,CheckRectify.IssueMan + ,CheckRectify.IssueDate + ,CheckRectify.HandleState + ,NoticeItem.SortIndex AS SortIndex + ,'' AS WorkType + ,'' AS DangerPoint + ,'⣩:'+NoticeItem.Describe+';ݱ׼:'+NoticeItem.Standards+';:'+NoticeItem.Advice AS RiskExists + ,'' AS IsProject + ,'' AS CheckMan + ,'' AS SubjectUnitMan + --,Table5Item.SortIndex + --,Table5Item.WorkType + --,Table5Item.DangerPoint + --,Table5Item.RiskExists + --,Table5Item.IsProject + --,Table5Item.CheckMan + --,Table5Item.SubjectUnitMan + ,AttachFile.AttachFileId + ,AttachFile.ToKeyId + ,AttachFile.AttachSource + ,AttachFile.AttachUrl + ,AttachFile2.AttachFileId AS AttachFileId2 + ,AttachFile2.ToKeyId AS ToKeyId2 + ,AttachFile2.AttachSource AS AttachSource2 + ,AttachFile2.AttachUrl AS AttachUrl2 +FROM dbo.DCGL_Check_CheckRectifyItem AS CheckRectifyItem +LEFT JOIN dbo.DCGL_Check_CheckRectify AS CheckRectify ON CheckRectifyItem.CheckRectifyid=CheckRectify.CheckRectifyId +--LEFT JOIN dbo.Check_CheckInfo_Table5Item as Table5Item on CheckRectifyItem.Table5ItemId=Table5Item.ID +LEFT JOIN DCGL_Check_CheckInfo_TableNoticeItem AS NoticeItem ON CheckRectifyItem.NoticeItemId=NoticeItem.ID +LEFT JOIN dbo.AttachFile AS AttachFile on AttachFile.ToKeyId =CheckRectifyItem.NoticeItemId +LEFT JOIN dbo.AttachFile AS AttachFile2 on AttachFile2.ToKeyId =CheckRectifyItem.CheckRectifyItemId + + +GO + + diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 8e35072f..5e1398c9 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -349,6 +349,8 @@ + + @@ -571,6 +573,7 @@ + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index c8047891..153ce344 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -5140,5 +5140,20 @@ namespace BLL /// 中央企业安全生产管理评价工作调度台账上报 /// public const string ReportType_12 = "12"; + + + #region 集团督查检查 + + /// + /// 企业上报督查检查报告 + /// + public const string UpDCGLCheckReportMenuId = "2E4A3E58-44B7-41B0-BFE3-634DF29AAE27";// "B9950CB5-C47A-4C0A-A6CC-C7DDBBDE7D1E"; + /// + /// 集团下发督查检查整改 + /// + public const string DCGLCheckRectifyMenuId = "2E4A3E58-44B7-41B0-BFE3-634DF29AAE27"; + + #endregion + } } \ No newline at end of file diff --git a/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyItemService.cs b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyItemService.cs new file mode 100644 index 00000000..9cb9afe4 --- /dev/null +++ b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyItemService.cs @@ -0,0 +1,61 @@ +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 督查检查整改明细表 + /// + public static class DCGLCheckRectifyItemService + { + /// + /// 根据主键获取督查检查整改明细信息 + /// + /// + /// + public static Model.DCGL_Check_CheckRectifyItem GetCheckRectifyItemByTable5ItemId(string noticeItemId) + { + return Funs.DB.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.NoticeItemId == noticeItemId); + } + + /// + /// 根据督查检查整改id获取所有相关明细信息 + /// + /// + /// + public static List GetCheckRectifyItemByCheckRectifyId(string checkRectifyId) + { + return (from x in Funs.DB.DCGL_Check_CheckRectifyItem where x.CheckRectifyId == checkRectifyId select x).ToList(); + } + + /// + /// 根据主键获取督查检查整改明细信息 + /// + /// + /// + public static Model.DCGL_Check_CheckRectifyItem GetCheckRectifyItemByCheckRectifyItemId(string checkRectifyItemId) + { + return Funs.DB.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.CheckRectifyItemId == checkRectifyItemId); + } + + /// + /// 添加督查检查整改明细信息 + /// + /// + public static void UpdateCheckRectifyItem(Model.DCGL_Check_CheckRectifyItem CheckRectifyItem) + { + var newCheckRectifyItem = Funs.DB.DCGL_Check_CheckRectifyItem.FirstOrDefault(x => x.CheckRectifyItemId == CheckRectifyItem.CheckRectifyItemId); + if (newCheckRectifyItem != null) + { + newCheckRectifyItem.OrderEndPerson = CheckRectifyItem.OrderEndPerson; + newCheckRectifyItem.RealEndDate = CheckRectifyItem.RealEndDate; + newCheckRectifyItem.Verification = CheckRectifyItem.Verification; + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs new file mode 100644 index 00000000..01b1c0aa --- /dev/null +++ b/SGGL/BLL/DCGL/ServerCheck/DCGLCheckRectifyService.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + public static class DCGLCheckRectifyService + { + /// + /// 根据整改ID获取督查检查信息 + /// + /// + /// + public static Model.DCGL_Check_CheckRectify GetCheckRectifyByCheckRectifyId(string checkRectifyId) + { + return Funs.DB.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == checkRectifyId); + } + + /// + /// 添加督查检查整改 + /// + /// + public static void AddCheckRectify(Model.DCGL_Check_CheckRectify checkRectify) + { + Model.DCGL_Check_CheckRectify newCheckRectify = new Model.DCGL_Check_CheckRectify + { + CheckRectifyId = checkRectify.CheckRectifyId, + CheckRectifyCode = checkRectify.CheckRectifyCode, + ProjectId = checkRectify.ProjectId, + UnitId = checkRectify.UnitId, + CheckDate = checkRectify.CheckDate, + IssueMan = checkRectify.IssueMan, + IssueDate = checkRectify.IssueDate, + HandleState = checkRectify.HandleState + }; + Funs.DB.DCGL_Check_CheckRectify.InsertOnSubmit(newCheckRectify); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改督查检查整改 + /// + /// + public static void UpdateCheckRectify(Model.DCGL_Check_CheckRectify checkRectify) + { + Model.DCGL_Check_CheckRectify newCheckRectify = Funs.DB.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == checkRectify.CheckRectifyId); + if (newCheckRectify != null) + { + newCheckRectify.CheckRectifyCode = checkRectify.CheckRectifyCode; + newCheckRectify.ProjectId = checkRectify.ProjectId; + newCheckRectify.UnitId = checkRectify.UnitId; + newCheckRectify.CheckDate = checkRectify.CheckDate; + newCheckRectify.IssueMan = checkRectify.IssueMan; + newCheckRectify.IssueDate = checkRectify.IssueDate; + + newCheckRectify.HandleState = checkRectify.HandleState; + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/OpenService/FileInsertService.cs b/SGGL/BLL/OpenService/FileInsertService.cs new file mode 100644 index 00000000..3f19aac2 --- /dev/null +++ b/SGGL/BLL/OpenService/FileInsertService.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections; +using System.IO; +using System.Web; + +namespace BLL +{ + public static class FileInsertService + { + /// + /// 获取附件数据流类 + /// + /// 附件路径 + /// + public static void FileInsert(List fileContextList, string attachUrl) + { + if (fileContextList != null && fileContextList.Count > 0) + { + string physicalpath = Funs.RootPath; + //HttpContext.Current.Request.PhysicalApplicationPath; + string fullPath = physicalpath + attachUrl; + if (!File.Exists(fullPath)) + { + byte[] fileContext = fileContextList[0]; + int index = fullPath.LastIndexOf("\\"); + string filePath = fullPath.Substring(0, index); + if (!Directory.Exists(filePath)) + { + Directory.CreateDirectory(filePath); + } + //string savePath = fullPath + fileName; + + //文件读写模式 + System.IO.FileMode fileMode = System.IO.FileMode.Create; + //写入文件 + using (System.IO.FileStream fs = new System.IO.FileStream(fullPath, fileMode, System.IO.FileAccess.Write)) + { + fs.Write(fileContext, 0, fileContext.Length); + } + } + } + } + + /// + /// 获取多附件数据流类 + /// + /// 附件路径 + /// + public static void FileMoreInsert(List fileContextList, string attachUrl) + { + if (fileContextList != null && fileContextList.Count() > 0) + { + if (fileContextList.Count > 0) + { + string[] strs = attachUrl.Trim().Split(','); + int i = 0; + foreach (var item in fileContextList) + { + if (strs.Count() > i) + { + string physicalpath = Funs.RootPath; + //HttpContext.Current.Request.PhysicalApplicationPath; + string fullPath = physicalpath + strs[i]; + if (!File.Exists(fullPath)) + { + byte[] fileContext = item; + int index = fullPath.LastIndexOf("\\"); + string filePath = fullPath.Substring(0, index); + + if (!Directory.Exists(filePath)) + { + Directory.CreateDirectory(filePath); + } + //string savePath = fullPath + fileName; + + //文件读写模式 + System.IO.FileMode fileMode = System.IO.FileMode.Create; + + //写入文件 + using (System.IO.FileStream fs = new System.IO.FileStream(fullPath, fileMode, System.IO.FileAccess.Write)) + { + fs.Write(fileContext, 0, fileContext.Length); + } + } + + i++; + } + } + } + } + } + + /// + /// 数据和附件插入到多附件表 + /// + public static void InsertAttachFile(string attachFileId, string dataId, string attachSource, string attachUrl, List fileContext) + { + var getAtt = Funs.DB.AttachFile.FirstOrDefault(x => x.AttachFileId == attachFileId); + if (getAtt != null) + { + Funs.DB.AttachFile.DeleteOnSubmit(getAtt); + Funs.DB.SubmitChanges(); + } + //多附件 + var attachFile = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataId); + if (attachFile == null && !string.IsNullOrEmpty(attachSource)) + { + Model.AttachFile newAttachFile = new Model.AttachFile + { + AttachFileId = attachFileId, + ToKeyId = dataId, + AttachSource = attachSource, + AttachUrl = attachUrl + }; + Funs.DB.AttachFile.InsertOnSubmit(newAttachFile); + Funs.DB.SubmitChanges(); + ////插入附件文件 + BLL.FileInsertService.FileMoreInsert(fileContext, attachUrl); + } + else + { + if (attachFile.AttachUrl != attachUrl) + { + ///删除附件文件 + BLL.UploadAttachmentService.DeleteFile(Funs.RootPath, attachFile.AttachUrl); + ////插入附件文件 + BLL.FileInsertService.FileMoreInsert(fileContext, attachUrl); + attachFile.AttachSource = attachSource; + attachFile.AttachUrl = attachUrl; + Funs.DB.SubmitChanges(); + } + } + } + } +} diff --git a/SGGL/BLL/WebService/CNCECHSSEWebService.cs b/SGGL/BLL/WebService/CNCECHSSEWebService.cs index b7060236..c77e3d26 100644 --- a/SGGL/BLL/WebService/CNCECHSSEWebService.cs +++ b/SGGL/BLL/WebService/CNCECHSSEWebService.cs @@ -14,6 +14,8 @@ using RestSharp; using System.Net; using Model; + using System.Collections; + using Newtonsoft.Json.Linq; public static class CNCECHSSEWebService { @@ -1957,6 +1959,87 @@ } + #endregion + + #region 督查检查整改上报 + /// + /// 督查检查整改上报 + /// + public static string UpDCGlCheck_CheckRectify(string checkRectifyId, Model.Person_Persons CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + // CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient(); + var upCheckReport = from x in db.View_DCGL_CheckRectifyListFromSUB + where x.RealEndDate.HasValue && x.CheckRectifyId == checkRectifyId + select new Model.DCGLCheckRectifyItem + { + CheckRectifyId = x.CheckRectifyId, + CheckRectifyCode = x.CheckRectifyCode, + ProjectId = x.ProjectId, + UnitId = x.UnitId, + CheckDate = x.CheckDate, + IssueMan = x.IssueMan, + IssueDate = x.IssueDate, + HandleState = x.HandleState, + CheckRectifyItemId = x.CheckRectifyItemId, + ConfirmMan = x.ConfirmMan, + ConfirmDate = x.ConfirmDate, + OrderEndDate = x.OrderEndDate, + OrderEndPerson = x.OrderEndPerson, + RealEndDate = x.RealEndDate, + Verification = x.Verification, + AttachFileId = x.AttachFileId2, + ToKeyId = x.ToKeyId2, + AttachSource = x.AttachSource2, + AttachUrl = x.AttachUrl2, + ////附件转为字节传送 + FileContext = FileStructService.GetMoreFileStructByAttachUrl(x.AttachUrl2), + }; + + string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/UpDCGLCheckRectifyTable"; + string contenttype = "application/json;charset=unicode"; + Hashtable newToken = new Hashtable + { + { "token", ServerService.GetToken().Token } + }; + var pushContent = JsonConvert.SerializeObject(upCheckReport.ToList()); + var strJosn = APIGetHttpService.Http(baseurl, "Post", contenttype, newToken, pushContent); + if (!string.IsNullOrEmpty(strJosn)) + { + JObject obj = JObject.Parse(strJosn); + code = obj["code"].ToString(); + + if (code == "1") + { + var getIds = Funs.GetStrListByStr(obj["data"].ToString(), ','); + if (getIds.Count() > 0) + { + foreach (var item in getIds) + { + var newCheckRectify = db.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == item); + if (newCheckRectify != null) + { + newCheckRectify.HandleState = BLL.Const.State_3; //已完成 + db.SubmitChanges(); + } + } + } + LogService.AddSys_Log(CurrUser, "【集团检查整改】上传到服务器" + getIds.Count.ToString() + "条数据;", null, BLL.Const.UpDCGLCheckReportMenuId, BLL.Const.BtnUploadResources); + } + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【集团检查整改】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【集团检查整改】上传到服务器失败;", null, BLL.Const.UpDCGLCheckReportMenuId, BLL.Const.BtnUploadResources); + } + return code; + } + } #endregion #endregion @@ -7121,6 +7204,7 @@ propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); } } + } } diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx new file mode 100644 index 00000000..3da0881b --- /dev/null +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx @@ -0,0 +1,232 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckNotice.aspx.cs" Inherits="FineUIPro.Web.DCGL.ServerCheck.CheckNotice" %> + + + + + + + 督查检查通知单 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.cs b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.cs new file mode 100644 index 00000000..e6083ee3 --- /dev/null +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.cs @@ -0,0 +1,547 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Windows.Forms; +using System.Xml.Linq; + +namespace FineUIPro.Web.DCGL.ServerCheck +{ + public partial class CheckNotice : PageBase + { + #region 定义项 + /// + /// 督查检查主键 + /// + public string CheckInfoId + { + get + { + return (string)ViewState["CheckInfoId"]; + } + set + { + ViewState["CheckInfoId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ////权限按钮方法 + this.InitTreeMenu(); + this.CheckInfoId = string.Empty; + } + } + #endregion + + #region 加载树 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.tvControlItem.Nodes.Clear(); + this.tvControlItem.ShowBorder = false; + this.tvControlItem.ShowHeader = false; + this.tvControlItem.EnableIcons = true; + this.tvControlItem.AutoScroll = true; + this.tvControlItem.EnableSingleClickExpand = true; + TreeNode rootNode = new TreeNode + { + Text = "检查方式-年月", + NodeID = "0", + Expanded = true + }; + + this.tvControlItem.Nodes.Add(rootNode); + var checkInfoLists = (from x in Funs.DB.DCGL_Check_CheckInfo select x).ToList(); + if (!string.IsNullOrEmpty(this.txtCheckStartTimeS.Text)) + { + checkInfoLists = checkInfoLists.Where(x => x.CheckStartTime >= Funs.GetNewDateTime(this.txtCheckStartTimeS.Text)).ToList(); + } + if (!string.IsNullOrEmpty(this.txtCheckEndTimeS.Text)) + { + checkInfoLists = checkInfoLists.Where(x => x.CheckEndTime <= Funs.GetNewDateTime(this.txtCheckEndTimeS.Text)).ToList(); + } + + var checkTypeList = (from x in checkInfoLists select x.CheckTypeName).Distinct(); + foreach (var item in checkTypeList) + { + TreeNode rootUnitNode = new TreeNode + { + Text = item, + NodeID = item, + Expanded = true, + ToolTip = "检查方式" + };//定义根节点 + rootNode.Nodes.Add(rootUnitNode); + var checkInfoList = (from x in checkInfoLists where x.CheckTypeName == item select x).ToList(); + this.BindNodes(rootUnitNode, checkInfoList); + } + } + #endregion + + #region 绑定树节点 + /// + /// 绑定树节点 + /// + /// + private void BindNodes(TreeNode node, List checkInfoList) + { + if (node.ToolTip == "检查方式") + { + var pointListMonth = (from x in checkInfoList + orderby x.CheckStartTime descending + select string.Format("{0:yyyy-MM}", x.CheckStartTime)).Distinct(); + foreach (var item in pointListMonth) + { + TreeNode newNode = new TreeNode + { + Text = item, + NodeID = item + "|" + node.NodeID, + ToolTip = "月份" + }; + node.Nodes.Add(newNode); + this.BindNodes(newNode, checkInfoList); + } + } + else if (node.ToolTip == "月份") + { + var dReports = from x in checkInfoList + where string.Format("{0:yyyy-MM}", x.CheckStartTime) == node.Text + orderby x.CheckStartTime descending + select x; + foreach (var item in dReports) + { + TreeNode newNode = new TreeNode(); + var units = BLL.UnitService.GetUnitByUnitId(item.SubjectUnitId); + if (units != null) + { + newNode.Text = (item.CheckStartTime.Day).ToString().PadLeft(2, '0') + "日:" + units.UnitName; + } + else + { + newNode.Text = (item.CheckStartTime.Day).ToString().PadLeft(2, '0') + "日:未知单位"; + } + newNode.NodeID = item.CheckInfoId; + newNode.EnableClickEvent = true; + node.Nodes.Add(newNode); + } + } + } + #endregion + + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + this.CheckInfoId = this.tvControlItem.SelectedNodeID; + this.txtCheckType.Text = this.tvControlItem.SelectedNode.ParentNode.ParentNode.Text; + this.PageInfoLoad(); ///页面输入保存信息 + this.BindGrid1(); + this.BindGrid2(); + } + #endregion + + #region 加载页面输入保存信息 + /// + /// 加载页面输入保存信息 + /// + private void PageInfoLoad() + { + var checkInfo = Funs.DB.DCGL_Check_CheckInfo.FirstOrDefault(x => x.CheckInfoId == this.CheckInfoId); + if (checkInfo != null) + { + this.txtCheckStartTime.Text = string.Format("{0:yyyy-MM-dd}", checkInfo.CheckStartTime); + this.txtCheckEndTime.Text = string.Format("{0:yyyy-MM-dd}", checkInfo.CheckEndTime); + this.drpSubjectUnit.Text = BLL.UnitService.GetUnitNameByUnitId(checkInfo.SubjectUnitId); + this.txtCheckType.Text = checkInfo.CheckTypeName; + this.txtSubjectUnitMan.Text = checkInfo.SubjectUnitMan; + this.txtSubjectUnitAdd.Text = checkInfo.SubjectUnitAdd; + this.txtSubjectUnitTel.Text = checkInfo.SubjectUnitTel; + this.txtSubjectObject.Text = checkInfo.SubjectObject; + this.txtCheckTeamLeader.Text = checkInfo.CheckTeamLeader; + this.txtCheckManName.Text = checkInfo.CheckManName; + this.txtSupervisionGroupName.Text = checkInfo.SupervisionGroupName; + this.txtCompileMan.Text = checkInfo.CompileMan; + this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", checkInfo.CompileDate); + } + else + { + this.drpSubjectUnit.Text = string.Empty; + this.txtSubjectObject.Text = string.Empty; + this.txtSubjectUnitMan.Text = string.Empty; + this.txtSubjectUnitTel.Text = string.Empty; + this.txtSubjectUnitAdd.Text = string.Empty; + this.txtCheckStartTime.Text = string.Empty; + this.txtCheckEndTime.Text = string.Empty; + this.txtCheckType.Text = string.Empty; + this.txtCheckTeamLeader.Text = string.Empty; + this.txtCheckManName.Text = string.Empty; + this.txtSupervisionGroupName.Text = string.Empty; + this.txtCompileMan.Text = string.Empty; + this.txtCompileDate.Text = string.Empty; + this.CheckInfoId = string.Empty; + } + } + #endregion + + #region 数据绑定 + /// + /// 数据绑定 + /// + private void BindGrid1() + { + string strSql = @"SELECT CheckFileId,CheckInfoId,CheckFileName,SortIndex,Remark FROM dbo.DCGL_Check_CheckInfo_CheckFile WHERE 1=1 "; + List listStr = new List(); + strSql += " AND CheckInfoId = @CheckInfoId"; + listStr.Add(new SqlParameter("@CheckInfoId", this.CheckInfoId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 数据绑定 + /// + private void BindGrid2() + { + string strSql = @"SELECT CheckTeamId,CheckInfoId,UserName,SexName,SupervisionGroupName,SortIndex,PostName,WorkTitle,CheckPostName,CheckDate + FROM dbo.DCGL_Check_CheckInfo_CheckTeam + WHERE 1=1 "; + List listStr = new List(); + strSql += " AND CheckInfoId = @CheckInfoId"; + listStr.Add(new SqlParameter("@CheckInfoId", this.CheckInfoId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid2.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid2.FilteredData, tb); + var table = this.GetPagedDataTable(Grid2, tb); + Grid2.DataSource = table; + Grid2.DataBind(); + } + #endregion + + #region 排序 + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid1(); + } + /// + /// 排序 + /// + /// + /// + protected void Grid2_Sort(object sender, GridSortEventArgs e) + { + BindGrid2(); + } + #endregion + + #region 查看检查办法 + /// + /// 查看检查办法 + /// + /// + /// + protected void btnFind_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("CheckInfoTemplate.aspx"))); + } + #endregion + + #region 组面板 折叠展开事件 + /// + /// 组面板 折叠展开事件 + /// + /// + /// + protected void Gridl_Collapse(object sender, EventArgs e) + { + if (this.Grid1.Collapsed) + { + this.Grid2.Collapsed = false; + } + } + + /// + /// 组面板 折叠展开事件 + /// + /// + /// + protected void Grid2_Collapse(object sender, EventArgs e) + { + if (this.Grid2.Collapsed) + { + this.Grid1.Collapsed = false; + } + } + + /// + /// 组面板 折叠展开事件 + /// + /// + /// + protected void Gridl_Expand(object sender, EventArgs e) + { + if (this.Grid1.Expanded) + { + this.Grid2.Expanded = false; + } + } + + /// + /// 组面板 折叠展开事件 + /// + /// + /// + protected void Grid2_Expand(object sender, EventArgs e) + { + if (this.Grid2.Expanded) + { + this.Grid1.Expanded = false; + } + } + #endregion + + /// + /// 查询 + /// + /// + /// + protected void Tree_TextChanged(object sender, EventArgs e) + { + this.InitTreeMenu(); + this.BindGrid1(); + this.BindGrid2(); + } + + /// + /// 从集团获取 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + var returnValue = getDCGLCheckInfo_CheckTeam(); + // var returnValue= CNCECHSSEGetWebService.getCheck_CheckInfo_Table8Item(); + + if (returnValue.code == 1) + { + ShowNotify(returnValue.message, MessageBoxIcon.Success); + PageInfoLoad(); + } + else + { + Alert.ShowInTop(returnValue.message, MessageBoxIcon.Success); + } + } + + #region 获取 + /// + /// 获取 + /// + /// + /// + public static Model.ResponeData getDCGLCheckInfo_CheckTeam() + { + var responeData = new Model.ResponeData(); + try + { + string unitId = BLL.Const.UnitId_SEDIN; + string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getDCGLCheckInfo_CheckTeam?unitId=" + unitId; + string contenttype = "application/json;charset=unicode"; + Hashtable newToken = new Hashtable + { + { "token", ServerService.GetToken().Token } + }; + + var strJosn = APIGetHttpService.Http(baseurl, "GET", contenttype, newToken, null); + if (!string.IsNullOrEmpty(strJosn)) + { + JObject obj = JObject.Parse(strJosn); + responeData.code = Funs.GetNewIntOrZero(obj["code"].ToString()); + responeData.message = obj["message"].ToString(); + if (responeData.code == 1) + { + string data = obj["data"].ToString(); + JArray arr = JArray.Parse(data); + if (arr.Count() > 0) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + List ids = new List(); + foreach (var item in arr) + { + string getCheckInfoId = item["CheckInfoId"].ToString(); + if (!ids.Contains(getCheckInfoId)) + { + var updateCheckInfo = db.DCGL_Check_CheckInfo.FirstOrDefault(x => x.CheckInfoId == getCheckInfoId); + if (updateCheckInfo == null) + { + ids.Add(getCheckInfoId); + Model.DCGL_Check_CheckInfo newCheckInfo = new Model.DCGL_Check_CheckInfo + { + CheckInfoId = getCheckInfoId, + CheckTypeName = item["CheckTypeName"].ToString(), + SubjectUnitId = item["SubjectUnitId"].ToString(), + SubjectUnitAdd = item["SubjectUnitAdd"].ToString(), + SubjectUnitMan = item["SubjectUnitMan"].ToString(), + SubjectUnitTel = item["SubjectUnitTel"].ToString(), + CheckStartTime = Funs.GetNewDateTimeOrNow(item["CheckStartTime"].ToString()), + CheckEndTime = Funs.GetNewDateTimeOrNow(item["CheckEndTime"].ToString()), + SubjectObject = item["SubjectObject"].ToString(), + }; + + db.DCGL_Check_CheckInfo.InsertOnSubmit(newCheckInfo); + db.SubmitChanges(); + } + else + { + updateCheckInfo.CheckInfoId = getCheckInfoId; + updateCheckInfo.CheckTypeName = item["CheckTypeName"].ToString(); + updateCheckInfo.SubjectUnitId = item["SubjectUnitId"].ToString(); + updateCheckInfo.SubjectUnitAdd = item["SubjectUnitAdd"].ToString(); + updateCheckInfo.SubjectUnitMan = item["SubjectUnitMan"].ToString(); + updateCheckInfo.SubjectUnitTel = item["SubjectUnitTel"].ToString(); + updateCheckInfo.CheckStartTime = Funs.GetNewDateTimeOrNow(item["CheckStartTime"].ToString()); + updateCheckInfo.CheckEndTime = Funs.GetNewDateTimeOrNow(item["CheckEndTime"].ToString()); + updateCheckInfo.SubjectObject = item["SubjectObject"].ToString(); + db.SubmitChanges(); + } + } + + //string getCheckItemId = item["CheckItemId"].ToString(); + //var updateTable8 = db.Check_CheckInfo_Table8.FirstOrDefault(x => x.CheckItemId == getCheckItemId); + //if (updateTable8 == null) + //{ + // Model.Check_CheckInfo_Table8 newTable8 = new Model.Check_CheckInfo_Table8 + // { + // CheckItemId = getCheckItemId, + // CheckInfoId = getCheckInfoId, + // Values1 = item["Values1"].ToString(), + // Values2 = item["Values2"].ToString(), + // Values3 = item["Values3"].ToString(), + // Values4 = item["Values4"].ToString(), + // Values5 = item["Values5"].ToString(), + // Values6 = item["Values6"].ToString(), + // Values7 = item["Values7"].ToString(), + // Values8 = item["Values8"].ToString(), + // }; + // db.Check_CheckInfo_Table8.InsertOnSubmit(newTable8); + // db.SubmitChanges(); + //} + //else + //{ + // updateTable8.Values1 = item["Values1"].ToString(); + // updateTable8.Values2 = item["Values2"].ToString(); + // updateTable8.Values3 = item["Values3"].ToString(); + // updateTable8.Values4 = item["Values4"].ToString(); + // updateTable8.Values5 = item["Values5"].ToString(); + // updateTable8.Values6 = item["Values6"].ToString(); + // updateTable8.Values7 = item["Values7"].ToString(); + // updateTable8.Values8 = item["Values8"].ToString(); + // db.SubmitChanges(); + //} + + string getCheckTeamId = item["CheckTeamId"].ToString(); + var checkTeam = db.DCGL_Check_CheckInfo_CheckTeam.FirstOrDefault(x => x.CheckTeamId == getCheckTeamId); + if (checkTeam == null) + { + + string UserName = item["UserName"].ToString(); + string SexName = item["SexName"].ToString(); + //UnitId = item["UnitId"].ToString(), + //UnitName = item["UnitName"].ToString(), + string SupervisionGroupId = item["SupervisionGroupId"].ToString(); + string SupervisionGroupName = item["SupervisionGroupName"].ToString(); + string PostName = item["PostName"].ToString(); + string WorkTitle = item["WorkTitle"].ToString(); + string CheckPostName = item["CheckPostName"].ToString(); + var CheckDate = Funs.GetNewDateTime(item["CheckDate"].ToString()); + var SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()); + + Model.DCGL_Check_CheckInfo_CheckTeam newCheckTeam = new Model.DCGL_Check_CheckInfo_CheckTeam + { + CheckTeamId = getCheckTeamId, + CheckInfoId = getCheckInfoId, + UserName = item["UserName"].ToString(), + SexName = item["SexName"].ToString(), + //UnitId = item["UnitId"].ToString(), + //UnitName = item["UnitName"].ToString(), + SupervisionGroupId = item["SupervisionGroupId"].ToString(), + SupervisionGroupName = item["SupervisionGroupName"].ToString(), + PostName = item["PostName"].ToString(), + WorkTitle = item["WorkTitle"].ToString(), + CheckPostName = item["CheckPostName"].ToString(), + CheckDate = Funs.GetNewDateTime(item["CheckDate"].ToString()), + SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()), + }; + db.DCGL_Check_CheckInfo_CheckTeam.InsertOnSubmit(newCheckTeam); + db.SubmitChanges(); + } + else + { + checkTeam.CheckTeamId = getCheckTeamId; + checkTeam.CheckInfoId = getCheckInfoId; + checkTeam.UserName = item["UserName"].ToString(); + checkTeam.SexName = item["SexName"].ToString(); + //checkTeam.UnitId = item["UnitId"].ToString(); + //checkTeam.UnitName = item["UnitName"].ToString(); + checkTeam.SupervisionGroupId = item["SupervisionGroupId"].ToString(); + checkTeam.SupervisionGroupName = item["SupervisionGroupName"].ToString(); + checkTeam.PostName = item["PostName"].ToString(); + checkTeam.WorkTitle = item["WorkTitle"].ToString(); + checkTeam.CheckPostName = item["CheckPostName"].ToString(); + checkTeam.CheckDate = Funs.GetNewDateTime(item["CheckDate"].ToString()); + checkTeam.SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()); + db.SubmitChanges(); + } + } + responeData.message = "获取成功:记录" + arr.Count().ToString() + "条"; + } + } + else { responeData.message = "未获取数据!"; } + } + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = "获取失败:" + ex.Message; + ErrLogInfo.WriteLog("督查检查通知单获取!", ex); + } + + return responeData; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.designer.cs b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.designer.cs new file mode 100644 index 00000000..3c58403b --- /dev/null +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckNotice.aspx.designer.cs @@ -0,0 +1,314 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DCGL.ServerCheck +{ + + + public partial class CheckNotice + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtCheckStartTimeS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCheckStartTimeS; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// txtCheckEndTimeS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtCheckEndTimeS; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnFind 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnFind; + + /// + /// hdCheckInfoId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdCheckInfoId; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtCheckType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCheckType; + + /// + /// temp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label temp; + + /// + /// drpSubjectUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label drpSubjectUnit; + + /// + /// txtSubjectObject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtSubjectObject; + + /// + /// txtSubjectUnitMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtSubjectUnitMan; + + /// + /// txtSubjectUnitTel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtSubjectUnitTel; + + /// + /// txtSubjectUnitAdd 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtSubjectUnitAdd; + + /// + /// txtCheckManName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCheckManName; + + /// + /// txtSupervisionGroupName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtSupervisionGroupName; + + /// + /// txtCheckTeamLeader 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCheckTeamLeader; + + /// + /// txtCheckStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCheckStartTime; + + /// + /// txtCheckEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCheckEndTime; + + /// + /// txtCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCompileMan; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCompileDate; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Grid2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid2; + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + } +} diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx new file mode 100644 index 00000000..bd6fe967 --- /dev/null +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx @@ -0,0 +1,135 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckRectify.aspx.cs" Inherits="FineUIPro.Web.DCGL.ServerCheck.CheckRectify" %> + + + + + + + 督查检查整改 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.cs b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.cs new file mode 100644 index 00000000..f3c5aa59 --- /dev/null +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.cs @@ -0,0 +1,622 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.DCGL.ServerCheck +{ + public partial class CheckRectify : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + //btnNew.OnClientClick = Window1.GetShowReference("CheckRectifyEdit.aspx") + "return false;"; + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = string.Empty; + SqlParameter[] parameter = new SqlParameter[] { }; + strSql = "SELECT S.CheckRectifyId,S.CheckRectifyCode,S.ProjectId,S.ProjectName,S.UnitId,U.UnitName,S.CheckDate,CASE S.HandleState WHEN '" + BLL.Const.State_1 + "' THEN '未签发' WHEN '" + BLL.Const.State_2 + "' THEN '未上报' ELSE '已上报' END AS HandleState," + + @" S.IssueMan,S.IssueDate,ISNULL(TotalCount.TotalCount,0) AS TotalCount ,ISNULL(CompleteCount.CompleteCount,0) AS CompleteCount,(ISNULL(TotalCount.TotalCount,0) -ISNULL(CompleteCount.CompleteCount,0)) AS UnCompleteCount" + + @" FROM dbo.DCGL_Check_CheckRectify AS S LEFT JOIN dbo.Base_Unit AS U ON U.UnitId = S.UnitId" + + @" LEFT JOIN (SELECT COUNT(*) AS TotalCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem GROUP BY CheckRectifyId) AS TotalCount ON S.CheckRectifyId=TotalCount.CheckRectifyId" + + @" LEFT JOIN (SELECT COUNT(*) AS CompleteCount, CheckRectifyId FROM dbo.DCGL_Check_CheckRectifyItem WHERE RealEndDate IS NOT NULL GROUP BY CheckRectifyId) AS CompleteCount ON S.CheckRectifyId=CompleteCount.CheckRectifyId" + + @" ORDER BY HandleState"; + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + // 2.获取当前分页数据 + //var table = this.GetPagedDataTable(Grid1, tb1); + + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + for (int i = 0; i < Grid1.Rows.Count; i++) + { + Model.DCGL_Check_CheckRectify rectify = BLL.DCGLCheckRectifyService.GetCheckRectifyByCheckRectifyId(Grid1.Rows[i].DataKeys[0].ToString()); + if (rectify != null) + { + if (rectify.HandleState == "1") + { + Grid1.Rows[i].RowCssClass = "yellow"; + } + else if (rectify.HandleState == "2") + { + Grid1.Rows[i].RowCssClass = "red"; + } + } + } + } + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + #region 数据编辑事件 + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string CheckRectifyId = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckRectifyEdit.aspx?CheckRectifyId={0}", CheckRectifyId, "编辑 - "))); + } + #endregion + + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + + #region 获取权限按钮 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.DCGLCheckRectifyMenuId); + if (buttonList.Count > 0) + { + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.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 = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + MultiHeaderTable mht = new MultiHeaderTable(); + mht.ResolveMultiHeaderTable(Grid1.Columns); + sb.Append(""); + sb.Append(""); + foreach (List rows in mht.MultiTable) + { + sb.Append(""); + foreach (object[] cell in rows) + { + int rowspan = Convert.ToInt32(cell[0]); + int colspan = Convert.ToInt32(cell[1]); + GridColumn column = cell[2] as GridColumn; + + sb.AppendFormat("{3}", + rowspan != 1 ? " rowspan=\"" + rowspan + "\"" : "", + colspan != 1 ? " colspan=\"" + colspan + "\"" : "", + colspan != 1 ? " style=\"text-align:center;\"" : "", + column.HeaderText); + } + sb.Append(""); + } + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in mht.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + if (column.ColumnID == "UnitName") + { + html = (row.FindControl("lblUnit") as AspNet.Label).Text; + } + if (column.ColumnID == "ProjectName") + { + //html = (row.FindControl("lblProjectId") as AspNet.Label).Text; + html = (row.FindControl("lblProjectName") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + sb.Append(""); + } + sb.Append("
{0}
"); + return sb.ToString(); + } + + #region 多表头处理 + /// + /// 多表头处理 + /// + public class MultiHeaderTable + { + // 包含 rowspan,colspan 的多表头,方便生成 HTML 的 table 标签 + public List> MultiTable = new List>(); + // 最终渲染的列数组 + public List Columns = new List(); + public void ResolveMultiHeaderTable(GridColumnCollection columns) + { + List row = new List(); + foreach (GridColumn column in columns) + { + object[] cell = new object[4]; + cell[0] = 1; // rowspan + cell[1] = 1; // colspan + cell[2] = column; + cell[3] = null; + row.Add(cell); + } + ResolveMultiTable(row, 0); + ResolveColumns(row); + } + + private void ResolveColumns(List row) + { + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + List subrow = new List(); + foreach (GridColumn column in groupField.Columns) + { + subrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + ResolveColumns(subrow); + } + else + { + Columns.Add(cell[2] as GridColumn); + } + } + } + + private void ResolveMultiTable(List row, int level) + { + List nextrow = new List(); + + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // 如果当前列包含子列,则更改当前列的 colspan,以及增加父列(向上递归)的colspan + cell[1] = Convert.ToInt32(groupField.Columns.Count); + PlusColspan(level - 1, cell[3] as GridColumn, groupField.Columns.Count - 1); + + foreach (GridColumn column in groupField.Columns) + { + nextrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + } + } + MultiTable.Add(row); + // 如果当前下一行,则增加上一行(向上递归)中没有子列的列的 rowspan + if (nextrow.Count > 0) + { + PlusRowspan(level); + ResolveMultiTable(nextrow, level + 1); + } + } + + private void PlusRowspan(int level) + { + if (level < 0) + { + return; + } + foreach (object[] cells in MultiTable[level]) + { + GroupField groupField = cells[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // ... + } + else + { + cells[0] = Convert.ToInt32(cells[0]) + 1; + } + } + PlusRowspan(level - 1); + } + + private void PlusColspan(int level, GridColumn parent, int plusCount) + { + if (level < 0) + { + return; + } + + foreach (object[] cells in MultiTable[level]) + { + GridColumn column = cells[2] as GridColumn; + if (column == parent) + { + cells[1] = Convert.ToInt32(cells[1]) + plusCount; + + PlusColspan(level - 1, cells[3] as GridColumn, plusCount); + } + } + } + } + #endregion + + #endregion + + /// + /// 从集团获取 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + var returnValue = getCheck_CheckRectifyListToSUB(); + if (returnValue.code == 1) + { + ShowNotify(returnValue.message, MessageBoxIcon.Success); + BindGrid(); + } + else + { + Alert.ShowInTop(returnValue.message, MessageBoxIcon.Success); + } + } + + + #region 获取 + /// + /// 获取 + /// + /// + /// + public static Model.ResponeData getCheck_CheckRectifyListToSUB() + { + var responeData = new Model.ResponeData(); + try + { + string unitId =BLL.Const.UnitId_SEDIN; + string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getDCGLCheckRectify?unitId=" + unitId; + string contenttype = "application/json;charset=unicode"; + Hashtable newToken = new Hashtable + { + { "token", ServerService.GetToken().Token } + }; + + var strJosn = APIGetHttpService.Http(baseurl, "GET", contenttype, newToken, null); + if (!string.IsNullOrEmpty(strJosn)) + { + JObject obj = JObject.Parse(strJosn); + responeData.code = Funs.GetNewIntOrZero(obj["code"].ToString()); + responeData.message = obj["message"].ToString(); + if (responeData.code == 1) + { + JArray getData = JArray.Parse(obj["data"].ToString()); + if (getData.Count() > 0) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + List ids = new List(); + foreach (var item in getData) + { + string getCheckRectifyId = item["CheckRectifyId"].ToString(); + if (!ids.Contains(getCheckRectifyId)) + { + var newRectify = db.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == getCheckRectifyId); + if (newRectify == null) + { + ids.Add(getCheckRectifyId); + Model.DCGL_Check_CheckRectify newCheckRectify = new Model.DCGL_Check_CheckRectify + { + CheckRectifyId = getCheckRectifyId, + CheckRectifyCode = item["CheckRectifyCode"].ToString(), + ProjectId = item["ProjectId"].ToString(), + ProjectName = item["ProjectName"].ToString(), + UnitId = unitId, + CheckDate = Funs.GetNewDateTime(item["CheckDate"].ToString()), + IssueMan = item["IssueMan"].ToString(), + IssueDate = Funs.GetNewDateTime(item["IssueDate"].ToString()), + HandleState = item["HandleState"].ToString() + }; + db.DCGL_Check_CheckRectify.InsertOnSubmit(newCheckRectify); + db.SubmitChanges(); + } + else + { + newRectify.CheckRectifyCode = item["CheckRectifyCode"].ToString(); + db.SubmitChanges(); + } + + //获取对应主表主键的明细集合 + string getNoticeItemId = item["NoticeItemId"].ToString(); + var notice = db.DCGL_Check_CheckInfo_TableNoticeItem.FirstOrDefault(x => x.ID == getNoticeItemId); + if (notice == null) + { + Model.DCGL_Check_CheckInfo_TableNoticeItem newCheckRectifyItem = new Model.DCGL_Check_CheckInfo_TableNoticeItem + { + ID = getNoticeItemId, + CheckInfoId = item["CheckInfoId"].ToString(), + SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()), + Describe = item["Describe"].ToString(), + Standards = item["Standards"].ToString(), + Advice = item["Advice"].ToString(), + LimitTime = Funs.GetNewDateTime(item["LimitTime"].ToString()), + + Situation = item["Situation"].ToString(), + Remark = item["Remark"].ToString(), + Url = item["Url"].ToString(), + AffUrl = item["AffUrl"].ToString(), + RiskLevel = item["RiskLevel"].ToString(), + ProblemTypes = item["ProblemTypes"].ToString(), + ProblemSubTypeId = item["ProblemSubTypeId"].ToString(), + ProblemSubType = item["ProblemSubType"].ToString(), + States = item["States"].ToString(), + + //WorkType = item["WorkType"].ToString(), + //DangerPoint = item["DangerPoint"].ToString(), + //RiskExists = item["RiskExists"].ToString(), + //IsProject = Convert.ToBoolean(item["IsProject"].ToString()), + //CheckMan = item["CheckMan"].ToString(), + //SubjectUnitMan = item["SubjectUnitMan"].ToString(), + }; + db.DCGL_Check_CheckInfo_TableNoticeItem.InsertOnSubmit(newCheckRectifyItem); + db.SubmitChanges(); + } + + BLL.CommonService.DeleteAttachFileById(getNoticeItemId);//删除附件 + ////上传附件 + string getAttachFileId = item["AttachFileId"].ToString(); + if (!string.IsNullOrEmpty(getAttachFileId)) + { + JArray byteList = item["FileContext"] as JArray; + List resultList = new List(); + foreach (JToken token in byteList) + { + byte[] byteArray = Convert.FromBase64String(token.ToString()); + resultList.Add(byteArray); + } + + //List fileContext = new List(); + //fileContext.Add(Convert.FromBase64String(item["FileContext"].ToString())); + BLL.FileInsertService.InsertAttachFile(getAttachFileId, getNoticeItemId, item["AttachSource"].ToString(), item["AttachUrl"].ToString(), resultList); + } + + string getCheckRectifyItemId = item["CheckRectifyItemId"].ToString(); + var oldItem = db.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.CheckRectifyItemId == getCheckRectifyItemId); + if (oldItem == null) + { + Model.DCGL_Check_CheckRectifyItem newCheckRectifyItem = new Model.DCGL_Check_CheckRectifyItem + { + CheckRectifyItemId = getCheckRectifyItemId, + CheckRectifyId = getCheckRectifyId, + NoticeItemId = getNoticeItemId, + ConfirmMan = item["ConfirmMan"].ToString(), + ConfirmManName = item["ConfirmManName"].ToString(), + ConfirmDate = Funs.GetNewDateTime(item["ConfirmDate"].ToString()), + OrderEndDate = Funs.GetNewDateTime(item["OrderEndDate"].ToString()), + OrderEndPerson = item["OrderEndPerson"].ToString(), + RealEndDate = Funs.GetNewDateTime(item["RealEndDate"].ToString()), + }; + + db.DCGL_Check_CheckRectifyItem.InsertOnSubmit(newCheckRectifyItem); + db.SubmitChanges(); + } + } + else + { + //获取对应主表主键的明细集合 + string getNoticeItemId = item["NoticeItemId"].ToString(); + var notice = db.DCGL_Check_CheckInfo_TableNoticeItem.FirstOrDefault(x => x.ID == getNoticeItemId); + if (notice == null) + { + + Model.DCGL_Check_CheckInfo_TableNoticeItem newCheckRectifyItem = new Model.DCGL_Check_CheckInfo_TableNoticeItem + { + ID = getNoticeItemId, + CheckInfoId = item["CheckInfoId"].ToString(), + SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()), + Describe = item["Describe"].ToString(), + Standards = item["Standards"].ToString(), + Advice = item["Advice"].ToString(), + LimitTime = Funs.GetNewDateTime(item["LimitTime"].ToString()), + + Situation = item["Situation"].ToString(), + Remark = item["Remark"].ToString(), + Url = item["Url"].ToString(), + AffUrl = item["AffUrl"].ToString(), + RiskLevel = item["RiskLevel"].ToString(), + ProblemTypes = item["ProblemTypes"].ToString(), + ProblemSubTypeId = item["ProblemSubTypeId"].ToString(), + ProblemSubType = item["ProblemSubType"].ToString(), + States = item["States"].ToString(), + + //WorkType = item["WorkType"].ToString(), + //DangerPoint = item["DangerPoint"].ToString(), + //RiskExists = item["RiskExists"].ToString(), + //IsProject = Convert.ToBoolean(item["IsProject"].ToString()), + //CheckMan = item["CheckMan"].ToString(), + //SubjectUnitMan = item["SubjectUnitMan"].ToString(), + }; + db.DCGL_Check_CheckInfo_TableNoticeItem.InsertOnSubmit(newCheckRectifyItem); + db.SubmitChanges(); + } + + BLL.CommonService.DeleteAttachFileById(getNoticeItemId);//删除附件 + ////上传附件 + string getAttachFileId = item["AttachFileId"].ToString(); + if (!string.IsNullOrEmpty(getAttachFileId)) + { + JArray byteList = item["FileContext"] as JArray; + List resultList = new List(); + foreach (JToken token in byteList) + { + byte[] byteArray = Convert.FromBase64String(token.ToString()); + resultList.Add(byteArray); + } + + //List fileContext = new List(); + //fileContext.Add(Convert.FromBase64String(item["FileContext"].ToString())); + BLL.FileInsertService.InsertAttachFile(getAttachFileId, getNoticeItemId, item["AttachSource"].ToString(), item["AttachUrl"].ToString(), resultList); + } + + string getCheckRectifyItemId = item["CheckRectifyItemId"].ToString(); + var oldItem = db.DCGL_Check_CheckRectifyItem.FirstOrDefault(e => e.CheckRectifyItemId == getCheckRectifyItemId); + if (oldItem == null) + { + Model.DCGL_Check_CheckRectifyItem newCheckRectifyItem = new Model.DCGL_Check_CheckRectifyItem + { + CheckRectifyItemId = getCheckRectifyItemId, + CheckRectifyId = getCheckRectifyId, + NoticeItemId = getNoticeItemId, + ConfirmMan = item["ConfirmMan"].ToString(), + ConfirmDate = Funs.GetNewDateTime(item["ConfirmDate"].ToString()), + OrderEndDate = Funs.GetNewDateTime(item["OrderEndDate"].ToString()), + OrderEndPerson = item["OrderEndPerson"].ToString(), + RealEndDate = Funs.GetNewDateTime(item["RealEndDate"].ToString()), + }; + + db.DCGL_Check_CheckRectifyItem.InsertOnSubmit(newCheckRectifyItem); + db.SubmitChanges(); + } + } + } + } + } + responeData.message = "获取成功:整改明细记录" + getData.Count().ToString() + "条"; + } + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = "获取失败:" + ex.Message; + ErrLogInfo.WriteLog("督查检查通知单获取!", ex); + } + + return responeData; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.designer.cs b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.designer.cs new file mode 100644 index 00000000..002cc9c5 --- /dev/null +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectify.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DCGL.ServerCheck +{ + + + public partial class CheckRectify + { + + /// + /// 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; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// lblUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblUnit; + + /// + /// lblProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblProjectName; + + /// + /// 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; + } +} diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx new file mode 100644 index 00000000..cbec1d1f --- /dev/null +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx @@ -0,0 +1,147 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckRectifyEdit.aspx.cs" Async="true" Inherits="FineUIPro.Web.DCGL.ServerCheck.CheckRectifyEdit" %> + + + + + + + 隐患整改单 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs new file mode 100644 index 00000000..bf1cf7e1 --- /dev/null +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.cs @@ -0,0 +1,192 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using BLL; +using Newtonsoft.Json.Linq; + +namespace FineUIPro.Web.DCGL.ServerCheck +{ + public partial class CheckRectifyEdit : PageBase + { + /// + /// 主键 + /// + public string CheckRectifyId + { + get + { + return (string)ViewState["CheckRectifyId"]; + } + set + { + ViewState["CheckRectifyId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List CheckRectifyItems = new List(); + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + this.CheckRectifyId = Request.Params["CheckRectifyId"]; + if (!string.IsNullOrEmpty(this.CheckRectifyId)) + { + var rectify = Funs.DB.DCGL_Check_CheckRectify.FirstOrDefault(x => x.CheckRectifyId == this.CheckRectifyId); + if (rectify != null) + { + var unit = BLL.UnitService.GetUnitByUnitId(rectify.UnitId); + if (unit != null) + { + this.lbUnitName.Text = unit.UnitName; + } + + this.lbProjectName.Text = rectify.ProjectName; + this.lbCheckRectifyCode.Text = rectify.CheckRectifyCode; + if (!string.IsNullOrEmpty(rectify.IssueMan)) + { + this.txtIssueMan.Text = rectify.IssueMan; + } + if (rectify.IssueDate.HasValue) + { + this.txtIssueDate.Text = string.Format("{0:yyyy-MM-dd}", rectify.IssueDate); + } + if (rectify.HandleState == BLL.Const.State_3) + { + this.btnSave.Hidden = true; + this.btnSaveUp.Hidden = true; + } + + CheckRectifyItems = (from x in Funs.DB.View_DCGL_CheckRectifyListFromSUB where x.CheckRectifyId == this.CheckRectifyId orderby x.SortIndex select x).ToList(); + Grid1.DataSource = CheckRectifyItems; + Grid1.DataBind(); + //if (CheckRectifyItems.FirstOrDefault(x => x.DangerPoint.Length > 1) == null) + //{ + this.Grid1.Columns[1].Hidden = true; + this.Grid1.Columns[2].Hidden = true; + //} + } + } + } + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + this.SavaData(BLL.Const.BtnSave); + } + + /// + /// 保存并提交 + /// + /// + /// + protected void btnSaveUp_Click(object sender, EventArgs e) + { + this.SavaData(BLL.Const.BtnSaveUp); + } + + /// + /// 保存数据方法 + /// + /// + private void SavaData(string type) + { + jerqueSaveList(); + foreach (var item in CheckRectifyItems) + { + var newCheckRectifyItem = BLL.DCGLCheckRectifyItemService.GetCheckRectifyItemByCheckRectifyItemId(item.CheckRectifyItemId); + if (newCheckRectifyItem != null) + { + newCheckRectifyItem.RealEndDate = item.RealEndDate; + newCheckRectifyItem.OrderEndPerson = item.OrderEndPerson; + newCheckRectifyItem.Verification = item.Verification; + BLL.DCGLCheckRectifyItemService.UpdateCheckRectifyItem(newCheckRectifyItem); + } + } + + var newCheckRectify = BLL.DCGLCheckRectifyService.GetCheckRectifyByCheckRectifyId(this.CheckRectifyId); + if (newCheckRectify != null && newCheckRectify.HandleState != BLL.Const.State_3) + { + newCheckRectify.HandleState = BLL.Const.State_2; //待上报 + BLL.DCGLCheckRectifyService.UpdateCheckRectify(newCheckRectify); + } + if (type == BLL.Const.BtnSaveUp) + { + string code = CNCECHSSEWebService.UpDCGlCheck_CheckRectify(newCheckRectify.CheckRectifyId, this.CurrUser); + if (code == "1") + { + ShowNotify("同步成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return; + } + else + { + Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); + } + } + + BLL.LogService.AddSys_Log(this.CurrUser, string.Empty, string.Empty, BLL.Const.DCGLCheckRectifyMenuId, BLL.Const.BtnModify); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + /// + /// 保存集合 + /// + private void jerqueSaveList() + { + JArray mergedData = Grid1.GetMergedData(); + foreach (JObject mergedRow in mergedData) + { + string status = mergedRow.Value("status"); + JObject values = mergedRow.Value("values"); + string checkRectifyItemId = values.Value("CheckRectifyItemId").ToString(); + var item = CheckRectifyItems.FirstOrDefault(e => e.CheckRectifyItemId == checkRectifyItemId); + if (item != null) + { + item.OrderEndPerson = values.Value("OrderEndPerson").ToString(); + item.RealEndDate = Funs.GetNewDateTime(values.Value("RealEndDate").ToString()); + item.Verification = values.Value("Verification").ToString(); + } + } + } + + #region 权限设置 + /// + /// 权限按钮设置 + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.DCGLCheckRectifyMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + this.btnSaveUp.Hidden = false; + } + } + } + #endregion + + #region 关闭按钮事件 + /// + /// 关闭按钮事件 + /// + /// + /// + protected void btnClose_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.designer.cs new file mode 100644 index 00000000..8c809f64 --- /dev/null +++ b/SGGL/FineUIPro.Web/DCGL/ServerCheck/CheckRectifyEdit.aspx.designer.cs @@ -0,0 +1,224 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DCGL.ServerCheck +{ + + + public partial class CheckRectifyEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Panel4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel4; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// lbUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUnitName; + + /// + /// lbProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbProjectName; + + /// + /// Panel5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel5; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// lbCheckRectifyCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbCheckRectifyCode; + + /// + /// txtIssueMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtIssueMan; + + /// + /// txtIssueDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtIssueDate; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label15 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label15; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// txtOrderEndPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtOrderEndPerson; + + /// + /// txtRealEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtRealEndDate; + + /// + /// txtVerification 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtVerification; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSaveUp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSaveUp; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index f798e311..fd310b8d 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -547,6 +547,9 @@ + + + @@ -9572,6 +9575,27 @@ WorkingHoursItem.aspx + + CheckNotice.aspx + ASPXCodeBehind + + + CheckNotice.aspx + + + CheckRectify.aspx + ASPXCodeBehind + + + CheckRectify.aspx + + + CheckRectifyEdit.aspx + ASPXCodeBehind + + + CheckRectifyEdit.aspx + CQMSDataCollect.aspx ASPXCodeBehind @@ -13796,7 +13820,6 @@ NoticeView2.aspx - CheckContentEdit.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index cde10efc..e05adaad 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -109,7 +109,6 @@ - diff --git a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml index cdade489..56efca63 100644 --- a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml @@ -7,7 +7,7 @@ - + diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index 5a6defbb..6b2c0854 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -45,6 +45,9 @@ + + + diff --git a/SGGL/Model/APIItem/DCGLCheckRectifyItem.cs b/SGGL/Model/APIItem/DCGLCheckRectifyItem.cs new file mode 100644 index 00000000..55be12d1 --- /dev/null +++ b/SGGL/Model/APIItem/DCGLCheckRectifyItem.cs @@ -0,0 +1,295 @@ +namespace Model +{ + using System; + using System.Collections.Generic; + + public class DCGLCheckRectifyItem + { + /// + /// 整改id + /// + + public string CheckRectifyId + { + get; + set; + } + + /// + /// 编号 + /// + + public string CheckRectifyCode + { + get; + set; + } + /// + /// 检查项目 + /// + + public string ProjectId + { + get; + set; + } + public string ProjectName + { + get; + set; + } + + /// + /// 单位 + /// + + public string UnitId + { + get; + set; + } + /// + /// 检查日期 + /// + + public DateTime? CheckDate + { + get; + set; + } + /// + /// 签发人 + /// + + public string IssueMan + { + get; + set; + } + /// + /// 签发日期 + /// + + public DateTime? IssueDate + { + get; + set; + } + /// + /// 处理状态 + /// + + public string HandleState + { + get; + set; + } + + /// + /// 明细id + /// + + public string CheckRectifyItemId + { + get; + set; + } + /// + /// 检查隐患表 + /// + + public string NoticeItemId + { + get; + set; + } + /// + /// 立项人 + /// + + public string ConfirmMan + { + get; + set; + } + public string ConfirmManName + { + get; + set; + } + /// + /// 立项日期 + /// + + public DateTime? ConfirmDate + { + get; + set; + } + /// + /// 要求消项日期 + /// + + public DateTime? OrderEndDate + { + get; + set; + } + /// + /// 要求消项责任人 + /// + + public string OrderEndPerson + { + get; + set; + } + /// + /// 企业管理部门验证人 + /// + + public string Verification + { + get; + set; + } + /// + /// 实际消项日期 + /// + + public DateTime? RealEndDate + { + get; + set; + } + /// + /// 序号 + /// + + public int? SortIndex + { + get; + set; + } + /// + /// 类别 + /// + + public string WorkType + { + get; + set; + } + /// + /// 隐患源点 + /// + + public string DangerPoint + { + get; + set; + } + /// + /// 存在危险 + /// + + public string RiskExists + { + get; + set; + } + /// + /// 是否立项 + /// + + public bool? IsProject + { + get; + set; + } + /// + /// 检查人 + /// + + public string CheckMan + { + get; + set; + } + /// + /// 单位负责人确认 + /// + + public string SubjectUnitMan + { + get; + set; + } + /// + ///附件字节 + /// + + public List FileContext + { + get; + set; + } + /// + ///附件表主键 + /// + + public string AttachFileId + { + get; + set; + } + + /// + ///对应主键 + /// + + public string ToKeyId + { + get; + set; + } + + /// + ///附件转换 + /// + + public string AttachSource + { + get; + set; + } + + /// + /// 附件路径 + /// + + public string AttachUrl + { + get; + set; + } + + + + + public string CheckInfoId { get; set; } + public string Describe { get; set; } + public string Standards { get; set; } + public string Advice { get; set; } + public DateTime? LimitTime { get; set; } + public string Situation { get; set; } + public string Remark { get; set; } + public string Url { get; set; } + public string AffUrl { get; set; } + public string RiskLevel { get; set; } + public string ProblemTypes { get; set; } + public string ProblemSubTypeId { get; set; } + public string ProblemSubType { get; set; } + public string States { get; set; } + } +} diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index cf971d68..8db4915e 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -431,6 +431,24 @@ namespace Model partial void InsertCQMSData_CQMS(CQMSData_CQMS instance); partial void UpdateCQMSData_CQMS(CQMSData_CQMS instance); partial void DeleteCQMSData_CQMS(CQMSData_CQMS instance); + partial void InsertDCGL_Check_CheckInfo(DCGL_Check_CheckInfo instance); + partial void UpdateDCGL_Check_CheckInfo(DCGL_Check_CheckInfo instance); + partial void DeleteDCGL_Check_CheckInfo(DCGL_Check_CheckInfo instance); + partial void InsertDCGL_Check_CheckInfo_CheckFile(DCGL_Check_CheckInfo_CheckFile instance); + partial void UpdateDCGL_Check_CheckInfo_CheckFile(DCGL_Check_CheckInfo_CheckFile instance); + partial void DeleteDCGL_Check_CheckInfo_CheckFile(DCGL_Check_CheckInfo_CheckFile instance); + partial void InsertDCGL_Check_CheckInfo_CheckTeam(DCGL_Check_CheckInfo_CheckTeam instance); + partial void UpdateDCGL_Check_CheckInfo_CheckTeam(DCGL_Check_CheckInfo_CheckTeam instance); + partial void DeleteDCGL_Check_CheckInfo_CheckTeam(DCGL_Check_CheckInfo_CheckTeam instance); + partial void InsertDCGL_Check_CheckInfo_TableNoticeItem(DCGL_Check_CheckInfo_TableNoticeItem instance); + partial void UpdateDCGL_Check_CheckInfo_TableNoticeItem(DCGL_Check_CheckInfo_TableNoticeItem instance); + partial void DeleteDCGL_Check_CheckInfo_TableNoticeItem(DCGL_Check_CheckInfo_TableNoticeItem instance); + partial void InsertDCGL_Check_CheckRectify(DCGL_Check_CheckRectify instance); + partial void UpdateDCGL_Check_CheckRectify(DCGL_Check_CheckRectify instance); + partial void DeleteDCGL_Check_CheckRectify(DCGL_Check_CheckRectify instance); + partial void InsertDCGL_Check_CheckRectifyItem(DCGL_Check_CheckRectifyItem instance); + partial void UpdateDCGL_Check_CheckRectifyItem(DCGL_Check_CheckRectifyItem instance); + partial void DeleteDCGL_Check_CheckRectifyItem(DCGL_Check_CheckRectifyItem instance); partial void InsertDigData_CQMSDataCollect(DigData_CQMSDataCollect instance); partial void UpdateDigData_CQMSDataCollect(DigData_CQMSDataCollect instance); partial void DeleteDigData_CQMSDataCollect(DigData_CQMSDataCollect instance); @@ -2942,6 +2960,54 @@ namespace Model } } + public System.Data.Linq.Table DCGL_Check_CheckInfo + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table DCGL_Check_CheckInfo_CheckFile + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table DCGL_Check_CheckInfo_CheckTeam + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table DCGL_Check_CheckInfo_TableNoticeItem + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table DCGL_Check_CheckRectify + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table DCGL_Check_CheckRectifyItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table DigData_CQMSDataCollect { get @@ -6550,6 +6616,14 @@ namespace Model } } + public System.Data.Linq.Table View_DCGL_CheckRectifyListFromSUB + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_EduTrain_TrainFind { get @@ -33442,6 +33516,14 @@ namespace Model private EntitySet _CostGoods_Expense; + private EntitySet _DCGL_Check_CheckInfo; + + private EntitySet _DCGL_Check_CheckInfo_Base_Unit1; + + private EntitySet _DCGL_Check_CheckInfo_CheckTeam; + + private EntitySet _DCGL_Check_CheckRectify; + private EntitySet _Emergency_EmergencyList; private EntitySet _Emergency_EmergencySupply; @@ -33717,6 +33799,10 @@ namespace Model this._CostGoods_CostManageFlowOperate = new EntitySet(new Action(this.attach_CostGoods_CostManageFlowOperate), new Action(this.detach_CostGoods_CostManageFlowOperate)); this._CostGoods_CostSmallDetail = new EntitySet(new Action(this.attach_CostGoods_CostSmallDetail), new Action(this.detach_CostGoods_CostSmallDetail)); this._CostGoods_Expense = new EntitySet(new Action(this.attach_CostGoods_Expense), new Action(this.detach_CostGoods_Expense)); + this._DCGL_Check_CheckInfo = new EntitySet(new Action(this.attach_DCGL_Check_CheckInfo), new Action(this.detach_DCGL_Check_CheckInfo)); + this._DCGL_Check_CheckInfo_Base_Unit1 = new EntitySet(new Action(this.attach_DCGL_Check_CheckInfo_Base_Unit1), new Action(this.detach_DCGL_Check_CheckInfo_Base_Unit1)); + this._DCGL_Check_CheckInfo_CheckTeam = new EntitySet(new Action(this.attach_DCGL_Check_CheckInfo_CheckTeam), new Action(this.detach_DCGL_Check_CheckInfo_CheckTeam)); + this._DCGL_Check_CheckRectify = new EntitySet(new Action(this.attach_DCGL_Check_CheckRectify), new Action(this.detach_DCGL_Check_CheckRectify)); this._Emergency_EmergencyList = new EntitySet(new Action(this.attach_Emergency_EmergencyList), new Action(this.detach_Emergency_EmergencyList)); this._Emergency_EmergencySupply = new EntitySet(new Action(this.attach_Emergency_EmergencySupply), new Action(this.detach_Emergency_EmergencySupply)); this._Emergency_EmergencyTeamAndTrain = new EntitySet(new Action(this.attach_Emergency_EmergencyTeamAndTrain), new Action(this.detach_Emergency_EmergencyTeamAndTrain)); @@ -34647,6 +34733,58 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckInfo_Base_Unit", Storage="_DCGL_Check_CheckInfo", ThisKey="UnitId", OtherKey="SubjectUnitId", DeleteRule="NO ACTION")] + public EntitySet DCGL_Check_CheckInfo + { + get + { + return this._DCGL_Check_CheckInfo; + } + set + { + this._DCGL_Check_CheckInfo.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckInfo_Base_Unit1", Storage="_DCGL_Check_CheckInfo_Base_Unit1", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet DCGL_Check_CheckInfo_Base_Unit1 + { + get + { + return this._DCGL_Check_CheckInfo_Base_Unit1; + } + set + { + this._DCGL_Check_CheckInfo_Base_Unit1.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckInfo_CheckTeam_Base_Unit1", Storage="_DCGL_Check_CheckInfo_CheckTeam", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet DCGL_Check_CheckInfo_CheckTeam + { + get + { + return this._DCGL_Check_CheckInfo_CheckTeam; + } + set + { + this._DCGL_Check_CheckInfo_CheckTeam.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckRectify_Base_Unit", Storage="_DCGL_Check_CheckRectify", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet DCGL_Check_CheckRectify + { + get + { + return this._DCGL_Check_CheckRectify; + } + set + { + this._DCGL_Check_CheckRectify.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Emergency_EmergencyList_Base_Unit", Storage="_Emergency_EmergencyList", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet Emergency_EmergencyList { @@ -36239,6 +36377,54 @@ namespace Model entity.Base_Unit = null; } + private void attach_DCGL_Check_CheckInfo(DCGL_Check_CheckInfo entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_DCGL_Check_CheckInfo(DCGL_Check_CheckInfo entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_DCGL_Check_CheckInfo_Base_Unit1(DCGL_Check_CheckInfo entity) + { + this.SendPropertyChanging(); + entity.Unit = this; + } + + private void detach_DCGL_Check_CheckInfo_Base_Unit1(DCGL_Check_CheckInfo entity) + { + this.SendPropertyChanging(); + entity.Unit = null; + } + + private void attach_DCGL_Check_CheckInfo_CheckTeam(DCGL_Check_CheckInfo_CheckTeam entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_DCGL_Check_CheckInfo_CheckTeam(DCGL_Check_CheckInfo_CheckTeam entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_DCGL_Check_CheckRectify(DCGL_Check_CheckRectify entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_DCGL_Check_CheckRectify(DCGL_Check_CheckRectify entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Emergency_EmergencyList(Emergency_EmergencyList entity) { this.SendPropertyChanging(); @@ -64705,6 +64891,2405 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.DCGL_Check_CheckInfo")] + public partial class DCGL_Check_CheckInfo : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _CheckInfoId; + + private string _CheckTypeName; + + private string _SubjectUnitId; + + private string _SubjectUnitAdd; + + private string _SubjectUnitMan; + + private string _SubjectUnitTel; + + private System.DateTime _CheckStartTime; + + private System.DateTime _CheckEndTime; + + private string _SubjectObject; + + private string _CheckTeamLeader; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _CheckTeamLeaderName; + + private string _UnitId; + + private string _SexName; + + private string _SupervisionGroupId; + + private string _SupervisionGroupName; + + private string _SubjectProjectId; + + private string _SubjectProjectName; + + private string _SubjectUnitManId; + + private string _CheckManId; + + private string _CheckManName; + + private EntityRef _Base_Unit; + + private EntityRef _Unit; + + private EntitySet _DCGL_Check_CheckInfo_CheckFile; + + private EntitySet _DCGL_Check_CheckInfo_CheckTeam; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnCheckInfoIdChanging(string value); + partial void OnCheckInfoIdChanged(); + partial void OnCheckTypeNameChanging(string value); + partial void OnCheckTypeNameChanged(); + partial void OnSubjectUnitIdChanging(string value); + partial void OnSubjectUnitIdChanged(); + partial void OnSubjectUnitAddChanging(string value); + partial void OnSubjectUnitAddChanged(); + partial void OnSubjectUnitManChanging(string value); + partial void OnSubjectUnitManChanged(); + partial void OnSubjectUnitTelChanging(string value); + partial void OnSubjectUnitTelChanged(); + partial void OnCheckStartTimeChanging(System.DateTime value); + partial void OnCheckStartTimeChanged(); + partial void OnCheckEndTimeChanging(System.DateTime value); + partial void OnCheckEndTimeChanged(); + partial void OnSubjectObjectChanging(string value); + partial void OnSubjectObjectChanged(); + partial void OnCheckTeamLeaderChanging(string value); + partial void OnCheckTeamLeaderChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnCheckTeamLeaderNameChanging(string value); + partial void OnCheckTeamLeaderNameChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnSexNameChanging(string value); + partial void OnSexNameChanged(); + partial void OnSupervisionGroupIdChanging(string value); + partial void OnSupervisionGroupIdChanged(); + partial void OnSupervisionGroupNameChanging(string value); + partial void OnSupervisionGroupNameChanged(); + partial void OnSubjectProjectIdChanging(string value); + partial void OnSubjectProjectIdChanged(); + partial void OnSubjectProjectNameChanging(string value); + partial void OnSubjectProjectNameChanged(); + partial void OnSubjectUnitManIdChanging(string value); + partial void OnSubjectUnitManIdChanged(); + partial void OnCheckManIdChanging(string value); + partial void OnCheckManIdChanged(); + partial void OnCheckManNameChanging(string value); + partial void OnCheckManNameChanged(); + #endregion + + public DCGL_Check_CheckInfo() + { + this._Base_Unit = default(EntityRef); + this._Unit = default(EntityRef); + this._DCGL_Check_CheckInfo_CheckFile = new EntitySet(new Action(this.attach_DCGL_Check_CheckInfo_CheckFile), new Action(this.detach_DCGL_Check_CheckInfo_CheckFile)); + this._DCGL_Check_CheckInfo_CheckTeam = new EntitySet(new Action(this.attach_DCGL_Check_CheckInfo_CheckTeam), new Action(this.detach_DCGL_Check_CheckInfo_CheckTeam)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckInfoId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string CheckInfoId + { + get + { + return this._CheckInfoId; + } + set + { + if ((this._CheckInfoId != value)) + { + this.OnCheckInfoIdChanging(value); + this.SendPropertyChanging(); + this._CheckInfoId = value; + this.SendPropertyChanged("CheckInfoId"); + this.OnCheckInfoIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTypeName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string CheckTypeName + { + get + { + return this._CheckTypeName; + } + set + { + if ((this._CheckTypeName != value)) + { + this.OnCheckTypeNameChanging(value); + this.SendPropertyChanging(); + this._CheckTypeName = value; + this.SendPropertyChanged("CheckTypeName"); + this.OnCheckTypeNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectUnitId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SubjectUnitId + { + get + { + return this._SubjectUnitId; + } + set + { + if ((this._SubjectUnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnSubjectUnitIdChanging(value); + this.SendPropertyChanging(); + this._SubjectUnitId = value; + this.SendPropertyChanged("SubjectUnitId"); + this.OnSubjectUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectUnitAdd", DbType="NVarChar(500)")] + public string SubjectUnitAdd + { + get + { + return this._SubjectUnitAdd; + } + set + { + if ((this._SubjectUnitAdd != value)) + { + this.OnSubjectUnitAddChanging(value); + this.SendPropertyChanging(); + this._SubjectUnitAdd = value; + this.SendPropertyChanged("SubjectUnitAdd"); + this.OnSubjectUnitAddChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectUnitMan", DbType="NVarChar(50)")] + public string SubjectUnitMan + { + get + { + return this._SubjectUnitMan; + } + set + { + if ((this._SubjectUnitMan != value)) + { + this.OnSubjectUnitManChanging(value); + this.SendPropertyChanging(); + this._SubjectUnitMan = value; + this.SendPropertyChanged("SubjectUnitMan"); + this.OnSubjectUnitManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectUnitTel", DbType="NVarChar(50)")] + public string SubjectUnitTel + { + get + { + return this._SubjectUnitTel; + } + set + { + if ((this._SubjectUnitTel != value)) + { + this.OnSubjectUnitTelChanging(value); + this.SendPropertyChanging(); + this._SubjectUnitTel = value; + this.SendPropertyChanged("SubjectUnitTel"); + this.OnSubjectUnitTelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckStartTime", DbType="DateTime NOT NULL")] + public System.DateTime CheckStartTime + { + get + { + return this._CheckStartTime; + } + set + { + if ((this._CheckStartTime != value)) + { + this.OnCheckStartTimeChanging(value); + this.SendPropertyChanging(); + this._CheckStartTime = value; + this.SendPropertyChanged("CheckStartTime"); + this.OnCheckStartTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckEndTime", DbType="DateTime NOT NULL")] + public System.DateTime CheckEndTime + { + get + { + return this._CheckEndTime; + } + set + { + if ((this._CheckEndTime != value)) + { + this.OnCheckEndTimeChanging(value); + this.SendPropertyChanging(); + this._CheckEndTime = value; + this.SendPropertyChanged("CheckEndTime"); + this.OnCheckEndTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectObject", DbType="NVarChar(500)")] + public string SubjectObject + { + get + { + return this._SubjectObject; + } + set + { + if ((this._SubjectObject != value)) + { + this.OnSubjectObjectChanging(value); + this.SendPropertyChanging(); + this._SubjectObject = value; + this.SendPropertyChanged("SubjectObject"); + this.OnSubjectObjectChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTeamLeader", DbType="NVarChar(50)")] + public string CheckTeamLeader + { + get + { + return this._CheckTeamLeader; + } + set + { + if ((this._CheckTeamLeader != value)) + { + this.OnCheckTeamLeaderChanging(value); + this.SendPropertyChanging(); + this._CheckTeamLeader = value; + this.SendPropertyChanged("CheckTeamLeader"); + this.OnCheckTeamLeaderChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTeamLeaderName", DbType="NVarChar(50)")] + public string CheckTeamLeaderName + { + get + { + return this._CheckTeamLeaderName; + } + set + { + if ((this._CheckTeamLeaderName != value)) + { + this.OnCheckTeamLeaderNameChanging(value); + this.SendPropertyChanging(); + this._CheckTeamLeaderName = value; + this.SendPropertyChanged("CheckTeamLeaderName"); + this.OnCheckTeamLeaderNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SexName", DbType="NVarChar(5)")] + public string SexName + { + get + { + return this._SexName; + } + set + { + if ((this._SexName != value)) + { + this.OnSexNameChanging(value); + this.SendPropertyChanging(); + this._SexName = value; + this.SendPropertyChanged("SexName"); + this.OnSexNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionGroupId", DbType="NVarChar(50)")] + public string SupervisionGroupId + { + get + { + return this._SupervisionGroupId; + } + set + { + if ((this._SupervisionGroupId != value)) + { + this.OnSupervisionGroupIdChanging(value); + this.SendPropertyChanging(); + this._SupervisionGroupId = value; + this.SendPropertyChanged("SupervisionGroupId"); + this.OnSupervisionGroupIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionGroupName", DbType="NVarChar(50)")] + public string SupervisionGroupName + { + get + { + return this._SupervisionGroupName; + } + set + { + if ((this._SupervisionGroupName != value)) + { + this.OnSupervisionGroupNameChanging(value); + this.SendPropertyChanging(); + this._SupervisionGroupName = value; + this.SendPropertyChanged("SupervisionGroupName"); + this.OnSupervisionGroupNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectProjectId", DbType="NVarChar(50)")] + public string SubjectProjectId + { + get + { + return this._SubjectProjectId; + } + set + { + if ((this._SubjectProjectId != value)) + { + this.OnSubjectProjectIdChanging(value); + this.SendPropertyChanging(); + this._SubjectProjectId = value; + this.SendPropertyChanged("SubjectProjectId"); + this.OnSubjectProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectProjectName", DbType="NVarChar(200)")] + public string SubjectProjectName + { + get + { + return this._SubjectProjectName; + } + set + { + if ((this._SubjectProjectName != value)) + { + this.OnSubjectProjectNameChanging(value); + this.SendPropertyChanging(); + this._SubjectProjectName = value; + this.SendPropertyChanged("SubjectProjectName"); + this.OnSubjectProjectNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectUnitManId", DbType="NVarChar(50)")] + public string SubjectUnitManId + { + get + { + return this._SubjectUnitManId; + } + set + { + if ((this._SubjectUnitManId != value)) + { + this.OnSubjectUnitManIdChanging(value); + this.SendPropertyChanging(); + this._SubjectUnitManId = value; + this.SendPropertyChanged("SubjectUnitManId"); + this.OnSubjectUnitManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckManId", DbType="NVarChar(50)")] + public string CheckManId + { + get + { + return this._CheckManId; + } + set + { + if ((this._CheckManId != value)) + { + this.OnCheckManIdChanging(value); + this.SendPropertyChanging(); + this._CheckManId = value; + this.SendPropertyChanged("CheckManId"); + this.OnCheckManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckManName", DbType="NVarChar(50)")] + public string CheckManName + { + get + { + return this._CheckManName; + } + set + { + if ((this._CheckManName != value)) + { + this.OnCheckManNameChanging(value); + this.SendPropertyChanging(); + this._CheckManName = value; + this.SendPropertyChanged("CheckManName"); + this.OnCheckManNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckInfo_Base_Unit", Storage="_Base_Unit", ThisKey="SubjectUnitId", 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.DCGL_Check_CheckInfo.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.DCGL_Check_CheckInfo.Add(this); + this._SubjectUnitId = value.UnitId; + } + else + { + this._SubjectUnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckInfo_Base_Unit1", Storage="_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Unit + { + get + { + return this._Unit.Entity; + } + set + { + Base_Unit previousValue = this._Unit.Entity; + if (((previousValue != value) + || (this._Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Unit.Entity = null; + previousValue.DCGL_Check_CheckInfo_Base_Unit1.Remove(this); + } + this._Unit.Entity = value; + if ((value != null)) + { + value.DCGL_Check_CheckInfo_Base_Unit1.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckInfo_CheckFile_DCGL_Check_CheckInfo", Storage="_DCGL_Check_CheckInfo_CheckFile", ThisKey="CheckInfoId", OtherKey="CheckInfoId", DeleteRule="NO ACTION")] + public EntitySet DCGL_Check_CheckInfo_CheckFile + { + get + { + return this._DCGL_Check_CheckInfo_CheckFile; + } + set + { + this._DCGL_Check_CheckInfo_CheckFile.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckInfo_CheckTeam_Check_CheckInfo", Storage="_DCGL_Check_CheckInfo_CheckTeam", ThisKey="CheckInfoId", OtherKey="CheckInfoId", DeleteRule="NO ACTION")] + public EntitySet DCGL_Check_CheckInfo_CheckTeam + { + get + { + return this._DCGL_Check_CheckInfo_CheckTeam; + } + set + { + this._DCGL_Check_CheckInfo_CheckTeam.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_DCGL_Check_CheckInfo_CheckFile(DCGL_Check_CheckInfo_CheckFile entity) + { + this.SendPropertyChanging(); + entity.DCGL_Check_CheckInfo = this; + } + + private void detach_DCGL_Check_CheckInfo_CheckFile(DCGL_Check_CheckInfo_CheckFile entity) + { + this.SendPropertyChanging(); + entity.DCGL_Check_CheckInfo = null; + } + + private void attach_DCGL_Check_CheckInfo_CheckTeam(DCGL_Check_CheckInfo_CheckTeam entity) + { + this.SendPropertyChanging(); + entity.DCGL_Check_CheckInfo = this; + } + + private void detach_DCGL_Check_CheckInfo_CheckTeam(DCGL_Check_CheckInfo_CheckTeam entity) + { + this.SendPropertyChanging(); + entity.DCGL_Check_CheckInfo = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.DCGL_Check_CheckInfo_CheckFile")] + public partial class DCGL_Check_CheckInfo_CheckFile : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _CheckFileId; + + private string _CheckInfoId; + + private string _CheckFileName; + + private System.Nullable _SortIndex; + + private string _Remark; + + private EntityRef _DCGL_Check_CheckInfo; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnCheckFileIdChanging(string value); + partial void OnCheckFileIdChanged(); + partial void OnCheckInfoIdChanging(string value); + partial void OnCheckInfoIdChanged(); + partial void OnCheckFileNameChanging(string value); + partial void OnCheckFileNameChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public DCGL_Check_CheckInfo_CheckFile() + { + this._DCGL_Check_CheckInfo = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckFileId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string CheckFileId + { + get + { + return this._CheckFileId; + } + set + { + if ((this._CheckFileId != value)) + { + this.OnCheckFileIdChanging(value); + this.SendPropertyChanging(); + this._CheckFileId = value; + this.SendPropertyChanged("CheckFileId"); + this.OnCheckFileIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckInfoId", DbType="NVarChar(50)")] + public string CheckInfoId + { + get + { + return this._CheckInfoId; + } + set + { + if ((this._CheckInfoId != value)) + { + if (this._DCGL_Check_CheckInfo.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCheckInfoIdChanging(value); + this.SendPropertyChanging(); + this._CheckInfoId = value; + this.SendPropertyChanged("CheckInfoId"); + this.OnCheckInfoIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckFileName", DbType="NVarChar(500)")] + public string CheckFileName + { + get + { + return this._CheckFileName; + } + set + { + if ((this._CheckFileName != value)) + { + this.OnCheckFileNameChanging(value); + this.SendPropertyChanging(); + this._CheckFileName = value; + this.SendPropertyChanged("CheckFileName"); + this.OnCheckFileNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckInfo_CheckFile_DCGL_Check_CheckInfo", Storage="_DCGL_Check_CheckInfo", ThisKey="CheckInfoId", OtherKey="CheckInfoId", IsForeignKey=true)] + public DCGL_Check_CheckInfo DCGL_Check_CheckInfo + { + get + { + return this._DCGL_Check_CheckInfo.Entity; + } + set + { + DCGL_Check_CheckInfo previousValue = this._DCGL_Check_CheckInfo.Entity; + if (((previousValue != value) + || (this._DCGL_Check_CheckInfo.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._DCGL_Check_CheckInfo.Entity = null; + previousValue.DCGL_Check_CheckInfo_CheckFile.Remove(this); + } + this._DCGL_Check_CheckInfo.Entity = value; + if ((value != null)) + { + value.DCGL_Check_CheckInfo_CheckFile.Add(this); + this._CheckInfoId = value.CheckInfoId; + } + else + { + this._CheckInfoId = default(string); + } + this.SendPropertyChanged("DCGL_Check_CheckInfo"); + } + } + } + + 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.DCGL_Check_CheckInfo_CheckTeam")] + public partial class DCGL_Check_CheckInfo_CheckTeam : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _CheckTeamId; + + private string _CheckInfoId; + + private string _UserId; + + private System.Nullable _SortIndex; + + private string _PostName; + + private string _WorkTitle; + + private string _CheckPostName; + + private System.Nullable _CheckDate; + + private string _UserName; + + private string _UnitId; + + private string _SexName; + + private string _SupervisionGroupId; + + private string _SupervisionGroupName; + + private EntityRef _Base_Unit; + + private EntityRef _DCGL_Check_CheckInfo; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnCheckTeamIdChanging(string value); + partial void OnCheckTeamIdChanged(); + partial void OnCheckInfoIdChanging(string value); + partial void OnCheckInfoIdChanged(); + partial void OnUserIdChanging(string value); + partial void OnUserIdChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + partial void OnPostNameChanging(string value); + partial void OnPostNameChanged(); + partial void OnWorkTitleChanging(string value); + partial void OnWorkTitleChanged(); + partial void OnCheckPostNameChanging(string value); + partial void OnCheckPostNameChanged(); + partial void OnCheckDateChanging(System.Nullable value); + partial void OnCheckDateChanged(); + partial void OnUserNameChanging(string value); + partial void OnUserNameChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnSexNameChanging(string value); + partial void OnSexNameChanged(); + partial void OnSupervisionGroupIdChanging(string value); + partial void OnSupervisionGroupIdChanged(); + partial void OnSupervisionGroupNameChanging(string value); + partial void OnSupervisionGroupNameChanged(); + #endregion + + public DCGL_Check_CheckInfo_CheckTeam() + { + this._Base_Unit = default(EntityRef); + this._DCGL_Check_CheckInfo = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckTeamId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string CheckTeamId + { + get + { + return this._CheckTeamId; + } + set + { + if ((this._CheckTeamId != value)) + { + this.OnCheckTeamIdChanging(value); + this.SendPropertyChanging(); + this._CheckTeamId = value; + this.SendPropertyChanged("CheckTeamId"); + this.OnCheckTeamIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckInfoId", DbType="NVarChar(50)")] + public string CheckInfoId + { + get + { + return this._CheckInfoId; + } + set + { + if ((this._CheckInfoId != value)) + { + if (this._DCGL_Check_CheckInfo.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCheckInfoIdChanging(value); + this.SendPropertyChanging(); + this._CheckInfoId = value; + this.SendPropertyChanged("CheckInfoId"); + this.OnCheckInfoIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="NVarChar(50)")] + public string UserId + { + get + { + return this._UserId; + } + set + { + if ((this._UserId != value)) + { + this.OnUserIdChanging(value); + this.SendPropertyChanging(); + this._UserId = value; + this.SendPropertyChanged("UserId"); + this.OnUserIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PostName", DbType="NVarChar(200)")] + public string PostName + { + get + { + return this._PostName; + } + set + { + if ((this._PostName != value)) + { + this.OnPostNameChanging(value); + this.SendPropertyChanging(); + this._PostName = value; + this.SendPropertyChanged("PostName"); + this.OnPostNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkTitle", DbType="NVarChar(200)")] + public string WorkTitle + { + get + { + return this._WorkTitle; + } + set + { + if ((this._WorkTitle != value)) + { + this.OnWorkTitleChanging(value); + this.SendPropertyChanging(); + this._WorkTitle = value; + this.SendPropertyChanged("WorkTitle"); + this.OnWorkTitleChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckPostName", DbType="NVarChar(200)")] + public string CheckPostName + { + get + { + return this._CheckPostName; + } + set + { + if ((this._CheckPostName != value)) + { + this.OnCheckPostNameChanging(value); + this.SendPropertyChanging(); + this._CheckPostName = value; + this.SendPropertyChanged("CheckPostName"); + this.OnCheckPostNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckDate", DbType="DateTime")] + public System.Nullable CheckDate + { + get + { + return this._CheckDate; + } + set + { + if ((this._CheckDate != value)) + { + this.OnCheckDateChanging(value); + this.SendPropertyChanging(); + this._CheckDate = value; + this.SendPropertyChanged("CheckDate"); + this.OnCheckDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(50)")] + public string UserName + { + get + { + return this._UserName; + } + set + { + if ((this._UserName != value)) + { + this.OnUserNameChanging(value); + this.SendPropertyChanging(); + this._UserName = value; + this.SendPropertyChanged("UserName"); + this.OnUserNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SexName", DbType="NVarChar(5)")] + public string SexName + { + get + { + return this._SexName; + } + set + { + if ((this._SexName != value)) + { + this.OnSexNameChanging(value); + this.SendPropertyChanging(); + this._SexName = value; + this.SendPropertyChanged("SexName"); + this.OnSexNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionGroupId", DbType="NVarChar(50)")] + public string SupervisionGroupId + { + get + { + return this._SupervisionGroupId; + } + set + { + if ((this._SupervisionGroupId != value)) + { + this.OnSupervisionGroupIdChanging(value); + this.SendPropertyChanging(); + this._SupervisionGroupId = value; + this.SendPropertyChanged("SupervisionGroupId"); + this.OnSupervisionGroupIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupervisionGroupName", DbType="NVarChar(50)")] + public string SupervisionGroupName + { + get + { + return this._SupervisionGroupName; + } + set + { + if ((this._SupervisionGroupName != value)) + { + this.OnSupervisionGroupNameChanging(value); + this.SendPropertyChanging(); + this._SupervisionGroupName = value; + this.SendPropertyChanged("SupervisionGroupName"); + this.OnSupervisionGroupNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckInfo_CheckTeam_Base_Unit1", Storage="_Base_Unit", ThisKey="UnitId", 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.DCGL_Check_CheckInfo_CheckTeam.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.DCGL_Check_CheckInfo_CheckTeam.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckInfo_CheckTeam_Check_CheckInfo", Storage="_DCGL_Check_CheckInfo", ThisKey="CheckInfoId", OtherKey="CheckInfoId", IsForeignKey=true)] + public DCGL_Check_CheckInfo DCGL_Check_CheckInfo + { + get + { + return this._DCGL_Check_CheckInfo.Entity; + } + set + { + DCGL_Check_CheckInfo previousValue = this._DCGL_Check_CheckInfo.Entity; + if (((previousValue != value) + || (this._DCGL_Check_CheckInfo.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._DCGL_Check_CheckInfo.Entity = null; + previousValue.DCGL_Check_CheckInfo_CheckTeam.Remove(this); + } + this._DCGL_Check_CheckInfo.Entity = value; + if ((value != null)) + { + value.DCGL_Check_CheckInfo_CheckTeam.Add(this); + this._CheckInfoId = value.CheckInfoId; + } + else + { + this._CheckInfoId = default(string); + } + this.SendPropertyChanged("DCGL_Check_CheckInfo"); + } + } + } + + 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.DCGL_Check_CheckInfo_TableNoticeItem")] + public partial class DCGL_Check_CheckInfo_TableNoticeItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ID; + + private string _CheckInfoId; + + private System.Nullable _SortIndex; + + private string _Describe; + + private string _Standards; + + private string _Advice; + + private System.Nullable _LimitTime; + + private string _Situation; + + private string _Remark; + + private string _Url; + + private string _AffUrl; + + private string _RiskLevel; + + private string _ProblemTypes; + + private string _ProblemSubTypeId; + + private string _ProblemSubType; + + private string _States; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIDChanging(string value); + partial void OnIDChanged(); + partial void OnCheckInfoIdChanging(string value); + partial void OnCheckInfoIdChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + partial void OnDescribeChanging(string value); + partial void OnDescribeChanged(); + partial void OnStandardsChanging(string value); + partial void OnStandardsChanged(); + partial void OnAdviceChanging(string value); + partial void OnAdviceChanged(); + partial void OnLimitTimeChanging(System.Nullable value); + partial void OnLimitTimeChanged(); + partial void OnSituationChanging(string value); + partial void OnSituationChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnUrlChanging(string value); + partial void OnUrlChanged(); + partial void OnAffUrlChanging(string value); + partial void OnAffUrlChanged(); + partial void OnRiskLevelChanging(string value); + partial void OnRiskLevelChanged(); + partial void OnProblemTypesChanging(string value); + partial void OnProblemTypesChanged(); + partial void OnProblemSubTypeIdChanging(string value); + partial void OnProblemSubTypeIdChanged(); + partial void OnProblemSubTypeChanging(string value); + partial void OnProblemSubTypeChanged(); + partial void OnStatesChanging(string value); + partial void OnStatesChanged(); + #endregion + + public DCGL_Check_CheckInfo_TableNoticeItem() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ID + { + get + { + return this._ID; + } + set + { + if ((this._ID != value)) + { + this.OnIDChanging(value); + this.SendPropertyChanging(); + this._ID = value; + this.SendPropertyChanged("ID"); + this.OnIDChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckInfoId", DbType="NVarChar(50)")] + public string CheckInfoId + { + get + { + return this._CheckInfoId; + } + set + { + if ((this._CheckInfoId != value)) + { + this.OnCheckInfoIdChanging(value); + this.SendPropertyChanging(); + this._CheckInfoId = value; + this.SendPropertyChanged("CheckInfoId"); + this.OnCheckInfoIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Describe", DbType="NVarChar(800)")] + public string Describe + { + get + { + return this._Describe; + } + set + { + if ((this._Describe != value)) + { + this.OnDescribeChanging(value); + this.SendPropertyChanging(); + this._Describe = value; + this.SendPropertyChanged("Describe"); + this.OnDescribeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Standards", DbType="NVarChar(800)")] + public string Standards + { + get + { + return this._Standards; + } + set + { + if ((this._Standards != value)) + { + this.OnStandardsChanging(value); + this.SendPropertyChanging(); + this._Standards = value; + this.SendPropertyChanged("Standards"); + this.OnStandardsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Advice", DbType="NVarChar(800)")] + public string Advice + { + get + { + return this._Advice; + } + set + { + if ((this._Advice != value)) + { + this.OnAdviceChanging(value); + this.SendPropertyChanging(); + this._Advice = value; + this.SendPropertyChanged("Advice"); + this.OnAdviceChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LimitTime", DbType="DateTime")] + public System.Nullable LimitTime + { + get + { + return this._LimitTime; + } + set + { + if ((this._LimitTime != value)) + { + this.OnLimitTimeChanging(value); + this.SendPropertyChanging(); + this._LimitTime = value; + this.SendPropertyChanged("LimitTime"); + this.OnLimitTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Situation", DbType="NVarChar(800)")] + public string Situation + { + get + { + return this._Situation; + } + set + { + if ((this._Situation != value)) + { + this.OnSituationChanging(value); + this.SendPropertyChanging(); + this._Situation = value; + this.SendPropertyChanged("Situation"); + this.OnSituationChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(800)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Url", DbType="NVarChar(2000)")] + public string Url + { + get + { + return this._Url; + } + set + { + if ((this._Url != value)) + { + this.OnUrlChanging(value); + this.SendPropertyChanging(); + this._Url = value; + this.SendPropertyChanged("Url"); + this.OnUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AffUrl", DbType="NVarChar(2000)")] + public string AffUrl + { + get + { + return this._AffUrl; + } + set + { + if ((this._AffUrl != value)) + { + this.OnAffUrlChanging(value); + this.SendPropertyChanging(); + this._AffUrl = value; + this.SendPropertyChanged("AffUrl"); + this.OnAffUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskLevel", DbType="NVarChar(50)")] + public string RiskLevel + { + get + { + return this._RiskLevel; + } + set + { + if ((this._RiskLevel != value)) + { + this.OnRiskLevelChanging(value); + this.SendPropertyChanging(); + this._RiskLevel = value; + this.SendPropertyChanged("RiskLevel"); + this.OnRiskLevelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemTypes", DbType="Char(1)")] + public string ProblemTypes + { + get + { + return this._ProblemTypes; + } + set + { + if ((this._ProblemTypes != value)) + { + this.OnProblemTypesChanging(value); + this.SendPropertyChanging(); + this._ProblemTypes = value; + this.SendPropertyChanged("ProblemTypes"); + this.OnProblemTypesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemSubTypeId", DbType="NVarChar(50)")] + public string ProblemSubTypeId + { + get + { + return this._ProblemSubTypeId; + } + set + { + if ((this._ProblemSubTypeId != value)) + { + this.OnProblemSubTypeIdChanging(value); + this.SendPropertyChanging(); + this._ProblemSubTypeId = value; + this.SendPropertyChanged("ProblemSubTypeId"); + this.OnProblemSubTypeIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProblemSubType", DbType="NVarChar(100)")] + public string ProblemSubType + { + get + { + return this._ProblemSubType; + } + set + { + if ((this._ProblemSubType != value)) + { + this.OnProblemSubTypeChanging(value); + this.SendPropertyChanging(); + this._ProblemSubType = value; + this.SendPropertyChanged("ProblemSubType"); + this.OnProblemSubTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_States", DbType="NVarChar(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(); + } + } + } + + 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.DCGL_Check_CheckRectify")] + public partial class DCGL_Check_CheckRectify : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _CheckRectifyId; + + private string _CheckRectifyCode; + + private string _ProjectId; + + private string _UnitId; + + private System.Nullable _CheckDate; + + private string _IssueMan; + + private System.Nullable _IssueDate; + + private string _HandleState; + + private string _ProjectName; + + private EntityRef _Base_Unit; + + private EntitySet _DCGL_Check_CheckRectifyItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnCheckRectifyIdChanging(string value); + partial void OnCheckRectifyIdChanged(); + partial void OnCheckRectifyCodeChanging(string value); + partial void OnCheckRectifyCodeChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnCheckDateChanging(System.Nullable value); + partial void OnCheckDateChanged(); + partial void OnIssueManChanging(string value); + partial void OnIssueManChanged(); + partial void OnIssueDateChanging(System.Nullable value); + partial void OnIssueDateChanged(); + partial void OnHandleStateChanging(string value); + partial void OnHandleStateChanged(); + partial void OnProjectNameChanging(string value); + partial void OnProjectNameChanged(); + #endregion + + public DCGL_Check_CheckRectify() + { + this._Base_Unit = default(EntityRef); + this._DCGL_Check_CheckRectifyItem = new EntitySet(new Action(this.attach_DCGL_Check_CheckRectifyItem), new Action(this.detach_DCGL_Check_CheckRectifyItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckRectifyId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string CheckRectifyId + { + get + { + return this._CheckRectifyId; + } + set + { + if ((this._CheckRectifyId != value)) + { + this.OnCheckRectifyIdChanging(value); + this.SendPropertyChanging(); + this._CheckRectifyId = value; + this.SendPropertyChanged("CheckRectifyId"); + this.OnCheckRectifyIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckRectifyCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string CheckRectifyCode + { + get + { + return this._CheckRectifyCode; + } + set + { + if ((this._CheckRectifyCode != value)) + { + this.OnCheckRectifyCodeChanging(value); + this.SendPropertyChanging(); + this._CheckRectifyCode = value; + this.SendPropertyChanged("CheckRectifyCode"); + this.OnCheckRectifyCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckDate", DbType="DateTime")] + public System.Nullable CheckDate + { + get + { + return this._CheckDate; + } + set + { + if ((this._CheckDate != value)) + { + this.OnCheckDateChanging(value); + this.SendPropertyChanging(); + this._CheckDate = value; + this.SendPropertyChanged("CheckDate"); + this.OnCheckDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IssueMan", DbType="NVarChar(50)")] + public string IssueMan + { + get + { + return this._IssueMan; + } + set + { + if ((this._IssueMan != value)) + { + this.OnIssueManChanging(value); + this.SendPropertyChanging(); + this._IssueMan = value; + this.SendPropertyChanged("IssueMan"); + this.OnIssueManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IssueDate", DbType="DateTime")] + public System.Nullable IssueDate + { + get + { + return this._IssueDate; + } + set + { + if ((this._IssueDate != value)) + { + this.OnIssueDateChanging(value); + this.SendPropertyChanging(); + this._IssueDate = value; + this.SendPropertyChanged("IssueDate"); + this.OnIssueDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this.OnHandleStateChanging(value); + this.SendPropertyChanging(); + this._HandleState = value; + this.SendPropertyChanged("HandleState"); + this.OnHandleStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectName", DbType="NVarChar(500)")] + public string ProjectName + { + get + { + return this._ProjectName; + } + set + { + if ((this._ProjectName != value)) + { + this.OnProjectNameChanging(value); + this.SendPropertyChanging(); + this._ProjectName = value; + this.SendPropertyChanged("ProjectName"); + this.OnProjectNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckRectify_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", 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.DCGL_Check_CheckRectify.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.DCGL_Check_CheckRectify.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckRectifyItem_Check_CheckRectify", Storage="_DCGL_Check_CheckRectifyItem", ThisKey="CheckRectifyId", OtherKey="CheckRectifyId", DeleteRule="NO ACTION")] + public EntitySet DCGL_Check_CheckRectifyItem + { + get + { + return this._DCGL_Check_CheckRectifyItem; + } + set + { + this._DCGL_Check_CheckRectifyItem.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_DCGL_Check_CheckRectifyItem(DCGL_Check_CheckRectifyItem entity) + { + this.SendPropertyChanging(); + entity.DCGL_Check_CheckRectify = this; + } + + private void detach_DCGL_Check_CheckRectifyItem(DCGL_Check_CheckRectifyItem entity) + { + this.SendPropertyChanging(); + entity.DCGL_Check_CheckRectify = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.DCGL_Check_CheckRectifyItem")] + public partial class DCGL_Check_CheckRectifyItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _CheckRectifyItemId; + + private string _CheckRectifyId; + + private string _NoticeItemId; + + private string _ConfirmMan; + + private string _ConfirmManName; + + private System.Nullable _ConfirmDate; + + private System.Nullable _OrderEndDate; + + private string _OrderEndPerson; + + private System.Nullable _RealEndDate; + + private string _Verification; + + private EntityRef _DCGL_Check_CheckRectify; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnCheckRectifyItemIdChanging(string value); + partial void OnCheckRectifyItemIdChanged(); + partial void OnCheckRectifyIdChanging(string value); + partial void OnCheckRectifyIdChanged(); + partial void OnNoticeItemIdChanging(string value); + partial void OnNoticeItemIdChanged(); + partial void OnConfirmManChanging(string value); + partial void OnConfirmManChanged(); + partial void OnConfirmManNameChanging(string value); + partial void OnConfirmManNameChanged(); + partial void OnConfirmDateChanging(System.Nullable value); + partial void OnConfirmDateChanged(); + partial void OnOrderEndDateChanging(System.Nullable value); + partial void OnOrderEndDateChanged(); + partial void OnOrderEndPersonChanging(string value); + partial void OnOrderEndPersonChanged(); + partial void OnRealEndDateChanging(System.Nullable value); + partial void OnRealEndDateChanged(); + partial void OnVerificationChanging(string value); + partial void OnVerificationChanged(); + #endregion + + public DCGL_Check_CheckRectifyItem() + { + this._DCGL_Check_CheckRectify = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckRectifyItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string CheckRectifyItemId + { + get + { + return this._CheckRectifyItemId; + } + set + { + if ((this._CheckRectifyItemId != value)) + { + this.OnCheckRectifyItemIdChanging(value); + this.SendPropertyChanging(); + this._CheckRectifyItemId = value; + this.SendPropertyChanged("CheckRectifyItemId"); + this.OnCheckRectifyItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckRectifyId", DbType="NVarChar(50)")] + public string CheckRectifyId + { + get + { + return this._CheckRectifyId; + } + set + { + if ((this._CheckRectifyId != value)) + { + if (this._DCGL_Check_CheckRectify.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCheckRectifyIdChanging(value); + this.SendPropertyChanging(); + this._CheckRectifyId = value; + this.SendPropertyChanged("CheckRectifyId"); + this.OnCheckRectifyIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NoticeItemId", DbType="NVarChar(50)")] + public string NoticeItemId + { + get + { + return this._NoticeItemId; + } + set + { + if ((this._NoticeItemId != value)) + { + this.OnNoticeItemIdChanging(value); + this.SendPropertyChanging(); + this._NoticeItemId = value; + this.SendPropertyChanged("NoticeItemId"); + this.OnNoticeItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmMan", DbType="NVarChar(50)")] + public string ConfirmMan + { + get + { + return this._ConfirmMan; + } + set + { + if ((this._ConfirmMan != value)) + { + this.OnConfirmManChanging(value); + this.SendPropertyChanging(); + this._ConfirmMan = value; + this.SendPropertyChanged("ConfirmMan"); + this.OnConfirmManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmManName", DbType="NVarChar(50)")] + public string ConfirmManName + { + get + { + return this._ConfirmManName; + } + set + { + if ((this._ConfirmManName != value)) + { + this.OnConfirmManNameChanging(value); + this.SendPropertyChanging(); + this._ConfirmManName = value; + this.SendPropertyChanged("ConfirmManName"); + this.OnConfirmManNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmDate", DbType="DateTime")] + public System.Nullable ConfirmDate + { + get + { + return this._ConfirmDate; + } + set + { + if ((this._ConfirmDate != value)) + { + this.OnConfirmDateChanging(value); + this.SendPropertyChanging(); + this._ConfirmDate = value; + this.SendPropertyChanged("ConfirmDate"); + this.OnConfirmDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderEndDate", DbType="DateTime")] + public System.Nullable OrderEndDate + { + get + { + return this._OrderEndDate; + } + set + { + if ((this._OrderEndDate != value)) + { + this.OnOrderEndDateChanging(value); + this.SendPropertyChanging(); + this._OrderEndDate = value; + this.SendPropertyChanged("OrderEndDate"); + this.OnOrderEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderEndPerson", DbType="NVarChar(50)")] + public string OrderEndPerson + { + get + { + return this._OrderEndPerson; + } + set + { + if ((this._OrderEndPerson != value)) + { + this.OnOrderEndPersonChanging(value); + this.SendPropertyChanging(); + this._OrderEndPerson = value; + this.SendPropertyChanged("OrderEndPerson"); + this.OnOrderEndPersonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealEndDate", DbType="DateTime")] + public System.Nullable RealEndDate + { + get + { + return this._RealEndDate; + } + set + { + if ((this._RealEndDate != value)) + { + this.OnRealEndDateChanging(value); + this.SendPropertyChanging(); + this._RealEndDate = value; + this.SendPropertyChanged("RealEndDate"); + this.OnRealEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Verification", DbType="NVarChar(50)")] + public string Verification + { + get + { + return this._Verification; + } + set + { + if ((this._Verification != value)) + { + this.OnVerificationChanging(value); + this.SendPropertyChanging(); + this._Verification = value; + this.SendPropertyChanged("Verification"); + this.OnVerificationChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_DCGL_Check_CheckRectifyItem_Check_CheckRectify", Storage="_DCGL_Check_CheckRectify", ThisKey="CheckRectifyId", OtherKey="CheckRectifyId", IsForeignKey=true)] + public DCGL_Check_CheckRectify DCGL_Check_CheckRectify + { + get + { + return this._DCGL_Check_CheckRectify.Entity; + } + set + { + DCGL_Check_CheckRectify previousValue = this._DCGL_Check_CheckRectify.Entity; + if (((previousValue != value) + || (this._DCGL_Check_CheckRectify.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._DCGL_Check_CheckRectify.Entity = null; + previousValue.DCGL_Check_CheckRectifyItem.Remove(this); + } + this._DCGL_Check_CheckRectify.Entity = value; + if ((value != null)) + { + value.DCGL_Check_CheckRectifyItem.Add(this); + this._CheckRectifyId = value.CheckRectifyId; + } + else + { + this._CheckRectifyId = default(string); + } + this.SendPropertyChanged("DCGL_Check_CheckRectify"); + } + } + } + + 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.DigData_CQMSDataCollect")] public partial class DigData_CQMSDataCollect : INotifyPropertyChanging, INotifyPropertyChanged { @@ -272999,6 +275584,591 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_DCGL_CheckRectifyListFromSUB")] + public partial class View_DCGL_CheckRectifyListFromSUB + { + + private string _CheckRectifyItemId; + + private string _CheckRectifyId; + + private string _NoticeItemId; + + private string _ConfirmMan; + + private string _ConfirmManName; + + private System.Nullable _ConfirmDate; + + private System.Nullable _OrderEndDate; + + private string _OrderEndPerson; + + private System.Nullable _RealEndDate; + + private string _Verification; + + private string _CheckRectifyCode; + + private string _ProjectId; + + private string _UnitId; + + private System.Nullable _CheckDate; + + private string _IssueMan; + + private System.Nullable _IssueDate; + + private string _HandleState; + + private System.Nullable _SortIndex; + + private string _WorkType; + + private string _DangerPoint; + + private string _RiskExists; + + private string _IsProject; + + private string _CheckMan; + + private string _SubjectUnitMan; + + private string _AttachFileId; + + private string _ToKeyId; + + private string _AttachSource; + + private string _AttachUrl; + + private string _AttachFileId2; + + private string _ToKeyId2; + + private string _AttachSource2; + + private string _AttachUrl2; + + public View_DCGL_CheckRectifyListFromSUB() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckRectifyItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string CheckRectifyItemId + { + get + { + return this._CheckRectifyItemId; + } + set + { + if ((this._CheckRectifyItemId != value)) + { + this._CheckRectifyItemId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckRectifyId", DbType="NVarChar(50)")] + public string CheckRectifyId + { + get + { + return this._CheckRectifyId; + } + set + { + if ((this._CheckRectifyId != value)) + { + this._CheckRectifyId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NoticeItemId", DbType="NVarChar(50)")] + public string NoticeItemId + { + get + { + return this._NoticeItemId; + } + set + { + if ((this._NoticeItemId != value)) + { + this._NoticeItemId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmMan", DbType="NVarChar(50)")] + public string ConfirmMan + { + get + { + return this._ConfirmMan; + } + set + { + if ((this._ConfirmMan != value)) + { + this._ConfirmMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmManName", DbType="NVarChar(50)")] + public string ConfirmManName + { + get + { + return this._ConfirmManName; + } + set + { + if ((this._ConfirmManName != value)) + { + this._ConfirmManName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmDate", DbType="DateTime")] + public System.Nullable ConfirmDate + { + get + { + return this._ConfirmDate; + } + set + { + if ((this._ConfirmDate != value)) + { + this._ConfirmDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderEndDate", DbType="DateTime")] + public System.Nullable OrderEndDate + { + get + { + return this._OrderEndDate; + } + set + { + if ((this._OrderEndDate != value)) + { + this._OrderEndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderEndPerson", DbType="NVarChar(50)")] + public string OrderEndPerson + { + get + { + return this._OrderEndPerson; + } + set + { + if ((this._OrderEndPerson != value)) + { + this._OrderEndPerson = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealEndDate", DbType="DateTime")] + public System.Nullable RealEndDate + { + get + { + return this._RealEndDate; + } + set + { + if ((this._RealEndDate != value)) + { + this._RealEndDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Verification", DbType="NVarChar(50)")] + public string Verification + { + get + { + return this._Verification; + } + set + { + if ((this._Verification != value)) + { + this._Verification = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckRectifyCode", DbType="NVarChar(50)")] + public string CheckRectifyCode + { + get + { + return this._CheckRectifyCode; + } + set + { + if ((this._CheckRectifyCode != value)) + { + this._CheckRectifyCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckDate", DbType="DateTime")] + public System.Nullable CheckDate + { + get + { + return this._CheckDate; + } + set + { + if ((this._CheckDate != value)) + { + this._CheckDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IssueMan", DbType="NVarChar(50)")] + public string IssueMan + { + get + { + return this._IssueMan; + } + set + { + if ((this._IssueMan != value)) + { + this._IssueMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IssueDate", DbType="DateTime")] + public System.Nullable IssueDate + { + get + { + return this._IssueDate; + } + set + { + if ((this._IssueDate != value)) + { + this._IssueDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this._SortIndex = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkType", DbType="VarChar(1) NOT NULL", CanBeNull=false)] + public string WorkType + { + get + { + return this._WorkType; + } + set + { + if ((this._WorkType != value)) + { + this._WorkType = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DangerPoint", DbType="VarChar(1) NOT NULL", CanBeNull=false)] + public string DangerPoint + { + get + { + return this._DangerPoint; + } + set + { + if ((this._DangerPoint != value)) + { + this._DangerPoint = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskExists", DbType="NVarChar(2433)")] + public string RiskExists + { + get + { + return this._RiskExists; + } + set + { + if ((this._RiskExists != value)) + { + this._RiskExists = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsProject", DbType="VarChar(1) NOT NULL", CanBeNull=false)] + public string IsProject + { + get + { + return this._IsProject; + } + set + { + if ((this._IsProject != value)) + { + this._IsProject = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckMan", DbType="VarChar(1) NOT NULL", CanBeNull=false)] + public string CheckMan + { + get + { + return this._CheckMan; + } + set + { + if ((this._CheckMan != value)) + { + this._CheckMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubjectUnitMan", DbType="VarChar(1) NOT NULL", CanBeNull=false)] + public string SubjectUnitMan + { + get + { + return this._SubjectUnitMan; + } + set + { + if ((this._SubjectUnitMan != value)) + { + this._SubjectUnitMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachFileId", DbType="NVarChar(50)")] + public string AttachFileId + { + get + { + return this._AttachFileId; + } + set + { + if ((this._AttachFileId != value)) + { + this._AttachFileId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ToKeyId", DbType="NVarChar(100)")] + public string ToKeyId + { + get + { + return this._ToKeyId; + } + set + { + if ((this._ToKeyId != value)) + { + this._ToKeyId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachSource", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string AttachSource + { + get + { + return this._AttachSource; + } + set + { + if ((this._AttachSource != value)) + { + this._AttachSource = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string AttachUrl + { + get + { + return this._AttachUrl; + } + set + { + if ((this._AttachUrl != value)) + { + this._AttachUrl = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachFileId2", DbType="NVarChar(50)")] + public string AttachFileId2 + { + get + { + return this._AttachFileId2; + } + set + { + if ((this._AttachFileId2 != value)) + { + this._AttachFileId2 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ToKeyId2", DbType="NVarChar(100)")] + public string ToKeyId2 + { + get + { + return this._ToKeyId2; + } + set + { + if ((this._ToKeyId2 != value)) + { + this._ToKeyId2 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachSource2", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string AttachSource2 + { + get + { + return this._AttachSource2; + } + set + { + if ((this._AttachSource2 != value)) + { + this._AttachSource2 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttachUrl2", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string AttachUrl2 + { + get + { + return this._AttachUrl2; + } + set + { + if ((this._AttachUrl2 != value)) + { + this._AttachUrl2 = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_EduTrain_TrainFind")] public partial class View_EduTrain_TrainFind { diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index d3422000..91c452bc 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -78,6 +78,7 @@ +