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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package com.fgkj.actions;
 
import com.fgkj.dto.BattInf;
import com.fgkj.dto.Batt_Maint_Dealarm;
import com.fgkj.dto.Battresdata;
import com.fgkj.dto.ServiceModel;
import com.fgkj.services.BattresdataService;
import com.opensymphony.xwork2.ActionSupport;
 
public class BattresdataAction extends ActionUtil {    
    private BattresdataService service = new BattresdataService();
    private String json;
    private String result;
    private Battresdata brd;
     //根据电池组id和单体id查询内阻历史信息
    public String serchByMonHistory() {
        BattInf binf=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
        ServiceModel model = service.serchByMonHistory(binf);
        result = ActionUtil.tojson(model);
        return SUCCESS;
    }
    
    public String add() {
        ServiceModel model = service.add(brd);
        result = ActionUtil.tojson(model);
        //System.out.println(result);
        return SUCCESS;
    }
 
    public String update() {
        ServiceModel model = service.update(brd);
        result = ActionUtil.tojson(model);
        //System.out.println(result);
        return SUCCESS;
    }
 
    public String delete() {
        ServiceModel model = service.delete(brd);
        result = ActionUtil.tojson(model);
        //System.out.println(result);
        return SUCCESS;
    }
 
    public String serchByCondition() {
        
        ServiceModel model = service.serchByCondition(brd);
        result = ActionUtil.tojson(model);
        //System.out.println(result);
        return SUCCESS;
    }
 
    public String searchAll() {
        ServiceModel model = service.searchAll(brd);
        result = ActionUtil.tojson(model);
        //System.out.println(result);
        return SUCCESS;
    }
 
    public String getResult() {
        return result;
    }
 
    public void setResult(String result) {
        this.result = result;
    }
    
    public void setJson(String json) {
        this.json = json;
    }
 
    public String getJson() {
        return json;
    }
 
    public Battresdata getBrd() {
        return brd;
    }
 
    public void setBrd(Battresdata brd) {
        this.brd = brd;
    }
}