From 6f01b51fc0770fda7787076caf0314be7a7f6656 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 27 六月 2025 10:58:21 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/entity/OrderDetl.java |  257 ++++++++++++++++++++++++++++++++------------------
 1 files changed, 163 insertions(+), 94 deletions(-)

diff --git a/src/main/java/com/zy/asrs/entity/OrderDetl.java b/src/main/java/com/zy/asrs/entity/OrderDetl.java
index 336d879..3f0b992 100644
--- a/src/main/java/com/zy/asrs/entity/OrderDetl.java
+++ b/src/main/java/com/zy/asrs/entity/OrderDetl.java
@@ -10,6 +10,8 @@
 import com.zy.asrs.service.BasProcessProceduresService;
 import com.zy.asrs.service.BasQualityTestingService;
 import com.zy.asrs.service.OrderService;
+import com.zy.asrs.service.StoreTypeService;
+import com.zy.asrs.utils.MathUtils;
 import com.zy.common.utils.Synchro;
 import com.zy.system.entity.User;
 import com.zy.system.service.UserService;
@@ -31,21 +33,21 @@
     /**
      * ID
      */
-    @ApiModelProperty(value= "ID")
+    @ApiModelProperty(value = "ID")
     @TableId(value = "id", type = IdType.AUTO)
     private Long id;
 
     /**
      * 璁㈠崟鍐呯爜
      */
-    @ApiModelProperty(value= "璁㈠崟鍐呯爜")
+    @ApiModelProperty(value = "璁㈠崟鍐呯爜")
     @TableField("order_id")
     private Long orderId;
 
     /**
      * 鍗曟嵁缂栧彿
      */
-    @ApiModelProperty(value= "鍗曟嵁缂栧彿")
+    @ApiModelProperty(value = "鍗曟嵁缂栧彿")
     @TableField("order_no")
     private String orderNo;
 
@@ -53,311 +55,312 @@
     /**
      * 鏁伴噺
      */
-    @ApiModelProperty(value= "鏁伴噺")
+    @ApiModelProperty(value = "鏁伴噺")
     private Double anfme;
 
     /**
      * 浣滀笟鏁伴噺
-     *
-     *  鍏ュ簱 : 缁勬墭瀹屾垚锛岀粍鎵樻。銆佸伐浣滄。銆佸叆搴撳畬鎴愭暟閲�
-     *  鍑哄簱 : 宸ヤ綔妗c�佸嚭搴撳畬鎴愭暟閲�
+     * <p>
+     * 鍏ュ簱 : 缁勬墭瀹屾垚锛岀粍鎵樻。銆佸伐浣滄。銆佸叆搴撳畬鎴愭暟閲�
+     * 鍑哄簱 : 宸ヤ綔妗c�佸嚭搴撳畬鎴愭暟閲�
      */
-    @ApiModelProperty(value= "浣滀笟鏁伴噺")
+    @ApiModelProperty(value = "浣滀笟鏁伴噺")
     @TableField("work_qty")
     private Double workQty;
 
     /**
      * 瀹屾垚鏁伴噺
-     *
-     *  鍏ュ簱 : qty 馃憜
-     *  鍑哄簱 : qty 馃憜
+     * <p>
+     * 鍏ュ簱 : qty 馃憜
+     * 鍑哄簱 : qty 馃憜
      */
-    @ApiModelProperty(value= "瀹屾垚鏁伴噺")
+    @ApiModelProperty(value = "瀹屾垚鏁伴噺")
     private Double qty;
 
     /**
      * 鍟嗗搧缂栫爜
      */
-    @ApiModelProperty(value= "鍟嗗搧缂栫爜")
+    @ApiModelProperty(value = "鍟嗗搧缂栫爜")
     private String matnr;
 
     /**
      * 鍟嗗搧鍚嶇О
      */
-    @ApiModelProperty(value= "鍟嗗搧鍚嶇О")
+    @ApiModelProperty(value = "鍟嗗搧鍚嶇О")
     private String maktx;
 
     /**
      * 鎵瑰彿
      */
