From d907a822a940c7ec0fb7de0ca845472bda52229b Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期二, 03 二月 2026 14:33:12 +0800
Subject: [PATCH] #pda料箱组托和换码

---
 src/main/java/com/zy/common/model/DetlDto.java |   49 +++++++++++++++++++++++++++++++++++++------------
 1 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/zy/common/model/DetlDto.java b/src/main/java/com/zy/common/model/DetlDto.java
index daf439e..aa61bfb 100644
--- a/src/main/java/com/zy/common/model/DetlDto.java
+++ b/src/main/java/com/zy/common/model/DetlDto.java
@@ -4,6 +4,7 @@
 import com.zy.asrs.entity.OrderDetl;
 import lombok.Data;
 
+import java.util.List;
 import java.util.Set;
 
 /**
@@ -19,6 +20,9 @@
     private String batch;
 
     private Double anfme;
+    private Integer areaId;
+
+    private String cartonLabel;
 
     public DetlDto() {
     }
@@ -28,10 +32,22 @@
         this.anfme = anfme;
     }
 
+    public DetlDto(String matnr, String batch) {
+        this.matnr = matnr;
+        this.batch = batch;
+    }
+
     public DetlDto(String matnr, String batch, Double anfme) {
         this.matnr = matnr;
         this.batch = batch;
         this.anfme = anfme;
+    }
+
+    public DetlDto(String matnr, String batch, Double anfme,String cartonLabel) {
+        this.matnr = matnr;
+        this.batch = batch;
+        this.anfme = anfme;
+        this.cartonLabel = cartonLabel;
     }
 
     public DetlDto(String orderNo, String matnr, String batch, Double anfme) {
@@ -58,24 +74,33 @@
         return false;
     }
 
-    public static DetlDto find(Set<DetlDto> detlDtos, String matnr, String batch) {
+    public static boolean has(List<DetlDto> detlDtos, DetlDto detlDto) {
+        for (DetlDto dto : detlDtos) {
+            if (dto.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(dto.getBatch(), detlDto.getBatch()) && Cools.eq(dto.getCartonLabel(), detlDto.getCartonLabel()) ) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static DetlDto find(List<DetlDto> detlDtos, String matnr, String batch) {
         if (Cools.isEmpty(matnr)) {
             return null;
         }
         for (DetlDto detlDto : detlDtos) {
-            if (!matnr.equals(detlDto.getMatnr())) {
-                continue;
-            }
-            if (Cools.isEmpty(batch) && Cools.isEmpty(detlDto.getBatch())) {
+            if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch())) {
                 return detlDto;
             }
-            if (Cools.isEmpty(batch) && !Cools.isEmpty(detlDto.getBatch())) {
-                continue;
-            }
-            if (Cools.isEmpty(detlDto.getBatch()) && !Cools.isEmpty(batch)) {
-                continue;
-            }
-            if (batch.equals(detlDto.getBatch())) {
+        }
+        return null;
+    }
+
+    public static DetlDto find(List<DetlDto> detlDtos, String matnr, String batch,String cartonLabel) {
+        if (Cools.isEmpty(matnr)) {
+            return null;
+        }
+        for (DetlDto detlDto : detlDtos) {
+            if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch()) && Cools.eq(cartonLabel, detlDto.getCartonLabel())) {
                 return detlDto;
             }
         }

--
Gitblit v1.9.1