| package com.zy.asrs.common.wms.entity; | 
|   | 
| import java.text.SimpleDateFormat; | 
| import java.util.Date; | 
|   | 
| import com.zy.asrs.common.wms.service.MatService; | 
| import org.springframework.format.annotation.DateTimeFormat; | 
| import java.text.SimpleDateFormat; | 
| import java.util.Date; | 
|   | 
| import com.baomidou.mybatisplus.annotation.IdType; | 
| import com.baomidou.mybatisplus.annotation.TableId; | 
| import com.baomidou.mybatisplus.annotation.TableLogic; | 
| import com.baomidou.mybatisplus.annotation.TableName; | 
| import io.swagger.annotations.ApiModel; | 
| import io.swagger.annotations.ApiModelProperty; | 
| import lombok.Data; | 
| import com.zy.asrs.framework.common.Cools; | 
| import com.zy.asrs.framework.common.SpringUtils; | 
| import com.zy.asrs.common.sys.entity.User; | 
| import com.zy.asrs.common.sys.entity.Host; | 
| import com.zy.asrs.common.sys.service.UserService; | 
| import com.zy.asrs.common.sys.service.HostService; | 
|   | 
| import java.io.Serializable; | 
| import java.util.Date; | 
|   | 
| @Data | 
| @TableName("wms_prior") | 
| public class Prior 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 String name; | 
|   | 
|     /** | 
|      * 关联商品 | 
|      */ | 
|     @ApiModelProperty(value= "关联商品") | 
|     private Long matId; | 
|   | 
|     /** | 
|      * 商品编号 | 
|      */ | 
|     @ApiModelProperty(value= "商品编号") | 
|     private String matnr; | 
|   | 
|     /** | 
|      * 商品名称 | 
|      */ | 
|     @ApiModelProperty(value= "商品名称") | 
|     private String maktx; | 
|   | 
|     /** | 
|      * 库位号 | 
|      */ | 
|     @ApiModelProperty(value= "库位号") | 
|     private String locNo; | 
|   | 
|     /** | 
|      * 安全库存 | 
|      */ | 
|     @ApiModelProperty(value= "安全库存") | 
|     private Double safeQua; | 
|   | 
|     /** | 
|      * 优先级 | 
|      */ | 
|     @ApiModelProperty(value= "优先级") | 
|     private Integer prio; | 
|   | 
|     /** | 
|      * 条码 | 
|      */ | 
|     @ApiModelProperty(value= "条码") | 
|     private String barcode; | 
|   | 
|     /** | 
|      * 状态 1: 正常  0: 禁用   | 
|      */ | 
|     @ApiModelProperty(value= "状态 1: 正常  0: 禁用  ") | 
|     private Integer status; | 
|   | 
|     /** | 
|      * 添加人员 | 
|      */ | 
|     @ApiModelProperty(value= "添加人员") | 
|     private Long createBy; | 
|   | 
|     /** | 
|      * 添加时间 | 
|      */ | 
|     @ApiModelProperty(value= "添加时间") | 
|     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|     private Date createTime; | 
|   | 
|     /** | 
|      * 修改人员 | 
|      */ | 
|     @ApiModelProperty(value= "修改人员") | 
|     private Long updateBy; | 
|   | 
|     /** | 
|      * 修改时间 | 
|      */ | 
|     @ApiModelProperty(value= "修改时间") | 
|     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|     private Date updateTime; | 
|   | 
|     /** | 
|      * 备注 | 
|      */ | 
|     @ApiModelProperty(value= "备注") | 
|     private String memo; | 
|   | 
|     /** | 
|      * 仓库ID | 
|      */ | 
|     @ApiModelProperty(value= "仓库ID") | 
|     private Long hostId; | 
|   | 
|     public Prior() {} | 
|   | 
|     public Prior(String uuid,String name,Long matId,String matnr,String maktx,String locNo,Double safeQua,Integer prio,String barcode,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { | 
|         this.uuid = uuid; | 
|         this.name = name; | 
|         this.matId = matId; | 
|         this.matnr = matnr; | 
|         this.maktx = maktx; | 
|         this.locNo = locNo; | 
|         this.safeQua = safeQua; | 
|         this.prio = prio; | 
|         this.barcode = barcode; | 
|         this.status = status; | 
|         this.createBy = createBy; | 
|         this.createTime = createTime; | 
|         this.updateBy = updateBy; | 
|         this.updateTime = updateTime; | 
|         this.memo = memo; | 
|     } | 
|   | 
| //    Prior prior = new Prior( | 
| //            null,    // 编号 | 
| //            null,    // 推荐名 | 
| //            null,    // 关联商品[非空] | 
| //            null,    // 商品编号 | 
| //            null,    // 商品名称 | 
| //            null,    // 关联货位[非空] | 
| //            null,    // 货位名称 | 
| //            null,    // 安全库存 | 
| //            null,    // 优先级 | 
| //            null,    // 条码 | 
| //            null,    // 状态 | 
| //            null,    // 添加人员 | 
| //            null,    // 添加时间 | 
| //            null,    // 修改人员 | 
| //            null,    // 修改时间 | 
| //            null    // 备注 | 
| //    ); | 
|   | 
|     public String getMatId$(){ | 
|         MatService service = SpringUtils.getBean(MatService.class); | 
|         Mat mat = service.getById(this.matId); | 
|         if (!Cools.isEmpty(mat)){ | 
|             return String.valueOf(mat.getId()); | 
|         } | 
|         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 getCreateBy$(){ | 
|         UserService service = SpringUtils.getBean(UserService.class); | 
|         User user = service.getById(this.createBy); | 
|         if (!Cools.isEmpty(user)){ | 
|             return String.valueOf(user.getNickname()); | 
|         } | 
|         return null; | 
|     } | 
|   | 
|     public String getCreateTime$(){ | 
|         if (Cools.isEmpty(this.createTime)){ | 
|             return ""; | 
|         } | 
|         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); | 
|     } | 
|   | 
|     public String getUpdateBy$(){ | 
|         UserService service = SpringUtils.getBean(UserService.class); | 
|         User user = service.getById(this.updateBy); | 
|         if (!Cools.isEmpty(user)){ | 
|             return String.valueOf(user.getNickname()); | 
|         } | 
|         return null; | 
|     } | 
|   | 
|     public String getUpdateTime$(){ | 
|         if (Cools.isEmpty(this.updateTime)){ | 
|             return ""; | 
|         } | 
|         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); | 
|     } | 
|   | 
|   | 
| } |