| | |
| | | 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; |
| | |
| | | */ |
| | | @ApiModelProperty(value= "站点名称") |
| | | private String stationName; |
| | | |
| | | @ApiModelProperty("站点类型: {0:光电, 1:无光电}") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 可入 |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | @ApiModelProperty(value= "是否删除 1: 是 0: 否 ") |
| | | @TableLogic |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty(value= "状态") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 所属机构 |
| | | */ |
| | |
| | | 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, // 所属库区id |
| | | // null, // 是否可跨区 |
| | | // null, // 可跨区区域id |
| | | // 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)){ |
| | |
| | | } |
| | | 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; |
| | |
| | | } |
| | | 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; |
| | | } |
| | | } |
| | | } |