From 53e7dce8d55487cbac64e4374ec9aa1b52a6c6ed Mon Sep 17 00:00:00 2001 From: SZH <szh_hello@163.com> Date: 星期四, 09 三月 2023 21:16:43 +0800 Subject: [PATCH] 解决npe问题 --- incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/controller/AccidentCountController.java | 20 ++++++++++++++++++++ 1 files changed, 20 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 8086ba2..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,10 @@ 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; @@ -43,4 +46,21 @@ 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