81041
2020-01-06 dc4e90ff7d720a78dba3aa72d868b89f69eafff7
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
package com.fgkj.actions;
 
import com.fgkj.dto.BattInf;
import com.fgkj.dto.Page;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.Battalarm_data_historyService;
 
public class Battalarm_data_historyAction extends ActionUtil{
    private Battalarm_data_historyService service=new Battalarm_data_historyService();
    private String result;
    private String json;
    
    
    //查询所有的历史告警
    public String searchAll() {
        ServiceModel model=service.searchAll();
        result=tojson(model);
        return SUCCESS;
    }
    //查询所有的历史告警(分页)
    public String serchByInfo() {
        BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
        ServiceModel model=service.serchByInfo(binf);
        result=tojson(model);
        return SUCCESS;
    }
     //根据电池组id查询电池告警的详细情况
    public String serchByCondition() {
        BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
        ServiceModel model=service.serchByCondition(binf);
        result=tojson(model);
        return SUCCESS;
    }
    public String getResult() {
        return result;
    }
    public void setJson(String json) {
        this.json = json;
    }
}