diff --git a/jwtech-admin-page/src/api/build/risk.js b/jwtech-admin-page/src/api/build/risk.js
index 9234656b..dedf933f 100644
--- a/jwtech-admin-page/src/api/build/risk.js
+++ b/jwtech-admin-page/src/api/build/risk.js
@@ -9,6 +9,20 @@ export function listRisk(query) {
})
}
+export function getStatistics(proNo){
+ return request({
+ url: '/build/risk/getStatistics/'+proNo,
+ method: 'get',
+ })
+}
+
+export function getTypeNumber(proNo){
+ return request({
+ url: '/build/risk/getTypeNumber/'+proNo,
+ method: 'get',
+ })
+}
+
// 查询安全风险登记详细
export function getRisk(id) {
return request({
diff --git a/jwtech-admin-page/src/views/building/projectInfo/projectProcess/securityRisk/index.vue b/jwtech-admin-page/src/views/building/projectInfo/projectProcess/securityRisk/index.vue
index 5bd6b5ae..0ad4fa1a 100644
--- a/jwtech-admin-page/src/views/building/projectInfo/projectProcess/securityRisk/index.vue
+++ b/jwtech-admin-page/src/views/building/projectInfo/projectProcess/securityRisk/index.vue
@@ -14,6 +14,7 @@
:proNo="proNo"
:proCode=null
:formData="formData"
+ v-if="activeName=='riskRegistration'"
/>
+
+
+
+
diff --git a/jwtech-admin-page/vue.config.js b/jwtech-admin-page/vue.config.js
index acaa39c5..9e8054a4 100644
--- a/jwtech-admin-page/vue.config.js
+++ b/jwtech-admin-page/vue.config.js
@@ -33,7 +33,7 @@ module.exports = {
devServer: {
// host: '0.0.0.0',
// host: '192.168.1.104',
- host: '192.168.2.108',
+ host: 'localhost',
// host: '192.168.2.107',
port: 80,
open: true,
@@ -43,7 +43,7 @@ module.exports = {
// target: "http://127.0.0.1:18082",
// target: "http://192.168.2.108:18080",
// target: "http://192.168.2.103:18082",
- target: "http://192.168.2.111:18082",
+ target: "http://localhost:18082",
// target: "http://192.168.2.108:18080",
// target: "http://192.168.1.20:8084",
changeOrigin: true,
diff --git a/jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiSafeRiskController.java b/jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiSafeRiskController.java
index 89ffd2ab..2e78fae0 100644
--- a/jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiSafeRiskController.java
+++ b/jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiSafeRiskController.java
@@ -1,8 +1,13 @@
package com.kms.build.controller;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
+import cn.hutool.core.collection.CollectionUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jianwei.common.core.controller.BaseController;
import com.jianwei.common.core.domain.SearchParam;
import com.jianwei.common.utils.poi.ExcelUtil;
@@ -56,6 +61,60 @@ public class BsSgcJsjdBuiSafeRiskController extends BaseController
return bsSgcJsjdBuiSafeRiskService.selectPage(sp);
}
+ @GetMapping("getStatistics/{proNo}")
+ @ApiOperation("状态统计")
+ public MapgetStatistics(@PathVariable("proNo") String proNo){
+ List list = bsSgcJsjdBuiSafeRiskService.list(new QueryWrapper().eq("pro_no", proNo));
+ Map>map=new HashMap<>();
+ MapstatusNumber=new HashMap<>();
+ MaptypeNumber=new HashMap<>();
+ if (CollectionUtil.isEmpty(list)){
+ return statusNumber;
+ }
+ for (BsSgcJsjdBuiSafeRisk bsSgcJsjdBuiSafeRisk:list){
+ if (statusNumber.containsKey(bsSgcJsjdBuiSafeRisk.getRiskLevel())){
+ statusNumber.put(bsSgcJsjdBuiSafeRisk.getRiskLevel(),statusNumber.get(bsSgcJsjdBuiSafeRisk.getRiskLevel())+1);
+ }else {
+ statusNumber.put(bsSgcJsjdBuiSafeRisk.getRiskLevel(),1);
+ }
+
+// if (typeNumber.containsKey(bsSgcJsjdBuiSafeRisk.getHazardType())){
+// statusNumber.put(bsSgcJsjdBuiSafeRisk.getHazardType(),statusNumber.get(bsSgcJsjdBuiSafeRisk.getHazardType())+1);
+// }else {
+// typeNumber.put(bsSgcJsjdBuiSafeRisk.getHazardType(),1);
+// }
+ }
+
+ return statusNumber;
+ }
+
+
+ @GetMapping("getTypeNumber/{proNo}")
+ @ApiOperation("类型统计")
+ public MapgetTypeNumber(@PathVariable("proNo") String proNo){
+ List list = bsSgcJsjdBuiSafeRiskService.list(new QueryWrapper().eq("pro_no", proNo));
+ Map>map=new HashMap<>();
+ MapstatusNumber=new HashMap<>();
+ MaptypeNumber=new HashMap<>();
+ if (CollectionUtil.isEmpty(list)){
+ return typeNumber;
+ }
+ for (BsSgcJsjdBuiSafeRisk bsSgcJsjdBuiSafeRisk:list){
+// if (statusNumber.containsKey(bsSgcJsjdBuiSafeRisk.getRiskLevel())){
+// statusNumber.put(bsSgcJsjdBuiSafeRisk.getRiskLevel(),statusNumber.get(bsSgcJsjdBuiSafeRisk.getRiskLevel())+1);
+// }else {
+// statusNumber.put(bsSgcJsjdBuiSafeRisk.getRiskLevel(),1);
+// }
+
+ if (typeNumber.containsKey(bsSgcJsjdBuiSafeRisk.getHazardType())){
+ statusNumber.put(bsSgcJsjdBuiSafeRisk.getHazardType(),statusNumber.get(bsSgcJsjdBuiSafeRisk.getHazardType())+1);
+ }else {
+ typeNumber.put(bsSgcJsjdBuiSafeRisk.getHazardType(),1);
+ }
+ }
+
+ return typeNumber;
+ }
/**
* 导出安全风险登记列表
*/