|
|
|
@ -59,8 +59,8 @@ |
|
|
|
dbo.get_plm_Approval_username(a.site, d.workflow_id, d.node_id, a.proofing_no) as approvalUsername, |
|
|
|
vpp.plm_part_no, |
|
|
|
a.proofing_amount, |
|
|
|
tss.ori_code_no, |
|
|
|
tss.stage |
|
|
|
dbo.GET_BM_Oricodeno(a.site,a.test_part_no) as ori_code_no, |
|
|
|
dbo.GET_BM_stage(a.site,a.test_part_no) as stage |
|
|
|
FROM plm_proofing_information as a |
|
|
|
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 |
|
|
|
@ -70,19 +70,6 @@ |
|
|
|
left join BU b on vpp.bu_no = b.bu_no and a.site = b.site |
|
|
|
left join plm_customer_part_info pcpi |
|
|
|
on a.site = pcpi.site and a.test_part_no = pcpi.part_no and a.customer_no = pcpi.customer_no |
|
|
|
LEFT JOIN ( |
|
|
|
SELECT tss1.* |
|
|
|
FROM plm_technical_specification_sheet tss1 |
|
|
|
INNER JOIN ( |
|
|
|
SELECT site, test_part_no, MAX(rev_no) AS max_rev |
|
|
|
FROM plm_technical_specification_sheet |
|
|
|
WHERE status != 'death' |
|
|
|
GROUP BY site, test_part_no |
|
|
|
) tss_max ON tss1.site = tss_max.site |
|
|
|
AND tss1.test_part_no = tss_max.test_part_no |
|
|
|
AND tss1.rev_no = tss_max.max_rev |
|
|
|
WHERE tss1.status != 'death' |
|
|
|
) tss ON a.site = tss.site AND a.test_part_no = tss.test_part_no |
|
|
|
<where> |
|
|
|
a.site = #{query.site} |
|
|
|
<if test="query.createBy != null and query.createBy != ''"> |
|
|
|
|