lxw
2020-06-27 8aee9dfec05e1a9333abf03f1bd35dd7cfa9d352
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
package com.fgkj.actions;
 
import com.fgkj.dto.Eventdata_inf;
import com.fgkj.services.Eventdata_infService;
import com.fgkj.services.ServiceModel;
 
public class Eventdata_infAction extends ActionUtil{
    private Eventdata_infService service=new Eventdata_infService();
    private String json;
    private String result;
    
     //根据设备id查询该设备的所有事件
    public String serchByCondition() {
        Eventdata_inf einf=ActionUtil.getGson(ActionUtil.time_yyyyMMddHHmmss).fromJson(json, Eventdata_inf.class);
        ServiceModel model=service.serchByCondition(einf);
        result=tojson(model);
        return SUCCESS;
    }
    //根据事件类型查询事件出现的所有次数信息
    public String serchByInfo() {
        Eventdata_inf einf=ActionUtil.getGson(ActionUtil.time_yyyyMMddHHmmss).fromJson(json, Eventdata_inf.class);
        ServiceModel model=service.serchByInfo(einf);
        result=tojson(model);
        return SUCCESS;
    }
    
    
    public String getResult() {
        return result;
    }
    public void setJson(String json) {
        this.json = json;
    }
    
    
 
}