From 5f7620614d9777444efe67de8827bc9bbc3d8318 Mon Sep 17 00:00:00 2001 From: xiaju <1784803958@qq.com> Date: Thu, 2 Apr 2026 17:00:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E5=8D=B1=E5=AE=B3=E5=9B=A0?= =?UTF-8?q?=E7=B4=A0=E6=B8=85=E5=8D=95=E3=80=90=E7=AC=AC=E4=BA=8C=E7=89=88?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SGGLDB_V2026-04-01-xiaj(安全危害因素).sql | 8 +- SGGL/BLL/Common/Const.cs | 9 + .../HazardFactor/HazardFactorSafetyService.cs | 8 +- .../DataIn/安全危害因素数据导入模板.xlsx | Bin 0 -> 10343 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 12 + .../HazardFactor/HazardFactorSafety.aspx | 16 +- .../HazardFactor/HazardFactorSafety.aspx.cs | 18 +- .../HazardFactorSafety.aspx.designer.cs | 9 + .../HazardFactor/HazardFactorSafetyEdit.aspx | 4 +- .../HazardFactorSafetyEdit.aspx.cs | 12 +- .../HazardFactorSafetyEdit.aspx.designer.cs | 8 +- .../HazardFactor/HazardFactorSafetyIn.aspx | 73 +++ .../HazardFactor/HazardFactorSafetyIn.aspx.cs | 569 ++++++++++++++++++ .../HazardFactorSafetyIn.aspx.designer.cs | 125 ++++ .../HazardFactorSafetySummary.aspx | 9 +- .../HazardFactorSafetySummary.aspx.cs | 35 +- ...HazardFactorSafetySummary.aspx.designer.cs | 9 + .../HazardFactor/HazardFactorSafetyView.aspx | 4 +- .../HazardFactorSafetyView.aspx.cs | 4 +- .../HazardFactorSafetyView.aspx.designer.cs | 8 +- SGGL/Model/Model.cs | 54 +- 21 files changed, 922 insertions(+), 72 deletions(-) create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/安全危害因素数据导入模板.xlsx create mode 100644 SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx create mode 100644 SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_V2026-04-01-xiaj(安全危害因素).sql b/DataBase/版本日志/SGGLDB_V2026-04-01-xiaj(安全危害因素).sql index 56c2f66..5d8ee3d 100644 --- a/DataBase/版本日志/SGGLDB_V2026-04-01-xiaj(安全危害因素).sql +++ b/DataBase/版本日志/SGGLDB_V2026-04-01-xiaj(安全危害因素).sql @@ -37,13 +37,13 @@ CREATE TABLE [dbo].[HazardFactor_Safety]( [BaseRiskSeverity] [int] NOT NULL, [BaseRiskProbability] [int] NOT NULL, [BaseRiskScore] [int] NOT NULL, - [BaseRiskGrade] [nvarchar](50) NOT NULL, + [BaseRiskLevel] [nvarchar](50) NOT NULL, [BaseRiskAcceptabity] [bit] NOT NULL, [NetRiskControlMeasures] [nvarchar](500) NULL, [NetRiskSeverity] [int] NOT NULL, [NetRiskProbability] [int] NOT NULL, [NetRiskScore] [int] NOT NULL, - [NetRiskGrade] [nvarchar](50) NOT NULL, + [NetRiskLevel] [nvarchar](50) NOT NULL, [NetRiskAcceptabity] [bit] NOT NULL, [AdditionalControlMeasures] [nvarchar](500) NULL, [ResponsibleDepartment] [nvarchar](50) NULL, @@ -70,13 +70,13 @@ EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Υ EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'BaseRiskSeverity' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'BaseRiskProbability' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'е÷' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'BaseRiskScore' -EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ռ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'BaseRiskGrade' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ռ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'BaseRiskLevel' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ɽ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'BaseRiskAcceptabity' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'пƴʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'NetRiskControlMeasures' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'NetRiskSeverity' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'NetRiskProbability' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'е÷' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'NetRiskScore' -EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ռ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'NetRiskGrade' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ռ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'NetRiskLevel' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ɽ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'NetRiskAcceptabity' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀƴʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'AdditionalControlMeasures' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'β' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_Safety', @level2type=N'COLUMN',@level2name=N'ResponsibleDepartment' diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index cf9f0e9..6ac3908 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -21,6 +21,15 @@ namespace BLL public const string SYHSE_LicenceMenuId = "E024F3D5-4E42-4D3B-878D-B5E9825F0CB9"; public const string SYHSE_RiskMenuId = "CDB72049-E754-4782-AAE3-E4E8F6B77F2D"; + #region 报表管理:危害因素 + + /// + /// 安全危害因素数据导入模板 + /// + public const string HazardFactorSafetyDataInTemplateUrl = "File\\Excel\\DataIn\\安全危害因素数据导入模板.xlsx"; + + #endregion + /// /// 焊条发放回收纪录 /// diff --git a/SGGL/BLL/ReportManage/HazardFactor/HazardFactorSafetyService.cs b/SGGL/BLL/ReportManage/HazardFactor/HazardFactorSafetyService.cs index b7285c5..f53949e 100644 --- a/SGGL/BLL/ReportManage/HazardFactor/HazardFactorSafetyService.cs +++ b/SGGL/BLL/ReportManage/HazardFactor/HazardFactorSafetyService.cs @@ -46,13 +46,13 @@ namespace BLL newModel.BaseRiskSeverity = model.BaseRiskSeverity; newModel.BaseRiskProbability = model.BaseRiskProbability; newModel.BaseRiskScore = model.BaseRiskScore; - newModel.BaseRiskGrade = model.BaseRiskGrade; + newModel.BaseRiskLevel = model.BaseRiskLevel; newModel.BaseRiskAcceptabity = model.BaseRiskAcceptabity; newModel.NetRiskControlMeasures = model.NetRiskControlMeasures; newModel.NetRiskSeverity = model.NetRiskSeverity; newModel.NetRiskProbability = model.NetRiskProbability; newModel.NetRiskScore = model.NetRiskScore; - newModel.NetRiskGrade = model.NetRiskGrade; + newModel.NetRiskLevel = model.NetRiskLevel; newModel.NetRiskAcceptabity = model.NetRiskAcceptabity; newModel.AdditionalControlMeasures = model.AdditionalControlMeasures; newModel.ResponsibleDepartment = model.ResponsibleDepartment; @@ -81,13 +81,13 @@ namespace BLL newModel.BaseRiskSeverity = model.BaseRiskSeverity; newModel.BaseRiskProbability = model.BaseRiskProbability; newModel.BaseRiskScore = model.BaseRiskScore; - newModel.BaseRiskGrade = model.BaseRiskGrade; + newModel.BaseRiskLevel = model.BaseRiskLevel; newModel.BaseRiskAcceptabity = model.BaseRiskAcceptabity; newModel.NetRiskControlMeasures = model.NetRiskControlMeasures; newModel.NetRiskSeverity = model.NetRiskSeverity; newModel.NetRiskProbability = model.NetRiskProbability; newModel.NetRiskScore = model.NetRiskScore; - newModel.NetRiskGrade = model.NetRiskGrade; + newModel.NetRiskLevel = model.NetRiskLevel; newModel.NetRiskAcceptabity = model.NetRiskAcceptabity; newModel.AdditionalControlMeasures = model.AdditionalControlMeasures; newModel.ResponsibleDepartment = model.ResponsibleDepartment; diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/安全危害因素数据导入模板.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/安全危害因素数据导入模板.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..0054822843446b51ff7283f455d052146a3a9d0a GIT binary patch literal 10343 zcma)ibzD^4_CDQ6OG<}yBhoD`Al=;z-5}Bo3|-RFEgd2qQqm35-QD#Y^xoI^_1^FO z{PrJn&djXXXFdBo=j^qXf($ea62#L8mR}KiI{tegf=`TXjT9Vg?HrjEz+%|o9}s?u z34ge})`oxd#ft?+bn~il^Op|;E3wEF@O$%*=d{SoKw}Wa5nJ z{LQoL2f`8fetyWOS^MnWHq1jgTyFtT+pd4j?_rcJto1+V+i?+}b+Z0#Ig=B|(l z4ZI&tmzHF+O&1rVRQ23I74Ze;%`?wWs9q>zfZ`XS-D{6S%q?D&1k9)3-63Zh=4vYxeMHr({egCL!v*G%|6hK{X}WYDSp27dTKR-d$L#hiqY7RdX};yEGOSdF9n zIS6jkBYhg+ls`Z64O6C>rYEadEIJMESHdm^+jtg^)vBw+s|AJ!onIbzoZZyA7p3%h zs1hj6LNgE!|_}ec5|GYuge{g7QG~OncN(Dk_Q$)iVx- zx08Yt(D?RI><;yxFm&nf2Z(`T2mr%?^$!@F9i41#o`9%{(Ru67f*o`ycZZg9IqdKu zoT-(q8FMvIViSN$YeM0hFwCX{dYm78EePOTsBur()&jyy6{pi#b$MQ;m5%A zu|%sPe59kHTGW_U2iUNav&70{7nsnyF7CwJ=Ns9u-p7WJX;?kxp{`#t9dQ}&Aj=>- z+EYDx#hS=DhII1@2$eGu;vL^e_B&ig!S8hwx#k+G&JNOov4uzZVhbnGv`8`}u^6!ia2 zR?y&}yIKFFssAqU?3aM6t%H@LxrvF>pOmJF!<;pFmJ7n+3s(=CU4x`Lm?J-w({TIp?_#VlbjBQ9d5A~so?RKC6{wrT*-8C1- z;DYICjk2k5=Twfym#10Sq@z^@c%_(a?G^Oej?;x{v#ZHurMc zg~65>2A+5~&x(a^gc7pzxT^W$RV*!J0M}djSRD6)O5YZ?s3X;na-r5@`jU(w--to; zN#A#{5hLqkJ%$gzUAG~~ye;ukyO1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FK7I-}vdziT+7sPkw$yDdO*H|3Pbi z+W9k|{M*i3@TC7+cKJ^Wf2Ll3TQJ4>W#O+x%>VzjKY~L6cK+{D=|5Mn-v4xj|LBxlcs#q`+rxr89D#} literal 0 HcmV?d00001 diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 85914e8..b434268 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -147,6 +147,10 @@ + + False + bin\System.ValueTuple.dll + @@ -2549,6 +2553,7 @@ + @@ -17277,6 +17282,13 @@ ProjectPageDataSave.aspx + + HazardFactorSafetyIn.aspx + ASPXCodeBehind + + + HazardFactorSafetyIn.aspx + HazardFactorSafetySummary.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx index 4cb529e..f570754 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx @@ -40,22 +40,22 @@ - + - + - <%----%> + @@ -89,7 +89,7 @@ - + @@ -99,9 +99,9 @@ - + - + @@ -115,7 +115,7 @@ - + diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx.cs index 5485c1d..038bcdc 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx.cs +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx.cs @@ -46,7 +46,6 @@ namespace FineUIPro.Web.ReportManage.HazardFactor ////权限按钮方法 this.GetButtonPower(); btnNew.OnClientClick = Window1.GetShowReference("HazardFactorSafetyEdit.aspx") + "return false;"; - //btnImport.OnClientClick = Window1.GetShowReference("HazardFactorSafetyIn.aspx") + "return false;"; ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 BindGrid(); @@ -236,6 +235,7 @@ namespace FineUIPro.Web.ReportManage.HazardFactor if (buttonList.Contains(BLL.Const.BtnAdd)) { this.btnNew.Hidden = false; + this.btnImport.Hidden = false; } if (buttonList.Contains(BLL.Const.BtnModify)) { @@ -254,6 +254,16 @@ namespace FineUIPro.Web.ReportManage.HazardFactor } #endregion + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HazardFactorSafetyIn.aspx?ProjectId={0}", this.ProjectId, "导入 - "))); + } + #region 导出按钮 /// @@ -264,8 +274,10 @@ namespace FineUIPro.Web.ReportManage.HazardFactor 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"); + string year = !string.IsNullOrWhiteSpace(this.drpYear.SelectedValue) && this.drpYear.SelectedValue != Const._Null ? $"{this.drpYear.SelectedValue}年" : string.Empty; + string month = !string.IsNullOrWhiteSpace(this.drpMonth.SelectedValue) && this.drpMonth.SelectedValue != Const._Null ? $"{this.drpMonth.SelectedValue}月" : string.Empty; + string fileName = System.Web.HttpUtility.UrlEncode($"{year}{month}安全危害因素清单" + Funs.GetNewFileName(), System.Text.Encoding.UTF8); + Response.AddHeader("content-disposition", "attachment; filename=" + fileName + ".xls"); Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; this.Grid1.PageSize = 10000; diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx.designer.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx.designer.cs index 1048dbe..27a1c94 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafety.aspx.designer.cs @@ -113,6 +113,15 @@ namespace FineUIPro.Web.ReportManage.HazardFactor /// protected global::FineUIPro.Button btnNew; + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + /// /// btnOut 控件。 /// diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx index b8f6649..79f9313 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx @@ -68,7 +68,7 @@ - + @@ -108,7 +108,7 @@ - + diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx.cs index 773279d..31da6fc 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx.cs @@ -81,13 +81,13 @@ namespace FineUIPro.Web.ReportManage.HazardFactor this.txtBaseRiskSeverity.Text = model.BaseRiskSeverity.ToString(); this.txtBaseRiskProbability.Text = model.BaseRiskProbability.ToString(); this.txtBaseRiskScore.Text = model.BaseRiskScore.ToString(); - this.txtBaseRiskGrade.Text = model.BaseRiskGrade; + this.txtBaseRiskLevel.Text = model.BaseRiskLevel; this.rblBaseRiskAcceptabity.SelectedValue = model.BaseRiskAcceptabity ? "1" : "0"; this.txtNetRiskControlMeasures.Text = model.NetRiskControlMeasures; this.txtNetRiskSeverity.Text = model.NetRiskSeverity.ToString(); this.txtNetRiskProbability.Text = model.NetRiskProbability.ToString(); this.txtNetRiskScore.Text = model.NetRiskScore.ToString(); - this.txtNetRiskGrade.Text = model.NetRiskGrade; + this.txtNetRiskLevel.Text = model.NetRiskLevel; this.rblNetRiskAcceptabity.SelectedValue = model.NetRiskAcceptabity ? "1" : "0"; this.txtAdditionalControlMeasures.Text = model.AdditionalControlMeasures; this.txtResponsibleDepartment.Text = model.ResponsibleDepartment; @@ -153,13 +153,13 @@ namespace FineUIPro.Web.ReportManage.HazardFactor model.BaseRiskSeverity = int.Parse(this.txtBaseRiskSeverity.Text.Trim()); model.BaseRiskProbability = int.Parse(this.txtBaseRiskProbability.Text.Trim()); model.BaseRiskScore = int.Parse(this.txtBaseRiskScore.Text.Trim()); - model.BaseRiskGrade = this.txtBaseRiskGrade.Text.Trim(); + model.BaseRiskLevel = this.txtBaseRiskLevel.Text.Trim(); model.BaseRiskAcceptabity = this.rblBaseRiskAcceptabity.SelectedValue == "1"; model.NetRiskControlMeasures = this.txtNetRiskControlMeasures.Text.Trim(); model.NetRiskSeverity = int.Parse(this.txtNetRiskSeverity.Text.Trim()); model.NetRiskProbability = int.Parse(this.txtNetRiskProbability.Text.Trim()); model.NetRiskScore = int.Parse(this.txtNetRiskScore.Text.Trim()); - model.NetRiskGrade = this.txtNetRiskGrade.Text.Trim(); + model.NetRiskLevel = this.txtNetRiskLevel.Text.Trim(); model.NetRiskAcceptabity = this.rblNetRiskAcceptabity.SelectedValue == "1"; model.AdditionalControlMeasures = this.txtAdditionalControlMeasures.Text.Trim(); model.ResponsibleDepartment = this.txtResponsibleDepartment.Text.Trim(); @@ -232,7 +232,7 @@ namespace FineUIPro.Web.ReportManage.HazardFactor var riskLevel = RiskLevelService.GetRiskLevelByValue(score); if (riskLevel != null) { - this.txtBaseRiskGrade.Text = riskLevel.RiskLevelName; + this.txtBaseRiskLevel.Text = riskLevel.RiskLevelName; } } @@ -271,7 +271,7 @@ namespace FineUIPro.Web.ReportManage.HazardFactor var riskLevel = RiskLevelService.GetRiskLevelByValue(score); if (riskLevel != null) { - this.txtNetRiskGrade.Text = riskLevel.RiskLevelName; + this.txtNetRiskLevel.Text = riskLevel.RiskLevelName; } } diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx.designer.cs index 767f4fc..45ffe01 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyEdit.aspx.designer.cs @@ -168,13 +168,13 @@ namespace FineUIPro.Web.ReportManage.HazardFactor protected global::FineUIPro.NumberBox txtBaseRiskScore; /// - /// txtBaseRiskGrade 控件。 + /// txtBaseRiskLevel 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtBaseRiskGrade; + protected global::FineUIPro.TextBox txtBaseRiskLevel; /// /// rblBaseRiskAcceptabity 控件。 @@ -249,13 +249,13 @@ namespace FineUIPro.Web.ReportManage.HazardFactor protected global::FineUIPro.NumberBox txtNetRiskScore; /// - /// txtNetRiskGrade 控件。 + /// txtNetRiskLevel 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtNetRiskGrade; + protected global::FineUIPro.TextBox txtNetRiskLevel; /// /// rblNetRiskAcceptabity 控件。 diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx new file mode 100644 index 0000000..f997f56 --- /dev/null +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx @@ -0,0 +1,73 @@ +<%@ Page Language="C#" CodeBehind="HazardFactorSafetyIn.aspx.cs" Inherits="FineUIPro.Web.ReportManage.HazardFactor.HazardFactorSafetyIn" %> + + + + + + + + 导入 + + +
+ + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.cs new file mode 100644 index 0000000..7db36a2 --- /dev/null +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.cs @@ -0,0 +1,569 @@ +using BLL; +using Model; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.IO; +using System.Linq; + +namespace FineUIPro.Web.ReportManage.HazardFactor +{ + public partial class HazardFactorSafetyIn : PageBase + { + #region 定义变量 + + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + + /// + /// 项目id + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + /// + /// 操作人 + /// + public string CompileMan + { + get + { + return (string)ViewState["CompileMan"]; + } + set + { + ViewState["CompileMan"] = value; + } + } + public string CompileManName + { + get + { + return (string)ViewState["CompileManName"]; + } + set + { + ViewState["CompileManName"] = value; + } + } + + public static int Cols = 19;//列数 + + public static List validLevelStrings = new List { "低风险", "一般风险", "较大风险", "重大风险" }; + + #endregion + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ProjectId = Request.Params["ProjectId"]; + + + this.CompileMan = this.CurrUser.UserId; + this.CompileManName = this.CurrUser.UserName; + this.hdFileName.Text = string.Empty; + if (errorInfos != null) + { + errorInfos.Clear(); + } + + //if (this.CurrUser.UserId == Const.AdminId) + //{ + // this.btnFastImport.Hidden = false; + //} + } + } + + #region 下载模板 + + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + //这里要注意了,如果传过来的没有记录 + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, + MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), + PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.HazardFactorSafetyDataInTemplateUrl; + string filePath = Const.HazardFactorSafetyDataInTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls" && IsXls != ".xlsx") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + AuditExcelAndShowResult(filePath); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + /// + /// 审核Excel并展示校验结果 + /// + private void AuditExcelAndShowResult(string fileName) + { + try + { + string msg = string.Empty; + var dt = BLL.Common.NPOIHelper.ExcelToDataSet(fileName, out msg, true); + if (dt != null) + { + //string rootPath = Server.MapPath("~/"); + //var localPath = ConfigurationManager.AppSettings["localRoot"]; + //imgDic = NPOIHelper.ExtractDispimgImagesFromXml(rootPath + initPath + this.hdFileName.Text, localPath + "FileUpload/CheckSpecial"); + ValidateExcelData(dt.Tables[0], false); + hdCheckResult.Text = "1"; + } + } + catch (Exception exc) + { + BLL.ErrLogInfo.WriteLog("", exc); + Response.Write(exc); + } + } + + /// + /// 校验Excel数据(仅校验) + /// + /// + /// true:导入;false:审核 + /// + private bool ValidateExcelData(DataTable pds, bool import) + { + int ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify($"导入Excel格式错误!Excel只有{ic}列", MessageBoxIcon.Warning); + return false; + } + int ir = pds.Rows.Count; + if (pds == null || ir <= 0) + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + return false; + } + var errors = new List(); + for (int i = 1; i < ir; i++) + { + var (error, _) = ValidateRowAndBuildEntity(pds.Rows[i], (i + 2).ToString(), import); + if (error.Any()) { errors.AddRange(error); } + } + errorInfos.Clear(); + errorInfos.AddRange(errors); + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + if (errors.Count > 0) + { + ShowNotify("存在校验错误,请查看错误列表并修正后再次导入。", MessageBoxIcon.Warning); + return false; + } + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + return true; + } + + + /// + /// 校验单行并生成实体(字段顺序与新模板一致) + /// + private (List lstError, Model.HazardFactor_Safety entity) ValidateRowAndBuildEntity(DataRow row, string displayRow, bool import) + { + List lstError = new List(); + // 新模板字段顺序 + string rData0 = row[0]?.ToString().Trim(); // 上报年月 + string rData1 = row[1]?.ToString().Trim(); // 活动区域\场所\设备 + string rData2 = row[2]?.ToString().Trim(); // 作业内容/步骤 + string rData3 = row[3]?.ToString().Trim(); // 危害因素描述 + string rData4 = row[4]?.ToString().Trim(); // 主要后果 + string rData5 = row[5]?.ToString().Trim(); // 违法 + string rData6 = row[6]?.ToString().Trim(); // 固有风险-严重性 + string rData7 = row[7]?.ToString().Trim(); // 固有风险-可能性 + string rData8 = row[8]?.ToString().Trim(); // 固有风险-得分 + string rData9 = row[9]?.ToString().Trim(); // 固有风险-风险级别 + string rData10 = row[10]?.ToString().Trim(); // 固有风险-可接受 + string rData11 = row[11]?.ToString().Trim(); // 残留风险-现有控制措施 + string rData12 = row[12]?.ToString().Trim(); // 残留风险-严重性 + string rData13 = row[13]?.ToString().Trim(); // 残留风险-可能性 + string rData14 = row[14]?.ToString().Trim(); // 残留风险-得分 + string rData15 = row[15]?.ToString().Trim(); // 残留风险-风险级别 + string rData16 = row[16]?.ToString().Trim(); // 残留风险-可接受 + string rData17 = row[17]?.ToString().Trim(); // 新增或变更的控制措施 + string rData18 = row[18]?.ToString().Trim(); // 责任部门 + + string Year = string.Empty; + string Month = string.Empty; + string WorkPlace = string.Empty; + string JobStep = string.Empty; + string Hazard = string.Empty; + string Consequence = string.Empty; + bool Illegality = false; + int BaseRiskSeverity = 0; + int BaseRiskProbability = 0; + int BaseRiskScore = 0; + string BaseRiskLevel = "低风险"; + bool BaseRiskAcceptabity = false; + string NetRiskControlMeasures = string.Empty; + int NetRiskSeverity = 0; + int NetRiskProbability = 0; + int NetRiskScore = 0; + string NetRiskLevel = "低风险"; + bool NetRiskAcceptabity = false; + string AdditionalControlMeasures = string.Empty; + string ResponsibleDepartment = string.Empty; + + + // 校验并转换 + if (!string.IsNullOrEmpty(rData0)) + { + if (!DateTime.TryParse(rData0, out DateTime ct)) + { + lstError.Add(new ErrorInfo { Row = displayRow, Column = "上报年月", Reason = "上报年月格式错误[正确格式:yyyy-MM,2026-04]" }); + } + else + { + Year = ct.Year.ToString(); + Month = ct.Month.ToString(); + } + } + else + { + lstError.Add(new ErrorInfo { Row = displayRow, Column = "上报年月", Reason = "不能为空" }); + } + if (!string.IsNullOrEmpty(rData1)) + { + WorkPlace = rData1; + } + else + { + lstError.Add(new ErrorInfo { Row = displayRow, Column = "活动区域", Reason = "不能为空" }); + } + if (!string.IsNullOrEmpty(rData2)) + { + JobStep = rData2; + } + else + { + lstError.Add(new ErrorInfo { Row = displayRow, Column = "作业内容", Reason = "不能为空" }); + } + if (!string.IsNullOrEmpty(rData3)) + { + Hazard = rData3; + } + else + { + lstError.Add(new ErrorInfo { Row = displayRow, Column = "危害因素描述", Reason = "不能为空" }); + } + if (!string.IsNullOrEmpty(rData4)) + { + Consequence = rData4; + } + else + { + lstError.Add(new ErrorInfo { Row = displayRow, Column = "主要后果", Reason = "不能为空" }); + } + Illegality = !string.IsNullOrEmpty(rData5) && rData5 == "是"; + if (!string.IsNullOrEmpty(rData6)) + { + if (!int.TryParse(rData6, out int ct)) + { + lstError.Add(new ErrorInfo { Row = displayRow, Column = "固有风险严重性", Reason = "格式错误" }); + } + else + { + BaseRiskSeverity = ct; + } + } + if (!string.IsNullOrEmpty(rData7)) + { + if (!int.TryParse(rData7, out int ct)) + { + lstError.Add(new ErrorInfo { Row = displayRow, Column = "固有风险可能性", Reason = "格式错误" }); + } + else + { + BaseRiskProbability = ct; + } + } + BaseRiskScore = BaseRiskSeverity * BaseRiskProbability; + var baseRiskLevel = RiskLevelService.GetRiskLevelByValue(BaseRiskScore); + if (baseRiskLevel != null) + { + BaseRiskLevel = baseRiskLevel.RiskLevelName; + } + BaseRiskAcceptabity = !string.IsNullOrEmpty(rData10) && rData10 == "否" ? false : true; + if (!string.IsNullOrEmpty(rData11)) + { + NetRiskControlMeasures = rData11; + } + else + { + lstError.Add(new ErrorInfo { Row = displayRow, Column = "现有控制措施", Reason = "不能为空" }); + } + + if (!string.IsNullOrEmpty(rData12)) + { + if (!int.TryParse(rData12, out int ct)) + { + lstError.Add(new ErrorInfo { Row = displayRow, Column = "残留风险严重性", Reason = "格式错误" }); + } + else + { + NetRiskSeverity = ct; + } + } + if (!string.IsNullOrEmpty(rData13)) + { + if (!int.TryParse(rData13, out int ct)) + { + lstError.Add(new ErrorInfo { Row = displayRow, Column = "残留风险可能性", Reason = "格式错误" }); + } + else + { + NetRiskProbability = ct; + } + } + NetRiskScore = NetRiskSeverity * NetRiskProbability; + var netRiskLevel = RiskLevelService.GetRiskLevelByValue(NetRiskScore); + if (netRiskLevel != null) + { + NetRiskLevel = netRiskLevel.RiskLevelName; + } + NetRiskAcceptabity = !string.IsNullOrEmpty(rData16) && rData16 == "否" ? false : true; + + if (!string.IsNullOrEmpty(rData17)) + { + AdditionalControlMeasures = rData17; + } + if (!string.IsNullOrEmpty(rData18)) + { + ResponsibleDepartment = rData18; + } + + if (lstError.Any()) + { + return (lstError, null); + } + + // 其余字段可根据实际业务映射到实体 + var entity = new Model.HazardFactor_Safety + { + ID = SQLHelper.GetNewID(typeof(Model.HazardFactor_Safety)), + CompileDate=DateTime.Now, + CompileMan = this.CompileMan, + CompileManName = this.CompileManName, + State = int.Parse(BLL.Const.State_1),//默认已提交 + ProjectId =this.ProjectId, + Year = Year, + Month = Month, + WorkPlace = WorkPlace, + JobStep = JobStep, + Hazard = Hazard, + Consequence = Consequence, + Illegality = Illegality, + BaseRiskSeverity = BaseRiskSeverity, + BaseRiskProbability = BaseRiskProbability, + BaseRiskScore = BaseRiskScore, + BaseRiskLevel = BaseRiskLevel, + BaseRiskAcceptabity = BaseRiskAcceptabity, + NetRiskControlMeasures = NetRiskControlMeasures, + NetRiskSeverity = NetRiskSeverity, + NetRiskProbability = NetRiskProbability, + NetRiskScore = NetRiskScore, + NetRiskLevel = NetRiskLevel, + NetRiskAcceptabity = NetRiskAcceptabity, + AdditionalControlMeasures = AdditionalControlMeasures, + ResponsibleDepartment = ResponsibleDepartment + }; + return (lstError, entity); + } + + #endregion + + #region 导入 + + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (hdCheckResult.Text == "1") + { + if (errorInfos.Count <= 0) + { + string rootPath = Server.MapPath("~/"); + var localPath = ConfigurationManager.AppSettings["localRoot"]; + //imgDic = NPOIHelper.ExtractDispimgImagesFromXml(rootPath + initPath + this.hdFileName.Text, localPath + "FileUpload/CheckSpecial"); + ImportExcelToDatabase(rootPath + initPath + this.hdFileName.Text, true); + + hdCheckResult.Text = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + /// + /// 导入Excel到数据库 + /// + private void ImportExcelToDatabase(string fileName, bool import) + { + try + { + string msg = string.Empty; + var dt = BLL.Common.NPOIHelper.ExcelToDataSet(fileName, out msg, true); + BLL.ErrLogInfo.WriteLog(msg); + SaveExcelDataToDatabase(fileName, dt.Tables[0], import); + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("", ex); + } + } + + /// + /// 校验并保存数据到数据库 + /// + private bool SaveExcelDataToDatabase(string fileName, DataTable pds, bool import) + { + int ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify($"导入Excel格式错误!Excel只有{ic}列", MessageBoxIcon.Warning); + return false; + } + int ir = pds.Rows.Count; + if (pds == null || ir <= 0) + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + return false; + } + var errors = new List(); + var toInsert = new List(); + + for (int i = 1; i < ir; i++) + { + var (error, entity) = ValidateRowAndBuildEntity(pds.Rows[i], (i + 2).ToString(), import); + if (error.Any()) + errors.AddRange(error); + else + toInsert.Add(entity); + } + if (errors.Count > 0) + { + errorInfos.Clear(); + errorInfos.AddRange(errors); + this.gvErrorInfo.DataSource = errorInfos; + this.gvErrorInfo.DataBind(); + ShowNotify("存在校验错误,请先审核并修正后再导入。", MessageBoxIcon.Warning); + return false; + } + try + { + if (toInsert.Any()) + { + Funs.DB.HazardFactor_Safety.InsertAllOnSubmit(toInsert); + Funs.DB.SubmitChanges(); + } + ShowNotify($"成功导入 {toInsert.Count} 条记录。", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return true; + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("导入 安全危害因素清单(HazardFactor_Safety) 失败", ex); + ShowNotify("导入失败:" + ex.Message, MessageBoxIcon.Error); + return false; + } + } + + #endregion // 导入 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.designer.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.designer.cs new file mode 100644 index 0000000..a6cd099 --- /dev/null +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ReportManage.HazardFactor +{ + + + public partial class HazardFactorSafetyIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx index e7ce94b..e98b185 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx @@ -53,6 +53,11 @@ + + + + + @@ -101,7 +106,7 @@ - + @@ -117,7 +122,7 @@ - + diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx.cs index 4c2d29a..ab34c44 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx.cs +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx.cs @@ -55,7 +55,24 @@ namespace FineUIPro.Web.ReportManage.HazardFactor StringBuilder sb = new StringBuilder(); List listStr = new List(); - sb.Append("SELECT tbb.ProjectName,tba.* "); + string dedupe = rbDedupe.SelectedValue; + + if (!string.IsNullOrWhiteSpace(dedupe)) + { + sb.Append("WITH CTE AS ( "); + if (dedupe == "0") + {//按月 + sb.Append("SELECT ROW_NUMBER() OVER (PARTITION BY tba.Year,tba.Month,tba.WorkPlace,tba.JobStep,tba.Hazard,tba.Consequence,tba.Illegality,tba.BaseRiskSeverity,tba.BaseRiskProbability,tba.BaseRiskScore,tba.BaseRiskLevel,tba.BaseRiskAcceptabity,tba.NetRiskControlMeasures,tba.NetRiskSeverity,tba.NetRiskProbability,tba.NetRiskScore,tba.NetRiskLevel,tba.NetRiskAcceptabity,tba.AdditionalControlMeasures ORDER BY CompileDate desc) as rn,tbb.ProjectName,tba.* "); + } + else + {//按年 + sb.Append("SELECT ROW_NUMBER() OVER (PARTITION BY tba.Year,tba.WorkPlace,tba.JobStep,tba.Hazard,tba.Consequence,tba.Illegality,tba.BaseRiskSeverity,tba.BaseRiskProbability,tba.BaseRiskScore,tba.BaseRiskLevel,tba.BaseRiskAcceptabity,tba.NetRiskControlMeasures,tba.NetRiskSeverity,tba.NetRiskProbability,tba.NetRiskScore,tba.NetRiskLevel,tba.NetRiskAcceptabity,tba.AdditionalControlMeasures ORDER BY CompileDate desc) as rn,tbb.ProjectName,tba.* "); + } + } + else + { + sb.Append("SELECT tbb.ProjectName,tba.* "); + } sb.Append("FROM HazardFactor_Safety AS tba WITH(NOLOCK) "); sb.Append("LEFT JOIN Base_Project AS tbb WITH(NOLOCK) ON tbb.ProjectId = tba.ProjectId "); sb.Append("WHERE 1=1 AND tba.State = 1 ");//取已提交数据 @@ -86,8 +103,16 @@ namespace FineUIPro.Web.ReportManage.HazardFactor listStr.Add(new SqlParameter("@Illegality", this.rbIllegality.SelectedValue == "1" ? true : false)); } + + if (!string.IsNullOrWhiteSpace(dedupe)) + { + sb.Append(") "); + sb.Append("SELECT * FROM CTE WHERE rn = 1; "); + } + + string sqlStr = sb.ToString(); SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(sb.ToString(), parameter); + DataTable tb = SQLHelper.GetDataTableRunText(sqlStr, parameter); Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); @@ -243,8 +268,10 @@ namespace FineUIPro.Web.ReportManage.HazardFactor 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"); + string year = !string.IsNullOrWhiteSpace(this.drpYear.SelectedValue) && this.drpYear.SelectedValue != Const._Null ? $"{this.drpYear.SelectedValue}年" : string.Empty; + string month = !string.IsNullOrWhiteSpace(this.drpMonth.SelectedValue) && this.drpMonth.SelectedValue != Const._Null ? $"{this.drpMonth.SelectedValue}月" : string.Empty; + string fileName = System.Web.HttpUtility.UrlEncode($"{year}{month}安全危害因素清单" + Funs.GetNewFileName(), System.Text.Encoding.UTF8); + Response.AddHeader("content-disposition", "attachment; filename=" + fileName + ".xls"); Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; this.Grid1.PageSize = 10000; diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx.designer.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx.designer.cs index d737f6e..9701e7d 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetySummary.aspx.designer.cs @@ -95,6 +95,15 @@ namespace FineUIPro.Web.ReportManage.HazardFactor /// protected global::FineUIPro.RadioButtonList rbIllegality; + /// + /// rbDedupe 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rbDedupe; + /// /// ToolbarFill1 控件。 /// diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx index d9f9d89..61a2b01 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx @@ -68,7 +68,7 @@ - + @@ -108,7 +108,7 @@ - + diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx.cs index da255e2..bd803a1 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx.cs +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx.cs @@ -66,13 +66,13 @@ namespace FineUIPro.Web.ReportManage.HazardFactor this.txtBaseRiskSeverity.Text = model.BaseRiskSeverity.ToString(); this.txtBaseRiskProbability.Text = model.BaseRiskProbability.ToString(); this.txtBaseRiskScore.Text = model.BaseRiskScore.ToString(); - this.txtBaseRiskGrade.Text = model.BaseRiskGrade; + this.txtBaseRiskLevel.Text = model.BaseRiskLevel; this.rblBaseRiskAcceptabity.SelectedValue = model.BaseRiskAcceptabity ? "1" : "0"; this.txtNetRiskControlMeasures.Text = model.NetRiskControlMeasures; this.txtNetRiskSeverity.Text = model.NetRiskSeverity.ToString(); this.txtNetRiskProbability.Text = model.NetRiskProbability.ToString(); this.txtNetRiskScore.Text = model.NetRiskScore.ToString(); - this.txtNetRiskGrade.Text = model.NetRiskGrade; + this.txtNetRiskLevel.Text = model.NetRiskLevel; this.rblNetRiskAcceptabity.SelectedValue = model.NetRiskAcceptabity ? "1" : "0"; this.txtAdditionalControlMeasures.Text = model.AdditionalControlMeasures; this.txtResponsibleDepartment.Text = model.ResponsibleDepartment; diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx.designer.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx.designer.cs index 4b1f969..02809f8 100644 --- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyView.aspx.designer.cs @@ -168,13 +168,13 @@ namespace FineUIPro.Web.ReportManage.HazardFactor protected global::FineUIPro.NumberBox txtBaseRiskScore; /// - /// txtBaseRiskGrade 控件。 + /// txtBaseRiskLevel 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtBaseRiskGrade; + protected global::FineUIPro.TextBox txtBaseRiskLevel; /// /// rblBaseRiskAcceptabity 控件。 @@ -249,13 +249,13 @@ namespace FineUIPro.Web.ReportManage.HazardFactor protected global::FineUIPro.NumberBox txtNetRiskScore; /// - /// txtNetRiskGrade 控件。 + /// txtNetRiskLevel 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtNetRiskGrade; + protected global::FineUIPro.TextBox txtNetRiskLevel; /// /// rblNetRiskAcceptabity 控件。 diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 6cf568c..ec73162 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -168567,7 +168567,7 @@ namespace Model private int _BaseRiskScore; - private string _BaseRiskGrade; + private string _BaseRiskLevel; private bool _BaseRiskAcceptabity; @@ -168579,7 +168579,7 @@ namespace Model private int _NetRiskScore; - private string _NetRiskGrade; + private string _NetRiskLevel; private bool _NetRiskAcceptabity; @@ -168623,8 +168623,8 @@ namespace Model partial void OnBaseRiskProbabilityChanged(); partial void OnBaseRiskScoreChanging(int value); partial void OnBaseRiskScoreChanged(); - partial void OnBaseRiskGradeChanging(string value); - partial void OnBaseRiskGradeChanged(); + partial void OnBaseRiskLevelChanging(string value); + partial void OnBaseRiskLevelChanged(); partial void OnBaseRiskAcceptabityChanging(bool value); partial void OnBaseRiskAcceptabityChanged(); partial void OnNetRiskControlMeasuresChanging(string value); @@ -168635,8 +168635,8 @@ namespace Model partial void OnNetRiskProbabilityChanged(); partial void OnNetRiskScoreChanging(int value); partial void OnNetRiskScoreChanged(); - partial void OnNetRiskGradeChanging(string value); - partial void OnNetRiskGradeChanged(); + partial void OnNetRiskLevelChanging(string value); + partial void OnNetRiskLevelChanged(); partial void OnNetRiskAcceptabityChanging(bool value); partial void OnNetRiskAcceptabityChanged(); partial void OnAdditionalControlMeasuresChanging(string value); @@ -168772,7 +168772,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NChar(10) NOT NULL", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] public string ProjectId { get @@ -168792,7 +168792,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPlace", DbType="NChar(10) NOT NULL", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPlace", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] public string WorkPlace { get @@ -168812,7 +168812,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobStep", DbType="NChar(10) NOT NULL", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobStep", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] public string JobStep { get @@ -168832,7 +168832,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hazard", DbType="NChar(10) NOT NULL", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hazard", DbType="NVarChar(500) NOT NULL", CanBeNull=false)] public string Hazard { get @@ -168852,7 +168852,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Consequence", DbType="NChar(10)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Consequence", DbType="NVarChar(200)")] public string Consequence { get @@ -168952,22 +168952,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BaseRiskGrade", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] - public string BaseRiskGrade + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BaseRiskLevel", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string BaseRiskLevel { get { - return this._BaseRiskGrade; + return this._BaseRiskLevel; } set { - if ((this._BaseRiskGrade != value)) + if ((this._BaseRiskLevel != value)) { - this.OnBaseRiskGradeChanging(value); + this.OnBaseRiskLevelChanging(value); this.SendPropertyChanging(); - this._BaseRiskGrade = value; - this.SendPropertyChanged("BaseRiskGrade"); - this.OnBaseRiskGradeChanged(); + this._BaseRiskLevel = value; + this.SendPropertyChanged("BaseRiskLevel"); + this.OnBaseRiskLevelChanged(); } } } @@ -169072,22 +169072,22 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NetRiskGrade", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] - public string NetRiskGrade + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NetRiskLevel", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string NetRiskLevel { get { - return this._NetRiskGrade; + return this._NetRiskLevel; } set { - if ((this._NetRiskGrade != value)) + if ((this._NetRiskLevel != value)) { - this.OnNetRiskGradeChanging(value); + this.OnNetRiskLevelChanging(value); this.SendPropertyChanging(); - this._NetRiskGrade = value; - this.SendPropertyChanged("NetRiskGrade"); - this.OnNetRiskGradeChanged(); + this._NetRiskLevel = value; + this.SendPropertyChanged("NetRiskLevel"); + this.OnNetRiskLevelChanged(); } } }