Merge branch 'dev'

This commit is contained in:
wangliwen 2022-12-02 15:46:12 +08:00
commit 0b572a1e8b
2 changed files with 39 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import io.renren.common.constant.Constant;
import io.renren.common.exception.ErrorCode; import io.renren.common.exception.ErrorCode;
import io.renren.common.page.PageData; import io.renren.common.page.PageData;
import io.renren.common.utils.Result; import io.renren.common.utils.Result;
import io.renren.modules.activiti.dto.BatchCompleteDTO;
import io.renren.modules.activiti.dto.TaskDTO; import io.renren.modules.activiti.dto.TaskDTO;
import io.renren.modules.activiti.service.ActTaskService; import io.renren.modules.activiti.service.ActTaskService;
import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.SecurityUser;
@ -232,6 +233,24 @@ public class ActTaskController {
return new Result(); return new Result();
} }
/**
* 批量通过
*
* @param batchCompleteDTO
* @return
*/
@PostMapping("batchComplete")
@ApiOperation("批量任务处理(完成任务)")
@LogOperation("批量任务处理(完成任务)")
public Result completeTaskBatch(@RequestBody BatchCompleteDTO batchCompleteDTO) {
batchCompleteDTO.getTaskIds().stream()
.filter(index -> org.apache.commons.lang3.StringUtils.isNotEmpty(index))
.forEach(taskId -> {
actTaskService.completeTask(taskId, batchCompleteDTO.getComment());
});
return new Result().ok("批量通过成功");
}
/** /**
* 带参数的任务处理 * 带参数的任务处理
*/ */

View File

@ -0,0 +1,20 @@
package io.renren.modules.activiti.dto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
@Api(tags = "批量审核表单dto")
public class BatchCompleteDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "审批意见")
private String comment;
@ApiModelProperty(value = "任务ID列表")
private List<String> taskIds;
}