whycxzp
2022-11-16 021b14dccaa0cf8b0b0e84272c2b9314f9dd07dc
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.dto.paramter.GroupTestCapPar;
import com.whyc.pojo.Battinf;
import com.whyc.service.BatttestdataInfService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
 
/**
 * 电池续航能力历史查询
 */
@RequestMapping("Batttestdata_infAction")
@RestController
@Api(tags = "在线监测-历史监控")
public class BatttestdataInfController {
 
    @Resource
    private BatttestdataInfService service;
 
 
    @PostMapping("/searchBattTestInfDataById")
    @ApiOperation(value = "获取充放电记录")
    public Response searchBattTestInfDataById(@RequestParam int battGroupId,@RequestParam int fbsDeviceId) {
        return service.searchBattTestInfDataById(battGroupId,fbsDeviceId);
    }
 
    @PostMapping("/searchBattLastHrDataById")
    @ApiOperation(value = "最后一次核容放电数据")
    public Response searchBattLastHrDataById(@RequestParam int battGroupId, @RequestParam int devId) {
        return service.searchBattLastHrDataById(battGroupId, devId);
    }
 
    @PostMapping("/searchBattLife")
    @ApiOperation(value = "电池组历史放电数据续航能力查询", notes = "Batttestdata_infAction!serchBattLife,num: 3, //电池状态\n" +
            "    BattGroupId: this.selectValue3, //续航能力类型             \n" +
            "    StationName: this.selectValue2, //机房类型\n" +
            "    StationName1: this.selectValue1, //维护区\n" +
            "    BattProductDate: this.startDrsj,\n" +
            "    BattProductDate1: this.endDrsj, //生产日期段")
    public Response searchBattLife(@RequestParam int pageNum, @RequestParam int pageSize, @RequestBody Battinf binf) {
        if (binf.getBattGroupId() == 0) {
            return service.searchBattLifeNow(pageNum, pageSize, binf);
        }
        if (binf.getBattGroupId() == 1) {
            return service.searchBattLife(pageNum, pageSize, binf);
        }
        return new Response().set(1, false, "参数错误");
    }
 
    @PostMapping("/searchGroupTestCap")
    @ApiOperation(value = "统计时间段内设备的测试容量")
    public Response searchGroupTestCap(@RequestBody GroupTestCapPar groupCapPar) {
        return service.searchGroupTestCap(groupCapPar);
    }
 
}