From 14ddde5c41d8d98fc9b67ebae72b6cdbca73330b Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期五, 25 四月 2025 20:45:10 +0800
Subject: [PATCH] 添加动态字段拦截器

---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WaveItem.java |  293 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 293 insertions(+), 0 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WaveItem.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WaveItem.java
new file mode 100644
index 0000000..392b2ac
--- /dev/null
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WaveItem.java
@@ -0,0 +1,293 @@
+package com.vincent.rsf.server.manager.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import lombok.experimental.Accessors;
+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;
+import com.vincent.rsf.framework.common.Cools;
+import com.vincent.rsf.framework.common.SpringUtils;
+import com.vincent.rsf.server.system.service.UserService;
+import com.vincent.rsf.server.system.entity.User;
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@Accessors(chain = true)
+@TableName("man_wave_item")
+public class WaveItem implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @ApiModelProperty(value= "ID")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 娉㈡ID
+     */
+    @ApiModelProperty(value= "娉㈡ID")
+    private Long waveId;
+
+    /**
+     * 娉㈡鍙�
+     */
+    @ApiModelProperty(value= "娉㈡鍙�")
+    private String waveCode;
+
+    /**
+     * 鍟嗗搧ID
+     */
+    @ApiModelProperty(value= "鍟嗗搧ID")
+    private Long matnrId;
+
+    /**
+     * 鐗╂枡鍚嶇О
+     */
+    @ApiModelProperty(value= "鐗╂枡鍚嶇О")
+    private String maktx;
+
+    /**
+     * 鍟嗗搧缂栧彿
+     */
+    @ApiModelProperty(value= "鍟嗗搧缂栧彿")
+    private String matnrCode;
+
+    /**
+     * 鎵瑰彿
+     */
+    @ApiModelProperty(value= "鎵瑰彿")
+    private String batch;
+
+    /**
+     * 渚涘簲鍟嗘壒娆�
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗘壒娆�")
+    private String splrBatch;
+
+    /**
+     * 鍗曟嵁缂栫爜
+     */
+    @ApiModelProperty(value= "鍗曟嵁缂栫爜")
+    private String orderCode;
+
+    /**
+     * 鍗曟嵁ID
+     */
+    @ApiModelProperty(value= "鍗曟嵁ID")
+    private Long orderItemId;
+
+    @ApiModelProperty("璁㈠崟ID")
+    private Long orderId;
+
+    /**
+     * 鍗曚綅
+     */
+    @ApiModelProperty(value= "鍗曚綅")
+    private String unit;
+
+    /**
+     * 璺熻釜鐮�
+     */
+    @ApiModelProperty(value= "璺熻釜鐮�")
+    private String trackCode;
+
+    /**
+     * 鍟嗗搧搴撳瓨绱㈠紩
+     */
+    @ApiModelProperty(value= "鍟嗗搧搴撳瓨绱㈠紩")
+    private String fieldsIndex;
+
+    /**
+     * 鏁伴噺
+     */
+    @ApiModelProperty(value= "鏁伴噺")
+    private Double anfme;
+
+    @ApiModelProperty("宸插畬鎴愭暟閲�")
+    private Double qty;
+
+    /**
+     * 宸ヤ綔鏁伴噺
+     */
+    @ApiModelProperty(value= "宸ヤ綔鏁伴噺")
+    private Double workQty;
+
+    /**
+     * 鎵�灞炴満鏋�
+     */
+    @ApiModelProperty(value= "鎵�灞炴満鏋�")
+    private Long tenantId;
+
+    /**
+     * 鐘舵�� 1: 姝e父  0: 绂佺敤  
+     */
+    @ApiModelProperty(value= "鐘舵�� 1: 姝e父  0: 绂佺敤  ")
+    private Integer status;
+
+    /**
+     * 鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  
+     */
+    @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  ")
+    @TableLogic
+    private Integer deleted;
+
+    /**
+     * 娣诲姞鏃堕棿
+     */
+    @ApiModelProperty(value= "娣诲姞鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /**
+     * 娣诲姞浜哄憳
+     */
+    @ApiModelProperty(value= "娣诲姞浜哄憳")
+    private Long createBy;
+
+    /**
+     * 淇敼鏃堕棿
+     */
+    @ApiModelProperty(value= "淇敼鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 淇敼浜哄憳
+     */
+    @ApiModelProperty(value= "淇敼浜哄憳")
+    private Long updateBy;
+
+    /**
+     * 澶囨敞
+     */
+    @ApiModelProperty(value= "澶囨敞")
+    private String memo;
+
+    public WaveItem() {}
+
+    public WaveItem(Long waveId,String waveCode,Long matnrId,String matnrName,String matnrCode,String batch,String splrBatch,String orderCode, Long orderId,Long orderItemId,String unit,String trackCode,String fieldsIndex,Double anfme,Double workQty,Long tenantId,Integer status,Integer deleted,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) {
+        this.waveId = waveId;
+        this.waveCode = waveCode;
+        this.matnrId = matnrId;
+        this.maktx = matnrName;
+        this.matnrCode = matnrCode;
+        this.batch = batch;
+        this.orderId = orderId;
+        this.splrBatch = splrBatch;
+        this.orderCode = orderCode;
+        this.orderItemId = orderItemId;
+        this.unit = unit;
+        this.trackCode = trackCode;
+        this.fieldsIndex = fieldsIndex;
+        this.anfme = anfme;
+        this.workQty = workQty;
+        this.tenantId = tenantId;
+        this.status = status;
+        this.deleted = deleted;
+        this.createTime = createTime;
+        this.createBy = createBy;
+        this.updateTime = updateTime;
+        this.updateBy = updateBy;
+        this.memo = memo;
+    }
+
+
+//    WaveItem waveItem = new WaveItem(
+//            null,    // 娉㈡ID
+//            null,    // 娉㈡鍙�
+//            null,    // 鍟嗗搧ID
+//            null,    // 鐗╂枡鍚嶇О
+//            null,    // 鍟嗗搧缂栧彿
+//            null,    // 鎵瑰彿
+//            null,    // 渚涘簲鍟嗘壒娆�
+//            null,    // 鍗曟嵁缂栫爜
+//            null,    // 鍗曟嵁ID
+//            null,    // 鍗曚綅
+//            null,    // 璺熻釜鐮�
+//            null,    // 鍟嗗搧搴撳瓨绱㈠紩
+//            null,    // 鏁伴噺
+//            null,    // 宸ヤ綔鏁伴噺
+//            null,    // 鎵�灞炴満鏋�
+//            null,    // 鐘舵��
+//            null,    // 鏄惁鍒犻櫎
+//            null,    // 娣诲姞鏃堕棿
+//            null,    // 娣诲姞浜哄憳
+//            null,    // 淇敼鏃堕棿
+//            null,    // 淇敼浜哄憳
+//            null    // 澶囨敞
+//    );
+
+    public String getStatus$(){
+        if (null == this.status){ return null; }
+        switch (this.status){
+            case 1:
+                return "姝e父";
+            case 0:
+                return "绂佺敤";
+            default:
+                return String.valueOf(this.status);
+        }
+    }
+
+    public String getCreateTime$(){
+        if (Cools.isEmpty(this.createTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+    }
+
+    public String getCreateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.createBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getUpdateTime$(){
+        if (Cools.isEmpty(this.updateTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
+    }
+
+    public String getUpdateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.updateBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+
+
+    public Boolean getStatusBool(){
+        if (null == this.status){ return null; }
+        switch (this.status){
+            case 1:
+                return true;
+            case 0:
+                return false;
+            default:
+                return null;
+        }
+    }
+
+}

--
Gitblit v1.9.1