@ -98,14 +98,18 @@
isnull(dbo.get_yield_rate(a.site, a.sourceBu, a.product_group_id2, '2'), 100) as yieldRate
FROM part as a
<where >
a.site = #{query.site} and a.sourceBu = #{query.buNo} and a.active = 'Y'
and (a.part_type2 <![CDATA[<>]]> 'Purchased (raw)' or a.part_type2 is null)
a.site = #{query.site}
<if test = "query.buNo != null and query.buNo != ''" >
AND a.sourceBu = #{query.buNo}
</if>
<if test = "query.partNo != null and query.partNo != ''" >
AND a.part_no like '%' + #{query.partNo} + '%'
</if>
<if test = "query.partDesc != null and query.partDesc != ''" >
AND a.part_desc like '%' + #{query.partDesc} + '%'
</if>
and (a.part_type2 <![CDATA[<>]]> 'Purchased (raw)' or a.part_type2 is null)
and a.active = 'Y'
</where>
</select>
@ -667,7 +671,7 @@
a.update_by,
b.umid2 as printUnit,
dbo.qc_get_um_name(a.site, b.umid2) as printUnitName,
isnull(dbo.get_yield_rate(b.site, b.sourceBu, b.product_group_id2, '2'), 100) as yieldRate
isnull(dbo.get_yield_rate(b.site, b.sourceBu, b.product_group_id2, '2'), 100) as yieldRate,
#{alternativeNo} as alternativeNo
FROM plm_bom_header as a
left join part as b on a.site = b.site and a.bu_no = b.sourceBu and a.part_no = b.part_no