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/LocItem.java | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 111 insertions(+), 9 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/LocItem.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/LocItem.java
index 6382e57..917aaf5 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/LocItem.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/LocItem.java
@@ -1,18 +1,24 @@
package com.vincent.rsf.server.manager.entity;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import java.text.SimpleDateFormat;
-import java.util.Date;
+import com.baomidou.mybatisplus.annotation.*;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.vincent.rsf.framework.common.DateUtils;
+import com.vincent.rsf.server.manager.service.LocService;
+import com.vincent.rsf.server.manager.service.WarehouseAreasService;
+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;
-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;
@@ -42,6 +48,7 @@
*/
@ApiModelProperty(value= "涓诲崟ID")
private Long locId;
+
@ApiModelProperty("搴撲綅缂栫爜")
private String locCode;
@@ -77,6 +84,29 @@
private Long matnrId;
/**
+ * 骞冲彴鏍囪瘑锛堣鍙凤級
+ */
+ @ApiModelProperty(value = "骞冲彴鏍囪瘑锛堣鍙凤級")
+ private String platItemId;
+
+ @ApiModelProperty("瀹㈡埛璁㈠崟鍙�")
+ private String platOrderCode;
+
+ @ApiModelProperty("宸ュ崟鍙�")
+ private String platWorkCode;
+
+ @ApiModelProperty("椤圭洰鍙�")
+ private String projectCode;
+
+ @ApiModelProperty("鍑哄簱鏁伴噺")
+ @TableField(exist = false)
+ private Double outQty;
+
+ @ApiModelProperty("宸烽亾")
+ @TableField(exist = false)
+ private Integer channel;
+
+ /**
* 鐗╂枡鍚嶇О
*/
@ApiModelProperty(value= "鐗╂枡鍚嶇О")
@@ -106,8 +136,10 @@
@ApiModelProperty(value= "鏁伴噺")
private Double anfme;
+
@ApiModelProperty("鎵ц鏁伴噺")
private Double workQty;
+
@ApiModelProperty("瀹屾垚鏁伴噺")
private Double qty;
@@ -142,6 +174,14 @@
@ApiModelProperty(value= "瀛楁绱㈠紩")
private String fieldsIndex;
+ @ApiModelProperty("鎵╁睍瀛楁")
+ @TableField(exist = false)
+ private Map<String, String> extendFields;
+
+ @ApiModelProperty("鎵樼洏鐮�")
+ @TableField(exist = false)
+ private String barcode;
+
/**
* 鐘舵�� 1: 姝e父 0: 鍐荤粨
*/
@@ -172,6 +212,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;
/**
@@ -180,12 +221,30 @@
@ApiModelProperty(value= "淇敼浜哄憳")
private Long updateBy;
+ @ApiModelProperty("渚涘簲鍟咺D")
+ private Long splrId;
+
/**
* 淇敼鏃堕棿
*/
@ApiModelProperty(value= "淇敼鏃堕棿")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date updateTime;
+
+ @TableField(exist = false)
+ private Long sourceId;
+
+ @TableField(exist = false)
+ private Long source;
+
+ @TableField(exist = false)
+ private String sourceCode;
+
+ @ApiModelProperty("鍑虹珯鍙�")
+ @TableField(exist = false)
+ private String siteNo;
+
/**
* 澶囨敞
@@ -223,7 +282,7 @@
}
// LocItem locItem = new LocItem(
-// null, // 涓诲崟ID
+// null, // 涓诲崟IDs
// null, // 鍗曟嵁ID
// null, // 鍗曟嵁绫诲瀷
// null, // 璁㈠崟鏄庣粏id
@@ -249,6 +308,46 @@
// null // 澶囨敞
// );
+ public String getWareArea(){
+ if (Cools.isEmpty(this.locId)){
+ return "";
+ }
+ LocService locService = SpringUtils.getBean(LocService.class);
+ Loc loc = locService.getById(this.locId);
+ if (Objects.isNull(loc)) {
+ return null;
+ }
+ return loc.getAreaId$();
+ }
+
+ public String getType$(){
+ if (Cools.isEmpty(this.type)){
+ return "";
+ }
+ 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 Double getReviseQty() {
+ return this.anfme;
+ }
+
public String getStatus$(){
if (null == this.status){ return null; }
switch (this.status){
@@ -259,6 +358,11 @@
default:
return String.valueOf(this.status);
}
+ }
+
+ public Integer getDeadTime() {
+ if (null == this.createTime){ return null; }
+ return DateUtils.diff(createTime, new Date());
}
public String getCreateBy$(){
@@ -292,8 +396,6 @@
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
}
-
-
public Boolean getStatusBool(){
if (null == this.status){ return null; }
--
Gitblit v1.9.1