From ed839069a1df066d9559263129e999de7e9c2ccc Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期三, 19 三月 2025 13:40:58 +0800
Subject: [PATCH] 修改产品结构树,修改指派程序至设备

---
 lxzn-module-flowable/src/main/java/org/jeecg/modules/flowable/apithird/business/mapper/xml/FlowMyBusinessMapper.xml |   64 ++++++++++++++++++++++++++++++-
 1 files changed, 61 insertions(+), 3 deletions(-)

diff --git a/lxzn-module-flowable/src/main/java/org/jeecg/modules/flowable/apithird/business/mapper/xml/FlowMyBusinessMapper.xml b/lxzn-module-flowable/src/main/java/org/jeecg/modules/flowable/apithird/business/mapper/xml/FlowMyBusinessMapper.xml
index 221ab77..27b7a5e 100644
--- a/lxzn-module-flowable/src/main/java/org/jeecg/modules/flowable/apithird/business/mapper/xml/FlowMyBusinessMapper.xml
+++ b/lxzn-module-flowable/src/main/java/org/jeecg/modules/flowable/apithird/business/mapper/xml/FlowMyBusinessMapper.xml
@@ -6,16 +6,74 @@
             flow_my_business.*,
             ACT_HI_PROCINST.START_TIME_ as start_time,
             ACT_HI_PROCINST.END_TIME_ as end_time,
-            NC_ASSIGN_FILE_STREAM.STATUS as status,
-            ACT_RE_PROCDEF.NAME_ as flowName
+            ACT_RE_PROCDEF.NAME_ as flowName,
+            ACT_RE_PROCDEF.CATEGORY_ as category
         FROM
             flow_my_business
                 LEFT JOIN ACT_HI_PROCINST ON flow_my_business.process_instance_id = ACT_HI_PROCINST.ID_
                 LEFT JOIN ACT_RE_PROCDEF ON flow_my_business.process_definition_id = ACT_RE_PROCDEF.ID_
-                LEFT JOIN NC_ASSIGN_FILE_STREAM ON flow_my_business.data_id = NC_ASSIGN_FILE_STREAM.STREAM_ID
         where
             1 = 1
+        <if test="flowMyBusinessDto.category != null and flowMyBusinessDto.category != ''">
+            and ACT_RE_PROCDEF.CATEGORY_ = #{flowMyBusinessDto.category}
+        </if>
+        <if test="flowMyBusinessDto.flowName!= null and flowMyBusinessDto.flowName!= ''">
+            AND ACT_RE_PROCDEF.name_ LIKE CONCAT('%',#{flowMyBusinessDto.flowName},'%')
+        </if>
+        <if test="flowMyBusinessDto.title != null and flowMyBusinessDto.title != ''">
+            AND flow_my_business.title LIKE CONCAT('%',#{flowMyBusinessDto.title},'%')
+        </if>
+        <if test="flowMyBusinessDto.startTime!= null and flowMyBusinessDto.startTime!= ''">
+            AND ACT_HI_PROCINST.START_TIME_ &gt;= #{flowMyBusinessDto.startTime}
+        </if>
+        <if test="flowMyBusinessDto.endTime!= null and flowMyBusinessDto.endTime!= ''">
+            AND ACT_HI_PROCINST.END_TIME_ &lt;= #{flowMyBusinessDto.endTime}
+        </if>
         ORDER BY
             flow_my_business.create_time desc
     </select>
+    <select id="PageListMyBusiness" resultType="org.jeecg.modules.flowable.domain.dto.FlowTaskDto">
+        SELECT
+            task.ID_ as 'hisProcInsId',
+            TASK.PROC_INST_ID_ AS 'taskId',
+            ACT_RE_PROCDEF.CATEGORY_ AS 'category',
+            ACT_RE_PROCDEF.NAME_ 'procDefName',
+            flow_my_business.title AS 'Description',
+            flow_my_business.data_id AS 'dataId',
+            flow_my_business.process_definition_key AS 'processDefinitionKey',
+            flow_my_business.process_definition_id AS 'processDefinitionId',
+            flow_my_business.process_instance_id AS 'processInstanceId',
+            TASK.EXECUTION_ID_ AS 'executionId',
+            task.NAME_ AS 'taskName',
+            task.DURATION_ 'duration',
+            task.START_TIME_ AS 'createTime',
+            task.END_TIME_ AS 'finishTime',
+            task.TASK_DEF_KEY_ AS 'TaskDefKey'
+        FROM
+            ACT_HI_TASKINST TASK
+                LEFT JOIN flow_my_business ON flow_my_business.process_instance_id = TASK.PROC_INST_ID_
+                LEFT JOIN ACT_RE_PROCDEF ON flow_my_business.process_definition_id = ACT_RE_PROCDEF.ID_
+        WHERE
+           TASK.END_TIME_ IS NOT NULL
+        <if test="flowMyBusinessDto.currentUser != null and flowMyBusinessDto.currentUser != ''">
+            AND TASK.ASSIGNEE_ = #{flowMyBusinessDto.currentUser}
+        </if>
+        <if test="flowMyBusinessDto.category != null and flowMyBusinessDto.category != ''">
+            and ACT_RE_PROCDEF.CATEGORY_ = #{flowMyBusinessDto.category}
+        </if>
+        <if test="flowMyBusinessDto.flowName!= null and flowMyBusinessDto.flowName!= ''">
+            AND ACT_RE_PROCDEF.name_ LIKE CONCAT('%',#{flowMyBusinessDto.flowName},'%')
+        </if>
+        <if test="flowMyBusinessDto.title != null and flowMyBusinessDto.title != ''">
+            AND flow_my_business.title LIKE CONCAT('%',#{flowMyBusinessDto.title},'%')
+        </if>
+        <if test="flowMyBusinessDto.startTime!= null and flowMyBusinessDto.startTime!= ''">
+            AND TASK.START_TIME_ &gt;= #{flowMyBusinessDto.startTime}
+        </if>
+        <if test="flowMyBusinessDto.endTime!= null and flowMyBusinessDto.endTime!= ''">
+            AND TASK.END_TIME_ &lt;= #{flowMyBusinessDto.endTime}
+        </if>
+        ORDER BY
+            TASK.END_TIME_ DESC
+    </select>
 </mapper>

--
Gitblit v1.9.3