From b5e4bbec339bf3858338deece026a20bc40b8923 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 06 五月 2025 15:45:32 +0800
Subject: [PATCH] no message

---
 rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Purchase.java |   39 ++++++++++++++++++++++++++++++++-------
 1 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Purchase.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Purchase.java
index b59e788..5bf17f1 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Purchase.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Purchase.java
@@ -1,8 +1,13 @@
 package com.vincent.rsf.server.manager.entity;
 
 import java.text.SimpleDateFormat;
-import java.util.Date;
+import java.util.*;
 
+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;
@@ -55,11 +60,15 @@
     @ApiModelProperty(value= "鍗曟嵁绫诲瀷")
     private String type;
 
+
+    @ApiModelProperty(value = "erp涓诲崟鏍囪瘑")
+    private String platId;
+
     /**
      * 鍗曟嵁鏉ユ簮
      */
     @ApiModelProperty(value= "鍗曟嵁鏉ユ簮")
-    private String from;
+    private String source;
 
     /**
      * 棰勮鍒拌揪鏃堕棿
@@ -96,7 +105,7 @@
      * erp鍗曞彿
      */
     @ApiModelProperty(value= "erp鍗曞彿")
-    private String erpCode;
+    private String platCode;
 
     /**
      * 璁″垝鏀惰揣鏃堕棿
@@ -128,7 +137,6 @@
      * 鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  
      */
     @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  ")
-    @TableLogic
     private Integer deleted;
 
     /**
@@ -148,6 +156,7 @@
      */
     @ApiModelProperty(value= "娣诲姞鏃堕棿")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -161,6 +170,7 @@
      */
     @ApiModelProperty(value= "淇敼鏃堕棿")
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date updateTime;
 
     /**
@@ -171,16 +181,17 @@
 
     public Purchase() {}
 
-    public Purchase(String code,String type,String from,Date preArr,Double anfme,Double qty,Double workQty,String channel,String erpCode,Date startTime,Date endTime,String project,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+    public Purchase(String code,String type,String source,String platId ,Date preArr,Double anfme,Double qty,Double workQty,String channel,String platCode,Date startTime,Date endTime,String project,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
         this.code = code;
         this.type = type;
-        this.from = from;
+        this.source = source;
+        this.platId = platId;
         this.preArr = preArr;
         this.anfme = anfme;
         this.qty = qty;
         this.workQty = workQty;
         this.channel = channel;
-        this.erpCode = erpCode;
+        this.platCode = platCode;
         this.startTime = startTime;
         this.endTime = endTime;
         this.project = project;
@@ -217,6 +228,20 @@
 //            null    // 澶囨敞
 //    );
 
+    public String getType$() {
+        if (Cools.isEmpty(this.type)) {
+            return "";
+        }
+        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
+        DictData dictDatas = dictDataService.getOne(new LambdaQueryWrapper<DictData>()
+                .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_ORDER_TYPE)
+                .eq(DictData::getValue, this.type));
+        if (Objects.isNull(dictDatas) || Objects.isNull(dictDatas.getLabel())) {
+            return null;
+        }
+        return dictDatas.getLabel();
+    }
+
     public String getPreArr$(){
         if (Cools.isEmpty(this.preArr)){
             return "";

--
Gitblit v1.9.1