From 9fe1ec3afe8696c628d076d1f76686c4efc3012e Mon Sep 17 00:00:00 2001
From: zc <zyzc>
Date: 星期二, 21 十月 2025 10:49:55 +0800
Subject: [PATCH] 容器初始化功能优化
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Stock.java | 150 ++++++++++++++++++++++---------------------------
1 files changed, 67 insertions(+), 83 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Stock.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Stock.java
index 670c7d5..e2f3a8d 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Stock.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Stock.java
@@ -1,7 +1,14 @@
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 com.baomidou.mybatisplus.annotation.TableLogic;
import java.text.SimpleDateFormat;
@@ -24,9 +31,9 @@
import java.util.Date;
@Data
+@Accessors(chain = true)
@TableName("man_stock")
public class Stock implements Serializable {
-
private static final long serialVersionUID = 1L;
/**
@@ -37,59 +44,46 @@
private Long id;
/**
- * ASN鍗曟嵁锛� 甯﹀嚭PO鍗�
+ * 缂栧彿
*/
- @ApiModelProperty(value= "ASN鍗曟嵁锛� 甯﹀嚭PO鍗�")
- private String asnOrder;
+ @ApiModelProperty(value= "缂栧彿")
+ private String code;
/**
- * ERP鍑瘉
+ * 婧愬崟鎹紪鐮�
*/
- @ApiModelProperty(value= "ERP鍑瘉")
- private String erpToken;
+ @ApiModelProperty(value= "婧愬崟鎹紪鐮�")
+ private String sourceCode;
/**
- * ERP鍗曞彿
+ * 婧愬崟鎹甀D
*/
- @ApiModelProperty(value= "ERP鍗曞彿")
- private String erpOrder;
+ @ApiModelProperty(value= "婧愬崟鎹甀D")
+ private Long sourceId;
/**
- * ERP搴撳瓨鍦板潃
+ * 鍗曟嵁绫诲瀷
*/
- @ApiModelProperty(value= "ERP搴撳瓨鍦板潃")
- private String erpStkAdr;
+ @ApiModelProperty(value= "鍗曟嵁绫诲瀷")
+ private String type;
/**
- * 鍚堝悓鏍囪瘑
+ * 涓氬姟绫诲瀷
*/
- @ApiModelProperty(value= "鍚堝悓鏍囪瘑")
- private String contractId;
+ @ApiModelProperty(value= "涓氬姟绫诲瀷")
+ private Short wkType;
/**
- * 閿佸畾鍘熷洜
+ * 搴撳瓨鏁伴噺
*/
- @ApiModelProperty(value= "閿佸畾鍘熷洜")
- private String lockReason;
+ @ApiModelProperty(value= "搴撳瓨鏁伴噺")
+ private Double anfme;
- /**
- * 閿佸畾鐘舵��
- */
- @ApiModelProperty(value= "閿佸畾鐘舵��")
- private Short lockStatus;
+ @ApiModelProperty(value= "鏉″舰鐮�")
+ private String barcode;
- /**
- * 閿佸畾浜�
- */
- @ApiModelProperty(value= "閿佸畾浜�")
- private String locker;
-
- /**
- * 閿佸畾鏃堕棿
- */
- @ApiModelProperty(value= "閿佸畾鏃堕棿")
- @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
- private Date lockedTime;
+ @ApiModelProperty("搴撲綅")
+ private String locCode;
/**
* 鐘舵�� 1: 姝e父 0: 鍐荤粨
@@ -121,6 +115,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;
/**
@@ -134,6 +129,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;
/**
@@ -144,16 +140,13 @@
public Stock() {}
- public Stock(String asnOrder,String erpToken,String erpOrder,String erpStkAdr,String contractId,String lockReason,Short lockStatus,String locker,Date lockedTime,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
- this.asnOrder = asnOrder;
- this.erpToken = erpToken;
- this.erpOrder = erpOrder;
- this.erpStkAdr = erpStkAdr;
- this.contractId = contractId;
- this.lockReason = lockReason;
- this.lockStatus = lockStatus;
- this.locker = locker;
- this.lockedTime = lockedTime;
+ public Stock(String code,String sourceCode,Long sourceId,String type,Short wkType,Double anfme,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
+ this.code = code;
+ this.sourceCode = sourceCode;
+ this.sourceId = sourceId;
+ this.type = type;
+ this.wkType = wkType;
+ this.anfme = anfme;
this.status = status;
this.deleted = deleted;
this.tenantId = tenantId;
@@ -164,31 +157,36 @@
this.memo = memo;
}
-// Stock stock = new Stock(
-// null, // ASN鍗曟嵁锛� 甯﹀嚭PO鍗昜闈炵┖]
-// null, // ERP鍑瘉
-// null, // ERP鍗曞彿
-// null, // ERP搴撳瓨鍦板潃
-// null, // 鍚堝悓鏍囪瘑
-// null, // 閿佸畾鍘熷洜
-// null, // 閿佸畾鐘舵�乕闈炵┖]
-// null, // 閿佸畾浜�
-// null, // 閿佸畾鏃堕棿
-// null, // 鐘舵�乕闈炵┖]
-// null, // 鏄惁鍒犻櫎[闈炵┖]
-// null, // 绉熸埛
-// null, // 娣诲姞浜哄憳
-// null, // 娣诲姞鏃堕棿[闈炵┖]
-// null, // 淇敼浜哄憳
-// null, // 淇敼鏃堕棿[闈炵┖]
-// null // 澶囨敞
-// );
- public String getLockedTime$(){
- if (Cools.isEmpty(this.lockedTime)){
+// public String getLockedTime$(){
+// if (Cools.isEmpty(this.lockedTime)){
+// return "";
+// }
+// return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.lockedTime);
+// }
+
+ public String getType$(){
+ if (Cools.isEmpty(this.type)){
return "";
}
- return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.lockedTime);
+ DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
+ DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_ORDER_TYPE).eq(DictData::getValue, this.type));
+ if (Objects.isNull(dictData)) {
+ return null;
+ }
+ return dictData.getLabel();
+ }
+
+ public String getWkType$(){
+ if (Cools.isEmpty(this.wkType)){
+ return "";
+ }
+ DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
+ DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_BUSINESS_TYPE).eq(DictData::getValue, this.wkType));
+ if (Objects.isNull(dictData)) {
+ return null;
+ }
+ return dictData.getLabel();
}
public String getStatus$(){
@@ -233,20 +231,6 @@
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
- }
-
-
-
- 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