package com.northglass.entity;
|
|
import java.util.Date;
|
|
import javax.persistence.Entity;
|
import javax.persistence.JoinColumn;
|
import javax.persistence.ManyToOne;
|
import javax.persistence.Table;
|
import javax.persistence.Transient;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.northglass.constants.ShelfTaskType;
|
|
@Entity
|
@Table(name="gmms_shelf_task")
|
public class ShelfTask extends IdEntity{
|
|
private Long taskId;
|
private String taskType;
|
private String taskState;
|
private ShelfRack shelfRack;
|
private RawFile rawFile;
|
private long groups;
|
private String loadRack;
|
private Date startTime;
|
private Date finshTime;
|
|
//含有仓位和上片位的有参构造函数
|
/*public ShelfTask(String taskState, String taskType, Date startTime, ShelfRack shelfRack,
|
String loadRack) {
|
super();
|
this.taskState = taskState;
|
this.taskType = taskType;
|
this.startTime = startTime;
|
this.shelfRack = shelfRack;
|
this.loadRack = loadRack;
|
}*/
|
|
/*public MachineDispose(
|
Machines machine,
|
String plcFontType,
|
String plcFontValue,
|
String mesFontType,
|
String mesFontValue,
|
String returnValue,
|
String exeLogic,
|
String describ) {
|
this.machine=machine;
|
this.plcFontType=plcFontType;
|
this.plcFontValue=plcFontValue;
|
this.mesFontType=mesFontType;
|
this.mesFontValue=mesFontValue;
|
this.returnValue=returnValue;
|
this.exeLogic=exeLogic;
|
this.describ=describ;
|
}*/
|
|
|
public Long getTaskId() {
|
return taskId;
|
}
|
public void setTaskId(Long taskId) {
|
this.taskId = taskId;
|
}
|
public String getTaskState() {
|
return taskState;
|
}
|
public void setTaskState(String taskState) {
|
this.taskState = taskState;
|
}
|
public String getTaskType() {
|
return taskType;
|
}
|
public void setTaskType(String taskType) {
|
this.taskType = taskType;
|
}
|
|
public Long getGroups() {
|
return groups;
|
}
|
|
public void setGroups(Long groups) {
|
this.groups = groups;
|
}
|
|
|
|
public String getLoadRack() {
|
return loadRack;
|
}
|
|
public void setLoadRack(String loadRack) {
|
this.loadRack = loadRack;
|
}
|
|
public Date getStartTime() {
|
return startTime;
|
}
|
|
public void setStartTime(Date startTime) {
|
this.startTime = startTime;
|
}
|
|
public Date getFinshTime() {
|
return finshTime;
|
}
|
|
public void setFinshTime(Date finshTime) {
|
this.finshTime = finshTime;
|
}
|
|
@ManyToOne
|
@JoinColumn(name="file_id")
|
public RawFile getRawFile() {
|
return rawFile;
|
}
|
|
public void setRawFile(RawFile rawFile) {
|
this.rawFile = rawFile;
|
}
|
|
@ManyToOne
|
@JoinColumn(name="shelf_rack_id")
|
public ShelfRack getShelfRack() {
|
return shelfRack;
|
}
|
|
public void setShelfRack(ShelfRack shelfRack) {
|
this.shelfRack = shelfRack;
|
}
|
|
@Transient
|
@JsonIgnore
|
public String getDescription() {
|
String number=this.shelfRack==null?"":this.shelfRack.getNumber();//料架
|
String LoadRack=this.getLoadRack()==null?"":this.getLoadRack(); //上片工位/吊装工位
|
|
if (ShelfTaskType.DISPLAY_INFO.equals(this.taskType)) {
|
return "显示信息:从仓位【" + number + "】,到吊装位【"
|
+ LoadRack + "】";
|
}
|
|
if (ShelfTaskType.FROM_RANK_TO_HOIST.equals(this.taskType)) {
|
return "从仓位【" + number + "】到吊装位【" + LoadRack + "】";
|
}
|
|
if (ShelfTaskType.FROM_RANK_TO_HOIST1.equals(this.taskType)) {
|
return "从仓位【" + number + "】到上片位【" + LoadRack + "】";
|
}
|
|
if (ShelfTaskType.FROM_HOIST_TO_RANK1.equals(this.taskType)) {
|
return "从上片位【" + LoadRack + "】到仓位【" + number + "】";
|
}
|
if (ShelfTaskType.FROM_HOIST_TO_RANK.equals(this.taskType)) {
|
return "从吊装位【" + LoadRack + "】到仓位【" + number + "】";
|
}
|
|
|
/* if (ShelfTaskType.DISPLAY_INFO.equals(this.taskType)) {
|
return "显示信息:从仓位【" + this.shelfRack.getNumber() + "】,到吊装位【"
|
+ this.getLoadRack() + "】";//,玻璃信息【" + this.shelfRank.getRawPackage().getDescription() + "】";
|
}
|
|
if (ShelfTaskType.FROM_RANK_TO_HOIST.equals(this.taskType)) {
|
return "从仓位【" + this.shelfRack.getNumber() + "】到吊装位【" + this.getLoadRack() + "】";
|
}
|
|
if (ShelfTaskType.FROM_RANK_TO_HOIST1.equals(this.taskType)) {
|
return "从仓位【" + this.shelfRack.getNumber() + "】到上片位【" + this.getLoadRack() + "】";
|
}
|
|
if (ShelfTaskType.FROM_HOIST_TO_RANK1.equals(this.taskType)) {
|
return "从上片位【" + this.getLoadRack() + "】到仓位【" + this.shelfRack.getNumber() + "】";
|
}
|
if (ShelfTaskType.FROM_HOIST_TO_RANK.equals(this.taskType)) {
|
return "从吊装位【" + this.getLoadRack() + "】到仓位【" + this.shelfRack.getNumber() + "】";
|
}*/
|
|
|
|
return "无描述信息";
|
}
|
|
}
|