From e86fb8ea46bab9f3c4434bf3f4f0dae2bac4fbcb Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 15 Apr 2025 09:18:11 +0800 Subject: [PATCH] =?UTF-8?q?2025-04-15=20qc=E6=96=B0=E5=A2=9E=E6=A3=80?= =?UTF-8?q?=E9=AA=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/modules/pms/controller/QcReportController.java | 2 -- .../xujie/sys/modules/pms/service/Impl/QcServiceImpl.java | 6 ++++++ src/main/resources/mapper/pms/PqcMapper.xml | 2 +- src/main/resources/mapper/pms/QcMapper.xml | 6 +++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/xujie/sys/modules/pms/controller/QcReportController.java b/src/main/java/com/xujie/sys/modules/pms/controller/QcReportController.java index f7f7c670..cc095410 100644 --- a/src/main/java/com/xujie/sys/modules/pms/controller/QcReportController.java +++ b/src/main/java/com/xujie/sys/modules/pms/controller/QcReportController.java @@ -146,8 +146,6 @@ public class QcReportController { } catch (IOException e) { return R.error(e.getMessage()); } - - } } diff --git a/src/main/java/com/xujie/sys/modules/pms/service/Impl/QcServiceImpl.java b/src/main/java/com/xujie/sys/modules/pms/service/Impl/QcServiceImpl.java index e4d93998..a2146d02 100644 --- a/src/main/java/com/xujie/sys/modules/pms/service/Impl/QcServiceImpl.java +++ b/src/main/java/com/xujie/sys/modules/pms/service/Impl/QcServiceImpl.java @@ -4914,6 +4914,12 @@ public class QcServiceImpl implements QcService { @Override public List searchSeqInfo(QcFAIRecordData data) { + if (data.getBu().split("_").length >= 2 ) { + data.setSite(data.getBu().split("_")[0]); + data.setBuNo(data.getBu().split("_")[1]); + } else { + throw new RuntimeException("工厂和部门有误!"); + } List list = qcMapper.searchSeqInfo(data); return list; } diff --git a/src/main/resources/mapper/pms/PqcMapper.xml b/src/main/resources/mapper/pms/PqcMapper.xml index aa5af9e7..620b62d0 100644 --- a/src/main/resources/mapper/pms/PqcMapper.xml +++ b/src/main/resources/mapper/pms/PqcMapper.xml @@ -323,7 +323,7 @@ qt.template_name FROM soscheduledrouting as a LEFT JOIN so_routing as c ON a.site = c.site and c.order_no = a.orderno and a.itemno = c.item_no - LEFT JOIN part j ON a.site = j.site and a.part_no = j.part_no + LEFT JOIN part as j ON a.site = j.site and a.part_no = j.part_no LEFT JOIN qc_attribute_template as qat on j.site = qat.site and j.sourceBu = qat.bu_no and j.part_no = qat.attribute_no and qat.inspection_type_no = #{inspectionTypeNo} LEFT JOIN qc_template as qt on qat.site = qt.site and qat.bu_no = qt.bu_no and qat.template_id = qt.template_id WHERE a.site = #{site} and a.seqno = #{seqNo} diff --git a/src/main/resources/mapper/pms/QcMapper.xml b/src/main/resources/mapper/pms/QcMapper.xml index dbf66cd6..164d6bdc 100644 --- a/src/main/resources/mapper/pms/QcMapper.xml +++ b/src/main/resources/mapper/pms/QcMapper.xml @@ -1071,13 +1071,13 @@ DELETE FROM qc_part_attribute - WHERE site = #{site} and attribute_no = #{partNo} and attribute_type = #{attributeType} + WHERE site = #{site} and bu_no = #{buNo} and attribute_no = #{partNo} and attribute_type = #{attributeType} DELETE FROM qc_attribute_template - WHERE site = #{site} and attribute_no = #{partNo} and attribute_type = #{attributeType} + WHERE site = #{site} and bu_no = #{buNo} and attribute_no = #{partNo} and attribute_type = #{attributeType} @@ -3303,7 +3303,7 @@ inner JOIN shoporder AS t ON a.site = t.site AND t.orderno = a.orderno left join qc_ipqc_record as r on a.site = r.site and a.seqno = r.seq_no WHERE - a.site = #{query.site} + a.site = #{query.site} and J.sourceBu = #{query.buNo} AND t.status = #{query.status}