|
|
@ -31,13 +31,13 @@ |
|
|
, tl.updated_by |
|
|
, tl.updated_by |
|
|
, tl.task_header |
|
|
, tl.task_header |
|
|
, u.username responsible_person |
|
|
, u.username responsible_person |
|
|
,( td.department + ' | ' + u.username) as dep_user_name |
|
|
|
|
|
|
|
|
,( u.department + ' | ' + u.username) as dep_user_name |
|
|
, td.task_id |
|
|
, td.task_id |
|
|
from task_detail td |
|
|
from task_detail td |
|
|
left join task_list tl on td.task_id = tl.id AND td.site = tl.site |
|
|
left join task_list tl on td.task_id = tl.id AND td.site = tl.site |
|
|
left join users u on td.site = u.site and u.userId = td.responsible_person |
|
|
left join users u on td.site = u.site and u.userId = td.responsible_person |
|
|
left join users u2 on td.site = u2.site and u2.userId = tl.task_initiator |
|
|
left join users u2 on td.site = u2.site and u2.userId = tl.task_initiator |
|
|
LEFT JOIN report_mapping_ipaddress rmi on rmi.department = td.department |
|
|
|
|
|
|
|
|
LEFT JOIN report_mapping_ipaddress rmi on rmi.department = u.department |
|
|
<where> |
|
|
<where> |
|
|
td.site = #{site} |
|
|
td.site = #{site} |
|
|
<if test="ipAddress != null and ipAddress != ''"> |
|
|
<if test="ipAddress != null and ipAddress != ''"> |
|
|
@ -47,7 +47,7 @@ |
|
|
and tl.created_by like #{taskInitiator} |
|
|
and tl.created_by like #{taskInitiator} |
|
|
</if> |
|
|
</if> |
|
|
<if test="department != null and department != ''"> |
|
|
<if test="department != null and department != ''"> |
|
|
and td.department like #{department} |
|
|
|
|
|
|
|
|
and u.department like #{department} |
|
|
</if> |
|
|
</if> |
|
|
<if test="customer != null and customer != ''"> |
|
|
<if test="customer != null and customer != ''"> |
|
|
and tl.customer like #{customer} |
|
|
and tl.customer like #{customer} |
|
|
|