1
81041
2019-06-20 ab3c4acf83f54f8449ca8664c4a2bb79bd30f297
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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;
    }
    
}