From 2ccc26e480e1ce329a2fa813bdda0dbe4711a3df Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期二, 21 十月 2025 14:03:22 +0800
Subject: [PATCH] 新增物料更新接口
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/BasStation.java | 65 +++++++++++++++++---------------
1 files changed, 34 insertions(+), 31 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/BasStation.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/BasStation.java
index c5ddc4b..6481ea9 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/BasStation.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/BasStation.java
@@ -4,8 +4,10 @@
import java.util.*;
import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.vincent.rsf.server.manager.enums.StationTypeEnum;
import com.vincent.rsf.server.manager.service.WarehouseAreasService;
import com.vincent.rsf.server.system.entity.DictData;
import com.vincent.rsf.server.system.service.DictDataService;
@@ -43,6 +45,9 @@
*/
@ApiModelProperty(value= "绔欑偣鍚嶇О")
private String stationName;
+
+ @ApiModelProperty("绔欑偣绫诲瀷: {0:鍏夌數锛� 1:鏃犲厜鐢祡")
+ private Integer type;
/**
* 鍙叆
@@ -117,6 +122,10 @@
@ApiModelProperty(value= "澶囨敞")
private String memo;
+ @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄� 0: 鍚� ")
+ @TableLogic
+ private Integer deleted;
+
/**
* 鍒涘缓浜�
*/
@@ -143,6 +152,9 @@
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date updateTime;
+ @ApiModelProperty(value= "鐘舵��")
+ private Integer status;
+
/**
* 鎵�灞炴満鏋�
*/
@@ -150,34 +162,17 @@
private Long tenantId;
@TableField(exist = false)
- private Long[] areaIds;
+ private List<Long> areaIds;
@TableField(exist = false)
- private Long[] containerTypes;
+ private List<Long> containerTypes;
public BasStation() {}
-
-
-// BasStation basStation = new BasStation(
-// null, // 绔欑偣鍚嶇О
-// null, // 鍙叆
-// null, // 鍙嚭
-// null, // 鐘舵��
-// null, // 鎵�灞炲簱鍖篿d
-// null, // 鏄惁鍙法鍖�
-// null, // 鍙法鍖哄尯鍩焛d
-// null, // 鏄惁wcs绔欑偣
-// null, // wcs绔欑偣淇℃伅
-// null, // 瀹瑰櫒绫诲瀷
-// null, // 鏉$爜
-// null, // 鏄惁鑷姩璋冩嫧
-// null, // 澶囨敞
-// null, // 鍒涘缓浜�
-// null, // 鍒涘缓鏃堕棿
-// null, // 鏇存柊浜�
-// null // 鏇存柊鏃堕棿
-// );
+ public String getType$() {
+ if (this.type == null) return null;
+ return StationTypeEnum.getStationDesc(this.type);
+ }
public List<Long> getContainerTypes$(){
if (Cools.isEmpty(this.containerType)){
@@ -185,16 +180,11 @@
}
DictDataService service = SpringUtils.getBean(DictDataService.class);
-
- String content = this.getContainerType().substring(1, this.getContainerType().length() - 1);
- String[] parts = content.split(",");
- Long[] longArray = new Long[parts.length];
- for (int i = 0; i < parts.length; i++) {
- longArray[i] = Long.parseLong(parts[i].trim());
- }
+ Object parse = JSONArray.parse(this.getContainerType());
+ List<Long> longs1 = JSONObject.parseArray(parse.toString(), Long.class);
List<DictData> dictData = service.list(new LambdaQueryWrapper<DictData>()
.eq(DictData::getDictTypeCode, "sys_container_type")
- .in(DictData::getValue, longArray)
+ .in(DictData::getValue, longs1)
);
List<Long> longs = dictData.stream().map(DictData::getId).collect(Collectors.toList());
return longs;
@@ -240,4 +230,17 @@
}
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