| | |
| | | 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.baomidou.mybatisplus.annotation.*; |
| | |
| | | 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") |
| | |
| | | * 所属库区id |
| | | */ |
| | | @ApiModelProperty(value= "所属库区id") |
| | | private Integer area; |
| | | private Long area; |
| | | |
| | | /** |
| | | * 是否可跨区 |
| | |
| | | * 容器类型 |
| | | */ |
| | | @ApiModelProperty(value= "容器类型") |
| | | private Integer containerType; |
| | | private String containerType; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private String barcode; |
| | | |
| | | /** |
| | |
| | | @TableField(exist = false) |
| | | private Long[] areaIds; |
| | | |
| | | @TableField(exist = false) |
| | | private Long[] containerTypes; |
| | | |
| | | public BasStation() {} |
| | | |
| | | |
| | |
| | | // null, // 更新人 |
| | | // null // 更新时间 |
| | | // ); |
| | | |
| | | public List<Long> getContainerTypes$(){ |
| | | if (Cools.isEmpty(this.containerType)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | 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()); |
| | | } |
| | | List<DictData> dictData = service.list(new LambdaQueryWrapper<DictData>() |
| | | .eq(DictData::getDictTypeCode, "sys_container_type") |
| | | .in(DictData::getValue, longArray) |
| | | ); |
| | | List<Long> longs = dictData.stream().map(DictData::getId).collect(Collectors.toList()); |
| | | return longs; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | |
| | | return ""; |
| | | } |
| | | |
| | | public String getContainerType$(){ |
| | | if (Cools.isEmpty(this.useStatus)){ |
| | | return ""; |
| | | } |
| | | 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 ""; |
| | | } |
| | | |
| | | |
| | | public String getArea$(){ |
| | | if (null == this.area){ return null; } |