From 275bcf975a288730b7e3c26f67fe484bc33f0510 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 12 六月 2025 08:51:33 +0800
Subject: [PATCH] 代码优化
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/AsnOrderItem.java | 64 +++++++++++++++++++++++++++++++-
1 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/AsnOrderItem.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/AsnOrderItem.java
index 4672de4..c038d91 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/AsnOrderItem.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/AsnOrderItem.java
@@ -5,6 +5,11 @@
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;
@@ -16,6 +21,7 @@
import com.vincent.rsf.server.system.entity.User;
import java.io.Serializable;
import java.util.Map;
+import java.util.Objects;
@Data
@Accessors(chain = true)
@@ -36,11 +42,21 @@
@ApiModelProperty(value= "ASN涓诲崟鏍囪瘑")
private Long asnId;
+
/**
* 骞冲彴鏍囪瘑锛堣鍙凤級
*/
@ApiModelProperty(value = "骞冲彴鏍囪瘑锛堣鍙凤級")
private String platItemId;
+
+ @ApiModelProperty("瀹㈡埛璁㈠崟鍙�")
+ private String platOrderCode;
+
+ @ApiModelProperty("宸ュ崟鍙�")
+ private String platWorkCode;
+
+ @ApiModelProperty("椤圭洰鍙�")
+ private String projectCode;
/**
* 鎵╁睍瀛楁
@@ -100,6 +116,12 @@
*/
@ApiModelProperty(value= "鐗╂枡鍚嶇О")
private String maktx;
+
+ @ApiModelProperty("瑙勬牸")
+ private String spec;
+
+ @ApiModelProperty("鍨嬪彿")
+ private String model;
/**
* 閫佽揣鏁伴噺
@@ -182,15 +204,37 @@
private Integer ntyStatus;
/**
- * 鐘舵�� 1: 姝e父 0: 鍐荤粨
+ * 璐ㄦ缁撴灉
+ */
+ @ApiModelProperty("璐ㄦ缁撴灉")
+ private Short isptResult;
+
+ /**
+ * 璐ㄦ鐘舵��
+ */
+ @ApiModelProperty("璐ㄦ鐘舵��")
+ private Short isptStatus;
+
+
+ @ApiModelProperty("鍚堟牸鏁伴噺")
+ @TableField(exist = false)
+ private Double safeQty;
+
+ @ApiModelProperty("涓嶅悎鏍兼暟閲�")
+ @TableField(exist = false)
+ private Double disQty;
+
+ /**
+ * 鐘舵�� 1: 姝e父 0: 鍐荤粨
*/
@ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 鍐荤粨 ")
private Integer status;
/**
- * 鏄惁鍒犻櫎 1: 鏄� 0: 鍚�
+ * 鏄惁鍒犻櫎 1: 鏄� 0: 鍚�
*/
@ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄� 0: 鍚� ")
+ @TableLogic
private Integer deleted;
/**
@@ -210,6 +254,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;
/**
@@ -223,6 +268,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;
/**
@@ -347,4 +393,18 @@
}
}
+ public String getIsptResult$(){
+ if (Cools.isEmpty(this.isptResult)){
+ return null;
+ }
+ DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
+ DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>()
+ .eq(DictData::getDictTypeCode, DictTypeCode.DICT_INSPECT_RESULT)
+ .eq(DictData::getValue, this.isptResult));
+ if (Objects.isNull(dictData)) {
+ return null;
+ }
+ return dictData.getLabel();
+ }
+
}
--
Gitblit v1.9.1