lxw
2020-07-11 9db52f2f2dd3665fe9da1ae5657e0167c3a34d40
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
package com.fgkj.actions.ram;
 
import com.fgkj.actions.ActionUtil;
import com.fgkj.dto.BattInf;
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.User_inf;
import com.fgkj.services.ram.Bts_station_stateService;
 
public class Bts_station_stateAction extends ActionUtil{
    private Bts_station_stateService service=new Bts_station_stateService();
    private String  json;
    private String result;
    //查询机房实时状态
    public String serchByCondition(){
        BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
        User_inf uinf=(User_inf) getUser();
        binf.setNum(uinf.getUId());
        ServiceModel model=service.serchByCondition(binf);
        result=tojson(model);
        return SUCCESS;
    }
  //查询当前机房停电数
    public String serchByState(){
        User_inf uinf=(User_inf) getUser();
        ServiceModel model=service.serchByState(uinf);
        result=tojson(model);
        return SUCCESS;
    }
    
   //机房断电统计(首页上的饼状图)
    public String serchPowerOff(){
        User_inf uinf=(User_inf) ActionUtil.getUser();
        ServiceModel model = service.serchPowerOff(uinf);
        result = tojson(model);              
        return SUCCESS;
    }
  //地图右下角显示出已安装机房中(停电数/掉站数/机房告警数/落后单体机房数)
    public String serchStationState(){
        User_inf uinf=(User_inf) ActionUtil.getUser();
        ServiceModel model = service.serchStationState(uinf);
        result = tojson(model);              
        return SUCCESS;
    }
  //查询设备SD卡的实时状态
    public String serchSDCard(){
        BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
        ServiceModel model = service.serchSDCard(binf);
        result=tojson(model);
        return SUCCESS;
    }
    
    
    
    
    public String getResult() {
        return result;
    }
    public void setJson(String json) {
        this.json = json;
    }
      
      
      
      
}