-    @ApiModelProperty(value= "鎵瑰彿")
+    @ApiModelProperty(value = "鎵瑰彿")
     private String batch;
 
     /**
      * 瑙勬牸
      */
-    @ApiModelProperty(value= "瑙勬牸")
+    @ApiModelProperty(value = "瑙勬牸")
     private String specs;
 
     /**
      * 鍨嬪彿
      */
-    @ApiModelProperty(value= "鍨嬪彿")
+    @ApiModelProperty(value = "鍨嬪彿")
     private String model;
 
     /**
      * 棰滆壊
      */
-    @ApiModelProperty(value= "棰滆壊")
+    @ApiModelProperty(value = "棰滆壊")
     private String color;
 
     /**
      * 鍝佺墝
      */
-    @ApiModelProperty(value= "鍝佺墝")
+    @ApiModelProperty(value = "鍝佺墝")
     private String brand;
 
     /**
      * 鍗曚綅
      */
-    @ApiModelProperty(value= "鍗曚綅")
+    @ApiModelProperty(value = "鍗曚綅")
     private String unit;
 
     /**
      * 鍗曚环
      */
-    @ApiModelProperty(value= "鍗曚环")
+    @ApiModelProperty(value = "鍗曚环")
     private Double price;
 
     /**
      * sku
      */
-    @ApiModelProperty(value= "sku")
+    @ApiModelProperty(value = "sku")
     private String sku;
 
     /**
      * 鍗曚綅閲�
      */
-    @ApiModelProperty(value= "鍗曚綅閲�")
+    @ApiModelProperty(value = "鍗曚綅閲�")
     private Double units;
 
     /**
      * 鏉$爜
      */
-    @ApiModelProperty(value= "鏉$爜")
+    @ApiModelProperty(value = "鏉$爜")
     private String barcode;
 
     /**
      * 浜у湴
      */
-    @ApiModelProperty(value= "浜у湴")
+    @ApiModelProperty(value = "浜у湴")
     private String origin;
 
     /**
      * 鍘傚
      */
-    @ApiModelProperty(value= "鍘傚")
+    @ApiModelProperty(value = "浠撳簱缂栫爜")
     private String manu;
 
     /**
      * 鐢熶骇鏃ユ湡
      */
-    @ApiModelProperty(value= "鐢熶骇鏃ユ湡")
+    @ApiModelProperty(value = "鐢熶骇鏃ユ湡")
     @TableField("manu_date")
     private String manuDate;
 
     /**
      * 鍝侀」鏁�
      */
-    @ApiModelProperty(value= "鍝侀」鏁�")
+    @ApiModelProperty(value = "鍝侀」鏁�")
     @TableField("item_num")
     private String itemNum;
 
     /**
      * 瀹夊叏搴撳瓨閲�
      */
-    @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�")
+    @ApiModelProperty(value = "瀹夊叏搴撳瓨閲�")
     @TableField("safe_qty")
     private Double safeQty;
 
     /**
      * 閲嶉噺
      */
-    @ApiModelProperty(value= "閲嶉噺")
+    @ApiModelProperty(value = "閲嶉噺")
     private Double weight;
 
     /**
      * 闀垮害
      */
-    @ApiModelProperty(value= "闀垮害")
+    @ApiModelProperty(value = "闀垮害")
     @TableField("man_length")
     private Double manLength;
 
     /**
      * 浣撶Н
      */
-    @ApiModelProperty(value= "浣撶Н")
+    @ApiModelProperty(value = "浣撶Н")
     private Double volume;
 
     /**
      * 涓夋柟缂栫爜
      */
-    @ApiModelProperty(value= "涓夋柟缂栫爜")
+    @ApiModelProperty(value = "涓夋柟缂栫爜")
     @TableField("three_code")
     private String threeCode;
 
     /**
      * 渚涘簲鍟�
      */
-    @ApiModelProperty(value= "渚涘簲鍟�")
+    @ApiModelProperty(value = "渚涘簲鍟�")
     private String supp;
 
     /**
      * 渚涘簲鍟嗙紪鐮�
      */
