From a3776853fa6ff1c4a9805615a79852d54f700e3f Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期六, 20 七月 2024 09:21:04 +0800
Subject: [PATCH] 增加库位明细导出功能,曾加物料、单据、库存全局搜索功能

---
 zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocDetl.java |   66 +++++++++++++++++++++++++++++----
 1 files changed, 58 insertions(+), 8 deletions(-)

diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocDetl.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocDetl.java
index febd9af..5ec4d48 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocDetl.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocDetl.java
@@ -3,15 +3,15 @@
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
+import com.baomidou.mybatisplus.annotation.*;
+import com.zy.asrs.common.utils.Synchro;
+import com.zy.asrs.common.wms.service.DocTypeService;
 import com.zy.asrs.common.wms.service.LocMastService;
+import com.zy.asrs.common.wms.service.OrderService;
 import org.springframework.format.annotation.DateTimeFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -31,10 +31,15 @@
 
     private static final long serialVersionUID = 1L;
 
+    @ApiModelProperty(value= "")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
     /**
      * 搴撲綅鍙�
      */
     @ApiModelProperty(value= "搴撲綅鍙�")
+    @TableField("loc_no")
     private String locNo;
 
     /**
@@ -65,6 +70,7 @@
     private String batch;
 
     @ApiModelProperty(value= "")
+    @TableField("order_no")
     private String orderNo;
 
     /**
@@ -110,12 +116,15 @@
     private String manu;
 
     @ApiModelProperty(value= "")
+    @TableField("manu_date")
     private String manuDate;
 
     @ApiModelProperty(value= "")
+    @TableField("item_num")
     private String itemNum;
 
     @ApiModelProperty(value= "")
+    @TableField("safe_qty")
     private Double safeQty;
 
     @ApiModelProperty(value= "")
@@ -128,21 +137,26 @@
     private Double volume;
 
     @ApiModelProperty(value= "")
+    @TableField("three_code")
     private String threeCode;
 
     @ApiModelProperty(value= "")
     private String supp;
 
     @ApiModelProperty(value= "")
+    @TableField("supp_code")
     private String suppCode;
 
     @ApiModelProperty(value= "")
+    @TableField("be_batch")
     private Integer beBatch;
 
     @ApiModelProperty(value= "")
+    @TableField("dead_time")
     private String deadTime;
 
     @ApiModelProperty(value= "")
+    @TableField("dead_warn")
     private Integer deadWarn;
 
     @ApiModelProperty(value= "")
@@ -158,6 +172,7 @@
      * 淇敼浜哄憳
      */
     @ApiModelProperty(value= "淇敼浜哄憳")
+    @TableField("modi_user")
     private Long modiUser;
 
     /**
@@ -165,12 +180,14 @@
      */
     @ApiModelProperty(value= "淇敼鏃堕棿")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("modi_time")
     private Date modiTime;
 
     /**
      * 鍒涘缓鑰�
      */
     @ApiModelProperty(value= "鍒涘缓鑰�")
+    @TableField("appe_user")
     private Long appeUser;
 
     /**
@@ -178,6 +195,7 @@
      */
     @ApiModelProperty(value= "娣诲姞鏃堕棿")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @TableField("appe_time")
     private Date appeTime;
 
     /**
@@ -187,14 +205,18 @@
     private String memo;
 
     /**
-     * 浠撳簱ID
+     * 鎺堟潈鍟嗘埛
      */
-    @ApiModelProperty(value= "浠撳簱ID")
+    @ApiModelProperty(value= "鎺堟潈鍟嗘埛")
+    @TableField("host_id")
     private Long hostId;
+
+    @ApiModelProperty(value= "璐т富")
+    private String owner;
 
     public LocDetl() {}
 
-    public LocDetl(String locNo,String zpallet,Double anfme,String matnr,String maktx,String batch,String orderNo,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 length,Double volume,String threeCode,String supp,String suppCode,Integer beBatch,String deadTime,Integer deadWarn,Integer source,Integer inspect,Integer danger,Long modiUser,Date modiTime,Long appeUser,Date appeTime,String memo) {
+    public LocDetl(String locNo,String zpallet,Double anfme,String matnr,String maktx,String batch,String orderNo,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 length,Double volume,String threeCode,String supp,String suppCode,Integer beBatch,String deadTime,Integer deadWarn,Integer source,Integer inspect,Integer danger,Long modiUser,Date modiTime,Long appeUser,Date appeTime,String memo,Long hostId,String owner) {
         this.locNo = locNo;
         this.zpallet = zpallet;
         this.anfme = anfme;
@@ -233,6 +255,8 @@
         this.appeUser = appeUser;
         this.appeTime = appeTime;
         this.memo = memo;
+        this.hostId = hostId;
+        this.owner = owner;
     }
 
 //    LocDetl locDetl = new LocDetl(
@@ -273,7 +297,8 @@
 //            null,    // 淇敼鏃堕棿
 //            null,    // 鍒涘缓鑰�
 //            null,    // 娣诲姞鏃堕棿
-//            null    // 澶囨敞
+//            null,    // 澶囨敞
+//            null    // 鎺堟潈鍟嗘埛
 //    );
 
     public String getLocNo$(){
@@ -317,5 +342,30 @@
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime);
     }
 
+    public String getHostId$(){
+        HostService service = SpringUtils.getBean(HostService.class);
+        Host host = service.getById(this.hostId);
+        if (!Cools.isEmpty(host)){
+            return String.valueOf(host.getName());
+        }
+        return null;
+    }
+
+    public String getOrderType() {
+        if (Cools.isEmpty(this.orderNo)){
+            return "";
+        }
+        OrderService orderService = SpringUtils.getBean(OrderService.class);
+        DocTypeService docTypeService = SpringUtils.getBean(DocTypeService.class);
+        Order order = orderService.selectByNo(orderNo, hostId);
+        if (order != null) {
+            return order.getDocType$();
+        }
+        return this.orderNo;
+    }
+
+    public void sync(Object source) {
+        Synchro.Copy(source, this);
+    }
 
 }

--
Gitblit v1.9.1