| | |
| | | String userId = ""+AuthUtil.getUserId(); |
| | | List<BladeFlow> flowList = new LinkedList<>(); |
| | | |
| | | TaskQuery todoQuery = taskService.createTaskQuery().taskAssignee("1930600500876619777").active().includeProcessVariables(); |
| | | TaskQuery todoQuery = taskService.createTaskQuery().taskAssignee(userId).active().includeProcessVariables(); |
| | | |
| | | if(Func.isNotEmpty(keyword)){ |
| | | todoQuery.or(); |
| | |
| | | return historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); |
| | | } |
| | | |
| | | public IPage<BladeFlow> selectAllTaskPage(IPage<BladeFlow> page, String keyword) { |
| | | |
| | | List<BladeFlow> flowList = new LinkedList<>(); |
| | | |
| | | TaskQuery todoQuery = taskService.createTaskQuery().active().includeProcessVariables(); |
| | | |
| | | if(Func.isNotEmpty(keyword)){ |
| | | todoQuery.or(); |
| | | |
| | | todoQuery.processVariableValueLike("processNo",keyword); |
| | | todoQuery.processVariableValueLike("machineCode",keyword); |
| | | todoQuery.processVariableValueLike("machineMode",keyword); |
| | | |
| | | todoQuery.processVariableValueLike("processName",keyword); |
| | | todoQuery.processVariableValueLike("processEdition",keyword); |
| | | |
| | | todoQuery.processVariableValueLike("craftEdition",keyword); |
| | | //TODO 多个字段都要匹配 |
| | | |
| | | todoQuery.endOr(); |
| | | } |
| | | |
| | | todoQuery.orderByTaskCreateTime().desc(); |
| | | |
| | | // 构建列表数据 |
| | | BladeFlow bladeFlow = new BladeFlow(); |
| | | buildFlowTaskList(bladeFlow, flowList, todoQuery, "todo");//FlowEngineConstant.STATUS_TODO |
| | | |
| | | // 计算总数 |
| | | long count = todoQuery.count(); |
| | | // 设置页数 |
| | | page.setSize(count); |
| | | // 设置总数 |
| | | page.setTotal(count); |
| | | // 设置数据 |
| | | page.setRecords(flowList); |
| | | return page; |
| | | } |
| | | } |