From a1dd6ff24f7cae0b529ad313ba07351c07965605 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期一, 03 十一月 2025 13:04:09 +0800
Subject: [PATCH] 管控线边仓库存
---
src/main/java/com/zy/common/model/DetlDto.java | 51 ++++++++++++++++++++++++++++-----------------------
1 files changed, 28 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..27f2a7a 100644
--- a/src/main/java/com/zy/common/model/DetlDto.java
+++ b/src/main/java/com/zy/common/model/DetlDto.java
@@ -21,6 +21,17 @@
private Double anfme;
+ // 璋冩嫧婧愬簱浣�
+ private String sourceLoc;
+
+ // 璋冩嫧鐩爣搴撲綅
+ private String staLoc;
+
+ /**
+ * 鍗曡鍙凤紝u8鏄庣粏id
+ */
+ private String sku;
+
public DetlDto() {
}
@@ -29,10 +40,24 @@
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 sourceLoc,String staLoc,String sku) {
+ this.matnr = matnr;
+ this.batch = batch;
+ this.anfme = anfme;
+ this.sourceLoc = sourceLoc;
+ this.staLoc = staLoc;
+ this.sku = sku;
}
public DetlDto(String orderNo, String matnr, String batch, Double anfme) {
@@ -61,16 +86,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 +98,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