whycrzg
2021-02-03 f628be11a131a262855908b7815c3027d6bafb4c
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
package com.fgkj.controller;
 
import com.fgkj.util.*;
 
import com.fgkj.dto.Batttestdata;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.BatttestdataService;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
@RequestMapping("battTestData")
@RestController
@Api(tags = "battTestData接口")
public class BatttestdataController{
 
    @Resource
    private BatttestdataService service;
 
    // private Batttestdata btd;
 
    @GetMapping("byInfo")
    @ApiOperation(notes = "",value="byInfo")
    public ServiceModel findByInfo(@RequestBody Batttestdata btd) {
        ServiceModel model = service.serchByCondition(btd);
        
        model = null;
        System.gc();
        return model;
    }
    
    /**
     * 历史数据查询
     * @return
     */
    @GetMapping("history")
    @ApiOperation(notes = "",value="历史数据查询")
    public ServiceModel findhistory(@RequestBody Batttestdata btd){
        // Batttestdata btd = ActionUtil.getGson().fromJson(json, Batttestdata.class);
        ServiceModel model = service.serchByCondition(btd);
        
        //System.out.println("*************************");
        return model;
    }
    /**
     * 历史数据查询            <!-------------  跨域访问 -------------------->
     * @return
     */
    @GetMapping("history_ky")
    @ApiOperation(tags = "跨域", notes = "",value="历史数据查询 跨域专用")
    public ServiceModel findhistory_ky(@RequestBody Batttestdata btd){
        // btd = ActionUtil.getGson().fromJson(json, Batttestdata.class);
        ServiceModel model = service.serchByCondition_ky(btd);
        
        return model;
    }
 
}