From e95d796495feedd1ca4535ca3617b937188701cc Mon Sep 17 00:00:00 2001 From: chenlu <1320612696@qq.com> Date: 星期三, 30 四月 2025 16:07:59 +0800 Subject: [PATCH] 修改可编辑标签打印时,同序号不同架时,标签过滤逻辑 --- north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java index d8aef81..ed590ab 100644 --- a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java +++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java @@ -814,16 +814,17 @@ List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//鏈�缁堢粨鏋� List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); if (!flowCardList.isEmpty()) { - Set<String> processedProcessIds = new HashSet<>(); // 鐢ㄦ潵瀛樻斁宸插鐞嗚繃鐨� processId + Set<String> processedKeys = new HashSet<>(); if (lableType != 2) {//鎴愬搧鏍囩 for (FlowCard flowCard : flowCardList) { String orderId = flowCard.getOrderId(); String processId = flowCard.getProcessId(); String orderNumber = flowCard.getOrderNumber().toString(); + String uniqueKey = processId + "|" + orderNumber; // 鐢ㄧ壒娈婂瓧绗﹁繛鎺ラ槻姝㈠啿绐� if (processId!=null){ // 妫�鏌ユ槸鍚﹀凡缁忓鐞嗚繃璇� processId锛屽鏋滃鐞嗚繃鍒欒烦杩� - if (processedProcessIds.contains(processId) && processedProcessIds.contains(orderNumber)) { + if (processedKeys.contains(uniqueKey)) { continue; } Map<String, Object> itemmap = new HashMap<>(); @@ -831,8 +832,7 @@ list.add(itemmap); // 灏嗚 processId 鍔犲叆宸插鐞嗛泦鍚� - processedProcessIds.add(processId); - processedProcessIds.add(orderNumber); + processedKeys.add(uniqueKey); } else{ Map<String, Object> itemmap = new HashMap<>(); -- Gitblit v1.8.0