package com.zy.acs.manager.manager.entity; 
 | 
  
 | 
import com.baomidou.mybatisplus.annotation.IdType; 
 | 
import com.baomidou.mybatisplus.annotation.TableId; 
 | 
import com.baomidou.mybatisplus.annotation.TableName; 
 | 
import com.zy.acs.framework.common.Cools; 
 | 
import com.zy.acs.framework.common.SpringUtils; 
 | 
import com.zy.acs.manager.manager.service.CodeService; 
 | 
import com.zy.acs.manager.manager.service.LocStsService; 
 | 
import com.zy.acs.manager.manager.service.LocTypeService; 
 | 
import com.zy.acs.manager.manager.service.ZoneService; 
 | 
import io.swagger.annotations.ApiModelProperty; 
 | 
import lombok.Data; 
 | 
  
 | 
import java.io.Serializable; 
 | 
import java.util.Date; 
 | 
  
 | 
@Data 
 | 
@TableName("man_loc") 
 | 
public class Loc implements Serializable { 
 | 
  
 | 
    private static final long serialVersionUID = 1L; 
 | 
  
 | 
    /** 
 | 
     * ID 
 | 
     */ 
 | 
    @ApiModelProperty(value= "ID") 
 | 
    @TableId(value = "id", type = IdType.AUTO) 
 | 
    private Long id; 
 | 
  
 | 
    /** 
 | 
     * 编号 
 | 
     */ 
 | 
    @ApiModelProperty(value= "编号") 
 | 
    private String uuid; 
 | 
  
 | 
    /** 
 | 
     * 库区 
 | 
     */ 
 | 
    @ApiModelProperty(value= "库区") 
 | 
    private Long zoneId; 
 | 
  
 | 
    /** 
 | 
     * 库位编号 
 | 
     */ 
 | 
    @ApiModelProperty(value= "库位编号") 
 | 
    private String locNo; 
 | 
  
 | 
    /** 
 | 
     * 名称 
 | 
     */ 
 | 
    @ApiModelProperty(value= "名称") 
 | 
    private String name; 
 | 
  
 | 
    /** 
 | 
     * 条码 
 | 
     */ 
 | 
    @ApiModelProperty(value= "条码") 
 | 
    private Long code; 
 | 
  
 | 
    /** 
 | 
     * 比码方向阈 1:  大于  0    小于 
 | 
     */ 
 | 
    @ApiModelProperty(value= "比码方向阈 1:  大于  0    小于") 
 | 
    private Integer compDirect; 
 | 
  
 | 
    /** 
 | 
     * 库位状态 
 | 
     */ 
 | 
    @ApiModelProperty(value= "库位状态") 
 | 
    private Long locSts; 
 | 
  
 | 
    /** 
 | 
     * 偏移量 
 | 
     */ 
 | 
    @ApiModelProperty(value= "偏移量") 
 | 
    private Double offset; 
 | 
  
 | 
    /** 
 | 
     * 排 
 | 
     */ 
 | 
    @ApiModelProperty(value= "排") 
 | 
    private Integer row; 
 | 
  
 | 
    /** 
 | 
     * 列 
 | 
     */ 
 | 
    @ApiModelProperty(value= "列") 
 | 
    private Integer bay; 
 | 
  
 | 
    /** 
 | 
     * 层 
 | 
     */ 
 | 
    @ApiModelProperty(value= "层") 
 | 
    private Integer lev; 
 | 
  
 | 
    /** 
 | 
     * 库位码 
 | 
     */ 
 | 
    @ApiModelProperty(value= "库位码") 
 | 
    private String barcode; 
 | 
  
 | 
    /** 
 | 
     * 托盘码 
 | 
     */ 
 | 
    @ApiModelProperty(value= "托盘码") 
 | 
    private String zpallet; 
 | 
  
 | 
    /** 
 | 
     * 库位类型 
 | 
     */ 
 | 
    @ApiModelProperty(value= "库位类型") 
 | 
    private Long locType; 
 | 
  
 | 
    /** 
 | 
     * 状态 1: 正常  0: 冻结   
 | 
     */ 
 | 
    @ApiModelProperty(value= "状态 1: 正常  0: 冻结  ") 
 | 
    private Integer status; 
 | 
  
 | 
    /** 
 | 
     * 是否删除 1: 是  0: 否   
 | 
     */ 
 | 
    @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") 
 | 
    private Integer deleted; 
 | 
  
 | 
    /** 
 | 
     * 租户 
 | 
     */ 
 | 
    @ApiModelProperty(value= "租户") 
 | 
    private Long tenantId; 
 | 
  
 | 
    /** 
 | 
     * 添加人员 
 | 
     */ 
 | 
    @ApiModelProperty(value= "添加人员") 
 | 
    private Long createBy; 
 | 
  
 | 
    /** 
 | 
     * 添加时间 
 | 
     */ 
 | 
    @ApiModelProperty(value= "添加时间") 
 | 
    private Date createTime; 
 | 
  
 | 
    /** 
 | 
     * 修改人员 
 | 
     */ 
 | 
    @ApiModelProperty(value= "修改人员") 
 | 
    private Long updateBy; 
 | 
  
 | 
    /** 
 | 
     * 修改时间 
 | 
     */ 
 | 
    @ApiModelProperty(value= "修改时间") 
 | 
    private Date updateTime; 
 | 
  
