<!-- left join plm_project_part b on a.site = b.site and a.bu_no = b.bu_no and a.project_id = b.project_id and a.test_part_no = b.project_id and b.site = #{query.site} and b.project_id = #{query.projectId}-->
<!-- left join part as c on a.site = c.site and a.test_part_no = c.part_no-->
<!-- where b.site is null and c.show_in_query_flag = 'Y'-->
left join plm_project_info as ppi1 on ppi1.site = prp1.site and ppi1.project_id = prp1.project_id
where prp1.site = #{query.site} and ppi1.customer_id <![CDATA[<>]]> #{query.customerId}
) as a
left join (select
prp2.site,
prp2.test_part_no
from plm_project_part as prp2
left join plm_project_info as ppi2 on ppi2.site = prp2.site and ppi2.project_id = prp2.project_id
where prp2.site = #{query.site} and ppi2.customer_id = #{query.customerId}) as b
on a.site = b.site and a.test_part_no = b.test_part_no
from plm_project_part a
left join plm_project_part b on a.site = b.site and a.bu_no = b.bu_no and a.project_id = b.project_id and a.test_part_no = b.project_id and b.site = #{query.site} and b.project_id = #{query.projectId}
left join part as c on a.site = c.site and a.test_part_no = c.part_no
where b.test_part_no is null and c.show_in_query_flag = 'Y'
<!---- left join plm_project_part as b on a.site = b.site and a.plm_part_no = b.test_part_no-->
<!-- left join plm_project_part as c on a.site = c.site and a.ifs_part_no = c.test_part_no and c.site =#{query.site} and project_id =#{query.projectId}-->