20240124上报集团安全风险接口方法修改
This commit is contained in:
@@ -1302,8 +1302,9 @@ namespace BLL
|
||||
public static int GetGeneralRiskNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Hazard_HazardSelectedItem
|
||||
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
|
||||
where x.ProjectId == projectid && y.RiskLevel == 2 && (x.IsStart == true || x.State == "1")
|
||||
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
|
||||
join z in Funs.DB.Hazard_HazardList on x.HazardListId equals z.HazardListId
|
||||
where z.ProjectId == projectid && y.RiskLevel == 2 && z.CompileDate.Value.Year >= 2023
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -1315,8 +1316,9 @@ namespace BLL
|
||||
public static int GetLowRiskNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Hazard_HazardSelectedItem
|
||||
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
|
||||
where x.ProjectId == projectid && y.RiskLevel == 1 && (x.IsStart == true || x.State == "1")
|
||||
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
|
||||
join z in Funs.DB.Hazard_HazardList on x.HazardListId equals z.HazardListId
|
||||
where z.ProjectId == projectid && y.RiskLevel == 1 && z.CompileDate.Value.Year >= 2023
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -1328,8 +1330,9 @@ namespace BLL
|
||||
public static int GetMediumRiskNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Hazard_HazardSelectedItem
|
||||
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
|
||||
where x.ProjectId == projectid && y.RiskLevel == 3 && (x.IsStart == true || x.State == "1")
|
||||
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
|
||||
join z in Funs.DB.Hazard_HazardList on x.HazardListId equals z.HazardListId
|
||||
where z.ProjectId == projectid && y.RiskLevel == 3 && z.CompileDate.Value.Year >= 2023
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
@@ -1341,8 +1344,9 @@ namespace BLL
|
||||
public static int GetHighRiskNum(string projectid)
|
||||
{
|
||||
var result = (from x in Funs.DB.Hazard_HazardSelectedItem
|
||||
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
|
||||
where x.ProjectId == projectid && y.RiskLevel == 4 && (x.IsStart == true || x.State == "1")
|
||||
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
|
||||
join z in Funs.DB.Hazard_HazardList on x.HazardListId equals z.HazardListId
|
||||
where z.ProjectId == projectid && y.RiskLevel == 4 && z.CompileDate.Value.Year >= 2023
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user