package com.fgkj.actions;
|
|
import java.util.List;
|
|
import com.fgkj.dto.BattInf;
|
import com.fgkj.dto.Cmcc_Power_Data;
|
import com.fgkj.dto.ServiceModel;
|
import com.fgkj.services.Cmcc_Power_DataService;
|
|
public class Cmcc_Power_DataAction extends ActionUtil{
|
private Cmcc_Power_DataService service = new Cmcc_Power_DataService();
|
private String json;
|
private String result;
|
|
public String add() {
|
Cmcc_Power_Data cpd = getGson().fromJson(json, Cmcc_Power_Data.class);
|
ServiceModel model = service.add(cpd);
|
result = tojson(model);
|
return SUCCESS;
|
|
}
|
public String update() {
|
Cmcc_Power_Data cpd = getGson().fromJson(json, Cmcc_Power_Data.class);
|
ServiceModel model = service.update(cpd);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
public String delete() {
|
Cmcc_Power_Data cpd = getGson().fromJson(json, Cmcc_Power_Data.class);
|
ServiceModel model = service.delete(cpd);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
|
//根据电池组id查询cmcc实时表中的实时电流画柱状图
|
public String serchByCondition(){
|
BattInf binf = getGson().fromJson(json, BattInf.class);
|
ServiceModel model = service.serchByCondition(binf);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
|
public String getResult() {
|
return result;
|
}
|
|
public void setJson(String json) {
|
this.json = json;
|
}
|
|
}
|