From 1305d0aa469fe7330fd2f8e9fbb10d95042571be Mon Sep 17 00:00:00 2001
From: zhangfeng <1603559716@qq.com>
Date: Mon, 10 Oct 2022 12:33:36 +0800
Subject: [PATCH] 应急系统和事故管理统计接口
---
incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentCountController.java | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentCountController.java b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentCountController.java
index 581eb80..ac02cf6 100644
--- a/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentCountController.java
+++ b/incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentCountController.java
@@ -2,7 +2,12 @@
import com.gkhy.safePlatform.commons.vo.ResultVO;
import com.gkhy.safePlatform.incidentManage.model.dto.resp.AccidentReportCountRespDTO;
+import com.gkhy.safePlatform.incidentManage.model.dto.resp.StatisticsDepLevelMonthAccidentRespDTO;
+import com.gkhy.safePlatform.incidentManage.model.dto.resp.StatisticsDeptLevelYearAccidentRespDTO;
import com.gkhy.safePlatform.incidentManage.query.AccidentReportCountQuery;
+import com.gkhy.safePlatform.incidentManage.query.IncidentManageCountQuery;
+import com.gkhy.safePlatform.incidentManage.rpc.api.model.dto.req.IncidentManageCountRPCReq;
+import com.gkhy.safePlatform.incidentManage.rpc.api.model.dto.resp.IncidentManageRPCResp;
import com.gkhy.safePlatform.incidentManage.service.AccidentCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -25,4 +30,37 @@
return accidentCountService.countAccidentReport(query);
}
+ /**
+ * 事故报告统计的rpc接口
+ */
+ @RequestMapping(value = "/getCountByDeptId/count",method = RequestMethod.POST)
+ public ResultVO<IncidentManageRPCResp> getCountByDeptId(@RequestBody IncidentManageCountRPCReq query){
+ return accidentCountService.getCountByDeptId(query);
+ }
+
+ /**
+ * 事故报告统计的rpc接口
+ */
+ @RequestMapping(value = "/getCountByDeptIds/count",method = RequestMethod.POST)
+ public ResultVO<List<IncidentManageRPCResp>> getCountByDeptIds(@RequestBody IncidentManageCountRPCReq query){
+ return accidentCountService.getCountByDeptIds(query);
+ }
+
+ @RequestMapping(value = "/getCountByDeptIdAndMonth/count",method = RequestMethod.POST)
+ public StatisticsDepLevelMonthAccidentRespDTO getCountByDeptIdAndMonth(@RequestBody IncidentManageCountQuery query){
+ return accidentCountService.getCountByDeptIdAndMonth(query);
+ }
+ @RequestMapping(value = "/getCountByDeptIdAndYear/count",method = RequestMethod.POST)
+ public StatisticsDeptLevelYearAccidentRespDTO getCountByDeptIdAndYear(@RequestBody IncidentManageCountQuery query){
+ return accidentCountService.getCountByDeptIdAndYear(query);
+ }
+
+ @RequestMapping(value = "/getCountByDeptIdsAndMonth/count",method = RequestMethod.POST)
+ public List<StatisticsDepLevelMonthAccidentRespDTO> getCountByDeptIdsAndMonth(@RequestBody IncidentManageCountQuery query){
+ return accidentCountService.getCountByDeptIdsAndMonth(query);
+ }
+ @RequestMapping(value = "/getCountByDeptIdsAndYear/count",method = RequestMethod.POST)
+ public List<StatisticsDeptLevelYearAccidentRespDTO> getCountByDeptIdsAndYear(@RequestBody IncidentManageCountQuery query){
+ return accidentCountService.getCountByDeptIdsAndYear(query);
+ }
}
--
Gitblit v1.9.2