yangys
2025-06-12 80a641659a361c9f55c57936daca0a1790f777d5
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/FlowBusinessService.java
@@ -70,7 +70,7 @@
      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();
@@ -344,4 +344,42 @@
      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;
   }
}