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
41
42
43
44
45
46
47
48
package com.fgkj.actions;
 
import com.fgkj.dto.BattInf;
import com.fgkj.dto.Page;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.Battalarm_dataService;
 
public class Battalarm_dataAction extends ActionUtil{
    private Battalarm_dataService service=new Battalarm_dataService();
    private String result;
    private String json;
    
    
    //根据电池组id查询告警信息
    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);Page page=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Page.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 searchAlarmNum() {
        BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
        ServiceModel model=service.searchAlarmNum(binf);
        result=tojson(model);
        return SUCCESS;
    }
    public String getResult() {
        return result;
    }
    public void setJson(String json) {
        this.json = json;
    }
}