yangys
2025-09-13 e853c35455332a4652ec604c650ca82c411c864d
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/FlowBusinessService.java
@@ -19,6 +19,7 @@
import org.springblade.core.tool.utils.*;
import org.springblade.mdm.flow.constants.FlowContants;
import org.springblade.mdm.flow.constants.FlowVariableContants;
import org.springblade.mdm.flow.entity.FlowProgramFile;
import org.springblade.mdm.flow.entity.MdmFlowProcess;
import org.springblade.mdm.flow.util.MdmFlowCache;
@@ -90,13 +91,13 @@
      if(Func.isNotEmpty(keyword)) {
         String likeVal = "%" + keyword + "%";
         todoQuery.or();
         todoQuery.processVariableValueLike(FlowContants.TITLE,likeVal);
         todoQuery.processVariableValueLike(FlowContants.PROCESS_NO, likeVal);
         todoQuery.processVariableValueLike(FlowContants.MACHINE_CODE, likeVal);
         todoQuery.processVariableValueLike(FlowContants.MACHINE_MODE, likeVal);
         todoQuery.processVariableValueLike(FlowContants.PROCESS_NAME, likeVal);
         todoQuery.processVariableValueLike(FlowContants.PROCESS_EDITION, likeVal);
         todoQuery.processVariableValueLike(FlowContants.CRAFT_EDITION, likeVal);
         todoQuery.processVariableValueLike(FlowVariableContants.TITLE,likeVal);
         todoQuery.processVariableValueLike(FlowVariableContants.PROCESS_NO, likeVal);
         todoQuery.processVariableValueLike(FlowVariableContants.MACHINE_CODE, likeVal);
         todoQuery.processVariableValueLike(FlowVariableContants.MACHINE_MODE, likeVal);
         todoQuery.processVariableValueLike(FlowVariableContants.PROCESS_NAME, likeVal);
         todoQuery.processVariableValueLike(FlowVariableContants.PROCESS_EDITION, likeVal);
         todoQuery.processVariableValueLike(FlowVariableContants.CRAFT_EDITION, likeVal);
         todoQuery.processDefinitionNameLike(likeVal);
         todoQuery.endOr();
@@ -287,7 +288,7 @@
         taskQuery.taskCreatedBefore(DateUtil.toDate(createTimeEnd.plusDays(1)));
      }
      if(Func.isNotEmpty(myProcessName)) {
         taskQuery.processVariableValueEquals(FlowContants.MY_PROCESS_NAME, myProcessName);
         taskQuery.processVariableValueEquals(FlowVariableContants.MY_PROCESS_NAME, myProcessName);
      }
      addKeywordCondition(taskQuery, keyword);
@@ -324,7 +325,7 @@
      HistoricProcessInstanceQuery query = this.historyService.createHistoricProcessInstanceQuery().finished().includeProcessVariables();
         //.finished() // 只查询已完成的流程.unfinished() // 查询未完成的流程
      if(Func.isNotEmpty(myProcessName)) {
         query.variableValueEquals(FlowContants.MY_PROCESS_NAME, myProcessName);
         query.variableValueEquals(FlowVariableContants.MY_PROCESS_NAME, myProcessName);
      }
      if(createTimeBegin!=null) {
         query.startedAfter(DateUtil.toDate(createTimeBegin));
@@ -335,13 +336,13 @@
      if(Func.isNotEmpty(keyword)) {
         String likeVal = "%" + keyword + "%";
         query.or();
         query.variableValueLike(FlowContants.TITLE,likeVal);
         query.variableValueLike(FlowContants.PROCESS_NO, likeVal);
         query.variableValueLike(FlowContants.MACHINE_CODE, likeVal);
         query.variableValueLike(FlowContants.MACHINE_MODE, likeVal);
         query.variableValueLike(FlowContants.PROCESS_NAME, likeVal);
         query.variableValueLike(FlowContants.PROCESS_EDITION, likeVal);
         query.variableValueLike(FlowContants.CRAFT_EDITION, likeVal);
         query.variableValueLike(FlowVariableContants.TITLE,likeVal);
         query.variableValueLike(FlowVariableContants.PROCESS_NO, likeVal);
         query.variableValueLike(FlowVariableContants.MACHINE_CODE, likeVal);
         query.variableValueLike(FlowVariableContants.MACHINE_MODE, likeVal);
         query.variableValueLike(FlowVariableContants.PROCESS_NAME, likeVal);
         query.variableValueLike(FlowVariableContants.PROCESS_EDITION, likeVal);
         query.variableValueLike(FlowVariableContants.CRAFT_EDITION, likeVal);
         query.endOr();
      }
@@ -393,9 +394,9 @@
      HistoricProcessInstanceQuery query = this.historyService.createHistoricProcessInstanceQuery().finished().includeProcessVariables();
      //.finished() // 只查询已完成的流程.unfinished() // 查询未完成的流程
      query.variableValueEquals(FlowContants.EXCEPTION, "1");
      query.variableValueEquals(FlowVariableContants.EXCEPTION, "1");
      if(Func.isNotEmpty(myProcessName)) {
         query.variableValueEquals(FlowContants.MY_PROCESS_NAME, myProcessName);
         query.variableValueEquals(FlowVariableContants.MY_PROCESS_NAME, myProcessName);
      }
      if(createTimeBegin!=null) {
         query.startedAfter(DateUtil.toDate(createTimeBegin));
@@ -406,13 +407,13 @@
      if(Func.isNotEmpty(keyword)) {
         String likeVal = "%" + keyword + "%";
         query.or();
         query.variableValueLike(FlowContants.TITLE,likeVal);
         query.variableValueLike(FlowContants.PROCESS_NO, likeVal);
         query.variableValueLike(FlowContants.MACHINE_CODE, likeVal);
         query.variableValueLike(FlowContants.MACHINE_MODE, likeVal);
         query.variableValueLike(FlowContants.PROCESS_NAME, likeVal);
         query.variableValueLike(FlowContants.PROCESS_EDITION, likeVal);
         query.variableValueLike(FlowContants.CRAFT_EDITION, likeVal);
         query.variableValueLike(FlowVariableContants.TITLE,likeVal);
         query.variableValueLike(FlowVariableContants.PROCESS_NO, likeVal);
         query.variableValueLike(FlowVariableContants.MACHINE_CODE, likeVal);
         query.variableValueLike(FlowVariableContants.MACHINE_MODE, likeVal);
         query.variableValueLike(FlowVariableContants.PROCESS_NAME, likeVal);
         query.variableValueLike(FlowVariableContants.PROCESS_EDITION, likeVal);
         query.variableValueLike(FlowVariableContants.CRAFT_EDITION, likeVal);
         query.endOr();
      }