diff --git a/DataBase/版本日志/SGGLDB_V2026-04-17-xiaj(职业健康危害因素).sql b/DataBase/版本日志/SGGLDB_V2026-04-17-xiaj(职业健康危害因素).sql
new file mode 100644
index 00000000..da1b5af6
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2026-04-17-xiaj(职业健康危害因素).sql
@@ -0,0 +1,92 @@
+
+
+--ְҵΣ嵥
+update Sys_Menu
+set Url='ReportManage/HazardFactor/HazardFactorOccHealth.aspx'
+where MenuId='78925136-1247-4E45-B538-8E91A332071A'
+go
+
+--ְҵΣ嵥˾
+update Sys_Menu
+set Url='ReportManage/HazardFactor/HazardFactorOccHealthSummary.aspx'
+where MenuId='2374589A-B2ED-41F0-AA3A-DC204703C1F0'
+go
+
+
+IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '78925136-1247-4E45-B538-8E91A332071A')
+BEGIN
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'B84FFBF4-F9DA-41F2-896D-E8B323A4C6CA', N'78925136-1247-4E45-B538-8E91A332071A', N'ɾ', '3');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'021D6DB1-6402-47E7-BF47-863041C418F4', N'78925136-1247-4E45-B538-8E91A332071A', N'', '1');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'4F6C30FC-725D-412E-B40C-B2FF71A2C1EE', N'78925136-1247-4E45-B538-8E91A332071A', N'', '4');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'3816FD2F-6C95-4F49-92FC-1F13325F4A38', N'78925136-1247-4E45-B538-8E91A332071A', N'', '2');
+END
+GO
+
+
+--ְҵΣ
+IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'HazardFactor_OccHealth') AND type = N'U')
+BEGIN
+CREATE TABLE [dbo].[HazardFactor_OccHealth](
+ [ID] [nvarchar](50) NOT NULL,
+ [Year] [nvarchar](10) NOT NULL,
+ [Month] [nvarchar](10) NOT NULL,
+ [CompileDate] [datetime] NOT NULL,
+ [CompileMan] [nvarchar](50) NOT NULL,
+ [CompileManName] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NOT NULL,
+ [WorkPlace] [nvarchar](200) NOT NULL,
+ [JobStep] [nvarchar](200) NOT NULL,
+ [Hazard] [nvarchar](500) NOT NULL,
+ [Consequence] [nvarchar](200) NULL,
+ [Illegality] [bit] NOT NULL,
+ [BaseRiskSeverity] [int] NOT NULL,
+ [BaseRiskProbability] [int] NOT NULL,
+ [BaseRiskScore] [int] 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,
+ [NetRiskLevel] [nvarchar](50) NOT NULL,
+ [NetRiskAcceptabity] [bit] NOT NULL,
+ [AdditionalControlMeasures] [nvarchar](500) NULL,
+ [ResponsibleDepartment] [nvarchar](50) NULL,
+ [State] [int] NOT NULL,
+ CONSTRAINT [PK_HazardFactor_OccHealth] PRIMARY KEY CLUSTERED
+(
+ [ID] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
+) ON [PRIMARY]
+ALTER TABLE [dbo].[HazardFactor_OccHealth] ADD CONSTRAINT [DF_HazardFactor_OccHealth_CompileDate] DEFAULT (getdate()) FOR [CompileDate]
+ALTER TABLE [dbo].[HazardFactor_OccHealth] ADD CONSTRAINT [DF_HazardFactor_OccHealth_State] DEFAULT ((0)) FOR [State]
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'ID'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'Year'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'·' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'Month'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'CompileDate'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'CompileMan'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'CompileManName'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'ProjectId'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'\\豸' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'WorkPlace'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵ/' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'JobStep'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Σ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'Hazard'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ҫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'Consequence'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Υ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @level2type=N'COLUMN',@level2name=N'Illegality'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HazardFactor_OccHealth', @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_OccHealth', @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_OccHealth', @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_OccHealth', @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_OccHealth', @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_OccHealth', @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_OccHealth', @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_OccHealth', @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_OccHealth', @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_OccHealth', @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_OccHealth', @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_OccHealth', @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_OccHealth', @level2type=N'COLUMN',@level2name=N'ResponsibleDepartment'
+END
+
+GO
+
+
diff --git a/SGGL/BLL/API/HSSE/APITestRecordService.cs b/SGGL/BLL/API/HSSE/APITestRecordService.cs
index 340733a1..20f9aa31 100644
--- a/SGGL/BLL/API/HSSE/APITestRecordService.cs
+++ b/SGGL/BLL/API/HSSE/APITestRecordService.cs
@@ -1,10 +1,11 @@
-using System;
+using EmitMapper;
+using EmitMapper.MappingConfiguration;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Text.RegularExpressions;
using System.Threading.Tasks;
-using EmitMapper;
-using EmitMapper.MappingConfiguration;
namespace BLL
{
@@ -503,7 +504,8 @@ namespace BLL
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
{
var getDataLists = (from x in db.Training_TestRecord
- join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
+ join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId into yGroup
+ from y in yGroup.DefaultIfEmpty()
where x.ProjectId == projectId && x.TestManId == personId && x.TestStartTime.HasValue
orderby x.TestStartTime descending
select new Model.TestRecordItem
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 72dc8966..4214a94c 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -847,6 +847,7 @@
+
True
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 8948abf8..f00d310b 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -27,7 +27,11 @@ namespace BLL
/// 安全危害因素数据导入模板
///
public const string HazardFactorSafetyDataInTemplateUrl = "File\\Excel\\DataIn\\安全危害因素数据导入模板.xlsx";
-
+ ///
+ /// 职业健康危害因素数据导入模板
+ ///
+ public const string HazardFactorOccHealthDataInTemplateUrl = "File\\Excel\\DataIn\\职业健康危害因素数据导入模板.xlsx";
+
#endregion
///
@@ -3374,6 +3378,10 @@ namespace BLL
/// 安全危害因素清单
///
public const string ProjectHazardFactorSafetyMenuId = "8ABE259F-1C04-4DB4-B774-C8A4BD82E403";
+ ///
+ /// 职业健康危害因素清单
+ ///
+ public const string ProjectHazardFactorOccHealthMenuId = "78925136-1247-4E45-B538-8E91A332071A";
#endregion
///
diff --git a/SGGL/BLL/ReportManage/HazardFactor/HazardFactorOccHealthService.cs b/SGGL/BLL/ReportManage/HazardFactor/HazardFactorOccHealthService.cs
new file mode 100644
index 00000000..1867d309
--- /dev/null
+++ b/SGGL/BLL/ReportManage/HazardFactor/HazardFactorOccHealthService.cs
@@ -0,0 +1,127 @@
+using Model;
+using System.Linq;
+
+namespace BLL
+{
+ ///
+ /// 职业健康危害因素
+ ///
+ public class HazardFactorOccHealthService
+ {
+ ///
+ /// 根据ID获取职业健康危害因素
+ ///
+ ///
+ ///
+ public static Model.HazardFactor_OccHealth GetHazardFactorOccHealthById(string Id)
+ {
+ return Funs.DB.HazardFactor_OccHealth.FirstOrDefault(e => e.ID == Id);
+ }
+
+ ///
+ /// 增加职业健康危害因素
+ ///
+ /// 职业健康危害因素实体
+ public static void AddHazardFactorOccHealth(Model.HazardFactor_OccHealth model)
+ {
+ Model.HazardFactor_OccHealth newModel = new Model.HazardFactor_OccHealth
+ {
+ ID = model.ID,
+ ProjectId = model.ProjectId,
+ Year = model.Year,
+ Month = model.Month,
+ State = model.State,
+ CompileDate = model.CompileDate,
+ CompileMan = model.CompileMan,
+ CompileManName = model.CompileManName,
+ };
+ newModel.WorkPlace = model.WorkPlace;
+ newModel.JobStep = model.JobStep;
+ newModel.Hazard = model.Hazard;
+ newModel.Consequence = model.Consequence;
+ newModel.Illegality = model.Illegality;
+ newModel.BaseRiskSeverity = model.BaseRiskSeverity;
+ newModel.BaseRiskProbability = model.BaseRiskProbability;
+ newModel.BaseRiskScore = model.BaseRiskScore;
+ 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.NetRiskLevel = model.NetRiskLevel;
+ newModel.NetRiskAcceptabity = model.NetRiskAcceptabity;
+ newModel.AdditionalControlMeasures = model.AdditionalControlMeasures;
+ newModel.ResponsibleDepartment = model.ResponsibleDepartment;
+ Funs.DB.HazardFactor_OccHealth.InsertOnSubmit(newModel);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 修改职业健康危害因素
+ ///
+ /// 职业健康危害因素实体
+ public static void UpdateHazardFactorOccHealth(Model.HazardFactor_OccHealth model)
+ {
+ Model.HazardFactor_OccHealth newModel = Funs.DB.HazardFactor_OccHealth.FirstOrDefault(e => e.ID == model.ID);
+ if (newModel != null)
+ {
+ newModel.State = model.State;
+ newModel.CompileDate = model.CompileDate;
+ newModel.CompileMan = model.CompileMan;
+ newModel.CompileManName = model.CompileManName;
+ newModel.WorkPlace = model.WorkPlace;
+ newModel.JobStep = model.JobStep;
+ newModel.Hazard = model.Hazard;
+ newModel.Consequence = model.Consequence;
+ newModel.Illegality = model.Illegality;
+ newModel.BaseRiskSeverity = model.BaseRiskSeverity;
+ newModel.BaseRiskProbability = model.BaseRiskProbability;
+ newModel.BaseRiskScore = model.BaseRiskScore;
+ 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.NetRiskLevel = model.NetRiskLevel;
+ newModel.NetRiskAcceptabity = model.NetRiskAcceptabity;
+ newModel.AdditionalControlMeasures = model.AdditionalControlMeasures;
+ newModel.ResponsibleDepartment = model.ResponsibleDepartment;
+
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据ID删除职业健康危害因素
+ ///
+ ///
+ ///
+ public static void DeleteHazardFactorOccHealthById(string HazardID, Sys_User opUser)
+ {
+ var db = Funs.DB;
+ Model.HazardFactor_OccHealth model = db.HazardFactor_OccHealth.FirstOrDefault(x => x.ID == HazardID);
+ if (model != null)
+ {
+ db.HazardFactor_OccHealth.DeleteOnSubmit(model);
+ db.SubmitChanges();
+
+ BLL.LogService.AddSys_Log(opUser, model.ID, model.ID, BLL.Const.ProjectHazardFactorOccHealthMenuId, BLL.Const.BtnDelete);
+ }
+ }
+
+ ///
+ /// 根据报表项目,填报年月判断是否存在
+ ///
+ /// 项目Id
+ /// year
+ /// month
+ ///
+ public static Model.HazardFactor_OccHealth GetHazardFactorOccHealthByProjectIdAndDate(string projectId, string year, string month)
+ {
+ return Funs.DB.HazardFactor_OccHealth.FirstOrDefault(e => e.ProjectId == projectId && e.Year == year && e.Month == month);
+ }
+
+ }
+}
diff --git a/SGGL/BLL/ReportManage/HazardFactor/HazardFactorSafetyService.cs b/SGGL/BLL/ReportManage/HazardFactor/HazardFactorSafetyService.cs
index 30bb4cb5..fdaefb33 100644
--- a/SGGL/BLL/ReportManage/HazardFactor/HazardFactorSafetyService.cs
+++ b/SGGL/BLL/ReportManage/HazardFactor/HazardFactorSafetyService.cs
@@ -1,10 +1,5 @@
-using Microsoft.Office.Interop.Word;
-using Model;
-using System;
-using System.Collections.Generic;
-using System.Data.SqlClient;
+using Model;
using System.Linq;
-using System.Text;
namespace BLL
{
diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/职业健康危害因素数据导入模板.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/职业健康危害因素数据导入模板.xlsx
new file mode 100644
index 00000000..d605bb43
Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/职业健康危害因素数据导入模板.xlsx differ
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index b10999d1..eab72340 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -2555,9 +2555,14 @@
+
+
+
+
+
@@ -17298,6 +17303,27 @@
ProjectPageDataSave.aspx
+
+ HazardFactorOccHealth.aspx
+ ASPXCodeBehind
+
+
+ HazardFactorOccHealth.aspx
+
+
+ HazardFactorOccHealthEdit.aspx
+ ASPXCodeBehind
+
+
+ HazardFactorOccHealthEdit.aspx
+
+
+ HazardFactorOccHealthIn.aspx
+ ASPXCodeBehind
+
+
+ HazardFactorOccHealthIn.aspx
+
HazardFactorSafetyIn.aspx
ASPXCodeBehind
@@ -17305,6 +17331,13 @@
HazardFactorSafetyIn.aspx
+
+ HazardFactorOccHealthSummary.aspx
+ ASPXCodeBehind
+
+
+ HazardFactorOccHealthSummary.aspx
+
HazardFactorSafetySummary.aspx
ASPXCodeBehind
@@ -17319,6 +17352,13 @@
HazardFactorSafety.aspx
+
+ HazardFactorOccHealthView.aspx
+ ASPXCodeBehind
+
+
+ HazardFactorOccHealthView.aspx
+
HazardFactorSafetyView.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealth.aspx b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealth.aspx
new file mode 100644
index 00000000..ee3a1725
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealth.aspx
@@ -0,0 +1,179 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HazardFactorOccHealth.aspx.cs" Inherits="FineUIPro.Web.ReportManage.HazardFactor.HazardFactorOccHealth" %>
+
+
+
+
+
+
+ 职业健康危害因素清单
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealth.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealth.aspx.cs
new file mode 100644
index 00000000..7e190727
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealth.aspx.cs
@@ -0,0 +1,323 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Text;
+
+namespace FineUIPro.Web.ReportManage.HazardFactor
+{
+ public partial class HazardFactorOccHealth : PageBase
+ {
+ ///
+ /// 项目id
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, true);
+ BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, true);
+ BLL.RiskLevelService.InitRiskLevelDropDownListByRiskLevelName(this.drpBaseRiskLevel, true);
+ BLL.RiskLevelService.InitRiskLevelDropDownListByRiskLevelName(this.drpNetRiskLevel, true);
+ Funs.DropDownPageSize(this.ddlPageSize);
+ this.ProjectId = this.CurrUser.LoginProjectId;
+ if (!string.IsNullOrWhiteSpace(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
+ {
+ this.ProjectId = Request.Params["projectId"];
+ }
+ ////权限按钮方法
+ this.GetButtonPower();
+ btnNew.OnClientClick = Window1.GetShowReference("HazardFactorOccHealthEdit.aspx") + "return false;";
+ ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+ // 绑定表格
+ BindGrid();
+ }
+ }
+
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("SELECT tba.* ");
+ sb.Append("FROM HazardFactor_OccHealth AS tba WITH(NOLOCK) ");
+ sb.Append("WHERE 1=1 AND tba.ProjectId = @ProjectId ");
+ List listStr = new List();
+ listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
+ if (!string.IsNullOrWhiteSpace(this.drpYear.SelectedValue) && this.drpYear.SelectedValue != Const._Null)
+ {
+ sb.Append("AND tba.Year = @Year ");
+ listStr.Add(new SqlParameter("@Year", this.drpYear.SelectedValue));
+ }
+ if (!string.IsNullOrWhiteSpace(this.drpMonth.SelectedValue) && this.drpMonth.SelectedValue != Const._Null)
+ {
+ string month = this.drpMonth.SelectedValue;
+ sb.Append("AND tba.Month = @Month ");
+ listStr.Add(new SqlParameter("@Month", month.Length == 1 ? $"0{month}" : month));
+ }
+ if (!string.IsNullOrWhiteSpace(this.drpBaseRiskLevel.SelectedValue) && this.drpBaseRiskLevel.SelectedValue != Const._Null)
+ {
+ sb.Append("AND tba.BaseRiskLevel = @BaseRiskLevel ");
+ listStr.Add(new SqlParameter("@BaseRiskLevel", this.drpBaseRiskLevel.SelectedValue));
+ }
+ if (!string.IsNullOrWhiteSpace(this.drpNetRiskLevel.SelectedValue) && this.drpNetRiskLevel.SelectedValue != Const._Null)
+ {
+ sb.Append("AND tba.NetRiskLevel = @NetRiskLevel ");
+ listStr.Add(new SqlParameter("@NetRiskLevel", this.drpNetRiskLevel.SelectedValue));
+ }
+ if (!string.IsNullOrWhiteSpace(this.rbState.SelectedValue))
+ {
+ sb.Append("AND tba.State = @State ");
+ listStr.Add(new SqlParameter("@State", this.rbState.SelectedValue));
+ }
+ if (!string.IsNullOrWhiteSpace(this.rbIllegality.SelectedValue))
+ {
+ sb.Append("AND tba.Illegality = @Illegality ");
+ listStr.Add(new SqlParameter("@Illegality", this.rbIllegality.SelectedValue == "1" ? true : false));
+ }
+
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(sb.ToString(), parameter);
+
+ Grid1.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+ #endregion
+
+ #region 查询
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void TextBox_TextChanged(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ }
+ #endregion
+
+ #region 表排序、分页、关闭窗口
+ ///
+ /// 分页
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ Grid1.PageIndex = e.NewPageIndex;
+ BindGrid();
+ }
+
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ BindGrid();
+ }
+
+ ///
+ /// 分页显示条数下拉框
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ ///
+ /// 关闭弹出窗
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region Grid双击事件
+ ///
+ /// Grid行双击事件
+ ///
+ ///
+ ///
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ btnMenuModify_Click(null, null);
+ }
+ #endregion
+
+ #region 编辑
+ ///
+ /// 编辑按钮
+ ///
+ ///
+ ///
+ protected void btnMenuModify_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string HazardID = Grid1.SelectedRowID.Split(',')[0];
+ var model = Funs.DB.HazardFactor_OccHealth.FirstOrDefault(x => x.ID == HazardID);
+ if (model != null)
+ {
+ if (this.btnMenuModify.Hidden || model.State.ToString() == BLL.Const.State_1) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HazardFactorOccHealthView.aspx?HazardID={0}", HazardID, "查看 - ")));
+ }
+ else
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HazardFactorOccHealthEdit.aspx?HazardID={0}", HazardID, "编辑 - ")));
+ }
+ }
+ }
+ #endregion
+
+ #region 删除
+ ///
+ /// 批量删除
+ ///
+ ///
+ ///
+ protected void btnMenuDel_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ var db = Funs.DB;
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ HazardFactorOccHealthService.DeleteHazardFactorOccHealthById(rowID, this.CurrUser);
+ }
+ BindGrid();
+ ShowNotify("删除数据成功!");
+ }
+ }
+ #endregion
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ try
+ {
+ if (Request.Params["value"] == "0")
+ {
+ return;
+ }
+ var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectHazardFactorOccHealthMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ this.btnNew.Hidden = false;
+ this.btnImport.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnMenuModify.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnMenuDel.Hidden = false;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+
+ }
+ }
+ #endregion
+
+ ///
+ /// 导入按钮
+ ///
+ ///
+ ///
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HazardFactorOccHealthIn.aspx?ProjectId={0}", this.ProjectId, "导入 - ")));
+ }
+
+ #region 导出按钮
+
+ ///
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ 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;
+ this.BindGrid();
+ Response.Write(GetGridMultiHeaderTableHtml(Grid1));
+ //Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+
+ #endregion
+
+
+
+ ///
+ /// 格式化数据
+ ///
+ ///
+ ///
+ protected string ConvertDataState(object data)
+ {
+ string result = string.Empty;
+ string dataStr = data.ToString();
+ if (data != null)
+ {
+ result = dataStr == "1" ? "已提交" : "未提交";
+ }
+ return result;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealth.aspx.designer.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealth.aspx.designer.cs
new file mode 100644
index 00000000..4ed0ff59
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealth.aspx.designer.cs
@@ -0,0 +1,233 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ReportManage.HazardFactor
+{
+
+
+ public partial class HazardFactorOccHealth
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// drpYear 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpYear;
+
+ ///
+ /// drpMonth 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpMonth;
+
+ ///
+ /// drpBaseRiskLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpBaseRiskLevel;
+
+ ///
+ /// drpNetRiskLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpNetRiskLevel;
+
+ ///
+ /// rbState 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rbState;
+
+ ///
+ /// rbIllegality 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rbIllegality;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// lblNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumber;
+
+ ///
+ /// lbState 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lbState;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuModify 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuModify;
+
+ ///
+ /// btnMenuDel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDel;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthEdit.aspx b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthEdit.aspx
new file mode 100644
index 00000000..58da84f8
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthEdit.aspx
@@ -0,0 +1,167 @@
+<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="HazardFactorOccHealthEdit.aspx.cs" Inherits="FineUIPro.Web.ReportManage.HazardFactor.HazardFactorOccHealthEdit" %>
+
+<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %>
+
+
+
+
+ 职业健康危害因素
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthEdit.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthEdit.aspx.cs
new file mode 100644
index 00000000..2cbcc1a5
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthEdit.aspx.cs
@@ -0,0 +1,279 @@
+using BLL;
+using Model;
+using System;
+using System.Linq;
+
+namespace FineUIPro.Web.ReportManage.HazardFactor
+{
+ public partial class HazardFactorOccHealthEdit : PageBase
+ {
+ #region 定义变量
+ ///
+ /// 主键
+ ///
+ public string HazardID
+ {
+ get
+ {
+ return (string)ViewState["HazardID"];
+ }
+ set
+ {
+ ViewState["HazardID"] = value;
+ }
+ }
+ ///
+ /// 项目主键
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ #endregion
+
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.ProjectId = this.CurrUser.LoginProjectId;
+ this.HazardID = Request.Params["HazardID"];
+ if (!string.IsNullOrEmpty(HazardID))
+ {
+ var model = HazardFactorOccHealthService.GetHazardFactorOccHealthById(HazardID);
+ if (model != null)
+ {
+ this.btnSave.Hidden = true;
+ this.btnSubmit.Hidden = true;
+ if (model.State == int.Parse(BLL.Const.State_1))
+ {
+ this.btnSave.Hidden = false;
+ this.btnSubmit.Hidden = false;
+ }
+ else if (model.CompileMan == this.CurrUser.UserId || this.CurrUser.UserId == BLL.Const.sysglyId || this.CurrUser.UserId == BLL.Const.hfnbdId)
+ {
+ this.btnSave.Hidden = false;
+ this.btnSubmit.Hidden = false;
+ }
+
+ this.drpYearMonth.SelectedDate = Convert.ToDateTime($"{model.Year}-{model.Month}");
+ this.txtCompileDate.Text = model.CompileDate.ToShortDateString();
+ this.txtCompileManName.Text = model.CompileManName;
+
+ this.txtWorkPlace.Text = model.WorkPlace;
+ this.txtJobStep.Text = model.JobStep;
+ this.txtHazard.Text = model.Hazard;
+ this.txtConsequence.Text = model.Consequence;
+ this.rblIllegality.SelectedValue = model.Illegality ? "1" : "0";
+ this.txtBaseRiskSeverity.Text = model.BaseRiskSeverity.ToString();
+ this.txtBaseRiskProbability.Text = model.BaseRiskProbability.ToString();
+ this.txtBaseRiskScore.Text = model.BaseRiskScore.ToString();
+ 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.txtNetRiskLevel.Text = model.NetRiskLevel;
+ this.rblNetRiskAcceptabity.SelectedValue = model.NetRiskAcceptabity ? "1" : "0";
+ this.txtAdditionalControlMeasures.Text = model.AdditionalControlMeasures;
+ this.txtResponsibleDepartment.Text = model.ResponsibleDepartment;
+ }
+ }
+ else
+ {
+ this.drpYearMonth.SelectedDate = DateTime.Now;
+ this.txtCompileDate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
+ this.txtCompileManName.Text = this.CurrUser.UserName;
+ }
+ }
+ }
+ #endregion
+
+ #region 提交按钮
+ ///
+ /// 提交按钮
+ ///
+ ///
+ ///
+ protected void btnSubmit_Click(object sender, EventArgs e)
+ {
+ this.SaveData(BLL.Const.BtnSubmit);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ #endregion
+
+ #region 保存按钮
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ this.SaveData(BLL.Const.BtnSave);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+
+ }
+ #endregion
+
+ #region 保存方法
+ ///
+ /// 保存数据
+ ///
+ ///
+ private void SaveData(string type)
+ {
+ Model.HazardFactor_OccHealth model = new Model.HazardFactor_OccHealth();
+ model.State = type == BLL.Const.BtnSubmit ? int.Parse(BLL.Const.State_1) : int.Parse(BLL.Const.State_0);
+
+ var yearMonth = this.drpYearMonth.Text;
+ var yearMonth2 = this.drpYearMonth.SelectedDate;
+ model.Year = yearMonth.Split('-')[0];
+ model.Month = yearMonth.Split('-')[1];
+ model.ProjectId = this.ProjectId;
+ model.WorkPlace = this.txtWorkPlace.Text.Trim();
+ model.JobStep = this.txtJobStep.Text.Trim();
+ model.Hazard = this.txtHazard.Text.Trim();
+ model.Consequence = this.txtConsequence.Text.Trim();
+ model.Illegality = this.rblIllegality.SelectedValue == "1";
+ 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.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.NetRiskLevel = this.txtNetRiskLevel.Text.Trim();
+ model.NetRiskAcceptabity = this.rblNetRiskAcceptabity.SelectedValue == "1";
+ model.AdditionalControlMeasures = this.txtAdditionalControlMeasures.Text.Trim();
+ model.ResponsibleDepartment = this.txtResponsibleDepartment.Text.Trim();
+ model.CompileDate = DateTime.Now;
+ model.CompileManName = this.CurrUser.UserName;
+ model.CompileMan = this.CurrUser.UserId;
+
+ if (string.IsNullOrEmpty(HazardID))
+ {
+ model.ID = SQLHelper.GetNewID(typeof(Model.HazardFactor_OccHealth));
+ this.HazardID = model.ID;
+ BLL.HazardFactorOccHealthService.AddHazardFactorOccHealth(model);
+ BLL.LogService.AddSys_Log(this.CurrUser, $"{model.Year}-{model.Month}", model.ID, BLL.Const.ProjectHazardFactorOccHealthMenuId, BLL.Const.BtnAdd);
+
+ // HazardFactor_OccHealth old = HazardFactorOccHealthService.GetHazardFactorOccHealthByProjectIdAndDate(this.ProjectId, model.Year, model.Month);
+ // if (old == null)
+ // {
+ //}
+ // else
+ // {
+ // ShowNotify($"{model.Year}-{model.Month}填报记录已存在!", MessageBoxIcon.Warning);
+ // return;
+ // }
+ }
+ else
+ {
+ model.ID = HazardID;
+ BLL.HazardFactorOccHealthService.UpdateHazardFactorOccHealth(model);
+ BLL.LogService.AddSys_Log(this.CurrUser, $"{model.Year}-{model.Month}", model.ID, BLL.Const.ProjectHazardFactorOccHealthMenuId, BLL.Const.BtnModify);
+ }
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+ }
+
+
+ #endregion
+
+
+ ///
+ /// 固有风险评价
+ ///
+ ///
+ ///
+ protected void BaseRisk_OnTextChanged(object sender, EventArgs e)
+ {
+ //decimal num1 = 0, num2 = 0;
+ //if (!string.IsNullOrEmpty(this.txtBaseRiskSeverity.Text.Trim()))
+ //{
+ // num1 = Convert.ToDecimal(this.txtBaseRiskSeverity.Text.Trim());
+ //}
+ //if (!string.IsNullOrEmpty(this.txtBaseRiskProbability.Text.Trim()))
+ //{
+ // num2 = Convert.ToDecimal(this.txtBaseRiskProbability.Text.Trim());
+ //}
+ //if (num1 > 0 && num2 > 0)
+ //{
+ // var score = num1 * num2;
+ // this.txtBaseRiskScore.Text = score.ToString();
+ //}
+ int num1 = 0, num2 = 0;
+ if (!string.IsNullOrEmpty(this.txtBaseRiskSeverity.Text.Trim()))
+ {
+ num1 = int.Parse(this.txtBaseRiskSeverity.Text.Trim());
+ }
+ if (!string.IsNullOrEmpty(this.txtBaseRiskProbability.Text.Trim()))
+ {
+ num2 = int.Parse(this.txtBaseRiskProbability.Text.Trim());
+ }
+ var score = num1 * num2;
+ this.txtBaseRiskScore.Text = score.ToString();
+ var riskLevel = RiskLevelService.GetRiskLevelByValue(score);
+ if (riskLevel != null)
+ {
+ this.txtBaseRiskLevel.Text = riskLevel.RiskLevelName;
+ }
+ }
+
+ ///
+ /// 残留风险评价
+ ///
+ ///
+ ///
+ protected void NetRisk_OnTextChanged(object sender, EventArgs e)
+ {
+ //decimal num1 = 0, num2 = 0;
+ //if (!string.IsNullOrEmpty(this.txtNetRiskSeverity.Text.Trim()))
+ //{
+ // num1 = Convert.ToDecimal(this.txtNetRiskSeverity.Text.Trim());
+ //}
+ //if (!string.IsNullOrEmpty(this.txtNetRiskProbability.Text.Trim()))
+ //{
+ // num2 = Convert.ToDecimal(this.txtNetRiskProbability.Text.Trim());
+ //}
+ //if (num1 > 0 && num2 > 0)
+ //{
+ // var score = num1 * num2;
+ // this.txtNetRiskScore.Text = score.ToString();
+ //}
+ int num1 = 0, num2 = 0;
+ if (!string.IsNullOrEmpty(this.txtNetRiskSeverity.Text.Trim()))
+ {
+ num1 = int.Parse(this.txtNetRiskSeverity.Text.Trim());
+ }
+ if (!string.IsNullOrEmpty(this.txtNetRiskProbability.Text.Trim()))
+ {
+ num2 = int.Parse(this.txtNetRiskProbability.Text.Trim());
+ }
+ var score = num1 * num2;
+ this.txtNetRiskScore.Text = score.ToString();
+ var riskLevel = RiskLevelService.GetRiskLevelByValue(score);
+ if (riskLevel != null)
+ {
+ this.txtNetRiskLevel.Text = riskLevel.RiskLevelName;
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthEdit.aspx.designer.cs
new file mode 100644
index 00000000..6d44ee01
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthEdit.aspx.designer.cs
@@ -0,0 +1,341 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ReportManage.HazardFactor
+{
+
+
+ public partial class HazardFactorOccHealthEdit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// drpYearMonth 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker drpYearMonth;
+
+ ///
+ /// txtCompileDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtCompileDate;
+
+ ///
+ /// txtCompileManName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtCompileManName;
+
+ ///
+ /// txtWorkPlace 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtWorkPlace;
+
+ ///
+ /// txtJobStep 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtJobStep;
+
+ ///
+ /// txtHazard 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtHazard;
+
+ ///
+ /// txtConsequence 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtConsequence;
+
+ ///
+ /// rblIllegality 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblIllegality;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// GroupPanel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel1;
+
+ ///
+ /// Form2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form2;
+
+ ///
+ /// txtBaseRiskSeverity 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtBaseRiskSeverity;
+
+ ///
+ /// txtBaseRiskProbability 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtBaseRiskProbability;
+
+ ///
+ /// txtBaseRiskScore 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtBaseRiskScore;
+
+ ///
+ /// txtBaseRiskLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtBaseRiskLevel;
+
+ ///
+ /// rblBaseRiskAcceptabity 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblBaseRiskAcceptabity;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label1;
+
+ ///
+ /// GroupPanel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel2;
+
+ ///
+ /// Form4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form4;
+
+ ///
+ /// txtNetRiskControlMeasures 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtNetRiskControlMeasures;
+
+ ///
+ /// txtNetRiskSeverity 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtNetRiskSeverity;
+
+ ///
+ /// txtNetRiskProbability 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtNetRiskProbability;
+
+ ///
+ /// txtNetRiskScore 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtNetRiskScore;
+
+ ///
+ /// txtNetRiskLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtNetRiskLevel;
+
+ ///
+ /// rblNetRiskAcceptabity 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblNetRiskAcceptabity;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label2;
+
+ ///
+ /// txtAdditionalControlMeasures 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtAdditionalControlMeasures;
+
+ ///
+ /// txtResponsibleDepartment 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtResponsibleDepartment;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// lbTemp 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbTemp;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnSubmit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSubmit;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthIn.aspx b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthIn.aspx
new file mode 100644
index 00000000..dbdbc346
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthIn.aspx
@@ -0,0 +1,73 @@
+<%@ Page Language="C#" CodeBehind="HazardFactorOccHealthIn.aspx.cs" Inherits="FineUIPro.Web.ReportManage.HazardFactor.HazardFactorOccHealthIn" %>
+
+
+
+
+
+
+
+ 导入
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthIn.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthIn.aspx.cs
new file mode 100644
index 00000000..d8855e8e
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthIn.aspx.cs
@@ -0,0 +1,571 @@
+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 HazardFactorOccHealthIn : 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.HazardFactorOccHealthDataInTemplateUrl;
+ string filePath = Const.HazardFactorOccHealthDataInTemplateUrl;
+ 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_OccHealth 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(); // 责任部门
+
+ rData17 = rData17 == "无" ? string.Empty : rData17;
+
+ 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_OccHealth
+ {
+ ID = SQLHelper.GetNewID(typeof(Model.HazardFactor_OccHealth)),
+ 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_OccHealth.InsertAllOnSubmit(toInsert);
+ Funs.DB.SubmitChanges();
+ }
+ ShowNotify($"成功导入 {toInsert.Count} 条记录。", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ return true;
+ }
+ catch (Exception ex)
+ {
+ ErrLogInfo.WriteLog("导入 职业健康危害因素清单(HazardFactor_OccHealth) 失败", ex);
+ ShowNotify("导入失败:" + ex.Message, MessageBoxIcon.Error);
+ return false;
+ }
+ }
+
+ #endregion // 导入
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthIn.aspx.designer.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthIn.aspx.designer.cs
new file mode 100644
index 00000000..3d598984
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthIn.aspx.designer.cs
@@ -0,0 +1,125 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ReportManage.HazardFactor
+{
+
+
+ public partial class HazardFactorOccHealthIn
+ {
+
+ ///
+ /// 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/HazardFactorOccHealthSummary.aspx b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthSummary.aspx
new file mode 100644
index 00000000..858945c7
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthSummary.aspx
@@ -0,0 +1,186 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HazardFactorOccHealthSummary.aspx.cs" Inherits="FineUIPro.Web.ReportManage.HazardFactor.HazardFactorOccHealthSummary" %>
+
+
+
+
+
+
+ 职业健康危害因素清单
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthSummary.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthSummary.aspx.cs
new file mode 100644
index 00000000..e058f859
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthSummary.aspx.cs
@@ -0,0 +1,317 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Text;
+
+namespace FineUIPro.Web.ReportManage.HazardFactor
+{
+ public partial class HazardFactorOccHealthSummary : PageBase
+ {
+ ///
+ /// 项目id
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
+ BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, true);
+ BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, true);
+ BLL.RiskLevelService.InitRiskLevelDropDownListByRiskLevelName(this.drpBaseRiskLevel, true);
+ BLL.RiskLevelService.InitRiskLevelDropDownListByRiskLevelName(this.drpNetRiskLevel, true);
+ Funs.DropDownPageSize(this.ddlPageSize);
+ ////权限按钮方法
+ this.GetButtonPower();
+ ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+ // 绑定表格
+ BindGrid();
+ }
+ }
+
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ StringBuilder sb = new StringBuilder();
+ List listStr = new List();
+
+ 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_OccHealth 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 ");//取已提交数据
+ if (!string.IsNullOrWhiteSpace(this.drpProject.SelectedValue) && this.drpProject.SelectedValue != Const._Null)
+ {
+ sb.Append("AND tba.ProjectId = @ProjectId ");
+ listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
+ }
+ if (!string.IsNullOrWhiteSpace(this.drpYear.SelectedValue) && this.drpYear.SelectedValue != Const._Null)
+ {
+ sb.Append("AND tba.Year = @Year ");
+ listStr.Add(new SqlParameter("@Year", this.drpYear.SelectedValue));
+ }
+ if (!string.IsNullOrWhiteSpace(this.drpMonth.SelectedValue) && this.drpMonth.SelectedValue != Const._Null)
+ {
+ string month = this.drpMonth.SelectedValue;
+ sb.Append("AND tba.Month = @Month ");
+ listStr.Add(new SqlParameter("@Month", month.Length == 1 ? $"0{month}" : month));
+ }
+ if (!string.IsNullOrWhiteSpace(this.drpBaseRiskLevel.SelectedValue) && this.drpBaseRiskLevel.SelectedValue != Const._Null)
+ {
+ sb.Append("AND tba.BaseRiskLevel = @BaseRiskLevel ");
+ listStr.Add(new SqlParameter("@BaseRiskLevel", this.drpBaseRiskLevel.SelectedValue));
+ }
+ if (!string.IsNullOrWhiteSpace(this.drpNetRiskLevel.SelectedValue) && this.drpNetRiskLevel.SelectedValue != Const._Null)
+ {
+ sb.Append("AND tba.NetRiskLevel = @NetRiskLevel ");
+ listStr.Add(new SqlParameter("@NetRiskLevel", this.drpNetRiskLevel.SelectedValue));
+ }
+ //if (!string.IsNullOrEmpty(this.rbState.SelectedValue))
+ //{
+ // sb.Append("AND tba.State = @State ");
+ // listStr.Add(new SqlParameter("@State", this.rbState.SelectedValue));
+ //}
+ if (!string.IsNullOrEmpty(this.rbIllegality.SelectedValue))
+ {
+ sb.Append("AND tba.Illegality = @Illegality ");
+ 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(sqlStr, parameter);
+
+ Grid1.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+ #endregion
+
+ #region 查询
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void TextBox_TextChanged(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ }
+ #endregion
+
+ #region 表排序、分页、关闭窗口
+ ///
+ /// 分页
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ Grid1.PageIndex = e.NewPageIndex;
+ BindGrid();
+ }
+
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ BindGrid();
+ }
+
+ ///
+ /// 分页显示条数下拉框
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ ///
+ /// 关闭弹出窗
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region Grid双击事件
+ ///
+ /// Grid行双击事件
+ ///
+ ///
+ ///
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ btnMenuView_Click(null, null);
+ }
+ #endregion
+
+ #region 查看
+ ///
+ /// 查看按钮
+ ///
+ ///
+ ///
+ protected void btnMenuView_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string HazardID = Grid1.SelectedRowID.Split(',')[0];
+ var model = Funs.DB.HazardFactor_OccHealth.FirstOrDefault(x => x.ID == HazardID);
+ if (model != null)
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HazardFactorOccHealthView.aspx?HazardID={0}", HazardID, "查看 - ")));
+ }
+ }
+ #endregion
+ #region 删除
+ ///
+ /// 批量删除
+ ///
+ ///
+ ///
+ protected void btnMenuDel_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ var db = Funs.DB;
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ HazardFactorOccHealthService.DeleteHazardFactorOccHealthById(rowID, this.CurrUser);
+ }
+ BindGrid();
+ ShowNotify("删除数据成功!");
+ }
+ }
+ #endregion
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ try
+ {
+ if (Request.Params["value"] == "0")
+ {
+ return;
+ }
+ this.btnMenuView.Hidden = false;
+ if (this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId)
+ {
+ this.btnMenuDel.Hidden = false;
+ }
+ }
+ catch (Exception e)
+ {
+
+ }
+ }
+ #endregion
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ 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;
+ this.BindGrid();
+ Response.Write(GetGridMultiHeaderTableHtml(Grid1));
+ //Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+
+ #endregion
+
+
+
+ ///
+ /// 格式化数据
+ ///
+ ///
+ ///
+ protected string ConvertDataState(object data)
+ {
+ string result = string.Empty;
+ string dataStr = data.ToString();
+ if (data != null)
+ {
+ result = dataStr == "1" ? "已提交" : "未提交";
+ }
+ return result;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthSummary.aspx.designer.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthSummary.aspx.designer.cs
new file mode 100644
index 00000000..ff4ce9c6
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthSummary.aspx.designer.cs
@@ -0,0 +1,224 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ReportManage.HazardFactor
+{
+
+
+ public partial class HazardFactorOccHealthSummary
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// drpYear 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpYear;
+
+ ///
+ /// drpMonth 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpMonth;
+
+ ///
+ /// drpProject 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpProject;
+
+ ///
+ /// drpBaseRiskLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpBaseRiskLevel;
+
+ ///
+ /// drpNetRiskLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpNetRiskLevel;
+
+ ///
+ /// rbIllegality 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rbIllegality;
+
+ ///
+ /// rbDedupe 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rbDedupe;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// lblNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumber;
+
+ ///
+ /// lbState 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lbState;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuView 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuView;
+
+ ///
+ /// btnMenuDel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDel;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthView.aspx b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthView.aspx
new file mode 100644
index 00000000..a22a4948
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthView.aspx
@@ -0,0 +1,148 @@
+<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="HazardFactorOccHealthView.aspx.cs" Inherits="FineUIPro.Web.ReportManage.HazardFactor.HazardFactorOccHealthView" %>
+
+<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %>
+
+
+
+
+ 职业健康危害因素
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthView.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthView.aspx.cs
new file mode 100644
index 00000000..b3dbf608
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthView.aspx.cs
@@ -0,0 +1,86 @@
+using BLL;
+using System;
+
+namespace FineUIPro.Web.ReportManage.HazardFactor
+{
+ public partial class HazardFactorOccHealthView : PageBase
+ {
+ #region 定义变量
+ ///
+ /// 主键
+ ///
+ public string HazardID
+ {
+ get
+ {
+ return (string)ViewState["HazardID"];
+ }
+ set
+ {
+ ViewState["HazardID"] = value;
+ }
+ }
+ ///
+ /// 项目主键
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.ProjectId = this.CurrUser.LoginProjectId;
+ this.HazardID = Request.Params["HazardID"];
+ if (!string.IsNullOrEmpty(HazardID))
+ {
+ var model = HazardFactorOccHealthService.GetHazardFactorOccHealthById(HazardID);
+ if (model != null)
+ {
+
+ this.drpYearMonth.SelectedDate = Convert.ToDateTime($"{model.Year}-{model.Month}");
+ this.txtCompileDate.Text = model.CompileDate.ToShortDateString();
+ this.txtCompileManName.Text = model.CompileManName;
+
+ this.txtWorkPlace.Text = model.WorkPlace;
+ this.txtJobStep.Text = model.JobStep;
+ this.txtHazard.Text = model.Hazard;
+ this.txtConsequence.Text = model.Consequence;
+ this.rblIllegality.SelectedValue = model.Illegality ? "1" : "0";
+ this.txtBaseRiskSeverity.Text = model.BaseRiskSeverity.ToString();
+ this.txtBaseRiskProbability.Text = model.BaseRiskProbability.ToString();
+ this.txtBaseRiskScore.Text = model.BaseRiskScore.ToString();
+ 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.txtNetRiskLevel.Text = model.NetRiskLevel;
+ this.rblNetRiskAcceptabity.SelectedValue = model.NetRiskAcceptabity ? "1" : "0";
+ this.txtAdditionalControlMeasures.Text = model.AdditionalControlMeasures;
+ this.txtResponsibleDepartment.Text = model.ResponsibleDepartment;
+ }
+ }
+ }
+ }
+ #endregion
+
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthView.aspx.designer.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthView.aspx.designer.cs
new file mode 100644
index 00000000..a135bf3f
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorOccHealthView.aspx.designer.cs
@@ -0,0 +1,296 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ReportManage.HazardFactor
+{
+
+
+ public partial class HazardFactorOccHealthView
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// drpYearMonth 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker drpYearMonth;
+
+ ///
+ /// txtCompileDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtCompileDate;
+
+ ///
+ /// txtCompileManName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtCompileManName;
+
+ ///
+ /// txtWorkPlace 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtWorkPlace;
+
+ ///
+ /// txtJobStep 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtJobStep;
+
+ ///
+ /// txtHazard 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtHazard;
+
+ ///
+ /// txtConsequence 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtConsequence;
+
+ ///
+ /// rblIllegality 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblIllegality;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// GroupPanel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel1;
+
+ ///
+ /// Form2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form2;
+
+ ///
+ /// txtBaseRiskSeverity 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtBaseRiskSeverity;
+
+ ///
+ /// txtBaseRiskProbability 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtBaseRiskProbability;
+
+ ///
+ /// txtBaseRiskScore 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtBaseRiskScore;
+
+ ///
+ /// txtBaseRiskLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtBaseRiskLevel;
+
+ ///
+ /// rblBaseRiskAcceptabity 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblBaseRiskAcceptabity;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label1;
+
+ ///
+ /// GroupPanel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel2;
+
+ ///
+ /// Form4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form4;
+
+ ///
+ /// txtNetRiskControlMeasures 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtNetRiskControlMeasures;
+
+ ///
+ /// txtNetRiskSeverity 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtNetRiskSeverity;
+
+ ///
+ /// txtNetRiskProbability 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtNetRiskProbability;
+
+ ///
+ /// txtNetRiskScore 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtNetRiskScore;
+
+ ///
+ /// txtNetRiskLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtNetRiskLevel;
+
+ ///
+ /// rblNetRiskAcceptabity 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblNetRiskAcceptabity;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label2;
+
+ ///
+ /// txtAdditionalControlMeasures 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtAdditionalControlMeasures;
+
+ ///
+ /// txtResponsibleDepartment 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtResponsibleDepartment;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.cs b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.cs
index 7db36a2c..21d9fadb 100644
--- a/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/ReportManage/HazardFactor/HazardFactorSafetyIn.aspx.cs
@@ -269,6 +269,8 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
string rData17 = row[17]?.ToString().Trim(); // 新增或变更的控制措施
string rData18 = row[18]?.ToString().Trim(); // 责任部门
+ rData17 = rData17 == "无" ? string.Empty : rData17;
+
string Year = string.Empty;
string Month = string.Empty;
string WorkPlace = string.Empty;
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index ec73162b..3ae09306 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -1085,6 +1085,9 @@ namespace Model
partial void InsertHazard_RoutingInspection(Hazard_RoutingInspection instance);
partial void UpdateHazard_RoutingInspection(Hazard_RoutingInspection instance);
partial void DeleteHazard_RoutingInspection(Hazard_RoutingInspection instance);
+ partial void InsertHazardFactor_OccHealth(HazardFactor_OccHealth instance);
+ partial void UpdateHazardFactor_OccHealth(HazardFactor_OccHealth instance);
+ partial void DeleteHazardFactor_OccHealth(HazardFactor_OccHealth instance);
partial void InsertHazardFactor_Safety(HazardFactor_Safety instance);
partial void UpdateHazardFactor_Safety(HazardFactor_Safety instance);
partial void DeleteHazardFactor_Safety(HazardFactor_Safety instance);
@@ -5559,6 +5562,14 @@ namespace Model
}
}
+ public System.Data.Linq.Table HazardFactor_OccHealth
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table HazardFactor_Safety
{
get
@@ -168531,6 +168542,668 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HazardFactor_OccHealth")]
+ public partial class HazardFactor_OccHealth : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _ID;
+
+ private string _Year;
+
+ private string _Month;
+
+ private System.DateTime _CompileDate;
+
+ private string _CompileMan;
+
+ private string _CompileManName;
+
+ private string _ProjectId;
+
+ private string _WorkPlace;
+
+ private string _JobStep;
+
+ private string _Hazard;
+
+ private string _Consequence;
+
+ private bool _Illegality;
+
+ private int _BaseRiskSeverity;
+
+ private int _BaseRiskProbability;
+
+ private int _BaseRiskScore;
+
+ private string _BaseRiskLevel;
+
+ private bool _BaseRiskAcceptabity;
+
+ private string _NetRiskControlMeasures;
+
+ private int _NetRiskSeverity;
+
+ private int _NetRiskProbability;
+
+ private int _NetRiskScore;
+
+ private string _NetRiskLevel;
+
+ private bool _NetRiskAcceptabity;
+
+ private string _AdditionalControlMeasures;
+
+ private string _ResponsibleDepartment;
+
+ private int _State;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnIDChanging(string value);
+ partial void OnIDChanged();
+ partial void OnYearChanging(string value);
+ partial void OnYearChanged();
+ partial void OnMonthChanging(string value);
+ partial void OnMonthChanged();
+ partial void OnCompileDateChanging(System.DateTime value);
+ partial void OnCompileDateChanged();
+ partial void OnCompileManChanging(string value);
+ partial void OnCompileManChanged();
+ partial void OnCompileManNameChanging(string value);
+ partial void OnCompileManNameChanged();
+ partial void OnProjectIdChanging(string value);
+ partial void OnProjectIdChanged();
+ partial void OnWorkPlaceChanging(string value);
+ partial void OnWorkPlaceChanged();
+ partial void OnJobStepChanging(string value);
+ partial void OnJobStepChanged();
+ partial void OnHazardChanging(string value);
+ partial void OnHazardChanged();
+ partial void OnConsequenceChanging(string value);
+ partial void OnConsequenceChanged();
+ partial void OnIllegalityChanging(bool value);
+ partial void OnIllegalityChanged();
+ partial void OnBaseRiskSeverityChanging(int value);
+ partial void OnBaseRiskSeverityChanged();
+ partial void OnBaseRiskProbabilityChanging(int value);
+ partial void OnBaseRiskProbabilityChanged();
+ partial void OnBaseRiskScoreChanging(int value);
+ partial void OnBaseRiskScoreChanged();
+ partial void OnBaseRiskLevelChanging(string value);
+ partial void OnBaseRiskLevelChanged();
+ partial void OnBaseRiskAcceptabityChanging(bool value);
+ partial void OnBaseRiskAcceptabityChanged();
+ partial void OnNetRiskControlMeasuresChanging(string value);
+ partial void OnNetRiskControlMeasuresChanged();
+ partial void OnNetRiskSeverityChanging(int value);
+ partial void OnNetRiskSeverityChanged();
+ partial void OnNetRiskProbabilityChanging(int value);
+ partial void OnNetRiskProbabilityChanged();
+ partial void OnNetRiskScoreChanging(int value);
+ partial void OnNetRiskScoreChanged();
+ partial void OnNetRiskLevelChanging(string value);
+ partial void OnNetRiskLevelChanged();
+ partial void OnNetRiskAcceptabityChanging(bool value);
+ partial void OnNetRiskAcceptabityChanged();
+ partial void OnAdditionalControlMeasuresChanging(string value);
+ partial void OnAdditionalControlMeasuresChanged();
+ partial void OnResponsibleDepartmentChanging(string value);
+ partial void OnResponsibleDepartmentChanged();
+ partial void OnStateChanging(int value);
+ partial void OnStateChanged();
+ #endregion
+
+ public HazardFactor_OccHealth()
+ {
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ID", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string ID
+ {
+ get
+ {
+ return this._ID;
+ }
+ set
+ {
+ if ((this._ID != value))
+ {
+ this.OnIDChanging(value);
+ this.SendPropertyChanging();
+ this._ID = value;
+ this.SendPropertyChanged("ID");
+ this.OnIDChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
+ public string Year
+ {
+ get
+ {
+ return this._Year;
+ }
+ set
+ {
+ if ((this._Year != value))
+ {
+ this.OnYearChanging(value);
+ this.SendPropertyChanging();
+ this._Year = value;
+ this.SendPropertyChanged("Year");
+ this.OnYearChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="NVarChar(10) NOT NULL", CanBeNull=false)]
+ public string Month
+ {
+ get
+ {
+ return this._Month;
+ }
+ set
+ {
+ if ((this._Month != value))
+ {
+ this.OnMonthChanging(value);
+ this.SendPropertyChanging();
+ this._Month = value;
+ this.SendPropertyChanged("Month");
+ this.OnMonthChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime NOT NULL")]
+ public System.DateTime CompileDate
+ {
+ get
+ {
+ return this._CompileDate;
+ }
+ set
+ {
+ if ((this._CompileDate != value))
+ {
+ this.OnCompileDateChanging(value);
+ this.SendPropertyChanging();
+ this._CompileDate = value;
+ this.SendPropertyChanged("CompileDate");
+ this.OnCompileDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
+ 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="_CompileManName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
+ public string CompileManName
+ {
+ get
+ {
+ return this._CompileManName;
+ }
+ set
+ {
+ if ((this._CompileManName != value))
+ {
+ this.OnCompileManNameChanging(value);
+ this.SendPropertyChanging();
+ this._CompileManName = value;
+ this.SendPropertyChanged("CompileManName");
+ this.OnCompileManNameChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
+ public string ProjectId
+ {
+ get
+ {
+ return this._ProjectId;
+ }
+ set
+ {
+ if ((this._ProjectId != value))
+ {
+ this.OnProjectIdChanging(value);
+ this.SendPropertyChanging();
+ this._ProjectId = value;
+ this.SendPropertyChanged("ProjectId");
+ this.OnProjectIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPlace", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
+ public string WorkPlace
+ {
+ get
+ {
+ return this._WorkPlace;
+ }
+ set
+ {
+ if ((this._WorkPlace != value))
+ {
+ this.OnWorkPlaceChanging(value);
+ this.SendPropertyChanging();
+ this._WorkPlace = value;
+ this.SendPropertyChanged("WorkPlace");
+ this.OnWorkPlaceChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobStep", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
+ public string JobStep
+ {
+ get
+ {
+ return this._JobStep;
+ }
+ set
+ {
+ if ((this._JobStep != value))
+ {
+ this.OnJobStepChanging(value);
+ this.SendPropertyChanging();
+ this._JobStep = value;
+ this.SendPropertyChanged("JobStep");
+ this.OnJobStepChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hazard", DbType="NVarChar(500) NOT NULL", CanBeNull=false)]
+ public string Hazard
+ {
+ get
+ {
+ return this._Hazard;
+ }
+ set
+ {
+ if ((this._Hazard != value))
+ {
+ this.OnHazardChanging(value);
+ this.SendPropertyChanging();
+ this._Hazard = value;
+ this.SendPropertyChanged("Hazard");
+ this.OnHazardChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Consequence", DbType="NVarChar(200)")]
+ public string Consequence
+ {
+ get
+ {
+ return this._Consequence;
+ }
+ set
+ {
+ if ((this._Consequence != value))
+ {
+ this.OnConsequenceChanging(value);
+ this.SendPropertyChanging();
+ this._Consequence = value;
+ this.SendPropertyChanged("Consequence");
+ this.OnConsequenceChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Illegality", DbType="Bit NOT NULL")]
+ public bool Illegality
+ {
+ get
+ {
+ return this._Illegality;
+ }
+ set
+ {
+ if ((this._Illegality != value))
+ {
+ this.OnIllegalityChanging(value);
+ this.SendPropertyChanging();
+ this._Illegality = value;
+ this.SendPropertyChanged("Illegality");
+ this.OnIllegalityChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BaseRiskSeverity", DbType="Int NOT NULL")]
+ public int BaseRiskSeverity
+ {
+ get
+ {
+ return this._BaseRiskSeverity;
+ }
+ set
+ {
+ if ((this._BaseRiskSeverity != value))
+ {
+ this.OnBaseRiskSeverityChanging(value);
+ this.SendPropertyChanging();
+ this._BaseRiskSeverity = value;
+ this.SendPropertyChanged("BaseRiskSeverity");
+ this.OnBaseRiskSeverityChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BaseRiskProbability", DbType="Int NOT NULL")]
+ public int BaseRiskProbability
+ {
+ get
+ {
+ return this._BaseRiskProbability;
+ }
+ set
+ {
+ if ((this._BaseRiskProbability != value))
+ {
+ this.OnBaseRiskProbabilityChanging(value);
+ this.SendPropertyChanging();
+ this._BaseRiskProbability = value;
+ this.SendPropertyChanged("BaseRiskProbability");
+ this.OnBaseRiskProbabilityChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BaseRiskScore", DbType="Int NOT NULL")]
+ public int BaseRiskScore
+ {
+ get
+ {
+ return this._BaseRiskScore;
+ }
+ set
+ {
+ if ((this._BaseRiskScore != value))
+ {
+ this.OnBaseRiskScoreChanging(value);
+ this.SendPropertyChanging();
+ this._BaseRiskScore = value;
+ this.SendPropertyChanged("BaseRiskScore");
+ this.OnBaseRiskScoreChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BaseRiskLevel", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
+ public string BaseRiskLevel
+ {
+ get
+ {
+ return this._BaseRiskLevel;
+ }
+ set
+ {
+ if ((this._BaseRiskLevel != value))
+ {
+ this.OnBaseRiskLevelChanging(value);
+ this.SendPropertyChanging();
+ this._BaseRiskLevel = value;
+ this.SendPropertyChanged("BaseRiskLevel");
+ this.OnBaseRiskLevelChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BaseRiskAcceptabity", DbType="Bit NOT NULL")]
+ public bool BaseRiskAcceptabity
+ {
+ get
+ {
+ return this._BaseRiskAcceptabity;
+ }
+ set
+ {
+ if ((this._BaseRiskAcceptabity != value))
+ {
+ this.OnBaseRiskAcceptabityChanging(value);
+ this.SendPropertyChanging();
+ this._BaseRiskAcceptabity = value;
+ this.SendPropertyChanged("BaseRiskAcceptabity");
+ this.OnBaseRiskAcceptabityChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NetRiskControlMeasures", DbType="NVarChar(500)")]
+ public string NetRiskControlMeasures
+ {
+ get
+ {
+ return this._NetRiskControlMeasures;
+ }
+ set
+ {
+ if ((this._NetRiskControlMeasures != value))
+ {
+ this.OnNetRiskControlMeasuresChanging(value);
+ this.SendPropertyChanging();
+ this._NetRiskControlMeasures = value;
+ this.SendPropertyChanged("NetRiskControlMeasures");
+ this.OnNetRiskControlMeasuresChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NetRiskSeverity", DbType="Int NOT NULL")]
+ public int NetRiskSeverity
+ {
+ get
+ {
+ return this._NetRiskSeverity;
+ }
+ set
+ {
+ if ((this._NetRiskSeverity != value))
+ {
+ this.OnNetRiskSeverityChanging(value);
+ this.SendPropertyChanging();
+ this._NetRiskSeverity = value;
+ this.SendPropertyChanged("NetRiskSeverity");
+ this.OnNetRiskSeverityChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NetRiskProbability", DbType="Int NOT NULL")]
+ public int NetRiskProbability
+ {
+ get
+ {
+ return this._NetRiskProbability;
+ }
+ set
+ {
+ if ((this._NetRiskProbability != value))
+ {
+ this.OnNetRiskProbabilityChanging(value);
+ this.SendPropertyChanging();
+ this._NetRiskProbability = value;
+ this.SendPropertyChanged("NetRiskProbability");
+ this.OnNetRiskProbabilityChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NetRiskScore", DbType="Int NOT NULL")]
+ public int NetRiskScore
+ {
+ get
+ {
+ return this._NetRiskScore;
+ }
+ set
+ {
+ if ((this._NetRiskScore != value))
+ {
+ this.OnNetRiskScoreChanging(value);
+ this.SendPropertyChanging();
+ this._NetRiskScore = value;
+ this.SendPropertyChanged("NetRiskScore");
+ this.OnNetRiskScoreChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NetRiskLevel", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
+ public string NetRiskLevel
+ {
+ get
+ {
+ return this._NetRiskLevel;
+ }
+ set
+ {
+ if ((this._NetRiskLevel != value))
+ {
+ this.OnNetRiskLevelChanging(value);
+ this.SendPropertyChanging();
+ this._NetRiskLevel = value;
+ this.SendPropertyChanged("NetRiskLevel");
+ this.OnNetRiskLevelChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NetRiskAcceptabity", DbType="Bit NOT NULL")]
+ public bool NetRiskAcceptabity
+ {
+ get
+ {
+ return this._NetRiskAcceptabity;
+ }
+ set
+ {
+ if ((this._NetRiskAcceptabity != value))
+ {
+ this.OnNetRiskAcceptabityChanging(value);
+ this.SendPropertyChanging();
+ this._NetRiskAcceptabity = value;
+ this.SendPropertyChanged("NetRiskAcceptabity");
+ this.OnNetRiskAcceptabityChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AdditionalControlMeasures", DbType="NVarChar(500)")]
+ public string AdditionalControlMeasures
+ {
+ get
+ {
+ return this._AdditionalControlMeasures;
+ }
+ set
+ {
+ if ((this._AdditionalControlMeasures != value))
+ {
+ this.OnAdditionalControlMeasuresChanging(value);
+ this.SendPropertyChanging();
+ this._AdditionalControlMeasures = value;
+ this.SendPropertyChanged("AdditionalControlMeasures");
+ this.OnAdditionalControlMeasuresChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibleDepartment", DbType="NVarChar(50)")]
+ public string ResponsibleDepartment
+ {
+ get
+ {
+ return this._ResponsibleDepartment;
+ }
+ set
+ {
+ if ((this._ResponsibleDepartment != value))
+ {
+ this.OnResponsibleDepartmentChanging(value);
+ this.SendPropertyChanging();
+ this._ResponsibleDepartment = value;
+ this.SendPropertyChanged("ResponsibleDepartment");
+ this.OnResponsibleDepartmentChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int NOT NULL")]
+ public int State
+ {
+ get
+ {
+ return this._State;
+ }
+ set
+ {
+ if ((this._State != value))
+ {
+ this.OnStateChanging(value);
+ this.SendPropertyChanging();
+ this._State = value;
+ this.SendPropertyChanged("State");
+ this.OnStateChanged();
+ }
+ }
+ }
+
+ 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.HazardFactor_Safety")]
public partial class HazardFactor_Safety : INotifyPropertyChanging, INotifyPropertyChanged
{
diff --git a/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs b/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs
index c327d894..5959e74e 100644
--- a/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs
+++ b/SGGL/WebAPI/Controllers/HSSE/TestPlanController.cs
@@ -293,7 +293,13 @@ namespace WebAPI.Controllers
}
#endregion
-
+ ///
+ /// companyTrainingItemCode、personId、projectId获取考试记录id
+ ///
+ ///
+ ///
+ ///
+ ///
public Model.ResponeData getTrainingPlanTestRecordItemByTestPlanIdPersonId(string companyTrainingItemCode, string personId, string projectId)
{
var responeData = new Model.ResponeData();