package com.fgkj.actions.ram;
|
|
import java.util.List;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import com.fgkj.actions.ActionUtil;
|
import com.fgkj.dto.BattInf;
|
import com.fgkj.dto.ServiceModel;
|
import com.fgkj.dto.User_inf;
|
import com.fgkj.dto.ram.Fbs9100_state;
|
import com.fgkj.dto.ram.Fbs9600_state;
|
import com.fgkj.services.ram.Fbs9100_stateService;
|
import com.google.gson.reflect.TypeToken;
|
|
public class Fbs9100_stateAction extends ActionUtil{
|
private Fbs9100_stateService service = new Fbs9100_stateService();
|
private String result;
|
private String json;
|
|
public String add() {
|
Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class);
|
ServiceModel model = service.add(state);
|
result = tojson(model);
|
return SUCCESS;
|
|
}
|
public String update() {
|
Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class);
|
ServiceModel model = service.update(state);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//fbs9600设备内阻测试
|
public String updatePro() {
|
List<Fbs9100_state> list =getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, new TypeToken<List<Fbs9100_state>>(){}.getType());
|
ServiceModel model = service.updatePro(list);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
public String delete() {
|
Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class);
|
ServiceModel model = service.delete(state);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//FBS9600设备内阻测试显示全部9600设备的信息
|
public String searchByUid(){
|
User_inf uinf=(User_inf) getUser();
|
ServiceModel model = service.searchByUid(uinf);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//11.1FBS9100设备通信状态查询
|
public String serchByCondition(){
|
//System.out.println(json);
|
Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class);
|
User_inf uinf=(User_inf) ActionUtil.getUser();
|
state.setNum(uinf.getUId());//将用户id存放在Fbs9100_state的num中用于处理用户管理的机房问题
|
ServiceModel model = service.serchByCondition(state);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//实时监测界面根据dev_alarmstate状态判断接触器状态
|
public String serchContactorState() {
|
Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class);
|
ServiceModel model = service.serchContactorState(state);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//放电测试界面根据设备id查询网络拓扑图
|
public String serchByInfo() {
|
BattInf binf = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
|
ServiceModel model = service.serchByInfo(binf);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
public String searchAll(){
|
ServiceModel model = service.searchAll();
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//实时界面左侧导航实时查询61850设备是否存在4种告警
|
public String serchBy61850Alarms(){
|
ServiceModel model = service.serchBy61850Alarms();
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//查询61850设备的6种工作状态
|
public String searchDevWorkstate(){
|
Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class);
|
User_inf uinf=(User_inf) getUser();
|
state.setNum(uinf.getUId());
|
ServiceModel model = service.searchDevWorkstate(state);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//查询BTS设备的3种工作状态<在线监测,预充电,放电>
|
public String searchBtsWorkstate(){
|
Fbs9100_state state = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Fbs9100_state.class);
|
User_inf uinf=(User_inf) getUser();
|
state.setNum(uinf.getUId());
|
ServiceModel model = service.searchBtsWorkstate(state);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
|
//导航上实时查询61850设备的处于核容测试的数据
|
public String seach6185Nuclear_cap(){
|
User_inf uinf=(User_inf) getUser();
|
ServiceModel model = service.seach6185Nuclear_cap(uinf);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//导航上实时查询bts处于放电测试的数据的设备
|
public String seachNuclear_cap(){
|
User_inf uinf=(User_inf) getUser();
|
ServiceModel model = service.seachNuclear_cap(uinf);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//批量设置放电参数时查询出当前放电的电池组(1u/2u分开)
|
public String seachDischarge(){
|
BattInf binf=getGson().fromJson(json, BattInf.class);
|
User_inf uinf=(User_inf) getUser();
|
binf.setBattGroupId(uinf.getUId());
|
ServiceModel model = service.seachDischarge(binf);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
|
//查询出当前所有设备的版本信息(首页大查询)
|
public String serchDev_version(){
|
ServiceModel model = service.serchDev_version();
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//实时刷新批量设置放电参数
|
public String freshenDischarge(){
|
List list=getGson().fromJson(json,new TypeToken<List<BattInf>>(){}.getType());
|
ServiceModel model = service.freshenDischarge(list);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//11.1FBS9100设备通信状态查询 <-- 跨域 -->
|
public String serchByCondition_ky(){
|
//isAllowHeaders(); //允许跨域访问
|
ServiceModel model = new ServiceModel();
|
model = service.serchByCondition_ky();
|
result = tojson(model);
|
return SUCCESS;
|
}
|
|
|
public String getResult() {
|
return result;
|
}
|
public void setJson(String json) {
|
this.json = json;
|
}
|
|
|
}
|