whycxzp
2021-08-25 17f4f93f2c200e337c16aac8383195c2099d028d
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.service.BatteryDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 电池数据统计
 * TODO: 单体统计每日更新一次,从缓存中获取提高效率
 */
@RestController
@RequestMapping("batteryData")
@Api(tags = "电池数据统计")
public class BatteryDataController {
 
    @Autowired
    private BatteryDataService service;
 
    @GetMapping("endurance")
    @ApiOperation(value="设备续航")
    public Response getEndurance(@RequestParam Integer userId){
        return service.getEndurance(userId);
    }
 
    @GetMapping("batteryCap")
    @ApiOperation(value = "电池组容量")
    public Response getBatteryCap(@RequestParam Integer userId){
        return service.getBatteryCap(userId);
    }
 
    @GetMapping("monVol")
    @ApiOperation(value = "单体电压统计")
    public Response getMonVol(@RequestParam Integer userId){
        return service.getMonVol(userId);
    }
 
    @GetMapping("monTemp")
    @ApiOperation(value = "单体温度统计")
    public Response getMonTemp(@RequestParam Integer userId){
        return service.getMonTemp(userId);
    }
 
    @GetMapping("monRes")
    @ApiOperation(value = "单体电阻统计")
    public Response getMonRes(@RequestParam Integer userId){
        return service.getMonRes(userId);
    }
 
    /**
     * TODO:单体容量统计,统计格式待定
     */
    @GetMapping("monCap")
    @ApiOperation(value = "单体容量统计")
    public Response getMonCap(@RequestParam Integer userId){
        return service.getMonCap(userId);
    }
 
 
}