|  |  |  | 
|---|
|  |  |  | package com.vincent.rsf.server.manager.entity; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.*; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.fasterxml.jackson.annotation.JsonFormat; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.Cools; | 
|---|
|  |  |  | import com.vincent.rsf.framework.common.SpringUtils; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.LocTypeService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WarehouseAreasService; | 
|---|
|  |  |  | import com.vincent.rsf.server.manager.service.WarehouseService; | 
|---|
|  |  |  | import com.vincent.rsf.server.system.entity.User; | 
|---|
|  |  |  | 
|---|
|  |  |  | import io.swagger.annotations.ApiModelProperty; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import lombok.experimental.Accessors; | 
|---|
|  |  |  | import org.apache.commons.lang3.StringUtils; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.io.Serializable; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Arrays; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.stream.Collectors; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @Accessors(chain = true) | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiModelProperty(value= "库位类型(*) H:  高库位   M:  中库位   L:  低库位  ") | 
|---|
|  |  |  | @TableField("`type`") | 
|---|
|  |  |  | private String type; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty("库位类型(*)[man_loc_type]") | 
|---|
|  |  |  | @TableField(exist = false) | 
|---|
|  |  |  | private List<Long> typeIds; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 虚拟库位 | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "宽") | 
|---|
|  |  |  | private Double width; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 排 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "排") | 
|---|
|  |  |  | @TableField("`row`") | 
|---|
|  |  |  | private Integer row; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 设备号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "设备号") | 
|---|
|  |  |  | private Integer deviceNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 列 | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") | 
|---|
|  |  |  | private Date createTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") | 
|---|
|  |  |  | private Date updateTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | //            null    // 备注 | 
|---|
|  |  |  | //    ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getType$(){ | 
|---|
|  |  |  | public String getTypeIds$(){ | 
|---|
|  |  |  | if (null == this.type){ return null; } | 
|---|
|  |  |  | switch (this.type){ | 
|---|
|  |  |  | case  "H": | 
|---|
|  |  |  | return " 高库位"; | 
|---|
|  |  |  | case  "M": | 
|---|
|  |  |  | return " 中库位"; | 
|---|
|  |  |  | case  "L": | 
|---|
|  |  |  | return " 低库位"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return String.valueOf(this.type); | 
|---|
|  |  |  | String[] split = this.type.split(","); | 
|---|
|  |  |  | List<String> asList = Arrays.asList(split); | 
|---|
|  |  |  | if (asList.isEmpty()) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | LocTypeService locTypeService = SpringUtils.getBean(LocTypeService.class); | 
|---|
|  |  |  | List<LocType> locTypes = locTypeService.list(new LambdaQueryWrapper<LocType>().in(LocType::getId, asList)); | 
|---|
|  |  |  | if (locTypes.isEmpty()) { | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<String> strings = locTypes.stream().map(LocType::getName).collect(Collectors.toList()); | 
|---|
|  |  |  | return StringUtils.join(strings, ","); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUseStatus$(){ | 
|---|