From 2f3830a539c2ed3202f99c0532e43b1b265531c5 Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Mon, 21 Apr 2025 09:59:20 +0800 Subject: [PATCH] 2025-04-21 --- .../Tooling/ProjectToolingApplyMapper.xml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/resources/mapper/Tooling/ProjectToolingApplyMapper.xml b/src/main/resources/mapper/Tooling/ProjectToolingApplyMapper.xml index c670f084..6e37c0cc 100644 --- a/src/main/resources/mapper/Tooling/ProjectToolingApplyMapper.xml +++ b/src/main/resources/mapper/Tooling/ProjectToolingApplyMapper.xml @@ -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