-    @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�")
+    @ApiModelProperty(value = "渚涘簲鍟嗙紪鐮�")
     @TableField("supp_code")
     private String suppCode;
 
     /**
      * 鏄惁鎵规 1: 鏄�  0: 鍚�
      */
-    @ApiModelProperty(value= "鏄惁鎵规 1: 鏄�  0: 鍚�  ")
+    @ApiModelProperty(value = "鏄惁鎵规 1: 鏄�  0: 鍚�  ")
     @TableField("be_batch")
     private Integer beBatch;
 
     /**
      * 淇濊川鏈�
      */
-    @ApiModelProperty(value= "淇濊川鏈�")
+    @ApiModelProperty(value = "淇濊川鏈�")
     @TableField("dead_time")
     private String deadTime;
 
     /**
      * 棰勮澶╂暟
      */
-    @ApiModelProperty(value= "棰勮澶╂暟")
+    @ApiModelProperty(value = "棰勮澶╂暟")
     @TableField("dead_warn")
     private Integer deadWarn;
 
     /**
      * 鍒惰喘 1: 鍒堕��  2: 閲囪喘  3: 澶栧崗     銆併�佸疁绉戯細  鏄惁纭   1: 纭  2: 鏈‘璁�
      */
-    @ApiModelProperty(value= "鍒惰喘 1: 鍒堕��  2: 閲囪喘  3: 澶栧崗  ")
+    @ApiModelProperty(value = "鍒惰喘 1: 鍒堕��  2: 閲囪喘  3: 澶栧崗  ")
     private Integer source;
 
     /**
      * 瑕佹眰妫�楠� 1: 鏄�  0: 鍚�
      */
-    @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄�  0: 鍚�  ")
+    @ApiModelProperty(value = "瑕佹眰妫�楠� 1: 鏄�  0: 鍚�  ")
     private Integer inspect;
 
     /**
      * 鍗遍櫓鍝� 1: 鏄�  0: 鍚�
      */
-    @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄�  0: 鍚�  ")
+    @ApiModelProperty(value = "鍗遍櫓鍝� 1: 鏄�  0: 鍚�  ")
     private Integer danger;
 
     /**
      * 鐘舵�� 1: 姝e父  0: 绂佺敤
      */
-    @ApiModelProperty(value= "鐘舵�� 1: 姝e父  0: 绂佺敤  ")
+    @ApiModelProperty(value = "鐘舵�� 1: 姝e父  0: 绂佺敤  ")
     private Integer status;
 
     /**
      * 娣诲姞浜哄憳
      */
-    @ApiModelProperty(value= "娣诲姞浜哄憳")
+    @ApiModelProperty(value = "娣诲姞浜哄憳")
     @TableField("create_by")
     private Long createBy;
 
     /**
      * 娣诲姞鏃堕棿
      */
