From b6d3c06279e077459159fcb88d737cd6e1f99037 Mon Sep 17 00:00:00 2001
From: lfd <1>
Date: 星期四, 26 三月 2026 09:46:57 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/model/DetlDto.java | 44 +++++++++++++++++++++-----------------------
1 files changed, 21 insertions(+), 23 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..0d69487 100644
--- a/src/main/java/com/zy/common/model/DetlDto.java
+++ b/src/main/java/com/zy/common/model/DetlDto.java
@@ -19,6 +19,12 @@
private String batch;
+ private String spec;
+ private String model;
+ private String unit;
+ private String planNo;
+ private String qcStatus;
+
private Double anfme;
public DetlDto() {
@@ -27,6 +33,11 @@
public DetlDto(String matnr, Double anfme) {
this.matnr = matnr;
this.anfme = anfme;
+ }
+
+ public DetlDto(String matnr, String batch) {
+ this.matnr = matnr;
+ this.batch = batch;
}
public DetlDto(String matnr, String batch, Double anfme) {
@@ -41,6 +52,13 @@
this.batch = batch;
this.anfme = anfme;
}
+ public DetlDto(String matnr, String batch, Double anfme, String qcStatus) {
+ this.matnr = matnr;
+ this.batch = batch;
+ this.anfme = anfme;
+ this.qcStatus = qcStatus;
+ }
+
public static boolean hasList(Set<DetlDto> detlDtos, OrderDetl orderDetl) {
for (DetlDto dto : detlDtos) {
@@ -61,16 +79,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())) {
+ return true;
}
}
return false;
@@ -81,19 +91,7 @@
return null;
}
for (DetlDto detlDto : detlDtos) {
- if (!matnr.equals(detlDto.getMatnr())) {
- continue;
- }
- if (Cools.isEmpty(batch) && Cools.isEmpty(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())) {
+ if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch())) {
return detlDto;
}
}
--
Gitblit v1.9.1