From cfd069933eec3e80e305228a8b9a7fdac00b2690 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 1 Sep 2023 08:53:55 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=83=85=E5=86=B5=E6=B1=87=E6=80=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_WH_2023-09-01.sql | 153 +++ SGGL/BLL/BLL.csproj | 1 + .../InspectionSummaryService.cs | 58 + SGGL/FineUIPro.Web/ErrLog.txt | 253 ++++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + .../InspectionSummary/InspectionSummary.aspx | 137 +++ .../InspectionSummary.aspx.cs | 1092 +++++++++++++++++ .../InspectionSummary.aspx.designer.cs | 107 ++ SGGL/FineUIPro.Web/index.aspx | 5 + SGGL/FineUIPro.Web/indexProject.aspx | 41 +- SGGL/Model/Model.cs | 386 ++++++ 11 files changed, 2239 insertions(+), 2 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_WH_2023-09-01.sql create mode 100644 SGGL/BLL/ZHGL/InspectionSummary/InspectionSummaryService.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_WH_2023-09-01.sql b/DataBase/版本日志/SGGLDB_WH_2023-09-01.sql new file mode 100644 index 00000000..a3af5ce6 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2023-09-01.sql @@ -0,0 +1,153 @@ +--ܱ +CREATE TABLE [dbo].[Inspection_Summary]( + [InspectionSummaryId] [nvarchar](50) NOT NULL, + [InspectionSummaryMbId] [nvarchar](50) NULL, + [ProjectId] [nvarchar](50) NULL, + [SummeryResult] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [CompileDateMonth] [nvarchar](50) NULL, + CONSTRAINT [PK_Inspection_Summary] PRIMARY KEY CLUSTERED +( + [InspectionSummaryId] 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 + +--ģ +CREATE TABLE [dbo].[Inspection_SummaryMb]( + [InspectionSummaryMbId] [nvarchar](50) NOT NULL, + [SNumber] [nvarchar](50) NULL, + [ModuleName] [nvarchar](50) NULL, + [MenuP] [nvarchar](50) NULL, + [MenuC] [nvarchar](50) NULL, + [SortId] [int] NULL, + CONSTRAINT [PK_Inspection_SummaryMb] PRIMARY KEY CLUSTERED +( + [InspectionSummaryMbId] 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 + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Inspection_Summary', @level2type=N'COLUMN',@level2name=N'InspectionSummaryMbId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Inspection_Summary', @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'Inspection_Summary', @level2type=N'COLUMN',@level2name=N'SummeryResult' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Inspection_Summary', @level2type=N'COLUMN',@level2name=N'CompileDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Inspection_Summary', @level2type=N'COLUMN',@level2name=N'CompileDateMonth' +GO + +--Ӳ˵ĿѲ +delete From sys_menu where menuid='EA413D2A-8D29-4DE2-932D-8511BB7F6CB2' +insert into sys_menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('EA413D2A-8D29-4DE2-932D-8511BB7F6CB2','ĿѲ','ZHGL/InspectionSummary/InspectionSummary.aspx',140, +'0','Menu_ZHGL','1','1','1') + + + + + + + + +--ģ +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'1', N'1.1', N'ȫģ', N'ԱϢ', N'ԱϢ', 1) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'10', N'2.2', N'ģ', N'WBS', N'WBS', 10) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'11', N'2.3', N'ģ', N'ۺϹ', N'豸ϱ', 11) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'12', N'2.3', N'ģ', N'ۺϹ', N'Ա', 12) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'13', N'2.3', N'ģ', N'ۺϹ', N'߱', 13) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'14', N'2.3', N'ģ', N'ۺϹ', N'Ʊ', 14) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'15', N'2.3', N'ģ', N'ۺϹ', N'ʩ', 15) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'16', N'2.3', N'ģ', N'ۺϹ', N'ƽ׹', 16) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'17', N'2.3', N'ģ', N'ۺϹ', N'NCR', 17) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'18', N'2.4', N'ģ', N'', N'ܱ', 18) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'19', N'2.4', N'ģ', N'', N'±', 19) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'2', N'1.1', N'ȫģ', N'ԱϢ', N'ҵԱ', 2) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'20', N'2.5', N'ģ', N'̿ƹ', N'һιϸ', 20) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'21', N'2.5', N'ģ', N'̿ƹ', N'', 21) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'22', N'2.5', N'ģ', N'̿ƹ', N'һιϸϸ', 22) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'23', N'3', N'ؼ', N'ؼ', N'ؼ', 23) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'24', N'4.1', N'ֳ', N'', N'', 24) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'25', N'4.2', N'ֳ', N'ʵƶԽ', N'ʵƶԽ', 25) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'26', N'5', N'Ƶ', N'Ƶ', N'Ƶ', 26) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'27', N'6', N'Ŀ', N'Ŀ', N'Ŀ', 27) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'3', N'1.2', N'ȫģ', N'ȫѲ', N'ȫѲ', 3) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'4', N'1.3', N'ȫģ', N'', N'', 4) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'5', N'1.3', N'ȫģ', N'', N'', 5) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'6', N'1.4', N'ȫģ', N'ҵƱ', N'ҵƱ', 6) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'7', N'1.5', N'ȫģ', N'', N'ʦ־', 7) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'8', N'1.5', N'ȫģ', N'', N'HSE±', 8) +INSERT [dbo].[Inspection_SummaryMb] ([InspectionSummaryMbId], [SNumber], [ModuleName], [MenuP], [MenuC], [SortId]) VALUES (N'9', N'2.1', N'ģ', N'Ѳ', N'Ѳ', 9) +GO + + +--ΪWBS_BreakdownProjectprojectid +CREATE INDEX index_projectid +ON WBS_BreakdownProject (projectid) + +--ΪMeeting_WeekMeeting projectid +CREATE INDEX index_projectid +ON Meeting_WeekMeeting (projectid) + +--ΪMeeting_MonthMeeting projectid +CREATE INDEX index_projectid +ON Meeting_MonthMeeting (projectid) + +--ΪProject_HSEDiary projectid +CREATE INDEX index_projectid +ON Project_HSEDiary (projectid) + +--ΪManager_ManagerWeek projectid +CREATE INDEX index_projectid +ON Manager_ManagerWeek (projectid) + +--ΪCheck_CheckControl projectid +CREATE INDEX index_projectid +ON Check_CheckControl (projectid) + +--ΪComprehensive_InspectionEquipment projectid +CREATE INDEX index_projectid +ON Comprehensive_InspectionEquipment (projectid) + +--ΪComprehensive_InspectionEquipment projectid +CREATE INDEX index_projectid +ON Comprehensive_InspectionPerson (projectid) + +--ΪComprehensive_InspectionMachine projectid +CREATE INDEX index_projectid +ON Comprehensive_InspectionMachine (projectid) + +--ΪComprehensive_DesignChangeOrder projectid +CREATE INDEX index_projectid +ON Comprehensive_DesignChangeOrder (projectid) + +--Ϊʩ projectid +CREATE INDEX index_projectid +ON Comprehensive_GeneralPlanApproval (projectid) + +--ΪComprehensive_DesignDetails projectid +CREATE INDEX index_projectid +ON Comprehensive_DesignDetails (projectid) + +--ΪComprehensive_NCRManagement projectid +CREATE INDEX index_projectid +ON Comprehensive_NCRManagement (projectid) + +--ΪReport_WeekAndMonthReport projectid +CREATE INDEX index_projectid +ON Report_WeekAndMonthReport (projectid) + +--ΪInspection_Summary projectid +CREATE INDEX index_projectid +ON Inspection_Summary (projectid) + +CREATE INDEX index_InspectionSummaryMbId +ON Inspection_Summary (InspectionSummaryMbId) diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 355a0e97..a90535d5 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -808,6 +808,7 @@ + diff --git a/SGGL/BLL/ZHGL/InspectionSummary/InspectionSummaryService.cs b/SGGL/BLL/ZHGL/InspectionSummary/InspectionSummaryService.cs new file mode 100644 index 00000000..4d7144fd --- /dev/null +++ b/SGGL/BLL/ZHGL/InspectionSummary/InspectionSummaryService.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +/// +/// 各项目巡查汇总 +/// +namespace BLL +{ + public class InspectionSummaryService + { + public static Model.SGGLDB db = Funs.DB; + + + /// + /// 批量添加 + /// + /// + public static void AddAll(List list) + { + Model.SGGLDB db = Funs.DB; + db.Inspection_Summary.InsertAllOnSubmit(list); + db.SubmitChanges(); + } + + /// + /// 修改(暂无) + /// + /// + public static void Update(Model.Inspection_Summary model) + { + Model.SGGLDB db = Funs.DB; + Model.Inspection_Summary newmodel = db.Inspection_Summary.FirstOrDefault(e => e.InspectionSummaryId == model.InspectionSummaryId); + if (newmodel != null) + { + + db.SubmitChanges(); + } + } + + /// + /// 根据年月删除 + /// + /// + public static void Delete(string CompileDateMonth) + { + Model.SGGLDB db = Funs.DB; + List list = db.Inspection_Summary.Where(e => e.CompileDateMonth == CompileDateMonth).ToList(); + if (list.Count>0) + { + ///删除编码表记录 + db.Inspection_Summary.DeleteAllOnSubmit(list); + db.SubmitChanges(); + } + } + + } +} diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 4d28f8e3..01866bc0 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -2401,3 +2401,256 @@ 出错时间:08/24/2023 15:20:00 出错时间:08/24/2023 15:20:00 + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:21 +出错时间:08/30/2023 10:54:21 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:21 +出错时间:08/30/2023 10:54:21 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:22 +出错时间:08/30/2023 10:54:22 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:22 +出错时间:08/30/2023 10:54:22 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:22 +出错时间:08/30/2023 10:54:22 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:23 +出错时间:08/30/2023 10:54:23 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:23 +出错时间:08/30/2023 10:54:23 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:23 +出错时间:08/30/2023 10:54:23 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:24 +出错时间:08/30/2023 10:54:24 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:24 +出错时间:08/30/2023 10:54:24 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:24 +出错时间:08/30/2023 10:54:24 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:24 +出错时间:08/30/2023 10:54:24 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:24 +出错时间:08/30/2023 10:54:24 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:24 +出错时间:08/30/2023 10:54:24 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:25 +出错时间:08/30/2023 10:54:25 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:25 +出错时间:08/30/2023 10:54:25 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:25 +出错时间:08/30/2023 10:54:25 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:25 +出错时间:08/30/2023 10:54:25 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:26 +出错时间:08/30/2023 10:54:26 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:26 +出错时间:08/30/2023 10:54:26 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:27 +出错时间:08/30/2023 10:54:27 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:28 +出错时间:08/30/2023 10:54:28 + + +错误信息开始=====> +错误类型:InvalidOperationException +错误信息:不能添加已经存在的实体。 +错误堆栈: + 在 System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity) + 在 System.Data.Linq.Table`1.InsertAllOnSubmit[TSubEntity](IEnumerable`1 entities) + 在 BLL.BOSHENGMonitorService.AddPerson(String projectId, JArray arr, Sys_User user) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\BoSheng\BOSHENGMonitorService.cs:行号 323 +出错时间:08/30/2023 10:54:28 +出错时间:08/30/2023 10:54:28 + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index f3d9a345..4e4b636f 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1859,6 +1859,7 @@ + @@ -16442,6 +16443,13 @@ WorkSummaryReportEdit.aspx + + InspectionSummary.aspx + ASPXCodeBehind + + + InspectionSummary.aspx + ReportRemind.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx new file mode 100644 index 00000000..843ab25c --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx @@ -0,0 +1,137 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InspectionSummary.aspx.cs" Inherits="FineUIPro.Web.ZHGL.InspectionSummary.InspectionSummary" %> + + + + + + + 各项目巡查汇总 + + +
+ + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + --%> + + + + + + + + + <%-- + + + + --%> + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs new file mode 100644 index 00000000..b9cee7c7 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs @@ -0,0 +1,1092 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using System.Web.UI.WebControls; +using BLL; +using Model; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.InspectionSummary +{ + public partial class InspectionSummary : PageBase + { + /// + /// 页面加载 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + } + } + + /// + /// 加载表头 + /// + protected void Page_Init(object sender, EventArgs e) + { + InitGrid(); + } + + #region 加载表头 + private void InitGrid() + { + //根据在建项目获取表头 + var list = Funs.DB.Base_Project.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).OrderBy(x => x.ProjectCode).ToList(); + for (int i = 0; i < list.Count; i++) + { + GroupField p = new GroupField(); + p.Width = Unit.Pixel(200); + p.HeaderText = list[i].ShortName; + p.TextAlign = TextAlign.Left; + //p.HeaderToolTip= list[i]. + + BoundField person = new BoundField(); + person.Width = Unit.Pixel(200); + person.DataField = "ThisProject" + (i + 1).ToString(); + #region 加载施工、安全、质量经理 + var textJl = ""; + var getPUser = Funs.DB.Project_ProjectUser.Where(x => x.ProjectId == list[i].ProjectId); + var getSysUser = Funs.DB.Sys_User; + if (getPUser.Count() > 0) + { + + ///施工经理 + var c = getPUser.FirstOrDefault(x => x.RoleId.Contains(BLL.Const.ConstructionManager)); + if (c != null) + { + textJl += getSysUser.Where(x => x.UserId == c.UserId).FirstOrDefault().UserName + ","; + } + ////安全经理 + var h = getPUser.FirstOrDefault(x => x.RoleId.Contains(BLL.Const.HSSEManager)); + if (h != null) + { + textJl += getSysUser.Where(x => x.UserId == h.UserId).FirstOrDefault().UserName + ","; + } + ////质量经理 + var qa = getPUser.FirstOrDefault(x => x.RoleId.Contains(BLL.Const.QAManager)); + if (qa != null) + { + textJl += getSysUser.Where(x => x.UserId == qa.UserId).FirstOrDefault().UserName; + } + + } + #endregion + person.HeaderText = textJl; + person.DataToolTipField = "CompileDate" + (i + 1).ToString(); + person.ColumnID = "ThisProject" + (i + 1).ToString(); + + p.Columns.Add(person); + + Grid1.Columns.Add(p); + + } + } + #endregion + + /// + /// 判断生成操作 + /// + protected void btnNew_Juge(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.drpCompileDateMonth.Text.Trim())) + { + ShowNotify("日期不能为空。", MessageBoxIcon.Warning); + PageContext.RegisterStartupScript("CloseRefresh()"); + return; + } + //根据日期查询是否有数据 + var modelSum = Funs.DB.Inspection_Summary.Where(x => x.CompileDateMonth == this.drpCompileDateMonth.Text.Trim()).FirstOrDefault(); + //查到数据,二次确认 + if (modelSum != null) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("该日期已生成数据,是否确认重新生成?", String.Empty, MessageBoxIcon.Question, + PageManager1.GetCustomEventReference(false, "Confirmgd_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + PageContext.RegisterStartupScript("CloseRefresh()"); + } + else + { + btnNew_Click(); + } + + } + + /// + /// 确认按钮 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirmgd_OK" || e.EventArgument == "Confirmgy_OK") + { + // 根据日期查询是否有数据 + var modelSum = Funs.DB.Inspection_Summary.Where(x => x.CompileDateMonth == this.drpCompileDateMonth.Text.Trim()).FirstOrDefault(); + //删除数据 + InspectionSummaryService.Delete(modelSum.CompileDateMonth); + BindGrid(); + btnNew_Click(); + } + } + public class ProjectIdAndDate { + public string ProjectId { get; set; } + + public DateTime? Mdate { get; set; } + } + + #region 生成按钮 + protected void btnNew_Click() + { + if (string.IsNullOrEmpty(this.drpCompileDateMonth.Text.Trim())) + { + ShowNotify("日期不能为空。", MessageBoxIcon.Warning); + PageContext.RegisterStartupScript("CloseRefresh()"); + return; + } + + List allList = new List(); + #region 生成操作 + //1.获取项目 + var SummeryResult = "0"; + #region 先一步查询各个表的数据 + + var getPersonLists = (from x in Funs.DB.View_SitePerson_Person + select new + { + x.ProjectId + }).ToList(); + //特种作业人员 + var tzPersonList = (from x in Funs.DB.SitePerson_Person + join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId + where y.PostType == Const.PostType_2 && x.OutTime == null + select new { x.ProjectId, y.PostType }).ToList(); + + //移动端安全巡检 + var list2 = Funs.DB.View_Hazard_HazardRegister.Select(x => new View_Hazard_HazardRegister + { + ProblemTypes = x.ProblemTypes, + ProjectId = x.ProjectId, + CheckTime=x.CheckTime + }).Where(x => x.ProblemTypes == "1").ToList(); + //周例会 + var list3 = Funs.DB.Meeting_WeekMeeting.Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.WeekMeetingDate }).ToList(); + //月例会 + var list4 = Funs.DB.Meeting_MonthMeeting.Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.MonthMeetingDate }).ToList(); + + //作业票 + var list5 = Funs.DB.View_License_LicenseManager + .Select(x => new ProjectIdAndDate { ProjectId = x.ProjectId, Mdate = x.CompileDate }) + .ToList(); + + //工程师日志 + var list6 = (from x in Funs.DB.Manager_HSSELog + where x.IsVisible !=false + select new + { + x.ProjectId, + x.CompileDate, + x.IsVisible + }).ToList(); + //HSE管理月报 + var list7 = Funs.DB.Manager_MonthReportC.Select(x=> new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.Months }).ToList(); + + //质量巡检 + var list8 = Funs.DB.Check_CheckControl.Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.CheckDate }).ToList(); + + //设备材料报验 + var list10 = Funs.DB.Comprehensive_InspectionEquipment.Select + (x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.InspectionDate }).ToList(); + + //人员报验 + var list11 = Funs.DB.Comprehensive_InspectionPerson. + Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.ApprovalTime }).ToList(); + + //机具报验 + var list13 = Funs.DB.Comprehensive_InspectionMachine + .Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.InspectionDate }).ToList(); + + //设计变更管理 + var list14 = Funs.DB.Comprehensive_DesignChangeOrder + .Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.IssuedDate }).ToList(); + + //施工方案管理 + var list15 = Funs.DB.Comprehensive_GeneralPlanApproval + .Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.ApprovalDate }).ToList(); + + //设计交底管理 + var list16 = Funs.DB.Comprehensive_DesignDetails + .Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.DetailsDate }).ToList(); + + //NCR + var list17 = Funs.DB.Comprehensive_NCRManagement + .Select(x=>new ProjectIdAndDate { ProjectId=x.ProjectId, Mdate = x.IssuedDate }).ToList(); + + //质量周报 + var list18 = (from x in Funs.DB.Report_WeekAndMonthReport + where x.ReportType=="1" + select new + { + x.ProjectId, + x.EndDate, + x.ReportType + }).ToList(); + + //质量月报 + var list19 = (from x in Funs.DB.Report_WeekAndMonthReport + where x.ReportType == "2" + select new + { + x.ProjectId, + x.EndDate, + x.ReportType + }).ToList(); + + //一次共检合格数 + var list20 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail + join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId + where y.IsOnceQualified == true + select new { y.ProjectId,y.InspectionDate }).ToList(); + ////总数 + var list21 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail + join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId + + select new { y.ProjectId}).ToList(); + + //关键事项 + var list22 = (from x in Funs.DB.GJSX + select new + { + x.ProjectId, + x.CreateDate + }).ToList(); + + //人脸考勤 + //var list23 = (from x in Funs.DB.T_d_facerecord + // select new { x.ProjectId }).ToList(); + + //实名制是否启用 + var list24 = (from x in Funs.DB.RealName_SynchroSet + join y in Funs.DB.Base_Project on x.ProCode equals y.ProjectCode + select new { y.ProjectId }).ToList(); + + #endregion + List listProjectid = new List(); + var list = (from x in Funs.DB.Base_Project + where x.ProjectState == Const.ProjectState_1 || x.ProjectState == null + orderby x.ProjectCode + select new + { + x.ProjectId, + x.ProjectState, + x.ProjectCode + }).ToList(); + //查询所有的projectid数据 + for (int i = 0; i < list.Count; i++) + { + listProjectid.Add(list[i].ProjectId); + } + //wbs数据查询 + var listWbs = Funs.DB.WBS_BreakdownProject.Select(x => new { ProjectId = x.ProjectId }).ToList(); + + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + + for (int i = 0; i < list.Count; i++) + { + var pid = list[i].ProjectId; + #region 安全模块 + Inspection_Summary model = new Inspection_Summary(); + model.ProjectId = pid; + //显示日期 + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + //人员信息档案 + model.InspectionSummaryMbId = "1"; + model.SummeryResult = getPersonLists.Where(x => x.ProjectId == pid).ToList().Count().ToString(); + allList.Add(model); + + //特种作业人员 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "2"; + model.SummeryResult = tzPersonList.Where(x=>x.ProjectId==pid).Count().ToString(); + allList.Add(model); + + //安全巡检 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "3"; + var AqxjCount = list2.Where(x => x.ProjectId == pid).ToList().Count(); + model.SummeryResult = AqxjCount.ToString(); + //时间 + if (AqxjCount > 0) + { + model.CompileDate = list2.Where(x => x.ProjectId == pid).OrderByDescending(x=>x.CheckTime).FirstOrDefault().CheckTime; + } + + allList.Add(model); + + + //周例会 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDate = DateTime.Now; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "4"; + var ZlhCount = list3.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = ZlhCount.ToString(); + if (ZlhCount > 0) + { + //会议时间 + model.CompileDate = list3.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + allList.Add(model); + + //月例会 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "5"; + var YlhCount = list4.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = YlhCount.ToString(); + if (YlhCount > 0) + { + //会议时间 + model.CompileDate = list4.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + + allList.Add(model); + + //作业票 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "6"; + var ZypCount = list5.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = ZypCount.ToString(); + if (ZypCount>0) + { + //申请时间 + model.CompileDate = list5.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + allList.Add(model); + + //工作报告 + + //工程师日志 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "7"; + var GcsrzCount = list6.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = GcsrzCount.ToString(); + if (GcsrzCount>0) + { + //日志时间 + model.CompileDate = list6.Where(x => x.ProjectId == pid).OrderByDescending(x => x.CompileDate).FirstOrDefault().CompileDate; + } + allList.Add(model); + + //HSE管理月报 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "8"; + var HsseGlybCount = list7.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = HsseGlybCount.ToString(); + if (HsseGlybCount>0) + { + var date = Convert.ToDateTime(list7.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault(). + Mdate); + date = date.AddDays(24); + //月份(显示25号) + model.CompileDate = date; + } + allList.Add(model); + #endregion + + #region 质量模块 + + //质量巡检 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDate = DateTime.Now; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "9"; + var ZlxjCount = list8.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = ZlxjCount.ToString(); + if (ZlxjCount>0) + { + //巡检日期 + model.CompileDate = list8.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + allList.Add(model); + + //WBS数据 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "10"; + model.SummeryResult = listWbs.Where(x => x.ProjectId == pid).ToList().Count.ToString(); + allList.Add(model); + + //综合管理 + //设备材料报验 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "11"; + var SbclByCount = list10.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = SbclByCount.ToString(); + if (SbclByCount>0) + { + //报验日期 + model.CompileDate = list10.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + allList.Add(model); + + //人员报验 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "12"; + var RybyCount = list11.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = RybyCount.ToString(); + if (RybyCount>0) + { + //批准日期 + model.CompileDate = list11.Where(x => x.ProjectId == pid && x.Mdate != null).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + + allList.Add(model); + + //机具报验 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "13"; + var JjbyCount = list13.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = JjbyCount.ToString(); + if (JjbyCount>0) + { + //报验日期 + model.CompileDate = list13.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + allList.Add(model); + + //设计变更单管理 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "14"; + var SjdbgCount = list14.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = SjdbgCount.ToString(); + if (SjdbgCount>0) + { + //下发日期 + model.CompileDate = list14.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + allList.Add(model); + + //施工方案管理 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "15"; + var SgfaCount = list15.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = SgfaCount.ToString(); + if (SgfaCount>0) + { + //审批日期 + model.CompileDate = list15.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + allList.Add(model); + + //设计交底管理 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "16"; + var SjjdCount = list16.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = SjjdCount.ToString(); + if (SjjdCount>0) + { + //交底日期 + model.CompileDate = list16.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + allList.Add(model); + + //NCR + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "17"; + var NcrCount = list17.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = NcrCount.ToString(); + if (NcrCount>0) + { + //下发日期 + model.CompileDate = list17.Where(x => x.ProjectId == pid).OrderByDescending(x => x.Mdate).FirstOrDefault().Mdate; + } + allList.Add(model); + + //质量报表管理 + + //质量周报 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "18"; + var SgzbCount = list18.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = SgzbCount.ToString(); + if (SgzbCount>0) + { + //StartDate,EndDate + model.CompileDate = list18.Where(x => x.ProjectId == pid).OrderByDescending(x => x.EndDate).FirstOrDefault().EndDate; + } + allList.Add(model); + + //质量月报 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "19"; + var SgybCount = list19.Where(x => x.ProjectId == pid).ToList().Count; + model.SummeryResult = SgybCount.ToString(); + if (SgybCount>0) + { + //StartDate,EndDate + model.CompileDate = list19.Where(x => x.ProjectId == pid).OrderByDescending(x => x.EndDate).FirstOrDefault().EndDate; + } + allList.Add(model); + + //过程控制管理 + + //一次共检合格数 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "20"; + var hgs = list20.Where(x=>x.ProjectId==pid).ToList().Count(); + if (hgs>0) + { + //验收日期 + model.CompileDate = list20.Where(x => x.ProjectId == pid).OrderByDescending(x => x.InspectionDate).FirstOrDefault().InspectionDate; + } + model.SummeryResult = hgs.ToString(); + allList.Add(model); + + //总数 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "21"; + var zs = list21.Where(x => x.ProjectId == pid).ToList().Count(); + model.SummeryResult = zs.ToString(); + allList.Add(model); + + //一次共检合格合格率 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "22"; + if (zs > 0) + { + model.SummeryResult = String.Format("{0:N2}", 100 * hgs / zs) + "%"; + } + else + { + model.SummeryResult = "0%"; + } + + allList.Add(model); + + + #endregion + + #region 关键事项 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "23"; + var GjsxCount = list22.Where(x => x.ProjectId == pid).ToList().Count(); + model.SummeryResult = GjsxCount.ToString(); + if (GjsxCount>0) + { + //提出日期 + model.CompileDate = list22.Where(x => x.ProjectId == pid).OrderByDescending(x => x.CreateDate).FirstOrDefault().CreateDate; + } + allList.Add(model); + #endregion + + #region 现场考勤(是否对接) + + //人脸考勤 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "24"; + var Rykq =db.T_d_facerecord.Where(x => x.ProjectId == pid).FirstOrDefault(); + if (Rykq !=null) + { + model.SummeryResult = "已对接"; + } + else { + model.SummeryResult = "未对接"; + } + + allList.Add(model); + + //集团实名制对接 + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "25"; + var Smz = list24.Where(x => x.ProjectId == pid).ToList().Count; + if (Smz > 0) + { + model.SummeryResult = "已对接"; + } + else + { + model.SummeryResult = "未对接"; + } + allList.Add(model); + #endregion + + #region 视频监控(是否对接) + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "26"; + model.SummeryResult = ""; + allList.Add(model); + #endregion + + #region 项目看板(暂时不弄) + model = new Inspection_Summary(); + model.ProjectId = pid; + model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); + model.InspectionSummaryId = Guid.NewGuid().ToString(); + model.InspectionSummaryMbId = "27"; + model.SummeryResult = ""; + allList.Add(model); + #endregion + + + } + } + InspectionSummaryService.AddAll(allList); + #endregion + + + + ShowNotify("生成成功!", MessageBoxIcon.Success); + BindGrid(); + PageContext.RegisterStartupScript("CloseRefresh()"); + } + #endregion + + #region 查询事件 + protected void btnSearch_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.drpCompileDateMonth.Text.Trim())) + { + ShowNotify("日期不能为空。", MessageBoxIcon.Warning); + PageContext.RegisterStartupScript("CloseRefresh()"); + return; + } + + //根据日期来加载 先判断有没有,没有则提示生成。 + var count = Funs.DB.Inspection_Summary.Where(x => x.CompileDateMonth == this.drpCompileDateMonth.Text.Trim()).ToList().Count(); + if (count == 0) + { + BindGrid(); + ShowNotify("当前日期暂无数据,请点击生成。", MessageBoxIcon.Warning); + PageContext.RegisterStartupScript("CloseRefresh()"); + return; + } + BindGrid(); + PageContext.RegisterStartupScript("CloseRefresh()"); + } + #endregion + + #region 加载数据 + private void BindGrid() + { + DataTable table = new DataTable(); + table.Columns.Add(new DataColumn("SNumber", typeof(string))); + table.Columns.Add(new DataColumn("ModuleName", typeof(string))); + table.Columns.Add(new DataColumn("MenuP", typeof(string))); + table.Columns.Add(new DataColumn("MenuC", typeof(string))); + table.Columns.Add(new DataColumn("InspectionSummaryId", typeof(string))); + var list = Funs.DB.Base_Project.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).OrderBy(x => x.ProjectCode).ToList(); + for (int i = 0; i < list.Count; i++) + { + //当前数值的列 + table.Columns.Add(new DataColumn("ThisProject" + (i + 1).ToString(), typeof(string))); + //当前日期的列 + table.Columns.Add(new DataColumn("CompileDate" + (i + 1).ToString(), typeof(string))); + } + + DataRow row; + var SumModels = Funs.DB.Inspection_Summary.Where(x => x.CompileDateMonth == this.drpCompileDateMonth.Text.Trim()).FirstOrDefault(); + if (SumModels == null) + { + table = null; + Grid1.DataSource = table; + Grid1.DataBind(); + return; + } + else { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + //首先获取模板表 + var mbList = db.Inspection_SummaryMb.OrderBy(x => x.SortId).ToList(); + for (int i = 0; i < mbList.Count; i++) + { + row = table.NewRow(); + row[0] = mbList[i].SNumber; + row[1] = mbList[i].ModuleName; + row[2] = mbList[i].MenuP; + row[3] = mbList[i].MenuC; + row[4] = Guid.NewGuid().ToString(); + int indexMb = 5; + //开始获取每列项目的数据 + for (int k = 0; k < list.Count; k++) + { + var SumModel = db.Inspection_Summary.Where(x => x.ProjectId == list[k].ProjectId + && x.InspectionSummaryMbId == mbList[i].InspectionSummaryMbId + && x.CompileDateMonth == this.drpCompileDateMonth.Text.Trim()).FirstOrDefault(); + row[indexMb] = SumModel.SummeryResult; + indexMb += 1; + row[indexMb] = SumModel.CompileDate.ToString().Split(' ')[0].Replace('/','-'); + indexMb += 1; + } + + table.Rows.Add(row); + } + } + } + + Grid1.DataSource = table; + Grid1.DataBind(); + + } + #endregion + + #region 导出excel + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + var FileName = "各项目巡查汇总(" + this.drpCompileDateMonth.Text.Trim() + ")"; + Response.AddHeader("content-disposition", "attachment; filename="+ FileName + ".xls"); + Response.ContentType = "application/vnd.ms-excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + + #endregion + + /// + /// 格式化html + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + + MultiHeaderTable mht = new MultiHeaderTable(); + mht.ResolveMultiHeaderTable(Grid1.Columns); + + + sb.Append(""); + + + sb.Append(""); + + ////列数 + //var rowCount = ""; + //var list = Funs.DB.Base_Project.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).OrderBy(x => x.ProjectCode).ToList(); + //for (int i = 0; i < list.Count; i++) + //{ + // rowCount+="{}" + //} + + 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(""); + int i = 0; + string MenuC = ""; + foreach (GridColumn column in mht.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("spanNumber") as System.Web.UI.HtmlControls.HtmlGenericControl).InnerText; + } + else if (column.ColumnID == "tfGender") + { + html = (row.FindControl("labGender") as AspNet.Label).Text; + } + else if (column.ColumnID == "MenuC") + { + MenuC= html; + } + else if (column.ColumnID == "ThisProject" + (i + 1).ToString()) { + //指定哪些列再做二次加载 + if (MenuC=="安全巡检"|| MenuC == "周例会" || MenuC == "月例会" || MenuC == "作业票" || MenuC == "工程师日志" || MenuC == "HSE管理月报" + || MenuC == "质量巡检"|| MenuC == "设备材料报验" || MenuC == "人员报验" || MenuC == "机具报验" + || MenuC == "设计变更单管理" || MenuC == "施工方案管理"|| MenuC == "设计交底管理" || MenuC == "NCR" || MenuC == "质量周报" + || MenuC == "质量月报" || MenuC == "一次共检合格数" || MenuC == "关键事项") + { + var rq = MidStrEx(html, "\"", "\""); + var num = MidStrEx(html, ">", "<"); + if (!string.IsNullOrEmpty(num)&& num!="0") + { + //某些列需要数量加日期显示 + html = "" + num + "(" + rq + ")"; + } + } + i += 1; + + } + + + + sb.AppendFormat("", html); + + } + + sb.Append(""); + } + + sb.Append("
{0}
"); + + return sb.ToString(); + } + + + public static string MidStrEx(string sourse, string startstr, string endstr) + { + string result = string.Empty; + int startindex, endindex; + try + { + startindex = sourse.IndexOf(startstr); + if (startindex == -1) + return result; + string tmpstr = sourse.Substring(startindex + startstr.Length); + endindex = tmpstr.IndexOf(endstr); + if (endindex == -1) + return result; + result = tmpstr.Remove(endindex); + } + catch (Exception ex) + { + + } + return result; + } + + + #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 + + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.designer.cs new file mode 100644 index 00000000..9ed34d68 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.designer.cs @@ -0,0 +1,107 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.InspectionSummary +{ + + + public partial class InspectionSummary + { + + /// + /// 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; + + /// + /// drpCompileDateMonth 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker drpCompileDateMonth; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// SNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RenderField SNumber; + } +} diff --git a/SGGL/FineUIPro.Web/index.aspx b/SGGL/FineUIPro.Web/index.aspx index 98762575..c85e8801 100644 --- a/SGGL/FineUIPro.Web/index.aspx +++ b/SGGL/FineUIPro.Web/index.aspx @@ -692,6 +692,11 @@ } F.ready(function () { + $(".y_row div").click(function () { + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") + }); + $(".item-s li").click(function () { var $item = $('.f-tabstrip-header') $item.attr('style', ";display:block !important;") diff --git a/SGGL/FineUIPro.Web/indexProject.aspx b/SGGL/FineUIPro.Web/indexProject.aspx index 9f1411db..7f49ac72 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx +++ b/SGGL/FineUIPro.Web/indexProject.aspx @@ -466,65 +466,89 @@ function ProjectTGClick() { F(ProjectTGClientID).click(); + } function ProjectJGClick() { F(ProjectJGClientID).click(); + } function CQMSClick() { parent.removeActiveTab(); F(btnCQMSClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } function HSSEClick() { parent.removeActiveTab(); F(btnHSSEClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } function JDGLClick() { parent.removeActiveTab(); F(btnJDGLClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } function HJGLClick() { parent.removeActiveTab(); F(btnHJGLClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } function CLGLClick() { parent.removeActiveTab(); F(btnCLGLClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } function TestRunClick() { parent.removeActiveTab(); F(btnTestRunClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } function PGJSXClick() { parent.removeActiveTab(); F(btnPGJSXClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } function DigitalSiteClick() { parent.removeActiveTab(); F(btnDigitalSiteClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } function PDigDataClick() { parent.removeActiveTab(); F(btnPDigDataClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } function OpinionClick() { parent.removeActiveTab(); F(btnOpinionClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } function DocClick() { parent.removeActiveTab(); - F(btnDocClientID).click(); + F(btnDocClientID).click(); + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") } // 展开左侧面板 @@ -800,6 +824,15 @@ } F.ready(function () { + $(".y_row div").click(function () { + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") + }); + + $(".up-wrap-ul").click(function () { + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:block !important;") + }); $(".up-wrap-ul").click(function () { var $item = $('.f-tabstrip-header') $item.attr('style', ";display:block !important;") @@ -809,7 +842,11 @@ var $item = $('.f-tabstrip-header') $item.attr('style', ";display:block !important;") }); - + $(".y_title").click(function () { + var $item = $('.f-tabstrip-header') + $item.attr('style', ";display:none !important;") + $(".bgbtn,.bgbtntop").removeClass("activeClick") + }); $(".item-pbig").click(function () { var $item = $('.f-tabstrip-header') $item.attr('style', ";display:none !important;") diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 51b60f25..8cc30120 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1202,6 +1202,12 @@ namespace Model partial void InsertInformationProject_WorkSummaryReport(InformationProject_WorkSummaryReport instance); partial void UpdateInformationProject_WorkSummaryReport(InformationProject_WorkSummaryReport instance); partial void DeleteInformationProject_WorkSummaryReport(InformationProject_WorkSummaryReport instance); + partial void InsertInspection_Summary(Inspection_Summary instance); + partial void UpdateInspection_Summary(Inspection_Summary instance); + partial void DeleteInspection_Summary(Inspection_Summary instance); + partial void InsertInspection_SummaryMb(Inspection_SummaryMb instance); + partial void UpdateInspection_SummaryMb(Inspection_SummaryMb instance); + partial void DeleteInspection_SummaryMb(Inspection_SummaryMb instance); partial void InsertInterFaceLog(InterFaceLog instance); partial void UpdateInterFaceLog(InterFaceLog instance); partial void DeleteInterFaceLog(InterFaceLog instance); @@ -5549,6 +5555,22 @@ namespace Model } } + public System.Data.Linq.Table Inspection_Summary + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Inspection_SummaryMb + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table InterFaceLog { get @@ -197668,6 +197690,370 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Inspection_Summary")] + public partial class Inspection_Summary : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InspectionSummaryId; + + private string _InspectionSummaryMbId; + + private string _ProjectId; + + private string _SummeryResult; + + private System.Nullable _CompileDate; + + private string _CompileDateMonth; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInspectionSummaryIdChanging(string value); + partial void OnInspectionSummaryIdChanged(); + partial void OnInspectionSummaryMbIdChanging(string value); + partial void OnInspectionSummaryMbIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnSummeryResultChanging(string value); + partial void OnSummeryResultChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnCompileDateMonthChanging(string value); + partial void OnCompileDateMonthChanged(); + #endregion + + public Inspection_Summary() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionSummaryId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InspectionSummaryId + { + get + { + return this._InspectionSummaryId; + } + set + { + if ((this._InspectionSummaryId != value)) + { + this.OnInspectionSummaryIdChanging(value); + this.SendPropertyChanging(); + this._InspectionSummaryId = value; + this.SendPropertyChanged("InspectionSummaryId"); + this.OnInspectionSummaryIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionSummaryMbId", DbType="NVarChar(50)")] + public string InspectionSummaryMbId + { + get + { + return this._InspectionSummaryMbId; + } + set + { + if ((this._InspectionSummaryMbId != value)) + { + this.OnInspectionSummaryMbIdChanging(value); + this.SendPropertyChanging(); + this._InspectionSummaryMbId = value; + this.SendPropertyChanged("InspectionSummaryMbId"); + this.OnInspectionSummaryMbIdChanged(); + } + } + } + + [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="_SummeryResult", DbType="NVarChar(50)")] + public string SummeryResult + { + get + { + return this._SummeryResult; + } + set + { + if ((this._SummeryResult != value)) + { + this.OnSummeryResultChanging(value); + this.SendPropertyChanging(); + this._SummeryResult = value; + this.SendPropertyChanged("SummeryResult"); + this.OnSummeryResultChanged(); + } + } + } + + [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="_CompileDateMonth", DbType="NVarChar(50)")] + public string CompileDateMonth + { + get + { + return this._CompileDateMonth; + } + set + { + if ((this._CompileDateMonth != value)) + { + this.OnCompileDateMonthChanging(value); + this.SendPropertyChanging(); + this._CompileDateMonth = value; + this.SendPropertyChanged("CompileDateMonth"); + this.OnCompileDateMonthChanged(); + } + } + } + + 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.Inspection_SummaryMb")] + public partial class Inspection_SummaryMb : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InspectionSummaryMbId; + + private string _SNumber; + + private string _ModuleName; + + private string _MenuP; + + private string _MenuC; + + private System.Nullable _SortId; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInspectionSummaryMbIdChanging(string value); + partial void OnInspectionSummaryMbIdChanged(); + partial void OnSNumberChanging(string value); + partial void OnSNumberChanged(); + partial void OnModuleNameChanging(string value); + partial void OnModuleNameChanged(); + partial void OnMenuPChanging(string value); + partial void OnMenuPChanged(); + partial void OnMenuCChanging(string value); + partial void OnMenuCChanged(); + partial void OnSortIdChanging(System.Nullable value); + partial void OnSortIdChanged(); + #endregion + + public Inspection_SummaryMb() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionSummaryMbId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InspectionSummaryMbId + { + get + { + return this._InspectionSummaryMbId; + } + set + { + if ((this._InspectionSummaryMbId != value)) + { + this.OnInspectionSummaryMbIdChanging(value); + this.SendPropertyChanging(); + this._InspectionSummaryMbId = value; + this.SendPropertyChanged("InspectionSummaryMbId"); + this.OnInspectionSummaryMbIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SNumber", DbType="NVarChar(50)")] + public string SNumber + { + get + { + return this._SNumber; + } + set + { + if ((this._SNumber != value)) + { + this.OnSNumberChanging(value); + this.SendPropertyChanging(); + this._SNumber = value; + this.SendPropertyChanged("SNumber"); + this.OnSNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ModuleName", DbType="NVarChar(50)")] + public string ModuleName + { + get + { + return this._ModuleName; + } + set + { + if ((this._ModuleName != value)) + { + this.OnModuleNameChanging(value); + this.SendPropertyChanging(); + this._ModuleName = value; + this.SendPropertyChanged("ModuleName"); + this.OnModuleNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MenuP", DbType="NVarChar(50)")] + public string MenuP + { + get + { + return this._MenuP; + } + set + { + if ((this._MenuP != value)) + { + this.OnMenuPChanging(value); + this.SendPropertyChanging(); + this._MenuP = value; + this.SendPropertyChanged("MenuP"); + this.OnMenuPChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MenuC", DbType="NVarChar(50)")] + public string MenuC + { + get + { + return this._MenuC; + } + set + { + if ((this._MenuC != value)) + { + this.OnMenuCChanging(value); + this.SendPropertyChanging(); + this._MenuC = value; + this.SendPropertyChanged("MenuC"); + this.OnMenuCChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortId", DbType="Int")] + public System.Nullable SortId + { + get + { + return this._SortId; + } + set + { + if ((this._SortId != value)) + { + this.OnSortIdChanging(value); + this.SendPropertyChanging(); + this._SortId = value; + this.SendPropertyChanged("SortId"); + this.OnSortIdChanged(); + } + } + } + + 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.InterFaceLog")] public partial class InterFaceLog : INotifyPropertyChanging, INotifyPropertyChanged { From 9305995a9e28e491f203d9aed744b1a4670c375a Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 1 Sep 2023 17:11:53 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=B1=E6=A3=80?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProcessControl/InspectionManagementStatistics.aspx.cs | 4 ++-- .../ZHGL/InspectionSummary/InspectionSummary.aspx.cs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs index 71bfdb56..681a183f 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs @@ -72,9 +72,9 @@ namespace FineUIPro.Web.CQMS.ProcessControl { NextDate = Convert.ToDateTime(StartDate.Year + "-" + StartDate.Month + "-25"); //统计所给事件段的全部数量 - List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false); + List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, false); //统计所给事件段的合格数量 - List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true); + List managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true); Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NextDate); Statistics.SunNumber = managementListSunNumber.Count(); diff --git a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs index b9cee7c7..d61a384c 100644 --- a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs @@ -249,13 +249,13 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary //一次共检合格数 var list20 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId - where y.IsOnceQualified == true - select new { y.ProjectId,y.InspectionDate }).ToList(); + where y.IsOnceQualified == true && y.InspectionDate != null + select new { y.ProjectId,y.InspectionDate,y.IsOnceQualified,x.InspectionId, Isid= y.InspectionId }).ToList(); ////总数 var list21 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId - - select new { y.ProjectId}).ToList(); + where y.InspectionDate != null + select new { y.ProjectId, x.InspectionId, Isid = y.InspectionId,y.InspectionDate }).ToList(); //关键事项 var list22 = (from x in Funs.DB.GJSX From a9148f6d78848da978a2983c3fb70a923ce2c828 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Sat, 2 Sep 2023 10:13:35 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ject_HSSEData_HiddenDangerDetailService.cs | 8 ++-- .../DataSync/CNCECServerController.cs | 38 ++++++++++++++----- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs index 7df3c5e8..69323e9f 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs @@ -114,9 +114,11 @@ namespace BLL } public static void AddBulkProject_HSSEData_HiddenDangerDetails(List newtables) { - - db.Project_HSSEData_HiddenDangerDetail.InsertAllOnSubmit(newtables); - db.SubmitChanges(); + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + db.Project_HSSEData_HiddenDangerDetail.InsertAllOnSubmit(newtables); + db.SubmitChanges(); + } } public static void UpdateProject_HSSEData_HiddenDangerDetail(Model.Project_HSSEData_HiddenDangerDetail newtable) { diff --git a/SGGL/WebAPI/Controllers/DataSync/CNCECServerController.cs b/SGGL/WebAPI/Controllers/DataSync/CNCECServerController.cs index 5d467e30..4877d790 100644 --- a/SGGL/WebAPI/Controllers/DataSync/CNCECServerController.cs +++ b/SGGL/WebAPI/Controllers/DataSync/CNCECServerController.cs @@ -122,19 +122,37 @@ namespace WebAPI.Controllers public Model.ReturnData PostGetHSSEData() { var returnData = new Model.ReturnData(); - returnData.type = "HSSE"; - returnData.time = DateTime.Now.ToString(); - ServerService.GetToken(); - returnData.token = BLL.SysConstSetService.CNCECToken; - returnData.expiryTime = BLL.SysConstSetService.CNCECTTokenExTime; - if (!string.IsNullOrEmpty(returnData.token) && !string.IsNullOrEmpty(returnData.expiryTime) && DateTime.Parse(returnData.expiryTime) > DateTime.Now) + try { - returnData.data = HSSEData_HSSEService.GetTodayHSSEData_HSSE(); + returnData.type = "HSSE"; + returnData.time = DateTime.Now.ToString(); + ServerService.GetToken(); + returnData.token = BLL.SysConstSetService.CNCECToken; + returnData.expiryTime = BLL.SysConstSetService.CNCECTTokenExTime; + if (!string.IsNullOrEmpty(returnData.token) && !string.IsNullOrEmpty(returnData.expiryTime) && DateTime.Parse(returnData.expiryTime) > DateTime.Now) + { + returnData.data = HSSEData_HSSEService.GetTodayHSSEData_HSSE(); + } + else + { + returnData.code = 500; + returnData.message = "token失效"; + } } - else + catch (Exception ex) { - returnData.code = 500; - returnData.message = "token失效"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Sys_Log syslog = new Model.Sys_Log + { + LogId = SQLHelper.GetNewID(), + OperationTime = DateTime.Now, + OperationLog = ex.Message, + LogSource = 1, + }; + db.Sys_Log.InsertOnSubmit(syslog); + db.SubmitChanges(); + } } return returnData; } From 02e97963236383d80e698bd18733a9a06581439d Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 4 Sep 2023 16:20:02 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E6=A0=A1=E6=AD=A3=E4=BA=BA=E5=B7=A5?= =?UTF-8?q?=E6=97=B6=E5=8F=8A=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_WH_2023-09-04.sql | 2 + SGGL/BLL/OpenService/GetDataService.cs | 4 +- .../InspectionSummary/InspectionSummary.aspx | 8 +- .../InspectionSummary.aspx.cs | 9 +- SGGL/FineUIPro.Web/common/mainProject2.aspx | 74 ++++++- .../FineUIPro.Web/common/mainProject2.aspx.cs | 181 ++++++++++++------ .../common/mainProject2.aspx.designer.cs | 36 ++++ 7 files changed, 243 insertions(+), 71 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_WH_2023-09-04.sql diff --git a/DataBase/版本日志/SGGLDB_WH_2023-09-04.sql b/DataBase/版本日志/SGGLDB_WH_2023-09-04.sql new file mode 100644 index 00000000..2e4f4386 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2023-09-04.sql @@ -0,0 +1,2 @@ +update Inspection_SummaryMb set MenuP='WBSü',MenuC='WBSü' WHERE MenuP='WBS' +GO \ No newline at end of file diff --git a/SGGL/BLL/OpenService/GetDataService.cs b/SGGL/BLL/OpenService/GetDataService.cs index 30dd7df6..6f33075f 100644 --- a/SGGL/BLL/OpenService/GetDataService.cs +++ b/SGGL/BLL/OpenService/GetDataService.cs @@ -272,8 +272,8 @@ namespace BLL { try { - DateTime dateS = DateTime.Now.AddMonths(-6); - dateS = Funs.GetNewDateTimeOrNow(DateTime.Now.AddMonths(-6).Year + "-" + DateTime.Now.AddMonths(-6).Month + "-01"); + DateTime dateS = DateTime.Now.AddMonths(-12); + dateS = Funs.GetNewDateTimeOrNow(DateTime.Now.AddMonths(-12).Year + "-" + DateTime.Now.AddMonths(-12).Month + "-01"); var getNums = from x in db.SitePerson_PersonInOutNumber where x.ProjectId == projectId && x.InOutDate >= dateS orderby x.InOutDate diff --git a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx index 843ab25c..89e06a9f 100644 --- a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx @@ -18,7 +18,7 @@ ClicksToEdit="2" DataIDField="InspectionSummaryId" AllowSorting="true" SortField="SortId" SortDirection="DESC" EnableColumnLines="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10" IsFluid="true" - EnableRowDoubleClickEvent="true"> + EnableRowDoubleClickEvent="true" AllowColumnLocking="true"> @@ -49,14 +49,14 @@ + FieldType="String" HeaderText="序号" TextAlign="Left" HeaderTextAlign="Center" ID="SNumber" ShowToolTip="true" Locked="true"> + FieldType="String" HeaderText="模块" TextAlign="Left" HeaderTextAlign="Center" Locked="true"> - + diff --git a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs index d61a384c..93fa7ba8 100644 --- a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs @@ -443,7 +443,14 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary model.CompileDateMonth = this.drpCompileDateMonth.Text.Trim(); model.InspectionSummaryId = Guid.NewGuid().ToString(); model.InspectionSummaryMbId = "10"; - model.SummeryResult = listWbs.Where(x => x.ProjectId == pid).ToList().Count.ToString(); + var WbsCount = listWbs.Where(x => x.ProjectId == pid).ToList().Count; + if (WbsCount > 0) + { + model.SummeryResult = "已裁剪"; + } + else { + model.SummeryResult = "未裁剪"; + } allList.Add(model); //综合管理 diff --git a/SGGL/FineUIPro.Web/common/mainProject2.aspx b/SGGL/FineUIPro.Web/common/mainProject2.aspx index 48d4a4bc..9043f130 100644 --- a/SGGL/FineUIPro.Web/common/mainProject2.aspx +++ b/SGGL/FineUIPro.Web/common/mainProject2.aspx @@ -19,6 +19,35 @@ body.f-body { padding: 0px; } + + /*头部按钮样式*/ + .bgbtn_dbsx{ + display: inline-block; + position: absolute; + width: 5%; + height: 4%; + left: 79%; + top: 51px; + background: green !important; + border: none !important; + padding: 0 !important; + } + + .bgbtn_gjsx{ + display: inline-block; + position: absolute; + width: 5%; + height: 4%; + left: 72%; + top: 51px; + background: red !important; + border: none !important; + padding: 0 !important; + } + .div_border { + border: 1px solid #00FFFF; + } +
@@ -253,15 +282,15 @@
工作台面
-
+
关键事项
0
-
+
待办事项
0
-
+
个人流程
0
@@ -270,8 +299,12 @@
0
-
- + + +
+
@@ -341,7 +374,7 @@
- + @@ -358,6 +391,7 @@ diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialEdit.aspx.cs index 98fe0a1d..94442632 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialEdit.aspx.cs @@ -119,6 +119,9 @@ namespace FineUIPro.Web.HSSE.Check { "UnitName", "" }, { "Unqualified", "" }, { "CheckItemName", "" }, + //增加检查项内容和日期 + { "CheckItemSetContent", "" }, + { "Rectification_Date", "" }, { "CompleteStatusName", "" }, { "HandleStepStr", "" }, { "HiddenHazardTypeName", "" }, @@ -309,7 +312,9 @@ namespace FineUIPro.Web.HSSE.Check CheckSpecialId = this.CheckSpecialId, CheckContent = values.Value("CheckItemName"), Unqualified = values.Value("Unqualified"), - // WorkArea = values.Value("WorkArea"), + CheckItemSetContent = values.Value("CheckItemSetContent"), + Rectification_Date= values.Value("Rectification_Date"), + // WorkArea = values.Value("WorkArea"), }; var getUnit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitName == values.Value("UnitName")); if (getUnit != null) @@ -372,7 +377,14 @@ namespace FineUIPro.Web.HSSE.Check if (getCheckItem != null) { newDetail.CheckItem = getCheckItem.CheckItemSetId; + //插入检查项内容id + var getCheckItemSet = Funs.DB.Technique_CheckItemDetail.FirstOrDefault(x => x.CheckItemSetId == getCheckItem.CheckItemSetId && x.CheckContent == newDetail.CheckItemSetContent); + if (getCheckItemSet != null) + { + newDetail.CheckItemSetId = getCheckItemSet.CheckItemDetailId; + } } + newDetail.SortIndex = rowIndex; Check_CheckSpecialDetailService.AddCheckSpecialDetail(newDetail); detailLists.Add(newDetail); @@ -472,6 +484,9 @@ namespace FineUIPro.Web.HSSE.Check { this.drpSupCheckItemSet.Items.Clear(); this.drpCheckItem.Items.Clear(); + + //检查项内容清空 + this.drpCheckItemDetail.Items.Clear(); if (this.rbType.SelectedValue == "1") { this.drpSupCheckItemSet.SelectedIndex = 0; @@ -484,14 +499,36 @@ namespace FineUIPro.Web.HSSE.Check Technique_CheckItemSetService.InitCheckItemSetDropDownList(this.drpSupCheckItemSet, "2", "0", false); this.drpSupCheckItemSet.SelectedIndex = 0; Technique_CheckItemSetService.InitCheckItemSetNameDropDownList(this.drpCheckItem, "2", this.drpSupCheckItemSet.SelectedValue, false); + //加载检查项内容下拉 + var getCheckItem = Funs.DB.Technique_CheckItemSet.FirstOrDefault(x => x.SupCheckItem == this.drpSupCheckItemSet.SelectedValue && x.CheckItemName == this.drpCheckItem.SelectedValue); + var checkItemSetId = getCheckItem.CheckItemSetId; + Technique_CheckItemDetailService.InitCheckItemDetailDropDownList(this.drpCheckItemDetail, checkItemSetId, false); } this.drpCheckItem.SelectedValue = null; + this.drpCheckItemDetail.SelectedValue = null; } protected void drpCheckItem_SelectedIndexChanged(object sender, EventArgs e) { + this.drpCheckItemDetail.Items.Clear(); this.drpCheckItem.SelectedValueArray = Funs.RemoveDropDownListNull(this.drpCheckItem.SelectedValueArray); + + if (!string.IsNullOrEmpty(this.drpCheckItem.SelectedValue)) + { + //加载检查项内容下拉 + var getCheckItem = Funs.DB.Technique_CheckItemSet. + FirstOrDefault(x => x.SupCheckItem == this.drpSupCheckItemSet.SelectedValue && x.CheckItemName == this.drpCheckItem.SelectedValue); + var checkItemSetId = getCheckItem.CheckItemSetId; + Technique_CheckItemDetailService.InitCheckItemDetailDropDownList(this.drpCheckItemDetail, checkItemSetId, false); + } + + + } + + protected void drpCheckItemDetail_SelectedIndexChanged(object sender, EventArgs e) + { + this.drpCheckItemDetail.SelectedValueArray = Funs.RemoveDropDownListNull(this.drpCheckItemDetail.SelectedValueArray); } protected void Grid1_Sort(object sender, GridSortEventArgs e) diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialEdit.aspx.designer.cs index 77212111..f6fbfa18 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.Check { - - - public partial class CheckSpecialEdit { - +namespace FineUIPro.Web.HSSE.Check +{ + + + public partial class CheckSpecialEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtCheckSpecialCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCheckSpecialCode; - + /// /// rbType 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rbType; - + /// /// drpSupCheckItemSet 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpSupCheckItemSet; - + /// /// txtCheckDate 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtCheckDate; - + /// /// drpPartInPersons 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpPartInPersons; - + /// /// txtPartInPersonNames 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtPartInPersonNames; - + /// /// btnNew 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// Grid1 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// drpCheckArea 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCheckArea; - + /// /// drpWorkUnit 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpWorkUnit; - + /// /// txtUnqualified 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtUnqualified; - + /// /// drpCheckItem 控件。 /// @@ -146,7 +148,25 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCheckItem; - + + /// + /// drpCheckItemDetail 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckItemDetail; + + /// + /// txtRectification_Date 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtRectification_Date; + /// /// drpCompleteStatus 控件。 /// @@ -155,7 +175,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCompleteStatus; - + /// /// drpHandleStep 控件。 /// @@ -164,7 +184,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpHandleStep; - + /// /// drpHiddenHazardType 控件。 /// @@ -173,7 +193,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpHiddenHazardType; - + /// /// Toolbar1 控件。 /// @@ -182,7 +202,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// lbTemp 控件。 /// @@ -191,7 +211,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbTemp; - + /// /// btnAttachUrl 控件。 /// @@ -200,7 +220,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttachUrl; - + /// /// ToolbarFill1 控件。 /// @@ -209,7 +229,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnSave 控件。 /// @@ -218,7 +238,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnSubmit 控件。 /// @@ -227,7 +247,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSubmit; - + /// /// btnClose 控件。 /// @@ -236,7 +256,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx index 0dd73116..3e87226e 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx @@ -57,11 +57,18 @@ FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="受检单位"> + FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="问题描述" > + + + + + diff --git a/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs b/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs index b324df7f..707b91df 100644 --- a/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs +++ b/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs @@ -187,5 +187,21 @@ namespace Model get; set; } + + /// + /// 检查要点Id + /// + public string CheckItemDetailSetId { get; set; } + + /// + /// 检查要点内容 + /// + public string CheckItemDetailContent { get; set; } + + /// + /// 整改期限 + /// + public DateTime? Rectification_Date { get; set; } + } } diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 8cc30120..8b23f937 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -59949,6 +59949,12 @@ namespace Model private string _HiddenHazardType; + private string _CheckItemSetId; + + private string _CheckItemSetContent; + + private System.Nullable _Rectification_Date; + private EntityRef _Base_Unit; private EntityRef _WBS_UnitWork; @@ -59995,6 +60001,12 @@ namespace Model partial void OnSortIndexChanged(); partial void OnHiddenHazardTypeChanging(string value); partial void OnHiddenHazardTypeChanged(); + partial void OnCheckItemSetIdChanging(string value); + partial void OnCheckItemSetIdChanged(); + partial void OnCheckItemSetContentChanging(string value); + partial void OnCheckItemSetContentChanged(); + partial void OnRectification_DateChanging(System.Nullable value); + partial void OnRectification_DateChanged(); #endregion public Check_CheckSpecialDetail() @@ -60392,6 +60404,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckItemSetId", DbType="NVarChar(50)")] + public string CheckItemSetId + { + get + { + return this._CheckItemSetId; + } + set + { + if ((this._CheckItemSetId != value)) + { + this.OnCheckItemSetIdChanging(value); + this.SendPropertyChanging(); + this._CheckItemSetId = value; + this.SendPropertyChanged("CheckItemSetId"); + this.OnCheckItemSetIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckItemSetContent", DbType="NVarChar(3000)")] + public string CheckItemSetContent + { + get + { + return this._CheckItemSetContent; + } + set + { + if ((this._CheckItemSetContent != value)) + { + this.OnCheckItemSetContentChanging(value); + this.SendPropertyChanging(); + this._CheckItemSetContent = value; + this.SendPropertyChanged("CheckItemSetContent"); + this.OnCheckItemSetContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification_Date", DbType="DateTime")] + public System.Nullable Rectification_Date + { + get + { + return this._Rectification_Date; + } + set + { + if ((this._Rectification_Date != value)) + { + this.OnRectification_DateChanging(value); + this.SendPropertyChanging(); + this._Rectification_Date = value; + this.SendPropertyChanged("Rectification_Date"); + this.OnRectification_DateChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecialDetail_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] public Base_Unit Base_Unit { @@ -360876,6 +360948,12 @@ namespace Model private string _HiddenHazardTypeName; + private string _CheckItemSetId; + + private string _CheckItemSetContent; + + private System.Nullable _Rectification_Date; + public View_CheckSpecialDetail() { } @@ -361231,6 +361309,54 @@ namespace Model } } } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckItemSetId", DbType="NVarChar(50)")] + public string CheckItemSetId + { + get + { + return this._CheckItemSetId; + } + set + { + if ((this._CheckItemSetId != value)) + { + this._CheckItemSetId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckItemSetContent", DbType="NVarChar(3000)")] + public string CheckItemSetContent + { + get + { + return this._CheckItemSetContent; + } + set + { + if ((this._CheckItemSetContent != value)) + { + this._CheckItemSetContent = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification_Date", DbType="DateTime")] + public System.Nullable Rectification_Date + { + get + { + return this._Rectification_Date; + } + set + { + if ((this._Rectification_Date != value)) + { + this._Rectification_Date = value; + } + } + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Comprehensive_InspectionEquipment")] diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index 6f0be619..c8a5f5f8 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -51,7 +51,7 @@ - ..\FineUIPro.Web\bin\Aspose.Words.dll + ..\FineUIPro\Reference BLL\Aspose.Words.dll From 6d2127484f91b644e97a79d78e9afd32c087b938 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Wed, 6 Sep 2023 09:31:03 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=93=E9=A1=B9?= =?UTF-8?q?=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/API/HSSE/APICheckSpecialService.cs | 4 + .../DataStatistics/DataStatisticsService.cs | 137 ++++++++-- .../HSSE/Check/RectifyNoticesStatistics.aspx | 64 +++-- .../Check/RectifyNoticesStatistics.aspx.cs | 249 +++++++++++++++++- SGGL/Model/APIItem/HSSE/RecityNoticesItem.cs | 156 +++++++++++ SGGL/Model/Model.csproj | 1 + 6 files changed, 566 insertions(+), 45 deletions(-) create mode 100644 SGGL/Model/APIItem/HSSE/RecityNoticesItem.cs diff --git a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs index 76ddef25..7a6318bf 100644 --- a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs +++ b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs @@ -234,6 +234,10 @@ namespace BLL CompleteStatusName = x.CompleteStatus == true ? "已整改" : "待整改", CompletedDate = string.Format("{0:yyyy-MM-dd}", x.CompletedDate), AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialDetailId, null), + + CheckItemDetailSetId = x.CheckItemSetId, + CheckItemDetailContent = x.CheckItemSetContent, + Rectification_Date = x.Rectification_Date }; return getInfo.ToList(); } diff --git a/SGGL/BLL/ZHGL/DataStatistics/DataStatisticsService.cs b/SGGL/BLL/ZHGL/DataStatistics/DataStatisticsService.cs index e84bceac..ee85ae92 100644 --- a/SGGL/BLL/ZHGL/DataStatistics/DataStatisticsService.cs +++ b/SGGL/BLL/ZHGL/DataStatistics/DataStatisticsService.cs @@ -72,9 +72,9 @@ namespace BLL /// /// /// - public static List RectifyNoticesStatistics(string projectId, string unitId, DateTime? startTime, DateTime? endTime) + public static List RectifyNoticesStatistics(string projectId, string unitId, DateTime? startTime, DateTime? endTime) { - List GetCheckStatistics = new List(); + List GetCheckStatistics = new List(); var getProjects = ProjectService.GetProjectWorkList(); if (projectId != Const._Null && !string.IsNullOrEmpty(projectId)) { @@ -89,38 +89,127 @@ namespace BLL } foreach (var item in getUnits) { - var getHazardRegister = from x in Funs.DB.Check_RectifyNotices - where x.ProjectId == pitem.ProjectId && x.UnitId == item.UnitId - && x.States != "0" - select x; - if (startTime.HasValue) - { - getHazardRegister = getHazardRegister.Where(x => x.CheckedDate >= startTime); - } - if (endTime.HasValue) - { - getHazardRegister = getHazardRegister.Where(x => x.CheckedDate <= endTime); - } - Model.ChartAnalysisItem newItem = new Model.ChartAnalysisItem + + Model.RecityNoticesItem newItem = new Model.RecityNoticesItem { DataId = SQLHelper.GetNewID(), DataAllName = pitem.ProjectName, DataName = item.UnitName, }; - newItem.DataSumCount = getHazardRegister.Count(); - newItem.DataCount1 = getHazardRegister.Where(x => x.States == "1").Count(); - newItem.DataCount2 = getHazardRegister.Where(x => x.States == "2").Count(); - newItem.DataCount3 = getHazardRegister.Where(x => x.States == "3").Count(); - newItem.DataCount4 = getHazardRegister.Where(x => x.States == "4").Count(); - newItem.DataCount5 = getHazardRegister.Where(x => x.States == "5").Count(); - if (newItem.DataCount2 > 0) + //安全巡检隐患数 + var getHazardRegister = from x in Funs.DB.View_Hazard_HazardRegister + where x.ProblemTypes == "1" && x.ProjectId == pitem.ProjectId && x.ResponsibleUnit == item.UnitId + select x; + if (startTime.HasValue) { - newItem.DataCountRate = (float)newItem.DataCount5 / (float)newItem.DataCount2 * 100; + getHazardRegister = getHazardRegister.Where(x => x.CheckTime >= startTime); + } + if (endTime.HasValue) + { + getHazardRegister = getHazardRegister.Where(x => x.CheckTime <= endTime); + } + newItem.DataSumCount1 = getHazardRegister.Where(x=>x.Type==0).Count(); + newItem.DataSumCountYzg1 = getHazardRegister.Where(x => x.Type == 0 && x.States == "2").Count(); + newItem.DataSumCountDzg1 = getHazardRegister.Where(x => x.Type == 0 && x.States == "1").Count(); + if (newItem.DataSumCountYzg1 > 0) + { + newItem.DataSumCountZgl1 =Math.Round((float)newItem.DataSumCountYzg1 / (float)newItem.DataSumCount1 * 100,2).ToString()+"%"; } else { - newItem.DataCountRate = 0; + newItem.DataSumCountZgl1 ="0%"; } + + + //常规巡检隐患数 + newItem.DataSumCount2 = getHazardRegister.Where(x => x.Type == 1).Count(); + newItem.DataSumCountYzg2 = getHazardRegister.Where(x => x.Type == 1 && x.States == "2").Count(); + newItem.DataSumCountDzg2 = getHazardRegister.Where(x => x.Type == 1 && x.States == "1").Count(); + if (newItem.DataSumCountYzg2 > 0) + { + newItem.DataSumCountZgl2 = Math.Round((float)newItem.DataSumCountYzg2 / (float)newItem.DataSumCount2 * 100, 2).ToString() + "%"; + } + else + { + newItem.DataSumCountZgl2 = "0%"; + } + + //专项检查隐患数 + var getCheckSpecial = from x in Funs.DB.Check_CheckSpecialDetail + join y in Funs.DB.Check_CheckSpecial on x.CheckSpecialId equals y.CheckSpecialId + where x.UnitId == item.UnitId && y.ProjectId == pitem.ProjectId + select new { y.CheckTime,x.UnitId,y.ProjectId,x.CompleteStatus }; + if (startTime.HasValue) + { + getCheckSpecial = getCheckSpecial.Where(x => x.CheckTime >= startTime); + } + if (endTime.HasValue) + { + getCheckSpecial = getCheckSpecial.Where(x => x.CheckTime <= endTime); + } + newItem.DataSumCount3= getCheckSpecial.Count(); + newItem.DataSumCountYzg3 = getCheckSpecial.Where(x =>x.CompleteStatus == true).Count(); + newItem.DataSumCountDzg3 = getCheckSpecial.Where(x =>x.CompleteStatus == false).Count(); + if (newItem.DataSumCountYzg3 > 0) + { + newItem.DataSumCountZgl3 =Math.Round((float)newItem.DataSumCountYzg3 / (float)newItem.DataSumCount3 * 100, 2).ToString() + "%"; ; + } + else + { + newItem.DataSumCountZgl3 = "0%"; + } + + //综合检查隐患数 + var getCheckColligation = from x in Funs.DB.Check_CheckColligationDetail + join y in Funs.DB.Check_CheckColligation on x.CheckColligationId equals y.CheckColligationId + where x.UnitId == item.UnitId && y.ProjectId == pitem.ProjectId + select new { y.CheckTime, x.UnitId, y.ProjectId, x.CompleteStatus }; + if (startTime.HasValue) + { + getCheckColligation = getCheckColligation.Where(x => x.CheckTime >= startTime); + } + if (endTime.HasValue) + { + getCheckColligation = getCheckColligation.Where(x => x.CheckTime <= endTime); + } + newItem.DataSumCount4 = getCheckColligation.Count(); + newItem.DataSumCountYzg4 = getCheckColligation.Where(x => x.CompleteStatus == true).Count(); + newItem.DataSumCountDzg4 = getCheckColligation.Where(x => x.CompleteStatus == false).Count(); + if (newItem.DataSumCountYzg4 > 0) + { + newItem.DataSumCountZgl4 = Math.Round((float)newItem.DataSumCountYzg4 / (float)newItem.DataSumCount4 * 100, 2).ToString(); + } + else + { + newItem.DataSumCountZgl4 = "0%"; + } + + //var getHazardRegister = from x in Funs.DB.Check_RectifyNotices + // where x.ProjectId == pitem.ProjectId && x.UnitId == item.UnitId + // && x.States != "0" + // select x; + //if (startTime.HasValue) + //{ + // getHazardRegister = getHazardRegister.Where(x => x.CheckedDate >= startTime); + //} + //if (endTime.HasValue) + //{ + // getHazardRegister = getHazardRegister.Where(x => x.CheckedDate <= endTime); + //} + //newItem.DataSumCount = getHazardRegister.Count(); + //newItem.DataCount1 = getHazardRegister.Where(x => x.States == "1").Count(); + //newItem.DataCount2 = getHazardRegister.Where(x => x.States == "2").Count(); + //newItem.DataCount3 = getHazardRegister.Where(x => x.States == "3").Count(); + //newItem.DataCount4 = getHazardRegister.Where(x => x.States == "4").Count(); + //newItem.DataCount5 = getHazardRegister.Where(x => x.States == "5").Count(); + //if (newItem.DataCount2 > 0) + //{ + // newItem.DataCountRate = (float)newItem.DataCount5 / (float)newItem.DataCount2 * 100; + //} + //else + //{ + // newItem.DataCountRate = 0; + //} GetCheckStatistics.Add(newItem); } } diff --git a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesStatistics.aspx b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesStatistics.aspx index 573d7312..9c3e4bd6 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesStatistics.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesStatistics.aspx @@ -44,8 +44,8 @@ + SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true" + IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" AllowColumnLocking="true"> @@ -72,7 +72,7 @@ + EnableLock="true" Locked="true"> @@ -81,29 +81,53 @@ HeaderText="项目" TextAlign="Left" HeaderTextAlign="Center"> --%> + HeaderText="单位" TextAlign="Left" HeaderTextAlign="Center" EnableLock="true" Locked="true"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- - - - - - - - - - + HeaderText="已整改" TextAlign="Left" HeaderTextAlign="Center"> + --%> diff --git a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesStatistics.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesStatistics.aspx.cs index 7b45c22c..d3a22b67 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/RectifyNoticesStatistics.aspx.cs @@ -1,5 +1,6 @@ using BLL; using System; +using System.Collections.Generic; using System.Data; using System.Text; using AspNet = System.Web.UI.WebControls; @@ -122,7 +123,7 @@ namespace FineUIPro.Web.HSSE.Check Response.ContentEncoding = System.Text.Encoding.UTF8; this.Grid1.PageSize = this.Grid1.RecordCount; BindGrid(); - Response.Write(GetGridTableHtml(Grid1)); + Response.Write(GetGridTableHtmlNew(Grid1)); Response.End(); } @@ -162,6 +163,252 @@ namespace FineUIPro.Web.HSSE.Check return sb.ToString(); } + + /// + /// 格式化html + /// + /// + /// + private string GetGridTableHtmlNew(Grid grid) + { + StringBuilder sb = new StringBuilder(); + + MultiHeaderTable mht = new MultiHeaderTable(); + mht.ResolveMultiHeaderTable(Grid1.Columns); + + + sb.Append(""); + + + sb.Append(""); + + ////列数 + //var rowCount = ""; + //var list = Funs.DB.Base_Project.Where(x => x.ProjectState == Const.ProjectState_1 || x.ProjectState == null).OrderBy(x => x.ProjectCode).ToList(); + //for (int i = 0; i < list.Count; i++) + //{ + // rowCount+="{}" + //} + + 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(""); + int i = 0; + string MenuC = ""; + foreach (GridColumn column in mht.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("spanNumber") as System.Web.UI.HtmlControls.HtmlGenericControl).InnerText; + } + else if (column.ColumnID == "tfGender") + { + html = (row.FindControl("labGender") as AspNet.Label).Text; + } + else if (column.ColumnID == "tfPageIndex") + { + html = (row.FindControl("lblPageIndex") as AspNet.Label).Text; + } + + + sb.AppendFormat("", html); + + } + + sb.Append(""); + } + + sb.Append("
{0}
"); + + return sb.ToString(); + } + + + public static string MidStrEx(string sourse, string startstr, string endstr) + { + string result = string.Empty; + int startindex, endindex; + try + { + startindex = sourse.IndexOf(startstr); + if (startindex == -1) + return result; + string tmpstr = sourse.Substring(startindex + startstr.Length); + endindex = tmpstr.IndexOf(endstr); + if (endindex == -1) + return result; + result = tmpstr.Remove(endindex); + } + catch (Exception ex) + { + + } + return result; + } + + + #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 } } \ No newline at end of file diff --git a/SGGL/Model/APIItem/HSSE/RecityNoticesItem.cs b/SGGL/Model/APIItem/HSSE/RecityNoticesItem.cs new file mode 100644 index 00000000..6c62e43d --- /dev/null +++ b/SGGL/Model/APIItem/HSSE/RecityNoticesItem.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Model +{ + /// + /// 隐患整改单统计 + /// + public class RecityNoticesItem + { + /// + /// ID + /// + public string DataId + { + get; + set; + } + /// + /// 类型 + /// + public string Type + { + get; + set; + } + /// + /// 名称 + /// + public string DataName + { + get; + set; + } + + /// + /// 项目名称 + /// + public string DataAllName + { + get; + set; + } + + /// + /// 安全巡检隐患总数 + /// + public int DataSumCount1 + { + get; + set; + } + + /// + /// 安全巡检隐患待整改数 + /// + public int DataSumCountDzg1 + { + get; + set; + } + + /// + /// 安全巡检隐患已整改数 + /// + public int DataSumCountYzg1 + { + get; + set; + } + + /// + /// 常规巡检隐患总数 + /// + public int DataSumCount2 + { + get; + set; + } + + /// + /// 常规巡检隐患待整改数 + /// + public int DataSumCountDzg2 + { + get; + set; + } + + /// + /// 常规巡检隐患已整改数 + /// + public int DataSumCountYzg2 + { + get; + set; + } + + /// + /// 专项检查隐患总数 + /// + public int DataSumCount3 + { + get; + set; + } + + /// + /// 专项检查隐患待整改数 + /// + public int DataSumCountDzg3 + { + get; + set; + } + + /// + /// 专项检查隐患已整改数 + /// + public int DataSumCountYzg3 + { + get; + set; + } + + /// + /// 综合检查隐患总数 + /// + public int DataSumCount4 + { + get; + set; + } + + /// + /// 综合检查隐患待整改数 + /// + public int DataSumCountDzg4 + { + get; + set; + } + + /// + /// 综合检查隐患已整改数 + /// + public int DataSumCountYzg4 + { + get; + set; + } + + } +} diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index 2f22becb..021d6974 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -105,6 +105,7 @@ + From 47f9a0e95931559e202d186f3de9a01751131597 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Wed, 6 Sep 2023 09:38:08 +0800 Subject: [PATCH 7/9] =?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 --- SGGL/Model/APIItem/HSSE/RecityNoticesItem.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SGGL/Model/APIItem/HSSE/RecityNoticesItem.cs b/SGGL/Model/APIItem/HSSE/RecityNoticesItem.cs index 6c62e43d..124880c7 100644 --- a/SGGL/Model/APIItem/HSSE/RecityNoticesItem.cs +++ b/SGGL/Model/APIItem/HSSE/RecityNoticesItem.cs @@ -71,6 +71,8 @@ namespace Model set; } + public string DataSumCountZgl1 { get; set; } + /// /// 常规巡检隐患总数 /// @@ -97,7 +99,7 @@ namespace Model get; set; } - + public string DataSumCountZgl2 { get; set; } /// /// 专项检查隐患总数 /// @@ -124,7 +126,7 @@ namespace Model get; set; } - + public string DataSumCountZgl3 { get; set; } /// /// 综合检查隐患总数 /// @@ -152,5 +154,6 @@ namespace Model set; } + public string DataSumCountZgl4 { get; set; } } } From 42d3d45c5cfed9f8463cde40170ff297b7953b0d Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 8 Sep 2023 17:09:44 +0800 Subject: [PATCH 8/9] =?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 --- DataBase/版本日志/SGGLDB_WH_2023-09-07.sql | 393 +++ SGGL/BLL/API/HSSE/APICheckSpecialService.cs | 8 +- SGGL/BLL/API/HSSE/APILicenseDataService.cs | 507 +++- SGGL/BLL/Common/Const.cs | 9 + SGGL/BLL/HSSE/License/LicensePublicService.cs | 196 +- SGGL/BLL/HSSE/SitePerson/PersonService.cs | 5 +- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 16 + .../HSSE/License/Electricity.aspx | 122 + .../HSSE/License/Electricity.aspx.cs | 1077 ++++++++ .../HSSE/License/Electricity.aspx.designer.cs | 179 ++ .../HSSE/License/ElectricityView.aspx | 259 ++ .../HSSE/License/ElectricityView.aspx.cs | 242 ++ .../License/ElectricityView.aspx.designer.cs | 467 ++++ SGGL/FineUIPro.Web/common/mainProject2.aspx | 2223 +++++++---------- .../APIItem/HSSE/CheckSpecialDetailItem.cs | 2 +- SGGL/Model/APIItem/HSSE/LicenseDataItem.cs | 113 +- 16 files changed, 4544 insertions(+), 1274 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_WH_2023-09-07.sql create mode 100644 SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx create mode 100644 SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_WH_2023-09-07.sql b/DataBase/版本日志/SGGLDB_WH_2023-09-07.sql new file mode 100644 index 00000000..25c4a9e7 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2023-09-07.sql @@ -0,0 +1,393 @@ +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B','ҵƱ','HSSE/License/FireWork.aspx',10,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('8DB0EAED-B67D-423A-BA13-E7872A11727A','2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F0283058-2CCF-4195-AEBC-878A2AE5067F','2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('2C3CD3AA-C07D-439F-97BE-FEA20CE512CB','2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BBB22814-70D3-4188-A7F8-8C0FD4557A27','2E58D4F1-2FF1-450E-8A00-1CE3BBCF8D4B','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9','ߴҵƱ','HSSE/License/HeightWork.aspx',20,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B3CD11DC-D359-4D60-8DB4-BD095CE52C17','DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6D9B6919-0677-4892-9C73-CDD6C124B855','DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('044C6FF2-2A30-4E08-88A6-9D85722AD89C','DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7C06CD77-402A-4F8C-A41B-1C69301707E5','DA1CAE8E-B5BF-4AC0-9996-AF6CAA412CA9','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('AEC9166D-1C91-45F0-8BFE-D3D0479A28C7','޿ռҵƱ','HSSE/License/LimitedSpace.aspx',30,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('904FD3D2-1520-48FB-BD8F-6BAA000653B7','AEC9166D-1C91-45F0-8BFE-D3D0479A28C7','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7F372BE4-E264-48FB-ACA6-8E7EE41393EC','AEC9166D-1C91-45F0-8BFE-D3D0479A28C7','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BE6D9AE8-069A-421A-8E3D-F3DDC18FCDB4','AEC9166D-1C91-45F0-8BFE-D3D0479A28C7','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('8CC252A0-F098-4FE3-AF21-4A7A7030DC5E','AEC9166D-1C91-45F0-8BFE-D3D0479A28C7','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('F72FF20B-D3EB-46A5-97F7-C99B2473A140','ҵƱ','HSSE/License/RadialWork.aspx',40,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('107EA8EA-4D8D-410B-B3DE-F0C29E9C3EDC','F72FF20B-D3EB-46A5-97F7-C99B2473A140','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('89010EF9-9E77-49EB-A00D-3142B9FBC29E','F72FF20B-D3EB-46A5-97F7-C99B2473A140','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F5EFEB84-7CCC-406D-ACFA-CA36CB6A8A1D','F72FF20B-D3EB-46A5-97F7-C99B2473A140','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('982333DA-42A2-40A3-8F3D-52BA7DE4E19D','F72FF20B-D3EB-46A5-97F7-C99B2473A140','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('4E607E83-41FC-4F49-B26F-A21CFE38328F','·(ռ)ҵƱ','HSSE/License/OpenCircuit.aspx',60,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6D90E4CD-D932-454A-8A8B-54FA3CC22FD4','4E607E83-41FC-4F49-B26F-A21CFE38328F','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('53BF21A8-38DA-4853-A527-8D392B901554','4E607E83-41FC-4F49-B26F-A21CFE38328F','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('06F8CEAB-7AF8-40C5-B6D0-6A91AE562AD7','4E607E83-41FC-4F49-B26F-A21CFE38328F','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C8BE46DF-2553-4A64-BE79-B69712C297A5','4E607E83-41FC-4F49-B26F-A21CFE38328F','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('755C6AC9-2E38-4D4F-AF33-33CB1744A907','ҵƱ','HSSE/License/BreakGround.aspx',70,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F3D52EF3-104F-42CF-B48A-443FCE5C800D','755C6AC9-2E38-4D4F-AF33-33CB1744A907','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7DFD6886-0F8B-4DA1-9C4B-1847A8B286AF','755C6AC9-2E38-4D4F-AF33-33CB1744A907','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F5F93A18-438F-4A19-982B-7E9E38EB6AE2','755C6AC9-2E38-4D4F-AF33-33CB1744A907','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('32937824-9F35-4C4E-8E13-984E784F8E9C','755C6AC9-2E38-4D4F-AF33-33CB1744A907','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('7BBAE649-7B00-4475-A911-BFE3A37AC55B','ҹʩҵƱ','HSSE/License/NightWork.aspx',80,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B040C80B-4216-4AF8-B9C9-A1303E31CFAC','7BBAE649-7B00-4475-A911-BFE3A37AC55B','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('60241503-BF4B-4159-AFA2-41186CD9329B','7BBAE649-7B00-4475-A911-BFE3A37AC55B','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3A192DC6-2338-4038-ADAD-46FA7364E20F','7BBAE649-7B00-4475-A911-BFE3A37AC55B','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6239BB95-33AF-4B36-97CB-787EF553D35A','7BBAE649-7B00-4475-A911-BFE3A37AC55B','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('A1BE3AB6-9D4A-41E7-8870-E73423165451','װҵƱ','HSSE/License/LiftingWork.aspx',80,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BDC9E201-0C51-4C02-9151-B6DF86CE4C27','A1BE3AB6-9D4A-41E7-8870-E73423165451','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('36EBA247-3051-4213-BD95-89DC948006E1','A1BE3AB6-9D4A-41E7-8870-E73423165451','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('46A93981-2D60-49C3-877A-7B66EBCBC927','A1BE3AB6-9D4A-41E7-8870-E73423165451','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3C5F18F7-459A-4666-B497-9400E637C975','A1BE3AB6-9D4A-41E7-8870-E73423165451','',4) + GO + +update sys_menu set menuname='HSSE¹ʴ' where menuname ='HSSE¹(δ)' + +--Ӷҵֶ +-- +ALTER TABLE License_FireWork +ADD WorkAreaId nvarchar(500) null; +--ԭ +ALTER TABLE License_FireWork +ADD Reason nvarchar(500) null; +--ҵ +ALTER TABLE License_FireWork +ADD FireLevel nvarchar(20) null; + + +--޿ռ +-- +ALTER TABLE License_LimitedSpace +ADD WorkAreaId nvarchar(500) null; +--ռڽ +ALTER TABLE License_LimitedSpace +ADD LimitedDescribe nvarchar(500) null; +--Ƿ +ALTER TABLE License_LimitedSpace +ADD IsBoolOther bit null; +--ҵǷжк +ALTER TABLE License_LimitedSpace +ADD IsBoolHarmfulGas bit null; +--Խ +ALTER TABLE License_LimitedSpace +ADD TestResult nvarchar(500) null; +--ʱ +ALTER TABLE License_LimitedSpace +ADD TestDate datetime null; +-- +ALTER TABLE License_LimitedSpace +ADD TestPerson nvarchar(100) null; +--ͨʩ +ALTER TABLE License_LimitedSpace +ADD VenStep nvarchar(20) null; + + +--ҵƱ +-- +ALTER TABLE License_BreakGround +ADD WorkAreaId nvarchar(500) null; +--ԭ +ALTER TABLE License_BreakGround +ADD Reason nvarchar(500) null; +--໤ +ALTER TABLE License_BreakGround +ADD FireWatchManName nvarchar(500) null; + + +--ߴҵƱ +-- +ALTER TABLE License_HeightWork +ADD WorkAreaId nvarchar(500) null; +--ҵ߶ +ALTER TABLE License_HeightWork +ADD WorkHeight nvarchar(20) null; +--ߴҵ +ALTER TABLE License_HeightWork +ADD HeightLevel nvarchar(20) null; +--໤ +ALTER TABLE License_HeightWork +ADD FireWatchManName nvarchar(500) null; + +-- +ALTER TABLE License_HeightWork +ADD WorkLeaderName nvarchar(200) null; +--˵绰 +ALTER TABLE License_HeightWork +ADD WorkLeaderTel nvarchar(200) null; + +--װ +-- +ALTER TABLE License_LiftingWork +ADD WorkAreaId nvarchar(500) null; +--װ߶ +ALTER TABLE License_LiftingWork +ADD LiftingHeight nvarchar(20) null; + +--໤ +ALTER TABLE License_LiftingWork +ADD FireWatchManName nvarchar(500) null; + +-- +ALTER TABLE License_LiftingWork +ADD WorkLeaderName nvarchar(200) null; +--˵绰 +ALTER TABLE License_LiftingWork +ADD WorkLeaderTel nvarchar(200) null; + +--ع +ALTER TABLE License_LiftingWork +ADD QzgName nvarchar(200) null; +--ع绰 +ALTER TABLE License_LiftingWork +ADD QzgPhone nvarchar(200) null; + +--·ҵ +-- +ALTER TABLE License_OpenCircuit +ADD WorkAreaId nvarchar(500) null; +--·ҵԭ +ALTER TABLE License_OpenCircuit +ADD Reason nvarchar(500) null; +--໤ +ALTER TABLE License_OpenCircuit +ADD FireWatchManName nvarchar(500) null; + + +--ҵ +-- +ALTER TABLE License_RadialWork +ADD WorkAreaId nvarchar(500) null; + +--ʱõ˵ +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','ʱõҵƱ','HSSE/License/Electricity.aspx',50,'473A87D2-1365-4A68-BD38-06F312F81BC2','Menu_HSSE',0,1,1) +GO +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('4D6FE464-B5D7-48BE-B68D-C55C9E8E6202','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','',1) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('0086D338-3864-4C90-BEDB-7E752622837D','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','޸',2) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('184C6276-C8B6-421B-B0F9-A74CDCBA53E9','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','ɾ',3) +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('065EC96A-1AF4-457F-AA13-CEEAB5A0BD7C','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','',4) +GO +CREATE TABLE [dbo].[License_Electricity]( + [ElectricityId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [LicenseCode] [nvarchar](50) NULL, + [ApplyUnitId] [nvarchar](50) NULL, + [ApplyManId] [nvarchar](50) NULL, + [ApplyDate] [datetime] NULL, + [WorkPalce] [nvarchar](300) NULL, + [WorkDepth] [nvarchar](50) NULL, + [ValidityStartTime] [datetime] NULL, + [ValidityEndTime] [datetime] NULL, + [WorkMeasures] [nvarchar](500) NULL, + [CancelManId] [nvarchar](50) NULL, + [CancelReasons] [nvarchar](200) NULL, + [CancelTime] [datetime] NULL, + [CloseManId] [nvarchar](50) NULL, + [CloseReasons] [nvarchar](200) NULL, + [CloseTime] [datetime] NULL, + [States] [varchar](2) NULL, + [NextManId] [nvarchar](500) NULL, + [OldLicenseId] [nvarchar](50) NULL, + [WorkAreaId] [nvarchar](500) NULL, + [Reason] [nvarchar](500) NULL, + [FireWatchManName] [nvarchar](500) NULL, + CONSTRAINT [PK_License_Electricity] PRIMARY KEY CLUSTERED +( + [ElectricityId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +SET ANSI_PADDING OFF +GO + +ALTER TABLE [dbo].[License_Electricity] WITH CHECK ADD CONSTRAINT [FK_License_Electricity_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[License_Electricity] CHECK CONSTRAINT [FK_License_Electricity_Base_Project] +GO + +ALTER TABLE [dbo].[License_Electricity] WITH CHECK ADD CONSTRAINT [FK_License_Electricity_Base_Unit] FOREIGN KEY([ApplyUnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[License_Electricity] CHECK CONSTRAINT [FK_License_Electricity_Base_Unit] +GO + +ALTER TABLE [dbo].[License_Electricity] WITH CHECK ADD CONSTRAINT [FK_License_Electricity_Sys_User] FOREIGN KEY([ApplyManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_Electricity] CHECK CONSTRAINT [FK_License_Electricity_Sys_User] +GO + +ALTER TABLE [dbo].[License_Electricity] WITH CHECK ADD CONSTRAINT [FK_License_Electricity_Sys_User2] FOREIGN KEY([CancelManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_Electricity] CHECK CONSTRAINT [FK_License_Electricity_Sys_User2] +GO + +ALTER TABLE [dbo].[License_Electricity] WITH CHECK ADD CONSTRAINT [FK_License_Electricity_Sys_User3] FOREIGN KEY([CloseManId]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[License_Electricity] CHECK CONSTRAINT [FK_License_Electricity_Sys_User3] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ElectricityId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'LicenseCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'뵥ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ApplyUnitId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ApplyManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ApplyDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵص' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'WorkPalce' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'WorkDepth' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Чڿʼʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ValidityStartTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Чڽʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'ValidityEndTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵݡ߼ȫʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'WorkMeasures' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȡID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CancelManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȡԭ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CancelReasons' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȡʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CancelTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'رID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CloseManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'رԭ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CloseReasons' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'رʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'CloseTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'״̬(0-ύ1-У2-ɣ3-رգ-1ȡ)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'States' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'²ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'NextManId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ԭ֤ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity', @level2type=N'COLUMN',@level2name=N'OldLicenseId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵƱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'License_Electricity' +GO + +--ʱõ簲װ +ALTER TABLE License_Electricity +ADD WorkLeaderName nvarchar(200) null; +--ʱõ簲װ˵绰 +ALTER TABLE License_Electricity +ADD WorkLeaderTel nvarchar(200) null; + +--ʱҵƱ +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF51','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',1,1,1,'ʩλȫԱ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF52','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',2,1,1,'ܰλȫԱ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF53','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',3,1,1,'ܰλרҵʦ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF54','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',3,1,2,'ܰλʩ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF55','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',3,2,1,'λ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF56','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',3,2,2,'ҵλ',0) +INSERT Sys_MenuFlowOperate(FlowOperateId,MenuId,FlowStep,GroupNum,OrderNum,AuditFlowName,IsFlowEnd) +VALUES('48F64E0F-38B2-4BDC-9B61-6200BD02CBF57','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5',4,1,1,'',1) + +--ҵ +insert into Sys_Const(id,ConstValue,ConstText,SortIndex,GroupId) +values('8A1DF18E-4CE6-4AA1-AD2C-625823BC4D8E','48F64E0F-38B2-4BDC-9B61-6200BD02CBF5','ʱõҵƱ',9,'LicenseType') + +--ҵһ +delete from Sys_MenuFlowOperate where flowStep!=1 +update Sys_MenuFlowOperate set auditflowname='' + + + diff --git a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs index 7a6318bf..03c4a833 100644 --- a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs +++ b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs @@ -237,7 +237,7 @@ namespace BLL CheckItemDetailSetId = x.CheckItemSetId, CheckItemDetailContent = x.CheckItemSetContent, - Rectification_Date = x.Rectification_Date + Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date), }; return getInfo.ToList(); } @@ -289,7 +289,7 @@ namespace BLL CheckItemDetailSetId=x.CheckItemSetId, CheckItemDetailContent=x.CheckItemSetContent, - Rectification_Date=x.Rectification_Date + Rectification_Date= string.Format("{0:yyyy-MM-dd}", x.Rectification_Date), }; return getInfo.First(); } @@ -328,7 +328,7 @@ namespace BLL //整改日期、检查内容、检查内容id CheckItemSetId= newDetail.CheckItemDetailSetId, CheckItemSetContent= newDetail.CheckItemDetailContent, - Rectification_Date=newDetail.Rectification_Date + Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date) }; if (newCheckSpecialDetail.CompleteStatus == false && newCheckSpecialDetail.HandleStep.Contains("1") && string.IsNullOrEmpty(newCheckSpecialDetail.HiddenHazardType)) { @@ -374,7 +374,7 @@ namespace BLL //整改日期、检查内容、检查内容id updateDetail.CheckItemSetId = newDetail.CheckItemDetailSetId; updateDetail.CheckItemSetContent = newDetail.CheckItemDetailContent; - updateDetail.Rectification_Date = newDetail.Rectification_Date; + updateDetail.Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date); db.SubmitChanges(); } ////保存附件 diff --git a/SGGL/BLL/API/HSSE/APILicenseDataService.cs b/SGGL/BLL/API/HSSE/APILicenseDataService.cs index 7fcf5dd7..7294d538 100644 --- a/SGGL/BLL/API/HSSE/APILicenseDataService.cs +++ b/SGGL/BLL/API/HSSE/APILicenseDataService.cs @@ -58,6 +58,11 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.FireWorkId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireLevel = x.FireLevel }).FirstOrDefault(); } #endregion @@ -96,6 +101,14 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.HeightWorkId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + WorkHeight = x.WorkHeight, + HeightLevel = x.HeightLevel, + FireWatchManName = x.FireWatchManName, + WorkLeaderName = x.WorkLeaderName, + WorkLeaderTel = x.WorkLeaderTel, }).FirstOrDefault(); } #endregion @@ -134,6 +147,16 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.LimitedSpaceId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LimitedDescribe = x.LimitedDescribe, + IsBoolOther = x.IsBoolOther, + IsBoolHarmfulGas = x.IsBoolHarmfulGas, + TestResult = x.TestResult, + TestDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TestDate), + TestPerson = x.TestPerson, + VenStep = x.VenStep, }).FirstOrDefault(); } #endregion @@ -177,6 +200,9 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.RadialWorkId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), }).FirstOrDefault(); } #endregion @@ -215,6 +241,11 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.OpenCircuitId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, }).FirstOrDefault(); } #endregion @@ -252,6 +283,11 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.BreakGroundId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, }).FirstOrDefault(); } #endregion @@ -332,6 +368,60 @@ namespace BLL AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.LiftingWorkId).AttachUrl.Replace('\\', '/'), States = x.States, OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LiftingHeight = x.LiftingHeight, + FireWatchManName = x.FireWatchManName, + WorkLeaderName = x.WorkLeaderName, + WorkLeaderTel = x.WorkLeaderTel, + QzgName = x.QzgName, + QzgPhone = x.QzgPhone, + }).FirstOrDefault(); + } + #endregion + + #region 临时用电作业票 + if (strMenuId == Const.ProjectElectricityMenuId) + { + getInfo = (from x in db.License_Electricity + where x.ElectricityId == id + select new Model.LicenseDataItem + { + LicenseId = x.ElectricityId, + MenuId = strMenuId, + ProjectId = x.ProjectId, + LicenseCode = x.LicenseCode, + ApplyUnitId = x.ApplyUnitId, + ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.ApplyUnitId).UnitName, + ApplyManId = x.ApplyManId, + ApplyManName = db.Sys_User.First(u => u.UserId == x.ApplyManId).UserName, + ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate), + WorkPalce = x.WorkPalce, + WorkDepth = x.WorkDepth, + ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), + ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + WorkMeasures = x.WorkMeasures, + CancelManId = x.CancelManId, + CancelManName = db.Sys_User.First(u => u.UserId == x.CancelManId).UserName, + CancelReasons = x.CancelReasons, + CancelTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CancelTime), + CloseManId = x.CloseManId, + CloseManName = db.Sys_User.First(u => u.UserId == x.CloseManId).UserName, + CloseReasons = x.CloseReasons, + CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), + NextManId = x.NextManId, + NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName, + AttachUrl = db.AttachFile.First(z => z.ToKeyId == x.ElectricityId).AttachUrl.Replace('\\', '/'), + States = x.States, + OldLicenseId = x.OldLicenseId, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, + WorkLeaderName=x.WorkLeaderName, + WorkLeaderTel=x.WorkLeaderTel }).FirstOrDefault(); } #endregion @@ -419,6 +509,11 @@ namespace BLL CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason=x.Reason, + FireLevel=x.FireLevel }).ToList(); } #endregion @@ -455,6 +550,15 @@ namespace BLL CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + WorkHeight=x.WorkHeight, + HeightLevel=x.HeightLevel, + FireWatchManName=x.FireWatchManName, + WorkLeaderName=x.WorkLeaderName, + WorkLeaderTel=x.WorkLeaderTel, + }).ToList(); } #endregion @@ -491,6 +595,20 @@ namespace BLL CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LimitedDescribe=x.LimitedDescribe, + IsBoolOther=x.IsBoolOther, + IsBoolHarmfulGas=x.IsBoolHarmfulGas, + TestResult=x.TestResult, + TestDate= string.Format("{0:yyyy-MM-dd HH:mm}", x.TestDate), + TestPerson=x.TestPerson, + VenStep=x.VenStep, + + + + }).ToList(); } #endregion @@ -534,6 +652,10 @@ namespace BLL NextManId = x.NextManId, NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName, States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + }).ToList(); } #endregion @@ -570,6 +692,12 @@ namespace BLL CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason=x.Reason, + FireWatchManName=x.FireWatchManName, + }).ToList(); } #endregion @@ -605,6 +733,12 @@ namespace BLL CloseReasons = x.CloseReasons, CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason=x.Reason, + FireWatchManName=x.FireWatchManName, + }).ToList(); } #endregion @@ -685,6 +819,60 @@ namespace BLL NextManId = x.NextManId, NextManName = db.Sys_User.First(u => u.UserId == x.NextManId).UserName, States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LiftingHeight=x.LiftingHeight, + FireWatchManName=x.FireWatchManName, + WorkLeaderName=x.WorkLeaderName, + WorkLeaderTel=x.WorkLeaderTel, + QzgName=x.QzgName, + QzgPhone=x.QzgPhone, + + }).ToList(); + } + #endregion + + #region 临时用电作业票 + if (strMenuId == Const.ProjectElectricityMenuId) + { + getInfoList = (from x in db.License_Electricity + where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) + && (states == null || x.States == states) + orderby x.LicenseCode descending + select new Model.LicenseDataItem + { + LicenseId = x.ElectricityId, + MenuId = strMenuId, + ProjectId = x.ProjectId, + LicenseCode = x.LicenseCode, + ApplyUnitId = x.ApplyUnitId, + ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.ApplyUnitId).UnitName, + ApplyManId = x.ApplyManId, + ApplyManName = db.Sys_User.First(u => u.UserId == x.ApplyManId).UserName, + ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate), + WorkPalce = x.WorkPalce, + WorkDepth = x.WorkDepth, + ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), + ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + WorkMeasures = x.WorkMeasures, + CancelManId = x.CancelManId, + CancelManName = db.Sys_User.First(u => u.UserId == x.CancelManId).UserName, + CancelReasons = x.CancelReasons, + CancelTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CancelTime), + CloseManId = x.CloseManId, + CloseManName = db.Sys_User.First(u => u.UserId == x.CloseManId).UserName, + CloseReasons = x.CloseReasons, + CloseTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.CloseTime), + States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, + WorkLeaderName=x.WorkLeaderName, + WorkLeaderTel=x.WorkLeaderTel, + }).ToList(); } #endregion @@ -760,6 +948,11 @@ namespace BLL ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireLevel = x.FireLevel }).ToList(); if (getFireWork.Count() > 0) { @@ -788,6 +981,14 @@ namespace BLL ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + WorkHeight = x.WorkHeight, + HeightLevel = x.HeightLevel, + FireWatchManName = x.FireWatchManName, + WorkLeaderName = x.WorkLeaderName, + WorkLeaderTel = x.WorkLeaderTel, }).ToList(); if (getHeightWork.Count() > 0) { @@ -815,6 +1016,17 @@ namespace BLL ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LimitedDescribe = x.LimitedDescribe, + IsBoolOther = x.IsBoolOther, + IsBoolHarmfulGas = x.IsBoolHarmfulGas, + TestResult = x.TestResult, + TestDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TestDate), + TestPerson = x.TestPerson, + VenStep = x.VenStep, + }).ToList(); if (getLimitedSpace.Count() > 0) { @@ -843,6 +1055,9 @@ namespace BLL ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), WorkPalce = x.WorkPalce, States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), }).ToList(); if (getRadialWork.Count() > 0) { @@ -871,6 +1086,11 @@ namespace BLL ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), RoadName = x.RoadName, States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, }).ToList(); if (getOpenCircuit.Count() > 0) { @@ -899,6 +1119,11 @@ namespace BLL ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, }).ToList(); if (getBreakGround.Count() > 0) { @@ -954,6 +1179,15 @@ namespace BLL ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + LiftingHeight = x.LiftingHeight, + FireWatchManName = x.FireWatchManName, + WorkLeaderName = x.WorkLeaderName, + WorkLeaderTel = x.WorkLeaderTel, + QzgName = x.QzgName, + QzgPhone = x.QzgPhone, }).ToList(); if (getLiftingWork.Count() > 0) { @@ -961,6 +1195,41 @@ namespace BLL } #endregion + #region 临时用电作业票 + var getElectricity = (from x in db.License_Electricity + where x.ProjectId == projectId && (x.ApplyUnitId == unitId || unitId == null) + && (states == null || x.States == states) + select new Model.LicenseDataItem + { + LicenseId = x.ElectricityId, + MenuId = Const.ProjectElectricityMenuId, + MenuName = "临时用电", + ProjectId = x.ProjectId, + LicenseCode = x.LicenseCode, + ApplyUnitId = x.ApplyUnitId, + ApplyUnitName = db.Base_Unit.First(u => u.UnitId == x.ApplyUnitId).UnitName, + ApplyManId = x.ApplyManId, + ApplyManName = db.Sys_User.First(u => u.UserId == x.ApplyManId).UserName, + ApplyDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.ApplyDate), + WorkPalce = x.WorkPalce, + WorkDepth = x.WorkDepth, + ValidityStartTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityStartTime), + ValidityEndTime = string.Format("{0:yyyy-MM-dd HH:mm}", x.ValidityEndTime), + States = x.States, + + WorkAreaId = x.WorkAreaId, + WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId), + Reason = x.Reason, + FireWatchManName = x.FireWatchManName, + WorkLeaderName=x.WorkLeaderName, + WorkLeaderTel=x.WorkLeaderTel, + }).ToList(); + if (getElectricity.Count() > 0) + { + getInfoList.AddRange(getElectricity); + } + #endregion + #region 作业票【定稿 】"待开工"="1";"作业中"="2";"已关闭"="3";"已取消"="-1" var getLicenseManager = (from x in db.License_LicenseManager where x.ProjectId == projectId && (x.UnitId == unitId || unitId == null) @@ -1106,6 +1375,10 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId=newItem.WorkAreaId, + Reason=newItem.Reason, + FireLevel=newItem.FireLevel }; if (newItem.States == Const.State_0) @@ -1156,6 +1429,10 @@ namespace BLL updateFireWork.WorkMeasures = newFireWork.WorkMeasures; updateFireWork.NextManId = newFireWork.NextManId; updateFireWork.States = newFireWork.States; + + updateFireWork.WorkAreaId = newItem.WorkAreaId; + updateFireWork.Reason = newItem.Reason; + updateFireWork.FireLevel = newItem.FireLevel; } updateFireWork.States = newFireWork.States; } @@ -1186,6 +1463,15 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId=newItem.WorkAreaId, + WorkHeight=newItem.WorkHeight, + HeightLevel=newItem.HeightLevel, + FireWatchManName=newItem.FireWatchManName, + WorkLeaderName=newItem.WorkLeaderName, + WorkLeaderTel=newItem.WorkLeaderTel, + + }; if (newItem.States == Const.State_0) { @@ -1236,6 +1522,12 @@ namespace BLL updateHeightWork.EquipmentTools = newHeightWork.EquipmentTools; updateHeightWork.NextManId = newHeightWork.NextManId; updateHeightWork.States = newHeightWork.States; + updateHeightWork.WorkAreaId = newItem.WorkAreaId; + updateHeightWork.WorkHeight = newItem.WorkHeight; + updateHeightWork.HeightLevel = newItem.HeightLevel; + updateHeightWork.FireWatchManName = newItem.FireWatchManName; + updateHeightWork.WorkLeaderName = newItem.WorkLeaderName; + updateHeightWork.WorkLeaderTel = newItem.WorkLeaderTel; } updateHeightWork.States = newHeightWork.States; } @@ -1266,6 +1558,14 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + LimitedDescribe=newItem.LimitedDescribe, + IsBoolOther=newItem.IsBoolOther, + IsBoolHarmfulGas=newItem.IsBoolHarmfulGas, + TestResult=newItem.TestResult, + TestDate= Funs.GetNewDateTime(newItem.TestDate), + TestPerson=newItem.TestPerson, + VenStep=newItem.VenStep }; if (newItem.States == Const.State_0) { @@ -1315,6 +1615,14 @@ namespace BLL updateLimitedSpace.WorkMeasures = newLimitedSpace.WorkMeasures; updateLimitedSpace.NextManId = newLimitedSpace.NextManId; updateLimitedSpace.States = newLimitedSpace.States; + + updateLimitedSpace.LimitedDescribe = newItem.LimitedDescribe; + updateLimitedSpace.IsBoolOther = newItem.IsBoolOther; + updateLimitedSpace.IsBoolHarmfulGas = newItem.IsBoolHarmfulGas; + updateLimitedSpace.TestResult = newItem.TestResult; + updateLimitedSpace.TestDate = Funs.GetNewDateTime(newItem.TestDate); + updateLimitedSpace.TestPerson = newItem.TestPerson; + updateLimitedSpace.VenStep = newItem.VenStep; } updateLimitedSpace.States = newLimitedSpace.States; } @@ -1348,6 +1656,8 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId=newItem.WorkAreaId }; if (newItem.States == Const.State_0) { @@ -1400,6 +1710,7 @@ namespace BLL updateRadialWork.WatchManContact = newRadialWork.WatchManContact; updateRadialWork.NextManId = newRadialWork.NextManId; updateRadialWork.States = newRadialWork.States; + updateRadialWork.WorkAreaId = newItem.WorkAreaId; } updateRadialWork.States = newRadialWork.States; } @@ -1430,6 +1741,11 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId=newItem.WorkAreaId, + Reason=newItem.Reason, + FireWatchManName=newItem.FireWatchManName, + }; if (newItem.States == Const.State_0) { @@ -1479,6 +1795,10 @@ namespace BLL updateOpenCircuit.SafeMeasures = newOpenCircuit.SafeMeasures; updateOpenCircuit.NextManId = newOpenCircuit.NextManId; updateOpenCircuit.States = newOpenCircuit.States; + + updateOpenCircuit.WorkAreaId = newItem.WorkAreaId; + updateOpenCircuit.Reason = newItem.Reason; + updateOpenCircuit.FireWatchManName = newItem.FireWatchManName; } updateOpenCircuit.States = newOpenCircuit.States; } @@ -1508,6 +1828,10 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId=newItem.WorkAreaId, + Reason=newItem.Reason, + FireWatchManName=newItem.FireWatchManName }; if (newItem.States == Const.State_0) { @@ -1556,6 +1880,10 @@ namespace BLL updateBreakGround.WorkMeasures = newBreakGround.WorkMeasures; updateBreakGround.NextManId = newBreakGround.NextManId; updateBreakGround.States = newBreakGround.States; + + updateBreakGround.WorkAreaId = newItem.WorkAreaId; + updateBreakGround.Reason = newItem.Reason; + updateBreakGround.FireWatchManName = newItem.FireWatchManName; } updateBreakGround.States = newBreakGround.States; } @@ -1669,6 +1997,15 @@ namespace BLL CloseTime = Funs.GetNewDateTime(newItem.CloseTime), NextManId = newItem.NextManId, States = newItem.States, + + WorkAreaId=newItem.WorkAreaId, + LiftingHeight=newItem.LiftingHeight, + FireWatchManName=newItem.FireWatchManName, + WorkLeaderName=newItem.WorkLeaderName, + WorkLeaderTel=newItem.WorkLeaderTel, + QzgName=newItem.QzgName, + QzgPhone=newItem.QzgPhone, + }; if (newItem.States == Const.State_0) { @@ -1718,12 +2055,112 @@ namespace BLL updateLiftingWork.CraneCapacity = newLiftingWork.CraneCapacity; updateLiftingWork.NextManId = newLiftingWork.NextManId; updateLiftingWork.States = newLiftingWork.States; + + updateLiftingWork.WorkAreaId = newItem.WorkAreaId; + updateLiftingWork.LiftingHeight = newItem.LiftingHeight; + updateLiftingWork.FireWatchManName = newItem.FireWatchManName; + updateLiftingWork.WorkLeaderName = newItem.WorkLeaderName; + updateLiftingWork.WorkLeaderTel = newItem.WorkLeaderTel; + updateLiftingWork.QzgName = newItem.QzgName; + updateLiftingWork.QzgPhone = newItem.QzgPhone; } updateLiftingWork.States = newLiftingWork.States; } } #endregion + #region 临时用电作业票 + if (newItem.MenuId == Const.ProjectElectricityMenuId) + { + Model.License_Electricity newElectricity = new Model.License_Electricity + { + ElectricityId = strLicenseId, + ProjectId = projectId, + LicenseCode = newItem.LicenseCode, + ApplyUnitId = newItem.ApplyUnitId, + ApplyManId = newItem.ApplyManId, + ApplyDate = Funs.GetNewDateTime(newItem.ApplyDate), + WorkPalce = newItem.WorkPalce, + WorkDepth = newItem.WorkDepth, + ValidityStartTime = Funs.GetNewDateTime(newItem.ValidityStartTime), + ValidityEndTime = Funs.GetNewDateTime(newItem.ValidityEndTime), + WorkMeasures = newItem.WorkMeasures, + CancelManId = newItem.CancelManId, + CancelReasons = newItem.CancelReasons, + CancelTime = Funs.GetNewDateTime(newItem.CancelTime), + CloseManId = newItem.CloseManId, + CloseReasons = newItem.CloseReasons, + CloseTime = Funs.GetNewDateTime(newItem.CloseTime), + NextManId = newItem.NextManId, + States = newItem.States, + + WorkAreaId = newItem.WorkAreaId, + Reason = newItem.Reason, + FireWatchManName = newItem.FireWatchManName, + WorkLeaderName= newItem.WorkLeaderName, + WorkLeaderTel = newItem.WorkLeaderTel + }; + if (newItem.States == Const.State_0) + { + newElectricity.NextManId = newItem.ApplyManId; + } + ////保存 + var updateElectricity = db.License_Electricity.FirstOrDefault(x => x.ElectricityId == strLicenseId); + if (updateElectricity == null) + { + newElectricity.ApplyDate = DateTime.Now; + strLicenseId = newElectricity.ElectricityId = SQLHelper.GetNewID(); + newElectricity.OldLicenseId = newItem.OldLicenseId; + newItem.LicenseCode = newElectricity.LicenseCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectElectricityMenuId, newElectricity.ProjectId, newElectricity.ApplyUnitId); + db.License_Electricity.InsertOnSubmit(newElectricity); + ////增加一条编码记录 + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectElectricityMenuId, newElectricity.ProjectId, newElectricity.ApplyUnitId, newElectricity.ElectricityId, newElectricity.ApplyDate); + } + else + { + if (newItem.States == Const.State_3) + { + updateElectricity.CloseManId = newElectricity.CloseManId; + updateElectricity.CloseReasons = newElectricity.CloseReasons; + updateElectricity.CloseTime = DateTime.Now; + if (newElectricity.ValidityEndTime.HasValue && newElectricity.ValidityEndTime < DateTime.Now) + { + updateElectricity.CloseTime = newElectricity.ValidityEndTime; + } + } + else if (newItem.States == Const.State_R) + { + updateElectricity.CancelManId = newElectricity.CancelManId; + updateElectricity.CancelReasons = newElectricity.CancelReasons; + updateElectricity.CancelTime = DateTime.Now; + if (newElectricity.ValidityEndTime.HasValue && newElectricity.ValidityEndTime < DateTime.Now) + { + updateElectricity.CancelTime = newElectricity.ValidityEndTime; + } + } + else + { + updateElectricity.WorkPalce = newElectricity.WorkPalce; + updateElectricity.WorkDepth = newElectricity.WorkDepth; + updateElectricity.ValidityStartTime = newElectricity.ValidityStartTime; + updateElectricity.ValidityEndTime = newElectricity.ValidityEndTime; + updateElectricity.WorkMeasures = newElectricity.WorkMeasures; + updateElectricity.NextManId = newElectricity.NextManId; + updateElectricity.States = newElectricity.States; + + updateElectricity.WorkAreaId = newItem.WorkAreaId; + updateElectricity.Reason = newItem.Reason; + updateElectricity.FireWatchManName = newItem.FireWatchManName; + updateElectricity.WorkLeaderName = newItem.WorkLeaderName; + updateElectricity.WorkLeaderTel = newItem.WorkLeaderTel; + + + } + updateElectricity.States = newElectricity.States; + } + } + #endregion + #region 作业票【定稿】 if (newItem.MenuId == Const.ProjectLicenseManagerMenuId) { @@ -1880,23 +2317,26 @@ namespace BLL #region 新增下一步审核记录 if (newItem.IsAgree == true) { - var getCloseAllOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && (!x.IsClosed.HasValue || x.IsClosed == false) && (!x.IsFlowEnd.HasValue || x.IsFlowEnd == false)); - if (getCloseAllOperate == null) - { - var getNextFlowOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && x.IsFlowEnd == true); - ////判断审核步骤是否结束 - if (getNextFlowOperate != null) - { - /////最后一步是关闭所有 步骤 - getNextFlowOperate.IsClosed = true; + //修改只需要一个人审批直接通过 + + //var getCloseAllOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && (!x.IsClosed.HasValue || x.IsClosed == false) && (!x.IsFlowEnd.HasValue || x.IsFlowEnd == false)); + //if (getCloseAllOperate == null) + //{ + //var getNextFlowOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId && x.IsFlowEnd == true); + var getNextFlowOperate = db.License_FlowOperate.FirstOrDefault(x => x.DataId == updateFlowOperate.DataId); + // ////判断审核步骤是否结束 + // if (getNextFlowOperate != null) + // { + /////最后一步是关闭所有 步骤 + getNextFlowOperate.IsClosed = true; getNextFlowOperate.OperaterTime = DateTime.Now; getNextFlowOperate.IsAgree = true; getNextFlowOperate.OperaterId = newItem.OperaterId; getNextFlowOperate.Opinion = "审核完成!"; boolIsFlowEnd = true; db.SubmitChanges(); - } - } + // } + //} #region 动火作业票 if (strMenuId == Const.ProjectFireWorkMenuId) @@ -2163,6 +2603,39 @@ namespace BLL } #endregion + #region 临时用电作业票 + if (strMenuId == Const.ProjectElectricityMenuId) + { + var getElectricity = db.License_Electricity.FirstOrDefault(x => x.ElectricityId == updateFlowOperate.DataId); + if (getElectricity != null) + { + getElectricity.NextManId = newItem.NextOperaterId; + if (newItem.IsAgree == true) + { + if (boolIsFlowEnd == true) + { + getElectricity.NextManId = null; + getElectricity.States = Const.State_2; + if (getElectricity.ValidityStartTime.HasValue && getElectricity.ValidityStartTime < DateTime.Now) + { + int days = 7; + if (getElectricity.ValidityEndTime.HasValue) + { + days = Convert.ToInt32((getElectricity.ValidityEndTime - getElectricity.ValidityStartTime).Value.TotalDays); + } + getElectricity.ValidityStartTime = DateTime.Now; + getElectricity.ValidityEndTime = DateTime.Now.AddDays(days); + } + } + } + else + { + getElectricity.States = Const.State_0; + } + db.SubmitChanges(); + } + } + #endregion if (!boolIsFlowEnd && !string.IsNullOrEmpty(newItem.NextOperaterId)) { List getUserIds = Funs.GetStrListByStr(newItem.NextOperaterId, ','); @@ -2291,6 +2764,7 @@ namespace BLL var getAllFlows = from x in db.License_FlowOperate where x.DataId == licenseInfo.LicenseId && (!x.IsFlowEnd.HasValue || x.IsFlowEnd == false) select x; + if (licenseInfo == null || string.IsNullOrEmpty(licenseInfo.LicenseId) || getAllFlows.Count() == 0) { getFlowOperate = (from x in db.Sys_MenuFlowOperate @@ -2617,6 +3091,17 @@ namespace BLL } #endregion + #region 临时用电作业票 + else if (newItem.MenuId == Const.ProjectElectricityMenuId) + { + var updateElectricity = db.License_Electricity.FirstOrDefault(x => x.ElectricityId == strLicenseId); + if (updateElectricity == null) + { + updateElectricity.NextManId = null; + updateElectricity.States = Const.State_C; + } + } + #endregion db.SubmitChanges(); } diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 91bcdee0..699a4762 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -291,6 +291,11 @@ namespace BLL /// public static string WorkPost_SafetyManager = "e426e560-9906-4aba-843e-2daef9ebeb05"; + /// + /// HSE副经理岗位Id + /// + public static string WorkPost_SafetyManagerFu = "46AA7960-1D35-4D5B-8C8F-AA4C874D63C8"; + /// /// 无损检测工岗位Id /// @@ -1946,6 +1951,10 @@ namespace BLL /// 吊装作业票 /// public const string ProjectLiftingWorkMenuId = "A1BE3AB6-9D4A-41E7-8870-E73423165451"; + /// + /// 临时用电作业票 + /// + public const string ProjectElectricityMenuId = "48F64E0F-38B2-4BDC-9B61-6200BD02CBF5"; #endregion #region HSSE检查管理 diff --git a/SGGL/BLL/HSSE/License/LicensePublicService.cs b/SGGL/BLL/HSSE/License/LicensePublicService.cs index cc73baf2..658271d8 100644 --- a/SGGL/BLL/HSSE/License/LicensePublicService.cs +++ b/SGGL/BLL/HSSE/License/LicensePublicService.cs @@ -76,6 +76,11 @@ namespace BLL CloseTime = fireWork.CloseTime, NextManId=fireWork.NextManId, States = fireWork.States, + + WorkAreaId=fireWork.WorkAreaId, + Reason=fireWork.Reason, + FireLevel=fireWork.FireLevel, + }; db.License_FireWork.InsertOnSubmit(newFireWork); db.SubmitChanges(); @@ -105,7 +110,11 @@ namespace BLL newFireWork.CloseReasons = fireWork.CloseReasons; newFireWork.CloseTime = fireWork.CloseTime; newFireWork.NextManId = fireWork.NextManId; - newFireWork.States = fireWork.States; + newFireWork.States = fireWork.States; + + newFireWork.WorkAreaId = fireWork.WorkAreaId; + newFireWork.Reason = fireWork.Reason; + newFireWork.FireLevel = fireWork.FireLevel; db.SubmitChanges(); } } @@ -172,6 +181,14 @@ namespace BLL CloseTime = heightWork.CloseTime, NextManId = heightWork.NextManId, States = heightWork.States, + + WorkAreaId=heightWork.WorkAreaId, + WorkHeight=heightWork.WorkHeight, + HeightLevel=heightWork.HeightLevel, + FireWatchManName=heightWork.FireWatchManName, + WorkLeaderName=heightWork.WorkLeaderName, + WorkLeaderTel= heightWork.WorkLeaderTel, + }; db.License_HeightWork.InsertOnSubmit(newHeightWork); db.SubmitChanges(); @@ -203,6 +220,13 @@ namespace BLL newHeightWork.CloseTime = heightWork.CloseTime; newHeightWork.NextManId = heightWork.NextManId; newHeightWork.States = heightWork.States; + + newHeightWork.WorkAreaId = heightWork.WorkAreaId; + newHeightWork.WorkHeight = heightWork.WorkHeight; + newHeightWork.HeightLevel = heightWork.HeightLevel; + newHeightWork.FireWatchManName = heightWork.FireWatchManName; + newHeightWork.WorkLeaderName = heightWork.WorkLeaderName; + newHeightWork.WorkLeaderTel = heightWork.WorkLeaderTel; db.SubmitChanges(); } } @@ -269,6 +293,16 @@ namespace BLL CloseTime = limitedSpace.CloseTime, NextManId = limitedSpace.NextManId, States = limitedSpace.States, + + WorkAreaId=limitedSpace.WorkAreaId, + LimitedDescribe=limitedSpace.LimitedDescribe, + IsBoolOther=limitedSpace.IsBoolOther, + IsBoolHarmfulGas=limitedSpace.IsBoolHarmfulGas, + TestResult=limitedSpace.TestResult, + TestDate=limitedSpace.TestDate, + TestPerson=limitedSpace.TestPerson, + VenStep=limitedSpace.VenStep, + }; db.License_LimitedSpace.InsertOnSubmit(newLimitedSpace); db.SubmitChanges(); @@ -299,6 +333,15 @@ namespace BLL newLimitedSpace.CloseTime = limitedSpace.CloseTime; newLimitedSpace.NextManId = limitedSpace.NextManId; newLimitedSpace.States = limitedSpace.States; + + newLimitedSpace.WorkAreaId = limitedSpace.WorkAreaId; + newLimitedSpace.LimitedDescribe = limitedSpace.LimitedDescribe; + newLimitedSpace.IsBoolOther = limitedSpace.IsBoolOther; + newLimitedSpace.IsBoolHarmfulGas = limitedSpace.IsBoolHarmfulGas; + newLimitedSpace.TestResult = limitedSpace.TestResult; + newLimitedSpace.TestDate = limitedSpace.TestDate; + newLimitedSpace.TestPerson = limitedSpace.TestPerson; + newLimitedSpace.VenStep = limitedSpace.VenStep; db.SubmitChanges(); } } @@ -368,6 +411,9 @@ namespace BLL CloseTime = radialWork.CloseTime, NextManId = radialWork.NextManId, States = radialWork.States, + + WorkAreaId=radialWork.WorkAreaId, + }; db.License_RadialWork.InsertOnSubmit(newRadialWork); db.SubmitChanges(); @@ -408,6 +454,8 @@ namespace BLL newRadialWork.CloseTime = radialWork.CloseTime; newRadialWork.NextManId = radialWork.NextManId; newRadialWork.States = radialWork.States; + + newRadialWork.WorkAreaId = radialWork.WorkAreaId; db.SubmitChanges(); } } @@ -476,6 +524,11 @@ namespace BLL CloseTime = openCircuit.CloseTime, NextManId = openCircuit.NextManId, States = openCircuit.States, + + WorkAreaId=openCircuit.WorkAreaId, + Reason=openCircuit.Reason, + FireWatchManName=openCircuit.FireWatchManName, + }; db.License_OpenCircuit.InsertOnSubmit(newOpenCircuit); db.SubmitChanges(); @@ -507,6 +560,10 @@ namespace BLL newOpenCircuit.CloseTime = openCircuit.CloseTime; newOpenCircuit.NextManId = openCircuit.NextManId; newOpenCircuit.States = openCircuit.States; + + newOpenCircuit.WorkAreaId = openCircuit.WorkAreaId; + newOpenCircuit.Reason = openCircuit.Reason; + newOpenCircuit.FireWatchManName = openCircuit.FireWatchManName; db.SubmitChanges(); } } @@ -572,6 +629,11 @@ namespace BLL CloseTime = breakGround.CloseTime, NextManId = breakGround.NextManId, States = breakGround.States, + + WorkAreaId=breakGround.WorkAreaId, + Reason=breakGround.Reason, + FireWatchManName=breakGround.FireWatchManName, + }; db.License_BreakGround.InsertOnSubmit(newBreakGround); db.SubmitChanges(); @@ -602,6 +664,10 @@ namespace BLL newBreakGround.CloseTime = breakGround.CloseTime; newBreakGround.NextManId = breakGround.NextManId; newBreakGround.States = breakGround.States; + + newBreakGround.WorkAreaId = breakGround.WorkAreaId; + newBreakGround.Reason = breakGround.Reason; + newBreakGround.FireWatchManName = breakGround.FireWatchManName; db.SubmitChanges(); } } @@ -771,6 +837,15 @@ namespace BLL CloseTime = liftingWork.CloseTime, NextManId = liftingWork.NextManId, States = liftingWork.States, + + WorkAreaId=liftingWork.WorkAreaId, + LiftingHeight=liftingWork.LiftingHeight, + FireWatchManName=liftingWork.FireWatchManName, + WorkLeaderName=liftingWork.WorkLeaderName, + WorkLeaderTel=liftingWork.WorkLeaderTel, + QzgName=liftingWork.QzgName, + QzgPhone=liftingWork.QzgPhone, + }; db.License_LiftingWork.InsertOnSubmit(newLiftingWork); db.SubmitChanges(); @@ -802,6 +877,14 @@ namespace BLL newLiftingWork.CloseTime = liftingWork.CloseTime; newLiftingWork.NextManId = liftingWork.NextManId; newLiftingWork.States = liftingWork.States; + + newLiftingWork.WorkAreaId = liftingWork.WorkAreaId; + newLiftingWork.LiftingHeight = liftingWork.LiftingHeight; + newLiftingWork.FireWatchManName = liftingWork.FireWatchManName; + newLiftingWork.WorkLeaderName = liftingWork.WorkLeaderName; + newLiftingWork.WorkLeaderTel = liftingWork.WorkLeaderTel; + newLiftingWork.QzgName = liftingWork.QzgName; + newLiftingWork.QzgPhone = liftingWork.QzgPhone; db.SubmitChanges(); } } @@ -828,6 +911,117 @@ namespace BLL } #endregion + #region 临时用电作业票 + /// + /// 根据主键获取临时用电作业票 + /// + /// + /// + public static Model.License_Electricity GetElectricityById(string ElectricityId) + { + return Funs.DB.License_Electricity.FirstOrDefault(e => e.ElectricityId == ElectricityId); + } + + /// + /// 添加临时用电作业票 + /// + /// + public static void AddElectricity(Model.License_Electricity Electricity) + { + Model.SGGLDB db = Funs.DB; + Model.License_Electricity newElectricity = new Model.License_Electricity + { + ElectricityId = Electricity.ElectricityId, + ProjectId = Electricity.ProjectId, + LicenseCode = Electricity.LicenseCode, + ApplyUnitId = Electricity.ApplyUnitId, + ApplyManId = Electricity.ApplyManId, + ApplyDate = Electricity.ApplyDate, + WorkPalce = Electricity.WorkPalce, + WorkDepth = Electricity.WorkDepth, + ValidityStartTime = Electricity.ValidityStartTime, + ValidityEndTime = Electricity.ValidityEndTime, + WorkMeasures = Electricity.WorkMeasures, + CancelManId = Electricity.CancelManId, + CancelReasons = Electricity.CancelReasons, + CancelTime = Electricity.CancelTime, + CloseManId = Electricity.CloseManId, + CloseReasons = Electricity.CloseReasons, + CloseTime = Electricity.CloseTime, + NextManId = Electricity.NextManId, + States = Electricity.States, + + WorkAreaId= Electricity.WorkAreaId, + Reason = Electricity.Reason, + FireWatchManName = Electricity.FireWatchManName, + WorkLeaderName = Electricity.WorkLeaderName, + WorkLeaderTel = Electricity.WorkLeaderTel, + + + }; + db.License_Electricity.InsertOnSubmit(newElectricity); + db.SubmitChanges(); + ////增加一条编码记录 + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectElectricityMenuId, Electricity.ProjectId, Electricity.ApplyUnitId, Electricity.ElectricityId, Electricity.ApplyDate); + } + + /// + /// 修改临时用电作业票 + /// + /// + public static void UpdateElectricity(Model.License_Electricity Electricity) + { + Model.SGGLDB db = Funs.DB; + Model.License_Electricity newElectricity = db.License_Electricity.FirstOrDefault(e => e.ElectricityId == Electricity.ElectricityId); + if (newElectricity != null) + { + newElectricity.WorkPalce = Electricity.WorkPalce; + newElectricity.WorkDepth = Electricity.WorkDepth; + newElectricity.ValidityStartTime = Electricity.ValidityStartTime; + newElectricity.ValidityEndTime = Electricity.ValidityEndTime; + newElectricity.WorkMeasures = Electricity.WorkMeasures; + newElectricity.CancelManId = Electricity.CancelManId; + newElectricity.CancelReasons = Electricity.CancelReasons; + newElectricity.CancelTime = Electricity.CancelTime; + newElectricity.CloseManId = Electricity.CloseManId; + newElectricity.CloseReasons = Electricity.CloseReasons; + newElectricity.CloseTime = Electricity.CloseTime; + newElectricity.NextManId = Electricity.NextManId; + newElectricity.States = Electricity.States; + + newElectricity.WorkAreaId = Electricity.WorkAreaId; + newElectricity.Reason = Electricity.Reason; + newElectricity.FireWatchManName = Electricity.FireWatchManName; + newElectricity.WorkLeaderName = Electricity.WorkLeaderName; + newElectricity.WorkLeaderTel = Electricity.WorkLeaderTel; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除临时用电作业票 + /// + /// + public static void DeleteElectricityById(string ElectricityId) + { + Model.SGGLDB db = Funs.DB; + Model.License_Electricity Electricity = db.License_Electricity.FirstOrDefault(e => e.ElectricityId == ElectricityId); + if (Electricity != null) + { + ///删除编码表记录 + CodeRecordsService.DeleteCodeRecordsByDataId(ElectricityId); + ////删除附件 + CommonService.DeleteAttachFileById(ElectricityId); + ///删除-安全措施 + DeleteLicenseItemByDataId(ElectricityId); + ///删除作业票审核信息 + DeleteFlowOperateByDataId(ElectricityId); + db.License_Electricity.DeleteOnSubmit(Electricity); + db.SubmitChanges(); + } + } + #endregion + #endregion #region 作业票-安全措施 diff --git a/SGGL/BLL/HSSE/SitePerson/PersonService.cs b/SGGL/BLL/HSSE/SitePerson/PersonService.cs index 157e8e6e..0abd26a6 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonService.cs @@ -397,7 +397,10 @@ namespace BLL /// HSE人员的数量 public static int GetHSEPersonCountByUnitId(string unitId, string projectId) { - var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && (x.WorkPostId == BLL.Const.WorkPost_HSSEEngineer || x.WorkPostId == BLL.Const.WorkPost_SafetyManager) && x.IsUsed == true select x).ToList(); + var q = (from x in Funs.DB.SitePerson_Person + join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId + where x.UnitId == unitId && x.ProjectId == projectId && y.IsHsse==true && x.IsUsed == true select x).ToList(); + //var q = (from x in Funs.DB.SitePerson_Person where x.UnitId == unitId && x.ProjectId == projectId && (x.WorkPostId == BLL.Const.WorkPost_HSSEEngineer || x.WorkPostId == BLL.Const.WorkPost_SafetyManager) && x.IsUsed == true select x).ToList(); return q.Count(); } diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 4e4b636f..60ca25c6 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1062,6 +1062,8 @@ + + @@ -11599,6 +11601,20 @@ BreakGroundView.aspx + + Electricity.aspx + ASPXCodeBehind + + + Electricity.aspx + + + ElectricityView.aspx + ASPXCodeBehind + + + ElectricityView.aspx + EquipmentSafetyList.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx new file mode 100644 index 00000000..11b0ccba --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx @@ -0,0 +1,122 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Electricity.aspx.cs" Inherits="FineUIPro.Web.HSSE.License.Electricity" %> + + + + + + + 临时用电作业票 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.cs new file mode 100644 index 00000000..0d69be05 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.cs @@ -0,0 +1,1077 @@ +using Aspose.Words; +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; + +namespace FineUIPro.Web.HSSE.License +{ + public partial class Electricity : PageBase + { + #region 项目主键 + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ////权限按钮方法 + this.GetButtonPower(); + this.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) + { + this.ProjectId = Request.Params["projectId"]; + } + + UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, true); + if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) + { + this.drpUnit.SelectedValue = this.CurrUser.UnitId; + this.drpUnit.Enabled = false; + } + + this.drpStates.DataValueField = "Value"; + this.drpStates.DataTextField = "Text"; + this.drpStates.DataSource = LicensePublicService.drpStatesItem(); + this.drpStates.DataBind(); + this.drpStates.SelectedValue = Const._Null; + if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) + { + Grid1.PageSize = this.CurrUser.PageSize.Value; + } + this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = "SELECT license.ElectricityId,license.ProjectId,license.LicenseCode,license.ApplyUnitId,ApplyUnit.UnitName AS ApplyUnitName,license.ApplyManId,license.ApplyDate,license.WorkPalce,license.ValidityStartTime,license.ValidityEndTime,license.WorkMeasures,license.WorkDepth,license.States,license.WorkLeaderTel,license.WorkLeaderName" + + @" ,(CASE WHEN license.States=0 THEN '待提交' WHEN license.States=1 THEN '审核中' WHEN license.States=2 THEN '作业中' WHEN license.States=3 THEN '已关闭' WHEN license.States=-1 THEN '已取消' ELSE '未知' END) AS StatesName " + + @" FROM dbo.License_Electricity AS license " + + @" LEFT JOIN Base_Unit AS ApplyUnit ON license.ApplyUnitId =ApplyUnit.UnitId" + + @" WHERE license.ProjectId= '" + this.ProjectId + "'"; + List listStr = new List(); + + if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId)) + { + strSql += " AND license.ApplyUnitId = @UnitId"; ///状态为已完成 + listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId)); + } + if (this.drpUnit.SelectedValue != Const._Null) + { + strSql += " AND license.ApplyUnitId = @UnitId2"; + listStr.Add(new SqlParameter("@UnitId2", this.drpUnit.SelectedValue)); + } + if (!string.IsNullOrEmpty(this.drpStates.SelectedValue) && this.drpStates.SelectedValue != Const._Null) + { + strSql += " AND license.States = @States"; + listStr.Add(new SqlParameter("@States", this.drpStates.SelectedValue)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 编辑 + /// + /// 双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.EditData(); + } + + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuView_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string id = Grid1.SelectedRowID; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ElectricityView.aspx?ElectricityId={0}", id, "查看 - "))); + } + #endregion + + #region 删除 + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var Electricity = LicensePublicService.GetElectricityById(rowID); + if (Electricity != null) + { + LogService.AddSys_Log(this.CurrUser, Electricity.LicenseCode, Electricity.ElectricityId, Const.ProjectElectricityMenuId, Const.BtnDelete); + LicensePublicService.DeleteElectricityById(rowID); + } + } + + this.BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectElectricityMenuId); + if (buttonList.Count() > 0) + { + //if (buttonList.Contains(BLL.Const.BtnAdd)) + //{ + // this.btnNew.Hidden = false; + //} + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuView.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("动土作业票" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + + #region 打印 + protected void btnPrinter_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string Id = Grid1.SelectedRowID; + + string rootPath = Server.MapPath("~/"); + string initTemplatePath = string.Empty; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + string filePath = string.Empty; + initTemplatePath = "File\\Word\\HSSE\\动土作业票.doc"; + uploadfilepath = rootPath + initTemplatePath; + newUrl = uploadfilepath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".doc"); + filePath = initTemplatePath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".pdf"); + File.Copy(uploadfilepath, newUrl); + ///更新书签 + var getElectricity = LicensePublicService.GetElectricityById(Id); + Document doc = new Aspose.Words.Document(newUrl); + Bookmark bookmarkLicenseCode = doc.Range.Bookmarks["LicenseCode"];//编号 + if (bookmarkLicenseCode != null) + { + if (getElectricity != null) + { + bookmarkLicenseCode.Text = getElectricity.LicenseCode; + } + } + Bookmark bookmarkApplyManName = doc.Range.Bookmarks["ApplyManName"];//申请人 + if (bookmarkApplyManName != null) + { + if (getElectricity != null) + { + var getUser = UserService.GetUserByUserId(getElectricity.ApplyManId); + if (getUser != null) + { + bookmarkApplyManName.Text = getUser.UserName; + } + + + } + } + Bookmark bookmarkUnitName = doc.Range.Bookmarks["UnitName"];//申请单位 + if (bookmarkUnitName != null) + { + if (getElectricity != null) + { + if (!string.IsNullOrEmpty(getElectricity.ApplyUnitId)) + { + bookmarkUnitName.Text = BLL.UnitService.GetUnitNameByUnitId(getElectricity.ApplyUnitId); + } + + } + } + Bookmark bookmarkWorkPalce = doc.Range.Bookmarks["WorkPalce"];//作业地点 + if (bookmarkWorkPalce != null) + { + if (getElectricity != null) + { + bookmarkWorkPalce.Text = getElectricity.WorkPalce; + + } + } + Bookmark bookmarkWorkDepth = doc.Range.Bookmarks["WorkDepth"];//开挖深度 + if (bookmarkWorkDepth != null) + { + if (getElectricity != null) + { + bookmarkWorkDepth.Text = getElectricity.WorkDepth; + + } + } + Bookmark bookmarkValidityDate = doc.Range.Bookmarks["ValidityDate"];//有效期限 + if (bookmarkValidityDate != null) + { + if (getElectricity != null) + { + if (getElectricity.ValidityStartTime.HasValue) + { + + bookmarkValidityDate.Text = getElectricity.ValidityStartTime.Value.Year + "年" + getElectricity.ValidityStartTime.Value.Month + "月" + getElectricity.ValidityStartTime.Value.Day + "日" + getElectricity.ValidityStartTime.Value.Hour + "时至"; + if (getElectricity.ValidityEndTime.HasValue) + { + bookmarkValidityDate.Text += getElectricity.ValidityEndTime.Value.Year + "年" + getElectricity.ValidityEndTime.Value.Month + "月" + getElectricity.ValidityEndTime.Value.Day + "日" + getElectricity.ValidityEndTime.Value.Hour + "时"; + } + } + } + } + Bookmark bookmarkWorkMeasures = doc.Range.Bookmarks["WorkMeasures"];//作业内容 + if (bookmarkWorkMeasures != null) + { + if (getElectricity != null) + { + bookmarkWorkMeasures.Text = getElectricity.WorkMeasures; + + } + } + + + + + var GetLicenseItemList = LicensePublicService.GetLicenseItemListByDataId(Id); + if (GetLicenseItemList.Count > 0) + { + var item1 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 1); + if (item1 != null) + { + if (item1.IsUsed == true) + { + Bookmark bookmarkUser1 = doc.Range.Bookmarks["User1"];//确认执行 + if (bookmarkUser1 != null) + { + bookmarkUser1.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit1 = doc.Range.Bookmarks["IsFit1"]; + if (bookmarkIsFit1 != null) + { + if (item1 != null) + { + bookmarkIsFit1.Text = "×"; + } + } + } + } + + + + var item2 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 2); + if (item2 != null) + { + if (item2.IsUsed == true) + { + Bookmark bookmarkUser2 = doc.Range.Bookmarks["User2"];//确认执行 + if (bookmarkUser2 != null) + { + bookmarkUser2.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit2 = doc.Range.Bookmarks["IsFit2"]; + if (bookmarkIsFit2 != null) + { + if (item2 != null) + { + bookmarkIsFit2.Text = "×"; + } + } + } + } + var item3 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 3); + if (item3 != null) + { + if (item3.IsUsed == true) + { + Bookmark bookmarkUser3 = doc.Range.Bookmarks["User3"];//确认执行 + if (bookmarkUser3 != null) + { + bookmarkUser3.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit3 = doc.Range.Bookmarks["IsFit3"]; + if (bookmarkIsFit3 != null) + { + if (item3 != null) + { + bookmarkIsFit3.Text = "×"; + } + } + } + } + + var item4 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 4); + if (item4 != null) + { + if (item4.IsUsed == true) + { + Bookmark bookmarkUser4 = doc.Range.Bookmarks["User4"];//确认执行 + if (bookmarkUser4 != null) + { + bookmarkUser4.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit4 = doc.Range.Bookmarks["IsFit4"]; + if (bookmarkIsFit4 != null) + { + if (item4 != null) + { + bookmarkIsFit4.Text = "×"; + } + } + } + } + var item5 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 5); + if (item5 != null) + { + if (item5.IsUsed == true) + { + Bookmark bookmarkUser5 = doc.Range.Bookmarks["User5"];//确认执行 + if (bookmarkUser5 != null) + { + bookmarkUser5.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit5 = doc.Range.Bookmarks["IsFit5"]; + if (bookmarkIsFit5 != null) + { + if (item5 != null) + { + bookmarkIsFit5.Text = "×"; + } + } + } + } + + var item6 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 6); + if (item6 != null) + { + if (item6.IsUsed == true) + { + Bookmark bookmarkUser6 = doc.Range.Bookmarks["User6"];//确认执行 + if (bookmarkUser6 != null) + { + bookmarkUser6.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit6 = doc.Range.Bookmarks["IsFit6"]; + if (bookmarkIsFit6 != null) + { + if (item6 != null) + { + bookmarkIsFit6.Text = "×"; + } + } + } + } + var item7 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 7); + if (item7 != null) + { + if (item7.IsUsed == true) + { + Bookmark bookmarkUser7 = doc.Range.Bookmarks["User7"];//确认执行 + if (bookmarkUser7 != null) + { + bookmarkUser7.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit7 = doc.Range.Bookmarks["IsFit7"]; + if (bookmarkIsFit7 != null) + { + if (item7 != null) + { + bookmarkIsFit7.Text = "×"; + } + } + } + } + + var item8 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 8); + if (item8 != null) + { + if (item8.IsUsed == true) + { + Bookmark bookmarkUser8 = doc.Range.Bookmarks["User8"];//确认执行 + if (bookmarkUser8 != null) + { + bookmarkUser8.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit8 = doc.Range.Bookmarks["IsFit8"]; + if (bookmarkIsFit8 != null) + { + if (item8 != null) + { + bookmarkIsFit8.Text = "×"; + } + } + } + } + + var item9 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 9); + if (item9 != null) + { + if (item9.IsUsed == true) + { + Bookmark bookmarkUser9 = doc.Range.Bookmarks["User9"];//确认执行 + if (bookmarkUser9 != null) + { + bookmarkUser9.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit9 = doc.Range.Bookmarks["IsFit9"]; + if (bookmarkIsFit9 != null) + { + if (item9 != null) + { + bookmarkIsFit9.Text = "×"; + } + } + } + } + + var item10 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 10); + if (item10 != null) + { + if (item10.IsUsed == true) + { + Bookmark bookmarkUser10 = doc.Range.Bookmarks["User10"];//确认执行 + if (bookmarkUser10 != null) + { + bookmarkUser10.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit10 = doc.Range.Bookmarks["IsFit10"]; + if (bookmarkIsFit10 != null) + { + if (item10 != null) + { + bookmarkIsFit10.Text = "×"; + } + } + } + } + var item11 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 11); + if (item11 != null) + { + if (item11.IsUsed == true) + { + Bookmark bookmarkUser11 = doc.Range.Bookmarks["User11"];//确认执行 + if (bookmarkUser11 != null) + { + bookmarkUser11.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit11 = doc.Range.Bookmarks["IsFit11"]; + if (bookmarkIsFit11 != null) + { + if (item11 != null) + { + bookmarkIsFit11.Text = "×"; + } + } + } + } + + var item12 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 12); + if (item12 != null) + { + if (item12.IsUsed == true) + { + Bookmark bookmarkUser12 = doc.Range.Bookmarks["User12"];//确认执行 + if (bookmarkUser12 != null) + { + bookmarkUser12.Text = "√"; + } + } + else + { + Bookmark bookmarkIsFit12 = doc.Range.Bookmarks["IsFit12"]; + if (bookmarkIsFit12 != null) + { + if (item12 != null) + { + bookmarkIsFit12.Text = "×"; + } + } + } + } + + + } + //审核记录 + var getFlows = LicensePublicService.GetFlowOperateListByDataId(Id); + if (getFlows.Count() > 0) + { + var getF1 = getFlows.FirstOrDefault(x => x.SortIndex == 1); + if (getF1 != null) + { + var getUser = UserService.GetUserByUserId(getF1.OperaterId); + Bookmark bookmarkOpinion1 = doc.Range.Bookmarks["Opinion1"]; + if (bookmarkOpinion1 != null) + { + + + if (getUser != null) + { + if (getF1.IsAgree == true) + { + bookmarkOpinion1.Text = getF1.Opinion; + } + else + { + bookmarkOpinion1.Text = "不同意: " + getF1.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan1 = doc.Range.Bookmarks["OperaterMan1"]; + if (bookmarkOperaterMan1 != null) + { + if (getF1.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan1"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan1.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime1 = doc.Range.Bookmarks["OperaterTime1"]; + if (bookmarkOperaterTime1 != null) + { + if (getF1.OperaterTime.HasValue) + { + bookmarkOperaterTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); + } + } + } + var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + if (getF2 != null) + { + var getUser = UserService.GetUserByUserId(getF2.OperaterId); + Bookmark bookmarkOpinion2 = doc.Range.Bookmarks["Opinion2"]; + if (bookmarkOpinion2 != null) + { + + + if (getUser != null) + { + if (getF2.IsAgree == true) + { + bookmarkOpinion2.Text = getF2.Opinion; + } + else + { + bookmarkOpinion2.Text = "不同意: " + getF2.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan2 = doc.Range.Bookmarks["OperaterMan2"]; + if (bookmarkOperaterMan2 != null) + { + if (getF2.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan2"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan2.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime2 = doc.Range.Bookmarks["OperaterTime2"]; + if (bookmarkOperaterTime2 != null) + { + if (getF2.OperaterTime.HasValue) + { + bookmarkOperaterTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + } + } + } + var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + if (getF3 != null) + { + var getUser = UserService.GetUserByUserId(getF3.OperaterId); + Bookmark bookmarkOpinion3 = doc.Range.Bookmarks["Opinion3"]; + if (bookmarkOpinion3 != null) + { + + + if (getUser != null) + { + if (getF3.IsAgree == true) + { + bookmarkOpinion3.Text = getF3.Opinion; + } + else + { + bookmarkOpinion3.Text = "不同意: " + getF3.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan3 = doc.Range.Bookmarks["OperaterMan3"]; + if (bookmarkOperaterMan3 != null) + { + if (getF3.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan3"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan3.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime3 = doc.Range.Bookmarks["OperaterTime3"]; + if (bookmarkOperaterTime3 != null) + { + if (getF3.OperaterTime.HasValue) + { + bookmarkOperaterTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + } + } + } + var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); + if (getF4 != null) + { + var getUser = UserService.GetUserByUserId(getF4.OperaterId); + Bookmark bookmarkOpinion4 = doc.Range.Bookmarks["Opinion4"]; + if (bookmarkOpinion4 != null) + { + + + if (getUser != null) + { + if (getF4.IsAgree == true) + { + bookmarkOpinion4.Text = getF4.Opinion; + } + else + { + bookmarkOpinion4.Text = "不同意: " + getF4.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan4 = doc.Range.Bookmarks["OperaterMan4"]; + if (bookmarkOperaterMan4 != null) + { + if (getF4.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan4"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan4.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime4 = doc.Range.Bookmarks["OperaterTime4"]; + if (bookmarkOperaterTime4 != null) + { + if (getF4.OperaterTime.HasValue) + { + bookmarkOperaterTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + } + } + } + var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + if (getF5 != null) + { + var getUser = UserService.GetUserByUserId(getF5.OperaterId); + Bookmark bookmarkOpinion5 = doc.Range.Bookmarks["Opinion5"]; + if (bookmarkOpinion5 != null) + { + + + if (getUser != null) + { + if (getF5.IsAgree == true) + { + bookmarkOpinion5.Text = getF5.Opinion; + } + else + { + bookmarkOpinion5.Text = "不同意: " + getF5.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan5 = doc.Range.Bookmarks["OperaterMan5"]; + if (bookmarkOperaterMan5 != null) + { + if (getF5.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan5"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan5.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime5 = doc.Range.Bookmarks["OperaterTime5"]; + if (bookmarkOperaterTime5 != null) + { + if (getF5.OperaterTime.HasValue) + { + bookmarkOperaterTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + } + } + } + var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); + if (getF6 != null) + { + var getUser = UserService.GetUserByUserId(getF6.OperaterId); + Bookmark bookmarkOpinion6 = doc.Range.Bookmarks["Opinion6"]; + if (bookmarkOpinion6 != null) + { + + + if (getUser != null) + { + if (getF6.IsAgree == true) + { + bookmarkOpinion6.Text = getF6.Opinion; + } + else + { + bookmarkOpinion6.Text = "不同意: " + getF6.Opinion; + } + } + + + } + Bookmark bookmarkOperaterMan6 = doc.Range.Bookmarks["OperaterMan6"]; + if (bookmarkOperaterMan6 != null) + { + if (getF6.OperaterTime.HasValue) + { + if (getUser != null) + { + DocumentBuilder builders = new DocumentBuilder(doc); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builders.MoveToBookmark("OperaterMan6"); + builders.InsertImage(file, 80, 20); + } + else + { + bookmarkOperaterMan6.Text = getUser.UserName; + } + } + } + } + Bookmark bookmarkOperaterTime6 = doc.Range.Bookmarks["OperaterTime6"]; + if (bookmarkOperaterTime6 != null) + { + if (getF6.OperaterTime.HasValue) + { + bookmarkOperaterTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + } + } + } + } + + Bookmark bookmarkCance = doc.Range.Bookmarks["Cancel"];//取消 + if (bookmarkCance != null) + { + if (getElectricity != null) + { + if (!string.IsNullOrEmpty(getElectricity.CancelManId)) + { + var getUser = UserService.GetUserByUserId(getElectricity.CancelManId); + if (getUser != null) + { + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + DocumentBuilder builders = new DocumentBuilder(doc); + builders.MoveToBookmark("Cancel"); + builders.InsertImage(file, 80, 20); + builders.Write("取消原因:" + getElectricity.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CancelTime)); + } + else + { + bookmarkCance.Text = getUser.UserName + " 取消原因:" + getElectricity.CancelReasons + " 取消时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CancelTime); + } + } + } + } + } + + Bookmark bookmarkClose = doc.Range.Bookmarks["Close"];//关闭 + if (bookmarkClose != null) + { + if (getElectricity != null) + { + if (!string.IsNullOrEmpty(getElectricity.CloseManId)) + { + var getUser = UserService.GetUserByUserId(getElectricity.CloseManId); + if (getUser != null) + { + if (!string.IsNullOrEmpty(getElectricity.CloseReasons)) + { + bookmarkClose.Text = getElectricity.CloseReasons + " 关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CloseTime) + "。"; + } + else if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + DocumentBuilder builders = new DocumentBuilder(doc); + builders.MoveToBookmark("Close"); + builders.InsertImage(file, 80, 20); + builders.Write("关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CloseTime)); + } + else + { + bookmarkClose.Text = getUser.UserName + " 关闭时间:" + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CloseTime); + } + } + } + } + } + + doc.Save(newUrl); + //生成PDF文件 + string pdfUrl = newUrl.Replace(".doc", ".pdf"); + Document doc1 = new Aspose.Words.Document(newUrl); + //验证参数 + if (doc1 == null) { throw new Exception("Word文件无效"); } + doc1.Save(pdfUrl, Aspose.Words.SaveFormat.Pdf);//还可以改成其它格式 + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(pdfUrl); + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(pdfUrl, 0, fileSize); + Response.Flush(); + Response.Close(); + File.Delete(newUrl); + File.Delete(pdfUrl); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.designer.cs new file mode 100644 index 00000000..eb4c8753 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/Electricity.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class Electricity + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpStates 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList drpStates; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuView; + + /// + /// btnPrinter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnPrinter; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx new file mode 100644 index 00000000..26a48405 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx @@ -0,0 +1,259 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ElectricityView.aspx.cs" Inherits="FineUIPro.Web.HSSE.License.ElectricityView" %> + + + + + + + 临时用电作业票 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.cs new file mode 100644 index 00000000..557d14e9 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.cs @@ -0,0 +1,242 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.HSSE.License +{ + public partial class ElectricityView : PageBase + { + #region 定义项 + /// + /// 主键 + /// + private string ElectricityId + { + get + { + return (string)ViewState["ElectricityId"]; + } + set + { + ViewState["ElectricityId"] = value; + } + } + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.SimpleForm1.Title = UnitService.GetUnitNameByUnitId(Const.UnitId_CWCEC) + this.Title; + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + this.ElectricityId = Request.Params["ElectricityId"]; + if (!string.IsNullOrEmpty(this.ElectricityId)) + { + var getElectricity = LicensePublicService.GetElectricityById(this.ElectricityId); + if (getElectricity != null) + { + this.lbLicenseCode.Text = getElectricity.LicenseCode; + this.txtApplyUnit.Text = UnitService.GetUnitNameByUnitId(getElectricity.ApplyUnitId); + this.txtApplyManName.Text = UserService.GetUserNameByUserId(getElectricity.ApplyManId); + this.txtWorkPalce.Text = getElectricity.WorkPalce; + this.txtReason.Text = getElectricity.Reason; + if (getElectricity.ValidityStartTime.HasValue) + { + this.txtWorkDate.Text = getElectricity.ValidityStartTime.Value.ToString("f") + " 至 "; + if (getElectricity.ValidityEndTime.HasValue) + { + this.txtWorkDate.Text += getElectricity.ValidityEndTime.Value.ToString("f"); + } + } + this.txtWorkMeasures.Text = getElectricity.WorkMeasures; + if (!string.IsNullOrEmpty(getElectricity.CancelManId)) + { + this.txtCance.Text = UserService.GetUserNameByUserId(getElectricity.CancelManId) + ";取消时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CancelTime) + ";原因:" + getElectricity.CancelReasons + "。"; + } + if (!string.IsNullOrEmpty(getElectricity.CloseManId)) + { + if (!string.IsNullOrEmpty(getElectricity.CloseReasons)) + { + this.txtClose.Text = getElectricity.CloseReasons + " 关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CloseTime) + "。"; + } + else + { + this.txtClose.Text = UserService.GetUserNameByUserId(getElectricity.CloseManId) + ";关闭时间:" + + string.Format("{0:yyyy-MM-dd HH:mm}", getElectricity.CloseTime) + "。"; + } + } + } + } + // 绑定表格 + this.BindGrid(); + this.SetFlow(); + } + } + #endregion + + #region 获取审核记录信息 + /// + /// + /// + private void SetFlow() + { + var getFlows = LicensePublicService.GetFlowOperateListByDataId(this.ElectricityId); + if (getFlows.Count() > 0) + { + var getF1 = getFlows.FirstOrDefault(x => x.SortIndex == 1); + if (getF1 != null) + { + this.txtForm1.Title = getF1.AuditFlowName + ":"; + if (getF1.OperaterTime.HasValue) + { + if (getF1.IsAgree == true) + { + this.txtOpinion1.Text = "同意。"; + } + else + { + this.txtOpinion1.Text = getF1.Opinion; + } + this.txtName1.Text = UserService.GetUserNameByUserId(getF1.OperaterId); + this.txtTime1.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF1.OperaterTime); + } + } + var getF2 = getFlows.FirstOrDefault(x => x.SortIndex == 2); + if (getF2 != null) + { + this.txtForm2.Title = getF2.AuditFlowName + ":"; + if (getF2.OperaterTime.HasValue) + { + if (getF2.IsAgree == true) + { + this.txtOpinion2.Text = "同意。"; + } + else + { + this.txtOpinion2.Text = getF2.Opinion; + } + this.txtName2.Text = UserService.GetUserNameByUserId(getF2.OperaterId); + this.txtTime2.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF2.OperaterTime); + } + } + var getF3 = getFlows.FirstOrDefault(x => x.SortIndex == 3); + if (getF3 != null) + { + this.txtForm3.Title = getF3.AuditFlowName + ":"; + if (getF3.OperaterTime.HasValue) + { + if (getF3.IsAgree == true) + { + this.txtOpinion3.Text = "同意。"; + } + else + { + this.txtOpinion3.Text = getF3.Opinion; + } + this.txtName3.Text = UserService.GetUserNameByUserId(getF3.OperaterId); + this.txtTime3.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF3.OperaterTime); + } + } + var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4); + if (getF4 != null) + { + this.txtForm4.Title = getF4.AuditFlowName + ":"; + if (getF4.OperaterTime.HasValue) + { + if (getF4.IsAgree == true) + { + this.txtOpinion4.Text = "同意。"; + } + else + { + this.txtOpinion4.Text = getF4.Opinion; + } + this.txtName4.Text = UserService.GetUserNameByUserId(getF4.OperaterId); + this.txtTime4.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF4.OperaterTime); + } + } + var getF5 = getFlows.FirstOrDefault(x => x.SortIndex == 5); + if (getF5 != null) + { + this.txtForm5.Title = getF5.AuditFlowName + ":"; + if (getF5.OperaterTime.HasValue) + { + if (getF5.IsAgree == true) + { + this.txtOpinion5.Text = "同意。"; + } + else + { + this.txtOpinion5.Text = getF5.Opinion; + } + this.txtName5.Text = UserService.GetUserNameByUserId(getF5.OperaterId); + this.txtTime5.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF5.OperaterTime); + } + } + var getF6 = getFlows.FirstOrDefault(x => x.SortIndex == 6); + if (getF6 != null) + { + this.txtForm6.Title = getF6.AuditFlowName + ":"; + if (getF6.OperaterTime.HasValue) + { + if (getF6.IsAgree == true) + { + this.txtOpinion6.Text = "同意。"; + } + else + { + this.txtOpinion6.Text = getF6.Opinion; + } + this.txtName6.Text = UserService.GetUserNameByUserId(getF6.OperaterId); + this.txtTime6.Text = string.Format("{0:yyyy-MM-dd HH:mm}", getF6.OperaterTime); + } + } + } + } + #endregion + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = @"SELECT LicenseItemId,DataId,SortIndex,SafetyMeasures,(CASE WHEN IsUsed = 1 THEN '适用' ELSE '不适用' END) AS NoUsedName,ConfirmManId,U.UserName AS ConfirmManName" + + @" FROM License_LicenseItem AS L " + + @" LEFT JOIN Sys_User AS U ON L.ConfirmManId =U.UserId" + + @" WHERE L.DataId ='" + this.ElectricityId + "'"; + List listStr = new List(); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 附件查看 + /// + /// 附件查看 + /// + /// + /// + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.ElectricityId)) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&menuId={1}&type=-1", this.ElectricityId, Const.ProjectElectricityMenuId))); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.designer.cs new file mode 100644 index 00000000..586573d5 --- /dev/null +++ b/SGGL/FineUIPro.Web/HSSE/License/ElectricityView.aspx.designer.cs @@ -0,0 +1,467 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HSSE.License +{ + + + public partial class ElectricityView + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// lbLicenseCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbLicenseCode; + + /// + /// lbImageUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbImageUrl; + + /// + /// txtApplyUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApplyUnit; + + /// + /// txtApplyManName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtApplyManName; + + /// + /// txtWorkPalce 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkPalce; + + /// + /// txtReason 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtReason; + + /// + /// txtWorkDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkDate; + + /// + /// txtWorkMeasures 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkMeasures; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm1; + + /// + /// txtOpinion1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion1; + + /// + /// Label6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label6; + + /// + /// txtName1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName1; + + /// + /// txtTime1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime1; + + /// + /// txtForm2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm2; + + /// + /// txtOpinion2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtName2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName2; + + /// + /// txtTime2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime2; + + /// + /// txtForm3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm3; + + /// + /// txtOpinion3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion3; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label2; + + /// + /// txtName3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName3; + + /// + /// txtTime3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime3; + + /// + /// txtForm4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm4; + + /// + /// txtOpinion4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion4; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label5; + + /// + /// txtName4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName4; + + /// + /// txtTime4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime4; + + /// + /// txtForm5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm5; + + /// + /// txtOpinion5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion5; + + /// + /// Label9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label9; + + /// + /// txtName5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName5; + + /// + /// txtTime5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime5; + + /// + /// txtForm6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form txtForm6; + + /// + /// txtOpinion6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion6; + + /// + /// Label12 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label12; + + /// + /// txtName6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtName6; + + /// + /// txtTime6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTime6; + + /// + /// txtCance 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCance; + + /// + /// txtClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtClose; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// lbTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTemp; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + } +} diff --git a/SGGL/FineUIPro.Web/common/mainProject2.aspx b/SGGL/FineUIPro.Web/common/mainProject2.aspx index 9043f130..66316df1 100644 --- a/SGGL/FineUIPro.Web/common/mainProject2.aspx +++ b/SGGL/FineUIPro.Web/common/mainProject2.aspx @@ -1,1297 +1,1012 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mainProject2.aspx.cs" Inherits="FineUIPro.Web.common.mainProject2" %> +using BLL; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; - - - - - 项目级首页(新) - - - - - - - - -
- -
-
-
-
-
安全统计
-
-
-
-

0000000000

-
累计安全人工时 -
-
-
-

0000000000

-
本月安全人工时 -
-
-
-

0

-
安全培训累计人员 -
-
-
-
-
-
安全管理人员
-
0
-
-
-
未遂事件
-
0
-
-
-
-
整改数据
-
-
-
0 -
-
总数
-
-
-
0 -
-
已完成
-
-
-
0 -
-
未完成
-
-
-
0% -
-
完成率
-
-
-
-
-
-
-
风险预警
-
-
-
-
-
-
资质预警
-
<%=getEarlyWarningCounts() %>
-
-
-
机械预警
-
<%=GetJxyjNum() %>
-
-
-
-
危大工程
-
-
-
<%=GetCompletedNum() %>
-
审批完成
-
-
-
<%=GetTrainPersonNum() %>
-
培训人次数
-
-
-
<%=GetConstructionNum() %>
-
施工个数
-
-
-
<%=GetFinishedNum() %>
-
完工个数
-
-
-
-
-
超危大工程
-
-
-
<%=GetSuperCompletedNum() %>
-
审批完成
-
-
-
<%=GetSuperTrainPersonNum() %>
-
培训人次数
-
-
-
<%=GetSuperConstructionNum() %>
-
施工个数
-
-
-
<%=GetSuperFinishedNum() %>
-
完工个数
-
-
-
-
-
-
-
-
作业许可
-
-
-
-
动火
-
<%=getWrokCount0() %>
-
-
-
高处
-
<%=getWrokCount1() %>
-
-
-
吊装
-
<%=getWrokCount2() %>
-
-
-
其他
-
<%=getWrokCount3() %>
-
-
-
- <%=getLicenseManager() %> - <%--
003-十一化建-合成氨区域-非高风险-T0001设备吊装
--%> - -
-
+ #endregion -
-
-
-
-
工程概括
-
-
-
工程名称:<%=spanProjectName %>
-
建设单位: <%=spanOwnUnit %>
-
施工单位: <%=spanSGUnit %>
-
监理单位:<%=spanJLUnit %>
-
工程概况:
-
-
-
-
-
-
-
-
-
- -
- - -
-
-
-
-
-
-
合同工期
-
0
-
-
-
合同到期时间
-
-
-
-
合同剩余
-
0
-
-
-
- -
-
-
赢得值曲线 - <%--
关键事项准点率90%
--%> -
-
- <%--
- -
--%> - -
-
-
质量概况
-
-
-
-
质量培训累计人员
-
0
-
-
-
施工方案审批量
-
0
-
-
-
-
-
-
-
-
-
-
-
-
-
工作台面
-
-
-
-
关键事项
-
0
-
-
-
待办事项
-
0
-
-
-
个人流程
-
0
-
-
-
已办任务
-
0
-
-
- - -
- -
-
- -
-
-
人员信息
-
-
-
-
当前现场人数
-
0
-
-
-
作业人员总数
-
0
-
-
-
管理人员总数
-
0
-
-
- -
- <%--
- -
--%> -
- -
-
-
- 材料到货 -
管道材料 - 设备材料
-
-
-
-
-
-
-

材料类别

-
-
-

设计量

-
-
-

采购量

-

采购量百分比

-
-
-

到货量

-

已到货百分比

-
-
-

领料量

-

已领料百分比

-
-
-
-
- <%=gdclHtml %> -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - +} \ No newline at end of file diff --git a/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs b/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs index 707b91df..b5539e84 100644 --- a/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs +++ b/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs @@ -201,7 +201,7 @@ namespace Model /// /// 整改期限 /// - public DateTime? Rectification_Date { get; set; } + public string Rectification_Date { get; set; } } } diff --git a/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs b/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs index 7b395285..f6253ecf 100644 --- a/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs +++ b/SGGL/Model/APIItem/HSSE/LicenseDataItem.cs @@ -277,7 +277,7 @@ namespace Model set; } /// - /// 作业负责人名字(射线、夜间) + /// 作业负责人名字(射线、夜间、高处) /// public string WorkLeaderName { @@ -285,7 +285,7 @@ namespace Model set; } /// - /// 作业负责人电话(射线、夜间) + /// 作业负责人电话(射线、夜间、高处) /// public string WorkLeaderTel { @@ -389,5 +389,114 @@ namespace Model get; set; } + + //新增 + public string WorkAreaName + { + get; + set; + } + /// + /// 区域 + /// + public string WorkAreaId + { + get; + set; + } + + /// + /// 原因 + /// + public string Reason + { + get; + set; + } + + /// + /// 动火作业级别 + /// + public string FireLevel + { + get; + set; + } + + /// + /// 空间内介质描述 + /// + public string LimitedDescribe + { + get; + set; + } + + /// + /// 是否存在其它介质 + /// + public bool? IsBoolOther + { + get; + set; + } + + /// + /// 作业是否耗氧或产生其它有毒有害气体 + /// + public bool? IsBoolHarmfulGas + { + get; + set; + } + + /// + /// 氧含量测试结果 + /// + public string TestResult + { + get; + set; + } + + /// + /// 测试时间 + /// + public string TestDate { get; set; } + + /// + /// 测试人 + /// + public string TestPerson { get; set; } + + /// + /// 通风措施 + /// + public string VenStep { get; set; } + + /// + /// 作业点高度 + /// + public string WorkHeight { get; set; } + + /// + /// 高处作业级别 + /// + public string HeightLevel { get; set; } + + /// + /// 吊装高度 + /// + public string LiftingHeight { get; set; } + + /// + /// 起重工姓名 + /// + public string QzgName { get; set; } + + /// + /// 起重工电话 + /// + public string QzgPhone { get; set; } } } From a15d27e4ebd412984e6766663765a075a0af3d09 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 8 Sep 2023 17:13:21 +0800 Subject: [PATCH 9/9] =?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 --- SGGL/Model/Model.cs | 1738 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1738 insertions(+) diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 8b23f937..dd087494 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1271,6 +1271,9 @@ namespace Model partial void InsertLicense_BreakGround(License_BreakGround instance); partial void UpdateLicense_BreakGround(License_BreakGround instance); partial void DeleteLicense_BreakGround(License_BreakGround instance); + partial void InsertLicense_Electricity(License_Electricity instance); + partial void UpdateLicense_Electricity(License_Electricity instance); + partial void DeleteLicense_Electricity(License_Electricity instance); partial void InsertLicense_EquipmentSafetyList(License_EquipmentSafetyList instance); partial void UpdateLicense_EquipmentSafetyList(License_EquipmentSafetyList instance); partial void DeleteLicense_EquipmentSafetyList(License_EquipmentSafetyList instance); @@ -5739,6 +5742,14 @@ namespace Model } } + public System.Data.Linq.Table License_Electricity + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table License_EquipmentSafetyList { get @@ -25269,6 +25280,8 @@ namespace Model private EntitySet _License_BreakGround; + private EntitySet _License_Electricity; + private EntitySet _License_EquipmentSafetyList; private EntitySet _License_FireWork; @@ -25757,6 +25770,7 @@ namespace Model this._JDGL_UndergroundPipeCompletion = new EntitySet(new Action(this.attach_JDGL_UndergroundPipeCompletion), new Action(this.detach_JDGL_UndergroundPipeCompletion)); this._Law_LawRegulationIdentify = new EntitySet(new Action(this.attach_Law_LawRegulationIdentify), new Action(this.detach_Law_LawRegulationIdentify)); this._License_BreakGround = new EntitySet(new Action(this.attach_License_BreakGround), new Action(this.detach_License_BreakGround)); + this._License_Electricity = new EntitySet(new Action(this.attach_License_Electricity), new Action(this.detach_License_Electricity)); this._License_EquipmentSafetyList = new EntitySet(new Action(this.attach_License_EquipmentSafetyList), new Action(this.detach_License_EquipmentSafetyList)); this._License_FireWork = new EntitySet(new Action(this.attach_License_FireWork), new Action(this.detach_License_FireWork)); this._License_HeightWork = new EntitySet(new Action(this.attach_License_HeightWork), new Action(this.detach_License_HeightWork)); @@ -28834,6 +28848,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Base_Project", Storage="_License_Electricity", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet License_Electricity + { + get + { + return this._License_Electricity; + } + set + { + this._License_Electricity.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_EquipmentSafetyList_Base_Project", Storage="_License_EquipmentSafetyList", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet License_EquipmentSafetyList { @@ -32406,6 +32433,18 @@ namespace Model entity.Base_Project = null; } + private void attach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_License_EquipmentSafetyList(License_EquipmentSafetyList entity) { this.SendPropertyChanging(); @@ -37403,6 +37442,8 @@ namespace Model private EntitySet _License_BreakGround; + private EntitySet _License_Electricity; + private EntitySet _License_EquipmentSafetyList; private EntitySet _License_FireWork; @@ -37701,6 +37742,7 @@ namespace Model this._JDGL_SteelStructureCompletion = new EntitySet(new Action(this.attach_JDGL_SteelStructureCompletion), new Action(this.detach_JDGL_SteelStructureCompletion)); this._JDGL_UndergroundPipeCompletion = new EntitySet(new Action(this.attach_JDGL_UndergroundPipeCompletion), new Action(this.detach_JDGL_UndergroundPipeCompletion)); this._License_BreakGround = new EntitySet(new Action(this.attach_License_BreakGround), new Action(this.detach_License_BreakGround)); + this._License_Electricity = new EntitySet(new Action(this.attach_License_Electricity), new Action(this.detach_License_Electricity)); this._License_EquipmentSafetyList = new EntitySet(new Action(this.attach_License_EquipmentSafetyList), new Action(this.detach_License_EquipmentSafetyList)); this._License_FireWork = new EntitySet(new Action(this.attach_License_FireWork), new Action(this.detach_License_FireWork)); this._License_HeightWork = new EntitySet(new Action(this.attach_License_HeightWork), new Action(this.detach_License_HeightWork)); @@ -39699,6 +39741,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Base_Unit", Storage="_License_Electricity", ThisKey="UnitId", OtherKey="ApplyUnitId", DeleteRule="NO ACTION")] + public EntitySet License_Electricity + { + get + { + return this._License_Electricity; + } + set + { + this._License_Electricity.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_EquipmentSafetyList_Base_Unit", Storage="_License_EquipmentSafetyList", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet License_EquipmentSafetyList { @@ -41884,6 +41939,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_License_EquipmentSafetyList(License_EquipmentSafetyList entity) { this.SendPropertyChanging(); @@ -206204,6 +206271,12 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _Reason; + + private string _FireWatchManName; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -206258,6 +206331,12 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnReasonChanging(string value); + partial void OnReasonChanged(); + partial void OnFireWatchManNameChanging(string value); + partial void OnFireWatchManNameChanged(); #endregion public License_BreakGround() @@ -206690,6 +206769,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Reason", DbType="NVarChar(500)")] + public string Reason + { + get + { + return this._Reason; + } + set + { + if ((this._Reason != value)) + { + this.OnReasonChanging(value); + this.SendPropertyChanging(); + this._Reason = value; + this.SendPropertyChanged("Reason"); + this.OnReasonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireWatchManName", DbType="NVarChar(500)")] + public string FireWatchManName + { + get + { + return this._FireWatchManName; + } + set + { + if ((this._FireWatchManName != value)) + { + this.OnFireWatchManNameChanging(value); + this.SendPropertyChanging(); + this._FireWatchManName = value; + this.SendPropertyChanged("FireWatchManName"); + this.OnFireWatchManNameChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_BreakGround_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -206881,6 +207020,849 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.License_Electricity")] + public partial class License_Electricity : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ElectricityId; + + private string _ProjectId; + + private string _LicenseCode; + + private string _ApplyUnitId; + + private string _ApplyManId; + + private System.Nullable _ApplyDate; + + private string _WorkPalce; + + private string _WorkDepth; + + private System.Nullable _ValidityStartTime; + + private System.Nullable _ValidityEndTime; + + private string _WorkMeasures; + + private string _CancelManId; + + private string _CancelReasons; + + private System.Nullable _CancelTime; + + private string _CloseManId; + + private string _CloseReasons; + + private System.Nullable _CloseTime; + + private string _States; + + private string _NextManId; + + private string _OldLicenseId; + + private string _WorkAreaId; + + private string _Reason; + + private string _FireWatchManName; + + private string _WorkLeaderName; + + private string _WorkLeaderTel; + + private EntityRef _Base_Project; + + private EntityRef _Base_Unit; + + private EntityRef _Sys_User; + + private EntityRef _CancelMan; + + private EntityRef _CloseMan; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnElectricityIdChanging(string value); + partial void OnElectricityIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnLicenseCodeChanging(string value); + partial void OnLicenseCodeChanged(); + partial void OnApplyUnitIdChanging(string value); + partial void OnApplyUnitIdChanged(); + partial void OnApplyManIdChanging(string value); + partial void OnApplyManIdChanged(); + partial void OnApplyDateChanging(System.Nullable value); + partial void OnApplyDateChanged(); + partial void OnWorkPalceChanging(string value); + partial void OnWorkPalceChanged(); + partial void OnWorkDepthChanging(string value); + partial void OnWorkDepthChanged(); + partial void OnValidityStartTimeChanging(System.Nullable value); + partial void OnValidityStartTimeChanged(); + partial void OnValidityEndTimeChanging(System.Nullable value); + partial void OnValidityEndTimeChanged(); + partial void OnWorkMeasuresChanging(string value); + partial void OnWorkMeasuresChanged(); + partial void OnCancelManIdChanging(string value); + partial void OnCancelManIdChanged(); + partial void OnCancelReasonsChanging(string value); + partial void OnCancelReasonsChanged(); + partial void OnCancelTimeChanging(System.Nullable value); + partial void OnCancelTimeChanged(); + partial void OnCloseManIdChanging(string value); + partial void OnCloseManIdChanged(); + partial void OnCloseReasonsChanging(string value); + partial void OnCloseReasonsChanged(); + partial void OnCloseTimeChanging(System.Nullable value); + partial void OnCloseTimeChanged(); + partial void OnStatesChanging(string value); + partial void OnStatesChanged(); + partial void OnNextManIdChanging(string value); + partial void OnNextManIdChanged(); + partial void OnOldLicenseIdChanging(string value); + partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnReasonChanging(string value); + partial void OnReasonChanged(); + partial void OnFireWatchManNameChanging(string value); + partial void OnFireWatchManNameChanged(); + partial void OnWorkLeaderNameChanging(string value); + partial void OnWorkLeaderNameChanged(); + partial void OnWorkLeaderTelChanging(string value); + partial void OnWorkLeaderTelChanged(); + #endregion + + public License_Electricity() + { + this._Base_Project = default(EntityRef); + this._Base_Unit = default(EntityRef); + this._Sys_User = default(EntityRef); + this._CancelMan = default(EntityRef); + this._CloseMan = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ElectricityId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ElectricityId + { + get + { + return this._ElectricityId; + } + set + { + if ((this._ElectricityId != value)) + { + this.OnElectricityIdChanging(value); + this.SendPropertyChanging(); + this._ElectricityId = value; + this.SendPropertyChanged("ElectricityId"); + this.OnElectricityIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LicenseCode", DbType="NVarChar(50)")] + public string LicenseCode + { + get + { + return this._LicenseCode; + } + set + { + if ((this._LicenseCode != value)) + { + this.OnLicenseCodeChanging(value); + this.SendPropertyChanging(); + this._LicenseCode = value; + this.SendPropertyChanged("LicenseCode"); + this.OnLicenseCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApplyUnitId", DbType="NVarChar(50)")] + public string ApplyUnitId + { + get + { + return this._ApplyUnitId; + } + set + { + if ((this._ApplyUnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnApplyUnitIdChanging(value); + this.SendPropertyChanging(); + this._ApplyUnitId = value; + this.SendPropertyChanged("ApplyUnitId"); + this.OnApplyUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApplyManId", DbType="NVarChar(50)")] + public string ApplyManId + { + get + { + return this._ApplyManId; + } + set + { + if ((this._ApplyManId != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnApplyManIdChanging(value); + this.SendPropertyChanging(); + this._ApplyManId = value; + this.SendPropertyChanged("ApplyManId"); + this.OnApplyManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApplyDate", DbType="DateTime")] + public System.Nullable ApplyDate + { + get + { + return this._ApplyDate; + } + set + { + if ((this._ApplyDate != value)) + { + this.OnApplyDateChanging(value); + this.SendPropertyChanging(); + this._ApplyDate = value; + this.SendPropertyChanged("ApplyDate"); + this.OnApplyDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPalce", DbType="NVarChar(300)")] + public string WorkPalce + { + get + { + return this._WorkPalce; + } + set + { + if ((this._WorkPalce != value)) + { + this.OnWorkPalceChanging(value); + this.SendPropertyChanging(); + this._WorkPalce = value; + this.SendPropertyChanged("WorkPalce"); + this.OnWorkPalceChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkDepth", DbType="NVarChar(50)")] + public string WorkDepth + { + get + { + return this._WorkDepth; + } + set + { + if ((this._WorkDepth != value)) + { + this.OnWorkDepthChanging(value); + this.SendPropertyChanging(); + this._WorkDepth = value; + this.SendPropertyChanged("WorkDepth"); + this.OnWorkDepthChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ValidityStartTime", DbType="DateTime")] + public System.Nullable ValidityStartTime + { + get + { + return this._ValidityStartTime; + } + set + { + if ((this._ValidityStartTime != value)) + { + this.OnValidityStartTimeChanging(value); + this.SendPropertyChanging(); + this._ValidityStartTime = value; + this.SendPropertyChanged("ValidityStartTime"); + this.OnValidityStartTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ValidityEndTime", DbType="DateTime")] + public System.Nullable ValidityEndTime + { + get + { + return this._ValidityEndTime; + } + set + { + if ((this._ValidityEndTime != value)) + { + this.OnValidityEndTimeChanging(value); + this.SendPropertyChanging(); + this._ValidityEndTime = value; + this.SendPropertyChanged("ValidityEndTime"); + this.OnValidityEndTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkMeasures", DbType="NVarChar(500)")] + public string WorkMeasures + { + get + { + return this._WorkMeasures; + } + set + { + if ((this._WorkMeasures != value)) + { + this.OnWorkMeasuresChanging(value); + this.SendPropertyChanging(); + this._WorkMeasures = value; + this.SendPropertyChanged("WorkMeasures"); + this.OnWorkMeasuresChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CancelManId", DbType="NVarChar(50)")] + public string CancelManId + { + get + { + return this._CancelManId; + } + set + { + if ((this._CancelManId != value)) + { + if (this._CancelMan.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCancelManIdChanging(value); + this.SendPropertyChanging(); + this._CancelManId = value; + this.SendPropertyChanged("CancelManId"); + this.OnCancelManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CancelReasons", DbType="NVarChar(200)")] + public string CancelReasons + { + get + { + return this._CancelReasons; + } + set + { + if ((this._CancelReasons != value)) + { + this.OnCancelReasonsChanging(value); + this.SendPropertyChanging(); + this._CancelReasons = value; + this.SendPropertyChanged("CancelReasons"); + this.OnCancelReasonsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CancelTime", DbType="DateTime")] + public System.Nullable CancelTime + { + get + { + return this._CancelTime; + } + set + { + if ((this._CancelTime != value)) + { + this.OnCancelTimeChanging(value); + this.SendPropertyChanging(); + this._CancelTime = value; + this.SendPropertyChanged("CancelTime"); + this.OnCancelTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CloseManId", DbType="NVarChar(50)")] + public string CloseManId + { + get + { + return this._CloseManId; + } + set + { + if ((this._CloseManId != value)) + { + if (this._CloseMan.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCloseManIdChanging(value); + this.SendPropertyChanging(); + this._CloseManId = value; + this.SendPropertyChanged("CloseManId"); + this.OnCloseManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CloseReasons", DbType="NVarChar(200)")] + public string CloseReasons + { + get + { + return this._CloseReasons; + } + set + { + if ((this._CloseReasons != value)) + { + this.OnCloseReasonsChanging(value); + this.SendPropertyChanging(); + this._CloseReasons = value; + this.SendPropertyChanged("CloseReasons"); + this.OnCloseReasonsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CloseTime", DbType="DateTime")] + public System.Nullable CloseTime + { + get + { + return this._CloseTime; + } + set + { + if ((this._CloseTime != value)) + { + this.OnCloseTimeChanging(value); + this.SendPropertyChanging(); + this._CloseTime = value; + this.SendPropertyChanged("CloseTime"); + this.OnCloseTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_States", DbType="VarChar(2)")] + public string States + { + get + { + return this._States; + } + set + { + if ((this._States != value)) + { + this.OnStatesChanging(value); + this.SendPropertyChanging(); + this._States = value; + this.SendPropertyChanged("States"); + this.OnStatesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NextManId", DbType="NVarChar(500)")] + public string NextManId + { + get + { + return this._NextManId; + } + set + { + if ((this._NextManId != value)) + { + this.OnNextManIdChanging(value); + this.SendPropertyChanging(); + this._NextManId = value; + this.SendPropertyChanged("NextManId"); + this.OnNextManIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OldLicenseId", DbType="NVarChar(50)")] + public string OldLicenseId + { + get + { + return this._OldLicenseId; + } + set + { + if ((this._OldLicenseId != value)) + { + this.OnOldLicenseIdChanging(value); + this.SendPropertyChanging(); + this._OldLicenseId = value; + this.SendPropertyChanged("OldLicenseId"); + this.OnOldLicenseIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Reason", DbType="NVarChar(500)")] + public string Reason + { + get + { + return this._Reason; + } + set + { + if ((this._Reason != value)) + { + this.OnReasonChanging(value); + this.SendPropertyChanging(); + this._Reason = value; + this.SendPropertyChanged("Reason"); + this.OnReasonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireWatchManName", DbType="NVarChar(500)")] + public string FireWatchManName + { + get + { + return this._FireWatchManName; + } + set + { + if ((this._FireWatchManName != value)) + { + this.OnFireWatchManNameChanging(value); + this.SendPropertyChanging(); + this._FireWatchManName = value; + this.SendPropertyChanged("FireWatchManName"); + this.OnFireWatchManNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderName", DbType="NVarChar(200)")] + public string WorkLeaderName + { + get + { + return this._WorkLeaderName; + } + set + { + if ((this._WorkLeaderName != value)) + { + this.OnWorkLeaderNameChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderName = value; + this.SendPropertyChanged("WorkLeaderName"); + this.OnWorkLeaderNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderTel", DbType="NVarChar(200)")] + public string WorkLeaderTel + { + get + { + return this._WorkLeaderTel; + } + set + { + if ((this._WorkLeaderTel != value)) + { + this.OnWorkLeaderTelChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderTel = value; + this.SendPropertyChanged("WorkLeaderTel"); + this.OnWorkLeaderTelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.License_Electricity.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.License_Electricity.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Base_Unit", Storage="_Base_Unit", ThisKey="ApplyUnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.License_Electricity.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.License_Electricity.Add(this); + this._ApplyUnitId = value.UnitId; + } + else + { + this._ApplyUnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User", Storage="_Sys_User", ThisKey="ApplyManId", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.License_Electricity.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.License_Electricity.Add(this); + this._ApplyManId = value.UserId; + } + else + { + this._ApplyManId = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User2", Storage="_CancelMan", ThisKey="CancelManId", OtherKey="UserId", IsForeignKey=true)] + public Sys_User CancelMan + { + get + { + return this._CancelMan.Entity; + } + set + { + Sys_User previousValue = this._CancelMan.Entity; + if (((previousValue != value) + || (this._CancelMan.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._CancelMan.Entity = null; + previousValue.License_Electricity_Sys_User2.Remove(this); + } + this._CancelMan.Entity = value; + if ((value != null)) + { + value.License_Electricity_Sys_User2.Add(this); + this._CancelManId = value.UserId; + } + else + { + this._CancelManId = default(string); + } + this.SendPropertyChanged("CancelMan"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User3", Storage="_CloseMan", ThisKey="CloseManId", OtherKey="UserId", IsForeignKey=true)] + public Sys_User CloseMan + { + get + { + return this._CloseMan.Entity; + } + set + { + Sys_User previousValue = this._CloseMan.Entity; + if (((previousValue != value) + || (this._CloseMan.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._CloseMan.Entity = null; + previousValue.License_Electricity_Sys_User3.Remove(this); + } + this._CloseMan.Entity = value; + if ((value != null)) + { + value.License_Electricity_Sys_User3.Add(this); + this._CloseManId = value.UserId; + } + else + { + this._CloseManId = default(string); + } + this.SendPropertyChanged("CloseMan"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.License_EquipmentSafetyList")] public partial class License_EquipmentSafetyList : INotifyPropertyChanging, INotifyPropertyChanged { @@ -207395,6 +208377,12 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _Reason; + + private string _FireLevel; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -207453,6 +208441,12 @@ namespace Model partial void OnFireWatchManNameChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnReasonChanging(string value); + partial void OnReasonChanged(); + partial void OnFireLevelChanging(string value); + partial void OnFireLevelChanged(); #endregion public License_FireWork() @@ -207910,6 +208904,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Reason", DbType="NVarChar(500)")] + public string Reason + { + get + { + return this._Reason; + } + set + { + if ((this._Reason != value)) + { + this.OnReasonChanging(value); + this.SendPropertyChanging(); + this._Reason = value; + this.SendPropertyChanged("Reason"); + this.OnReasonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireLevel", DbType="NVarChar(20)")] + public string FireLevel + { + get + { + return this._FireLevel; + } + set + { + if ((this._FireLevel != value)) + { + this.OnFireLevelChanging(value); + this.SendPropertyChanging(); + this._FireLevel = value; + this.SendPropertyChanged("FireLevel"); + this.OnFireLevelChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_FireWork_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -208914,6 +209968,18 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _WorkHeight; + + private string _HeightLevel; + + private string _FireWatchManName; + + private string _WorkLeaderName; + + private string _WorkLeaderTel; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -208970,6 +210036,18 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnWorkHeightChanging(string value); + partial void OnWorkHeightChanged(); + partial void OnHeightLevelChanging(string value); + partial void OnHeightLevelChanged(); + partial void OnFireWatchManNameChanging(string value); + partial void OnFireWatchManNameChanged(); + partial void OnWorkLeaderNameChanging(string value); + partial void OnWorkLeaderNameChanged(); + partial void OnWorkLeaderTelChanging(string value); + partial void OnWorkLeaderTelChanged(); #endregion public License_HeightWork() @@ -209422,6 +210500,126 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkHeight", DbType="NVarChar(20)")] + public string WorkHeight + { + get + { + return this._WorkHeight; + } + set + { + if ((this._WorkHeight != value)) + { + this.OnWorkHeightChanging(value); + this.SendPropertyChanging(); + this._WorkHeight = value; + this.SendPropertyChanged("WorkHeight"); + this.OnWorkHeightChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HeightLevel", DbType="NVarChar(20)")] + public string HeightLevel + { + get + { + return this._HeightLevel; + } + set + { + if ((this._HeightLevel != value)) + { + this.OnHeightLevelChanging(value); + this.SendPropertyChanging(); + this._HeightLevel = value; + this.SendPropertyChanged("HeightLevel"); + this.OnHeightLevelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireWatchManName", DbType="NVarChar(500)")] + public string FireWatchManName + { + get + { + return this._FireWatchManName; + } + set + { + if ((this._FireWatchManName != value)) + { + this.OnFireWatchManNameChanging(value); + this.SendPropertyChanging(); + this._FireWatchManName = value; + this.SendPropertyChanged("FireWatchManName"); + this.OnFireWatchManNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderName", DbType="NVarChar(200)")] + public string WorkLeaderName + { + get + { + return this._WorkLeaderName; + } + set + { + if ((this._WorkLeaderName != value)) + { + this.OnWorkLeaderNameChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderName = value; + this.SendPropertyChanged("WorkLeaderName"); + this.OnWorkLeaderNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderTel", DbType="NVarChar(200)")] + public string WorkLeaderTel + { + get + { + return this._WorkLeaderTel; + } + set + { + if ((this._WorkLeaderTel != value)) + { + this.OnWorkLeaderTelChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderTel = value; + this.SendPropertyChanged("WorkLeaderTel"); + this.OnWorkLeaderTelChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_HeightWork_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -211032,6 +212230,20 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _LiftingHeight; + + private string _FireWatchManName; + + private string _WorkLeaderName; + + private string _WorkLeaderTel; + + private string _QzgName; + + private string _QzgPhone; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -211088,6 +212300,20 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnLiftingHeightChanging(string value); + partial void OnLiftingHeightChanged(); + partial void OnFireWatchManNameChanging(string value); + partial void OnFireWatchManNameChanged(); + partial void OnWorkLeaderNameChanging(string value); + partial void OnWorkLeaderNameChanged(); + partial void OnWorkLeaderTelChanging(string value); + partial void OnWorkLeaderTelChanged(); + partial void OnQzgNameChanging(string value); + partial void OnQzgNameChanged(); + partial void OnQzgPhoneChanging(string value); + partial void OnQzgPhoneChanged(); #endregion public License_LiftingWork() @@ -211540,6 +212766,146 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LiftingHeight", DbType="NVarChar(20)")] + public string LiftingHeight + { + get + { + return this._LiftingHeight; + } + set + { + if ((this._LiftingHeight != value)) + { + this.OnLiftingHeightChanging(value); + this.SendPropertyChanging(); + this._LiftingHeight = value; + this.SendPropertyChanged("LiftingHeight"); + this.OnLiftingHeightChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireWatchManName", DbType="NVarChar(500)")] + public string FireWatchManName + { + get + { + return this._FireWatchManName; + } + set + { + if ((this._FireWatchManName != value)) + { + this.OnFireWatchManNameChanging(value); + this.SendPropertyChanging(); + this._FireWatchManName = value; + this.SendPropertyChanged("FireWatchManName"); + this.OnFireWatchManNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderName", DbType="NVarChar(200)")] + public string WorkLeaderName + { + get + { + return this._WorkLeaderName; + } + set + { + if ((this._WorkLeaderName != value)) + { + this.OnWorkLeaderNameChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderName = value; + this.SendPropertyChanged("WorkLeaderName"); + this.OnWorkLeaderNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkLeaderTel", DbType="NVarChar(200)")] + public string WorkLeaderTel + { + get + { + return this._WorkLeaderTel; + } + set + { + if ((this._WorkLeaderTel != value)) + { + this.OnWorkLeaderTelChanging(value); + this.SendPropertyChanging(); + this._WorkLeaderTel = value; + this.SendPropertyChanged("WorkLeaderTel"); + this.OnWorkLeaderTelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QzgName", DbType="NVarChar(200)")] + public string QzgName + { + get + { + return this._QzgName; + } + set + { + if ((this._QzgName != value)) + { + this.OnQzgNameChanging(value); + this.SendPropertyChanging(); + this._QzgName = value; + this.SendPropertyChanged("QzgName"); + this.OnQzgNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QzgPhone", DbType="NVarChar(200)")] + public string QzgPhone + { + get + { + return this._QzgPhone; + } + set + { + if ((this._QzgPhone != value)) + { + this.OnQzgPhoneChanging(value); + this.SendPropertyChanging(); + this._QzgPhone = value; + this.SendPropertyChanged("QzgPhone"); + this.OnQzgPhoneChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_LiftingWork_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -211779,6 +213145,22 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _LimitedDescribe; + + private System.Nullable _IsBoolOther; + + private System.Nullable _IsBoolHarmfulGas; + + private string _TestResult; + + private System.Nullable _TestDate; + + private string _TestPerson; + + private string _VenStep; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -211837,6 +213219,22 @@ namespace Model partial void OnFireWatchManNameChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnLimitedDescribeChanging(string value); + partial void OnLimitedDescribeChanged(); + partial void OnIsBoolOtherChanging(System.Nullable value); + partial void OnIsBoolOtherChanged(); + partial void OnIsBoolHarmfulGasChanging(System.Nullable value); + partial void OnIsBoolHarmfulGasChanged(); + partial void OnTestResultChanging(string value); + partial void OnTestResultChanged(); + partial void OnTestDateChanging(System.Nullable value); + partial void OnTestDateChanged(); + partial void OnTestPersonChanging(string value); + partial void OnTestPersonChanged(); + partial void OnVenStepChanging(string value); + partial void OnVenStepChanged(); #endregion public License_LimitedSpace() @@ -212294,6 +213692,166 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LimitedDescribe", DbType="NVarChar(500)")] + public string LimitedDescribe + { + get + { + return this._LimitedDescribe; + } + set + { + if ((this._LimitedDescribe != value)) + { + this.OnLimitedDescribeChanging(value); + this.SendPropertyChanging(); + this._LimitedDescribe = value; + this.SendPropertyChanged("LimitedDescribe"); + this.OnLimitedDescribeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsBoolOther", DbType="Bit")] + public System.Nullable IsBoolOther + { + get + { + return this._IsBoolOther; + } + set + { + if ((this._IsBoolOther != value)) + { + this.OnIsBoolOtherChanging(value); + this.SendPropertyChanging(); + this._IsBoolOther = value; + this.SendPropertyChanged("IsBoolOther"); + this.OnIsBoolOtherChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsBoolHarmfulGas", DbType="Bit")] + public System.Nullable IsBoolHarmfulGas + { + get + { + return this._IsBoolHarmfulGas; + } + set + { + if ((this._IsBoolHarmfulGas != value)) + { + this.OnIsBoolHarmfulGasChanging(value); + this.SendPropertyChanging(); + this._IsBoolHarmfulGas = value; + this.SendPropertyChanged("IsBoolHarmfulGas"); + this.OnIsBoolHarmfulGasChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestResult", DbType="NVarChar(500)")] + public string TestResult + { + get + { + return this._TestResult; + } + set + { + if ((this._TestResult != value)) + { + this.OnTestResultChanging(value); + this.SendPropertyChanging(); + this._TestResult = value; + this.SendPropertyChanged("TestResult"); + this.OnTestResultChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestDate", DbType="DateTime")] + public System.Nullable TestDate + { + get + { + return this._TestDate; + } + set + { + if ((this._TestDate != value)) + { + this.OnTestDateChanging(value); + this.SendPropertyChanging(); + this._TestDate = value; + this.SendPropertyChanged("TestDate"); + this.OnTestDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPerson", DbType="NVarChar(100)")] + public string TestPerson + { + get + { + return this._TestPerson; + } + set + { + if ((this._TestPerson != value)) + { + this.OnTestPersonChanging(value); + this.SendPropertyChanging(); + this._TestPerson = value; + this.SendPropertyChanged("TestPerson"); + this.OnTestPersonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VenStep", DbType="NVarChar(20)")] + public string VenStep + { + get + { + return this._VenStep; + } + set + { + if ((this._VenStep != value)) + { + this.OnVenStepChanging(value); + this.SendPropertyChanging(); + this._VenStep = value; + this.SendPropertyChanged("VenStep"); + this.OnVenStepChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_LimitedSpace_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -213444,6 +215002,12 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + + private string _Reason; + + private string _FireWatchManName; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -213500,6 +215064,12 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnReasonChanging(string value); + partial void OnReasonChanged(); + partial void OnFireWatchManNameChanging(string value); + partial void OnFireWatchManNameChanged(); #endregion public License_OpenCircuit() @@ -213952,6 +215522,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Reason", DbType="NVarChar(500)")] + public string Reason + { + get + { + return this._Reason; + } + set + { + if ((this._Reason != value)) + { + this.OnReasonChanging(value); + this.SendPropertyChanging(); + this._Reason = value; + this.SendPropertyChanged("Reason"); + this.OnReasonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireWatchManName", DbType="NVarChar(500)")] + public string FireWatchManName + { + get + { + return this._FireWatchManName; + } + set + { + if ((this._FireWatchManName != value)) + { + this.OnFireWatchManNameChanging(value); + this.SendPropertyChanging(); + this._FireWatchManName = value; + this.SendPropertyChanged("FireWatchManName"); + this.OnFireWatchManNameChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_OpenCircuit_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -214197,6 +215827,8 @@ namespace Model private string _OldLicenseId; + private string _WorkAreaId; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -214263,6 +215895,8 @@ namespace Model partial void OnNextManIdChanged(); partial void OnOldLicenseIdChanging(string value); partial void OnOldLicenseIdChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); #endregion public License_RadialWork() @@ -214785,6 +216419,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(500)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_RadialWork_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -324144,6 +325798,12 @@ namespace Model private EntitySet _License_BreakGround_Sys_User3; + private EntitySet _License_Electricity; + + private EntitySet _License_Electricity_Sys_User2; + + private EntitySet _License_Electricity_Sys_User3; + private EntitySet _License_EquipmentSafetyList; private EntitySet _License_FireWork; @@ -324768,6 +326428,9 @@ namespace Model this._License_BreakGround = new EntitySet(new Action(this.attach_License_BreakGround), new Action(this.detach_License_BreakGround)); this._License_BreakGround_Sys_User2 = new EntitySet(new Action(this.attach_License_BreakGround_Sys_User2), new Action(this.detach_License_BreakGround_Sys_User2)); this._License_BreakGround_Sys_User3 = new EntitySet(new Action(this.attach_License_BreakGround_Sys_User3), new Action(this.detach_License_BreakGround_Sys_User3)); + this._License_Electricity = new EntitySet(new Action(this.attach_License_Electricity), new Action(this.detach_License_Electricity)); + this._License_Electricity_Sys_User2 = new EntitySet(new Action(this.attach_License_Electricity_Sys_User2), new Action(this.detach_License_Electricity_Sys_User2)); + this._License_Electricity_Sys_User3 = new EntitySet(new Action(this.attach_License_Electricity_Sys_User3), new Action(this.detach_License_Electricity_Sys_User3)); this._License_EquipmentSafetyList = new EntitySet(new Action(this.attach_License_EquipmentSafetyList), new Action(this.detach_License_EquipmentSafetyList)); this._License_FireWork = new EntitySet(new Action(this.attach_License_FireWork), new Action(this.detach_License_FireWork)); this._License_FireWork_Sys_User1 = new EntitySet(new Action(this.attach_License_FireWork_Sys_User1), new Action(this.detach_License_FireWork_Sys_User1)); @@ -328014,6 +329677,45 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User", Storage="_License_Electricity", ThisKey="UserId", OtherKey="ApplyManId", DeleteRule="NO ACTION")] + public EntitySet License_Electricity + { + get + { + return this._License_Electricity; + } + set + { + this._License_Electricity.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User2", Storage="_License_Electricity_Sys_User2", ThisKey="UserId", OtherKey="CancelManId", DeleteRule="NO ACTION")] + public EntitySet License_Electricity_Sys_User2 + { + get + { + return this._License_Electricity_Sys_User2; + } + set + { + this._License_Electricity_Sys_User2.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_Electricity_Sys_User3", Storage="_License_Electricity_Sys_User3", ThisKey="UserId", OtherKey="CloseManId", DeleteRule="NO ACTION")] + public EntitySet License_Electricity_Sys_User3 + { + get + { + return this._License_Electricity_Sys_User3; + } + set + { + this._License_Electricity_Sys_User3.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_EquipmentSafetyList_Sys_User", Storage="_License_EquipmentSafetyList", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet License_EquipmentSafetyList { @@ -332317,6 +334019,42 @@ namespace Model entity.CloseMan = null; } + private void attach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_License_Electricity(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + + private void attach_License_Electricity_Sys_User2(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.CancelMan = this; + } + + private void detach_License_Electricity_Sys_User2(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.CancelMan = null; + } + + private void attach_License_Electricity_Sys_User3(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.CloseMan = this; + } + + private void detach_License_Electricity_Sys_User3(License_Electricity entity) + { + this.SendPropertyChanging(); + entity.CloseMan = null; + } + private void attach_License_EquipmentSafetyList(License_EquipmentSafetyList entity) { this.SendPropertyChanging();