20240102安全风险提交方法调整,数据修正

This commit is contained in:
2024-01-02 16:59:29 +08:00
parent 7f2be68951
commit 2e2118a813
8 changed files with 81 additions and 8 deletions
+1 -1
View File
@@ -522,7 +522,7 @@ namespace BLL
foreach (var item in getTrainingTasks)
{
item.States = "2";
db.SubmitChanges();
}
getTestPlan.States = "3";
db.SubmitChanges();
+2 -1
View File
@@ -188,9 +188,10 @@ namespace BLL
{
item.TestEndTime = item.TestStartTime.Value.AddMinutes(item.Duration);
item.TestScores = db.Training_TestRecordItem.Where(x => x.TestRecordId == item.TestRecordId).Sum(x => x.SubjectScore) ?? 0;
db.SubmitChanges();
icount++;
}
db.SubmitChanges();
}
}
return icount;
@@ -1355,7 +1355,7 @@ namespace BLL
{
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
where x.ProjectId == projectid && y.RiskLevel == 2
select x).Count();
return result;
}
@@ -1368,7 +1368,7 @@ namespace BLL
{
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
where x.ProjectId == projectid && y.RiskLevel == 1
select x).Count();
return result;
}
@@ -1381,7 +1381,7 @@ namespace BLL
{
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
where x.ProjectId == projectid && y.RiskLevel == 3
select x).Count();
return result;
}
@@ -1394,7 +1394,7 @@ namespace BLL
{
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
where x.ProjectId == projectid && y.RiskLevel == 4
select x).Count();
return result;
}