|
|
|
@ -180,9 +180,10 @@
|
|
|
|
|
order by t.UPDATE_TIME desc |
|
|
|
|
</select> |
|
|
|
|
<select id="getAllPageList" parameterType="com.hnac.hzinfo.inspect.task.vo.TaskListQuery" resultType="com.hnac.hzinfo.inspect.task.vo.TaskVo"> |
|
|
|
|
SELECT t.*,u.USER_ID as userIds,u.USER_NAME from HZ_ST_EX_TASK t |
|
|
|
|
LEFT JOIN HZ_ST_EX_TASK_USER u on t.ID=u.TASK_ID |
|
|
|
|
and u.IS_DELETED=0 |
|
|
|
|
SELECT t.*,u.USER_ID as userIds,u.USER_NAME as userNames |
|
|
|
|
from |
|
|
|
|
HZ_ST_EX_TASK t |
|
|
|
|
LEFT JOIN HZ_ST_EX_TASK_USER u on t.ID=u.TASK_ID and u.IS_DELETED=0 |
|
|
|
|
where t.IS_DELETED=0 |
|
|
|
|
<if test="task.userId != null "> |
|
|
|
|
and u.USER_ID=#{task.userId} |
|
|
|
@ -191,12 +192,15 @@
|
|
|
|
|
order by t.UPDATE_TIME desc |
|
|
|
|
</select> |
|
|
|
|
<select id="getAllExportList" resultType="com.hnac.hzinfo.inspect.task.vo.TaskVo"> |
|
|
|
|
SELECT t.*,b.USER_ID as userIds,(SELECT group_concat(u .user_name) FROM HZ_ST_EX_TASK_USER u WHERE t.ID=u.TASK_ID |
|
|
|
|
<if test="task.userId != null "> |
|
|
|
|
and u.USER_ID=#{task.userId} |
|
|
|
|
</if>) AS userNames from HZ_ST_EX_TASK t |
|
|
|
|
LEFT JOIN HZ_ST_EX_TASK_USER b on t.ID=b.TASK_ID |
|
|
|
|
and b.IS_DELETED=0 |
|
|
|
|
SELECT |
|
|
|
|
t.*, b.USER_ID as userIds, |
|
|
|
|
(SELECT group_concat(u.user_name) FROM HZ_ST_EX_TASK_USER u WHERE t.ID=u.TASK_ID |
|
|
|
|
<if test="task.userId != null "> |
|
|
|
|
and u.USER_ID=#{task.userId} |
|
|
|
|
</if>) AS userNames |
|
|
|
|
from |
|
|
|
|
HZ_ST_EX_TASK t |
|
|
|
|
LEFT JOIN HZ_ST_EX_TASK_USER b on t.ID=b.TASK_ID and b.IS_DELETED=0 |
|
|
|
|
where t.IS_DELETED=0 |
|
|
|
|
<if test="task.userId != null "> |
|
|
|
|
and u.USER_ID=#{task.userId} |
|
|
|
|