修复:工作流中(我的待办、我的已办、我的抄送默认)的分页查询语句不兼容sqlserver的问题
已修改2个文件
10 ■■■■■ 文件已修改
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/ActTaskServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-workflow/src/main/resources/mapper/workflow/ActTaskMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/ActTaskServiceImpl.java
@@ -277,6 +277,7 @@
        if (StringUtils.isNotBlank(taskBo.getProcessDefinitionKey())) {
            queryWrapper.eq("t.processDefinitionKey", taskBo.getProcessDefinitionKey());
        }
        queryWrapper.orderByDesc("t.CREATE_TIME_");
        Page<TaskVo> page = actTaskMapper.getTaskWaitByPage(pageQuery.build(), queryWrapper);
        List<TaskVo> taskList = page.getRecords();
@@ -366,6 +367,7 @@
        queryWrapper.like(StringUtils.isNotBlank(taskBo.getProcessDefinitionName()), "t.processDefinitionName", taskBo.getProcessDefinitionName());
        queryWrapper.eq(StringUtils.isNotBlank(taskBo.getProcessDefinitionKey()), "t.processDefinitionKey", taskBo.getProcessDefinitionKey());
        queryWrapper.eq("t.assignee_", userId);
        queryWrapper.orderByDesc("t.START_TIME_");
        Page<TaskVo> page = actTaskMapper.getTaskFinishByPage(pageQuery.build(), queryWrapper);
        List<TaskVo> taskList = page.getRecords();
@@ -402,6 +404,7 @@
            queryWrapper.eq("t.processDefinitionKey", taskBo.getProcessDefinitionKey());
        }
        queryWrapper.eq("t.assignee_", userId);
        queryWrapper.orderByDesc("t.START_TIME_");
        Page<TaskVo> page = actTaskMapper.getTaskCopyByPage(pageQuery.build(), queryWrapper);
        List<TaskVo> taskList = page.getRecords();
ruoyi-modules/ruoyi-workflow/src/main/resources/mapper/workflow/ActTaskMapper.xml
@@ -41,8 +41,7 @@
              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">
@@ -57,7 +56,7 @@
                       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 AND HTI.END_TIME_ IS NOT NULL
              ORDER BY HTI.START_TIME_ DESC) t ${ew.getCustomSqlSegment}
             ) t ${ew.getCustomSqlSegment}
    </select>
    <select id="getTaskCopyByPage" resultMap="TaskVoResult">
@@ -73,6 +72,6 @@
                       INNER JOIN ACT_RE_PROCDEF ARP ON ARP.ID_ = AHT.PROC_DEF_ID_
              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>