-    @ApiModelProperty(value= "娣诲姞鏃堕棿")
+    @ApiModelProperty(value = "娣诲姞鏃堕棿")
     @TableField("create_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
 
     /**
      * 淇敼浜哄憳
      */
-    @ApiModelProperty(value= "淇敼浜哄憳")
+    @ApiModelProperty(value = "淇敼浜哄憳")
     @TableField("update_by")
     private Long updateBy;
 
     /**
      * 淇敼鏃堕棿
      */
-    @ApiModelProperty(value= "淇敼鏃堕棿")
+    @ApiModelProperty(value = "淇敼鏃堕棿")
     @TableField("update_time")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date updateTime;
 
     /**
      * 澶囨敞
      */
-    @ApiModelProperty(value= "澶囨敞")
+    @ApiModelProperty(value = "澶囨敞")
     private String memo;
 
     /**
      * 鐘舵�� 0锛氭湭鐭ワ紝1锛氬叆搴擄紝2锛氬嚭搴�
      */
-    @ApiModelProperty(value= "鍏ュ嚭搴撶被鍨嬶紙0锛氭湭鐭ワ紝1锛氬叆搴擄紝2锛氬嚭搴擄級")
+    @ApiModelProperty(value = "鍏ュ嚭搴撶被鍨嬶紙0锛氭湭鐭ワ紝1锛氬叆搴擄紝2锛氬嚭搴擄級")
     @TableField("pakin_pakout_status")
     private Integer pakinPakoutStatus;
 
     /**
      * 琛屽彿
      */
-    @ApiModelProperty(value= "琛屽彿")
+    @ApiModelProperty(value = "琛屽彿")
     @TableField("line_number")
     private Long lineNumber;
 
     /**
      * 澶囩敤1
      */
-    @ApiModelProperty(value= "澶囩敤1")
+    @ApiModelProperty(value = "澶囩敤1")
     private String standby1 = "";
 
     /**
      * 澶囩敤2
      */
-    @ApiModelProperty(value= "澶囩敤2")
+    @ApiModelProperty(value = "澶囩敤2")
     private String standby2 = "";
 
     /**
      * 澶囩敤3
      */
-    @ApiModelProperty(value= "澶囩敤3")
+    @ApiModelProperty(value = "澶囩敤3")
     private String standby3 = "";
 
     /**
      * 澶囩敤1
      */
-    @ApiModelProperty(value= "澶囩敤1")
+    @ApiModelProperty(value = "澶囩敤1")
     @TableField("box_type1")
     private String boxType1 = "";
 
     /**
      * 澶囩敤2
      */
-    @ApiModelProperty(value= "澶囩敤2")
+    @ApiModelProperty(value = "澶囩敤2")
     @TableField("box_type2")
     private String boxType2 = "";
 
     /**
      * 澶囩敤3
      */
-    @ApiModelProperty(value= "澶囩敤3")
+    @ApiModelProperty(value = "澶囩敤3")
     @TableField("box_type3")
     private String boxType3 = "";
 
-    @ApiModelProperty(value= "澶囨敞")
+    @ApiModelProperty(value = "澶囨敞")
     @TableField("remark")
     private String remark;
 
-    public OrderDetl() {}
+    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) {
         this.orderId = orderId;
@@ -449,18 +452,20 @@
     }
 
 
