81041
2019-06-20 e4efa2387409d35e1fc5e566b84e2065aafa30a6
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
package com.fgkj.actions;
 
import com.fgkj.dto.Sensor_inf;
import com.fgkj.dto.Sensor_state;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.Sensor_stateService;
 
 
public class Sensor_stateAction extends ActionUtil{
    private Sensor_stateService service=new Sensor_stateService();
    private String json;
    private String result;
    
    
    //根据设备id查询状态
    public String serchByCondition(){
        Sensor_state state=ActionUtil.getGson().fromJson(json, Sensor_state.class);
        ServiceModel model=service.serchByCondition(state);
        result=tojson(model);
        return SUCCESS;
    }
    
    
    
    
    public String getResult() {
        return result;
    }
    public void setJson(String json) {
        this.json = json;
    }
    
    
}