| | |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springblade.flow.core.pojo.entity.BladeFlow; |
| | | import org.springblade.mdm.flow.excution.StartDispatcher; |
| | | import org.springblade.mdm.flow.service.FlowBusinessService; |
| | | import org.springblade.mdm.flow.vo.TaskAssignVO; |
| | | import org.springblade.mdm.flow.vo.FlowVO; |
| | | import org.springblade.system.feign.IUserClient; |
| | | import org.springblade.system.feign.IUserSearchClient; |
| | | import org.springblade.system.pojo.entity.User; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/flow/") |
| | | @Tag(name = "派工流程", description = "派工流程") |
| | | @Tag(name = "用户个人流程", description = "用户个人流程") |
| | | public class MyFlowController { |
| | | @Autowired |
| | | private TaskService taskService; |
| | | @Autowired |
| | | private FlowBusinessService businessService; |
| | | |
| | | @Autowired |
| | | private IUserSearchClient userSearchClient; |
| | | /** |
| | | * 待办任务列表页 |
| | | */ |
| | | @GetMapping("todo-list") |
| | | @ApiOperationSupport(order = 3) |
| | | @Operation(summary = "待办任务", description = "传入流程信息") |
| | | public R<IPage<BladeFlow>> todoList(@Parameter(description = "关键字") String keyword, Query query) { |
| | | IPage<BladeFlow> pages = businessService.selectTodoPage(Condition.getPage(query), keyword); |
| | | public R<IPage<FlowVO>> todoList(@Parameter(description = "关键字") String keyword, @Parameter(description = "创建时间开始") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime createTimeBegin, @Parameter(description = "创建时间截止") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime createTimeEnd, Query query) { |
| | | IPage<FlowVO> pages = businessService.selectTodoPage(Condition.getPage(query), createTimeBegin,createTimeEnd,keyword); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | @GetMapping("alltask-list") |
| | | @ApiOperationSupport(order = 3) |
| | | @Operation(summary = "所有任务(fortest)", description = "传入流程信息") |
| | | public R<IPage<BladeFlow>> alltaskList(@Parameter(description = "关键字") String keyword, Query query) { |
| | | IPage<BladeFlow> pages = businessService.selectAllTaskPage(Condition.getPage(query), keyword); |
| | | public R<IPage<FlowVO>> alltaskList(@Parameter(description = "关键字") String keyword, LocalDate createTimeBegin, LocalDate createTimeEnd, Query query) { |
| | | IPage<FlowVO> pages = businessService.selectAllTaskPage(Condition.getPage(query), keyword); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | return R.success("流程转派成功"); |
| | | } |
| | | |
| | | /** |
| | | * 待办任务列表页 |
| | | */ |
| | | @GetMapping("flow-user-list") |
| | | @ApiOperationSupport(order = 3) |
| | | @Operation(summary = "用户下拉数据", description = "用户下拉数据") |
| | | public R<List<User>> flowUserList(@Parameter(description = "部门ID") String deptId) { |
| | | return userSearchClient.listByDept(deptId); |
| | | |
| | | } |
| | | } |