|
|
|
@ -25,6 +25,9 @@ |
|
|
|
<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})) |
|
|
|
<if test="query.buNo != null and query.buNo != ''"> |
|
|
|
AND a.bu_no = #{query.buNo} |
|
|
|
</if> |
|
|
|
<if test = "query.partNo != null and query.partNo != ''"> |
|
|
|
AND a.part_no like '%' + #{query.partNo} + '%' |
|
|
|
</if> |
|
|
|
@ -55,7 +58,7 @@ |
|
|
|
<where> |
|
|
|
site = #{query.site} |
|
|
|
and sourceBu = #{query.buNo} |
|
|
|
and part_type in ('Manufactured', 'Manufactured Recipe') |
|
|
|
and part_type not in ('Purchased', 'Purchased (raw)') |
|
|
|
and active = 'Y' |
|
|
|
<if test = "query.partNo != null and query.partNo != ''"> |
|
|
|
AND part_no = #{query.partNo} |
|
|
|
@ -79,9 +82,12 @@ |
|
|
|
part_type |
|
|
|
FROM part |
|
|
|
<where> |
|
|
|
site = #{query.site} and sourceBu = #{query.buNo} and active = 'Y' and part_type in ('Manufactured', 'Manufactured Recipe') |
|
|
|
site = #{query.site} |
|
|
|
and sourceBu = #{query.buNo} |
|
|
|
and active = 'Y' |
|
|
|
and part_type not in ('Purchased', 'Purchased (raw)') |
|
|
|
<if test = "query.partNo != null and query.partNo != ''"> |
|
|
|
AND part_no = #{query.partNo} |
|
|
|
AND part_no like '%' + #{query.partNo} + '%' |
|
|
|
</if> |
|
|
|
<if test = "query.partDesc != null and query.partDesc != ''"> |
|
|
|
AND part_desc like '%' + #{query.partDesc} + '%' |
|
|
|
@ -572,10 +578,10 @@ |
|
|
|
dbo.get_labor_class_desc(a.site, a.bu_no, b.setup_labor_class_no) as setupLaborClassDesc, |
|
|
|
'Units/Hour' as runTimeCode, |
|
|
|
100 as efficiencyFactor, |
|
|
|
1 as crewSize, |
|
|
|
1 as setupCrewSize, |
|
|
|
1 as machSetupTime, |
|
|
|
1 as laborSetupTime |
|
|
|
crew_size, |
|
|
|
setup_crew_size, |
|
|
|
0 as machSetupTime, |
|
|
|
0 as laborSetupTime |
|
|
|
FROM part_group_std_operations as a |
|
|
|
left join standard_routing_operation as b on a.operation_id = b.id |
|
|
|
where a.site = #{site} and a.bu_no = #{buNo} and a.product_group_id = #{productGroupId} |
|
|
|
@ -588,6 +594,7 @@ |
|
|
|
site, |
|
|
|
bu_no, |
|
|
|
condition_id, |
|
|
|
condition_desc, |
|
|
|
seq_no, |
|
|
|
condition_desc, |
|
|
|
product_group_id |
|
|
|
|