报表管理:安全、职业健康危害因素清单补充事故分类
This commit is contained in:
@@ -78,9 +78,10 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
}
|
||||
}
|
||||
|
||||
public static int Cols = 19;//列数
|
||||
public static int Cols = 20;//列数
|
||||
|
||||
public static List<string> validLevelStrings = new List<string> { "低风险", "一般风险", "较大风险", "重大风险" };
|
||||
public static List<string> validConsequenceStrings = new List<string> { "人员伤亡", "财产损失", "环境破坏", "公司声誉" };
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -269,22 +270,23 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
string rData2 = row[2]?.ToString().Trim(); // 作业内容/步骤
|
||||
string rData3 = row[3]?.ToString().Trim(); // 危害因素描述
|
||||
string rData4 = row[4]?.ToString().Trim(); // 主要后果
|
||||
string rData5 = row[5]?.ToString().Trim(); // 违法
|
||||
string rData6 = row[6]?.ToString().Trim(); // 固有风险-严重性
|
||||
string rData7 = row[7]?.ToString().Trim(); // 固有风险-可能性
|
||||
string rData8 = row[8]?.ToString().Trim(); // 固有风险-得分
|
||||
string rData9 = row[9]?.ToString().Trim(); // 固有风险-风险级别
|
||||
string rData10 = row[10]?.ToString().Trim(); // 固有风险-可接受
|
||||
string rData11 = row[11]?.ToString().Trim(); // 残留风险-现有控制措施
|
||||
string rData12 = row[12]?.ToString().Trim(); // 残留风险-严重性
|
||||
string rData13 = row[13]?.ToString().Trim(); // 残留风险-可能性
|
||||
string rData14 = row[14]?.ToString().Trim(); // 残留风险-得分
|
||||
string rData15 = row[15]?.ToString().Trim(); // 残留风险-风险级别
|
||||
string rData16 = row[16]?.ToString().Trim(); // 残留风险-可接受
|
||||
string rData17 = row[17]?.ToString().Trim(); // 新增或变更的控制措施
|
||||
string rData18 = row[18]?.ToString().Trim(); // 责任部门
|
||||
string rData5 = row[5]?.ToString().Trim(); // 事故分类
|
||||
string rData6 = row[6]?.ToString().Trim(); // 违法
|
||||
string rData7 = row[7]?.ToString().Trim(); // 固有风险-严重性
|
||||
string rData8 = row[8]?.ToString().Trim(); // 固有风险-可能性
|
||||
string rData9 = row[9]?.ToString().Trim(); // 固有风险-得分
|
||||
string rData10 = row[10]?.ToString().Trim(); // 固有风险-风险级别
|
||||
string rData11 = row[11]?.ToString().Trim(); // 固有风险-可接受
|
||||
string rData12 = row[12]?.ToString().Trim(); // 残留风险-现有控制措施
|
||||
string rData13 = row[13]?.ToString().Trim(); // 残留风险-严重性
|
||||
string rData14 = row[14]?.ToString().Trim(); // 残留风险-可能性
|
||||
string rData15 = row[15]?.ToString().Trim(); // 残留风险-得分
|
||||
string rData16 = row[16]?.ToString().Trim(); // 残留风险-风险级别
|
||||
string rData17 = row[17]?.ToString().Trim(); // 残留风险-可接受
|
||||
string rData18 = row[18]?.ToString().Trim(); // 新增或变更的控制措施
|
||||
string rData19 = row[19]?.ToString().Trim(); // 责任部门
|
||||
|
||||
rData17 = rData17 == "无" ? string.Empty : rData17;
|
||||
rData18 = rData18 == "无" ? string.Empty : rData18;
|
||||
|
||||
string Year = string.Empty;
|
||||
string Month = string.Empty;
|
||||
@@ -292,6 +294,7 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
string JobStep = string.Empty;
|
||||
string Hazard = string.Empty;
|
||||
string Consequence = string.Empty;
|
||||
string AccidentType = string.Empty;
|
||||
bool Illegality = false;
|
||||
int BaseRiskSeverity = 0;
|
||||
int BaseRiskProbability = 0;
|
||||
@@ -351,16 +354,32 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData4))
|
||||
{
|
||||
Consequence = rData4;
|
||||
//Consequence = rData4;
|
||||
if (!validConsequenceStrings.Any(x => x == rData4))
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "主要后果", Reason = "只能是[人员伤亡/财产损失/环境破坏/公司声誉]!" });
|
||||
}
|
||||
else
|
||||
{
|
||||
Consequence = rData4;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "主要后果", Reason = "不能为空" });
|
||||
}
|
||||
Illegality = !string.IsNullOrEmpty(rData5) && rData5 == "是";
|
||||
if (!string.IsNullOrEmpty(rData6))
|
||||
if (!string.IsNullOrEmpty(rData5))
|
||||
{
|
||||
if (!int.TryParse(rData6, out int ct))
|
||||
AccidentType = rData5;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "事故分类", Reason = "不能为空" });
|
||||
}
|
||||
Illegality = !string.IsNullOrEmpty(rData6) && rData6 == "是";
|
||||
if (!string.IsNullOrEmpty(rData7))
|
||||
{
|
||||
if (!int.TryParse(rData7, out int ct))
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "固有风险严重性", Reason = "格式错误" });
|
||||
}
|
||||
@@ -369,9 +388,9 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
BaseRiskSeverity = ct;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData7))
|
||||
if (!string.IsNullOrEmpty(rData8))
|
||||
{
|
||||
if (!int.TryParse(rData7, out int ct))
|
||||
if (!int.TryParse(rData8, out int ct))
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "固有风险可能性", Reason = "格式错误" });
|
||||
}
|
||||
@@ -386,19 +405,19 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
{
|
||||
BaseRiskLevel = baseRiskLevel.RiskLevelName;
|
||||
}
|
||||
BaseRiskAcceptabity = !string.IsNullOrEmpty(rData10) && rData10 == "否" ? false : true;
|
||||
if (!string.IsNullOrEmpty(rData11))
|
||||
BaseRiskAcceptabity = !string.IsNullOrEmpty(rData11) && rData11 == "否" ? false : true;
|
||||
if (!string.IsNullOrEmpty(rData12))
|
||||
{
|
||||
NetRiskControlMeasures = rData11;
|
||||
NetRiskControlMeasures = rData12;
|
||||
}
|
||||
else
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "现有控制措施", Reason = "不能为空" });
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(rData12))
|
||||
if (!string.IsNullOrEmpty(rData13))
|
||||
{
|
||||
if (!int.TryParse(rData12, out int ct))
|
||||
if (!int.TryParse(rData13, out int ct))
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "残留风险严重性", Reason = "格式错误" });
|
||||
}
|
||||
@@ -407,9 +426,9 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
NetRiskSeverity = ct;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData13))
|
||||
if (!string.IsNullOrEmpty(rData14))
|
||||
{
|
||||
if (!int.TryParse(rData13, out int ct))
|
||||
if (!int.TryParse(rData14, out int ct))
|
||||
{
|
||||
lstError.Add(new ErrorInfo { Row = displayRow, Column = "残留风险可能性", Reason = "格式错误" });
|
||||
}
|
||||
@@ -424,15 +443,15 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
{
|
||||
NetRiskLevel = netRiskLevel.RiskLevelName;
|
||||
}
|
||||
NetRiskAcceptabity = !string.IsNullOrEmpty(rData16) && rData16 == "否" ? false : true;
|
||||
NetRiskAcceptabity = !string.IsNullOrEmpty(rData17) && rData17 == "否" ? false : true;
|
||||
|
||||
if (!string.IsNullOrEmpty(rData17))
|
||||
{
|
||||
AdditionalControlMeasures = rData17;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData18))
|
||||
{
|
||||
ResponsibleDepartment = rData18;
|
||||
AdditionalControlMeasures = rData18;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(rData19))
|
||||
{
|
||||
ResponsibleDepartment = rData19;
|
||||
}
|
||||
|
||||
if (lstError.Any())
|
||||
@@ -469,6 +488,7 @@ namespace FineUIPro.Web.ReportManage.HazardFactor
|
||||
JobStep = JobStep,
|
||||
Hazard = Hazard,
|
||||
Consequence = Consequence,
|
||||
AccidentType = AccidentType,
|
||||
Illegality = Illegality,
|
||||
BaseRiskSeverity = BaseRiskSeverity,
|
||||
BaseRiskProbability = BaseRiskProbability,
|
||||
|
||||
Reference in New Issue
Block a user