From a9edf59cf354432a724ea1625d8c2f6126b43b6f Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Sat, 12 Oct 2024 10:00:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_V2024-10-12-gaofei.sql | 228 ++ SGGL/BLL/BLL.csproj | 4 + SGGL/BLL/Common/Const.cs | 21 + SGGL/BLL/WebService/CNCECHSSEWebService.cs | 184 ++ .../ActionWorkLedgerItemService.cs | 104 + .../Information/ActionWorkLedgerService.cs | 113 + .../SafetyProductionEvaluationItemService.cs | 104 + .../SafetyProductionEvaluationService.cs | 113 + SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 32 + .../ZHGL/Information/ActionWorkLedger.aspx | 159 ++ .../ZHGL/Information/ActionWorkLedger.aspx.cs | 619 +++++ .../ActionWorkLedger.aspx.designer.cs | 276 +++ .../ZHGL/Information/ActionWorkLedgerAdd.aspx | 108 + .../Information/ActionWorkLedgerAdd.aspx.cs | 534 +++++ .../ActionWorkLedgerAdd.aspx.designer.cs | 150 ++ .../ZHGL/Information/ReportSubmit.aspx.cs | 28 + .../SafetyProductionEvaluation.aspx | 163 ++ .../SafetyProductionEvaluation.aspx.cs | 619 +++++ ...afetyProductionEvaluation.aspx.designer.cs | 276 +++ .../SafetyProductionEvaluationAdd.aspx | 112 + .../SafetyProductionEvaluationAdd.aspx.cs | 534 +++++ ...tyProductionEvaluationAdd.aspx.designer.cs | 150 ++ SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 2 + SGGL/Model/APIItem/ActionWorkLedger.cs | 44 + SGGL/Model/APIItem/ActionWorkLedgerItem.cs | 62 + .../APIItem/SafetyProductionEvaluation.cs | 47 + .../APIItem/SafetyProductionEvaluationItem.cs | 65 + SGGL/Model/Model.cs | 2034 +++++++++++++++-- SGGL/Model/Model.csproj | 4 + 29 files changed, 6756 insertions(+), 133 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2024-10-12-gaofei.sql create mode 100644 SGGL/BLL/ZHGL/Information/ActionWorkLedgerItemService.cs create mode 100644 SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs create mode 100644 SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationItemService.cs create mode 100644 SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationService.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.designer.cs create mode 100644 SGGL/Model/APIItem/ActionWorkLedger.cs create mode 100644 SGGL/Model/APIItem/ActionWorkLedgerItem.cs create mode 100644 SGGL/Model/APIItem/SafetyProductionEvaluation.cs create mode 100644 SGGL/Model/APIItem/SafetyProductionEvaluationItem.cs diff --git a/DataBase/版本日志/SGGLDB_V2024-10-12-gaofei.sql b/DataBase/版本日志/SGGLDB_V2024-10-12-gaofei.sql new file mode 100644 index 00000000..4d54b8fb --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2024-10-12-gaofei.sql @@ -0,0 +1,228 @@ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES ('CB76394B-BDEB-4F45-9D19-F38612DC6591','ҵȫαж̨','ZHGL/Information/ActionWorkLedger.aspx',150,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B269EF45-918E-42B0-9B28-65D1A1017CDF','CB76394B-BDEB-4F45-9D19-F38612DC6591','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('71B203E2-42C1-44CD-A0A1-8A75A96B79C7','CB76394B-BDEB-4F45-9D19-F38612DC6591','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DB5C189E-0023-4174-AB83-B7D5028B3148','CB76394B-BDEB-4F45-9D19-F38612DC6591','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BFF69201-1E48-46F4-A8CB-863A0304E6C6','CB76394B-BDEB-4F45-9D19-F38612DC6591','',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('70376B94-3340-4343-92B5-8543C6750F6B','CB76394B-BDEB-4F45-9D19-F38612DC6591','沢ϱ',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('4B0AE23C-A03D-4146-A5CE-3AB563AF683C','CB76394B-BDEB-4F45-9D19-F38612DC6591','ύ',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7F968B8C-C31F-4D62-8AFC-D37D017C46BB','CB76394B-BDEB-4F45-9D19-F38612DC6591','',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('B318C22A-DBFF-46FE-919A-24F50BF190DC','CB76394B-BDEB-4F45-9D19-F38612DC6591','ӡ',8) + GO + + +CREATE TABLE [dbo].[Information_ActionWorkLedger]( + [ActionWorkLedgerId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [ReportDate] [datetime] NULL, + [Quarter] [int] NULL, + [YearId] [int] NULL, + [CompileMan] [nvarchar](50) NULL, + [UpState] [char](1) NULL, + [HandleState] [char](1) NULL, + [HandleMan] [nvarchar](50) NULL, + CONSTRAINT [PK_Information_ActionWorkLedger] PRIMARY KEY CLUSTERED +( + [ActionWorkLedgerId] 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].[Information_ActionWorkLedger] WITH CHECK ADD CONSTRAINT [FK_Information_ActionWorkLedger_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Information_ActionWorkLedger] CHECK CONSTRAINT [FK_Information_ActionWorkLedger_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵȫαж̨˱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_ActionWorkLedger' +GO + + + + + + +CREATE TABLE [dbo].[Information_ActionWorkLedgerItem]( + [ActionWorkLedgerItemId] [nvarchar](50) NOT NULL, + [ActionWorkLedgerId] [nvarchar](50) NULL, + [SortIndex] [int] NULL, + [Focus] [nvarchar](20) NULL, + [SpecialTask] [nvarchar](100) NULL, + [WorkPoints] [nvarchar](500) NULL, + [FillingRequirements] [nvarchar](max) NULL, + [CompletionDeadline] [nvarchar](50) NULL, + [ImplementationStatus] [nvarchar](max) NULL, + CONSTRAINT [PK_Information_ActionWorkLedgerItem] PRIMARY KEY CLUSTERED +( + [ActionWorkLedgerItemId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + +GO + +ALTER TABLE [dbo].[Information_ActionWorkLedgerItem] WITH CHECK ADD CONSTRAINT [FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger] FOREIGN KEY([ActionWorkLedgerId]) +REFERENCES [dbo].[Information_ActionWorkLedger] ([ActionWorkLedgerId]) +GO + +ALTER TABLE [dbo].[Information_ActionWorkLedgerItem] CHECK CONSTRAINT [FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵȫαж̨ϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_ActionWorkLedgerItem' +GO + + + +CREATE VIEW [dbo].[View_Information_ActionWorkLedger] AS +SELECT + Report.ActionWorkLedgerId, + Report.UnitId, + Report.ReportDate, + Report.YearId, + Report.Quarter, + Report.UpState, + Report.HandleState, + (ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0011.ConstText,'-')) AS Quarters, + u.UnitName, + Report.HandleMan, + US.PersonName as UserName +FROM dbo.Information_ActionWorkLedger AS Report +LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.YearId +LEFT JOIN Sys_Const AS Group_0011 ON Group_0011.GroupId='0011' AND Group_0011.ConstValue =Report.Quarter +Left join Base_Unit as u on u.UnitId=Report.UnitId +LEFT JOIN Person_Persons AS US ON US.PersonId=Report.HandleMan + + + + + + +GO + + + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES ('C48087A8-4C9F-485D-B0A4-C85E112BA705','ҵȫ۹̨','ZHGL/Information/SafetyProductionEvaluation.aspx',160,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('39A75960-F70A-4B60-ABFF-C72C919807A6','C48087A8-4C9F-485D-B0A4-C85E112BA705','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9461B39D-D9FF-45CC-9D4C-38E49BCBCF6C','C48087A8-4C9F-485D-B0A4-C85E112BA705','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('E417A6A8-0666-49EB-A620-2E73D19C08CB','C48087A8-4C9F-485D-B0A4-C85E112BA705','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('07F975F0-D634-4554-A3B7-667E99278265','C48087A8-4C9F-485D-B0A4-C85E112BA705','',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('23B71591-E933-4C3A-BCBF-E398D94A6C88','C48087A8-4C9F-485D-B0A4-C85E112BA705','沢ϱ',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('E97C8630-3DD7-4A4B-A3FD-7DE592B489BC','C48087A8-4C9F-485D-B0A4-C85E112BA705','ύ',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('5F910FC4-183E-4037-9EE1-1400B96C4584','C48087A8-4C9F-485D-B0A4-C85E112BA705','',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('D08BCEF7-843F-4BB6-BE87-182EC476E455','C48087A8-4C9F-485D-B0A4-C85E112BA705','ӡ',8) + GO + + + + +CREATE TABLE [dbo].[Information_SafetyProductionEvaluation]( + [SafetyProductionEvaluationId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [ReportDate] [datetime] NULL, + [Quarter] [int] NULL, + [YearId] [int] NULL, + [CompileMan] [nvarchar](50) NULL, + [UpState] [char](1) NULL, + [HandleState] [char](1) NULL, + [HandleMan] [nvarchar](50) NULL, + CONSTRAINT [PK_Information_SafetyProductionEvaluation] PRIMARY KEY CLUSTERED +( + [SafetyProductionEvaluationId] 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].[Information_SafetyProductionEvaluation] WITH CHECK ADD CONSTRAINT [FK_Information_SafetyProductionEvaluation_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Information_SafetyProductionEvaluation] CHECK CONSTRAINT [FK_Information_SafetyProductionEvaluation_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵȫ۹̨˱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyProductionEvaluation' +GO + + + + +CREATE TABLE [dbo].[Information_SafetyProductionEvaluationItem]( + [SafetyProductionEvaluationItemId] [nvarchar](50) NOT NULL, + [SafetyProductionEvaluationId] [nvarchar](50) NULL, + [SortIndex] [int] NULL, + [Type] [nvarchar](50) NULL, + [EvaluateWork] [nvarchar](1000) NULL, + [EvaluationContent] [nvarchar](1000) NULL, + [FillingRequirements] [nvarchar](max) NULL, + [CompletionDeadline] [nvarchar](50) NULL, + [ImplementationStatus] [nvarchar](max) NULL, + CONSTRAINT [PK_Information_SafetyProductionEvaluationItem] PRIMARY KEY CLUSTERED +( + [SafetyProductionEvaluationItemId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + +GO + +ALTER TABLE [dbo].[Information_SafetyProductionEvaluationItem] WITH CHECK ADD CONSTRAINT [FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluation] FOREIGN KEY([SafetyProductionEvaluationId]) +REFERENCES [dbo].[Information_SafetyProductionEvaluation] ([SafetyProductionEvaluationId]) +GO + +ALTER TABLE [dbo].[Information_SafetyProductionEvaluationItem] CHECK CONSTRAINT [FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluation] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵȫ۹̨ϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyProductionEvaluationItem' +GO + + +CREATE VIEW [dbo].[View_Information_SafetyProductionEvaluation] AS +SELECT + Report.SafetyProductionEvaluationId, + Report.UnitId, + Report.ReportDate, + Report.YearId, + Report.Quarter, + Report.UpState, + Report.HandleState, + (ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0011.ConstText,'-')) AS Quarters, + u.UnitName, + Report.HandleMan, + US.PersonName as UserName +FROM dbo.Information_SafetyProductionEvaluation AS Report +LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.YearId +LEFT JOIN Sys_Const AS Group_0011 ON Group_0011.GroupId='0011' AND Group_0011.ConstValue =Report.Quarter +Left join Base_Unit as u on u.UnitId=Report.UnitId +LEFT JOIN Person_Persons AS US ON US.PersonId=Report.HandleMan + + + + + + +GO \ No newline at end of file diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index e2c99496..4ab6dc37 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -763,6 +763,8 @@ + + @@ -773,6 +775,8 @@ + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 7a8bb027..8913eb77 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -5110,5 +5110,26 @@ namespace BLL public const string ConstructionRisk_Complete = "5";//分包 #endregion + + /// + /// 中央企业安全生产治本攻坚三年行动工作台账 + /// + public const string ActionWorkLedgerMenuId = "CB76394B-BDEB-4F45-9D19-F38612DC6591"; + + + /// + /// 中央企业安全生产管理评价工作调度台账 + /// + public const string SafetyProductionEvaluationMenuId = "C48087A8-4C9F-485D-B0A4-C85E112BA705"; + + /// + /// 中央企业安全生产治本攻坚三年行动工作台账 + /// + public const string ReportType_11 = "11"; + + /// + /// 中央企业安全生产管理评价工作调度台账上报 + /// + public const string ReportType_12 = "12"; } } \ No newline at end of file diff --git a/SGGL/BLL/WebService/CNCECHSSEWebService.cs b/SGGL/BLL/WebService/CNCECHSSEWebService.cs index 1974eb9d..089d28d7 100644 --- a/SGGL/BLL/WebService/CNCECHSSEWebService.cs +++ b/SGGL/BLL/WebService/CNCECHSSEWebService.cs @@ -1632,6 +1632,190 @@ } #endregion + #region 中央企业安全生产治本攻坚三年行动工作台账上报 + /// + /// 中央企业安全生产治本攻坚三年行动工作台账上报 + /// + public static string UpActionWorkLedger(string actionWorkLedgerId, Model.Person_Persons CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + var upReport = from x in db.Information_ActionWorkLedger + where x.ActionWorkLedgerId == actionWorkLedgerId + select new Model.ActionWorkLedger + { + ActionWorkLedgerId = x.ActionWorkLedgerId, + UnitId = x.UnitId, + ReportDate = x.ReportDate, + Quarter = x.Quarter, + YearId = x.YearId, + CompileMan = x.CompileMan, + }; + + var upReportItem = from x in db.Information_ActionWorkLedgerItem + where x.ActionWorkLedgerId == actionWorkLedgerId + select new Model.ActionWorkLedgerItem + { + ActionWorkLedgerItemId = x.ActionWorkLedgerItemId, + ActionWorkLedgerId = x.ActionWorkLedgerId, + SortIndex = x.SortIndex, + Focus = x.Focus, + SpecialTask = x.SpecialTask, + WorkPoints = x.WorkPoints, + FillingRequirements = x.FillingRequirements, + CompletionDeadline = x.CompletionDeadline, + ImplementationStatus = x.ImplementationStatus, + }; + + //var getR = hsseC.DataInsertInformation_DrillConductedQuarterlyReportTable(upReport.ToList(), upReportItem.ToList()); + //新接口Api + code = UpApiSaveActionWorkLedger(upReport, upReportItem).ToString(); + if (code == "1") + { + foreach (var item in upReport.Select(p => p.ActionWorkLedgerId)) + { + var report = db.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == item); + if (report != null) + { + report.UpState = BLL.Const.UpState_3; + db.SubmitChanges(); + ////更新 当前人要处理的意见 + ProjectDataFlowSetService.CloseFlowOperate(Const.ActionWorkLedgerMenuId, item, string.Empty); + ////更新催报信息 + UrgeReportService.SetComplete(report.UnitId, Const.ReportType_11, report.YearId.ToString(), report.Quarter.ToString()); + } + } + LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + else + { + LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + + return code; + } + } + /// + /// DrillConductedQuarterlyReportApi调用 + /// + /// 主表 + /// 明细表 + /// + private static int UpApiSaveActionWorkLedger(IQueryable upReport, IQueryable upReportItem) + { + string baseurl = "/api/InformationData/SaveActionWorkLedger"; + //合并 + //var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem }); + var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault()); + var resultJson1 = JsonConvert.SerializeObject(new { actionWorkLedgerItem = upReportItem }); + resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}"; + var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl); + return responeData.code; + } + #endregion + + #region 中央企业安全生产管理评价工作调度台账上报 + /// + /// 中央企业安全生产管理评价工作调度台账上报 + /// + public static string UpSafetyProductionEvaluation(string safetyProductionEvaluationId, Model.Person_Persons CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + var upReport = from x in db.Information_SafetyProductionEvaluation + where x.SafetyProductionEvaluationId == safetyProductionEvaluationId + select new Model.SafetyProductionEvaluation + { + SafetyProductionEvaluationId = x.SafetyProductionEvaluationId, + UnitId = x.UnitId, + ReportDate = x.ReportDate, + Quarter = x.Quarter, + YearId = x.YearId, + CompileMan = x.CompileMan, + }; + + var upReportItem = from x in db.Information_SafetyProductionEvaluationItem + where x.SafetyProductionEvaluationId == safetyProductionEvaluationId + select new Model.SafetyProductionEvaluationItem + { + SafetyProductionEvaluationItemId = x.SafetyProductionEvaluationItemId, + SafetyProductionEvaluationId = x.SafetyProductionEvaluationId, + SortIndex = x.SortIndex, + Type = x.Type, + EvaluateWork = x.EvaluateWork, + EvaluationContent = x.EvaluationContent, + FillingRequirements = x.FillingRequirements, + CompletionDeadline = x.CompletionDeadline, + ImplementationStatus = x.ImplementationStatus, + }; + + //var getR = hsseC.DataInsertInformation_DrillConductedQuarterlyReportTable(upReport.ToList(), upReportItem.ToList()); + //新接口Api + code = UpApiSaveSafetyProductionEvaluation(upReport, upReportItem).ToString(); + if (code == "1") + { + foreach (var item in upReport.Select(p => p.SafetyProductionEvaluationId)) + { + var report = db.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == item); + if (report != null) + { + report.UpState = BLL.Const.UpState_3; + db.SubmitChanges(); + ////更新 当前人要处理的意见 + ProjectDataFlowSetService.CloseFlowOperate(Const.SafetyProductionEvaluationMenuId, item, string.Empty); + ////更新催报信息 + UrgeReportService.SetComplete(report.UnitId, Const.ReportType_12, report.YearId.ToString(), report.Quarter.ToString()); + } + } + LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + else + { + LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【中央企业安全生产管理评价工作调度台账上报】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + + return code; + } + } + /// + /// DrillConductedQuarterlyReportApi调用 + /// + /// 主表 + /// 明细表 + /// + private static int UpApiSaveSafetyProductionEvaluation(IQueryable upReport, IQueryable upReportItem) + { + string baseurl = "/api/InformationData/SaveSafetyProductionEvaluation"; + //合并 + //var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem }); + var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault()); + var resultJson1 = JsonConvert.SerializeObject(new { safetyProductionEvaluationItem = upReportItem }); + resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}"; + var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl); + return responeData.code; + } + #endregion + #endregion diff --git a/SGGL/BLL/ZHGL/Information/ActionWorkLedgerItemService.cs b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerItemService.cs new file mode 100644 index 00000000..b388fd5d --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerItemService.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 中央企业安全生产治本攻坚三年行动工作台账明细表 + /// + public static class ActionWorkLedgerItemService + { + /// + /// 根据主键获取中央企业安全生产治本攻坚三年行动工作台账明细信息 + /// + /// + /// + public static Model.Information_ActionWorkLedgerItem GetActionWorkLedgerItemById(string ActionWorkLedgerItemId) + { + return Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItemId); + } + + /// + /// 根据中央企业安全生产治本攻坚三年行动工作台账Id获取所有相关明细信息 + /// + /// + /// + public static List GetActionWorkLedgerItemList(string ActionWorkLedgerId) + { + return (from x in Funs.DB.Information_ActionWorkLedgerItem where x.ActionWorkLedgerId == ActionWorkLedgerId orderby x.SortIndex select x).ToList(); + } + + /// + /// 添加中央企业安全生产治本攻坚三年行动工作台账明细信息 + /// + /// + public static void AddActionWorkLedgerItem(Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem) + { + Model.Information_ActionWorkLedgerItem newActionWorkLedgerItem = new Model.Information_ActionWorkLedgerItem + { + ActionWorkLedgerItemId = ActionWorkLedgerItem.ActionWorkLedgerItemId, + ActionWorkLedgerId = ActionWorkLedgerItem.ActionWorkLedgerId, + Focus = ActionWorkLedgerItem.Focus, + SpecialTask = ActionWorkLedgerItem.SpecialTask, + WorkPoints = ActionWorkLedgerItem.WorkPoints, + FillingRequirements = ActionWorkLedgerItem.FillingRequirements, + CompletionDeadline = ActionWorkLedgerItem.CompletionDeadline, + ImplementationStatus = ActionWorkLedgerItem.ImplementationStatus, + SortIndex = ActionWorkLedgerItem.SortIndex + }; + Funs.DB.Information_ActionWorkLedgerItem.InsertOnSubmit(newActionWorkLedgerItem); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改中央企业安全生产治本攻坚三年行动工作台账明细信息 + /// + /// + public static void UpdateActionWorkLedgerItem(Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem) + { + Model.Information_ActionWorkLedgerItem newActionWorkLedgerItem = Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItem.ActionWorkLedgerItemId); + if (newActionWorkLedgerItem != null) + { + newActionWorkLedgerItem.Focus = ActionWorkLedgerItem.Focus; + newActionWorkLedgerItem.SpecialTask = ActionWorkLedgerItem.SpecialTask; + newActionWorkLedgerItem.WorkPoints = ActionWorkLedgerItem.WorkPoints; + newActionWorkLedgerItem.FillingRequirements = ActionWorkLedgerItem.FillingRequirements; + newActionWorkLedgerItem.CompletionDeadline = ActionWorkLedgerItem.CompletionDeadline; + newActionWorkLedgerItem.ImplementationStatus = ActionWorkLedgerItem.ImplementationStatus; + newActionWorkLedgerItem.SortIndex = ActionWorkLedgerItem.SortIndex; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除中央企业安全生产治本攻坚三年行动工作台账明细信息 + /// + /// + public static void DeleteActionWorkLedgerItemById(string ActionWorkLedgerItemId) + { + Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem = Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItemId); + if (ActionWorkLedgerItem != null) + { + Funs.DB.Information_ActionWorkLedgerItem.DeleteOnSubmit(ActionWorkLedgerItem); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据中央企业安全生产治本攻坚三年行动工作台账主表id删除所有相关明细信息 + /// + /// + public static void DeleteActionWorkLedgerItemList(string ActionWorkLedgerId) + { + var q = (from x in Funs.DB.Information_ActionWorkLedgerItem where x.ActionWorkLedgerId == ActionWorkLedgerId select x).ToList(); + if (q != null) + { + Funs.DB.Information_ActionWorkLedgerItem.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs new file mode 100644 index 00000000..603f472f --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs @@ -0,0 +1,113 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 中央企业安全生产治本攻坚三年行动工作台账 + /// + public static class ActionWorkLedgerService + { + /// + /// 根据主键获取中央企业安全生产治本攻坚三年行动工作台账 + /// + /// + /// + public static Model.Information_ActionWorkLedger GetActionWorkLedgerById(string ActionWorkLedgerId) + { + return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedgerId); + } + + /// + /// 中央企业安全生产治本攻坚三年行动工作台账 + /// + /// 单位Id + /// 年度 + /// 季度 + /// 中央企业安全生产治本攻坚三年行动工作台账 + public static Model.Information_ActionWorkLedger GetActionWorkLedgerByUnitIdAndYearAndQuarters(string unitId, int year, int quarters) + { + return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.UnitId == unitId && e.Quarter == quarters && e.YearId == year); + } + + /// + /// 根据单位Id获取安全生产数据季报集合 + /// + /// 单位Id + /// 安全生产数据季报集合 + public static List GetActionWorkLedgersByUnitId(string UnitId) + { + return (from x in Funs.DB.View_Information_ActionWorkLedger where x.UnitId == UnitId orderby x.ReportDate descending select x).ToList(); + } + + /// + /// 添加中央企业安全生产治本攻坚三年行动工作台账 + /// + /// + public static void AddActionWorkLedger(Model.Information_ActionWorkLedger ActionWorkLedger) + { + Model.Information_ActionWorkLedger newActionWorkLedger = new Model.Information_ActionWorkLedger + { + ActionWorkLedgerId = ActionWorkLedger.ActionWorkLedgerId, + UnitId = ActionWorkLedger.UnitId, + ReportDate = ActionWorkLedger.ReportDate, + YearId = ActionWorkLedger.YearId, + Quarter = ActionWorkLedger.Quarter, + CompileMan = ActionWorkLedger.CompileMan, + UpState = ActionWorkLedger.UpState, + HandleState = ActionWorkLedger.HandleState, + HandleMan = ActionWorkLedger.HandleMan + }; + Funs.DB.Information_ActionWorkLedger.InsertOnSubmit(newActionWorkLedger); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改中央企业安全生产治本攻坚三年行动工作台账 + /// + /// + public static void UpdateActionWorkLedger(Model.Information_ActionWorkLedger ActionWorkLedger) + { + Model.Information_ActionWorkLedger newActionWorkLedger = Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedger.ActionWorkLedgerId); + if (newActionWorkLedger != null) + { + newActionWorkLedger.UnitId = ActionWorkLedger.UnitId; + newActionWorkLedger.ReportDate = ActionWorkLedger.ReportDate; + newActionWorkLedger.YearId = ActionWorkLedger.YearId; + newActionWorkLedger.Quarter = ActionWorkLedger.Quarter; + newActionWorkLedger.UpState = ActionWorkLedger.UpState; + newActionWorkLedger.HandleState = ActionWorkLedger.HandleState; + newActionWorkLedger.HandleMan = ActionWorkLedger.HandleMan; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除中央企业安全生产治本攻坚三年行动工作台账 + /// + /// + public static void DeleteActionWorkLedgerById(string ActionWorkLedgerId) + { + Model.Information_ActionWorkLedger ActionWorkLedger = Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedgerId); + if (ActionWorkLedger != null) + { + Funs.DB.Information_ActionWorkLedger.DeleteOnSubmit(ActionWorkLedger); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据单位、季度获取中央企业安全生产治本攻坚三年行动工作台账 + /// + /// + /// + /// + public static Model.Information_ActionWorkLedger GetActionWorkLedgerByUnitIdDate(string unitId, int yearId, int quarter, string ActionWorkLedgerId) + { + return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarter == quarter && ((ActionWorkLedgerId == null && e.ActionWorkLedgerId != null) || e.ActionWorkLedgerId != ActionWorkLedgerId)); + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationItemService.cs b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationItemService.cs new file mode 100644 index 00000000..0a0e72bb --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationItemService.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 中央企业安全生产管理评价工作调度台账明细表 + /// + public static class SafetyProductionEvaluationItemService + { + /// + /// 根据主键获取中央企业安全生产管理评价工作调度台账明细信息 + /// + /// + /// + public static Model.Information_SafetyProductionEvaluationItem GetSafetyProductionEvaluationItemById(string SafetyProductionEvaluationItemId) + { + return Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItemId); + } + + /// + /// 根据中央企业安全生产管理评价工作调度台账Id获取所有相关明细信息 + /// + /// + /// + public static List GetSafetyProductionEvaluationItemList(string SafetyProductionEvaluationId) + { + return (from x in Funs.DB.Information_SafetyProductionEvaluationItem where x.SafetyProductionEvaluationId == SafetyProductionEvaluationId orderby x.SortIndex select x).ToList(); + } + + /// + /// 添加中央企业安全生产管理评价工作调度台账明细信息 + /// + /// + public static void AddSafetyProductionEvaluationItem(Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem) + { + Model.Information_SafetyProductionEvaluationItem newSafetyProductionEvaluationItem = new Model.Information_SafetyProductionEvaluationItem + { + SafetyProductionEvaluationItemId = SafetyProductionEvaluationItem.SafetyProductionEvaluationItemId, + SafetyProductionEvaluationId = SafetyProductionEvaluationItem.SafetyProductionEvaluationId, + Type = SafetyProductionEvaluationItem.Type, + EvaluateWork = SafetyProductionEvaluationItem.EvaluateWork, + EvaluationContent = SafetyProductionEvaluationItem.EvaluationContent, + FillingRequirements = SafetyProductionEvaluationItem.FillingRequirements, + CompletionDeadline = SafetyProductionEvaluationItem.CompletionDeadline, + ImplementationStatus = SafetyProductionEvaluationItem.ImplementationStatus, + SortIndex = SafetyProductionEvaluationItem.SortIndex + }; + Funs.DB.Information_SafetyProductionEvaluationItem.InsertOnSubmit(newSafetyProductionEvaluationItem); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改中央企业安全生产管理评价工作调度台账明细信息 + /// + /// + public static void UpdateSafetyProductionEvaluationItem(Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem) + { + Model.Information_SafetyProductionEvaluationItem newSafetyProductionEvaluationItem = Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItem.SafetyProductionEvaluationItemId); + if (newSafetyProductionEvaluationItem != null) + { + newSafetyProductionEvaluationItem.Type = SafetyProductionEvaluationItem.Type; + newSafetyProductionEvaluationItem.EvaluateWork = SafetyProductionEvaluationItem.EvaluateWork; + newSafetyProductionEvaluationItem.EvaluationContent = SafetyProductionEvaluationItem.EvaluationContent; + newSafetyProductionEvaluationItem.FillingRequirements = SafetyProductionEvaluationItem.FillingRequirements; + newSafetyProductionEvaluationItem.CompletionDeadline = SafetyProductionEvaluationItem.CompletionDeadline; + newSafetyProductionEvaluationItem.ImplementationStatus = SafetyProductionEvaluationItem.ImplementationStatus; + newSafetyProductionEvaluationItem.SortIndex = SafetyProductionEvaluationItem.SortIndex; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除中央企业安全生产管理评价工作调度台账明细信息 + /// + /// + public static void DeleteSafetyProductionEvaluationItemById(string SafetyProductionEvaluationItemId) + { + Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem = Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItemId); + if (SafetyProductionEvaluationItem != null) + { + Funs.DB.Information_SafetyProductionEvaluationItem.DeleteOnSubmit(SafetyProductionEvaluationItem); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据中央企业安全生产管理评价工作调度台账主表id删除所有相关明细信息 + /// + /// + public static void DeleteSafetyProductionEvaluationItemList(string SafetyProductionEvaluationId) + { + var q = (from x in Funs.DB.Information_SafetyProductionEvaluationItem where x.SafetyProductionEvaluationId == SafetyProductionEvaluationId select x).ToList(); + if (q != null) + { + Funs.DB.Information_SafetyProductionEvaluationItem.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationService.cs b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationService.cs new file mode 100644 index 00000000..ba36d562 --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/SafetyProductionEvaluationService.cs @@ -0,0 +1,113 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 中央企业安全生产管理评价工作调度台账 + /// + public static class SafetyProductionEvaluationService + { + /// + /// 根据主键获取中央企业安全生产管理评价工作调度台账 + /// + /// + /// + public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationById(string SafetyProductionEvaluationId) + { + return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluationId); + } + + /// + /// 中央企业安全生产管理评价工作调度台账 + /// + /// 单位Id + /// 年度 + /// 季度 + /// 中央企业安全生产管理评价工作调度台账 + public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(string unitId, int year, int quarters) + { + return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.UnitId == unitId && e.Quarter == quarters && e.YearId == year); + } + + /// + /// 根据单位Id获取安全生产数据季报集合 + /// + /// 单位Id + /// 安全生产数据季报集合 + public static List GetSafetyProductionEvaluationsByUnitId(string UnitId) + { + return (from x in Funs.DB.View_Information_SafetyProductionEvaluation where x.UnitId == UnitId orderby x.ReportDate descending select x).ToList(); + } + + /// + /// 添加中央企业安全生产管理评价工作调度台账 + /// + /// + public static void AddSafetyProductionEvaluation(Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation) + { + Model.Information_SafetyProductionEvaluation newSafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation + { + SafetyProductionEvaluationId = SafetyProductionEvaluation.SafetyProductionEvaluationId, + UnitId = SafetyProductionEvaluation.UnitId, + ReportDate = SafetyProductionEvaluation.ReportDate, + YearId = SafetyProductionEvaluation.YearId, + Quarter = SafetyProductionEvaluation.Quarter, + CompileMan = SafetyProductionEvaluation.CompileMan, + UpState = SafetyProductionEvaluation.UpState, + HandleState = SafetyProductionEvaluation.HandleState, + HandleMan = SafetyProductionEvaluation.HandleMan + }; + Funs.DB.Information_SafetyProductionEvaluation.InsertOnSubmit(newSafetyProductionEvaluation); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改中央企业安全生产管理评价工作调度台账 + /// + /// + public static void UpdateSafetyProductionEvaluation(Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation) + { + Model.Information_SafetyProductionEvaluation newSafetyProductionEvaluation = Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluation.SafetyProductionEvaluationId); + if (newSafetyProductionEvaluation != null) + { + newSafetyProductionEvaluation.UnitId = SafetyProductionEvaluation.UnitId; + newSafetyProductionEvaluation.ReportDate = SafetyProductionEvaluation.ReportDate; + newSafetyProductionEvaluation.YearId = SafetyProductionEvaluation.YearId; + newSafetyProductionEvaluation.Quarter = SafetyProductionEvaluation.Quarter; + newSafetyProductionEvaluation.UpState = SafetyProductionEvaluation.UpState; + newSafetyProductionEvaluation.HandleState = SafetyProductionEvaluation.HandleState; + newSafetyProductionEvaluation.HandleMan = SafetyProductionEvaluation.HandleMan; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除中央企业安全生产管理评价工作调度台账 + /// + /// + public static void DeleteSafetyProductionEvaluationById(string SafetyProductionEvaluationId) + { + Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation = Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluationId); + if (SafetyProductionEvaluation != null) + { + Funs.DB.Information_SafetyProductionEvaluation.DeleteOnSubmit(SafetyProductionEvaluation); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据单位、季度获取中央企业安全生产管理评价工作调度台账 + /// + /// + /// + /// + public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationByUnitIdDate(string unitId, int yearId, int quarter, string SafetyProductionEvaluationId) + { + return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarter == quarter && ((SafetyProductionEvaluationId == null && e.SafetyProductionEvaluationId != null) || e.SafetyProductionEvaluationId != SafetyProductionEvaluationId)); + } + } +} diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 794b3fb2..0ddf8466 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -3406,6 +3406,8 @@ + + @@ -3422,6 +3424,8 @@ + + @@ -15995,6 +15999,20 @@ AccidentCauseReportSave.aspx + + ActionWorkLedger.aspx + ASPXCodeBehind + + + ActionWorkLedger.aspx + + + ActionWorkLedgerAdd.aspx + ASPXCodeBehind + + + ActionWorkLedgerAdd.aspx + DrillConductedQuarterlyReport.aspx ASPXCodeBehind @@ -16107,6 +16125,20 @@ SafetyBriefingEdit.aspx + + SafetyProductionEvaluation.aspx + ASPXCodeBehind + + + SafetyProductionEvaluation.aspx + + + SafetyProductionEvaluationAdd.aspx + ASPXCodeBehind + + + SafetyProductionEvaluationAdd.aspx + SafetyQuarterlyReport.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx new file mode 100644 index 00000000..56a89903 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx @@ -0,0 +1,159 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionWorkLedger.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.ActionWorkLedger" %> + + + + + + + 中央企业安全生产治本攻坚三年行动工作台账 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.cs new file mode 100644 index 00000000..60b0ab85 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.cs @@ -0,0 +1,619 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class ActionWorkLedger : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string ActionWorkLedgerId + { + get + { + return (string)ViewState["ActionWorkLedgerId"]; + } + set + { + ViewState["ActionWorkLedgerId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List ActionWorkLedgerItems = new List(); + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BLL.ConstValue.InitConstValueDropDownList(this.drpQuarter, ConstValue.Group_0011, false); + BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false); + this.drpUnit.DataTextField = "UnitName"; + drpUnit.DataValueField = "UnitId"; + drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + drpUnit.DataBind(); + this.drpUnit.Readonly = true; + DateTime showDate = System.DateTime.Now.AddMonths(-3); + this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString(); + this.drpYear.SelectedValue = showDate.Year.ToString(); + GetValue(); + } + } + #endregion + + #region 清空文本框 + private void SetEmpty() + { + this.SimpleForm1.Title = string.Empty; + txtUnitName.Text = string.Empty; + txtQuarter.Text = string.Empty; + txtCompileDate.Text = string.Empty; + this.lbHandleMan.Text = string.Empty; + Grid1.DataSource = null; + Grid1.DataBind(); + } + #endregion + + #region 获取记录值 + private void GetValue() + { + int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); + int quarter = Funs.GetNewIntOrZero(drpQuarter.SelectedValue); + this.ActionWorkLedgerId = string.Empty; + Model.View_Information_ActionWorkLedger report = Funs.DB.View_Information_ActionWorkLedger.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarter == quarter && e.YearId == year); + if (report != null) + { + string state = string.Empty; + if (report.UpState == BLL.Const.UpState_3) + { + state = "(已上报)"; + } + else + { + if (report.HandleState == BLL.Const.HandleState_1) + { + state = "(待提交)"; + } + else if (report.HandleState == BLL.Const.HandleState_2) + { + state = "(待审核)"; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + state = "(待审批)"; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + state = "(待上报)"; + } + } + this.SimpleForm1.Title = "中央企业安全生产治本攻坚三年行动工作台账" + state; + this.ActionWorkLedgerId = report.ActionWorkLedgerId; + txtUnitName.Text = "单位:" + report.UnitName; + txtQuarter.Text = "季度:" + report.Quarters; + if (report.HandleState == BLL.Const.HandleState_1 || report.UpState == BLL.Const.UpState_3) + { + this.lbHandleMan.Hidden = true; + } + else + { + this.lbHandleMan.Hidden = false; + this.lbHandleMan.Text = "下一步办理人:" + report.UserName; + } + if (report.ReportDate != null) + { + txtCompileDate.Text = "制表时间:" + string.Format("{0:yyyy-MM-dd}", report.ReportDate); + } + BindGrid1(); + } + else + { + SetEmpty(); + } + this.GetButtonPower(); + } + #endregion + + #region 加载Grid + private void BindGrid1() + { + string strSql = "select * from dbo.Information_ActionWorkLedgerItem where ActionWorkLedgerId = @ActionWorkLedgerId order by SortIndex"; + SqlParameter[] parameter = new SqlParameter[] + { + new SqlParameter("@ActionWorkLedgerId",this.ActionWorkLedgerId), + }; + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 增加、修改、删除、审核、审批、上报按钮事件 + /// + /// Tree增加按钮 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ActionWorkLedgerAdd.aspx?UnitId={0}&&Year={1}&&Quarter={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpQuarter.SelectedValue, "编辑 - "))); + } + + /// + /// 显示编辑页面 + /// + private void ShowEdit() + { + Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report == null) + { + Alert.ShowInTop("所选时间无报表记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ActionWorkLedgerAdd.aspx?ActionWorkLedgerId={0}", report.ActionWorkLedgerId, "编辑 - "))); + } + + /// + /// Tree编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 审核 + /// + /// + /// + protected void btnAudit1_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 审批 + /// + /// + /// + protected void btnAudit2_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 上报 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// Tree删除按钮 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, report.YearId.ToString() + "-" + report.Quarter.ToString(), + report.ActionWorkLedgerId, BLL.Const.ActionWorkLedgerMenuId, BLL.Const.BtnDelete); + BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.ActionWorkLedgerId); + BLL.ActionWorkLedgerItemService.DeleteActionWorkLedgerItemList(report.ActionWorkLedgerId); + BLL.ActionWorkLedgerService.DeleteActionWorkLedgerById(report.ActionWorkLedgerId); + + SetEmpty(); + //this.btnNew.Hidden = false; + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 过滤、分页、排序、关闭窗口 + /// + /// 表头过滤 + /// + /// + /// + protected void Grid1_FilterChange(object sender, EventArgs e) + { + BindGrid1(); + } + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid1(); + } + + /// + /// Grid1排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid1(); + } + + /// + /// 分页列表显示条数下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + } + + /// + /// 关闭Grid1弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.ActionWorkLedgerMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + this.btnGet.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnPrint)) + //{ + // this.btnPrint.Hidden = false; + //} + int year = Funs.GetNewIntOrZero(this.drpYear.SelectedValue); + int quarter = Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue); + var report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(this.drpUnit.SelectedValue, year, quarter); + this.btnAudit1.Hidden = true; + this.btnAudit2.Hidden = true; + this.btnUpdata.Hidden = true; + if (report != null) + { + this.btnNew.Hidden = true; + if (report.HandleMan == this.CurrUser.PersonId) //当前人是下一步办理入 + { + if (report.HandleState == BLL.Const.HandleState_2) + { + this.btnAudit1.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + this.btnAudit2.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + this.btnDelete.Hidden = true; + this.btnUpdata.Hidden = false; + } + } + if (report.UpState == BLL.Const.UpState_3) + { + this.btnUpdata.Hidden = true; + this.btnEdit.Hidden = true; + this.btnDelete.Hidden = true; + } + if (report.HandleMan == this.CurrUser.PersonId || report.CompileMan == this.CurrUser.PersonName) + { + this.btnEdit.Hidden = false; + } + else + { + this.btnEdit.Hidden = true; + } + } + } + + if (this.CurrUser.PersonId == BLL.Const.sysglyId) + { + this.btnDelete.Hidden = false; + } + } + #endregion + + #region 单位下拉框联动事件 + /// + /// 单位下拉框联动事件 + /// + /// + /// + protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) + { + GetValue(); + } + #endregion + + #region 获取 + /// + /// 获取按钮 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report == null) + { + var returnValue = getActionWorkLedgerToSUB(); + if (returnValue.code == 1) + { + ShowNotify(returnValue.message, MessageBoxIcon.Success); + GetValue(); + } + else + { + Alert.ShowInTop(returnValue.message, MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("该季度记录已存在,无需获取!", MessageBoxIcon.Warning); + } + } + + /// + /// 获取 + /// + /// + /// + public Model.ResponeData getActionWorkLedgerToSUB() + { + var responeData = new Model.ResponeData(); + try + { + string unitId = BLL.Const.UnitId_SEDIN; + string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getActionWorkLedger?year=" + this.drpYear.SelectedValue + "&quarter=" + this.drpQuarter.SelectedValue; + string contenttype = "application/json;charset=unicode"; + Hashtable newToken = new Hashtable + { + { "token", ServerService.GetToken().Token } + }; + + var strJosn = APIGetHttpService.Http(baseurl, "GET", contenttype, newToken, null); + if (!string.IsNullOrEmpty(strJosn)) + { + JObject obj = JObject.Parse(strJosn); + responeData.code = Funs.GetNewIntOrZero(obj["code"].ToString()); + responeData.message = obj["message"].ToString(); + if (responeData.code == 1) + { + JArray getData = JArray.Parse(obj["data"].ToString()); + if (getData.Count() > 0) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + int i = 0; + string actionWorkLedgerId = SQLHelper.GetNewID(); + foreach (var item in getData) + { + if (i == 0) + { + Model.Information_ActionWorkLedger actionWorkLedger = new Model.Information_ActionWorkLedger(); + actionWorkLedger.ActionWorkLedgerId = actionWorkLedgerId; + actionWorkLedger.UnitId = BLL.Const.UnitId_SEDIN; + actionWorkLedger.ReportDate = DateTime.Now; + actionWorkLedger.Quarter = Funs.GetNewInt(this.drpQuarter.SelectedValue); + actionWorkLedger.YearId = Funs.GetNewInt(this.drpYear.SelectedValue); + actionWorkLedger.CompileMan = this.CurrUser.PersonName; + actionWorkLedger.UpState = BLL.Const.UpState_2; + actionWorkLedger.HandleState = BLL.Const.HandleState_1; + actionWorkLedger.HandleMan = this.CurrUser.PersonId; + BLL.ActionWorkLedgerService.AddActionWorkLedger(actionWorkLedger); + } + Model.Information_ActionWorkLedgerItem newItem = new Model.Information_ActionWorkLedgerItem(); + newItem.ActionWorkLedgerItemId = SQLHelper.GetNewID(); + newItem.ActionWorkLedgerId = actionWorkLedgerId; + newItem.SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()); + newItem.Focus = item["Focus"].ToString(); + newItem.SpecialTask = item["SpecialTask"].ToString(); + newItem.WorkPoints = item["WorkPoints"].ToString(); + newItem.FillingRequirements = item["FillingRequirements"].ToString(); + newItem.CompletionDeadline = item["CompletionDeadline"].ToString(); + BLL.ActionWorkLedgerItemService.AddActionWorkLedgerItem(newItem); + i++; + } + } + responeData.message = "获取成功!"; + } + else + { + responeData.code = 0; + responeData.message = "集团记录尚未生成!"; + } + } + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = "获取失败:" + ex.Message; + ErrLogInfo.WriteLog("中央企业安全生产治本攻坚三年行动工作台账获取!", ex); + } + + return responeData; + } + #endregion + + #region 关闭导入弹出窗口 + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + + /// + /// 关闭查看审批信息弹出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + //Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + //if (report != null) + //{ + // PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?reportId={0}&&replaceParameter={1}&&varValue={2}", Const.Information_ActionWorkLedgerId, report.ActionWorkLedgerId, "", "打印 - "))); + //} + } + #endregion + + #region 季度向前/向后 + /// + /// 前一季度 + /// + /// + /// + protected void BtnBulletLeft_Click(object sender, EventArgs e) + { + SetMonthChange("-"); + } + + /// + /// 后一季度 + /// + /// + /// + protected void BulletRight_Click(object sender, EventArgs e) + { + SetMonthChange("+"); + } + + /// + /// 季度加减变化 + /// + /// + private void SetMonthChange(string type) + { + DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue) * 3).ToString()); + if (nowDate.HasValue) + { + DateTime showDate = new DateTime(); + if (type == "+") + { + showDate = nowDate.Value.AddMonths(3); + } + else + { + showDate = nowDate.Value.AddMonths(-3); + } + + this.drpYear.SelectedValue = showDate.Year.ToString(); + this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString(); + ///值变化 + GetValue(); + } + } + #endregion + + #region 查看审批信息 + /// + /// 查看审批信息 + /// + /// + /// + protected void btnSee_Click(object sender, EventArgs e) + { + Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.ActionWorkLedgerId, "查看 - "))); + } + else + { + ShowNotify("所选月份无记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("中央企业安全生产治本攻坚三年行动工作台账" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.designer.cs new file mode 100644 index 00000000..76d23bcb --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx.designer.cs @@ -0,0 +1,276 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class ActionWorkLedger { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// RegionPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RegionPanel RegionPanel1; + + /// + /// Region2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region2; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// drpQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpQuarter; + + /// + /// BtnBulletLeft 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletLeft; + + /// + /// BtnBulletRight 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletRight; + + /// + /// btnSee 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnAudit1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit1; + + /// + /// btnAudit2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit2; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// txtUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtUnitName; + + /// + /// txtQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtQuarter; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCompileDate; + + /// + /// lbHandleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbHandleMan; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + + /// + /// Window4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window4; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx new file mode 100644 index 00000000..e4c5def0 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx @@ -0,0 +1,108 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionWorkLedgerAdd.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.ActionWorkLedgerAdd" %> + + + + + + + 编辑中央企业安全生产治本攻坚三年行动工作台账 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.cs new file mode 100644 index 00000000..cbf4d886 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.cs @@ -0,0 +1,534 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class ActionWorkLedgerAdd : PageBase + { + #region 定义变量 + public string ActionWorkLedgerId + { + get + { + return (string)ViewState["ActionWorkLedgerId"]; + } + set + { + ViewState["ActionWorkLedgerId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List items = new List(); + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + items.Clear(); + this.ddlUnitId.DataTextField = "UnitName"; + this.ddlUnitId.DataValueField = "UnitId"; + this.ddlUnitId.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + this.ddlUnitId.DataBind(); + + this.ddlYearId.DataTextField = "ConstText"; + ddlYearId.DataValueField = "ConstValue"; + ddlYearId.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); + ddlYearId.DataBind(); + + this.ddlQuarter.DataTextField = "ConstText"; + ddlQuarter.DataValueField = "ConstValue"; + ddlQuarter.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0011); + ddlQuarter.DataBind(); + this.ddlUnitId.Readonly = true; + string unitId = Request.Params["UnitId"]; + string year = Request.QueryString["Year"]; + string quarter = Request.QueryString["Quarter"]; + this.ActionWorkLedgerId = Request.Params["ActionWorkLedgerId"]; + if (!string.IsNullOrEmpty(this.ActionWorkLedgerId)) + { + items = BLL.ActionWorkLedgerItemService.GetActionWorkLedgerItemList(this.ActionWorkLedgerId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + + var ActionWorkLedger = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(this.ActionWorkLedgerId); + if (ActionWorkLedger != null) + { + this.btnCopy.Hidden = true; + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + if (ActionWorkLedger.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + } + else + { + if (ActionWorkLedger.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + } + if (ActionWorkLedger.UpState == BLL.Const.UpState_3) //已上报 + { + this.btnSave.Hidden = true; + this.btnUpdata.Hidden = true; + } + if (!string.IsNullOrEmpty(ActionWorkLedger.UnitId)) + { + this.ddlUnitId.SelectedValue = ActionWorkLedger.UnitId; + } + if (ActionWorkLedger.YearId.HasValue) + { + this.ddlYearId.SelectedValue = ActionWorkLedger.YearId.ToString(); + } + if (ActionWorkLedger.Quarter.HasValue) + { + this.ddlQuarter.SelectedValue = ActionWorkLedger.Quarter.ToString(); + } + if (ActionWorkLedger.ReportDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", ActionWorkLedger.ReportDate); + } + } + } + else + { + //this.btnCopy.Hidden = false; + this.ddlUnitId.SelectedValue = unitId; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.ddlYearId.SelectedValue = year; + this.ddlQuarter.SelectedValue = quarter; + ////获取项目报告集合 + //List projectItems = (from x in Funs.DB.InformationProject_ActionWorkLedger + // join y in Funs.DB.InformationProject_ActionWorkLedgerItem + // on x.ActionWorkLedgerId equals y.ActionWorkLedgerId + // where x.YearId.ToString() == year && x.Quarter.ToString() == quarter && x.States == BLL.Const.State_2 + // select y).Distinct().ToList(); + //if (projectItems.Count > 0) + //{ + // int i = 0; + // foreach (var projectItem in projectItems) + // { + // i += 10; + // Model.Information_ActionWorkLedgerItem item = new Model.Information_ActionWorkLedgerItem + // { + // ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem)), + // SortIndex = i + // }; + // Model.Base_Project project = (from x in Funs.DB.Base_Project + // join y in Funs.DB.InformationProject_ActionWorkLedger + // on x.ProjectId equals y.ProjectId + // join z in Funs.DB.InformationProject_ActionWorkLedgerItem + // on y.ActionWorkLedgerId equals z.ActionWorkLedgerId + // where z.ActionWorkLedgerItemId == projectItem.ActionWorkLedgerItemId + // select x).FirstOrDefault(); + // if (project != null) + // { + // item.IndustryType = project.ProjectName; + // } + // item.TotalConductCount = projectItem.TotalConductCount; + // item.TotalPeopleCount = projectItem.TotalPeopleCount; + // item.TotalInvestment = projectItem.TotalInvestment; + // item.HQConductCount = projectItem.HQConductCount; + // item.HQPeopleCount = projectItem.HQPeopleCount; + // item.HQInvestment = projectItem.HQInvestment; + // item.BasicConductCount = projectItem.BasicConductCount; + // item.BasicPeopleCount = projectItem.BasicPeopleCount; + // item.BasicInvestment = projectItem.BasicInvestment; + // item.ComprehensivePractice = projectItem.ComprehensivePractice; + // item.CPScene = projectItem.CPScene; + // item.CPDesktop = projectItem.CPDesktop; + // item.SpecialDrill = projectItem.SpecialDrill; + // item.SDScene = projectItem.SDScene; + // item.SDDesktop = projectItem.SDDesktop; + // items.Add(item); + // } + //} + //else + //{ + // for (int i = 0; i < 100; i++) + // { + // i += 10; + // Model.Information_ActionWorkLedgerItem newItem = new Model.Information_ActionWorkLedgerItem + // { + // ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem)), + // SortIndex = i + // }; + // items.Add(newItem); + // } + //} + Grid1.DataSource = items; + Grid1.DataBind(); + + + } + } + } + + #endregion + + #region 保存、提交、上报 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Save("add"); + } + + /// + /// 上报按钮 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + Save("updata"); + } + + /// + /// 提交按钮 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + Save("submit"); + } + + /// + /// 保存数据 + /// + /// + private void Save(string type) + { + if (this.ddlUnitId.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择单位!", MessageBoxIcon.Warning); + return; + } + var drill = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdDate(this.ddlUnitId.SelectedValue, Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue), Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue), this.ActionWorkLedgerId); + if (drill != null) + { + ShowNotify("本单位本季度报表已存在,不能重复编制", MessageBoxIcon.Warning); + return; + } + + var ActionWorkLedger = new Model.Information_ActionWorkLedger(); + if (this.ddlUnitId.SelectedValue != BLL.Const._Null) + { + ActionWorkLedger.UnitId = this.ddlUnitId.SelectedValue; + } + if (!string.IsNullOrEmpty(this.dpkCompileDate.Text.Trim())) + { + ActionWorkLedger.ReportDate = Convert.ToDateTime(this.dpkCompileDate.Text.Trim()); + } + ActionWorkLedger.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + ActionWorkLedger.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + if (string.IsNullOrEmpty(this.ActionWorkLedgerId)) + { + this.ActionWorkLedgerId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedger)); ActionWorkLedger.ActionWorkLedgerId = this.ActionWorkLedgerId; + ActionWorkLedger.CompileMan = this.CurrUser.PersonName; + ActionWorkLedger.UpState = BLL.Const.UpState_2; + ActionWorkLedger.HandleMan = this.CurrUser.PersonId; + ActionWorkLedger.HandleState = BLL.Const.HandleState_1; + BLL.ActionWorkLedgerService.AddActionWorkLedger(ActionWorkLedger); + BLL.LogService.AddSys_Log(this.CurrUser, ActionWorkLedger.YearId.ToString() + "-" + ActionWorkLedger.Quarter.ToString(), + ActionWorkLedger.ActionWorkLedgerId, BLL.Const.ActionWorkLedgerMenuId, BLL.Const.BtnAdd); + } + else + { + Model.Information_ActionWorkLedger oldReport = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(this.ActionWorkLedgerId); + if (oldReport != null) + { + ActionWorkLedger.HandleMan = oldReport.HandleMan; + ActionWorkLedger.HandleState = oldReport.HandleState; + } + ActionWorkLedger.ActionWorkLedgerId = this.ActionWorkLedgerId; + ActionWorkLedger.UpState = BLL.Const.UpState_2; + BLL.ActionWorkLedgerService.UpdateActionWorkLedger(ActionWorkLedger); + BLL.LogService.AddSys_Log(this.CurrUser, ActionWorkLedger.YearId.ToString() + "-" + ActionWorkLedger.Quarter.ToString(), + ActionWorkLedger.ActionWorkLedgerId, BLL.Const.ActionWorkLedgerMenuId, BLL.Const.BtnModify); + BLL.ActionWorkLedgerItemService.DeleteActionWorkLedgerItemList(ActionWorkLedger.ActionWorkLedgerId); + } + GetItems(ActionWorkLedger.ActionWorkLedgerId); + foreach (var item in items) + { + BLL.ActionWorkLedgerItemService.AddActionWorkLedgerItem(item); + } + if (type == "updata") //保存并上报 + { + if (ActionWorkLedger.UpState == BLL.Const.UpState_2) + { + string code = CNCECHSSEWebService.UpActionWorkLedger(ActionWorkLedger.ActionWorkLedgerId, this.CurrUser); + if (code == "1") + { + ShowNotify("同步成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return; + } + else + { + Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); + } + } + else + { + ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning); + return; + } + } + if (type == "submit") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=ActionWorkLedger&Id={0}", ActionWorkLedger.ActionWorkLedgerId, "编辑 - "))); + } + else + { + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } + + /// + /// 获取明细值 + /// + /// + private void GetItems(string ActionWorkLedgerId) + { + items.Clear(); + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + Model.Information_ActionWorkLedgerItem item = new Model.Information_ActionWorkLedgerItem(); + if (values["ActionWorkLedgerItemId"].ToString() != "") + { + item.ActionWorkLedgerItemId = values.Value("ActionWorkLedgerItemId"); + } + item.ActionWorkLedgerId = ActionWorkLedgerId; + item.SortIndex = Funs.GetNewInt(values.Value("SortIndex")); + if (values["Focus"].ToString() != "") + { + item.Focus = values.Value("Focus"); + } + if (values["SpecialTask"].ToString() != "") + { + item.SpecialTask = values.Value("SpecialTask"); + } + if (values["WorkPoints"].ToString() != "") + { + item.WorkPoints = values.Value("WorkPoints"); + } + if (values["FillingRequirements"].ToString() != "") + { + item.FillingRequirements = values.Value("FillingRequirements"); + } + if (values["CompletionDeadline"].ToString() != "") + { + item.CompletionDeadline = values.Value("CompletionDeadline"); + } + if (values["ImplementationStatus"].ToString() != "") + { + item.ImplementationStatus = values.Value("ImplementationStatus"); + } + items.Add(item); + } + } + #endregion + + #region 关闭办理流程窗口 + /// + /// 关闭办理流程窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(this.ActionWorkLedgerId); + if (report.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + else + { + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + } + } + #endregion + + #region Grid行事件 + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + GetItems(string.Empty); + if (e.CommandName == "Add") + { + Model.Information_ActionWorkLedgerItem oldItem = items.FirstOrDefault(x => x.ActionWorkLedgerItemId == rowID); + Model.Information_ActionWorkLedgerItem newItem = new Model.Information_ActionWorkLedgerItem + { + ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem)) + }; + if (oldItem != null) + { + newItem.SortIndex = oldItem.SortIndex + 1; + } + else + { + newItem.SortIndex = 0; + } + items.Add(newItem); + items = items.OrderBy(x => x.SortIndex).ToList(); + Grid1.DataSource = items; + Grid1.DataBind(); + } + if (e.CommandName == "Delete") + { + if (Grid1.Rows.Count == 1) + { + ShowNotify("只有一条数据,无法删除", MessageBoxIcon.Warning); + return; + } + foreach (var item in items) + { + if (item.ActionWorkLedgerItemId == rowID) + { + items.Remove(item); + break; + } + } + Grid1.DataSource = items; + Grid1.DataBind(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.ActionWorkLedgerMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + this.btnCopy.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnSaveUp)) + //{ + // this.btnUpdata.Hidden = false; + + //} + if (buttonList.Contains(BLL.Const.BtnSubmit)) + { + this.btnSubmit.Hidden = false; + } + } + } + #endregion + + #region 复制上个季度数据 + /// + /// 复制上个季度的数据 + /// + /// + /// + protected void btnCopy_Click(object sender, EventArgs e) + { + int lastYear = 0, lastQuarter = 0; + int year = Convert.ToInt32(this.ddlYearId.SelectedValue); + int quarter = Convert.ToInt32(this.ddlQuarter.SelectedValue); + if (quarter == 1) + { + lastYear = year - 1; + lastQuarter = 4; + } + else + { + lastYear = year; + lastQuarter = quarter - 1; + } + Model.Information_ActionWorkLedger ActionWorkLedger = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(this.ddlUnitId.SelectedValue, lastYear, lastQuarter); + if (ActionWorkLedger != null) + { + Model.Information_ActionWorkLedger newActionWorkLedger = new Model.Information_ActionWorkLedger(); + this.ActionWorkLedgerId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedger)); + newActionWorkLedger.ActionWorkLedgerId = this.ActionWorkLedgerId; + newActionWorkLedger.UnitId = this.ddlUnitId.SelectedValue; + newActionWorkLedger.ReportDate = DateTime.Now; + newActionWorkLedger.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + newActionWorkLedger.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + newActionWorkLedger.CompileMan = this.CurrUser.PersonName; + newActionWorkLedger.UpState = BLL.Const.UpState_2; + newActionWorkLedger.HandleState = BLL.Const.HandleState_1; + newActionWorkLedger.HandleMan = this.CurrUser.PersonId; + BLL.ActionWorkLedgerService.AddActionWorkLedger(newActionWorkLedger); + + items = BLL.ActionWorkLedgerItemService.GetActionWorkLedgerItemList(ActionWorkLedger.ActionWorkLedgerId); + if (items.Count > 0) + { + foreach (var item in items) + { + Model.Information_ActionWorkLedgerItem newItem = new Model.Information_ActionWorkLedgerItem + { + ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem)), + ActionWorkLedgerId = this.ActionWorkLedgerId, + SortIndex = item.SortIndex + }; + BLL.ActionWorkLedgerItemService.AddActionWorkLedgerItem(newItem); + } + } + GetValues(newActionWorkLedger.ActionWorkLedgerId); + } + + } + + /// + /// 获取数据 + /// + private void GetValues(string ActionWorkLedgerId) + { + var report = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(ActionWorkLedgerId); + if (report != null) + { + if (!string.IsNullOrEmpty(report.UnitId)) + { + this.ddlUnitId.SelectedValue = report.UnitId; + } + if (report.YearId.HasValue) + { + this.ddlYearId.SelectedValue = report.YearId.ToString(); + } + if (report.Quarter.HasValue) + { + this.ddlQuarter.SelectedValue = report.Quarter.ToString(); + } + if (report.ReportDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", report.ReportDate); + } + items = BLL.ActionWorkLedgerItemService.GetActionWorkLedgerItemList(ActionWorkLedgerId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.designer.cs new file mode 100644 index 00000000..ffe225da --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class ActionWorkLedgerAdd { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ddlUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlUnitId; + + /// + /// ddlYearId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlYearId; + + /// + /// ddlQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlQuarter; + + /// + /// dpkCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCompileDate; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtImplementationStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtImplementationStatus; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnCopy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCopy; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs index 743c5034..f4af5b2e 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs @@ -205,6 +205,34 @@ namespace FineUIPro.Web.ZHGL.Information //} #endregion + #region 中央企业安全生产治本攻坚三年行动工作台账 + if (Type == "ActionWorkLedger")//中央企业安全生产治本攻坚三年行动工作台账 + { + var report = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(Id); + if (report != null) + { + SetFlowData(Const.ActionWorkLedgerMenuId, this.Id, handleMan); + report.HandleState = handleStates; + report.HandleMan = handleMan; + BLL.ActionWorkLedgerService.UpdateActionWorkLedger(report); + } + } + #endregion + + #region 中央企业安全生产管理评价工作调度台账 + if (Type == "SafetyProductionEvaluation")//中央企业安全生产管理评价工作调度台账 + { + var report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(Id); + if (report != null) + { + SetFlowData(Const.SafetyProductionEvaluationMenuId, this.Id, handleMan); + report.HandleState = handleStates; + report.HandleMan = handleMan; + BLL.SafetyProductionEvaluationService.UpdateSafetyProductionEvaluation(report); + } + } + #endregion + ShowNotify("提交成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx new file mode 100644 index 00000000..8035b48f --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx @@ -0,0 +1,163 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyProductionEvaluation.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.SafetyProductionEvaluation" %> + + + + + + + 中央企业安全生产管理评价工作调度台账 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.cs new file mode 100644 index 00000000..4148a44b --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.cs @@ -0,0 +1,619 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class SafetyProductionEvaluation : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string SafetyProductionEvaluationId + { + get + { + return (string)ViewState["SafetyProductionEvaluationId"]; + } + set + { + ViewState["SafetyProductionEvaluationId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List SafetyProductionEvaluationItems = new List(); + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BLL.ConstValue.InitConstValueDropDownList(this.drpQuarter, ConstValue.Group_0011, false); + BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false); + this.drpUnit.DataTextField = "UnitName"; + drpUnit.DataValueField = "UnitId"; + drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + drpUnit.DataBind(); + this.drpUnit.Readonly = true; + DateTime showDate = System.DateTime.Now.AddMonths(-3); + this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString(); + this.drpYear.SelectedValue = showDate.Year.ToString(); + GetValue(); + } + } + #endregion + + #region 清空文本框 + private void SetEmpty() + { + this.SimpleForm1.Title = string.Empty; + txtUnitName.Text = string.Empty; + txtQuarter.Text = string.Empty; + txtCompileDate.Text = string.Empty; + this.lbHandleMan.Text = string.Empty; + Grid1.DataSource = null; + Grid1.DataBind(); + } + #endregion + + #region 获取记录值 + private void GetValue() + { + int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); + int quarter = Funs.GetNewIntOrZero(drpQuarter.SelectedValue); + this.SafetyProductionEvaluationId = string.Empty; + Model.View_Information_SafetyProductionEvaluation report = Funs.DB.View_Information_SafetyProductionEvaluation.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarter == quarter && e.YearId == year); + if (report != null) + { + string state = string.Empty; + if (report.UpState == BLL.Const.UpState_3) + { + state = "(已上报)"; + } + else + { + if (report.HandleState == BLL.Const.HandleState_1) + { + state = "(待提交)"; + } + else if (report.HandleState == BLL.Const.HandleState_2) + { + state = "(待审核)"; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + state = "(待审批)"; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + state = "(待上报)"; + } + } + this.SimpleForm1.Title = "中央企业安全生产管理评价工作调度台账" + state; + this.SafetyProductionEvaluationId = report.SafetyProductionEvaluationId; + txtUnitName.Text = "单位:" + report.UnitName; + txtQuarter.Text = "季度:" + report.Quarters; + if (report.HandleState == BLL.Const.HandleState_1 || report.UpState == BLL.Const.UpState_3) + { + this.lbHandleMan.Hidden = true; + } + else + { + this.lbHandleMan.Hidden = false; + this.lbHandleMan.Text = "下一步办理人:" + report.UserName; + } + if (report.ReportDate != null) + { + txtCompileDate.Text = "制表时间:" + string.Format("{0:yyyy-MM-dd}", report.ReportDate); + } + BindGrid1(); + } + else + { + SetEmpty(); + } + this.GetButtonPower(); + } + #endregion + + #region 加载Grid + private void BindGrid1() + { + string strSql = "select * from dbo.Information_SafetyProductionEvaluationItem where SafetyProductionEvaluationId = @SafetyProductionEvaluationId order by SortIndex"; + SqlParameter[] parameter = new SqlParameter[] + { + new SqlParameter("@SafetyProductionEvaluationId",this.SafetyProductionEvaluationId), + }; + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 增加、修改、删除、审核、审批、上报按钮事件 + /// + /// Tree增加按钮 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyProductionEvaluationAdd.aspx?UnitId={0}&&Year={1}&&Quarter={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpQuarter.SelectedValue, "编辑 - "))); + } + + /// + /// 显示编辑页面 + /// + private void ShowEdit() + { + Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report == null) + { + Alert.ShowInTop("所选时间无报表记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyProductionEvaluationAdd.aspx?SafetyProductionEvaluationId={0}", report.SafetyProductionEvaluationId, "编辑 - "))); + } + + /// + /// Tree编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 审核 + /// + /// + /// + protected void btnAudit1_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 审批 + /// + /// + /// + protected void btnAudit2_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 上报 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// Tree删除按钮 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, report.YearId.ToString() + "-" + report.Quarter.ToString(), + report.SafetyProductionEvaluationId, BLL.Const.SafetyProductionEvaluationMenuId, BLL.Const.BtnDelete); + BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.SafetyProductionEvaluationId); + BLL.SafetyProductionEvaluationItemService.DeleteSafetyProductionEvaluationItemList(report.SafetyProductionEvaluationId); + BLL.SafetyProductionEvaluationService.DeleteSafetyProductionEvaluationById(report.SafetyProductionEvaluationId); + + SetEmpty(); + //this.btnNew.Hidden = false; + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 过滤、分页、排序、关闭窗口 + /// + /// 表头过滤 + /// + /// + /// + protected void Grid1_FilterChange(object sender, EventArgs e) + { + BindGrid1(); + } + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid1(); + } + + /// + /// Grid1排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid1(); + } + + /// + /// 分页列表显示条数下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + } + + /// + /// 关闭Grid1弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.SafetyProductionEvaluationMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + //this.btnNew.Hidden = false; + this.btnGet.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnPrint)) + //{ + // this.btnPrint.Hidden = false; + //} + int year = Funs.GetNewIntOrZero(this.drpYear.SelectedValue); + int quarter = Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue); + var report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(this.drpUnit.SelectedValue, year, quarter); + this.btnAudit1.Hidden = true; + this.btnAudit2.Hidden = true; + this.btnUpdata.Hidden = true; + if (report != null) + { + this.btnNew.Hidden = true; + if (report.HandleMan == this.CurrUser.PersonId) //当前人是下一步办理入 + { + if (report.HandleState == BLL.Const.HandleState_2) + { + this.btnAudit1.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + this.btnAudit2.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + this.btnDelete.Hidden = true; + this.btnUpdata.Hidden = false; + } + } + if (report.UpState == BLL.Const.UpState_3) + { + this.btnUpdata.Hidden = true; + this.btnEdit.Hidden = true; + this.btnDelete.Hidden = true; + } + if (report.HandleMan == this.CurrUser.PersonId || report.CompileMan == this.CurrUser.PersonName) + { + this.btnEdit.Hidden = false; + } + else + { + this.btnEdit.Hidden = true; + } + } + } + + if (this.CurrUser.PersonId == BLL.Const.sysglyId) + { + this.btnDelete.Hidden = false; + } + } + #endregion + + #region 单位下拉框联动事件 + /// + /// 单位下拉框联动事件 + /// + /// + /// + protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) + { + GetValue(); + } + #endregion + + #region 获取 + /// + /// 获取按钮 + /// + /// + /// + protected void btnGet_Click(object sender, EventArgs e) + { + Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report == null) + { + var returnValue = getSafetyProductionEvaluationToSUB(); + if (returnValue.code == 1) + { + ShowNotify(returnValue.message, MessageBoxIcon.Success); + GetValue(); + } + else + { + Alert.ShowInTop(returnValue.message, MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("该季度记录已存在,无需获取!", MessageBoxIcon.Warning); + } + } + + /// + /// 获取 + /// + /// + /// + public Model.ResponeData getSafetyProductionEvaluationToSUB() + { + var responeData = new Model.ResponeData(); + try + { + string unitId = BLL.Const.UnitId_SEDIN; + string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getSafetyProductionEvaluation?year=" + this.drpYear.SelectedValue + "&quarter=" + this.drpQuarter.SelectedValue; + string contenttype = "application/json;charset=unicode"; + Hashtable newToken = new Hashtable + { + { "token", ServerService.GetToken().Token } + }; + + var strJosn = APIGetHttpService.Http(baseurl, "GET", contenttype, newToken, null); + if (!string.IsNullOrEmpty(strJosn)) + { + JObject obj = JObject.Parse(strJosn); + responeData.code = Funs.GetNewIntOrZero(obj["code"].ToString()); + responeData.message = obj["message"].ToString(); + if (responeData.code == 1) + { + JArray getData = JArray.Parse(obj["data"].ToString()); + if (getData.Count() > 0) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + int i = 0; + string SafetyProductionEvaluationId = SQLHelper.GetNewID(); + foreach (var item in getData) + { + if (i == 0) + { + Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation(); + SafetyProductionEvaluation.SafetyProductionEvaluationId = SafetyProductionEvaluationId; + SafetyProductionEvaluation.UnitId = BLL.Const.UnitId_SEDIN; + SafetyProductionEvaluation.ReportDate = DateTime.Now; + SafetyProductionEvaluation.Quarter = Funs.GetNewInt(this.drpQuarter.SelectedValue); + SafetyProductionEvaluation.YearId = Funs.GetNewInt(this.drpYear.SelectedValue); + SafetyProductionEvaluation.CompileMan = this.CurrUser.PersonName; + SafetyProductionEvaluation.UpState = BLL.Const.UpState_2; + SafetyProductionEvaluation.HandleState = BLL.Const.HandleState_1; + SafetyProductionEvaluation.HandleMan = this.CurrUser.PersonId; + BLL.SafetyProductionEvaluationService.AddSafetyProductionEvaluation(SafetyProductionEvaluation); + } + Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem(); + newItem.SafetyProductionEvaluationItemId = SQLHelper.GetNewID(); + newItem.SafetyProductionEvaluationId = SafetyProductionEvaluationId; + newItem.SortIndex = Funs.GetNewInt(item["SortIndex"].ToString()); + newItem.Type = item["Type"].ToString(); + newItem.EvaluateWork = item["EvaluateWork"].ToString(); + newItem.EvaluationContent = item["EvaluationContent"].ToString(); + newItem.FillingRequirements = item["FillingRequirements"].ToString(); + newItem.CompletionDeadline = item["CompletionDeadline"].ToString(); + BLL.SafetyProductionEvaluationItemService.AddSafetyProductionEvaluationItem(newItem); + i++; + } + } + responeData.message = "获取成功!"; + } + else + { + responeData.code = 0; + responeData.message = "集团记录尚未生成!"; + } + } + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = "获取失败:" + ex.Message; + ErrLogInfo.WriteLog("中央企业安全生产管理评价工作调度台账获取!", ex); + } + + return responeData; + } + #endregion + + #region 关闭导入弹出窗口 + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + + /// + /// 关闭查看审批信息弹出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + //Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + //if (report != null) + //{ + // PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?reportId={0}&&replaceParameter={1}&&varValue={2}", Const.Information_SafetyProductionEvaluationId, report.SafetyProductionEvaluationId, "", "打印 - "))); + //} + } + #endregion + + #region 季度向前/向后 + /// + /// 前一季度 + /// + /// + /// + protected void BtnBulletLeft_Click(object sender, EventArgs e) + { + SetMonthChange("-"); + } + + /// + /// 后一季度 + /// + /// + /// + protected void BulletRight_Click(object sender, EventArgs e) + { + SetMonthChange("+"); + } + + /// + /// 季度加减变化 + /// + /// + private void SetMonthChange(string type) + { + DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue) * 3).ToString()); + if (nowDate.HasValue) + { + DateTime showDate = new DateTime(); + if (type == "+") + { + showDate = nowDate.Value.AddMonths(3); + } + else + { + showDate = nowDate.Value.AddMonths(-3); + } + + this.drpYear.SelectedValue = showDate.Year.ToString(); + this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString(); + ///值变化 + GetValue(); + } + } + #endregion + + #region 查看审批信息 + /// + /// 查看审批信息 + /// + /// + /// + protected void btnSee_Click(object sender, EventArgs e) + { + Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.SafetyProductionEvaluationId, "查看 - "))); + } + else + { + ShowNotify("所选月份无记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("中央企业安全生产管理评价工作调度台账" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.designer.cs new file mode 100644 index 00000000..f11c0aea --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluation.aspx.designer.cs @@ -0,0 +1,276 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class SafetyProductionEvaluation { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// RegionPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RegionPanel RegionPanel1; + + /// + /// Region2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region2; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// drpQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpQuarter; + + /// + /// BtnBulletLeft 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletLeft; + + /// + /// BtnBulletRight 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletRight; + + /// + /// btnSee 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnGet 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnGet; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnAudit1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit1; + + /// + /// btnAudit2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit2; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// txtUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtUnitName; + + /// + /// txtQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtQuarter; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCompileDate; + + /// + /// lbHandleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbHandleMan; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + + /// + /// Window4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window4; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx new file mode 100644 index 00000000..3941a63f --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx @@ -0,0 +1,112 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyProductionEvaluationAdd.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.SafetyProductionEvaluationAdd" %> + + + + + + + 编辑中央企业安全生产管理评价工作调度台账 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.cs new file mode 100644 index 00000000..e975f398 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.cs @@ -0,0 +1,534 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class SafetyProductionEvaluationAdd : PageBase + { + #region 定义变量 + public string SafetyProductionEvaluationId + { + get + { + return (string)ViewState["SafetyProductionEvaluationId"]; + } + set + { + ViewState["SafetyProductionEvaluationId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List items = new List(); + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + items.Clear(); + this.ddlUnitId.DataTextField = "UnitName"; + this.ddlUnitId.DataValueField = "UnitId"; + this.ddlUnitId.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + this.ddlUnitId.DataBind(); + + this.ddlYearId.DataTextField = "ConstText"; + ddlYearId.DataValueField = "ConstValue"; + ddlYearId.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); + ddlYearId.DataBind(); + + this.ddlQuarter.DataTextField = "ConstText"; + ddlQuarter.DataValueField = "ConstValue"; + ddlQuarter.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0011); + ddlQuarter.DataBind(); + this.ddlUnitId.Readonly = true; + string unitId = Request.Params["UnitId"]; + string year = Request.QueryString["Year"]; + string quarter = Request.QueryString["Quarter"]; + this.SafetyProductionEvaluationId = Request.Params["SafetyProductionEvaluationId"]; + if (!string.IsNullOrEmpty(this.SafetyProductionEvaluationId)) + { + items = BLL.SafetyProductionEvaluationItemService.GetSafetyProductionEvaluationItemList(this.SafetyProductionEvaluationId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + + var SafetyProductionEvaluation = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(this.SafetyProductionEvaluationId); + if (SafetyProductionEvaluation != null) + { + this.btnCopy.Hidden = true; + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + if (SafetyProductionEvaluation.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + } + else + { + if (SafetyProductionEvaluation.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + } + if (SafetyProductionEvaluation.UpState == BLL.Const.UpState_3) //已上报 + { + this.btnSave.Hidden = true; + this.btnUpdata.Hidden = true; + } + if (!string.IsNullOrEmpty(SafetyProductionEvaluation.UnitId)) + { + this.ddlUnitId.SelectedValue = SafetyProductionEvaluation.UnitId; + } + if (SafetyProductionEvaluation.YearId.HasValue) + { + this.ddlYearId.SelectedValue = SafetyProductionEvaluation.YearId.ToString(); + } + if (SafetyProductionEvaluation.Quarter.HasValue) + { + this.ddlQuarter.SelectedValue = SafetyProductionEvaluation.Quarter.ToString(); + } + if (SafetyProductionEvaluation.ReportDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", SafetyProductionEvaluation.ReportDate); + } + } + } + else + { + //this.btnCopy.Hidden = false; + this.ddlUnitId.SelectedValue = unitId; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.ddlYearId.SelectedValue = year; + this.ddlQuarter.SelectedValue = quarter; + ////获取项目报告集合 + //List projectItems = (from x in Funs.DB.InformationProject_SafetyProductionEvaluation + // join y in Funs.DB.InformationProject_SafetyProductionEvaluationItem + // on x.SafetyProductionEvaluationId equals y.SafetyProductionEvaluationId + // where x.YearId.ToString() == year && x.Quarter.ToString() == quarter && x.States == BLL.Const.State_2 + // select y).Distinct().ToList(); + //if (projectItems.Count > 0) + //{ + // int i = 0; + // foreach (var projectItem in projectItems) + // { + // i += 10; + // Model.Information_SafetyProductionEvaluationItem item = new Model.Information_SafetyProductionEvaluationItem + // { + // SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem)), + // SortIndex = i + // }; + // Model.Base_Project project = (from x in Funs.DB.Base_Project + // join y in Funs.DB.InformationProject_SafetyProductionEvaluation + // on x.ProjectId equals y.ProjectId + // join z in Funs.DB.InformationProject_SafetyProductionEvaluationItem + // on y.SafetyProductionEvaluationId equals z.SafetyProductionEvaluationId + // where z.SafetyProductionEvaluationItemId == projectItem.SafetyProductionEvaluationItemId + // select x).FirstOrDefault(); + // if (project != null) + // { + // item.IndustryType = project.ProjectName; + // } + // item.TotalConductCount = projectItem.TotalConductCount; + // item.TotalPeopleCount = projectItem.TotalPeopleCount; + // item.TotalInvestment = projectItem.TotalInvestment; + // item.HQConductCount = projectItem.HQConductCount; + // item.HQPeopleCount = projectItem.HQPeopleCount; + // item.HQInvestment = projectItem.HQInvestment; + // item.BasicConductCount = projectItem.BasicConductCount; + // item.BasicPeopleCount = projectItem.BasicPeopleCount; + // item.BasicInvestment = projectItem.BasicInvestment; + // item.ComprehensivePractice = projectItem.ComprehensivePractice; + // item.CPScene = projectItem.CPScene; + // item.CPDesktop = projectItem.CPDesktop; + // item.SpecialDrill = projectItem.SpecialDrill; + // item.SDScene = projectItem.SDScene; + // item.SDDesktop = projectItem.SDDesktop; + // items.Add(item); + // } + //} + //else + //{ + // for (int i = 0; i < 100; i++) + // { + // i += 10; + // Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem + // { + // SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem)), + // SortIndex = i + // }; + // items.Add(newItem); + // } + //} + Grid1.DataSource = items; + Grid1.DataBind(); + + + } + } + } + + #endregion + + #region 保存、提交、上报 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Save("add"); + } + + /// + /// 上报按钮 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + Save("updata"); + } + + /// + /// 提交按钮 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + Save("submit"); + } + + /// + /// 保存数据 + /// + /// + private void Save(string type) + { + if (this.ddlUnitId.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择单位!", MessageBoxIcon.Warning); + return; + } + var drill = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdDate(this.ddlUnitId.SelectedValue, Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue), Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue), this.SafetyProductionEvaluationId); + if (drill != null) + { + ShowNotify("本单位本季度报表已存在,不能重复编制", MessageBoxIcon.Warning); + return; + } + + var SafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation(); + if (this.ddlUnitId.SelectedValue != BLL.Const._Null) + { + SafetyProductionEvaluation.UnitId = this.ddlUnitId.SelectedValue; + } + if (!string.IsNullOrEmpty(this.dpkCompileDate.Text.Trim())) + { + SafetyProductionEvaluation.ReportDate = Convert.ToDateTime(this.dpkCompileDate.Text.Trim()); + } + SafetyProductionEvaluation.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + SafetyProductionEvaluation.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + if (string.IsNullOrEmpty(this.SafetyProductionEvaluationId)) + { + this.SafetyProductionEvaluationId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluation)); SafetyProductionEvaluation.SafetyProductionEvaluationId = this.SafetyProductionEvaluationId; + SafetyProductionEvaluation.CompileMan = this.CurrUser.PersonName; + SafetyProductionEvaluation.UpState = BLL.Const.UpState_2; + SafetyProductionEvaluation.HandleMan = this.CurrUser.PersonId; + SafetyProductionEvaluation.HandleState = BLL.Const.HandleState_1; + BLL.SafetyProductionEvaluationService.AddSafetyProductionEvaluation(SafetyProductionEvaluation); + BLL.LogService.AddSys_Log(this.CurrUser, SafetyProductionEvaluation.YearId.ToString() + "-" + SafetyProductionEvaluation.Quarter.ToString(), + SafetyProductionEvaluation.SafetyProductionEvaluationId, BLL.Const.SafetyProductionEvaluationMenuId, BLL.Const.BtnAdd); + } + else + { + Model.Information_SafetyProductionEvaluation oldReport = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(this.SafetyProductionEvaluationId); + if (oldReport != null) + { + SafetyProductionEvaluation.HandleMan = oldReport.HandleMan; + SafetyProductionEvaluation.HandleState = oldReport.HandleState; + } + SafetyProductionEvaluation.SafetyProductionEvaluationId = this.SafetyProductionEvaluationId; + SafetyProductionEvaluation.UpState = BLL.Const.UpState_2; + BLL.SafetyProductionEvaluationService.UpdateSafetyProductionEvaluation(SafetyProductionEvaluation); + BLL.LogService.AddSys_Log(this.CurrUser, SafetyProductionEvaluation.YearId.ToString() + "-" + SafetyProductionEvaluation.Quarter.ToString(), + SafetyProductionEvaluation.SafetyProductionEvaluationId, BLL.Const.SafetyProductionEvaluationMenuId, BLL.Const.BtnModify); + BLL.SafetyProductionEvaluationItemService.DeleteSafetyProductionEvaluationItemList(SafetyProductionEvaluation.SafetyProductionEvaluationId); + } + GetItems(SafetyProductionEvaluation.SafetyProductionEvaluationId); + foreach (var item in items) + { + BLL.SafetyProductionEvaluationItemService.AddSafetyProductionEvaluationItem(item); + } + if (type == "updata") //保存并上报 + { + if (SafetyProductionEvaluation.UpState == BLL.Const.UpState_2) + { + string code = CNCECHSSEWebService.UpSafetyProductionEvaluation(SafetyProductionEvaluation.SafetyProductionEvaluationId, this.CurrUser); + if (code == "1") + { + ShowNotify("同步成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return; + } + else + { + Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); + } + } + else + { + ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning); + return; + } + } + if (type == "submit") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=SafetyProductionEvaluation&Id={0}", SafetyProductionEvaluation.SafetyProductionEvaluationId, "编辑 - "))); + } + else + { + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } + + /// + /// 获取明细值 + /// + /// + private void GetItems(string SafetyProductionEvaluationId) + { + items.Clear(); + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + Model.Information_SafetyProductionEvaluationItem item = new Model.Information_SafetyProductionEvaluationItem(); + if (values["SafetyProductionEvaluationItemId"].ToString() != "") + { + item.SafetyProductionEvaluationItemId = values.Value("SafetyProductionEvaluationItemId"); + } + item.SafetyProductionEvaluationId = SafetyProductionEvaluationId; + item.SortIndex = Funs.GetNewInt(values.Value("SortIndex")); + if (values["Type"].ToString() != "") + { + item.Type = values.Value("Type"); + } + if (values["EvaluateWork"].ToString() != "") + { + item.EvaluateWork = values.Value("EvaluateWork"); + } + if (values["EvaluationContent"].ToString() != "") + { + item.EvaluationContent = values.Value("EvaluationContent"); + } + if (values["FillingRequirements"].ToString() != "") + { + item.FillingRequirements = values.Value("FillingRequirements"); + } + if (values["CompletionDeadline"].ToString() != "") + { + item.CompletionDeadline = values.Value("CompletionDeadline"); + } + if (values["ImplementationStatus"].ToString() != "") + { + item.ImplementationStatus = values.Value("ImplementationStatus"); + } + items.Add(item); + } + } + #endregion + + #region 关闭办理流程窗口 + /// + /// 关闭办理流程窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(this.SafetyProductionEvaluationId); + if (report.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + else + { + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + } + } + #endregion + + #region Grid行事件 + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + GetItems(string.Empty); + if (e.CommandName == "Add") + { + Model.Information_SafetyProductionEvaluationItem oldItem = items.FirstOrDefault(x => x.SafetyProductionEvaluationItemId == rowID); + Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem + { + SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem)) + }; + if (oldItem != null) + { + newItem.SortIndex = oldItem.SortIndex + 1; + } + else + { + newItem.SortIndex = 0; + } + items.Add(newItem); + items = items.OrderBy(x => x.SortIndex).ToList(); + Grid1.DataSource = items; + Grid1.DataBind(); + } + if (e.CommandName == "Delete") + { + if (Grid1.Rows.Count == 1) + { + ShowNotify("只有一条数据,无法删除", MessageBoxIcon.Warning); + return; + } + foreach (var item in items) + { + if (item.SafetyProductionEvaluationItemId == rowID) + { + items.Remove(item); + break; + } + } + Grid1.DataSource = items; + Grid1.DataBind(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.SafetyProductionEvaluationMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + this.btnCopy.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnSaveUp)) + //{ + // this.btnUpdata.Hidden = false; + + //} + if (buttonList.Contains(BLL.Const.BtnSubmit)) + { + this.btnSubmit.Hidden = false; + } + } + } + #endregion + + #region 复制上个季度数据 + /// + /// 复制上个季度的数据 + /// + /// + /// + protected void btnCopy_Click(object sender, EventArgs e) + { + int lastYear = 0, lastQuarter = 0; + int year = Convert.ToInt32(this.ddlYearId.SelectedValue); + int quarter = Convert.ToInt32(this.ddlQuarter.SelectedValue); + if (quarter == 1) + { + lastYear = year - 1; + lastQuarter = 4; + } + else + { + lastYear = year; + lastQuarter = quarter - 1; + } + Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(this.ddlUnitId.SelectedValue, lastYear, lastQuarter); + if (SafetyProductionEvaluation != null) + { + Model.Information_SafetyProductionEvaluation newSafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation(); + this.SafetyProductionEvaluationId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluation)); + newSafetyProductionEvaluation.SafetyProductionEvaluationId = this.SafetyProductionEvaluationId; + newSafetyProductionEvaluation.UnitId = this.ddlUnitId.SelectedValue; + newSafetyProductionEvaluation.ReportDate = DateTime.Now; + newSafetyProductionEvaluation.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + newSafetyProductionEvaluation.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + newSafetyProductionEvaluation.CompileMan = this.CurrUser.PersonName; + newSafetyProductionEvaluation.UpState = BLL.Const.UpState_2; + newSafetyProductionEvaluation.HandleState = BLL.Const.HandleState_1; + newSafetyProductionEvaluation.HandleMan = this.CurrUser.PersonId; + BLL.SafetyProductionEvaluationService.AddSafetyProductionEvaluation(newSafetyProductionEvaluation); + + items = BLL.SafetyProductionEvaluationItemService.GetSafetyProductionEvaluationItemList(SafetyProductionEvaluation.SafetyProductionEvaluationId); + if (items.Count > 0) + { + foreach (var item in items) + { + Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem + { + SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem)), + SafetyProductionEvaluationId = this.SafetyProductionEvaluationId, + SortIndex = item.SortIndex + }; + BLL.SafetyProductionEvaluationItemService.AddSafetyProductionEvaluationItem(newItem); + } + } + GetValues(newSafetyProductionEvaluation.SafetyProductionEvaluationId); + } + + } + + /// + /// 获取数据 + /// + private void GetValues(string SafetyProductionEvaluationId) + { + var report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(SafetyProductionEvaluationId); + if (report != null) + { + if (!string.IsNullOrEmpty(report.UnitId)) + { + this.ddlUnitId.SelectedValue = report.UnitId; + } + if (report.YearId.HasValue) + { + this.ddlYearId.SelectedValue = report.YearId.ToString(); + } + if (report.Quarter.HasValue) + { + this.ddlQuarter.SelectedValue = report.Quarter.ToString(); + } + if (report.ReportDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", report.ReportDate); + } + items = BLL.SafetyProductionEvaluationItemService.GetSafetyProductionEvaluationItemList(SafetyProductionEvaluationId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.designer.cs new file mode 100644 index 00000000..a972c71c --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyProductionEvaluationAdd.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class SafetyProductionEvaluationAdd { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ddlUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlUnitId; + + /// + /// ddlYearId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlYearId; + + /// + /// ddlQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlQuarter; + + /// + /// dpkCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCompileDate; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtImplementationStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtImplementationStatus; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnCopy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCopy; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index 13bee4b8..91c925b5 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -32,6 +32,8 @@ + + diff --git a/SGGL/Model/APIItem/ActionWorkLedger.cs b/SGGL/Model/APIItem/ActionWorkLedger.cs new file mode 100644 index 00000000..d54abd04 --- /dev/null +++ b/SGGL/Model/APIItem/ActionWorkLedger.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; + +namespace Model +{ + public class ActionWorkLedger + { + public string ActionWorkLedgerId + { + get; + set; + } + + public string UnitId + { + get; + set; + } + + public DateTime? ReportDate + { + get; + set; + } + + public int? Quarter + { + get; + set; + } + + public int? YearId + { + get; + set; + } + + public string CompileMan + { + get; + set; + } + } +} diff --git a/SGGL/Model/APIItem/ActionWorkLedgerItem.cs b/SGGL/Model/APIItem/ActionWorkLedgerItem.cs new file mode 100644 index 00000000..6f271afc --- /dev/null +++ b/SGGL/Model/APIItem/ActionWorkLedgerItem.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; + +namespace Model +{ + public class ActionWorkLedgerItem + { + public string ActionWorkLedgerItemId + { + get; + set; + } + + public string ActionWorkLedgerId + { + get; + set; + } + + public int? SortIndex + { + get; + set; + } + + public string Focus + { + get; + set; + } + + public string SpecialTask + { + get; + set; + } + + public string WorkPoints + { + get; + set; + } + + public string FillingRequirements + { + get; + set; + } + + public string CompletionDeadline + { + get; + set; + } + + public string ImplementationStatus + { + get; + set; + } + } +} diff --git a/SGGL/Model/APIItem/SafetyProductionEvaluation.cs b/SGGL/Model/APIItem/SafetyProductionEvaluation.cs new file mode 100644 index 00000000..0aaded90 --- /dev/null +++ b/SGGL/Model/APIItem/SafetyProductionEvaluation.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class SafetyProductionEvaluation + { + public string SafetyProductionEvaluationId + { + get; + set; + } + + public string UnitId + { + get; + set; + } + + public DateTime? ReportDate + { + get; + set; + } + + public int? Quarter + { + get; + set; + } + + public int? YearId + { + get; + set; + } + + public string CompileMan + { + get; + set; + } + } +} diff --git a/SGGL/Model/APIItem/SafetyProductionEvaluationItem.cs b/SGGL/Model/APIItem/SafetyProductionEvaluationItem.cs new file mode 100644 index 00000000..1d9e2f52 --- /dev/null +++ b/SGGL/Model/APIItem/SafetyProductionEvaluationItem.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class SafetyProductionEvaluationItem + { + public string SafetyProductionEvaluationItemId + { + get; + set; + } + + public string SafetyProductionEvaluationId + { + get; + set; + } + + public int? SortIndex + { + get; + set; + } + + public string Type + { + get; + set; + } + + public string EvaluateWork + { + get; + set; + } + + public string EvaluationContent + { + get; + set; + } + + public string FillingRequirements + { + get; + set; + } + + public string CompletionDeadline + { + get; + set; + } + + public string ImplementationStatus + { + get; + set; + } + } +} diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index a984ec45..c5d604aa 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -749,6 +749,12 @@ namespace Model partial void InsertInformation_AccidentCauseReportItem(Information_AccidentCauseReportItem instance); partial void UpdateInformation_AccidentCauseReportItem(Information_AccidentCauseReportItem instance); partial void DeleteInformation_AccidentCauseReportItem(Information_AccidentCauseReportItem instance); + partial void InsertInformation_ActionWorkLedger(Information_ActionWorkLedger instance); + partial void UpdateInformation_ActionWorkLedger(Information_ActionWorkLedger instance); + partial void DeleteInformation_ActionWorkLedger(Information_ActionWorkLedger instance); + partial void InsertInformation_ActionWorkLedgerItem(Information_ActionWorkLedgerItem instance); + partial void UpdateInformation_ActionWorkLedgerItem(Information_ActionWorkLedgerItem instance); + partial void DeleteInformation_ActionWorkLedgerItem(Information_ActionWorkLedgerItem instance); partial void InsertInformation_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport instance); partial void UpdateInformation_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport instance); partial void DeleteInformation_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport instance); @@ -779,6 +785,12 @@ namespace Model partial void InsertInformation_SafetyBriefing(Information_SafetyBriefing instance); partial void UpdateInformation_SafetyBriefing(Information_SafetyBriefing instance); partial void DeleteInformation_SafetyBriefing(Information_SafetyBriefing instance); + partial void InsertInformation_SafetyProductionEvaluation(Information_SafetyProductionEvaluation instance); + partial void UpdateInformation_SafetyProductionEvaluation(Information_SafetyProductionEvaluation instance); + partial void DeleteInformation_SafetyProductionEvaluation(Information_SafetyProductionEvaluation instance); + partial void InsertInformation_SafetyProductionEvaluationItem(Information_SafetyProductionEvaluationItem instance); + partial void UpdateInformation_SafetyProductionEvaluationItem(Information_SafetyProductionEvaluationItem instance); + partial void DeleteInformation_SafetyProductionEvaluationItem(Information_SafetyProductionEvaluationItem instance); partial void InsertInformation_SafetyQuarterlyReport(Information_SafetyQuarterlyReport instance); partial void UpdateInformation_SafetyQuarterlyReport(Information_SafetyQuarterlyReport instance); partial void DeleteInformation_SafetyQuarterlyReport(Information_SafetyQuarterlyReport instance); @@ -3780,6 +3792,22 @@ namespace Model } } + public System.Data.Linq.Table Information_ActionWorkLedger + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_ActionWorkLedgerItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Information_DrillConductedQuarterlyReport { get @@ -3860,6 +3888,22 @@ namespace Model } } + public System.Data.Linq.Table Information_SafetyProductionEvaluation + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_SafetyProductionEvaluationItem + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Information_SafetyQuarterlyReport { get @@ -6732,6 +6776,14 @@ namespace Model } } + public System.Data.Linq.Table View_Information_ActionWorkLedger + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_Information_DrillConductedQuarterlyReport { get @@ -6772,6 +6824,14 @@ namespace Model } } + public System.Data.Linq.Table View_Information_SafetyProductionEvaluation + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_Information_SafetyQuarterlyReport { get @@ -11966,7 +12026,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")] public string ApproveIdea { get @@ -33384,6 +33444,8 @@ namespace Model private EntitySet _Information_AccidentCauseReport; + private EntitySet _Information_ActionWorkLedger; + private EntitySet _Information_DrillConductedQuarterlyReport; private EntitySet _Information_DrillPlanHalfYearReport; @@ -33398,6 +33460,8 @@ namespace Model private EntitySet _Information_SafetyBriefing; + private EntitySet _Information_SafetyProductionEvaluation; + private EntitySet _Information_SafetyQuarterlyReport; private EntitySet _Information_UrgeReport; @@ -33631,6 +33695,7 @@ namespace Model this._InApproveManager_GeneralEquipmentOut = new EntitySet(new Action(this.attach_InApproveManager_GeneralEquipmentOut), new Action(this.detach_InApproveManager_GeneralEquipmentOut)); this._InformationProject_SafetyBriefing = new EntitySet(new Action(this.attach_InformationProject_SafetyBriefing), new Action(this.detach_InformationProject_SafetyBriefing)); this._Information_AccidentCauseReport = new EntitySet(new Action(this.attach_Information_AccidentCauseReport), new Action(this.detach_Information_AccidentCauseReport)); + this._Information_ActionWorkLedger = new EntitySet(new Action(this.attach_Information_ActionWorkLedger), new Action(this.detach_Information_ActionWorkLedger)); this._Information_DrillConductedQuarterlyReport = new EntitySet(new Action(this.attach_Information_DrillConductedQuarterlyReport), new Action(this.detach_Information_DrillConductedQuarterlyReport)); this._Information_DrillPlanHalfYearReport = new EntitySet(new Action(this.attach_Information_DrillPlanHalfYearReport), new Action(this.detach_Information_DrillPlanHalfYearReport)); this._Information_EPSummaryReport = new EntitySet(new Action(this.attach_Information_EPSummaryReport), new Action(this.detach_Information_EPSummaryReport)); @@ -33638,6 +33703,7 @@ namespace Model this._Information_QualityWorkSummaryReport = new EntitySet(new Action(this.attach_Information_QualityWorkSummaryReport), new Action(this.detach_Information_QualityWorkSummaryReport)); this._Information_QuarterlyProjectQuality = new EntitySet(new Action(this.attach_Information_QuarterlyProjectQuality), new Action(this.detach_Information_QuarterlyProjectQuality)); this._Information_SafetyBriefing = new EntitySet(new Action(this.attach_Information_SafetyBriefing), new Action(this.detach_Information_SafetyBriefing)); + this._Information_SafetyProductionEvaluation = new EntitySet(new Action(this.attach_Information_SafetyProductionEvaluation), new Action(this.detach_Information_SafetyProductionEvaluation)); this._Information_SafetyQuarterlyReport = new EntitySet(new Action(this.attach_Information_SafetyQuarterlyReport), new Action(this.detach_Information_SafetyQuarterlyReport)); this._Information_UrgeReport = new EntitySet(new Action(this.attach_Information_UrgeReport), new Action(this.detach_Information_UrgeReport)); this._Information_WorkSummaryReport = new EntitySet(new Action(this.attach_Information_WorkSummaryReport), new Action(this.detach_Information_WorkSummaryReport)); @@ -34847,6 +34913,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_ActionWorkLedger_Base_Unit", Storage="_Information_ActionWorkLedger", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Information_ActionWorkLedger + { + get + { + return this._Information_ActionWorkLedger; + } + set + { + this._Information_ActionWorkLedger.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_DrillConductedQuarterlyReport_Base_Unit", Storage="_Information_DrillConductedQuarterlyReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet Information_DrillConductedQuarterlyReport { @@ -34938,6 +35017,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_SafetyProductionEvaluation_Base_Unit", Storage="_Information_SafetyProductionEvaluation", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Information_SafetyProductionEvaluation + { + get + { + return this._Information_SafetyProductionEvaluation; + } + set + { + this._Information_SafetyProductionEvaluation.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_SafetyQuarterlyReport_Base_Unit", Storage="_Information_SafetyQuarterlyReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet Information_SafetyQuarterlyReport { @@ -36389,6 +36481,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_Information_ActionWorkLedger(Information_ActionWorkLedger entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Information_ActionWorkLedger(Information_ActionWorkLedger entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Information_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport entity) { this.SendPropertyChanging(); @@ -36473,6 +36577,18 @@ namespace Model entity.Base_Unit = null; } + private void attach_Information_SafetyProductionEvaluation(Information_SafetyProductionEvaluation entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Information_SafetyProductionEvaluation(Information_SafetyProductionEvaluation entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_Information_SafetyQuarterlyReport(Information_SafetyQuarterlyReport entity) { this.SendPropertyChanging(); @@ -112588,6 +112704,624 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_ActionWorkLedger")] + public partial class Information_ActionWorkLedger : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ActionWorkLedgerId; + + private string _UnitId; + + private System.Nullable _ReportDate; + + private System.Nullable _Quarter; + + private System.Nullable _YearId; + + private string _CompileMan; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private EntityRef _Base_Unit; + + private EntitySet _Information_ActionWorkLedgerItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnActionWorkLedgerIdChanging(string value); + partial void OnActionWorkLedgerIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnReportDateChanging(System.Nullable value); + partial void OnReportDateChanged(); + partial void OnQuarterChanging(System.Nullable value); + partial void OnQuarterChanged(); + partial void OnYearIdChanging(System.Nullable value); + partial void OnYearIdChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnHandleStateChanging(string value); + partial void OnHandleStateChanged(); + partial void OnHandleManChanging(string value); + partial void OnHandleManChanged(); + #endregion + + public Information_ActionWorkLedger() + { + this._Base_Unit = default(EntityRef); + this._Information_ActionWorkLedgerItem = new EntitySet(new Action(this.attach_Information_ActionWorkLedgerItem), new Action(this.detach_Information_ActionWorkLedgerItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActionWorkLedgerId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ActionWorkLedgerId + { + get + { + return this._ActionWorkLedgerId; + } + set + { + if ((this._ActionWorkLedgerId != value)) + { + this.OnActionWorkLedgerIdChanging(value); + this.SendPropertyChanging(); + this._ActionWorkLedgerId = value; + this.SendPropertyChanged("ActionWorkLedgerId"); + this.OnActionWorkLedgerIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this.OnReportDateChanging(value); + this.SendPropertyChanging(); + this._ReportDate = value; + this.SendPropertyChanged("ReportDate"); + this.OnReportDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this.OnQuarterChanging(value); + this.SendPropertyChanging(); + this._Quarter = value; + this.SendPropertyChanged("Quarter"); + this.OnQuarterChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this.OnYearIdChanging(value); + this.SendPropertyChanging(); + this._YearId = value; + this.SendPropertyChanged("YearId"); + this.OnYearIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this.OnUpStateChanging(value); + this.SendPropertyChanging(); + this._UpState = value; + this.SendPropertyChanged("UpState"); + this.OnUpStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this.OnHandleStateChanging(value); + this.SendPropertyChanging(); + this._HandleState = value; + this.SendPropertyChanged("HandleState"); + this.OnHandleStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this.OnHandleManChanging(value); + this.SendPropertyChanging(); + this._HandleMan = value; + this.SendPropertyChanged("HandleMan"); + this.OnHandleManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_ActionWorkLedger_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Information_ActionWorkLedger.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Information_ActionWorkLedger.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger", Storage="_Information_ActionWorkLedgerItem", ThisKey="ActionWorkLedgerId", OtherKey="ActionWorkLedgerId", DeleteRule="NO ACTION")] + public EntitySet Information_ActionWorkLedgerItem + { + get + { + return this._Information_ActionWorkLedgerItem; + } + set + { + this._Information_ActionWorkLedgerItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Information_ActionWorkLedgerItem(Information_ActionWorkLedgerItem entity) + { + this.SendPropertyChanging(); + entity.Information_ActionWorkLedger = this; + } + + private void detach_Information_ActionWorkLedgerItem(Information_ActionWorkLedgerItem entity) + { + this.SendPropertyChanging(); + entity.Information_ActionWorkLedger = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_ActionWorkLedgerItem")] + public partial class Information_ActionWorkLedgerItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ActionWorkLedgerItemId; + + private string _ActionWorkLedgerId; + + private System.Nullable _SortIndex; + + private string _Focus; + + private string _SpecialTask; + + private string _WorkPoints; + + private string _FillingRequirements; + + private string _CompletionDeadline; + + private string _ImplementationStatus; + + private EntityRef _Information_ActionWorkLedger; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnActionWorkLedgerItemIdChanging(string value); + partial void OnActionWorkLedgerItemIdChanged(); + partial void OnActionWorkLedgerIdChanging(string value); + partial void OnActionWorkLedgerIdChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + partial void OnFocusChanging(string value); + partial void OnFocusChanged(); + partial void OnSpecialTaskChanging(string value); + partial void OnSpecialTaskChanged(); + partial void OnWorkPointsChanging(string value); + partial void OnWorkPointsChanged(); + partial void OnFillingRequirementsChanging(string value); + partial void OnFillingRequirementsChanged(); + partial void OnCompletionDeadlineChanging(string value); + partial void OnCompletionDeadlineChanged(); + partial void OnImplementationStatusChanging(string value); + partial void OnImplementationStatusChanged(); + #endregion + + public Information_ActionWorkLedgerItem() + { + this._Information_ActionWorkLedger = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActionWorkLedgerItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ActionWorkLedgerItemId + { + get + { + return this._ActionWorkLedgerItemId; + } + set + { + if ((this._ActionWorkLedgerItemId != value)) + { + this.OnActionWorkLedgerItemIdChanging(value); + this.SendPropertyChanging(); + this._ActionWorkLedgerItemId = value; + this.SendPropertyChanged("ActionWorkLedgerItemId"); + this.OnActionWorkLedgerItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActionWorkLedgerId", DbType="NVarChar(50)")] + public string ActionWorkLedgerId + { + get + { + return this._ActionWorkLedgerId; + } + set + { + if ((this._ActionWorkLedgerId != value)) + { + if (this._Information_ActionWorkLedger.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnActionWorkLedgerIdChanging(value); + this.SendPropertyChanging(); + this._ActionWorkLedgerId = value; + this.SendPropertyChanged("ActionWorkLedgerId"); + this.OnActionWorkLedgerIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Focus", DbType="NVarChar(20)")] + public string Focus + { + get + { + return this._Focus; + } + set + { + if ((this._Focus != value)) + { + this.OnFocusChanging(value); + this.SendPropertyChanging(); + this._Focus = value; + this.SendPropertyChanged("Focus"); + this.OnFocusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecialTask", DbType="NVarChar(100)")] + public string SpecialTask + { + get + { + return this._SpecialTask; + } + set + { + if ((this._SpecialTask != value)) + { + this.OnSpecialTaskChanging(value); + this.SendPropertyChanging(); + this._SpecialTask = value; + this.SendPropertyChanged("SpecialTask"); + this.OnSpecialTaskChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPoints", DbType="NVarChar(500)")] + public string WorkPoints + { + get + { + return this._WorkPoints; + } + set + { + if ((this._WorkPoints != value)) + { + this.OnWorkPointsChanging(value); + this.SendPropertyChanging(); + this._WorkPoints = value; + this.SendPropertyChanged("WorkPoints"); + this.OnWorkPointsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingRequirements", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string FillingRequirements + { + get + { + return this._FillingRequirements; + } + set + { + if ((this._FillingRequirements != value)) + { + this.OnFillingRequirementsChanging(value); + this.SendPropertyChanging(); + this._FillingRequirements = value; + this.SendPropertyChanged("FillingRequirements"); + this.OnFillingRequirementsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletionDeadline", DbType="NVarChar(50)")] + public string CompletionDeadline + { + get + { + return this._CompletionDeadline; + } + set + { + if ((this._CompletionDeadline != value)) + { + this.OnCompletionDeadlineChanging(value); + this.SendPropertyChanging(); + this._CompletionDeadline = value; + this.SendPropertyChanged("CompletionDeadline"); + this.OnCompletionDeadlineChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ImplementationStatus", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string ImplementationStatus + { + get + { + return this._ImplementationStatus; + } + set + { + if ((this._ImplementationStatus != value)) + { + this.OnImplementationStatusChanging(value); + this.SendPropertyChanging(); + this._ImplementationStatus = value; + this.SendPropertyChanged("ImplementationStatus"); + this.OnImplementationStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger", Storage="_Information_ActionWorkLedger", ThisKey="ActionWorkLedgerId", OtherKey="ActionWorkLedgerId", IsForeignKey=true)] + public Information_ActionWorkLedger Information_ActionWorkLedger + { + get + { + return this._Information_ActionWorkLedger.Entity; + } + set + { + Information_ActionWorkLedger previousValue = this._Information_ActionWorkLedger.Entity; + if (((previousValue != value) + || (this._Information_ActionWorkLedger.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Information_ActionWorkLedger.Entity = null; + previousValue.Information_ActionWorkLedgerItem.Remove(this); + } + this._Information_ActionWorkLedger.Entity = value; + if ((value != null)) + { + value.Information_ActionWorkLedgerItem.Add(this); + this._ActionWorkLedgerId = value.ActionWorkLedgerId; + } + else + { + this._ActionWorkLedgerId = default(string); + } + this.SendPropertyChanged("Information_ActionWorkLedger"); + } + } + } + + 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.Information_DrillConductedQuarterlyReport")] public partial class Information_DrillConductedQuarterlyReport : INotifyPropertyChanging, INotifyPropertyChanged { @@ -118480,6 +119214,626 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_SafetyProductionEvaluation")] + public partial class Information_SafetyProductionEvaluation : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SafetyProductionEvaluationId; + + private string _UnitId; + + private System.Nullable _ReportDate; + + private System.Nullable _Quarter; + + private System.Nullable _YearId; + + private string _CompileMan; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private EntityRef _Base_Unit; + + private EntitySet _Information_SafetyProductionEvaluationItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSafetyProductionEvaluationIdChanging(string value); + partial void OnSafetyProductionEvaluationIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnReportDateChanging(System.Nullable value); + partial void OnReportDateChanged(); + partial void OnQuarterChanging(System.Nullable value); + partial void OnQuarterChanged(); + partial void OnYearIdChanging(System.Nullable value); + partial void OnYearIdChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnHandleStateChanging(string value); + partial void OnHandleStateChanged(); + partial void OnHandleManChanging(string value); + partial void OnHandleManChanged(); + #endregion + + public Information_SafetyProductionEvaluation() + { + this._Base_Unit = default(EntityRef); + this._Information_SafetyProductionEvaluationItem = new EntitySet(new Action(this.attach_Information_SafetyProductionEvaluationItem), new Action(this.detach_Information_SafetyProductionEvaluationItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyProductionEvaluationId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SafetyProductionEvaluationId + { + get + { + return this._SafetyProductionEvaluationId; + } + set + { + if ((this._SafetyProductionEvaluationId != value)) + { + this.OnSafetyProductionEvaluationIdChanging(value); + this.SendPropertyChanging(); + this._SafetyProductionEvaluationId = value; + this.SendPropertyChanged("SafetyProductionEvaluationId"); + this.OnSafetyProductionEvaluationIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this.OnReportDateChanging(value); + this.SendPropertyChanging(); + this._ReportDate = value; + this.SendPropertyChanged("ReportDate"); + this.OnReportDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this.OnQuarterChanging(value); + this.SendPropertyChanging(); + this._Quarter = value; + this.SendPropertyChanged("Quarter"); + this.OnQuarterChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this.OnYearIdChanging(value); + this.SendPropertyChanging(); + this._YearId = value; + this.SendPropertyChanged("YearId"); + this.OnYearIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this.OnUpStateChanging(value); + this.SendPropertyChanging(); + this._UpState = value; + this.SendPropertyChanged("UpState"); + this.OnUpStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this.OnHandleStateChanging(value); + this.SendPropertyChanging(); + this._HandleState = value; + this.SendPropertyChanged("HandleState"); + this.OnHandleStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this.OnHandleManChanging(value); + this.SendPropertyChanging(); + this._HandleMan = value; + this.SendPropertyChanged("HandleMan"); + this.OnHandleManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_SafetyProductionEvaluation_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] + public Base_Unit Base_Unit + { + get + { + return this._Base_Unit.Entity; + } + set + { + Base_Unit previousValue = this._Base_Unit.Entity; + if (((previousValue != value) + || (this._Base_Unit.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Unit.Entity = null; + previousValue.Information_SafetyProductionEvaluation.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Information_SafetyProductionEvaluation.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluat" + + "ion", Storage="_Information_SafetyProductionEvaluationItem", ThisKey="SafetyProductionEvaluationId", OtherKey="SafetyProductionEvaluationId", DeleteRule="NO ACTION")] + public EntitySet Information_SafetyProductionEvaluationItem + { + get + { + return this._Information_SafetyProductionEvaluationItem; + } + set + { + this._Information_SafetyProductionEvaluationItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Information_SafetyProductionEvaluationItem(Information_SafetyProductionEvaluationItem entity) + { + this.SendPropertyChanging(); + entity.Information_SafetyProductionEvaluation = this; + } + + private void detach_Information_SafetyProductionEvaluationItem(Information_SafetyProductionEvaluationItem entity) + { + this.SendPropertyChanging(); + entity.Information_SafetyProductionEvaluation = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_SafetyProductionEvaluationItem")] + public partial class Information_SafetyProductionEvaluationItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SafetyProductionEvaluationItemId; + + private string _SafetyProductionEvaluationId; + + private System.Nullable _SortIndex; + + private string _Type; + + private string _EvaluateWork; + + private string _EvaluationContent; + + private string _FillingRequirements; + + private string _CompletionDeadline; + + private string _ImplementationStatus; + + private EntityRef _Information_SafetyProductionEvaluation; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSafetyProductionEvaluationItemIdChanging(string value); + partial void OnSafetyProductionEvaluationItemIdChanged(); + partial void OnSafetyProductionEvaluationIdChanging(string value); + partial void OnSafetyProductionEvaluationIdChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + partial void OnTypeChanging(string value); + partial void OnTypeChanged(); + partial void OnEvaluateWorkChanging(string value); + partial void OnEvaluateWorkChanged(); + partial void OnEvaluationContentChanging(string value); + partial void OnEvaluationContentChanged(); + partial void OnFillingRequirementsChanging(string value); + partial void OnFillingRequirementsChanged(); + partial void OnCompletionDeadlineChanging(string value); + partial void OnCompletionDeadlineChanged(); + partial void OnImplementationStatusChanging(string value); + partial void OnImplementationStatusChanged(); + #endregion + + public Information_SafetyProductionEvaluationItem() + { + this._Information_SafetyProductionEvaluation = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyProductionEvaluationItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SafetyProductionEvaluationItemId + { + get + { + return this._SafetyProductionEvaluationItemId; + } + set + { + if ((this._SafetyProductionEvaluationItemId != value)) + { + this.OnSafetyProductionEvaluationItemIdChanging(value); + this.SendPropertyChanging(); + this._SafetyProductionEvaluationItemId = value; + this.SendPropertyChanged("SafetyProductionEvaluationItemId"); + this.OnSafetyProductionEvaluationItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyProductionEvaluationId", DbType="NVarChar(50)")] + public string SafetyProductionEvaluationId + { + get + { + return this._SafetyProductionEvaluationId; + } + set + { + if ((this._SafetyProductionEvaluationId != value)) + { + if (this._Information_SafetyProductionEvaluation.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnSafetyProductionEvaluationIdChanging(value); + this.SendPropertyChanging(); + this._SafetyProductionEvaluationId = value; + this.SendPropertyChanged("SafetyProductionEvaluationId"); + this.OnSafetyProductionEvaluationIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="NVarChar(50)")] + public string Type + { + get + { + return this._Type; + } + set + { + if ((this._Type != value)) + { + this.OnTypeChanging(value); + this.SendPropertyChanging(); + this._Type = value; + this.SendPropertyChanged("Type"); + this.OnTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EvaluateWork", DbType="NVarChar(1000)")] + public string EvaluateWork + { + get + { + return this._EvaluateWork; + } + set + { + if ((this._EvaluateWork != value)) + { + this.OnEvaluateWorkChanging(value); + this.SendPropertyChanging(); + this._EvaluateWork = value; + this.SendPropertyChanged("EvaluateWork"); + this.OnEvaluateWorkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EvaluationContent", DbType="NVarChar(1000)")] + public string EvaluationContent + { + get + { + return this._EvaluationContent; + } + set + { + if ((this._EvaluationContent != value)) + { + this.OnEvaluationContentChanging(value); + this.SendPropertyChanging(); + this._EvaluationContent = value; + this.SendPropertyChanged("EvaluationContent"); + this.OnEvaluationContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingRequirements", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string FillingRequirements + { + get + { + return this._FillingRequirements; + } + set + { + if ((this._FillingRequirements != value)) + { + this.OnFillingRequirementsChanging(value); + this.SendPropertyChanging(); + this._FillingRequirements = value; + this.SendPropertyChanged("FillingRequirements"); + this.OnFillingRequirementsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletionDeadline", DbType="NVarChar(50)")] + public string CompletionDeadline + { + get + { + return this._CompletionDeadline; + } + set + { + if ((this._CompletionDeadline != value)) + { + this.OnCompletionDeadlineChanging(value); + this.SendPropertyChanging(); + this._CompletionDeadline = value; + this.SendPropertyChanged("CompletionDeadline"); + this.OnCompletionDeadlineChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ImplementationStatus", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string ImplementationStatus + { + get + { + return this._ImplementationStatus; + } + set + { + if ((this._ImplementationStatus != value)) + { + this.OnImplementationStatusChanging(value); + this.SendPropertyChanging(); + this._ImplementationStatus = value; + this.SendPropertyChanged("ImplementationStatus"); + this.OnImplementationStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluat" + + "ion", Storage="_Information_SafetyProductionEvaluation", ThisKey="SafetyProductionEvaluationId", OtherKey="SafetyProductionEvaluationId", IsForeignKey=true)] + public Information_SafetyProductionEvaluation Information_SafetyProductionEvaluation + { + get + { + return this._Information_SafetyProductionEvaluation.Entity; + } + set + { + Information_SafetyProductionEvaluation previousValue = this._Information_SafetyProductionEvaluation.Entity; + if (((previousValue != value) + || (this._Information_SafetyProductionEvaluation.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Information_SafetyProductionEvaluation.Entity = null; + previousValue.Information_SafetyProductionEvaluationItem.Remove(this); + } + this._Information_SafetyProductionEvaluation.Entity = value; + if ((value != null)) + { + value.Information_SafetyProductionEvaluationItem.Add(this); + this._SafetyProductionEvaluationId = value.SafetyProductionEvaluationId; + } + else + { + this._SafetyProductionEvaluationId = default(string); + } + this.SendPropertyChanged("Information_SafetyProductionEvaluation"); + } + } + } + + 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.Information_SafetyQuarterlyReport")] public partial class Information_SafetyQuarterlyReport : INotifyPropertyChanging, INotifyPropertyChanged { @@ -152766,7 +154120,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")] public string AttentPerson { get @@ -183725,7 +185079,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(255)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string ProjectDescription { get @@ -183845,7 +185199,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(255)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string CalculationRule { get @@ -183905,7 +185259,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(100)")] public string ConstructionSubcontractor { get @@ -184289,7 +185643,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,2)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,3)")] public System.Nullable WorkPackageEstimate { get @@ -184594,6 +185948,16 @@ namespace Model private string _ProjectId; + private string _ContractId; + + private string _OrderCode; + + private System.Nullable _OrderInDate; + + private System.Nullable _OrderOutDate; + + private string _MaterialRequisitionUnit; + private System.Nullable _State; private string _InvoiceCode; @@ -184622,16 +185986,6 @@ namespace Model private string _CreateUser; - private string _ContractId; - - private System.Nullable _OrderInDate; - - private string _OrderCode; - - private System.Nullable _OrderOutDate; - - private string _MaterialRequisitionUnit; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -184640,6 +185994,16 @@ namespace Model partial void OnInvoiceIdChanged(); partial void OnProjectIdChanging(string value); partial void OnProjectIdChanged(); + partial void OnContractIdChanging(string value); + partial void OnContractIdChanged(); + partial void OnOrderCodeChanging(string value); + partial void OnOrderCodeChanged(); + partial void OnOrderInDateChanging(System.Nullable value); + partial void OnOrderInDateChanged(); + partial void OnOrderOutDateChanging(System.Nullable value); + partial void OnOrderOutDateChanged(); + partial void OnMaterialRequisitionUnitChanging(string value); + partial void OnMaterialRequisitionUnitChanged(); partial void OnStateChanging(System.Nullable value); partial void OnStateChanged(); partial void OnInvoiceCodeChanging(string value); @@ -184668,16 +186032,6 @@ namespace Model partial void OnCreateDateChanged(); partial void OnCreateUserChanging(string value); partial void OnCreateUserChanged(); - partial void OnContractIdChanging(string value); - partial void OnContractIdChanged(); - partial void OnOrderInDateChanging(System.Nullable value); - partial void OnOrderInDateChanged(); - partial void OnOrderCodeChanging(string value); - partial void OnOrderCodeChanged(); - partial void OnOrderOutDateChanging(System.Nullable value); - partial void OnOrderOutDateChanged(); - partial void OnMaterialRequisitionUnitChanging(string value); - partial void OnMaterialRequisitionUnitChanged(); #endregion public PHTGL_Invoice() @@ -184725,6 +186079,106 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] + public string ContractId + { + get + { + return this._ContractId; + } + set + { + if ((this._ContractId != value)) + { + this.OnContractIdChanging(value); + this.SendPropertyChanging(); + this._ContractId = value; + this.SendPropertyChanged("ContractId"); + this.OnContractIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] + public string OrderCode + { + get + { + return this._OrderCode; + } + set + { + if ((this._OrderCode != value)) + { + this.OnOrderCodeChanging(value); + this.SendPropertyChanging(); + this._OrderCode = value; + this.SendPropertyChanged("OrderCode"); + this.OnOrderCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] + public System.Nullable OrderInDate + { + get + { + return this._OrderInDate; + } + set + { + if ((this._OrderInDate != value)) + { + this.OnOrderInDateChanging(value); + this.SendPropertyChanging(); + this._OrderInDate = value; + this.SendPropertyChanged("OrderInDate"); + this.OnOrderInDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] + public System.Nullable OrderOutDate + { + get + { + return this._OrderOutDate; + } + set + { + if ((this._OrderOutDate != value)) + { + this.OnOrderOutDateChanging(value); + this.SendPropertyChanging(); + this._OrderOutDate = value; + this.SendPropertyChanged("OrderOutDate"); + this.OnOrderOutDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] + public string MaterialRequisitionUnit + { + get + { + return this._MaterialRequisitionUnit; + } + set + { + if ((this._MaterialRequisitionUnit != value)) + { + this.OnMaterialRequisitionUnitChanging(value); + this.SendPropertyChanging(); + this._MaterialRequisitionUnit = value; + this.SendPropertyChanged("MaterialRequisitionUnit"); + this.OnMaterialRequisitionUnitChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int")] public System.Nullable State { @@ -185005,106 +186459,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] - public string ContractId - { - get - { - return this._ContractId; - } - set - { - if ((this._ContractId != value)) - { - this.OnContractIdChanging(value); - this.SendPropertyChanging(); - this._ContractId = value; - this.SendPropertyChanged("ContractId"); - this.OnContractIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] - public System.Nullable OrderInDate - { - get - { - return this._OrderInDate; - } - set - { - if ((this._OrderInDate != value)) - { - this.OnOrderInDateChanging(value); - this.SendPropertyChanging(); - this._OrderInDate = value; - this.SendPropertyChanged("OrderInDate"); - this.OnOrderInDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] - public string OrderCode - { - get - { - return this._OrderCode; - } - set - { - if ((this._OrderCode != value)) - { - this.OnOrderCodeChanging(value); - this.SendPropertyChanging(); - this._OrderCode = value; - this.SendPropertyChanged("OrderCode"); - this.OnOrderCodeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] - public System.Nullable OrderOutDate - { - get - { - return this._OrderOutDate; - } - set - { - if ((this._OrderOutDate != value)) - { - this.OnOrderOutDateChanging(value); - this.SendPropertyChanging(); - this._OrderOutDate = value; - this.SendPropertyChanged("OrderOutDate"); - this.OnOrderOutDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] - public string MaterialRequisitionUnit - { - get - { - return this._MaterialRequisitionUnit; - } - set - { - if ((this._MaterialRequisitionUnit != value)) - { - this.OnMaterialRequisitionUnitChanging(value); - this.SendPropertyChanging(); - this._MaterialRequisitionUnit = value; - this.SendPropertyChanged("MaterialRequisitionUnit"); - this.OnMaterialRequisitionUnitChanged(); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -284567,6 +285921,213 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_ActionWorkLedger")] + public partial class View_Information_ActionWorkLedger + { + + private string _ActionWorkLedgerId; + + private string _UnitId; + + private System.Nullable _ReportDate; + + private System.Nullable _YearId; + + private System.Nullable _Quarter; + + private string _UpState; + + private string _HandleState; + + private string _Quarters; + + private string _UnitName; + + private string _HandleMan; + + private string _UserName; + + public View_Information_ActionWorkLedger() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActionWorkLedgerId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string ActionWorkLedgerId + { + get + { + return this._ActionWorkLedgerId; + } + set + { + if ((this._ActionWorkLedgerId != value)) + { + this._ActionWorkLedgerId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this._ReportDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this._YearId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this._Quarter = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string Quarters + { + get + { + return this._Quarters; + } + set + { + if ((this._Quarters != value)) + { + this._Quarters = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(200)")] + public string UserName + { + get + { + return this._UserName; + } + set + { + if ((this._UserName != value)) + { + this._UserName = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_DrillConductedQuarterlyReport")] public partial class View_Information_DrillConductedQuarterlyReport { @@ -286232,6 +287793,213 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_SafetyProductionEvaluation")] + public partial class View_Information_SafetyProductionEvaluation + { + + private string _SafetyProductionEvaluationId; + + private string _UnitId; + + private System.Nullable _ReportDate; + + private System.Nullable _YearId; + + private System.Nullable _Quarter; + + private string _UpState; + + private string _HandleState; + + private string _Quarters; + + private string _UnitName; + + private string _HandleMan; + + private string _UserName; + + public View_Information_SafetyProductionEvaluation() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyProductionEvaluationId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SafetyProductionEvaluationId + { + get + { + return this._SafetyProductionEvaluationId; + } + set + { + if ((this._SafetyProductionEvaluationId != value)) + { + this._SafetyProductionEvaluationId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this._ReportDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this._YearId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this._Quarter = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string Quarters + { + get + { + return this._Quarters; + } + set + { + if ((this._Quarters != value)) + { + this._Quarters = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(200)")] + public string UserName + { + get + { + return this._UserName; + } + set + { + if ((this._UserName != value)) + { + this._UserName = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_SafetyQuarterlyReport")] public partial class View_Information_SafetyQuarterlyReport { @@ -299729,7 +301497,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] public string Name { get @@ -300306,7 +302074,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] public string PackageContent { get @@ -300497,7 +302265,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] public string PackageContent { get @@ -305808,7 +307576,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] public string PackageContent { get @@ -307280,7 +309048,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] public string PackageContent { get @@ -316831,7 +318599,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(1500)")] public string ContractNo { get @@ -316851,7 +318619,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(1500)")] public string UnitWorks { get diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index f58a2e5e..914c9fd5 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -63,6 +63,8 @@ + + @@ -159,6 +161,8 @@ + +