package com.northglass.entity;
|
|
import javax.persistence.Entity;
|
import javax.persistence.JoinColumn;
|
import javax.persistence.ManyToOne;
|
import javax.persistence.Table;
|
import javax.persistence.Transient;
|
|
import net.sf.json.JSONObject;
|
|
@Entity
|
@Table(name = "gmms_glass")
|
public class Glass extends IdEntity {
|
|
private int glassId;
|
// private String manufactureId;
|
// private int processSequence;
|
|
private double startlength;// 起始宽度
|
private double startwidth;// 起始高度
|
|
private double length;// 宽度
|
private double width;// 高度
|
private double thickness;// 单片名称 包含厚度和颜色。这里分开定义,先定义一个厚度
|
private String color;// 颜色
|
private String customer;// 客户名称
|
// private String manufacturer;
|
// private String comment;
|
private String state;
|
private String groups;
|
private String apart_id;// 流程卡号
|
private String manufacture_batch;// 批次编号
|
private int pieces;// 数量
|
private int completePieces;// 完成数量
|
private int damagePieces;// 破损数量
|
private int arrangePieces;
|
private String arrangeStatu;
|
// 新加,物品归处
|
private String thingsout;
|
// flag更新标志位
|
private int flag;
|
|
private RawPackageTxt rawPackageTxt;
|
|
// 新加字段
|
private String application;// 项目名称
|
private String production;// 成品名称
|
private String floor_number;// 楼层编号
|
private String order_number;// 订单序号
|
private String piece_sign;// 片标记
|
private String remark;// 明细备注
|
private String sendState;// 发送1状态
|
private String sendStates;// 发送2状态
|
|
private int sort;// 单架序号
|
|
public Glass() {
|
}
|
|
public Glass(String arrangeStatu, int glassId, double length, double width, double thickness, String color,
|
String customer, String state, String groups, String apart_id, String manufacture_batch, int pieces,
|
int completePieces, int damagePieces, RawPackageTxt rawPackageTxt) {
|
super();
|
this.arrangeStatu = arrangeStatu;
|
this.glassId = glassId;
|
this.length = length;
|
this.width = width;
|
this.thickness = thickness;
|
this.color = color;
|
this.customer = customer;
|
this.state = state;
|
this.groups = groups;
|
this.apart_id = apart_id;
|
this.manufacture_batch = manufacture_batch;
|
this.pieces = pieces;
|
this.completePieces = completePieces;
|
this.damagePieces = damagePieces;
|
this.rawPackageTxt = rawPackageTxt;
|
}
|
|
public Glass(String arrangeStatu, int glassId, double length, double width, double thickness, String color,
|
String customer, String state, String groups, String apart_id, String manufacture_batch, int pieces,
|
int completePieces, int damagePieces, RawPackageTxt rawPackageTxt, String application, String production,
|
String floor_number, String order_number, String piece_sign, String remark, String sendState,
|
String sendStates) {
|
super();
|
this.arrangeStatu = arrangeStatu;
|
this.glassId = glassId;
|
this.length = length;
|
this.width = width;
|
this.thickness = thickness;
|
this.color = color;
|
this.customer = customer;
|
this.state = state;
|
this.groups = groups;
|
this.apart_id = apart_id;
|
this.manufacture_batch = manufacture_batch;
|
this.pieces = pieces;
|
this.completePieces = completePieces;
|
this.damagePieces = damagePieces;
|
this.rawPackageTxt = rawPackageTxt;
|
this.application = application;
|
this.production = production;
|
this.floor_number = floor_number;
|
this.order_number = order_number;
|
this.piece_sign = piece_sign;
|
this.remark = remark;
|
this.sendState = sendState;
|
this.sendStates = sendStates;
|
}
|
|
@ManyToOne
|
@JoinColumn(name = "raw_package_txt_id")
|
public RawPackageTxt getRawPackageTxt() {
|
return rawPackageTxt;
|
}
|
|
public void setRawPackageTxt(RawPackageTxt rawPackageTxt) {
|
this.rawPackageTxt = rawPackageTxt;
|
}
|
|
public String getThingsout() {
|
return thingsout;
|
}
|
|
public void setThingsout(String thingsout) {
|
this.thingsout = thingsout;
|
}
|
|
public int getGlassId() {
|
return glassId;
|
}
|
|
public void setGlassId(int glassId) {
|
this.glassId = glassId;
|
}
|
|
public double getLength() {
|
return length;
|
}
|
|
public void setLength(double length) {
|
this.length = length;
|
}
|
|
public double getWidth() {
|
return width;
|
}
|
|
public void setWidth(double width) {
|
this.width = width;
|
}
|
|
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 String getCustomer() {
|
return customer;
|
}
|
|
public void setCustomer(String customer) {
|
this.customer = customer;
|
}
|
|
public String getState() {
|
return state;
|
}
|
|
public void setState(String state) {
|
this.state = state;
|
}
|
|
public String getGroups() {
|
return groups;
|
}
|
|
public void setGroups(String groups) {
|
this.groups = groups;
|
}
|
|
public String getApart_id() {
|
return apart_id;
|
}
|
|
public void setApart_id(String apart_id) {
|
this.apart_id = apart_id;
|
}
|
|
public String getManufacture_batch() {
|
return manufacture_batch;
|
}
|
|
public void setManufacture_batch(String manufacture_batch) {
|
this.manufacture_batch = manufacture_batch;
|
}
|
|
public int getPieces() {
|
return pieces;
|
}
|
|
public void setPieces(int pieces) {
|
this.pieces = pieces;
|
}
|
|
public int getCompletePieces() {
|
return completePieces;
|
}
|
|
public int getDamagePieces() {
|
return damagePieces;
|
}
|
|
public void setDamagePieces(int damagePieces) {
|
this.damagePieces = damagePieces;
|
}
|
|
public void setCompletePieces(int completePieces) {
|
this.completePieces = completePieces;
|
}
|
|
public String getApplication() {
|
return application;
|
}
|
|
public void setApplication(String application) {
|
this.application = application;
|
}
|
|
public String getProduction() {
|
return production;
|
}
|
|
public void setProduction(String production) {
|
this.production = production;
|
}
|
|
public double getStartlength() {
|
return startlength;
|
}
|
|
public void setStartlength(double startlength) {
|
this.startlength = startlength;
|
}
|
|
public double getStartwidth() {
|
return startwidth;
|
}
|
|
public void setStartwidth(double startwidth) {
|
this.startwidth = startwidth;
|
}
|
|
public String getFloor_number() {
|
return floor_number;
|
}
|
|
public void setFloor_number(String floor_number) {
|
this.floor_number = floor_number;
|
}
|
|
public String getOrder_number() {
|
return order_number;
|
}
|
|
public void setOrder_number(String order_number) {
|
this.order_number = order_number;
|
}
|
|
public String getPiece_sign() {
|
return piece_sign;
|
}
|
|
public void setPiece_sign(String piece_sign) {
|
this.piece_sign = piece_sign;
|
}
|
|
public String getRemark() {
|
return remark;
|
}
|
|
public void setRemark(String remark) {
|
this.remark = remark;
|
}
|
|
public int getArrangePieces() {
|
return arrangePieces;
|
}
|
|
public void setArrangePieces(int arrangePieces) {
|
this.arrangePieces = arrangePieces;
|
}
|
|
public String getArrangeStatu() {
|
return arrangeStatu;
|
}
|
|
public void setArrangeStatu(String arrangeStatu) {
|
this.arrangeStatu = arrangeStatu;
|
}
|
|
public String getSendState() {
|
return sendState;
|
}
|
|
public void setSendState(String sendState) {
|
this.sendState = sendState;
|
}
|
|
public String getSendStates() {
|
return sendStates;
|
}
|
|
public void setSendStates(String sendStates) {
|
this.sendStates = sendStates;
|
}
|
|
public int getFlag() {
|
return flag;
|
}
|
|
public void setFlag(int flag) {
|
this.flag = flag;
|
}
|
|
public int getSort() {
|
return sort;
|
}
|
|
public void setSort(int sort) {
|
this.sort = sort;
|
}
|
|
@Transient
|
public String getDescription() {
|
return " [" + this.thickness + "mm " + this.length + "*" + this.width + "mm] " + " " + this.completePieces + "/"
|
+ this.pieces;
|
}
|
// json
|
|
public String tojsonString() {
|
JSONObject jsonObject = new JSONObject();
|
jsonObject.put("glassId", glassId);
|
jsonObject.put("length", length);
|
jsonObject.put("width", width);
|
jsonObject.put("thickness", thickness);
|
jsonObject.put("color", color);
|
jsonObject.put("customer", customer);
|
jsonObject.put("apart_id", apart_id);
|
jsonObject.put("manufacture_batch", manufacture_batch);
|
jsonObject.put("pieces", pieces);
|
jsonObject.put("arrangePieces", arrangePieces);
|
jsonObject.put("arrangeStatu", arrangeStatu);
|
jsonObject.put("thingsout", thingsout);
|
jsonObject.put("application", application);
|
jsonObject.put("production", production);
|
jsonObject.put("floor_number", floor_number);
|
jsonObject.put("order_number", order_number);
|
jsonObject.put("piece_sign", piece_sign);
|
jsonObject.put("remark", remark);
|
jsonObject.put("sort", sort);
|
|
// return "[glassId=" + glassId + ", length=" + length + ", width=" + width
|
// + ", thickness=" + thickness + ", color=" + color + ", customer=" + customer + ", apart_id="
|
// + apart_id + ", manufacture_batch=" + manufacture_batch + ", pieces=" + pieces+", arrangePieces=" + arrangePieces+", arrangeStatu="
|
// + arrangeStatu+", thingsout=" + thingsout+", application=" + application+", production=" + production+", floor_number="
|
// + floor_number+", order_number=" + order_number+", piece_sign=" + piece_sign+", remark=" + remark + ", sort=" + sort + "]";
|
return jsonObject.toString();
|
|
}
|
}
|