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.manager.manager.service.CodeService; import com.zy.acs.manager.manager.service.StaStsService; import com.zy.acs.manager.manager.service.StaTypeService; import com.zy.acs.manager.manager.service.ZoneService; import com.zy.acs.framework.common.Cools; import com.zy.acs.framework.common.SpringUtils; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; import java.util.Date; @Data @TableName("man_sta") public class Sta 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 staNo; /** * 名称 */ @ApiModelProperty(value= "名称") private String name; /** * 站类型 */ @ApiModelProperty(value= "站类型") private Long staType; /** * 条码 */ @ApiModelProperty(value= "条码") private Long code; /** * 偏移量 */ @ApiModelProperty(value= "偏移量") private Double offset; /** * 自动 */ @ApiModelProperty(value= "自动") private String autoing; /** * 有物 */ @ApiModelProperty(value= "有物") private String loading; /** * 可入 */ @ApiModelProperty(value= "可入") private String inEnable; /** * 可出 */ @ApiModelProperty(value= "可出") private String outEnable; /** * 托盘码 */ @ApiModelProperty(value= "托盘码") private String zpallet; /** * 站状态 */ @ApiModelProperty(value= "站状态") private Long staSts; /** * 状态 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 Sta() {} public Sta(String uuid,Long zoneId,String staNo,String name,Long staType,Long code,Double offset,String autoing,String loading,String inEnable,String outEnable,String zpallet,Long staSts,Integer status,Integer deleted,Long tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { this.uuid = uuid; this.zoneId = zoneId; this.staNo = staNo; this.name = name; this.staType = staType; this.code = code; this.offset = offset; this.autoing = autoing; this.loading = loading; this.inEnable = inEnable; this.outEnable = outEnable; this.zpallet = zpallet; this.staSts = staSts; this.status = status; this.deleted = deleted; this.tenantId = tenantId; this.createBy = createBy; this.createTime = createTime; this.updateBy = updateBy; this.updateTime = updateTime; this.memo = memo; } // Sta sta = new Sta( // null, // 编号 // 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 getStaType$(){ StaTypeService service = SpringUtils.getBean(StaTypeService.class); StaType staType = service.getById(this.staType); if (!Cools.isEmpty(staType)){ return String.valueOf(staType.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.getUuid()); } return null; } public String getStaSts$(){ StaStsService service = SpringUtils.getBean(StaStsService.class); StaSts staSts = service.getById(this.staSts); if (!Cools.isEmpty(staSts)){ return String.valueOf(staSts.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 Boolean getStatusBool(){ if (null == this.status){ return null; } switch (this.status){ case 1: return true; case 0: return false; default: return null; } } }