1
81041
2019-06-20 ab3c4acf83f54f8449ca8664c4a2bb79bd30f297
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
65
66
67
68
69
70
71
72
73
package com.fgkj.actions;
 
import com.fgkj.dto.Batttestdata;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.BatttestdataService;
import com.fgkj.services.Batttestdata_infService;
import com.opensymphony.xwork2.ActionSupport;
 
public class BatttestdataAction extends ActionUtil{
    private BatttestdataService service = new BatttestdataService();
    private String result;
    private Batttestdata btd;
    private String json;
 
    public String findByInfo() {
        //System.out.println(btd);
        ServiceModel model = service.serchByCondition(btd);
        result = ActionUtil.tojson(model);
        model = null;
        System.gc();
        return SUCCESS;
    }
    
    /**
     * 历史数据查询
     * @return
     */
    public String findhistory(){
        Batttestdata btd = ActionUtil.getGson().fromJson(json, Batttestdata.class);
        //System.out.println(btd);
        ServiceModel model = service.serchByCondition(btd);
        result = ActionUtil.tojson(model);
        //System.out.println("*************************");
        return SUCCESS;
    }
    
    /**
     * 历史数据查询            <!-------------  跨域访问 -------------------->
     * @return
     */
    public String findhistory_ky(){
        //isAllowHeaders();
        ServiceModel model = new ServiceModel();
        btd = ActionUtil.getGson().fromJson(json, Batttestdata.class);
        model = service.serchByCondition_ky(btd);
        result = ActionUtil.tojson(model);
        return SUCCESS;
    }
 
    
    public void setBtd(Batttestdata btd) {
        this.btd = btd;
    }
 
    public String getResult() {
        return result;
    }
 
    public Batttestdata getBtd() {
        return btd;
    }
 
    public void setResult(String result) {
        this.result = result;
    }
 
    public void setJson(String json) {
        this.json = json;
    }
    
    
 
}