|
|
|
@ -752,6 +752,9 @@ |
|
|
|
</if> |
|
|
|
<if test="query.orderNo != null and query.orderNo != ''"> |
|
|
|
AND a.OrderNo like '%' + #{query.orderNo} +'%' |
|
|
|
</if> |
|
|
|
<if test="query.corePartNo != null and query.corePartNo != ''"> |
|
|
|
AND ewc.partNo like '%' + #{query.corePartNo} +'%' |
|
|
|
</if> |
|
|
|
<if test="query.planID != null and query.planID != ''"> |
|
|
|
AND a.PlanID like '%' + #{query.planID} +'%' |
|
|
|
@ -862,7 +865,11 @@ |
|
|
|
dbo.joint_name(a.Site,a.bu_no,a.OrderNo,a.FunctionType) as actualOperatorName, |
|
|
|
a.fault_reason, |
|
|
|
a.preventive_measure, |
|
|
|
a.document_source |
|
|
|
a.document_source, |
|
|
|
isnull(ewc.partNo,'') core_partNo, |
|
|
|
isnull(ps.part_description,'') core_part_description, |
|
|
|
isnull(ewc.oldSerialNo,'') oldSerialNo, |
|
|
|
isnull(ewc.newSerialNo,'') newSerialNo |
|
|
|
FROM eam_workOrder a |
|
|
|
left join eam_defect_feedBack b on a.site = b.site and a.PlanID = b.feedBackID and a.bu_no = b.bu_no |
|
|
|
left join eam_defect c on b.DefectID = c.DefectID |
|
|
|
@ -871,6 +878,8 @@ |
|
|
|
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 |
|
|
|
left join eam_workOrder_coreComponents as ewc on a.site=ewc.site and a.orderNo=ewc.orderNo and a.bu_no = ewc.bu_no |
|
|
|
left join part_spare as ps on ewc.site=ps.site and ewc.partNo=ps.part_no and ewc.bu_no=ps.bu_no |
|
|
|
<where> |
|
|
|
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})) |
|
|
|
@ -890,6 +899,9 @@ |
|
|
|
<if test="query.planID != null and query.planID != ''"> |
|
|
|
AND a.PlanID like '%' + #{query.planID} +'%' |
|
|
|
</if> |
|
|
|
<if test="query.corePartNo != null and query.corePartNo != ''"> |
|
|
|
AND ewc.partNo like '%' + #{query.corePartNo} +'%' |
|
|
|
</if> |
|
|
|
<if test="query.objectID != null and query.objectID != ''"> |
|
|
|
AND a.ObjectID like '%' + #{query.objectID} +'%' |
|
|
|
</if> |
|
|
|
|