1
81041
2019-10-18 cc4059f9f5a2cd6766f4d888bd35d19f3827a053
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package com.fgkj.actions;
 
import java.util.List;
 
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.User_task_param;
import com.fgkj.services.User_task_paramService;
import com.google.gson.reflect.TypeToken;
 
import com.opensymphony.xwork2.ActionSupport;
 
public class User_task_paramAction extends ActionSupport{
    private User_task_paramService service=new User_task_paramService();
    private User_task_param utp;
    private String result;
    
    
    //4.2作业参数(新增作业参数)
    public String add() {
        utp=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result,User_task_param.class);
        ServiceModel model=service.add(utp);
        result=ActionUtil.tojson(model);
        return SUCCESS;
        
    }
    //4.2作业参数(重命名操作)
    public String update() {
        utp=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result,User_task_param.class);
        ServiceModel model=service.update(utp);
        result=ActionUtil.tojson(model);
        return SUCCESS;    
    }
    
    //4.2作业参数(重命名操作)
    public String updatePro() {
        List<User_task_param> uplist=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result,new TypeToken<List<User_task_param>>(){}.getType());
        ServiceModel model=service.updatePro(uplist);
        result=ActionUtil.tojson(model);
        return SUCCESS;    
    }
    
    //4.2作业参数(删除)
    public String delete() {
        utp=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result,User_task_param.class);
        ServiceModel model=service.delete(utp);
        result=ActionUtil.tojson(model);
        return SUCCESS;    
    }
    
    //4.2查询所有参数种类
    public String searchAll(){
        ServiceModel model=service.searchAll();
        result=ActionUtil.tojson(model);
        return SUCCESS;
    }
    
    //4.2根据参数id查基本参数和模板参数
    public String serchByCondition(){
        ServiceModel model=service.serchByCondition(utp);
        result=ActionUtil.tojson(model);
        return SUCCESS;
    }
 
    public User_task_param getUtp() {
        return utp;
    }
 
    public void setUtp(User_task_param utp) {
        this.utp = utp;
    }
 
    public String getResult() {
        return result;
    }
 
    public void setResult(String result) {
        this.result = result;
    }    
}