package com.zy.asrs.entity; 
 | 
  
 | 
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; 
 | 
import com.baomidou.mybatisplus.enums.IdType; 
 | 
import com.baomidou.mybatisplus.annotations.TableField; 
 | 
import java.text.SimpleDateFormat; 
 | 
import java.util.Date; 
 | 
  
 | 
import com.core.common.SnowflakeIdWorker; 
 | 
import org.springframework.format.annotation.DateTimeFormat; 
 | 
import java.text.SimpleDateFormat; 
 | 
import java.util.Date; 
 | 
import java.text.SimpleDateFormat; 
 | 
import java.util.Date; 
 | 
import com.core.common.SpringUtils; 
 | 
import com.zy.system.service.UserService; 
 | 
import com.zy.system.entity.User; 
 | 
  
 | 
import io.swagger.annotations.ApiModelProperty; 
 | 
import lombok.Data; 
 | 
import com.baomidou.mybatisplus.annotations.TableName; 
 | 
import java.io.Serializable; 
 | 
  
 | 
@Data 
 | 
@TableName("asr_bas_agv_mast") 
 | 
public class BasAgvMast implements Serializable { 
 | 
  
 | 
    private static final long serialVersionUID = 1L; 
 | 
  
 | 
    /** 
 | 
     * ID 
 | 
     */ 
 | 
    @ApiModelProperty(value= "ID") 
 | 
    @TableId(value = "id", type = IdType.AUTO) 
 | 
    private Long id; 
 | 
  
 | 
    /** 
 | 
     * WMS任务号 
 | 
     */ 
 | 
    @ApiModelProperty(value= "WMS任务号") 
 | 
    @TableField("task_no") 
 | 
    private Integer taskNo; 
 | 
  
 | 
    /** 
 | 
     * RGV任务号 
 | 
     */ 
 | 
    @ApiModelProperty(value= "RGV任务号") 
 | 
    private Long timestamp; 
 | 
  
 | 
    /** 
 | 
     * 源站点 
 | 
     */ 
 | 
    @ApiModelProperty(value= "源站点") 
 | 
    @TableField("source_sta_no") 
 | 
    private Integer sourceStaNo; 
 | 
  
 | 
    /** 
 | 
     * 目的站点 
 | 
     */ 
 | 
    @ApiModelProperty(value= "目的站点") 
 | 
    @TableField("sta_no") 
 | 
    private Integer staNo; 
 | 
  
 | 
    /** 
 | 
     * 源库位 
 | 
     */ 
 | 
    @ApiModelProperty(value= "源库位") 
 | 
    @TableField("source_loc_no") 
 | 
    private String sourceLocNo; 
 | 
  
 | 
    /** 
 | 
     * 目的库位 
 | 
     */ 
 | 
    @ApiModelProperty(value= "目的库位") 
 | 
    @TableField("loc_no") 
 | 
    private String locNo; 
 | 
  
 | 
    /** 
 | 
     * 优先级 
 | 
     */ 
 | 
    @ApiModelProperty(value= "优先级") 
 | 
    private Long priority; 
 | 
  
 | 
    /** 
 | 
     * 楼层 
 | 
     */ 
 | 
    @ApiModelProperty(value= "楼层") 
 | 
    @TableField("floor_no") 
 | 
    private Integer floorNo; 
 | 
  
 | 
    /** 
 | 
     * 状态 0: 初始  1: 作业中  2: 完成   
 | 
     */ 
 | 
    @ApiModelProperty(value= "状态 0: 初始  1: 作业中  2: 完成  ") 
 | 
    private Integer status; 
 | 
  
 | 
    /** 
 | 
     * 异常时间 
 | 
     */ 
 | 
    @ApiModelProperty(value= "异常时间") 
 | 
    @TableField("error_time") 
 | 
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
 | 
    private Date errorTime; 
 | 
  
