|
|
|
@ -75,8 +75,8 @@ |
|
|
|
SELECT b.site, |
|
|
|
b.project_id, |
|
|
|
d.part_no, |
|
|
|
h.part_desc as partDesc, |
|
|
|
h.part_desc as partName, |
|
|
|
H.part_desc, |
|
|
|
H.part_desc AS partName, |
|
|
|
c.routing_revision, |
|
|
|
c.routing_type, |
|
|
|
c.alternative_no, |
|
|
|
@ -95,17 +95,17 @@ |
|
|
|
c.alternative_no) alternativeDescription |
|
|
|
FROM plm_project_part b |
|
|
|
left join plm_routing_component c on b.site = c.site and |
|
|
|
(case when isnull(final_part_no, '') is not null then final_part_no else test_part_no end) = c.part_no |
|
|
|
left join routing_tool d |
|
|
|
on c.site = d.site and c.part_no = d.part_no and c.routing_revision = d.routing_revision and |
|
|
|
c.routing_type = d.routing_type |
|
|
|
and c.operation_id = d.operation_id |
|
|
|
left join tool_header e on d.site = e.site and d.tool_id = e.tool_id |
|
|
|
(case when b.final_part_no is not null then final_part_no else test_part_no end) = c.part_no |
|
|
|
INNER JOIN routing_tool d on c.site = d.site and |
|
|
|
(case when b.final_part_no is not null then final_part_no else test_part_no end) = d.part_no and |
|
|
|
c.routing_revision = d.routing_revision and |
|
|
|
c.routing_type = d.routing_type and |
|
|
|
c.operation_id = d.operation_id |
|
|
|
INNER join tool_header e on d.site = e.site and d.tool_id = e.tool_id |
|
|
|
left join plm_project_info f on b.site = f.site and b.project_id = f.project_id |
|
|
|
left join plm_customer_part_info g |
|
|
|
on b.site = g.site and f.customer_id = g.customer_no and b.test_part_no = g.part_no |
|
|
|
left join part h on b.site = h.site and b.test_part_no = h.part_no |
|
|
|
|
|
|
|
left join plm_customer_part_info g on b.site = g.site and f.customer_id = g.customer_no and b.test_part_no = g.part_no |
|
|
|
left join part h on b.site = h.site and |
|
|
|
(case when b.final_part_no is not null then final_part_no else test_part_no end) = h.part_no |
|
|
|
where b.site = #{site} |
|
|
|
and b.project_id in ${projectId} |
|
|
|
and d.tool_id is not null |
|
|
|
|