From a1dd6ff24f7cae0b529ad313ba07351c07965605 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期一, 03 十一月 2025 13:04:09 +0800
Subject: [PATCH] 管控线边仓库存

---
 src/main/java/com/zy/system/entity/SaasLog.java |   40 ++++++++++++++++++++++++++++------------
 1 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/zy/system/entity/SaasLog.java b/src/main/java/com/zy/system/entity/SaasLog.java
index 2069e4e..7e8fccc 100644
--- a/src/main/java/com/zy/system/entity/SaasLog.java
+++ b/src/main/java/com/zy/system/entity/SaasLog.java
@@ -5,6 +5,8 @@
 import com.baomidou.mybatisplus.annotations.TableName;
 import com.baomidou.mybatisplus.enums.IdType;
 import com.core.common.Cools;
+import com.core.common.SpringUtils;
+import com.zy.system.service.UserService;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -27,7 +29,7 @@
     private Long id;
 
     /**
-     * {0:鍏ュ簱,1:鍑哄簱}
+     * {0:鍏ュ簱,1:鍑哄簱,2.璋冩嫧鍏ワ紝3.璋冩嫧鍑猴紝4.棰嗘枡鍑簘
      */
     @ApiModelProperty(value= "{0:鍏ュ簱,1:鍑哄簱}")
     private Integer type;
@@ -81,19 +83,33 @@
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime);
     }
 
-    public String getType$(){
-        if (this.type ==0) {
-            return "鍏ュ簱";
-           } else if (this.type == 1) {
-            return "鍑哄簱";
-        } else if (this.type == 2) {
-            return "搴撲綅绉昏浆";
-        } else if (this.type == 3) {
-            return "搴撳瓨璋冩暣";
-        }else {
-            return "";
+    /**
+     * {0:鍏ュ簱,1:鍑哄簱,2.璋冩嫧鍏ワ紝3.璋冩嫧鍑猴紝4.棰嗘枡鍑簘
+     */
+    public String getType$() {
+        switch (this.type) {
+            case 0:
+                return "鍏ュ簱";
+            case 1:
+                return "鍑哄簱";
+            case 2:
+                return "璋冩嫧鍏�";
+            case 3:
+                return "璋冩嫧鍑�";
+            case 4:
+                return "棰嗘枡鍑�";
+            default:
+                return "";
         }
+    }
 
+    public String getCreateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.selectById(this.createBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getUsername());
+        }
+        return null;
     }
 
 

--
Gitblit v1.9.1