 | 
    /** 
 | 
     * 异常信息 
 | 
     */ 
 | 
    @ApiModelProperty(value= "异常信息") 
 | 
    @TableField("error_memo") 
 | 
    private String errorMemo; 
 | 
  
 | 
    /** 
 | 
     * 添加时间 
 | 
     */ 
 | 
    @ApiModelProperty(value= "添加时间") 
 | 
    @TableField("appe_time") 
 | 
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
 | 
    private Date appeTime; 
 | 
  
 | 
    /** 
 | 
     * 修改时间 
 | 
     */ 
 | 
    @ApiModelProperty(value= "修改时间") 
 | 
    @TableField("modi_time") 
 | 
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
 | 
    private Date modiTime; 
 | 
  
 | 
    /** 
 | 
     * 修改人员 
 | 
     */ 
 | 
    @ApiModelProperty(value= "修改人员") 
 | 
    @TableField("modi_user") 
 | 
    private String modiUser; 
 | 
  
 | 
    @ApiModelProperty(value= "输送PLCId") 
 | 
    @TableField("devp_id") 
 | 
    private Integer devpId; 
 | 
  
 | 
    @ApiModelProperty(value= "任务类型") 
 | 
    @TableField("io_type") 
 | 
    private Integer ioType; 
 | 
  
 | 
    public BasAgvMast() { 
 | 
        SnowflakeIdWorker snowflakeIdWorker = SpringUtils.getBean(SnowflakeIdWorker.class); 
 | 
        this.timestamp = snowflakeIdWorker.nextId(); 
 | 
  
 | 
        this.priority = 1L; 
 | 
        this.status = 0; 
 | 
  
 | 
        Date now = new Date(); 
 | 
        this.appeTime = now; 
 | 
        this.modiTime = now; 
 | 
    } 
 | 
  
 | 
    public BasAgvMast(Integer taskNo,Long timestamp,Integer sourceStaNo,Integer staNo,String sourceLocNo,String locNo,Long priority,Integer floorNo,Integer status,Date errorTime,String errorMemo,Date appeTime,Date modiTime,String modiUser) { 
 | 
        this.taskNo = taskNo; 
 | 
        this.timestamp = timestamp; 
 | 
        this.sourceStaNo = sourceStaNo; 
 | 
        this.staNo = staNo; 
 | 
        this.sourceLocNo = sourceLocNo; 
 | 
        this.locNo = locNo; 
 | 
        this.priority = priority; 
 | 
        this.floorNo = floorNo; 
 | 
        this.status = status; 
 | 
        this.errorTime = errorTime; 
 | 
        this.errorMemo = errorMemo; 
 | 
        this.appeTime = appeTime; 
 | 
        this.modiTime = modiTime; 
 | 
        this.modiUser = modiUser; 
 | 
    } 
 | 
  
 | 
//    BasAgvMast basAgvMast = new BasAgvMast( 
 | 
//            null,    // WMS任务号[非空] 
 | 
//            null,    // RGV任务号 
 | 
//            null,    // 源站点 
 | 
//            null,    // 目的站点 
 | 
//            null,    // 源库位 
 | 
//            null,    // 目的库位 
 | 
//            null,    // 优先级 
 | 
//            null,    // 楼层 
 | 
//            null,    // 状态 
 | 
//            null,    // 异常时间 
 | 
//            null,    // 异常信息 
 | 
//            null,    // 添加时间 
 | 
//            null,    // 修改时间 
 | 
//            null    // 修改人员 
 | 
//    ); 
 | 
  
 | 
    public String getStatus$(){ 
 | 
        if (null == this.status){ return null; } 
 | 
        switch (this.status){ 
 | 
            case 0: 
 | 
                return "初始"; 
 | 
            case 1: 
 | 
                return "作业中"; 
 | 
            case 2: 
 | 
                return "完成"; 
 | 
            default: 
 | 
                return String.valueOf(this.status); 
 | 
        } 
 | 
    } 
 | 
  
 | 
  
 | 
} 
 |