-    public String getOrderId$(){
+    public String getOrderId$() {
         OrderService service = SpringUtils.getBean(OrderService.class);
         Order order = service.selectById(this.orderId);
-        if (!Cools.isEmpty(order)){
+        if (!Cools.isEmpty(order)) {
             return String.valueOf(order.getId());
         }
         return null;
     }
 
-    public String getBeBatch$(){
-        if (null == this.beBatch){ return null; }
-        switch (this.beBatch){
+    public String getBeBatch$() {
+        if (null == this.beBatch) {
+            return null;
+        }
+        switch (this.beBatch) {
             case 1:
                 return "鏄�";
             case 0:
@@ -470,9 +475,11 @@
         }
     }
 
-    public String getSource$(){
-        if (null == this.source){ return null; }
-        switch (this.source){
+    public String getSource$() {
+        if (null == this.source) {
+            return null;
+        }
+        switch (this.source) {
             case 1:
                 return "鍒堕��";
             case 2:
@@ -484,9 +491,11 @@
         }
     }
 
-    public String getInspect$(){
-        if (null == this.inspect){ return null; }
-        switch (this.inspect){
+    public String getInspect$() {
+        if (null == this.inspect) {
+            return null;
+        }
+        switch (this.inspect) {
             case 1:
                 return "鏄�";
             case 0:
@@ -496,9 +505,11 @@
         }
     }
 
-    public String getDanger$(){
-        if (null == this.danger){ return null; }
-        switch (this.danger){
+    public String getDanger$() {
+        if (null == this.danger) {
+            return null;
+        }
+        switch (this.danger) {
             case 1:
                 return "鏄�";
             case 0:
@@ -508,9 +519,11 @@
         }
     }
 
-    public String getStatus$(){
-        if (null == this.status){ return null; }
-        switch (this.status){
+    public String getStatus$() {
+        if (null == this.status) {
+            return null;
+        }
+        switch (this.status) {
             case 1:
                 return "姝e父";
             case 0:
@@ -520,41 +533,42 @@
         }
     }
 
-    public String getCreateBy$(){
+    public String getCreateBy$() {
         UserService service = SpringUtils.getBean(UserService.class);
         User user = service.selectById(this.createBy);
-        if (!Cools.isEmpty(user)){
+        if (!Cools.isEmpty(user)) {
             return String.valueOf(user.getUsername());
         }
         return null;
     }
 
-    public String getCreateTime$(){
-        if (Cools.isEmpty(this.createTime)){
+    public String getCreateTime$() {
+        if (Cools.isEmpty(this.createTime)) {
             return "";
         }
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
     }
 
-    public String getUpdateBy$(){
+    public String getUpdateBy$() {
         UserService service = SpringUtils.getBean(UserService.class);
         User user = service.selectById(this.updateBy);
-        if (!Cools.isEmpty(user)){
+        if (!Cools.isEmpty(user)) {
             return String.valueOf(user.getUsername());
         }
         return null;
     }
 
-    public String getUpdateTime$(){
-        if (Cools.isEmpty(this.updateTime)){
+    public String getUpdateTime$() {
+        if (Cools.isEmpty(this.updateTime)) {
             return "";
         }
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
     }
 
     public Double getEnableQty() {
+
         if (null != this.anfme && this.workQty != null) {
-            return this.anfme - this.workQty;
+            return MathUtils.subtract(this.anfme, this.workQty);
         }
 //        if (null != this.anfme && this.qty != null) {
 //            return this.anfme - this.qty;
@@ -562,14 +576,14 @@
         return null;
     }
 
-    public String getQty$(){
-        if (getAnfme().equals(getQty())){
+    public String getQty$() {
+        if (getAnfme().equals(getQty())) {
             return "宸插畬鎴�";
         }
         return "鏈畬鎴�";
     }
 
-    public boolean beSimilar(OrderDetl orderDetl){
+    public boolean beSimilar(OrderDetl orderDetl) {
         return (
                 this.orderNo.equals(orderDetl.getOrderNo())
                         && this.matnr.equals(orderDetl.getMatnr())
@@ -583,6 +597,61 @@
                         && this.boxType3.equals(orderDetl.getBoxType3())
         );
     }
+
+    public boolean beSimilar(WrkDetl 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 boolean beSimilarByWrkDetl(WrkDetl orderDetl) {
+        return (
+                this.orderNo.equals(orderDetl.getOrderNo())
+                        && this.matnr.equals(orderDetl.getMatnr())
+                        && 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 String getStandby1$() {
+        StoreTypeService service = SpringUtils.getBean(StoreTypeService.class);
+        StoreType storeType = service.selectById(this.standby1);
+        if (!Cools.isEmpty(storeType)) {
+            return String.valueOf(storeType.getStoreName());
+        }
+        return null;
+    }
+
+
+    public boolean beSimilar2(OrderDetl orderDetl) {
+        return (
+                this.orderNo.equals(orderDetl.getOrderNo())
+                        && this.matnr.equals(orderDetl.getMatnr())
+                        && 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)) {
@@ -601,9 +670,9 @@
         return null;
     }
 
-    public String getPakinPakoutStatus$(){
+    public String getPakinPakoutStatus$() {
         if (Cools.isEmpty(this.pakinPakoutStatus)) return null;
-        switch (this.pakinPakoutStatus){
+        switch (this.pakinPakoutStatus) {
             case 1:
                 return "Y";
             case 2:
@@ -613,19 +682,19 @@
         }
     }
 
-    public String getBoxType1$(){
+    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)){
+        if (!Cools.isEmpty(processProcedures)) {
             return String.valueOf(processProcedures.getBoxSpecs());
         }
         return this.boxType1;
     }
 
-    public String getBoxType2$(){
+    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)){
+        if (!Cools.isEmpty(basQualityTesting)) {
             return String.valueOf(basQualityTesting.getBoxSpecs());
         }
         return this.boxType1;

--
Gitblit v1.9.1