| | |
| | | import org.flowable.engine.*; |
| | | import org.flowable.engine.history.HistoricActivityInstance; |
| | | import org.flowable.image.ProcessDiagramGenerator; |
| | | import org.flowable.task.api.Task; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.modules.dncFlow.entity.HisWorkTask; |
| | | import org.jeecg.modules.dncFlow.entity.WorkTaskData; |
| | | import org.jeecg.modules.dncFlow.entity.WorkTaskDataVo; |
| | | import org.jeecg.modules.dncFlow.service.IAssignFileStreamService; |
| | |
| | | Page page = new Page(pageNo, pageSize); |
| | | IPage<FlowMyBusinessDto> pageList = flowMyBusinessService.getPageList(page, flowMyBusinessDto); |
| | | pageList.getRecords().forEach(item -> { |
| | | //去除[] |
| | | item.setTodoUsers(item.getTodoUsers().replaceAll("\\[", "").replaceAll("\\]", "")); |
| | | item.setTodoUsers(item.getTodoUsers().replaceAll("\"", "")); |
| | | item.setDoneUsers(item.getDoneUsers().replaceAll("\\[", "").replaceAll("\\]", "")); |
| | | item.setDoneUsers(item.getDoneUsers().replaceAll("\"", "")); |
| | | if (item.getTodoUsers() == null){ |
| | | item.setTodoUsers(""); |
| | | }else{ |
| | | //去除[] |
| | | item.setTodoUsers(item.getTodoUsers().replaceAll("\\[", "").replaceAll("\\]", "")); |
| | | item.setTodoUsers(item.getTodoUsers().replaceAll("\"", "")); |
| | | } |
| | | if (item.getDoneUsers() == null){ |
| | | item.setDoneUsers(""); |
| | | }else { |
| | | //去除[] |
| | | item.setDoneUsers(item.getDoneUsers().replaceAll("\\[", "").replaceAll("\\]", "")); |
| | | item.setDoneUsers(item.getDoneUsers().replaceAll("\"", "")); |
| | | } |
| | | }); |
| | | return Result.OK(pageList); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "获取已办任务", response = FlowTaskDto.class) |
| | | @GetMapping(value = "/finishedList") |
| | | public Result finishedList(@ApiParam(value = "当前页码", required = true) @RequestParam Integer pageNo, |
| | | @ApiParam(value = "每页条数", required = true) @RequestParam Integer pageSize) { |
| | | return flowTaskService.finishedList(pageNo, pageSize); |
| | | public Result<?> finishedList(@ApiParam(value = "当前页码", required = true) @RequestParam Integer pageNo, |
| | | @ApiParam(value = "每页条数", required = true) @RequestParam Integer pageSize, |
| | | FlowMyBusinessDto flowMyBusinessDto) { |
| | | return flowTaskService.finishedList(pageNo, pageSize,flowMyBusinessDto); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取工作流历史任务", response = FlowTaskDto.class) |
| | | @GetMapping(value = "/queryHisTaskList") |
| | | public Result<List<HisWorkTask>> queryHisTaskList(@RequestParam(name = "drapprovedataId") String drapprovedataId) { |
| | | public Result<?> queryHisTaskList(@RequestParam(name = "drapprovedataId") String drapprovedataId) { |
| | | return Result.OK(hisWorkTaskService.queryHisTaskList(drapprovedataId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "审批任务-查看流程图") |
| | | @GetMapping("/diagramView") |
| | | public void showImages(@RequestParam(name = "taskId") String taskId, HttpServletResponse response) throws IOException { |
| | | Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); |
| | | String processDefinitionId = task.getProcessDefinitionId(); |
| | | public void showImages(@RequestParam(name = "processDefinitionId") String processDefinitionId, |
| | | @RequestParam(name = "processInstanceId") String processInstanceId, |
| | | @RequestParam(name = "TaskDefinitionKey") String TaskDefinitionKey, |
| | | HttpServletResponse response) throws IOException { |
| | | BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinitionId); |
| | | String processInstanceId = task.getProcessInstanceId(); |
| | | List<HistoricActivityInstance> historyProcess = historyService.createHistoricActivityInstanceQuery() |
| | | .processInstanceId(processInstanceId) |
| | | .finished() |
| | |
| | | activityIds.add(hi.getActivityId()); |
| | | } |
| | | } |
| | | activityIds.add(task.getTaskDefinitionKey()); |
| | | activityIds.add(TaskDefinitionKey); |
| | | ProcessEngineConfiguration engConf = processEngine.getProcessEngineConfiguration(); |
| | | ProcessDiagramGenerator processDiagramGenerator = engConf.getProcessDiagramGenerator(); |
| | | |