whycrzg
2021-02-03 f3e160c4c6690232da3258adb42c1f702cd8bb07
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
package com.fgkj.controller;
 
import com.fgkj.dto.Batt_realdata;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.history.Batt_realdataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
import java.util.Date;
 
@RequestMapping("battRealData")
@RestController
@Api(tags = "battRealData接口")
public class Batt_realdataController{
 
    @Resource
    private Batt_realdataService service;
 
     //按照时间倒序查出具体电池组的所有信息
    @PostMapping("byCondition")
    @ApiOperation(notes = "",value="按照时间倒序查出具体电池组的所有信息")
    public ServiceModel serchByCondition(@ApiParam(value = "battGroupId 1000002", required = true) @RequestParam Integer battGroupId, @ApiParam(value = "前一时间 格式2017/12/29 09:28:31", required = true) @RequestParam Date record_time, @ApiParam(value = "后一时间", required = true) @RequestParam Date record_time1,@RequestParam Integer pageNum,@RequestParam Integer pageSize) {
        Batt_realdata realData = new Batt_realdata();
        realData.setBattGroupId(battGroupId);
        realData.setRecord_time(record_time);
        realData.setRecord_time1(record_time1);
        ServiceModel model = service.serchByCondition(realData,pageNum,pageSize);
 
        return model;
    }
 
}