package com.fgkj.actions;
|
|
import com.fgkj.dto.Batttestdata;
|
import com.fgkj.dto.ServiceModel;
|
import com.fgkj.services.BatttestdataService;
|
import com.fgkj.services.Batttestdata_infService;
|
import com.opensymphony.xwork2.ActionSupport;
|
|
public class BatttestdataAction extends ActionSupport {
|
private BatttestdataService service = new BatttestdataService();
|
private String result;
|
private Batttestdata btd;
|
private String json;
|
|
public String findByInfo() {
|
//System.out.println(btd);
|
ServiceModel model = service.serchByCondition(btd);
|
result = ActionUtil.tojson(model);
|
model = null;
|
System.gc();
|
return SUCCESS;
|
}
|
|
/**
|
* 历史数据查询
|
* @return
|
*/
|
public String findhistory(){
|
Batttestdata btd = ActionUtil.getGson().fromJson(json, Batttestdata.class);
|
//System.out.println(btd);
|
ServiceModel model = service.serchByCondition(btd);
|
result = ActionUtil.tojson(model);
|
//System.out.println("*************************");
|
return SUCCESS;
|
}
|
/**
|
* 历史数据查询 <!------------- 跨域访问 -------------------->
|
* @return
|
*/
|
public String findhistory_ky(){
|
//isAllowHeaders();
|
ServiceModel model = new ServiceModel();
|
btd = ActionUtil.getGson().fromJson(json, Batttestdata.class);
|
model = service.serchByCondition_ky(btd);
|
result = ActionUtil.tojson(model);
|
return SUCCESS;
|
}
|
|
|
public void setBtd(Batttestdata btd) {
|
this.btd = btd;
|
}
|
|
public String getResult() {
|
return result;
|
}
|
|
public Batttestdata getBtd() {
|
return btd;
|
}
|
|
public void setResult(String result) {
|
this.result = result;
|
}
|
|
public void setJson(String json) {
|
this.json = json;
|
}
|
|
|
|
}
|