package com.northglass.entity;
|
|
import java.util.Date;
|
|
import javax.persistence.CascadeType;
|
import javax.persistence.Entity;
|
import javax.persistence.JoinColumn;
|
import javax.persistence.ManyToOne;
|
import javax.persistence.OneToOne;
|
import javax.persistence.Table;
|
import javax.persistence.Transient;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
@Entity
|
@Table(name="gmms_raw_package")
|
public class RawPackage extends IdEntity {
|
|
private String glassId;
|
private int pieces;
|
private String state;
|
private double width;
|
private double height;
|
private double thickness;
|
private String color;
|
private int leftPieces;
|
private String manufacturer;
|
private String comment;
|
private Date createTime;
|
|
//厂家信息
|
|
private ShelfRank shelfRank;
|
|
private RawPackageTxt rawPackageTxt;
|
|
public RawPackage() { }
|
|
@ManyToOne(cascade=CascadeType.REFRESH)
|
@JoinColumn(name="raw_package_txt_id")
|
public RawPackageTxt getRawPackageTxt() {
|
return rawPackageTxt;
|
}
|
|
public void setRawPackageTxt(RawPackageTxt rawPackageTxt) {
|
this.rawPackageTxt = rawPackageTxt;
|
}
|
|
@OneToOne(mappedBy="rawPackage")
|
public ShelfRank getShelfRank() {
|
return shelfRank;
|
}
|
|
public void setShelfRank(ShelfRank shelfRank) {
|
this.shelfRank = shelfRank;
|
}
|
|
public String getManufacturer() {
|
return manufacturer;
|
}
|
|
public void setManufacturer(String manufacturer) {
|
this.manufacturer = manufacturer;
|
}
|
|
public String getComment() {
|
return comment;
|
}
|
|
public void setComment(String comment) {
|
this.comment = comment;
|
}
|
|
public int getLeftPieces() {
|
return leftPieces;
|
}
|
|
public void setLeftPieces(int leftPieces) {
|
this.leftPieces = leftPieces;
|
}
|
|
public double getWidth() {
|
return width;
|
}
|
|
public void setWidth(double width) {
|
this.width = width;
|
}
|
|
public double getHeight() {
|
return height;
|
}
|
|
public void setHeight(double height) {
|
this.height = height;
|
}
|
|
public double getThickness() {
|
return thickness;
|
}
|
|
public void setThickness(double thickness) {
|
this.thickness = thickness;
|
}
|
|
public String getColor() {
|
return color;
|
}
|
|
public void setColor(String color) {
|
this.color = color;
|
}
|
|
public int getPieces() {
|
return pieces;
|
}
|
|
public void setPieces(int pieces) {
|
this.pieces = pieces;
|
}
|
|
public String getState() {
|
return state;
|
}
|
|
public void setState(String state) {
|
this.state = state;
|
}
|
|
public Date getCreateTime() {
|
return createTime;
|
}
|
|
public void setCreateTime(Date createTime) {
|
this.createTime = createTime;
|
}
|
|
public String getGlassId() {
|
return glassId;
|
}
|
|
|
public void setGlassId(String glassId) {
|
this.glassId = glassId;
|
}
|
|
|
|
public RawPackage(double width, double height, double thickness, String color) {
|
super();
|
this.width = width;
|
this.height = height;
|
this.thickness = thickness;
|
this.color = color;
|
}
|
|
|
|
|
public RawPackage(String glassId, int pieces, String state, double width, double height, double thickness,
|
String color, int leftPieces, String comment, Date createTime) {
|
super();
|
this.glassId = glassId;
|
this.pieces = pieces;
|
this.state = state;
|
this.width = width;
|
this.height = height;
|
this.thickness = thickness;
|
this.color = color;
|
this.leftPieces = leftPieces;
|
this.comment = comment;
|
this.createTime = createTime;
|
}
|
|
public RawPackage(String glassId, int pieces, String state, double width, double height, double thickness,
|
String color, int leftPieces, String comment, Date createTime,RawPackageTxt rawPackageTxt) {
|
super();
|
this.glassId = glassId;
|
this.pieces = pieces;
|
this.state = state;
|
this.width = width;
|
this.height = height;
|
this.thickness = thickness;
|
this.color = color;
|
this.leftPieces = leftPieces;
|
this.comment = comment;
|
this.createTime = createTime;
|
this.rawPackageTxt = rawPackageTxt;
|
}
|
|
public RawPackage(String glassId, int pieces, String state, double width, double height, double thickness,
|
String color, int leftPieces, String manufacturer, String comment, Date createTime) {
|
super();
|
this.glassId = glassId;
|
this.pieces = pieces;
|
this.state = state;
|
this.width = width;
|
this.height = height;
|
this.thickness = thickness;
|
this.color = color;
|
this.leftPieces = leftPieces;
|
this.manufacturer = manufacturer;
|
this.comment = comment;
|
this.createTime = createTime;
|
}
|
|
public RawPackage(String glassId, int pieces, double width, double height, double thickness, String color) {
|
super();
|
this.glassId = glassId;
|
this.pieces = pieces;
|
this.width = width;
|
this.height = height;
|
this.thickness = thickness;
|
this.color = color;
|
}
|
|
@Transient
|
@JsonIgnore
|
public String getDescription() {
|
return this.thickness + "mm "
|
+ this.width + "*" + this.height + "mm "
|
+ this.color + " " + this.leftPieces + "/" + this.pieces;
|
}
|
}
|