whyclxw
2025-06-05 c3f2b09d8dc64bc7e8100c01a15cb3c933b5d70e
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.dto.Statistic.*;
import com.whyc.pojo.db_user.User;
import com.whyc.service.*;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RestController
@Api(tags = "统计管理")
@RequestMapping("statistic")
public class StatisticController {
    @Autowired
    private StationInfService stationInfService;
 
    @Autowired
    private BatttestdataInfService battTinfService;
    @Autowired
    private BattInfService battService;
 
    @Autowired
    private PowerInfService powerInfService;
 
    @Autowired
    private DeviceStateService deviceStateService;
 
    @ApiOperation(value = "电源信息统计(1.2.1/1.2.13)")
    @PostMapping("getPowerStatistic")
    public Response getPowerStatistic(@RequestBody StationStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return powerInfService.getPowerStatistic(stic);
    }
 
    @ApiOperation(value = "设备信息统计(1.2.2)")
    @PostMapping("getDevStatistic")
    public Response getDevStatistic(@RequestBody StationStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return battService.getDevStatistic(stic);
    }
 
    @ApiOperation(value = "蓄电池组信息统计(1.2.3/1.2.12)")
    @PostMapping("getBattStatistic")
    public Response getBattStatistic(@RequestBody StationStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return battService.getBattStatistic(stic);
    }
 
    @ApiOperation(value = "单节数量统计(1.2.4)")
    @PostMapping("getMonStatistic")
    public Response getMonStatistic(@RequestBody MonStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return battTinfService.getMonStatistic(stic);
    }
 
 
    @ApiOperation(value = "站点信息统计(1.2.11)")
    @PostMapping("getStationStatistic")
    public Response getStationStatistic(@RequestBody StationStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return stationInfService.getStationStatistic(stic);
    }
 
    @ApiOperation(value = "蓄电池核容信息统计(1.2.14)")
    @PostMapping("getBattTinfStatistic")
    public Response getBattTinfStatistic(@RequestBody BattTinfStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return battTinfService.getBattTinfStatistic(stic);
    }
    @ApiOperation(value = "蓄电池组对比分析界面(同一品牌同一时间)(1.2.15)")
    @PostMapping("getBattCompare15Statistic")
    public Response getBattCompare15Statistic(@RequestBody BattCompareStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return battTinfService.getBattCompare15Statistic(stic);
    }
 
    @ApiOperation(value = "蓄电池组对比分析界面(不同品牌同一时间)(1.2.16)")
    @PostMapping("getBattCompare16Statistic")
    public Response getBattCompare16Statistic(@RequestBody BattCompareStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return battTinfService.getBattCompare16Statistic(stic);
    }
 
    @ApiOperation(value = "蓄电池组对比分析界面(同一品牌不同时间)(1.2.17)")
    @PostMapping("getBattCompare17Statistic")
    public Response getBattCompare17Statistic(@RequestBody BattCompareStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return battTinfService.getBattCompare17Statistic(stic);
    }
 
    @ApiOperation(value = "设备工作状态统计(1.2.21)")
    @PostMapping("getDeviceStateStatistic")
    public Response getDeviceStateStatistic(@RequestBody DeviceStateStic stic){
        User uinf= ActionUtil.getUser();
        stic.setUid(uinf.getId());
        return deviceStateService.getDeviceStateStatistic(stic);
    }
 
 
}