Merge branch 'dev'
This commit is contained in:
commit
a1fbce7737
|
@ -9,6 +9,7 @@ import io.renren.common.utils.Result;
|
|||
import io.renren.modules.activiti.dto.TaskDTO;
|
||||
import io.renren.modules.activiti.service.ActTaskService;
|
||||
import io.renren.modules.security.user.SecurityUser;
|
||||
import io.renren.modules.security.user.UserDetail;
|
||||
import io.renren.modules.sys.dto.SysUserDTO;
|
||||
import io.renren.modules.sys.service.SysUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -334,11 +335,14 @@ public class ActTaskController {
|
|||
})
|
||||
// @RequiresPermissions("sys:task:all")
|
||||
public Result endProcess(String taskId, String instanceId, String comment) {
|
||||
// final UserDetail user = SecurityUser.getUser();
|
||||
final UserDetail user = SecurityUser.getUser();
|
||||
if (!StringUtils.isEmpty(taskId)) { // 存在taskId
|
||||
actTaskService.endProcess(taskId, comment);
|
||||
}
|
||||
if (StringUtils.isEmpty(taskId) && !StringUtils.isEmpty(instanceId)) { // 通过实例id
|
||||
if (org.apache.commons.lang3.StringUtils.isEmpty(comment)) {
|
||||
comment = String.format("由发起人\"%s\"主动撤回", user.getRealName());
|
||||
}
|
||||
actTaskService.endProcessInstanceId(instanceId, comment);
|
||||
}
|
||||
return new Result();
|
||||
|
|
Loading…
Reference in New Issue