left join plm_request_header as prh on a.site = prh.site and prh.menu_id = #{query.menuId}
left join plm_request_node as d on a.site = d.site and prh.classification_no = d.classification_no and prh.workflow_id = d.workflow_id and a.step_id = d.step_id
left join plm_request_node as d on a.site = d.site and prh.classification_no = d.classification_no and
prh.workflow_id = d.workflow_id and a.step_id = d.step_id
left join view_Project_Part vpp
on vpp.site = a.site and vpp.test_part_no = a.test_part_no and vpp.project_id = a.project_id
left join BU b on vpp.bu_no = b.bu_no and a.site = b.site
<where>
a.site = #{query.site}
and vpp.bu_no in (select bu_No from dbo.Get_Now_BU_chooseAble(a.site, #{query.createBy}))
<iftest="query.testNo != null and query.testNo != ''">
AND a.test_no like #{query.testNo}
</if>
@ -103,6 +109,9 @@
<iftest="query.endDate != null">
AND #{query.endDate} >= a.required_delivery_date
</if>
<iftest="query.buNo != null and query.buNo != ''">