whycxzp
2021-12-25 38f167e7adbe060cfaa234a618ba56d374edef36
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
package com.whyc.controller;
 
import com.github.pagehelper.PageInfo;
import com.whyc.dto.BattTestDataCalcDTO;
import com.whyc.dto.BattTestDataDTO;
import com.whyc.dto.Response;
import com.whyc.pojo.UserInf;
import com.whyc.service.BattTestDataInf2Service;
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.*;
 
import java.util.List;
 
@RestController
@RequestMapping("battTestData")
@Api(tags = "在线监测-历史数据管理")
public class BattTestDataInf2Controller {
 
    @Autowired
    private BattTestDataInf2Service service;
 
    @PostMapping("calcTestData")
    @ApiOperation(value = "电池组的历史测试数据查询并计算落后单体",notes = "原接口:BattTest_ResAction!serchByCondition")
    public Response<PageInfo<BattTestDataCalcDTO>> calcTestData(@RequestBody BattTestDataDTO paramDto,
                                                                @RequestParam Integer pageNum,
                                                                @RequestParam Integer pageSize){
        PageInfo<BattTestDataCalcDTO> page = service.calcTestData(paramDto,pageNum,pageSize);
        return new Response().set(1,page);
    }
 
    @GetMapping
    @ApiOperation(value = "维护区查询")
    public Response<List<String>>  getStationName1(){
        UserInf user = ActionUtil.getUser();
        List<String> stationName1List = service.getStationName1(user.getUId());
        return new Response<List<String>>().set(1,stationName1List);
    }
 
 
 
}