package com.zy.asrs.entity;
|
|
import com.baomidou.mybatisplus.annotations.TableField;
|
import com.baomidou.mybatisplus.annotations.TableId;
|
import com.baomidou.mybatisplus.annotations.TableName;
|
import com.baomidou.mybatisplus.enums.IdType;
|
import com.core.common.Cools;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
import java.io.Serializable;
|
import java.text.SimpleDateFormat;
|
import java.util.Date;
|
|
@Data
|
@TableName("\"SOURCE\".\"asr_wrk_mast_sta\"")
|
public class WrkMastSta implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* ID
|
*/
|
@ApiModelProperty(value= "ID")
|
@TableId(value = "ID", type = IdType.AUTO)
|
private Long id;
|
|
/**
|
* 工作号
|
*/
|
@ApiModelProperty(value= "工作号")
|
@TableField("WRK_NO")
|
private Long wrkNo;
|
|
/**
|
* 工作档开始位置
|
*/
|
@ApiModelProperty(value= "工作档开始位置")
|
@TableField("WRK_START")
|
private Integer wrkStart;
|
|
/**
|
* 工作档结束位置
|
*/
|
@ApiModelProperty(value= "工作档结束位置")
|
@TableField("WRK_END")
|
private Integer wrkEnd;
|
|
/**
|
* 小车接货位置
|
*/
|
@ApiModelProperty(value= "小车接货位置")
|
@TableField("STA_START")
|
private Integer staStart;
|
|
/**
|
* 小车放货位置
|
*/
|
@ApiModelProperty(value= "小车放货位置")
|
@TableField("STA_END")
|
private Integer staEnd;
|
|
/**
|
* 添加时间
|
*/
|
@ApiModelProperty(value= "添加时间")
|
@TableField("CREATE_TIME")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date createTime;
|
|
/**
|
* 修改时间
|
*/
|
@ApiModelProperty(value= "修改时间")
|
@TableField("UPDATE_TIME")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date updateTime;
|
|
/**
|
* 类型 0:非空 1:空板
|
*/
|
@ApiModelProperty(value= "类型 1:满版 2:空板")
|
@TableField("TYPE")
|
private Integer type;
|
|
/**
|
* 工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成
|
*/
|
@ApiModelProperty(value= "工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成")
|
@TableField("WRK_STS")
|
private Integer wrkSts;
|
|
/**
|
* 行号
|
*/
|
@ApiModelProperty(value= "行号")
|
@TableField("LINE_NUMBER")
|
private Integer lineNumber;
|
|
/**
|
* 工作类型
|
*/
|
@ApiModelProperty(value= "工作类型 1:取(叠盘) 2:拆盘 5:满取 6:满放")
|
@TableField("WRK_TYPE")
|
private Integer wrkType;
|
|
/**
|
* 工作类型
|
*/
|
@ApiModelProperty(value= "工作类型")
|
@TableField("WRK_CRN")
|
private Integer wrkCrn;
|
|
/**
|
* 标记时间
|
*/
|
@ApiModelProperty(value= "标记时间")
|
@TableField("BIGN_TIME")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date bignTime;
|
|
public WrkMastSta() {}
|
|
public WrkMastSta(Date now, Integer staStart) {
|
this.wrkNo = staStart.longValue()+19999;
|
this.wrkStart = staStart;
|
this.wrkEnd = staStart;
|
this.staStart = staStart;
|
this.staEnd = staStart;
|
this.createTime = now;
|
this.updateTime = now;
|
this.wrkSts = 0;
|
this.bignTime = now;
|
}
|
|
public WrkMastSta(Long wrkNo, Integer wrkStart, Integer wrkEnd, Integer staStart, Integer staEnd, Date createTime, Date updateTime, Integer type, Integer wrkSts, Integer lineNumber, Integer wrkType, Date bignTime) {
|
this.wrkNo = wrkNo;
|
this.wrkStart = wrkStart;
|
this.wrkEnd = wrkEnd;
|
this.staStart = staStart;
|
this.staEnd = staEnd;
|
this.createTime = createTime;
|
this.updateTime = updateTime;
|
this.type = type;
|
this.wrkSts = wrkSts;
|
this.lineNumber = lineNumber;
|
this.wrkType = wrkType;
|
this.bignTime = bignTime;
|
}
|
|
public Integer getStaEnd(Integer souSta) {
|
switch (souSta) {
|
case 100:
|
case 103:
|
case 106:
|
case 109:
|
case 112:
|
case 115:
|
return souSta + 1;
|
default:
|
return souSta;
|
}
|
}
|
|
// WrkMastSta wrkMastSta = new WrkMastSta(
|
// null, // 工作号[非空]
|
// null, // 工作档开始位置[非空]
|
// null, // 工作档结束位置[非空]
|
// null, // 小车接货位置[非空]
|
// null, // 小车放货位置[非空]
|
// null, // 添加时间
|
// null, // 修改时间
|
// null, // 类型 0:非空 1:空板[非空]
|
// null, // 工作状态 0:初始 1:等待小车取 2:等待小车放 3:完成[非空]
|
// null, // 行号[非空]
|
// null, // 工作类型[非空]
|
// null // 标记时间
|
// );
|
|
public String getCreateTime$(){
|
if (Cools.isEmpty(this.createTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
|
}
|
|
public String getUpdateTime$(){
|
if (Cools.isEmpty(this.updateTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
|
}
|
|
public String getBignTime$(){
|
if (Cools.isEmpty(this.bignTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.bignTime);
|
}
|
|
|
}
|