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}