package com.gk.hotwork.doublePrevention.controller;
|
|
|
import com.gk.hotwork.Domain.Enum.ResultCodes;
|
import com.gk.hotwork.Domain.Vo.PageInfoExtension;
|
import com.gk.hotwork.Domain.Vo.ResultVO;
|
import com.gk.hotwork.doublePrevention.entity.dto.req.StatisticsInspectionCompletedReqDTO;
|
import com.gk.hotwork.doublePrevention.entity.dto.req.StatisticsInspectionTaskReqDTO;
|
import com.gk.hotwork.doublePrevention.entity.dto.req.StatisticsInspectorReqDTO;
|
import com.gk.hotwork.doublePrevention.entity.dto.req.StatisticsPreventDangerPageReqDTO;
|
import com.gk.hotwork.doublePrevention.service.StatisticsService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
import java.util.Map;
|
|
@RestController
|
@RequestMapping("prevent/riskEvent/statistics")
|
public class StatisticsController {
|
|
@Autowired
|
private StatisticsService statisticsService;
|
|
|
/**
|
* @Description: 巡检人员统计
|
*/
|
@RequestMapping(value = "/inspectors", method = RequestMethod.POST)
|
public ResultVO<List<Map>> inspectorsStatistics(@RequestBody StatisticsInspectorReqDTO reqDTO) {
|
List<Map> result = statisticsService.selectInspectorsStatistics(reqDTO);
|
return new ResultVO<>(ResultCodes.OK, result);
|
}
|
|
|
/**
|
* @Description: 巡检完成统计
|
*/
|
@RequestMapping(value = "/inspection-completed", method = RequestMethod.POST)
|
public ResultVO<List<Map>> inspectionCompleted(@RequestBody StatisticsInspectionCompletedReqDTO reqDTO) {
|
List<Map> result = statisticsService.selectInspectionCompleted(reqDTO);
|
return new ResultVO<>(ResultCodes.OK, result);
|
}
|
|
|
/**
|
* @Description: 巡检任务统计
|
*/
|
@RequestMapping(value = "/inspection-task", method = RequestMethod.POST)
|
public ResultVO<Map<String, List<Map>>> inspectionTask(@RequestBody StatisticsInspectionTaskReqDTO reqDTO) {
|
Map<String, List<Map>> result = statisticsService.selectInspectionTask(reqDTO);
|
return new ResultVO<>(ResultCodes.OK, result);
|
}
|
|
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
public ResultVO selectPage(@RequestBody StatisticsPreventDangerPageReqDTO reqDTO) {
|
PageInfoExtension<Map> result = statisticsService.selectPreventDangerPage(reqDTO);
|
return new ResultVO<>(ResultCodes.OK, result);
|
}
|
|
@RequestMapping(value = "/device/level",method = RequestMethod.POST)
|
public ResultVO deviceLevel() {
|
Map result= statisticsService.countDeviceEveryLevel();
|
return new ResultVO<>(ResultCodes.OK, result);
|
}
|
}
|