From fb2b62660ee4321102dcb247af4f319a25243867 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Tue, 10 Nov 2026 11:07:41 +0800
Subject: [PATCH] =?UTF-8?q?2026-11-10=20=E6=8A=80=E6=9C=AF=E5=8F=82?=
=?UTF-8?q?=E6=95=B0=E5=8D=A1=E5=AE=A2=E6=88=B7=E4=BF=A1=E6=81=AF=E4=B8=8D?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../TechnicalSpecificationServiceImpl.java | 2 +-
.../TechnicalSpecificationMapper.xml | 30 ++++++++++++++-----
2 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java b/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java
index 8b00f522..e0eaddc4 100644
--- a/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java
+++ b/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java
@@ -2282,7 +2282,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification
}
}
if (whereConditionArr[i].contains("customer_desc")){
- whereConditionArr[i] = "(dbo.plm_get_customer_desc(c.site, c.customer_id) " + customerDescSymbol + "'" + filteredList.get(i).getFormula() + "' or dbo.plm_get_dictDataLabel('finalCustomer', c.final_customer_id, c.site) " + customerDescSymbol + "'" + filteredList.get(i).getFormula()+"')";
+ whereConditionArr[i] = "((select max(ci.customer_desc) from plm_customer_information ci where ci.customer_no = c.customer_id) " + customerDescSymbol + "'" + filteredList.get(i).getFormula() + "' or dbo.plm_get_dictDataLabel('finalCustomer', c.final_customer_id, c.site) " + customerDescSymbol + "'" + filteredList.get(i).getFormula()+"')";
}
if (whereConditionArr[i].contains("cutterNumber")){
cutterNumber = whereConditionArr[i].split("'")[1];
diff --git a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml
index 1332a2ed..0715a90f 100644
--- a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml
+++ b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml
@@ -180,7 +180,7 @@
AND (
- dbo.plm_get_customer_desc(c.site, c.customer_id) like #{query.customerDesc} or
+ (select max(ci.customer_desc) from plm_customer_information ci where ci.customer_no = c.customer_id) like #{query.customerDesc} or
dbo.plm_get_dictDataLabel('finalCustomer', c.final_customer_id, c.site) like #{query.customerDesc}
)
@@ -2573,7 +2573,11 @@
FROM plm_technical_specification_sheet a
left join view_Project_final_Part b on a.site = b.site and a.project_id = b.project_id and a.test_part_no = b.test_part_no
left join plm_project_info c on a.site = c.site and a.project_id = c.project_id
- left join plm_customer_information cust on cust.site = c.site and cust.customer_no = c.customer_id
+ left join (
+ select customer_no, max(customer_desc) as customer_desc
+ from plm_customer_information
+ group by customer_no
+ ) cust on cust.customer_no = c.customer_id
left join plm_request_header as prh on a.site = prh.site and prh.menu_id = '103002'
left join plm_request_node as d on a.site = d.site and prh.classification_no = d.classification_no and prh.workflow_id = d.workflow_id and a.step_id = d.step_id
left join plm_customer_part_info pcpi on a.site = pcpi.site and a.test_part_no = pcpi.part_no and c.customer_id = pcpi.customer_no
@@ -2621,7 +2625,7 @@
AND (
- dbo.plm_get_customer_desc(c.site, c.customer_id) like #{customerDesc})
+ (select max(ci.customer_desc) from plm_customer_information ci where ci.customer_no = c.customer_id) like #{customerDesc})
and ${excludeStatusClause}
@@ -2694,7 +2698,7 @@
AND (
- dbo.plm_get_customer_desc(c.site, c.customer_id) like #{customerDesc} or
+ (select max(ci.customer_desc) from plm_customer_information ci where ci.customer_no = c.customer_id) like #{customerDesc} or
dbo.plm_get_dictDataLabel('finalCustomer', c.final_customer_id, c.site) like #{customerDesc}
)
@@ -2935,7 +2939,11 @@
prh.workflow_id = d.workflow_id and a.step_id = d.step_id
left join plm_customer_part_info pcpi
on a.site = pcpi.site and a.test_part_no = pcpi.part_no and c.customer_id = pcpi.customer_no
- left join plm_customer_information as pci on pcpi.site = pci.site and pcpi.customer_no = pci.customer_no
+ left join (
+ select customer_no, max(customer_desc) as customer_desc
+ from plm_customer_information
+ group by customer_no
+ ) pci on pci.customer_no = pcpi.customer_no
inner join plm_bm_prepress pbp on pbp.Site = a.site and pbp.code_no = a.code_no and
(plateNo like #{cutterNumber} or
@@ -3025,13 +3033,21 @@
left join view_Project_final_Part b
on a.site = b.site and a.project_id = b.project_id and a.test_part_no = b.test_part_no
left join plm_project_info c on a.site = c.site and a.project_id = c.project_id
- left join plm_customer_information cust on cust.site = c.site and cust.customer_no = c.customer_id
+ left join (
+ select customer_no, max(customer_desc) as customer_desc
+ from plm_customer_information
+ group by customer_no
+ ) cust on cust.customer_no = c.customer_id
left join plm_request_header as prh on a.site = prh.site and prh.menu_id = '103002'
left join plm_request_node as d on a.site = d.site and prh.classification_no = d.classification_no and
prh.workflow_id = d.workflow_id and a.step_id = d.step_id
left join plm_customer_part_info pcpi
on a.site = pcpi.site and a.test_part_no = pcpi.part_no and c.customer_id = pcpi.customer_no
- left join plm_customer_information as pci on pcpi.site = pci.site and pcpi.customer_no = pci.customer_no
+ left join (
+ select customer_no, max(customer_desc) as customer_desc
+ from plm_customer_information
+ group by customer_no
+ ) pci on pci.customer_no = pcpi.customer_no
inner join plm_bm_prepress pbp on pbp.Site = a.site and pbp.code_no = a.code_no and
(pbp.plateNo like #{cutterNumber} or