package com.gkhy.safePlatform.doublePrevention.controller; import com.gkhy.safePlatform.commons.vo.ResultVO; import com.gkhy.safePlatform.doublePrevention.entity.dto.req.DataCountI1ReqDTO; import com.gkhy.safePlatform.doublePrevention.entity.dto.req.DataCountI2ReqDTO; import com.gkhy.safePlatform.doublePrevention.entity.dto.resp.DataCountI1RespDTO; import com.gkhy.safePlatform.doublePrevention.entity.dto.resp.DataCountI2RespDTO; import com.gkhy.safePlatform.doublePrevention.service.DataCountService; 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.RestController; import java.text.ParseException; import java.util.List; @RestController @RequestMapping("prevent/countData") public class PreventCountDataTestController { @Autowired private DataCountService dataCountService; @RequestMapping("/dataCountMonthI1") public ResultVO dataCountMonthI1(@RequestBody DataCountI1ReqDTO dataCountI1ReqDTO) throws ParseException { ResultVO resultVO = new ResultVO<>(); resultVO.setCode("200"); resultVO.setMsg("查询成功"); DataCountI1RespDTO respDTO = dataCountService.listMonthDataCountI1(dataCountI1ReqDTO); resultVO.setData(respDTO); return resultVO; } @RequestMapping("/dataCountYearI1") public ResultVO dataCountYearI1(@RequestBody DataCountI1ReqDTO dataCountI1ReqDTO) throws ParseException { ResultVO resultVO = new ResultVO<>(); resultVO.setCode("200"); resultVO.setMsg("查询成功"); List respDTOS = dataCountService.listYearDataCountI1(dataCountI1ReqDTO); resultVO.setData(respDTOS); return resultVO; } @RequestMapping("/dataCountMonthI2") public ResultVO dataCountMonthI2(@RequestBody DataCountI2ReqDTO dataCountI2ReqDTO) throws ParseException { ResultVO resultVO = new ResultVO<>(); resultVO.setCode("200"); resultVO.setMsg("查询成功"); DataCountI2RespDTO respDTO = dataCountService.listMonthDataCountI2(dataCountI2ReqDTO); resultVO.setData(respDTO); return resultVO; } @RequestMapping("/dataCountYearI2") public ResultVO dataCountYearI2(@RequestBody DataCountI2ReqDTO dataCountI2ReqDTO) throws ParseException { ResultVO resultVO = new ResultVO<>(); resultVO.setCode("200"); resultVO.setMsg("查询成功"); List respDTOS = dataCountService.listYearDataCountI2(dataCountI2ReqDTO); resultVO.setData(respDTOS); return resultVO; } }