From 32a41ca494eed0cc37fcb3aff1e9f83e1a3792fc Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期五, 22 八月 2025 17:08:38 +0800
Subject: [PATCH] 库存调整功能接口功能优化 库存调整功能优化

---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/LocRevise.java |   57 +++++++++++++++++++++++++++------------------------------
 1 files changed, 27 insertions(+), 30 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/LocRevise.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/LocRevise.java
index 069424c..81be843 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/LocRevise.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/LocRevise.java
@@ -3,6 +3,13 @@
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.vincent.rsf.server.system.constant.DictTypeCode;
+import com.vincent.rsf.server.system.entity.DictData;
+import com.vincent.rsf.server.system.service.DictDataService;
+import lombok.experimental.Accessors;
 import org.springframework.format.annotation.DateTimeFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -20,8 +27,10 @@
 import com.vincent.rsf.server.system.entity.User;
 import java.io.Serializable;
 import java.util.Date;
+import java.util.Objects;
 
 @Data
+@Accessors(chain = true)
 @TableName("man_loc_revise")
 public class LocRevise implements Serializable {
 
@@ -68,13 +77,17 @@
      * 婧愬簱鍖篒D
      */
     @ApiModelProperty(value= "婧愬簱鍖篒D")
-    private Long orgAreaId;
+    private Long areaId;
 
     /**
      * 鍘熷簱鍖哄悕绉�
      */
     @ApiModelProperty(value= "鍘熷簱鍖哄悕绉�")
-    private String orgAreaName;
+    private String areaName;
+
+    @ApiModelProperty("璋冩暣鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    private Date exceTime;
 
     /**
      * 鐘舵�� 1: 姝e父  0: 鍐荤粨  
@@ -135,8 +148,8 @@
         this.anfme = anfme;
         this.reviseQty = reviseQty;
         this.exceStatus = exceStatus;
-        this.orgAreaId = orgAreaId;
-        this.orgAreaName = orgAreaName;
+        this.areaId = orgAreaId;
+        this.areaName = orgAreaName;
         this.status = status;
         this.deleted = deleted;
         this.tenantId = tenantId;
@@ -147,34 +160,18 @@
         this.memo = memo;
     }
 
-//    LocRevise locRevise = new LocRevise(
-//            null,    // 璋冩暣鍗�
-//            null,    // 鍗曟嵁绫诲瀷
-//            null,    // 鍗曟嵁鏁伴噺
-//            null,    // 瀹為檯鏁伴噺
-//            null,    // 鎵ц鐘舵��:
-//            null,    // 婧愬簱鍖篒D
-//            null,    // 鍘熷簱鍖哄悕绉�
-//            null,    // 鐘舵�乕闈炵┖]
-//            null,    // 鏄惁鍒犻櫎[闈炵┖]
-//            null,    // 绉熸埛
-//            null,    // 娣诲姞浜哄憳
-//            null,    // 娣诲姞鏃堕棿[闈炵┖]
-//            null,    // 淇敼浜哄憳
-//            null,    // 淇敼鏃堕棿[闈炵┖]
-//            null    // 澶囨敞
-//    );
-
     public String getType$(){
-        if (null == this.type){ return null; }
-        switch (this.type){
-            case 0:
-                return " 搴撳瓨璋冩暣";
-            case  2:
-                return " 鐩樼偣璋冩暣";
-            default:
-                return String.valueOf(this.type);
+        if (Cools.isEmpty(this.type)) {
+            return null;
         }
+        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
+        DictData dictDatas = dictDataService.getOne(new LambdaQueryWrapper<DictData>()
+                .eq(DictData::getDictTypeCode, DictTypeCode.SYS_STOCK_REVISE_TYPE)
+                .eq(DictData::getValue, this.type));
+        if (Objects.isNull(dictDatas) || Objects.isNull(dictDatas.getLabel())) {
+            return null;
+        }
+        return dictDatas.getLabel();
     }
 
     public String getExceStatus$(){

--
Gitblit v1.9.1