From e90dba0edc93be26e1509cfb2ec1d0681eb86e48 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期三, 27 八月 2025 08:37:04 +0800
Subject: [PATCH] 合并出库添加日志
---
src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java | 73 ++++++++++++++++++++++++------------
1 files changed, 49 insertions(+), 24 deletions(-)
diff --git a/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java b/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
index 9483bf4..10b159e 100644
--- a/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
@@ -1,10 +1,15 @@
package com.zy.asrs.entity.param;
+import com.core.common.Cools;
+import lombok.Data;
+
+import java.util.ArrayList;
import java.util.List;
/**
* Created by vincent on 2020/6/18
*/
+@Data
public class LocDetlAdjustParam {
// 搴撲綅鍙�
@@ -13,45 +18,65 @@
// 璋冩暣搴撳瓨鏄庣粏闆嗗悎
private List<LocDetlAdjust> list;
+ @Data
public static class LocDetlAdjust {
// 鐗╂枡鍙�
- private String matNo;
+ private String matnr;
+
+ // 搴忓垪鐮�
+ private String batch;
// 鍙樻洿鏁伴噺
private Double count;
- public String getMatNo() {
- return matNo;
- }
+ // 閿�鍞鍗曞彿
+ private String orderNo;
- public void setMatNo(String matNo) {
- this.matNo = matNo;
- }
+ // 閿�鍞鍗曞彿
+ private String threeCode;
- public Double getCount() {
- return count;
- }
+ //閿�鍞鍗曡鍙�
+ private String deadTime;
- public void setCount(Double count) {
+ //璐ф灦鐮�
+ private String suppCode;
+
+ // 宸ュ簭
+ private Integer processSts;
+
+ public LocDetlAdjust(String matnr, String batch, Double count, String orderNo,String threeCode, String deadTime, String suppCode, Integer processSts) {
+ this.matnr = matnr;
+ this.batch = batch;
this.count = count;
+ this.orderNo = orderNo;
+ this.threeCode = threeCode;
+ this.deadTime = deadTime;
+ this.suppCode = suppCode;
+ this.processSts = processSts;
}
}
- public String getLocNo() {
- return locNo;
+ public void integrate() {
+ if (Cools.isEmpty(list)) {
+ return;
+ }
+ List<LocDetlAdjust> copyList = new ArrayList<>();
+ for (LocDetlAdjust adjust : list) {
+ boolean exit = false;
+ for (LocDetlAdjust copy : copyList) {
+ if (adjust.getMatnr().equals(copy.getMatnr()) && Cools.eq(adjust.getBatch(), copy.getBatch()) && Cools.eq(adjust.getSuppCode(),copy.getSuppCode()) && Cools.eq(adjust.getThreeCode(),copy.getThreeCode()) && Cools.eq(adjust.getDeadTime(),copy.getDeadTime())) {
+ copy.setCount(copy.getCount() + adjust.getCount());
+ exit = true;
+ break;
+ }
+ }
+ if (!exit) {
+ copyList.add(new LocDetlAdjustParam.LocDetlAdjust(adjust.getMatnr(), adjust.getBatch(), adjust.getCount(),adjust.getOrderNo(), adjust.getThreeCode(), adjust.getDeadTime(),adjust.getSuppCode(),adjust.getProcessSts()));
+ }
+ }
+ list = copyList;
}
- public void setLocNo(String locNo) {
- this.locNo = locNo;
- }
-
- public List<LocDetlAdjust> getList() {
- return list;
- }
-
- public void setList(List<LocDetlAdjust> list) {
- this.list = list;
- }
}
--
Gitblit v1.9.1