whyclxw
2022-01-10 00b61a61b2a90c85aeae872e351ddf4bb2b516cf
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
package com.whyc.controller;
 
import com.github.pagehelper.PageInfo;
import com.whyc.dto.BattTestDataDTO;
import com.whyc.dto.Response;
import com.whyc.pojo.BatttestdataInf;
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.*;
 
@RestController
@RequestMapping("battTestData")
@Api(tags = "在线监测-历史数据管理")
public class BattTestDataInf2Controller {
 
    @Autowired
    private BattTestDataInf2Service service;
 
    @PostMapping("calcTestData")
    @ApiOperation(value = "电池组的历史测试数据查询并统计可能存在的落后单体",notes = "原接口:BattTest_ResAction!serchByCondition")
    public Response<PageInfo<BatttestdataInf>> calcTestData(@RequestBody BattTestDataDTO paramDto,
                                                                @RequestParam Integer pageNum,
                                                                @RequestParam Integer pageSize){
        paramDto.setUId(ActionUtil.getUser().getUId());
        PageInfo<BatttestdataInf> page = service.calcTestData(paramDto,pageNum,pageSize);
        return new Response<PageInfo<BatttestdataInf>>().set(1,page);
    }
 
}