| | |
| | | package com.gkhy.safePlatform.emergency.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.EmergencyDrillExecuteCountRespDTO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.EmergencySuppliesCountRespDTO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.*; |
| | | import com.gkhy.safePlatform.emergency.query.EmergencyDrillCountQuery; |
| | | import com.gkhy.safePlatform.emergency.query.EmergencyDrillExecuteCountQuery; |
| | | import com.gkhy.safePlatform.emergency.query.EmergencySuppliesCountQuery; |
| | | import com.gkhy.safePlatform.emergency.rpc.api.model.dto.req.EmergencyExecuteNumRPCReq; |
| | |
| | | public SearchResultVO<List<EmergencyExecuteNumRPCResp>> getNumByDeptIds(@RequestBody EmergencyExecuteNumRPCReq query){ |
| | | return emergencyCountService.getNumByDeptIds(query); |
| | | } |
| | | |
| | | /***************************重构******************************/ |
| | | |
| | | /** |
| | | * 根据部门id查询最后一次完成应急演练的时间 |
| | | */ |
| | | @RequestMapping(value = "/getLastTimeByDeptId",method = RequestMethod.POST) |
| | | public EmergencyExecuteTimeRespDTO getLastTimeByDeptId(@RequestBody JSONObject jsonObject){ |
| | | Long deptId = jsonObject.getLong("deptId"); |
| | | return emergencyCountService.getLastTimeByDeptId(deptId); |
| | | } |
| | | /** |
| | | * 根据部门以及子级部门查询最后一次完成应急演练的时间 |
| | | */ |
| | | @RequestMapping(value = "/getLastTimeByDeptIds",method = RequestMethod.POST) |
| | | public EmergencyExecuteTimeRespDTO getLastTimeByDeptIds(@RequestBody JSONObject jsonObject){ |
| | | Long deptId = jsonObject.getLong("deptId"); |
| | | return emergencyCountService.getLastTimeByDeptIds(deptId); |
| | | } |
| | | |
| | | /** |
| | | * 根据指定和年份统计演练数据 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/getCountByDeptIdAndYear",method = RequestMethod.POST) |
| | | public StatisticsDepLevelYearExecuteRespDTO getCountByDeptIdAndYear(@RequestBody EmergencyDrillCountQuery query){ |
| | | return emergencyCountService.getCountByDeptIdAndYear(query); |
| | | } |
| | | |
| | | /** |
| | | * 根据部门,指定月份 统计演练次数 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/getCountByDeptIdAndMonth",method = RequestMethod.POST) |
| | | public StatisticsDepLevelMonthEexcuteRespDTO getCountByDeptIdAndMonth(@RequestBody EmergencyDrillCountQuery query){ |
| | | return emergencyCountService.getCountByDeptIdAndMonth(query); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getCountByDeptIdsAndYear",method = RequestMethod.POST) |
| | | public List<StatisticsDepLevelYearExecuteRespDTO> getCountByDeptIdsAndYear(@RequestBody EmergencyDrillCountQuery query){ |
| | | return emergencyCountService.getCountByDeptIdsAndYear(query); |
| | | } |
| | | |
| | | /** |
| | | * 根据部门以及其子级部门,指定月份 统计演练次数 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/getCountByDeptIdsAndMonth",method = RequestMethod.POST) |
| | | public List<StatisticsDepLevelMonthEexcuteRespDTO> getCountByDeptIdsAndMonth(@RequestBody EmergencyDrillCountQuery query){ |
| | | return emergencyCountService.getCountByDeptIdsAndMonth(query); |
| | | } |
| | | } |