diff --git a/DataBase/版本日志/SGGLDB_V2023-03-27-001.sql b/DataBase/版本日志/SGGLDB_V2023-03-27-001.sql new file mode 100644 index 00000000..681e4c4f --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-03-27-001.sql @@ -0,0 +1,350 @@ +ALTER TABLE Base_Certificate ADD CertificateType char(1) NULL +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Certificate', @level2type=N'COLUMN',@level2name=N'CertificateType' +GO +ALTER TABLE SitePerson_Person ADD IsSafetyMonitoring BIT NULL +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿȫ໤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SitePerson_Person', @level2type=N'COLUMN',@level2name=N'IsSafetyMonitoring' +GO +ALTER TABLE Base_Certificate ADD IsRegisterHSSE BIT NULL +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿעʦ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Certificate', @level2type=N'COLUMN',@level2name=N'IsRegisterHSSE' +GO + +CREATE TABLE [dbo].[ProcessControl_InspectionManagement]( + [InspectionId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NOT NULL, + [CNProfessionalId] [nvarchar](50) NULL, + [InspectionCode] [nvarchar](50) NULL, + [UnitWorkId] [nvarchar](50) NULL, + [Branch] [nvarchar](50) NULL, + [ControlPointType] [nvarchar](50) NULL, + [AcceptanceSite] [nvarchar](50) NULL, + [IsOnceQualified] [bit] NULL, + [InspectionDate] [datetime] NULL, + [AttachUrl] [nvarchar](2000) NULL, + [CheckDate] [datetime] NULL, + [CheckMan] [nvarchar](50) NULL, + [UnqualifiedReason] [nvarchar](1000) NULL, + [NoticeCode] [nvarchar](50) NULL, + [AcceptanceCheckMan] [nvarchar](50) NULL, + [ParentDivisionProjectId] [nvarchar](50) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [FileType] [nvarchar](10) NULL, + [AttachUrl2] [nvarchar](2000) NULL, + [MainSendUnitId] [nvarchar](500) NULL, + [CCUnitIds] [nvarchar](500) NULL, + [PlanComplateDate] [datetime] NULL, + [AuditMan] [nvarchar](50) NULL, + [Status] [char](1) NULL, + [CompileMan2] [nvarchar](50) NULL, + [RePlanComplateDate] [datetime] NULL, + [UnqualifiedOption] [nvarchar](500) NULL, + CONSTRAINT [PK_ProcessControl_InspectionManagement] PRIMARY KEY CLUSTERED +( + [InspectionId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagement] WITH CHECK ADD CONSTRAINT [FK_ProcessControl_InspectionManagement_Base_CNProfessional] FOREIGN KEY([CNProfessionalId]) +REFERENCES [dbo].[Base_CNProfessional] ([CNProfessionalId]) +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagement] CHECK CONSTRAINT [FK_ProcessControl_InspectionManagement_Base_CNProfessional] +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagement] WITH CHECK ADD CONSTRAINT [FK_ProcessControl_InspectionManagement_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagement] CHECK CONSTRAINT [FK_ProcessControl_InspectionManagement_Base_Project] +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagement] WITH CHECK ADD CONSTRAINT [FK_ProcessControl_InspectionManagement_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagement] CHECK CONSTRAINT [FK_ProcessControl_InspectionManagement_Base_Unit] +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagement] WITH CHECK ADD CONSTRAINT [FK_ProcessControl_InspectionManagement_WBS_UnitWork] FOREIGN KEY([UnitWorkId]) +REFERENCES [dbo].[WBS_UnitWork] ([UnitWorkId]) +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagement] CHECK CONSTRAINT [FK_ProcessControl_InspectionManagement_WBS_UnitWork] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'InspectionId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'UnitId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'רҵID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'CNProfessionalId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'InspectionCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ԪID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'UnitWorkId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֲ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'Branch' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƶ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'ControlPointType' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ղλ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'AcceptanceSite' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿһκϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'IsOnceQualified' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'InspectionDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƭ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'AttachUrl' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƻʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'PlanComplateDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܰרҵʦ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement', @level2type=N'COLUMN',@level2name=N'AuditMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagement' +GO + + + +CREATE TABLE [dbo].[ProcessControl_InspectionManagementApprove]( + [InspectionManagementApproveId] [nvarchar](50) NOT NULL, + [InspectionId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveIdea] [nvarchar](200) NULL, + [ApproveType] [char](1) NULL, + [AttachUrl] [nvarchar](200) NULL, + [SignType] [nvarchar](20) NULL, + [Edition] [int] NULL, + CONSTRAINT [PK_ProcessControl_InspectionManagementApprove] PRIMARY KEY CLUSTERED +( + [InspectionManagementApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagementApprove] WITH CHECK ADD CONSTRAINT [FK_ProcessControl_InspectionManagementApprove_Solution_CQMSConstructSolution] FOREIGN KEY([InspectionId]) +REFERENCES [dbo].[ProcessControl_InspectionManagement] ([InspectionId]) +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagementApprove] CHECK CONSTRAINT [FK_ProcessControl_InspectionManagementApprove_Solution_CQMSConstructSolution] +GO + + + +CREATE TABLE [dbo].[ProcessControl_InspectionManagementDetail]( + [InspectionDetailId] [nvarchar](50) NOT NULL, + [InspectionId] [nvarchar](50) NULL, + [UnitWorkId] [nvarchar](50) NULL, + [Branch] [nvarchar](50) NULL, + [ControlPointType] [nvarchar](50) NULL, + [CreateDate] [datetime] NULL, + CONSTRAINT [PK_ProcessControl_InspectionManagementDetail] PRIMARY KEY CLUSTERED +( + [InspectionDetailId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagementDetail] WITH CHECK ADD CONSTRAINT [FK_ProcessControl_InspectionManagementDetail_ProcessControl_InspectionManagement] FOREIGN KEY([InspectionId]) +REFERENCES [dbo].[ProcessControl_InspectionManagement] ([InspectionId]) +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagementDetail] CHECK CONSTRAINT [FK_ProcessControl_InspectionManagementDetail_ProcessControl_InspectionManagement] +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagementDetail] WITH CHECK ADD CONSTRAINT [FK_ProcessControl_InspectionManagementDetail_WBS_UnitWork] FOREIGN KEY([UnitWorkId]) +REFERENCES [dbo].[WBS_UnitWork] ([UnitWorkId]) +GO + +ALTER TABLE [dbo].[ProcessControl_InspectionManagementDetail] CHECK CONSTRAINT [FK_ProcessControl_InspectionManagementDetail_WBS_UnitWork] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagementDetail', @level2type=N'COLUMN',@level2name=N'InspectionDetailId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagementDetail', @level2type=N'COLUMN',@level2name=N'InspectionId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagementDetail', @level2type=N'COLUMN',@level2name=N'UnitWorkId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֲId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagementDetail', @level2type=N'COLUMN',@level2name=N'Branch' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƵId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagementDetail', @level2type=N'COLUMN',@level2name=N'ControlPointType' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagementDetail', @level2type=N'COLUMN',@level2name=N'CreateDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'֪ͨϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ProcessControl_InspectionManagementDetail' +GO + + + +CREATE TABLE [dbo].[WBS_DivisionProject]( + [DivisionProjectId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [DivisionCode] [nvarchar](50) NULL, + [DivisionName] [nvarchar](100) NULL, + [SortIndex] [int] NULL, + [SuperDivisionId] [nvarchar](50) NULL, + [CNProfessionalId] [nvarchar](50) NULL, + [IsSelected] [bit] NULL, + [UnitWorkId] [nvarchar](50) NULL, + [OldDivisionId] [nvarchar](50) NULL, + [SubItemType] [char](1) NULL, + CONSTRAINT [PK_WBS_DivisionProject] PRIMARY KEY CLUSTERED +( + [DivisionProjectId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[WBS_DivisionProject] WITH CHECK ADD CONSTRAINT [FK_WBS_DivisionProject_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[WBS_DivisionProject] CHECK CONSTRAINT [FK_WBS_DivisionProject_Base_Project] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionProject', @level2type=N'COLUMN',@level2name=N'DivisionProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionProject', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֲ/ӷֲ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionProject', @level2type=N'COLUMN',@level2name=N'DivisionCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֲ/ӷֲ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionProject', @level2type=N'COLUMN',@level2name=N'DivisionName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionProject', @level2type=N'COLUMN',@level2name=N'SortIndex' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ӦֲId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionProject', @level2type=N'COLUMN',@level2name=N'SuperDivisionId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'רҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionProject', @level2type=N'COLUMN',@level2name=N'CNProfessionalId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿѡtrue-ѡfalse-δѡ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionProject', @level2type=N'COLUMN',@level2name=N'IsSelected' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿWBSֲӷֲ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionProject' +GO + + + +CREATE TABLE [dbo].[WBS_BreakdownProject]( + [BreakdownProjectId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [BreakdownCode] [nvarchar](50) NULL, + [BreakdownName] [nvarchar](100) NULL, + [DivisionProjectId] [nvarchar](50) NULL, + [Basis] [nvarchar](500) NULL, + [CheckPoints] [nvarchar](500) NULL, + [RecordAndCode] [nvarchar](500) NULL, + [Class] [nvarchar](10) NULL, + [SortIndex] [int] NULL, + [Remark] [nvarchar](200) NULL, + [AttachUrl] [nvarchar](2000) NULL, + [IsSelected] [bit] NULL, + [ModelURL] [nvarchar](2000) NULL, + [UnitWorkId] [nvarchar](50) NULL, + [IsAcceptance] [bit] NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [IsYellow] [bit] NULL, + [FenBao] [nvarchar](50) NULL, + [WuHuan] [nvarchar](50) NULL, + [JianLi] [nvarchar](50) NULL, + [YeZhu] [nvarchar](50) NULL, + [SourceBreakdownId] [nvarchar](50) NULL, + [CheckAcceptType] [char](1) NULL, + CONSTRAINT [PK_WBS_BreakdownProject] PRIMARY KEY CLUSTERED +( + [BreakdownProjectId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[WBS_BreakdownProject] WITH CHECK ADD CONSTRAINT [FK_WBS_BreakdownProject_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[WBS_BreakdownProject] CHECK CONSTRAINT [FK_WBS_BreakdownProject_Base_Project] +GO + +ALTER TABLE [dbo].[WBS_BreakdownProject] WITH CHECK ADD CONSTRAINT [FK_WBS_BreakdownProject_WBS_DivisionProject] FOREIGN KEY([DivisionProjectId]) +REFERENCES [dbo].[WBS_DivisionProject] ([DivisionProjectId]) +GO + +ALTER TABLE [dbo].[WBS_BreakdownProject] CHECK CONSTRAINT [FK_WBS_BreakdownProject_WBS_DivisionProject] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'BreakdownProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'BreakdownCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'BreakdownName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ӦӷֲId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'DivisionProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ִݻ淶' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'Basis' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ҫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'CheckPoints' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¼ʽı' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'RecordAndCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƶȼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'Class' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'SortIndex' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'Remark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'·' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'AttachUrl' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿѡtrue-ѡfalse-δѡ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject', @level2type=N'COLUMN',@level2name=N'IsSelected' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿWBS' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_BreakdownProject' +GO + + + diff --git a/SGGL/BLL/Common/AttachFileService.cs b/SGGL/BLL/Common/AttachFileService.cs index 77260f32..833ee119 100644 --- a/SGGL/BLL/Common/AttachFileService.cs +++ b/SGGL/BLL/Common/AttachFileService.cs @@ -80,6 +80,25 @@ namespace BLL return Funs.DB.AttachFile.FirstOrDefault(e => e.ToKeyId == toKey); } + /// + /// 根据对应主键获取文件信息 + /// + /// 对应主键 + /// 文件信息 + public static string GetBtnFileUrl(object toKey) + { + string fileUrl = string.Empty; + if (toKey != null) + { + Model.AttachFile file = Funs.DB.AttachFile.FirstOrDefault(e => e.ToKeyId == toKey.ToString()); + if (file != null && !string.IsNullOrEmpty(file.AttachUrl)) + { + string url = file.AttachUrl.Replace('\\', '/'); + fileUrl = BLL.UploadAttachmentService.ShowAttachment2("../../", url); + } + } + return fileUrl; + } /// /// /// diff --git a/SGGL/BLL/Common/UploadAttachmentService.cs b/SGGL/BLL/Common/UploadAttachmentService.cs index 530d131c..4266c436 100644 --- a/SGGL/BLL/Common/UploadAttachmentService.cs +++ b/SGGL/BLL/Common/UploadAttachmentService.cs @@ -47,6 +47,43 @@ namespace BLL } #endregion + #region 附件显示不带删除 + /// + /// 附件显示 + /// + public static string ShowAttachment2(string rootPath, string path) + { + string htmlStr = string.Empty; + if (!string.IsNullOrEmpty(path)) + { + htmlStr = ""; + string[] arrStr = path.Split(new string[] { "," }, System.StringSplitOptions.RemoveEmptyEntries); + for (int i = 0; i < arrStr.Length; i++) + { + if (!string.IsNullOrEmpty(arrStr[i])) + { + string[] urlArray = arrStr[i].Split('\\'); + string scanUrl = string.Empty; + for (int j = 0; j < urlArray.Length; j++) + { + scanUrl += urlArray[j] + "|"; + } + + string url = rootPath + arrStr[i].Replace('\\', '/'); + string[] subUrl = url.Split('/'); + string fileName = subUrl[subUrl.Count() - 1]; + string newFileName = fileName.Substring(fileName.IndexOf("_") + 1); + htmlStr += ""; + } + } + + htmlStr += "
" + newFileName + "
"; + } + + return htmlStr; + } + #endregion + #region 附件显示带删除 页面单个附件 /// /// 附件显示 diff --git a/SGGL/FineUIPro.Web/DataShow/Accident.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Accident.aspx.cs index 6acf2f3f..d7867994 100644 --- a/SGGL/FineUIPro.Web/DataShow/Accident.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Accident.aspx.cs @@ -19,7 +19,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs index 278005a8..cc2edb01 100644 --- a/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs @@ -24,7 +24,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs index 596a5978..5eecf62d 100644 --- a/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs @@ -20,7 +20,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格t BindGrid(); diff --git a/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs index dd7d28eb..875af09f 100644 --- a/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs @@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - // btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.cs b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.cs index 551eb391..065d83b0 100644 --- a/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/EduTrain.aspx.cs @@ -19,7 +19,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - // btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs index 9b12f610..11879047 100644 --- a/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Emergency.aspx.cs @@ -20,8 +20,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); - BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); diff --git a/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.cs index 5e316a2e..9b3ab253 100644 --- a/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Environmental.aspx.cs @@ -1,10 +1,8 @@ using BLL; -using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -21,7 +19,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - // btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格t BindGrid(); diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs index ee6edf1c..dd1976be 100644 --- a/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs @@ -1,10 +1,8 @@ using BLL; -using FineUIPro.Web.BaseInfo; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -21,7 +19,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.cs index 1aa484ac..fd1614c7 100644 --- a/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWelder.aspx.cs @@ -20,7 +20,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs index d3445496..713f4bb5 100644 --- a/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs @@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx index e81213c3..3aaf9117 100644 --- a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx @@ -29,6 +29,11 @@ + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs index b82fb4db..68bf82c0 100644 --- a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs @@ -1,12 +1,9 @@ -using Aspose.Words; -using BLL; +using BLL; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.IO; using System.Linq; -using System.Text; namespace FineUIPro.Web.DataShow { @@ -24,7 +21,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t @@ -37,56 +33,36 @@ namespace FineUIPro.Web.DataShow /// private void BindGrid() { - string strSql = @"select NEWID() as ID, v.ProjectId,v.ProjectCode,v.ProjectName,v.allcount,v.ccount,isnull(v.allCount,0)-ISNULL(v.cCount,0) as ucCount, - (case when isnull(v.allCount,0) > 0 then cast((isnull(v.allCount,0)-ISNULL(v.cCount,0)) *1.0 /isnull(v.allCount,0)*100 as decimal(18, 2)) - else 0 end) as rateV - from (select h.ProjectId,p.ProjectCode,p.ProjectName,COUNT(*) as allCount, - isnull((select COUNT(*) from HSSE_Hazard_HazardRegister as c - where c.ProjectId=h.ProjectId and states =3 - and '1' = @cpara - group by c.ProjectId),0) as cCount - from HSSE_Hazard_HazardRegister as h - left join Base_Project as p on h.ProjectId=p.ProjectId - where p.projectId is not null "; + string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1"; List listStr = new List(); string cpara = string.Empty; if (this.drpProject.SelectedValue != Const._Null) { - strSql += " AND h.projectId = @projectId"; ///状态为已完成 + strSql += " AND projectId = @projectId"; ///状态为已完成 listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); - - cpara += " AND c.projectId ="+ this.drpProject.SelectedValue; } - if (!string.IsNullOrEmpty(this.txtStartTime.Text)) - { - strSql += " AND h.RegisterDate >=@StartTime"; - listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + //if (!string.IsNullOrEmpty(this.txtStartTime.Text)) + //{ + // strSql += " AND h.RegisterDate >=@StartTime"; + // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); - cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text; - } - if (!string.IsNullOrEmpty(this.txtEndTime.Text)) - { - strSql += " AND h.RegisterDate <=@EndTime"; - listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + // cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text; + //} + //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + //{ + // strSql += " AND h.RegisterDate <=@EndTime"; + // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + + // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; + //} - cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; - } - if (!string.IsNullOrEmpty(cpara)) - { - listStr.Add(new SqlParameter("@cpara"," '1' And "+ cpara)); - } - else - { - listStr.Add(new SqlParameter("@cpara", "'1'")); - } - strSql += " group by h.ProjectId,p.ProjectCode,p.ProjectName) as v"; SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; - Grid1.DataBind(); + Grid1.DataBind(); } #endregion @@ -177,5 +153,132 @@ namespace FineUIPro.Web.DataShow { EditData(); } + + /// + /// 数量 + /// + /// + /// + protected int Count1(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "4"); + if (datetime1.HasValue) + { + getT = getT.Where(x => x.RegisterDate >= datetime1); + } + if (datetime2.HasValue) + { + getT = getT.Where(x => x.RegisterDate <= datetime2); + } + if (this.rbType.SelectedValue == "0") + { + getT = getT.Where(x => x.HazardValue == "3"); + } + else + { + getT = getT.Where(x => x.HazardValue != "3"); + } + cout1 = getT.Count(); + } + return cout1; + } + + protected int Count2(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States == "3"); + if (datetime1.HasValue) + { + getT = getT.Where(x => x.RegisterDate >= datetime1); + } + if (datetime2.HasValue) + { + getT = getT.Where(x => x.RegisterDate <= datetime2); + } + if (this.rbType.SelectedValue == "0") + { + getT = getT.Where(x => x.HazardValue == "3"); + } + else + { + getT = getT.Where(x => x.HazardValue != "3"); + } + cout1 = getT.Count(); + } + return cout1; + } + + protected int Count3(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getT = Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "3" && x.States != "4"); + if (datetime1.HasValue) + { + getT = getT.Where(x => x.RegisterDate >= datetime1); + } + if (datetime2.HasValue) + { + getT = getT.Where(x => x.RegisterDate <= datetime2); + } + if (this.rbType.SelectedValue == "0") + { + getT = getT.Where(x => x.HazardValue == "3"); + } + else + { + getT = getT.Where(x => x.HazardValue != "3"); + } + cout1 = getT.Count(); + } + return cout1; + } + + protected string Count4(object projectId) + { + string rate=string.Empty; + if (projectId != null) + { + var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text); + var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text); + var getALL= Funs.DB.HSSE_Hazard_HazardRegister.Where(x => x.ProjectId == projectId.ToString() && x.States != "4"); + if (this.rbType.SelectedValue == "0") + { + getALL = getALL.Where(x => x.HazardValue == "3"); + } + else + { + getALL = getALL.Where(x => x.HazardValue != "3"); + } + if (datetime1.HasValue) + { + getALL = getALL.Where(x => x.RegisterDate >= datetime1); + } + if (datetime2.HasValue) + { + getALL = getALL.Where(x => x.RegisterDate >= datetime1); + } + var getT = getALL.Where(x => x.ProjectId == projectId.ToString() && x.States == "3"); + int coutall = getALL.Count(); + int cout0 = getT.Count(); + if (coutall > 0) + { + rate = Math.Round(cout0 * 1.0 / coutall * 100, 2).ToString(); + } + } + return rate; + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.designer.cs index cb8fa00e..1a369f55 100644 --- a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.designer.cs @@ -77,6 +77,15 @@ namespace FineUIPro.Web.DataShow /// protected global::FineUIPro.DatePicker txtStartTime; + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; + /// /// Label3 控件。 /// @@ -113,6 +122,42 @@ namespace FineUIPro.Web.DataShow /// protected global::System.Web.UI.WebControls.Label labNumber; + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx index 0bee361e..17a590d1 100644 --- a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx @@ -32,6 +32,11 @@ + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs index ab53787b..9a1541b5 100644 --- a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs @@ -79,6 +79,16 @@ namespace FineUIPro.Web.DataShow strSql += " AND States LIKE @States"; listStr.Add(new SqlParameter("@States", "%" + this.drpStates.SelectedValue + "%")); } + if (this.rbType.SelectedValue == "0") + { + strSql += " AND HazardValue =@HazardValue"; + } + else + { + strSql += " AND HazardValue != @HazardValue"; + } + listStr.Add(new SqlParameter("@HazardValue", "3")); + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.designer.cs index 2be8e568..5dc49deb 100644 --- a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.designer.cs @@ -95,6 +95,15 @@ namespace FineUIPro.Web.DataShow /// protected global::FineUIPro.DatePicker txtEndTime; + /// + /// rbType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbType; + /// /// drpStates 控件。 /// diff --git a/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs index c680fc8d..3eaef7bc 100644 --- a/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs @@ -25,7 +25,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); LargerHazard = (from x in Funs.DB.Solution_LargerHazard diff --git a/SGGL/FineUIPro.Web/DataShow/License.aspx.cs b/SGGL/FineUIPro.Web/DataShow/License.aspx.cs index d79c411b..e900fb16 100644 --- a/SGGL/FineUIPro.Web/DataShow/License.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/License.aspx.cs @@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - // btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t @@ -37,7 +36,7 @@ namespace FineUIPro.Web.DataShow string strSql = string.Empty; List listStr = new List(); - strSql = @"T V.LicenseManagerId,V.ProjectId,V.ProjectCode,V.ProjectName,V.LicenseTypeName,V.UnitName + strSql = @"SELECT V.LicenseManagerId,V.ProjectId,V.ProjectCode,V.ProjectName,V.LicenseTypeName,V.UnitName ,V.WorkAreaName,V.CompileDate,V.StartDate,V.EndDate,V.LicenseTypeId,V.UnitId,V.LicenseManageContents ,V.CompileMan,V.CompileDate,V.States FROM View_License_LicenseManager AS V diff --git a/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs index 7369b149..04c1f52b 100644 --- a/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Meeting.aspx.cs @@ -24,7 +24,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs index 4f5ad20a..9aa91b0b 100644 --- a/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs @@ -22,7 +22,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格t BindGrid(); diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.cs index a621a1c6..f8c2335c 100644 --- a/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/ProjectDivision.aspx.cs @@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs index abe4758d..1a5d5e65 100644 --- a/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs @@ -20,7 +20,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs index a458d0a1..39868aed 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs @@ -1,10 +1,8 @@ using BLL; -using FineUIPro.Web.BaseInfo; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -21,7 +19,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs index 4fe02965..20f51822 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs @@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs index 9f6846b5..1c7be0de 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs @@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx index 03d44a3d..04465ccf 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx +++ b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx @@ -16,7 +16,7 @@ ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> diff --git a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs index 889cb3e7..d1f3e2a8 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs @@ -20,7 +20,7 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t @@ -38,11 +38,10 @@ namespace FineUIPro.Web.DataShow List listStr = new List(); if (this.rbCom.SelectedValue != "3") { - strSql = @"SELECT Person.CompanyBranchPersonId AS ID,Unit.UnitName, Person.PersonName,case Person.Sex when '1' then '男' else '女' end as SexStr - ,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone,Person.IsOnJob,Person.Remark, '' as ProjectName " - + @" FROM Person_CompanyBranchPerson AS Person " - + @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId " - + @" LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE WorkPost.IsCQMS=1 "; + strSql = @"SELECT Person.PersonId,Unit.UnitName, '' as ProjectName,Person.PersonName,case Person.Sex when '1' then '男' else '女' end as SexStr,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone + FROM Person_Persons AS Person + LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId + LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE 1=1 "; string UnitId =Const.UnitId_SEDIN; if (this.rbCom.SelectedValue == "1") { @@ -50,15 +49,16 @@ namespace FineUIPro.Web.DataShow } else { - strSql += " AND Person.UnitId != @UnitId"; + strSql += " AND Unit.IsBranch =1"; } listStr.Add(new SqlParameter("@UnitId", UnitId)); this.Grid1.Columns[1].Hidden = true; } else { - strSql = @"SELECT Person.PersonId AS ID,Unit.UnitName,Project.ProjectName,Person.PersonName,case Person.Sex when '1' then '男' else '女' end as SexStr,Person.IdentityCard,WorkPost.WorkPostName,Person.Telephone,Person.Remark + strSql = @"SELECT Person.PersonId AS ID,Unit.UnitName,Project.ProjectName,Person.PersonName,case Persons.Sex when '1' then '男' else '女' end as SexStr,Person.IdentityCard,WorkPost.WorkPostName,Persons.Telephone,Person.Remark FROM SitePerson_Person AS Person + LEFT JOIN Person_Persons AS Persons ON Persons.PersonId=Person.PersonId LEFT JOIN Base_Project AS Project ON Project.ProjectId=Person.ProjectId LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE WorkPost.IsCQMS=1 "; diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.cs index 2d5685f4..b131201c 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx.cs @@ -20,7 +20,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.cs index 8a11f4c8..c5fc76c8 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityTraining.aspx.cs @@ -24,7 +24,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx.cs b/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx.cs index b94246ad..bff485ac 100644 --- a/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/SecurityCost.aspx.cs @@ -1,10 +1,8 @@ using BLL; -using Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; namespace FineUIPro.Web.DataShow { @@ -21,7 +19,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - // btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs index ace6f7b4..12248611 100644 --- a/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using FineUIPro.Web.BaseInfo; using System; using System.Collections.Generic; using System.Data; @@ -21,7 +20,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.cs index 9c06345f..535d31ea 100644 --- a/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/SecurityRiskItem.aspx.cs @@ -34,7 +34,7 @@ namespace FineUIPro.Web.DataShow /// private void BindGrid() { - string strSql = @"select Item.HazardSelectedItemId,Item.HazardListId,List.IdentificationDate,List.WorkAreaName,Item.WorkStage,Item.HazardListTypeId + string strSql = @"select Item.HazardId AS HazardSelectedItemId,Item.HazardListId,List.IdentificationDate,List.WorkAreaName,Item.WorkStage,Item.HazardListTypeId , Item.HazardListTypeId,Item.HazardId,Item.HazardItems,Item.DefectsType,Item.MayLeadAccidents ,Item.HelperMethod,Item.HazardJudge_L,Item.HazardJudge_E,Item.HazardJudge_C,Item.HazardJudge_E ,level.RiskLevelName,Item.ControlMeasures @@ -111,7 +111,6 @@ namespace FineUIPro.Web.DataShow } #endregion - #region 转换字符串 /// /// 转换工作阶段 diff --git a/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx.cs b/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx.cs index c232f3c5..edebf72f 100644 --- a/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/WorkingHours.aspx.cs @@ -21,7 +21,6 @@ namespace FineUIPro.Web.DataShow if (!IsPostBack) { Funs.DropDownPageSize(this.ddlPageSize); - btnClose.OnClientClick = ActiveWindow.GetHideReference(); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 2beb7686..a125f1a6 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -13209,7 +13209,7 @@ True 0 / - http://localhost:7022/ + http://localhost:3027/ False False