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;
|
}
|
}
|