 | 
    /** 
 | 
     * 备注 
 | 
     */ 
 | 
    @ApiModelProperty(value= "备注") 
 | 
    private String memo; 
 | 
  
 | 
    public Loc() {} 
 | 
  
 | 
    public Loc(String uuid,Long zoneId,String locNo,String name,Long code,Long locSts,Double offset,Integer row,Integer bay,Integer lev,String zpallet,Long locType,Integer status,Integer deleted,Long tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { 
 | 
        this.uuid = uuid; 
 | 
        this.zoneId = zoneId; 
 | 
        this.locNo = locNo; 
 | 
        this.name = name; 
 | 
        this.code = code; 
 | 
        this.locSts = locSts; 
 | 
        this.offset = offset; 
 | 
        this.row = row; 
 | 
        this.bay = bay; 
 | 
        this.lev = lev; 
 | 
        this.zpallet = zpallet; 
 | 
        this.locType = locType; 
 | 
        this.status = status; 
 | 
        this.deleted = deleted; 
 | 
        this.tenantId = tenantId; 
 | 
        this.createBy = createBy; 
 | 
        this.createTime = createTime; 
 | 
        this.updateBy = updateBy; 
 | 
        this.updateTime = updateTime; 
 | 
        this.memo = memo; 
 | 
    } 
 | 
  
 | 
//    Loc loc = new Loc( 
 | 
//            null,    // 编号 
 | 
//            null,    // 库区 
 | 
//            null,    // 库位编号 
 | 
//            null,    // 名称 
 | 
//            null,    // 条码 
 | 
//            null,    // 库位状态 
 | 
//            null,    // 偏移量 
 | 
//            null,    // 排 
 | 
//            null,    // 列 
 | 
//            null,    // 层 
 | 
//            null,    // 托盘码 
 | 
//            null,    // 库位类型 
 | 
//            null,    // 状态[非空] 
 | 
//            null,    // 是否删除[非空] 
 | 
//            null,    // 租户 
 | 
//            null,    // 添加人员 
 | 
//            null,    // 添加时间[非空] 
 | 
//            null,    // 修改人员 
 | 
//            null,    // 修改时间 
 | 
//            null    // 备注 
 | 
//    ); 
 | 
  
 | 
    public String getZoneId$(){ 
 | 
        ZoneService service = SpringUtils.getBean(ZoneService.class); 
 | 
        Zone zone = service.getById(this.zoneId); 
 | 
        if (!Cools.isEmpty(zone)){ 
 | 
            return String.valueOf(zone.getName()); 
 | 
        } 
 | 
        return null; 
 | 
    } 
 | 
  
 | 
    public String getCode$(){ 
 | 
        CodeService service = SpringUtils.getBean(CodeService.class); 
 | 
        Code code = service.getById(this.code); 
 | 
        if (!Cools.isEmpty(code)){ 
 | 
            return String.valueOf(code.getData()); 
 | 
        } 
 | 
        return null; 
 | 
    } 
 | 
  
 | 
    public String getLocSts$(){ 
 | 
        LocStsService service = SpringUtils.getBean(LocStsService.class); 
 | 
        LocSts locSts = service.getById(this.locSts); 
 | 
        if (!Cools.isEmpty(locSts)){ 
 | 
            return String.valueOf(locSts.getName()); 
 | 
        } 
 | 
        return null; 
 | 
    } 
 | 
  
 | 
    public String getLocStsEl(){ 
 | 
        LocStsService service = SpringUtils.getBean(LocStsService.class); 
 | 
        LocSts locSts = service.getById(this.locSts); 
 | 
        if (!Cools.isEmpty(locSts)){ 
 | 
            return String.valueOf(locSts.getUuid()); 
 | 
        } 
 | 
        return null; 
 | 
    } 
 | 
  
 | 
    public String getLocType$(){ 
 | 
        LocTypeService service = SpringUtils.getBean(LocTypeService.class); 
 | 
        LocType locType = service.getById(this.locType); 
 | 
        if (!Cools.isEmpty(locType)){ 
 | 
            return String.valueOf(locType.getName()); 
 | 
        } 
 | 
        return null; 
 | 
    } 
 | 
  
 | 
    public String getStatus$(){ 
 | 
        if (null == this.status){ return null; } 
 | 
        switch (this.status){ 
 | 
            case 1: 
 | 
                return "正常"; 
 | 
            case 0: 
 | 
                return "冻结"; 
 | 
            default: 
 | 
                return String.valueOf(this.status); 
 | 
        } 
 | 
    } 
 | 
  
 | 
  
 | 
  
 | 
    public String getCompDirect$(){ 
 | 
        if (null == this.compDirect){ return null; } 
 | 
        switch (this.compDirect){ 
 | 
            case 1: 
 | 
                return "大于"; 
 | 
            case 0: 
 | 
                return "小于"; 
 | 
            default: 
 | 
                return String.valueOf(this.deleted); 
 | 
        } 
 | 
    } 
 | 
  
 | 
    public Boolean getStatusBool(){ 
 | 
        if (null == this.status){ return null; } 
 | 
        switch (this.status){ 
 | 
            case 1: 
 | 
                return true; 
 | 
            case 0: 
 | 
                return false; 
 | 
            default: 
 | 
                return null; 
 | 
        } 
 | 
    } 
 | 
  
 | 
} 
 |