|
|
@ -850,9 +850,12 @@ |
|
|
left join operator as d on a.site = d.site and a.CreateBy = d.operator_id and d.active = 'Y' |
|
|
left join operator as d on a.site = d.site and a.CreateBy = d.operator_id and d.active = 'Y' |
|
|
left join eam_object as e on a.site = e.site and a.ObjectID = e.ObjectID and e.Active = 'Y' and a.bu_no = e.bu_no |
|
|
left join eam_object as e on a.site = e.site and a.ObjectID = e.ObjectID and e.Active = 'Y' and a.bu_no = e.bu_no |
|
|
left join sys_department as f on e.site = f.site and e.dept_id = f.department_id and e.bu_no = f.bu_no |
|
|
left join sys_department as f on e.site = f.site and e.dept_id = f.department_id and e.bu_no = f.bu_no |
|
|
|
|
|
left join Access_dept as ead ON ead.site = f.site and ead.department_id = f.department_id and ead.bu_no = f.bu_no |
|
|
|
|
|
left join sys_user as ea on ead.username = ea.username |
|
|
<where> |
|
|
<where> |
|
|
a.site in (select site from eam_access_site where username = #{query.userName}) |
|
|
a.site in (select site from eam_access_site where username = #{query.userName}) |
|
|
and (a.site + '-' + a.bu_no) in (select * from dbo.query_bu(#{query.userName})) |
|
|
and (a.site + '-' + a.bu_no) in (select * from dbo.query_bu(#{query.userName})) |
|
|
|
|
|
and ea.username = #{query.userName} |
|
|
<if test="query.buDesc != null and query.buDesc != ''"> |
|
|
<if test="query.buDesc != null and query.buDesc != ''"> |
|
|
AND dbo.get_bu_desc ( a.site, a.bu_no ) = #{query.buDesc} |
|
|
AND dbo.get_bu_desc ( a.site, a.bu_no ) = #{query.buDesc} |
|
|
</if> |
|
|
</if> |
|
|
@ -1394,9 +1397,14 @@ |
|
|
from eam_defect_feedBack a |
|
|
from eam_defect_feedBack a |
|
|
left join eam_defect b on a.DefectID = b.DefectID |
|
|
left join eam_defect b on a.DefectID = b.DefectID |
|
|
left join operator as c on a.site = c.site and a.CreatedBy = c.operator_id |
|
|
left join operator as c on a.site = c.site and a.CreatedBy = c.operator_id |
|
|
|
|
|
left join eam_object as e on a.site = e.site and a.ObjectID = e.ObjectID and e.Active = 'Y' and a.bu_no = e.bu_no |
|
|
|
|
|
left join sys_department as f on e.site = f.site and e.dept_id = f.department_id and e.bu_no = f.bu_no |
|
|
|
|
|
left join Access_dept as ead ON ead.site = f.site and ead.department_id = f.department_id and ead.bu_no = f.bu_no |
|
|
|
|
|
left join sys_user as ea on ead.username = ea.username |
|
|
<where> |
|
|
<where> |
|
|
a.site in (select site from eam_access_site where username = #{query.userName}) |
|
|
a.site in (select site from eam_access_site where username = #{query.userName}) |
|
|
and (a.site + '-' + a.bu_no) in (select * from dbo.query_bu(#{query.userName})) |
|
|
and (a.site + '-' + a.bu_no) in (select * from dbo.query_bu(#{query.userName})) |
|
|
|
|
|
and ea.username = #{query.userName} |
|
|
<if test="query.feedBackID != null and query.feedBackID != ''"> |
|
|
<if test="query.feedBackID != null and query.feedBackID != ''"> |
|
|
AND a.feedBackID like '%' + #{query.feedBackID} +'%' |
|
|
AND a.feedBackID like '%' + #{query.feedBackID} +'%' |
|
|
</if> |
|
|
</if> |
|
|
|