From df11218af96a29e69221078ad981737068acc435 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期三, 10 九月 2025 13:18:25 +0800
Subject: [PATCH] #自动下发分拣线单据, 自动分配余料至同一站口,同一标记

---
 src/main/java/com/zy/asrs/entity/OrderDetl.java |  102 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 97 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/zy/asrs/entity/OrderDetl.java b/src/main/java/com/zy/asrs/entity/OrderDetl.java
index e8c1229..33ced76 100644
--- a/src/main/java/com/zy/asrs/entity/OrderDetl.java
+++ b/src/main/java/com/zy/asrs/entity/OrderDetl.java
@@ -4,8 +4,11 @@
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableName;
 import com.baomidou.mybatisplus.enums.IdType;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.core.common.Cools;
 import com.core.common.SpringUtils;
+import com.zy.asrs.service.BasProcessProceduresService;
+import com.zy.asrs.service.BasQualityTestingService;
 import com.zy.asrs.service.OrderService;
 import com.zy.common.utils.Synchro;
 import com.zy.system.entity.User;
@@ -17,6 +20,7 @@
 import java.io.Serializable;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.List;
 
 @Data
 @TableName("man_order_detl")
@@ -308,29 +312,64 @@
      */
     @ApiModelProperty(value= "琛屽彿")
     @TableField("line_number")
-    private Integer lineNumber;
+    private Long lineNumber;
 
     /**
      * 澶囩敤1
      */
     @ApiModelProperty(value= "澶囩敤1")
-    private String standby1;
+    private String standby1 = "";
 
     /**
      * 澶囩敤2
      */
     @ApiModelProperty(value= "澶囩敤2")
-    private String standby2;
+    private String standby2 = "";
 
     /**
      * 澶囩敤3
      */
     @ApiModelProperty(value= "澶囩敤3")
-    private String standby3;
+    private String standby3 = "";
+
+    /**
+     * 澶囩敤1
+     */
+    @ApiModelProperty(value= "澶囩敤1")
+    @TableField("box_type1")
+    private String boxType1 = "1";
+
+    /**
+     * 澶囩敤2
+     */
+    @ApiModelProperty(value= "澶囩敤2")
+    @TableField("box_type2")
+    private String boxType2 = "1";
+
+    /**
+     * 澶囩敤3
+     */
+    @ApiModelProperty(value= "澶囩敤3")
+    @TableField("box_type3")
+    private String boxType3 = "1";
+
+    /**
+     * 瀹藉害
+     */
+    @ApiModelProperty(value= "瀹藉害")
+    @TableField("width")
+    private Double width;
+
+    /**
+     * 楂樺害
+     */
+    @ApiModelProperty(value= "楂樺害")
+    @TableField("height")
+    private Double height;
 
     public OrderDetl() {}
 
-    public OrderDetl(Long orderId, String orderNo, Double anfme, Double qty, String matnr, String maktx, String batch, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double manLength, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer inspect, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) {
+    public OrderDetl(Long orderId, String orderNo, Double anfme, Double qty, String matnr, String maktx, String batch, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double manLength, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer inspect, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo,Double width,Double height) {
         this.orderId = orderId;
         this.orderNo = orderNo;
         this.anfme = anfme;
@@ -370,6 +409,8 @@
         this.updateBy = updateBy;
         this.updateTime = updateTime;
         this.memo = memo;
+        this.width = width;
+        this.height = height;
     }
 
     public OrderDetl(OrderDetl orderDetl) {
@@ -417,6 +458,8 @@
         this.standby1 = orderDetl.getStandby1();
         this.standby2 = orderDetl.getStandby2();
         this.standby3 = orderDetl.getStandby3();
+        this.width = orderDetl.getWidth();
+        this.height = orderDetl.getHeight();
     }
 
 
@@ -540,6 +583,38 @@
         return "鏈畬鎴�";
     }
 
+    public boolean beSimilar(OrderDetl orderDetl){
+        return (
+                this.orderNo.equals(orderDetl.getOrderNo())
+                        && this.matnr.equals(orderDetl.getMatnr())
+                        && this.batch.equals(orderDetl.getBatch())
+                        && this.brand.equals(orderDetl.getBrand())
+                        && this.standby1.equals(orderDetl.getStandby1())
+                        && this.standby2.equals(orderDetl.getStandby2())
+                        && this.standby3.equals(orderDetl.getStandby3())
+                        && this.boxType1.equals(orderDetl.getBoxType1())
+                        && this.boxType2.equals(orderDetl.getBoxType2())
+                        && this.boxType3.equals(orderDetl.getBoxType3())
+        );
+    }
+
+    public static OrderDetl find(List<OrderDetl> detlDtos, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) {
+        if (Cools.isEmpty(matnr)) {
+            return null;
+        }
+        for (OrderDetl detlDto : detlDtos) {
+            if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch())
+                    && brand.equals(detlDto.getBrand()) && standby1.equals(detlDto.getStandby1())
+                    && standby2.equals(detlDto.getStandby2()) && standby3.equals(detlDto.getStandby3())
+                    && boxType1.equals(detlDto.getBoxType1())
+                    && boxType2.equals(detlDto.getBoxType2()) && boxType3.equals(detlDto.getBoxType3())
+            ) {
+                return detlDto;
+            }
+        }
+        return null;
+    }
+
     public String getPakinPakoutStatus$(){
         if (Cools.isEmpty(this.pakinPakoutStatus)) return null;
         switch (this.pakinPakoutStatus){
@@ -552,6 +627,23 @@
         }
     }
 
+    public String getBoxType1$(){
+        BasProcessProceduresService service = SpringUtils.getBean(BasProcessProceduresService.class);
+        BasProcessProcedures processProcedures = service.selectOne(new EntityWrapper<BasProcessProcedures>().eq("box_type", this.boxType1));
+        if (!Cools.isEmpty(processProcedures)){
+            return String.valueOf(processProcedures.getBoxSpecs());
+        }
+        return this.boxType1;
+    }
+
+    public String getBoxType2$(){
+        BasQualityTestingService service = SpringUtils.getBean(BasQualityTestingService.class);
+        BasQualityTesting basQualityTesting = service.selectOne(new EntityWrapper<BasQualityTesting>().eq("box_type", this.boxType1));
+        if (!Cools.isEmpty(basQualityTesting)){
+            return String.valueOf(basQualityTesting.getBoxSpecs());
+        }
+        return this.boxType1;
+    }
 
     public void sync(Object source) {
         Synchro.Copy(source, this);

--
Gitblit v1.9.1