| | |
| | | |
| | | import com.ycl.common.group.Update; |
| | | import com.ycl.common.group.Add; |
| | | import com.ycl.domain.form.RejectTaskForm; |
| | | import com.ycl.domain.query.TaskQuery; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.validation.annotation.Validated; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ycl.service.ProjectProcessService; |
| | |
| | | |
| | | |
| | | @PostMapping("/set") |
| | | @ApiOperation(value = "项目设置流程", notes = "项目设置流程") |
| | | @ApiOperation(value = "项目变更流程", notes = "项目变更流程") |
| | | // @PreAuthorize("@ss.hasPermi('projectProcess:set')") |
| | | public Result projectSetProcess(@RequestBody @Validated ProjectProcessForm form) { |
| | | return projectProcessService.projectSetProcess(form); |
| | |
| | | return projectProcessService.detail(projectId, processId); |
| | | } |
| | | |
| | | @PostMapping("/start/{projectId}/{processId}") |
| | | @PostMapping("/start/{projectId}/{processDefId}") |
| | | @ApiOperation(value = "启动流程", notes = "启动流程") |
| | | // @PreAuthorize("@ss.hasPermi('projectProcess:start')") |
| | | public Result startProcess(@PathVariable("projectId") String projectId, @PathVariable("processId") String processId) { |
| | | return projectProcessService.startProcess(projectId, processId); |
| | | public Result startProcess(@PathVariable("projectId") Long projectId, @PathVariable("processDefId") String processDefId) { |
| | | return projectProcessService.startProcess(projectId, processDefId); |
| | | } |
| | | |
| | | @GetMapping("/detail/task/list") |
| | | @ApiOperation(value = "获取任务列表", notes = "获取任务列表") |
| | | // @PreAuthorize("@ss.hasPermi('projectProcess:detail')") |
| | | public Result taskList(TaskQuery query) { |
| | | return projectProcessService.taskList(query); |
| | | } |
| | | |
| | | @GetMapping("/detail/task/is/auditing") |
| | | @ApiOperation(value = "获取任务是否是审批节点", notes = "获取任务是否是审批节点") |
| | | // @PreAuthorize("@ss.hasPermi('projectProcess:detail')") |
| | | public Result taskIsAuditing(String processDefId, String taskId) { |
| | | return projectProcessService.taskIsAuditing(processDefId, taskId); |
| | | } |
| | | |
| | | @PostMapping("/detail/task/reject") |
| | | @ApiOperation(value = "驳回", notes = "驳回") |
| | | // @PreAuthorize("@ss.hasPermi('projectProcess:detail')") |
| | | public Result rejectTask(@RequestBody RejectTaskForm form) { |
| | | return projectProcessService.rejectTask(form); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/to_do_task") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | // @PreAuthorize("@ss.hasPermi('projectProcess:page')") |
| | | public Result getAllTodoTask(ProjectProcessQuery query) { |
| | | |
| | | Result result = Result.ok(); |
| | | projectProcessService.getAllTodoTask("", (int) query.getPageSize(), (int) query.getCurrentPage(), result); |
| | | return result; |
| | | } |
| | | |
| | | @GetMapping("/detail-by-process_ins_id") |
| | | @ApiOperation(value = "获取详情", notes = "获取详情") |
| | | // @PreAuthorize("@ss.hasPermi('projectProcess:detail')") |
| | | public Result detailByProcessInsId(TaskQuery query) { |
| | | return projectProcessService.detailByProcessInsId(query); |
| | | } |
| | | |
| | | |
| | | } |