1
81041
2019-06-20 ab3c4acf83f54f8449ca8664c4a2bb79bd30f297
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
package com.fgkj.actions.ram.rt;
 
 
import com.fgkj.actions.ActionUtil;
import com.fgkj.dto.Batt_Maint_Dealarm;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.rt.Rtstate_rtService;
 
public class Rtstate_rtAction extends ActionUtil{
    private Rtstate_rtService service = new Rtstate_rtService();
    private String json;
    private String result;
    
    //测试数据——实时查询中左下角的充放电统计
    public String serchDisOrChargr(){
        ServiceModel model= service.serchDisOrChargr();
        result = tojson(model);
        return SUCCESS;
    }
    
    //电池组实时情况+实时电池续航能力查询
    public String serchBattLife(){
        Batt_Maint_Dealarm bmd = getGson().fromJson(json, Batt_Maint_Dealarm.class);
        ServiceModel model = service.serchBattLife(bmd);
        result = tojson(model);
        return SUCCESS;
    }
    
    //首页上饼状图电池状态比例
    public String serchBattStateRate(){
        ServiceModel model = service.serchBattStateRate();
        result = tojson(model);
        return SUCCESS;
    }
 
    public String getResult() {
        return result;
    }
 
    public void setJson(String json) {
        this.json = json;
    }
}