郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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<DataCountI1RespDTO> 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<DataCountI1RespDTO> dataCountYearI1(@RequestBody DataCountI1ReqDTO dataCountI1ReqDTO) throws ParseException {
 
        ResultVO resultVO = new ResultVO<>();
        resultVO.setCode("200");
        resultVO.setMsg("查询成功");
 
        List<DataCountI1RespDTO> respDTOS = dataCountService.listYearDataCountI1(dataCountI1ReqDTO);
 
        resultVO.setData(respDTOS);
 
        return resultVO;
    }
    @RequestMapping("/dataCountMonthI2")
    public ResultVO<DataCountI2RespDTO> 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<DataCountI2RespDTO> dataCountYearI2(@RequestBody  DataCountI2ReqDTO dataCountI2ReqDTO) throws ParseException {
 
        ResultVO resultVO = new ResultVO<>();
        resultVO.setCode("200");
        resultVO.setMsg("查询成功");
 
        List<DataCountI2RespDTO> respDTOS = dataCountService.listYearDataCountI2(dataCountI2ReqDTO);
 
        resultVO.setData(respDTOS);
 
        return resultVO;
    }
}