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, 28 insertions(+), 21 deletions(-)
diff --git a/src/main/java/com/zy/common/model/DetlDto.java b/src/main/java/com/zy/common/model/DetlDto.java
index e2e8bb3..aa61bfb 100644
--- a/src/main/java/com/zy/common/model/DetlDto.java
+++ b/src/main/java/com/zy/common/model/DetlDto.java
@@ -20,6 +20,9 @@
private String batch;
private Double anfme;
+ private Integer areaId;
+
+ private String cartonLabel;
public DetlDto() {
}
@@ -29,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) {
@@ -61,16 +76,8 @@
public static boolean has(List<DetlDto> detlDtos, DetlDto detlDto) {
for (DetlDto dto : detlDtos) {
- if (Cools.isEmpty(dto.getBatch()) && Cools.isEmpty(detlDto.getBatch())) {
- if (dto.getMatnr().equals(detlDto.getMatnr())) {
- return true;
- }
- } else {
- if (!Cools.isEmpty(dto.getBatch()) && !Cools.isEmpty(detlDto.getBatch())) {
- if (dto.getMatnr().equals(detlDto.getMatnr()) && dto.getBatch().equals(detlDto.getBatch())) {
- return true;
- }
- }
+ if (dto.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(dto.getBatch(), detlDto.getBatch()) && Cools.eq(dto.getCartonLabel(), detlDto.getCartonLabel()) ) {
+ return true;
}
}
return false;
@@ -81,19 +88,19 @@
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