From c1df00bdfe8f933ce858339de7b6e2d1d092f641 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期二, 05 八月 2025 19:29:15 +0800
Subject: [PATCH] 增加流程标题
---
blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/FlowBusinessService.java | 27 ++++++++++++---------------
1 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/FlowBusinessService.java b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/FlowBusinessService.java
index 6bdee86..180c7f8 100644
--- a/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/FlowBusinessService.java
+++ b/blade-service/blade-mdm/src/main/java/org/springblade/mdm/flow/service/FlowBusinessService.java
@@ -12,10 +12,12 @@
import org.flowable.task.api.Task;
import org.flowable.task.api.TaskQuery;
import org.flowable.task.api.history.HistoricTaskInstance;
+import org.springblade.core.launch.constant.FlowConstant;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.*;
+import org.springblade.mdm.flow.constants.FlowContants;
import org.springblade.mdm.flow.entity.FlowProgramFile;
import org.springblade.mdm.flow.entity.MdmFlowProcess;
import org.springblade.mdm.flow.util.MdmFlowCache;
@@ -65,9 +67,6 @@
TaskQuery todoQuery = taskService.createTaskQuery().taskAssignee(userId).active().includeProcessVariables();
if (Func.isNotEmpty(createTimeBegin)) {
todoQuery.taskCreatedAfter(DateUtil.toDate(createTimeBegin));
-
- ////濡傛灉鏌ヨ瀹炰緥鐨勫紑濮嬫椂闂达細鍙兘鐢ㄤ互涓嬭繖涓紝鍏堟煡鍑哄疄渚媔d鏉�
- //todoQuery.processInstanceIdIn()
}
if (Func.isNotEmpty(createTimeEnd)) {
todoQuery.taskCreatedBefore(DateUtil.toDate(createTimeEnd));
@@ -82,11 +81,7 @@
// 鏋勫缓鍒楄〃鏁版嵁
FlowVO bladeFlow = new FlowVO();
buildFlowTaskList(bladeFlow, flowList, todoQuery,page.getCurrent(),page.getSize());
- flowList.forEach(flowVO -> {
- if(flowVO.getVariables().containsKey("machineCode")){
- //Machine machinemachineService.getByCode((String)flowVO.getVariables().get("machineCode"))
- }
- });
+
// 璁$畻鎬绘暟
long count = todoQuery.count();
@@ -99,15 +94,17 @@
void addKeywordCondition(TaskQuery todoQuery,String keyword) {
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("processNo", "%" + keyword + "%");
- todoQuery.processVariableValueLike("machineCode", "%" + keyword + "%");
- todoQuery.processVariableValueLike("machineMode", "%" + keyword + "%");
- todoQuery.processVariableValueLike("processName", "%" + keyword + "%");
- todoQuery.processVariableValueLike("processEdition", "%" + keyword + "%");
- todoQuery.processVariableValueLike("craftEdition", "%" + keyword + "%");
-
+ todoQuery.processDefinitionNameLike(likeVal);
todoQuery.endOr();
}
}
--
Gitblit v1.9.3