DELL
6 天以前 88abda34da2c7437c8191da83972279d18ff9418
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.db_data_history.PwrdevHistorydataId;
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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import java.text.ParseException;
 
@RestController
@Api(tags = "实时页面")
@RequestMapping("real")
public class RealContoller {
    @Autowired
    private PwrdevHistorydataIdService pwrdevHistorydataIdService;
 
    @Autowired
    private BattRealdataIdService battRealdataIdService;
 
    @Autowired
    private BatttestdataInfService tinfService;
 
    @Autowired
    private BatttestdataIdService tdataIdService;
 
    @ApiOperation(value = "系统概览获取半小时交流输入统计")
    @GetMapping("getHalfHourPwrHisAcinData")
    public Response getHalfHourPwrHisAcinData(@RequestParam Integer powerId,@RequestParam Integer granularity){
        return pwrdevHistorydataIdService.getHalfHourPwrHisAcinData(powerId,granularity);
    }
 
    @ApiOperation(value = "系统概览获取半小时直流输出统计")
    @GetMapping("getHalfHourPwrHisDcoutData")
    public Response getHalfHourPwrHisDcoutData(@RequestParam Integer powerId,@RequestParam Integer granularity){
        return pwrdevHistorydataIdService.getHalfHourPwrHisDcoutData(powerId,granularity);
    }
 
    @ApiOperation(value = "系统概览获取半小时核容设备信息")
    @GetMapping("getHalfHourBattDevData")
    public Response getHalfHourBattDevData(@RequestParam Integer battgroupId,@RequestParam Integer granularity){
        return battRealdataIdService.getHalfHourBattDevData(battgroupId,granularity);
    }
 
    @ApiOperation(value = "历史测试记录")
    @GetMapping("getBattTinf")
    public Response getBattTinf(@RequestParam Integer battgroupId){
        return tinfService.getBattTinf(battgroupId);
    }
 
    @ApiOperation(value = "历史测试记录具体某一次放电数据详情")
    @GetMapping("getTinfDataWithTestRecordCount")
    public Response getTinfDataWithTestRecordCount(@RequestParam Integer battgroupId,@RequestParam Integer testRecordCount
            ,@RequestParam Integer recordNum,@RequestParam Integer granularity){
        return tdataIdService.getTinfDataWithTestRecordCount(battgroupId,testRecordCount,recordNum,granularity);
    }
 
    @ApiOperation(value = "历史实时查询")
    @GetMapping("getBattRealDataHis")
    public Response getBattRealDataHis(@RequestParam Integer battgroupId,@RequestParam Integer granularity
            ,@RequestParam String startTime,@RequestParam String  endTime) throws ParseException, InterruptedException {
        return battRealdataIdService.getBattRealDataHis(battgroupId,granularity,startTime,endTime);
    }
}