From eed929b9fef6eae14dfa19e2c57aa26caa1b9104 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期一, 02 十二月 2024 23:24:30 +0800
Subject: [PATCH] fix 修复 代码生成 表名中间带有特殊字符被过滤问题 改为开头过滤

---
 ruoyi-modules/ruoyi-workflow/src/main/resources/mapper/workflow/ActTaskMapper.xml |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/ruoyi-modules/ruoyi-workflow/src/main/resources/mapper/workflow/ActTaskMapper.xml b/ruoyi-modules/ruoyi-workflow/src/main/resources/mapper/workflow/ActTaskMapper.xml
index 9c33726..3641900 100644
--- a/ruoyi-modules/ruoyi-workflow/src/main/resources/mapper/workflow/ActTaskMapper.xml
+++ b/ruoyi-modules/ruoyi-workflow/src/main/resources/mapper/workflow/ActTaskMapper.xml
@@ -19,14 +19,14 @@
         <result property="endTime" column="END_TIME_"/>
         <result property="taskDefinitionKey" column="TASK_DEF_KEY_"/>
         <result property="dueDate" column="DUE_DATE_"/>
-        <result property="processDefinitionKey" column="key_"/>
         <result property="category" column="CATEGORY_"/>
         <result property="parentTaskId" column="PARENT_TASK_ID_"/>
         <result property="tenantId" column="TENANT_ID_"/>
         <result property="claimTime" column="CLAIM_TIME"/>
         <result property="businessStatus" column="BUSINESS_STATUS_"/>
         <result property="processDefinitionName" column="processDefinitionName"/>
-        <result property="processDefinitionKey" column="processDefinitionName"/>
+        <result property="processDefinitionKey" column="processDefinitionKey"/>
+        <result property="processDefinitionVersion" column="processDefinitionVersion"/>
         <result property="businessKey" column="BUSINESS_KEY_"/>
 
     </resultMap>
@@ -36,12 +36,12 @@
                      AHP.BUSINESS_STATUS_,
                      AHP.BUSINESS_KEY_,
                      ARP.NAME_ AS processDefinitionName,
-                     ARP.KEY_  AS processDefinitionKey
+                     ARP.KEY_  AS processDefinitionKey,
+                     ARP.VERSION_  AS processDefinitionVersion
               FROM ACT_RU_TASK RES
                        INNER JOIN ACT_HI_PROCINST AHP ON RES.PROC_INST_ID_ = AHP.PROC_INST_ID_
                        INNER JOIN ACT_RE_PROCDEF ARP ON ARP.ID_ = RES.PROC_DEF_ID_
-              WHERE RES.PARENT_TASK_ID_ IS NULL
-              ORDER BY RES.CREATE_TIME_ DESC) t ${ew.getCustomSqlSegment}
+              WHERE RES.PARENT_TASK_ID_ IS NULL) t ${ew.getCustomSqlSegment}
     </select>
 
     <select id="getTaskFinishByPage" resultMap="TaskVoResult">
@@ -50,12 +50,13 @@
                      AHP.BUSINESS_STATUS_,
                      AHP.BUSINESS_KEY_,
                      ARP.NAME_ AS processDefinitionName,
-                     ARP.KEY_  AS processDefinitionKey
+                     ARP.KEY_  AS processDefinitionKey,
+                     ARP.VERSION_  AS processDefinitionVersion
               FROM ACT_HI_TASKINST HTI
                        INNER JOIN ACT_HI_PROCINST AHP ON HTI.PROC_INST_ID_ = AHP.PROC_INST_ID_
                        INNER JOIN ACT_RE_PROCDEF ARP ON ARP.ID_ = HTI.PROC_DEF_ID_
-              WHERE HTI.PARENT_TASK_ID_ IS NULL
-              ORDER BY HTI.START_TIME_ DESC) t ${ew.getCustomSqlSegment}
+              WHERE HTI.PARENT_TASK_ID_ IS NULL AND HTI.END_TIME_ IS NOT NULL
+             ) t ${ew.getCustomSqlSegment}
     </select>
 
     <select id="getTaskCopyByPage" resultMap="TaskVoResult">
@@ -64,12 +65,13 @@
                      AHP.BUSINESS_STATUS_,
                      AHP.BUSINESS_KEY_,
                      ARP.NAME_ as processDefinitionName,
-                     ARP.KEY_  as processDefinitionKey
+                     ARP.KEY_  as processDefinitionKey,
+                     ARP.VERSION_  AS processDefinitionVersion
               FROM ACT_HI_TASKINST AHT
                        INNER JOIN ACT_HI_PROCINST AHP ON AHT.PROC_INST_ID_ = AHP.PROC_INST_ID_
                        INNER JOIN ACT_RE_PROCDEF ARP ON ARP.ID_ = AHT.PROC_DEF_ID_
-              WHERE AHT.PARENT_TASK_ID_ is not null
+              WHERE AHT.PARENT_TASK_ID_ IS NOT NULL
                 and AHT.scope_type_ = 'copy'
-              ORDER BY AHT.START_TIME_ DESC) t ${ew.getCustomSqlSegment}
+             ) t ${ew.getCustomSqlSegment}
     </select>
 </mapper>

--
Gitblit v1.9.3