diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java index 81f9f2e6..015a6f4f 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActTaskController.java @@ -419,4 +419,25 @@ public class ActTaskController { return new Result(); } + @PostMapping("batchBackToFirst") + @ApiOperation("驳回,回退至第一个用户任务(重新录入表单)") + @LogOperation("驳回,回退至第一个用户任务(重新录入表单)") + @ApiImplicitParams({ + @ApiImplicitParam(name = "taskId", value = "任务ID", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "comment", value = "驳回审核意见", paramType = "query", dataType = "String") + }) + public Result batchBackToFirst(@RequestBody BatchCompleteDTO batchCompleteDTO) { + batchCompleteDTO.getTaskIds().stream() + .filter(index -> org.apache.commons.lang3.StringUtils.isNotEmpty(index)) + .forEach(taskId -> { + actTaskService.backToFirst(taskId, batchCompleteDTO.getComment()); + }); + return new Result().ok("批量驳回成功"); +// if (StringUtils.isEmpty(taskId)) { +// return new Result().error(ErrorCode.PARAMS_GET_ERROR); +// } +// actTaskService.backToFirst(taskId, comment); +// return new Result(); + } + }