From f053a7011c214528bfa93044855d250dd4569b96 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Fri, 18 Mar 2022 14:25:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E6=AC=A1=E5=85=BC=E5=AE=B9=E4=B8=80?= =?UTF-8?q?=E4=B8=8B=E8=B5=B5=E7=8E=89=E6=9D=BE"=E4=B8=8D=E6=98=AF?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E6=89=B9=E6=AC=A1=E7=9A=84=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E4=B9=9F=E5=8F=AF=E4=BB=A5=E6=9C=89=E7=9B=B8=E5=90=8C=E7=9A=84?= =?UTF-8?q?=E6=89=B9=E6=AC=A1=E5=8F=B7"=E7=9A=84=E9=9C=80=E6=B1=82?= =?UTF-8?q?=EF=BC=81=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xkrs/service/impl/QcSourceServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/xkrs/service/impl/QcSourceServiceImpl.java b/src/main/java/com/xkrs/service/impl/QcSourceServiceImpl.java index 7e0cedb..e06710d 100644 --- a/src/main/java/com/xkrs/service/impl/QcSourceServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/QcSourceServiceImpl.java @@ -188,7 +188,7 @@ public class QcSourceServiceImpl implements QcSourceService { continue; } String formatValue = getFormatValue(varietyNo, craftItemNo, qcItemNo, qcValue); - Map emptyRoom = findEmptyRoom(resultList, batchNo, qcItemNo); + Map emptyRoom = findEmptyRoom(resultList, qcItemNo, batchNo, machineNo, materialNo, mouldNo, varietyNo, craftItemNo); if (emptyRoom == null) { Map newRoom = new HashMap<>(); newRoom.put(EXCEL_HEAD_STYLE_ONE_NO.get(0), batchNo); @@ -242,12 +242,12 @@ public class QcSourceServiceImpl implements QcSourceService { /** * 尝试找到一个qcItemNo有空位置的Map */ - private Map findEmptyRoom(List> mapList, String batchNo, String qcItemNo) { - if (mapList == null || mapList.isEmpty() || TextUtils.isEmpty(batchNo) || TextUtils.isEmpty(qcItemNo)) { + private Map findEmptyRoom(List> mapList, String qcItemNo, String batchNo, String machineNo, String materialNo, String mouldNo, String varietyNo, String craftItemNo) { + if (mapList == null || mapList.isEmpty() || TextUtils.isEmpty(qcItemNo)) { return null; } for (Map room : mapList) { - if (room.getOrDefault("batchNo", "").equals(batchNo)) { + if (room.getOrDefault("batchNo", "").equals(batchNo) && room.getOrDefault("machineNo", "").equals(machineNo) && room.getOrDefault("materialNo", "").equals(materialNo) && room.getOrDefault("mouldNo", "").equals(mouldNo) && room.getOrDefault("varietyNo", "").equals(varietyNo) && room.getOrDefault("craftItemNo", "").equals(craftItemNo)) { if (!room.containsKey(qcItemNo)) { return room; }