skyouc
2025-05-05 e211113fb94de4b54577fbcf6986bd5297b1e19e
rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/DeviceSite.java
@@ -6,6 +6,7 @@
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.vincent.rsf.server.manager.service.LocTypeService;
import com.vincent.rsf.server.system.constant.DictTypeCode;
import com.vincent.rsf.server.system.entity.DictData;
@@ -64,8 +65,8 @@
    /**
     * wcs站点编号
     */
    @ApiModelProperty(value= "wcs站点编号")
    private String wcsCode;
    @ApiModelProperty(value= "目标位置")
    private String target;
    /**
     * 站点标签
@@ -101,7 +102,6 @@
     * 是否删除 1: 是  0: 否  
     */
    @ApiModelProperty(value= "是否删除 1: 是  0: 否  ")
    @TableLogic
    private Integer deleted;
    /**
@@ -121,6 +121,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 +135,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;
@@ -154,7 +156,7 @@
        this.type = type;
        this.site = site;
        this.name = name;
        this.wcsCode = wcsCode;
        this.target = wcsCode;
        this.label = label;
        this.device = device;
        this.deviceCode = deviceCode;
@@ -198,7 +200,26 @@
        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
        List<DictData> dictDatas = dictDataService.list(new LambdaQueryWrapper<DictData>()
                .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_TASK_TYPE)
                .in(DictData::getId, asList));
                .in(DictData::getValue, asList));
        if (dictDatas.isEmpty()) {
            return null;
        }
        List<String> strings = dictDatas.stream().map(DictData::getLabel).collect(Collectors.toList());
        return StringUtils.join(strings, ",");
    }
    public String getDevice$(){
        if (null == this.device){ return null; }
        String[] split = this.device.split(",");
        List<String> asList = Arrays.asList(split);
        if (asList.isEmpty()) {
            return null;
        }
        DictDataService dictDataService = SpringUtils.getBean(DictDataService.class);
        List<DictData> dictDatas = dictDataService.list(new LambdaQueryWrapper<DictData>()
                .eq(DictData::getDictTypeCode, DictTypeCode.DICT_SYS_DEVICE_TYPE)
                .in(DictData::getValue, asList));
        if (dictDatas.isEmpty()) {
            return null;
        }