工单流程VO渲染效果
This commit is contained in:
@@ -15,6 +15,21 @@
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="VOResultMap" type="org.xyzh.api.workcase.vo.WorkcaseProcessVO">
|
||||
<id column="process_id" property="processId" jdbcType="VARCHAR"/>
|
||||
<result column="optsn" property="optsn" jdbcType="VARCHAR"/>
|
||||
<result column="workcase_id" property="workcaseId" jdbcType="VARCHAR"/>
|
||||
<result column="action" property="action" jdbcType="VARCHAR"/>
|
||||
<result column="message" property="message" jdbcType="VARCHAR"/>
|
||||
<result column="files" property="files" jdbcType="ARRAY" typeHandler="org.xyzh.common.jdbc.handler.StringArrayTypeHandler"/>
|
||||
<result column="processor" property="processor" jdbcType="VARCHAR"/>
|
||||
<result column="processor_name" property="processorName" jdbcType="VARCHAR"/>
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
||||
<result column="creator" property="creator" jdbcType="VARCHAR"/>
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
process_id, optsn, workcase_id, action, message, files, processor, remark, creator, create_time
|
||||
</sql>
|
||||
@@ -58,50 +73,64 @@
|
||||
WHERE process_id = #{processId}
|
||||
</select>
|
||||
|
||||
<select id="selectWorkcaseProcessList" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM workcase.tb_workcase_process
|
||||
<select id="selectWorkcaseProcessList" resultMap="VOResultMap">
|
||||
SELECT p.process_id, p.optsn, p.workcase_id, p.action, p.message, p.files,
|
||||
p.processor, p.remark, p.creator, p.create_time,
|
||||
COALESCE(u1.username, g1.name) as creator_name,
|
||||
COALESCE(u2.username, g2.name) as processor_name
|
||||
FROM workcase.tb_workcase_process p
|
||||
LEFT JOIN sys.tb_sys_user_info u1 ON p.creator = u1.user_id
|
||||
LEFT JOIN sys.tb_guest g1 ON p.creator = g1.user_id
|
||||
LEFT JOIN sys.tb_sys_user_info u2 ON p.processor = u2.user_id
|
||||
LEFT JOIN sys.tb_guest g2 ON p.processor = g2.user_id
|
||||
<where>
|
||||
<if test="filter.processId != null and filter.processId != ''">
|
||||
AND process_id = #{filter.processId}
|
||||
AND p.process_id = #{filter.processId}
|
||||
</if>
|
||||
<if test="filter.workcaseId != null and filter.workcaseId != ''">
|
||||
AND workcase_id = #{filter.workcaseId}
|
||||
AND p.workcase_id = #{filter.workcaseId}
|
||||
</if>
|
||||
<if test="filter.action != null and filter.action != ''">
|
||||
AND action = #{filter.action}
|
||||
AND p.action = #{filter.action}
|
||||
</if>
|
||||
<if test="filter.processor != null and filter.processor != ''">
|
||||
AND processor = #{filter.processor}
|
||||
AND p.processor = #{filter.processor}
|
||||
</if>
|
||||
<if test="filter.creator != null and filter.creator != ''">
|
||||
AND creator = #{filter.creator}
|
||||
AND p.creator = #{filter.creator}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time ASC
|
||||
ORDER BY p.create_time ASC
|
||||
</select>
|
||||
|
||||
<select id="selectWorkcaseProcessPage" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM workcase.tb_workcase_process
|
||||
<select id="selectWorkcaseProcessPage" resultMap="VOResultMap">
|
||||
SELECT p.process_id, p.optsn, p.workcase_id, p.action, p.message, p.files,
|
||||
p.processor, p.remark, p.creator, p.create_time,
|
||||
COALESCE(u1.username, g1.name) as creator_name,
|
||||
COALESCE(u2.username, g2.name) as processor_name
|
||||
FROM workcase.tb_workcase_process p
|
||||
LEFT JOIN sys.tb_sys_user_info u1 ON p.creator = u1.user_id
|
||||
LEFT JOIN sys.tb_guest g1 ON p.creator = g1.user_id
|
||||
LEFT JOIN sys.tb_sys_user_info u2 ON p.processor = u2.user_id
|
||||
LEFT JOIN sys.tb_guest g2 ON p.processor = g2.user_id
|
||||
<where>
|
||||
<if test="filter.processId != null and filter.processId != ''">
|
||||
AND process_id = #{filter.processId}
|
||||
AND p.process_id = #{filter.processId}
|
||||
</if>
|
||||
<if test="filter.workcaseId != null and filter.workcaseId != ''">
|
||||
AND workcase_id = #{filter.workcaseId}
|
||||
AND p.workcase_id = #{filter.workcaseId}
|
||||
</if>
|
||||
<if test="filter.action != null and filter.action != ''">
|
||||
AND action = #{filter.action}
|
||||
AND p.action = #{filter.action}
|
||||
</if>
|
||||
<if test="filter.processor != null and filter.processor != ''">
|
||||
AND processor = #{filter.processor}
|
||||
AND p.processor = #{filter.processor}
|
||||
</if>
|
||||
<if test="filter.creator != null and filter.creator != ''">
|
||||
AND creator = #{filter.creator}
|
||||
AND p.creator = #{filter.creator}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time ASC
|
||||
ORDER BY p.create_time ASC
|
||||
LIMIT #{pageParam.pageSize} OFFSET #{pageParam.offset}
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user