TaskFollowController.java
5.05 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
package com.hotent.runtime.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.hotent.base.annotation.ApiGroup;
import com.hotent.base.constants.ApiGroupConsts;
import com.hotent.base.controller.BaseController;
import com.hotent.base.model.CommonResult;
import com.hotent.base.query.PageList;
import com.hotent.base.query.QueryFilter;
import com.hotent.base.query.QueryOP;
import com.hotent.base.util.AuthenticationUtil;
import com.hotent.base.util.StringUtil;
import com.hotent.base.util.UniqueIdUtil;
import com.hotent.bpm.persistence.manager.TaskFollowManager;
import com.hotent.bpm.persistence.model.TaskFollow;
import com.hotent.uc.api.impl.util.ContextUtil;
import com.hotent.uc.api.service.IUserService;
/**
*
* <pre>
* 描述:任务跟踪表 控制器类
* 构建组:x7
* 作者:maoww
* 邮箱:maoww@jee-soft.cn
* 日期:2018-11-13 19:04:41
* 版权:广州宏天软件有限公司
* </pre>
*/
@RestController
@RequestMapping(value="/runtime/taskFollow/v1")
@Api(tags="跟踪任务")
@ApiGroup(group= {ApiGroupConsts.GROUP_BPM})
public class TaskFollowController extends BaseController<TaskFollowManager,TaskFollow>{
@Resource
TaskFollowManager taskFollowManager;
@Resource
IUserService ius;
/**
* 任务跟踪表列表(分页条件查询)数据
* @param request
* @return
* @throws Exception
* PageJson
* @exception
*/
@RequestMapping(value = "list", method = RequestMethod.POST, produces = {"application/json; charset=utf-8"})
@ApiOperation(value="任务跟踪表数据列表", httpMethod = "POST", notes = "获取任务跟踪表列表")
public PageList<TaskFollow> list(@ApiParam(name="queryFilter",value="查询对象")@RequestBody QueryFilter queryFilter) throws Exception{
return taskFollowManager.query(queryFilter);
}
/**
* 任务跟踪表明细页面
* @param ID
* @return
* @throws Exception
* ModelAndView
*/
@RequestMapping(value = "get", method = RequestMethod.GET, produces = {"application/json; charset=utf-8"})
@ApiOperation(value="任务跟踪表数据详情",httpMethod = "GET",notes = "任务跟踪表数据详情")
public TaskFollow get(@ApiParam(name="id",value="业务对象主键", required = true)@RequestParam String id) throws Exception{
return taskFollowManager.get(id);
}
/**
* 新增任务跟踪表
* @param taskFollow
* @throws Exception
* @return
* @exception
*/
@RequestMapping(value = "save", method = RequestMethod.POST, produces = {"application/json; charset=utf-8"})
@ApiOperation(value = "新增,更新任务跟踪表数据", httpMethod = "POST", notes = "新增,更新任务跟踪表数据")
public CommonResult<String> save(@ApiParam(name="taskFollow",value="任务跟踪表业务对象", required = true)@RequestBody TaskFollow taskFollow) throws Exception{
return taskFollowManager.saveTaskFollow(taskFollow);
}
/**
* 删除任务跟踪表记录
* @param id
* @throws Exception
* @return
* @exception
*/
@RequestMapping(value = "remove", method = RequestMethod.DELETE, produces = {"application/json; charset=utf-8"})
@ApiOperation(value = "删除任务跟踪表记录", httpMethod = "DELETE", notes = "删除任务跟踪表记录")
public CommonResult<String> remove(@ApiParam(name="id",value="业务主键", required = true)@RequestParam String id) throws Exception{
taskFollowManager.remove(id);
return new CommonResult<String>(true, "删除成功");
}
/**
* 批量删除任务跟踪表记录
* @param ids
* @throws Exception
* @return
* @exception
*/
@RequestMapping(value = "removes", method = RequestMethod.DELETE, produces = {"application/json; charset=utf-8"})
@ApiOperation(value = "批量删除任务跟踪表记录", httpMethod = "DELETE", notes = "批量删除任务跟踪表记录")
public CommonResult<String> removes(@ApiParam(name="ids",value="业务主键数组,多个业务主键之间用逗号分隔", required = true)@RequestParam String...ids) throws Exception{
taskFollowManager.removeByIds(ids);
return new CommonResult<String>(true, "批量删除成功");
}
/**
* 根据流程实例id获取已跟踪的节点
* @param ids
* @throws Exception
* @return
* @exception
*/
@RequestMapping(value = "getFollowedNode", method = RequestMethod.GET, produces = {"application/json; charset=utf-8"})
@ApiOperation(value = "根据流程实例id获取已跟踪的节点", httpMethod = "GET", notes = "根据流程实例id获取已跟踪的节点")
public CommonResult<String> getFollowedNode(@ApiParam(name="instId",value="流程实例id", required = true)@RequestParam String instId) throws Exception{
return taskFollowManager.getFollowedNode(instId);
}
}