diff --git a/DataBase/版本日志/SGGLDB_V2024-01-02(安全风险等级修正脚本).sql b/DataBase/版本日志/SGGLDB_V2024-01-02(安全风险等级修正脚本).sql
new file mode 100644
index 00000000..74740f02
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2024-01-02(安全风险等级修正脚本).sql
@@ -0,0 +1,24 @@
+INSERT INTO Base_RiskLevel (RiskLevelId,RiskLevel,RiskLevelName,MinValue,MaxValue,ControlMeasures,Days)
+VALUES('84e1d680-5bfe-48d2-a255-59f43aa3615a',1,'һ/ͷ',0,120,'һΣգҪ',21)
+GO
+INSERT INTO Base_RiskLevel (RiskLevelId,RiskLevel,RiskLevelName,MinValue,MaxValue,ControlMeasures,Days)
+VALUES('01537cc5-e8d2-497c-ba53-1faca1faf495',2,'/һ',121,170,'Σգص',7)
+GO
+INSERT INTO Base_RiskLevel (RiskLevelId,RiskLevel,RiskLevelName,MinValue,MaxValue,ControlMeasures,Days)
+VALUES('6baaf2bb-ee7c-410c-9a32-13208626c467',3,'/ϴ',171,320,'һΣգҪ',3)
+GO
+INSERT INTO Base_RiskLevel (RiskLevelId,RiskLevel,RiskLevelName,MinValue,MaxValue,ControlMeasures,Days)
+VALUES('c9e6285c-2da3-4997-8dc9-fb6ab404346e',4,'ļ/ش',321,null,'Σգҵ',1)
+GO
+update Hazard_HazardSelectedItem set HazardLevel=(select top 1 RiskLevelId from Base_RiskLevel where RiskLevel=1 )
+where HazardLevel is null or HazardLevel='1'
+go
+update Hazard_HazardSelectedItem set HazardLevel=(select top 1 RiskLevelId from Base_RiskLevel where RiskLevel=2 )
+where HazardLevel='2'
+go
+update Hazard_HazardSelectedItem set HazardLevel=(select top 1 RiskLevelId from Base_RiskLevel where RiskLevel=3 )
+where HazardLevel='3'
+go
+update Hazard_HazardSelectedItem set HazardLevel=(select top 1 RiskLevelId from Base_RiskLevel where RiskLevel=4)
+where HazardLevel='4'
+go
\ No newline at end of file
diff --git a/SGGL/BLL/API/HSSE/APITestRecordService.cs b/SGGL/BLL/API/HSSE/APITestRecordService.cs
index ab9bafed..b9304d33 100644
--- a/SGGL/BLL/API/HSSE/APITestRecordService.cs
+++ b/SGGL/BLL/API/HSSE/APITestRecordService.cs
@@ -522,7 +522,7 @@ namespace BLL
foreach (var item in getTrainingTasks)
{
item.States = "2";
- db.SubmitChanges();
+
}
getTestPlan.States = "3";
db.SubmitChanges();
diff --git a/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs b/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs
index 017c5311..3651d324 100644
--- a/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs
+++ b/SGGL/BLL/HSSE/EduTrain/TestRecordService.cs
@@ -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;
diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs
index 94179931..71ffc420 100644
--- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs
+++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs
@@ -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;
}
diff --git a/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj b/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj
index 27c0cbf1..c4c16785 100644
--- a/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj
+++ b/SGGL/FineUIPro.Mobile/FineUIPro.Mobile.csproj
@@ -3392,6 +3392,7 @@
ActionPlanListEdit.aspx
+ ASPXCodeBehind
ActionPlanListEdit.aspx
diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx
index b070d514..c8dfa0f0 100644
--- a/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx
+++ b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx
@@ -18,7 +18,8 @@
runat="server" BoxFlex="1" DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true"
SortField="ProjectName" SortDirection="ASC" OnSort="Grid1_Sort" EnableColumnLines="true" AllowPaging="true"
IsDatabasePaging="true" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"
- EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
+ EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"
+ EnableSummary="true" SummaryPosition="Bottom">
diff --git a/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs
index 0e5593b3..52fbf7ea 100644
--- a/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/SecurityRisk.aspx.cs
@@ -1,4 +1,5 @@
using BLL;
+using Newtonsoft.Json.Linq;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
@@ -25,6 +26,9 @@ namespace FineUIPro.Web.DataShow
BLL.ProjectService.InitCNCECShowProjectDropDownList(this.drpProject, true);
// 绑定表格t
BindGrid();
+ // 合计
+ OutputSummaryData();
+ this.Panel1.Title = "安全风险数据(" + BLL.UnitService.GetUnitNameByUnitId(Const.UnitId_SEDIN) + ")";
}
}
#endregion
@@ -244,5 +248,47 @@ namespace FineUIPro.Web.DataShow
return count;
}
+
+ #region 合计
+ private void OutputSummaryData()
+ {
+ string strSql = @"select ProjectId,ProjectCode, ProjectName ,
+ isnull((select count(*) from Hazard_HazardSelectedItem as a
+ LEFT JOIN Hazard_HazardList AS B ON A.HazardListId=B.HazardListId
+ where B.ProjectId=p.ProjectId AND B.States = '2'
+ and (a.HazardLevel='1' or a.HazardLevel=(select top 1 RiskLevelId from Base_RiskLevel where RiskLevel='1'))),0) as Count1,
+ isnull((select count(*) from Hazard_HazardSelectedItem as a
+ LEFT JOIN Hazard_HazardList AS B ON A.HazardListId=B.HazardListId
+ where B.ProjectId=p.ProjectId AND B.States = '2'
+ and (a.HazardLevel='2' or a.HazardLevel=(select top 1 RiskLevelId from Base_RiskLevel where RiskLevel='2'))),0) as Count2,
+ isnull((select count(*) from Hazard_HazardSelectedItem as a
+ LEFT JOIN Hazard_HazardList AS B ON A.HazardListId=B.HazardListId
+ where B.ProjectId=p.ProjectId AND B.States = '2'
+ and (a.HazardLevel='3' or a.HazardLevel=(select top 1 RiskLevelId from Base_RiskLevel where RiskLevel='3'))),0) as Count3,
+ isnull((select count(*) from Hazard_HazardSelectedItem as a
+ LEFT JOIN Hazard_HazardList AS B ON A.HazardListId=B.HazardListId
+ where B.ProjectId=p.ProjectId AND B.States = '2'
+ and (a.HazardLevel='4' or a.HazardLevel=(select top 1 RiskLevelId from Base_RiskLevel where RiskLevel='4'))),0) as Count4
+ from Base_Project as P where ProjectState =1 ";
+ List listStr = new List();
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ int Count1 = 0, Count2 = 0, Count3 = 0, Count4 = 0;
+ foreach (DataRow row in tb.Rows)
+ {
+ Count1 += Convert.ToInt32(row["Count1"]);
+ Count2 += Convert.ToInt32(row["Count2"]);
+ Count3 += Convert.ToInt32(row["Count3"]);
+ Count4 += Convert.ToInt32(row["Count4"]);
+ }
+ JObject summary = new JObject();
+ summary.Add("ProjectName", "合计:");
+ summary.Add("Count1", Count1.ToString());
+ summary.Add("Count2", Count2.ToString());
+ summary.Add("Count3", Count3.ToString());
+ summary.Add("Count4", Count4.ToString());
+ Grid1.SummaryData = summary;
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 9a739624..7ccfde7c 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -14411,7 +14411,7 @@
True
0
/
- http://localhost:8736/
+ http://localhost:2828/
False
False