From 325eae7955d25e716684a3ae15e9aeed7951259a Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 21 三月 2025 11:04:04 +0800 Subject: [PATCH] 驳回删除日志、总体流程日志查询调整 --- flowable/src/main/resources/mapper/ProcessLogMapper.xml | 35 ++++++++++++++++++++++++++++------- 1 files changed, 28 insertions(+), 7 deletions(-) diff --git a/flowable/src/main/resources/mapper/ProcessLogMapper.xml b/flowable/src/main/resources/mapper/ProcessLogMapper.xml index cea40f0..c638af4 100644 --- a/flowable/src/main/resources/mapper/ProcessLogMapper.xml +++ b/flowable/src/main/resources/mapper/ProcessLogMapper.xml @@ -5,9 +5,10 @@ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> <resultMap id="BaseResultMap" type="com.ycl.domain.vo.ProcessLogVO"> <result column="task_id" property="taskId" /> + <result column="task_name" property="taskName" /> <result column="event_type" property="eventType" typeHandler="com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler"/> <result column="project_id" property="projectId" /> - <result column="flow_ins_id" property="flowInsId" /> + <result column="process_ins_id" property="processInsId" /> <result column="user_id" property="userId" /> <result column="nick_name" property="nickName" /> <result column="gmt_create" property="gmtCreate" /> @@ -23,9 +24,10 @@ <select id="getById" resultMap="BaseResultMap"> SELECT TFL.task_id, + TFL.task_name, TFL.event_type, TFL.project_id, - TFL.flow_ins_id, + TFL.process_ins_id, TFL.user_id, TFL.event_data_json, TFL.id @@ -39,9 +41,10 @@ <select id="getPage" resultMap="BaseResultMap"> SELECT TFL.task_id, + TFL.task_name, TFL.event_type, TFL.project_id, - TFL.flow_ins_id, + TFL.process_ins_id, TFL.user_id, TFL.event_data_json, TFL.gmt_create, @@ -56,21 +59,39 @@ <select id="projectProcessLogPage" resultMap="BaseResultMap"> SELECT TFL.task_id, + TFL.task_name, TFL.event_type, TFL.project_id, - TFL.flow_ins_id, + TFL.process_ins_id, TFL.user_id, - SU.nick_name, + CONCAT(SU.nick_name, '(',COALESCE(SD.dept_name, '鏃犻儴闂�'), ')') as nick_name, TFL.event_data_json, TFL.gmt_create, TFL.id FROM t_process_log TFL LEFT JOIN sys_user SU ON SU.user_id = TFL.user_id - WHERE - TFL.deleted = 0 AND TFL.project_id = #{query.projectId} AND TFL.process_ins_id = #{query.processInsId} + LEFT JOIN sys_dept SD ON SU.dept_id = SD.dept_id + <where> + <if test="query.deleted != null">TFL.deleted = #{query.deleted}</if> + AND TFL.process_ins_id = #{query.processInsId} + <if test="query.taskId != null and query.taskId != ''">AND TFL.task_id = #{query.taskId}</if> + <if test="query.projectId != null and query.projectId != ''">AND TFL.project_id = #{query.projectId}</if> + <if test="query.taskDefKey != null and query.taskDefKey != ''">AND TFL.task_def_key = #{query.taskDefKey}</if> + </where> ORDER BY TFL.gmt_create DESC </select> + <select id="getAllHangup" resultType="java.lang.String"> + SELECT task_id + FROM ( + SELECT task_id, + COUNT(*) AS num + FROM t_process_log + WHERE task_id IS NOT NULL + GROUP BY task_id + HAVING MOD(num, 2) != 0 + ) AS t; + </select> </mapper> -- Gitblit v1.8.0