From 8efe040fc8ffa65ebb8429cbb21118a01017b2ac Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期二, 26 十二月 2023 10:07:28 +0800
Subject: [PATCH] #

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/LocMastController.java |    1 -
 zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocDetl.java     |   23 +++++++++++++++++++----
 zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocMast.java     |   27 ++++++++++++++++++++++-----
 3 files changed, 41 insertions(+), 10 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..df67b45 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
@@ -31,6 +31,10 @@
 
     private static final long serialVersionUID = 1L;
 
+    @ApiModelProperty(value= "")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
     /**
      * 搴撲綅鍙�
      */
@@ -187,14 +191,14 @@
     private String memo;
 
     /**
-     * 浠撳簱ID
+     * 鎺堟潈鍟嗘埛
      */
-    @ApiModelProperty(value= "浠撳簱ID")
+    @ApiModelProperty(value= "鎺堟潈鍟嗘埛")
     private Long hostId;
 
     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) {
         this.locNo = locNo;
         this.zpallet = zpallet;
         this.anfme = anfme;
@@ -233,6 +237,7 @@
         this.appeUser = appeUser;
         this.appeTime = appeTime;
         this.memo = memo;
+        this.hostId = hostId;
     }
 
 //    LocDetl locDetl = new LocDetl(
@@ -273,7 +278,8 @@
 //            null,    // 淇敼鏃堕棿
 //            null,    // 鍒涘缓鑰�
 //            null,    // 娣诲姞鏃堕棿
-//            null    // 澶囨敞
+//            null,    // 澶囨敞
+//            null    // 鎺堟潈鍟嗘埛
 //    );
 
     public String getLocNo$(){
@@ -317,5 +323,14 @@
         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;
+    }
+
 
 }
diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocMast.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocMast.java
index 78a3637..2d441b0 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocMast.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/entity/LocMast.java
@@ -39,10 +39,16 @@
     private static final long serialVersionUID = 1L;
 
     /**
+     * ID
+     */
+    @ApiModelProperty(value= "ID")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
      * 搴撲綅鍙�
      */
     @ApiModelProperty(value= "搴撲綅鍙�")
-    @TableId(value = "loc_no", type = IdType.INPUT)
     private String locNo;
 
     /**
@@ -156,14 +162,14 @@
     private String memo;
 
     /**
-     * 浠撳簱ID
+     * 鎺堟潈鍟嗘埛
      */
-    @ApiModelProperty(value= "浠撳簱ID")
+    @ApiModelProperty(value= "鎺堟潈鍟嗘埛")
     private Long hostId;
 
     public LocMast() {}
 
-    public LocMast(String locNo,Long whsType,String locSts,Integer crnNo,Integer row1,Integer bay1,Integer lev1,String fullPlt,Short locType1,Short locType2,Short locType3,Date ioTime,Date firstTime,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Date errorTime,String errorMemo,String mk,String barcode,String memo) {
+    public LocMast(String locNo,Long whsType,String locSts,Integer crnNo,Integer row1,Integer bay1,Integer lev1,String fullPlt,Short locType1,Short locType2,Short locType3,Date ioTime,Date firstTime,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Date errorTime,String errorMemo,String mk,String barcode,String memo,Long hostId) {
         this.locNo = locNo;
         this.whsType = whsType;
         this.locSts = locSts;
@@ -186,6 +192,7 @@
         this.mk = mk;
         this.barcode = barcode;
         this.memo = memo;
+        this.hostId = hostId;
     }
 
 //    LocMast locMast = new LocMast(
@@ -210,7 +217,8 @@
 //            null,    // 
 //            null,    // 
 //            null,    // 
-//            null    // 
+//            null,    // 
+//            null    // 鎺堟潈鍟嗘埛
 //    );
 
     public String getWhsType$(){
@@ -326,5 +334,14 @@
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errorTime);
     }
 
+    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;
+    }
+
 
 }
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/LocMastController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/LocMastController.java
index 724922d..88239f4 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/LocMastController.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/LocMastController.java
@@ -4,7 +4,6 @@
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.zy.asrs.common.wms.entity.LocDetl;
 import com.zy.asrs.common.wms.entity.LocMast;
 import com.zy.asrs.common.wms.service.LocMastService;
 import com.zy.asrs.framework.annotations.ManagerAuth;

--
Gitblit v1.9.1