From 3bb4318838b873e346f125659e9a1f531f92d70a Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期三, 03 九月 2025 17:16:40 +0800
Subject: [PATCH] 许可证有效期”改成“仓储系统许可有效期
---
src/main/java/com/zy/common/model/DetlDto.java | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 110 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/common/model/DetlDto.java b/src/main/java/com/zy/common/model/DetlDto.java
index 0729be7..8890207 100644
--- a/src/main/java/com/zy/common/model/DetlDto.java
+++ b/src/main/java/com/zy/common/model/DetlDto.java
@@ -1,6 +1,11 @@
package com.zy.common.model;
+import com.core.common.Cools;
+import com.zy.asrs.entity.OrderDetl;
import lombok.Data;
+
+import java.util.List;
+import java.util.Set;
/**
* Created by vincent on 2022/3/25
@@ -8,13 +13,60 @@
@Data
public class DetlDto {
- private String orderNo;
+ /**
+ * 1锛氭甯� 0锛氬叧闂�
+ */
+ private Integer sts;
+ /**
+ * 琛屽彿
+ */
+ private String model;
+
+ /**
+ * 鐗╂枡缂栫爜
+ */
private String matnr;
+ /**
+ * 鐗╂枡缂栫爜
+ */
+ private String maktx;
+
+ /**
+ * 鐗规畩璇存槑
+ */
private String batch;
+ /**
+ * 瀹屾垚鏁伴噺
+ */
private Double anfme;
+
+ /**
+ * 瑙勬牸
+ */
+ private String specs;
+
+ /**
+ * 绔嬪簱婧愯揣浣嶏紙榛樿1-1锛�
+ */
+ private String sourceStaNo = "1-1";
+
+ /**
+ * 鐩爣璐т綅
+ */
+ private String locNo = "2-2";
+
+ /**
+ * 琛屼富閿�
+ */
+ private String memo;
+
+ private String orderNo;
+
+
+ private Double units;
public DetlDto() {
}
@@ -24,10 +76,67 @@
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, Double units) {
+ this.matnr = matnr;
+ this.batch = batch;
+ this.anfme = anfme;
+ this.units = units;
+ }
+
public DetlDto(String orderNo, String matnr, String batch, Double anfme) {
this.orderNo = orderNo;
this.matnr = matnr;
this.batch = batch;
this.anfme = anfme;
}
+
+ public static boolean hasList(Set<DetlDto> detlDtos, OrderDetl orderDetl) {
+ for (DetlDto dto : detlDtos) {
+ if (Cools.isEmpty(dto.getBatch()) && Cools.isEmpty(orderDetl.getBatch())) {
+ if (dto.getMatnr().equals(orderDetl.getMatnr())) {
+ return true;
+ }
+ } else {
+ if (!Cools.isEmpty(dto.getBatch()) && !Cools.isEmpty(orderDetl.getBatch())) {
+ if (dto.getMatnr().equals(orderDetl.getMatnr()) && dto.getBatch().equals(orderDetl.getBatch())) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ 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())) {
+ 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()) && Cools.eq(batch, detlDto.getBatch())) {
+ return detlDto;
+ }
+ }
+ return null;
+ }
+
}
--
Gitblit v1.9.1