package com.fgkj.actions;
|
|
import com.fgkj.dao.UinfDaoFactory;
|
import com.fgkj.dto.Batt_attention;
|
import com.fgkj.dto.Process_survey;
|
import com.fgkj.dto.ServiceModel;
|
import com.fgkj.dto.User_log;
|
import com.fgkj.services.Process_surveyService;
|
import com.fgkj.services.User_logService;
|
|
public class Process_surveyAction extends ActionUtil{
|
private Process_surveyService service=new Process_surveyService();
|
private User_logService uservice=new User_logService();
|
private String result;
|
private String json;
|
|
|
//查询所有进程的运行情况
|
public String searchAll() {
|
ServiceModel model=service.searchAll();
|
result = ActionUtil.tojson(model);
|
return SUCCESS;
|
}
|
//界面修改进程名字和超时时间
|
public String updateAll() {
|
Process_survey process = getGson().fromJson(json, Process_survey.class);
|
ServiceModel model = service.updateAll(process);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//界面修改进程同服务对应的标识位
|
public String updateFlag() {
|
Process_survey process = getGson().fromJson(json, Process_survey.class);
|
ServiceModel model = service.updateFlag(process);
|
{
|
String msg="重启"+process.getServerName()+"服务";
|
User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Alter, msg);
|
uservice.add(ulog);//将用户的操作记录下来
|
}
|
result = tojson(model);
|
return SUCCESS;
|
}
|
//验证重启密码
|
public String judgeRestart(){
|
ServiceModel model = service.judgeRestart(json);
|
result = tojson(model);
|
return SUCCESS;
|
}
|
public void setJson(String json) {
|
this.json = json;
|
}
|
|
public String getResult() {
|
return result;
|
}
|
|
}
|