From ff31d592924958958c21fdef1975d499586d964f Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期五, 26 十二月 2025 17:41:43 +0800
Subject: [PATCH] BUG修复
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/BasStation.java | 173 ++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 102 insertions(+), 71 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 bfa10a0..af2aaf9 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
@@ -1,19 +1,19 @@
package com.vincent.rsf.server.manager.entity;
import java.text.SimpleDateFormat;
-import java.util.Arrays;
-import java.util.Date;
+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;
import com.vincent.rsf.server.system.service.DictTypeService;
import org.springframework.format.annotation.DateTimeFormat;
import java.text.SimpleDateFormat;
-import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -23,7 +23,7 @@
import com.vincent.rsf.server.system.service.UserService;
import com.vincent.rsf.server.system.entity.User;
import java.io.Serializable;
-import java.util.Date;
+import java.util.stream.Collectors;
@Data
@TableName("man_bas_station")
@@ -34,199 +34,230 @@
/**
* id
*/
- @ApiModelProperty(value= "id")
+ @ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 绔欑偣鍚嶇О
*/
- @ApiModelProperty(value= "绔欑偣鍚嶇О")
+ @ApiModelProperty(value = "绔欑偣鍚嶇О")
private String stationName;
+
+ @ApiModelProperty("绔欑偣绫诲瀷: {0:鍏夌數锛� 1:鏃犲厜鐢祡")
+ private Integer type;
/**
* 鍙叆
*/
- @ApiModelProperty(value= "鍙叆")
+ @ApiModelProperty(value = "鍙叆")
private Integer inAble = 0;
/**
* 鍙嚭
*/
- @ApiModelProperty(value= "鍙嚭")
+ @ApiModelProperty(value = "鍙嚭")
private Integer outAble = 0;
/**
* 鐘舵��
*/
- @ApiModelProperty(value= "鐘舵��")
+ @ApiModelProperty(value = "鐘舵��")
private String useStatus;
/**
* 鎵�灞炲簱鍖篿d
*/
- @ApiModelProperty(value= "鎵�灞炲簱鍖篿d")
+ @ApiModelProperty(value = "鎵�灞炲簱鍖篿d")
private Long area;
/**
* 鏄惁鍙法鍖�
*/
- @ApiModelProperty(value= "鏄惁鍙法鍖�")
+ @ApiModelProperty(value = "鏄惁鍙法鍖�")
private Integer isCrossZone = 0;
/**
* 鍙法鍖哄尯鍩焛d
*/
- @ApiModelProperty(value= "鍙法鍖哄尯鍩焛d")
+ @ApiModelProperty(value = "鍙法鍖哄尯鍩焛d")
private String crossZoneArea;
/**
* 鏄惁wcs绔欑偣
*/
- @ApiModelProperty(value= "鏄惁wcs绔欑偣")
+ @ApiModelProperty(value = "鏄惁wcs绔欑偣")
private Integer isWcs = 0;
/**
* wcs绔欑偣淇℃伅
*/
- @ApiModelProperty(value= "wcs绔欑偣淇℃伅")
+ @ApiModelProperty(value = "wcs绔欑偣淇℃伅")
private String wcsData;
/**
* 瀹瑰櫒绫诲瀷
*/
- @ApiModelProperty(value= "瀹瑰櫒绫诲瀷")
- private Integer containerType;
+ @ApiModelProperty(value = "瀹瑰櫒绫诲瀷")
+ private String containerType;
/**
* 鏉$爜
*/
- @ApiModelProperty(value= "鏉$爜")
+ @ApiModelProperty(value = "鏉$爜")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String barcode;
/**
* 鏄惁鑷姩璋冩嫧
*/
- @ApiModelProperty(value= "鏄惁鑷姩璋冩嫧")
+ @ApiModelProperty(value = "鏄惁鑷姩璋冩嫧")
private Integer autoTransfer;
/**
* 澶囨敞
*/
- @ApiModelProperty(value= "澶囨敞")
+ @ApiModelProperty(value = "澶囨敞")
private String memo;
+
+ @ApiModelProperty(value = "鏄惁鍒犻櫎 1: 鏄� 0: 鍚� ")
+ @TableLogic
+ private Integer deleted;
/**
* 鍒涘缓浜�
*/
- @ApiModelProperty(value= "鍒涘缓浜�")
+ @ApiModelProperty(value = "鍒涘缓浜�")
private Long createBy;
/**
* 鍒涘缓鏃堕棿
*/
- @ApiModelProperty(value= "鍒涘缓鏃堕棿")
- @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 鏇存柊浜�
*/
- @ApiModelProperty(value= "鏇存柊浜�")
+ @ApiModelProperty(value = "鏇存柊浜�")
private Long updateBy;
/**
* 鏇存柊鏃堕棿
*/
- @ApiModelProperty(value= "鏇存柊鏃堕棿")
- @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "鏇存柊鏃堕棿")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
+
+ @ApiModelProperty(value = "鐘舵��")
+ private Integer status;
/**
* 鎵�灞炴満鏋�
*/
- @ApiModelProperty(value= "绉熸埛")
+ @ApiModelProperty(value = "绉熸埛")
private Long tenantId;
@TableField(exist = false)
- private Long[] areaIds;
+ private List<Long> areaIds;
- public BasStation() {}
+ @TableField(exist = false)
+ private List<Long> containerTypes;
+ public BasStation() {
+ }
+ public String getType$() {
+ if (this.type == null)
+ return null;
+ return StationTypeEnum.getStationDesc(this.type);
+ }
-// 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 List<Long> getContainerTypes$() {
+ if (Cools.isEmpty(this.containerType)) {
+ return new ArrayList<>();
+ }
+ DictDataService service = SpringUtils.getBean(DictDataService.class);
- public String getCreateTime$(){
- if (Cools.isEmpty(this.createTime)){
+ 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, longs1));
+ List<Long> longs = dictData.stream().map(DictData::getId).collect(Collectors.toList());
+ return longs;
+ }
+
+ public String getCreateTime$() {
+ if (Cools.isEmpty(this.createTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
}
- public String getUpdateTime$(){
- if (Cools.isEmpty(this.updateTime)){
+ public String getUpdateTime$() {
+ if (Cools.isEmpty(this.updateTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
}
- public String getUseStatus$(){
- if (Cools.isEmpty(this.useStatus)){
+ public String getUseStatus$() {
+ if (Cools.isEmpty(this.useStatus)) {
return "";
}
DictDataService service = SpringUtils.getBean(DictDataService.class);
DictData dictData = service.getOne(new LambdaQueryWrapper<DictData>()
.eq(DictData::getDictTypeCode, "sys_sta_use_stas")
- .eq(DictData::getValue, this.useStatus)
- );
- if (!Cools.isEmpty(dictData)){
+ .eq(DictData::getValue, this.useStatus));
+ if (!Cools.isEmpty(dictData)) {
return String.valueOf(dictData.getLabel());
}
return "";
}
- public String getContainerType$(){
- if (Cools.isEmpty(this.useStatus)){
- return "";
+ public String getCreateBy$() {
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.getById(this.createBy);
+ if (!Cools.isEmpty(user)) {
+ return String.valueOf(user.getNickname());
}
- DictDataService service = SpringUtils.getBean(DictDataService.class);
- DictData dictData = service.getOne(new LambdaQueryWrapper<DictData>()
- .eq(DictData::getDictTypeCode, "sys_container_type")
- .eq(DictData::getValue, this.containerType)
- );
- if (!Cools.isEmpty(dictData)){
- return String.valueOf(dictData.getLabel());
- }
- return "";
+ return null;
}
- public String getArea$(){
- if (null == this.area){ return null; }
+ public String getUpdateBy$() {
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.getById(this.updateBy);
+ if (!Cools.isEmpty(user)) {
+ return String.valueOf(user.getNickname());
+ }
+ return null;
+ }
+
+ public String getArea$() {
+ if (null == this.area) {
+ return null;
+ }
WarehouseAreasService service = SpringUtils.getBean(WarehouseAreasService.class);
WarehouseAreas warehouseAreas = service.getById(this.area);
- if (!Cools.isEmpty(warehouseAreas)){
+ if (!Cools.isEmpty(warehouseAreas)) {
return String.valueOf(warehouseAreas.getName());
}
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