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
83
84
85
package com.fgkj.actions.ram;
 
import java.util.List;
 
import com.fgkj.actions.ActionUtil;
import com.fgkj.dto.BattInf;
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.ram.Fbs9100_state;
import com.fgkj.dto.ram.Fbs9100s_dfu_state;
import com.fgkj.services.ram.Fbs9100s_dfu_stateService;
import com.google.gson.reflect.TypeToken;
 
public class Fbs9100s_dfu_stateAction extends ActionUtil{
    private Fbs9100s_dfu_stateService service = new Fbs9100s_dfu_stateService();
    private String json;
    private String result;
    
    //升级插入
    public String add(){
        Fbs9100s_dfu_state dfu=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100s_dfu_state.class);
        ServiceModel model=service.add(dfu);
        result=tojson(model);
        return SUCCESS;
    }
    //升级插入
    public String addPro(){
        BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
        ServiceModel model=service.addPro(binf);
        result=tojson(model);
        return SUCCESS;
    }
    //表格显示批量插入的机房信息
    public String serchInserStation(){
        BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,BattInf.class);
        ServiceModel model=service.serchInserStation(binf);
        result=tojson(model);
        return SUCCESS;
    }
    
    //批量升级前验证升级的设备必须处于在线监测状态(9100state的workstate为0)
    public String judgeStation(){
        List<Integer>  list=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<Integer>>(){}.getType());
        ServiceModel model=service.judgeStation(list);
        result=tojson(model);
        return SUCCESS;
    }
    
    //升级确认
    public String update(){
        Fbs9100s_dfu_state dfu=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100s_dfu_state.class);
        ServiceModel model=service.update(dfu);
        result=tojson(model);
        return SUCCESS;
    }
    //批量升级确认
    public String updatePro(){
        List<Fbs9100s_dfu_state>  list=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<Fbs9100s_dfu_state>>(){}.getType());
        ServiceModel model=service.updatePro(list);
        result=tojson(model);
        return SUCCESS;
    }
    //升级界面实时刷新
    public String serchByCondition(){
        List<Integer>  list=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<Integer>>(){}.getType());
        ServiceModel model=service.serchByCondition(list);
        result=tojson(model);
        return SUCCESS;
    }
    //升级界面实时刷新
    public String searchAll(){
        ServiceModel model=service.searchAll();
        result=tojson(model);
        return SUCCESS;
    }
    public String getResult() {
        return result;
    }
    public void setJson(String json) {
        this.json = json;
    }
    
    
    
 
}