dbo.qc_get_um_name(a.site, b.umid) as printUnitName
b.umid2 as printUnit,
dbo.qc_get_um_name(a.site, b.umid2) as printUnitName,
isnull(c.yield_rate, 100) as yieldRate
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
left join part_product_group as c on b.site = c.site and b.sourceBu = c.bu_no and b.product_group_id2 = c.product_group_id
<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}))
and c.type = '2'
<iftest="query.buNo != null and query.buNo != ''">
AND a.bu_no = #{query.buNo}
</if>
@ -55,8 +58,8 @@
part_no,
part_desc,
spec,
umid as printUnit,
dbo.qc_get_um_name(site, umid) as printUnitName,
umid2 as printUnit,
dbo.qc_get_um_name(site, umid2) as printUnitName,
part_type2,
case when part_type2 = 'Manufactured' then '成品' when part_type2 = 'Manufactured Recipe' then '半成品' when part_type2 = 'Purchased (raw)' then '原材料' end as partType2Desc,
FamilyID,
@ -84,8 +87,8 @@
part_no,
part_desc,
spec,
umid as printUnit,
dbo.qc_get_um_name(site, umid) as printUnitName,
umid2 as printUnit,
dbo.qc_get_um_name(site, umid2) as printUnitName,
part_type2,
case when part_type2 = 'Manufactured' then '成品' when part_type2 = 'Manufactured Recipe' then '半成品' when part_type2 = 'Purchased (raw)' then '原材料' end as partType2Desc,
dbo.qc_get_part_desc(site, bu_no, part_no) as partDesc,
bom_type,
eng_chg_level,
eff_phase_in_date,
eff_phase_out_date,
eng_revision,
type_flag,
net_weight,
note_text
FROM plm_bom_header
where site = #{site} and bu_no = #{buNo} and part_no = #{partNo} and bom_type = #{bomType} and eng_chg_level = #{engChgLevel}
a.site,
a.bu_no,
a.part_no,
dbo.qc_get_part_desc(a.site, a.bu_no, a.part_no) as partDesc,
a.bom_type,
a.eng_chg_level,
a.eff_phase_in_date,
a.eff_phase_out_date,
a.eng_revision,
a.type_flag,
a.net_weight,
a.note_text,
isnull(c.yield_rate, 0) as yieldRate
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
left join part_product_group as c on b.site = c.site and b.sourceBu = c.bu_no and b.product_group_id2 = c.product_group_id
where a.site = #{site} and a.bu_no = #{buNo} and a.part_no = #{partNo} and a.bom_type = #{bomType} and a.eng_chg_level = #{engChgLevel} and c.type = '2'
</select>
<!-- bom明细查重 -->
@ -583,8 +589,8 @@
part_no,
part_desc,
spec,
umid as printUnit,
dbo.qc_get_um_name(site, umid) as printUnitName,
umid2 as printUnit,
dbo.qc_get_um_name(site, umid2) as printUnitName,
part_type2,
case when part_type2 = 'Manufactured' then '成品' when part_type2 = 'Manufactured Recipe' then '半成品' when part_type2 = 'Purchased (raw)' then '原材料' end as partType2Desc,
dbo.qc_get_um_name(a.site, b.umid) as printUnitName
b.umid2 as printUnit,
dbo.qc_get_um_name(a.site, b.umid2) as printUnitName
FROM plm_routing_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
<where>
@ -52,8 +52,8 @@
part_no,
part_desc,
spec,
umid as printUnit,
dbo.qc_get_um_name(site, umid) as printUnitName,
umid2 as printUnit,
dbo.qc_get_um_name(site, umid2) as printUnitName,
part_type2,
case when part_type2 = 'Manufactured' then '成品' when part_type2 = 'Manufactured Recipe' then '半成品' when part_type2 = 'Purchased (raw)' then '原材料' end as partType2Desc
FROM part
@ -79,8 +79,8 @@
part_no,
part_desc,
spec,
umid as printUnit,
dbo.qc_get_um_name(site, umid) as printUnitName,
umid2 as printUnit,
dbo.qc_get_um_name(site, umid2) as printUnitName,
part_type2,
case when part_type2 = 'Manufactured' then '成品' when part_type2 = 'Manufactured Recipe' then '半成品' when part_type2 = 'Purchased (raw)' then '原材料' end as partType2Desc