package com.dev.swms.server.model.shipping;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

import com.dev.swms.server.model.base.BoxModel;
import com.dev.swms.server.model.base.Location;
import com.dev.swms.server.model.base.Warehouse;
import com.dev.swms.server.model.inventory.Task;
import com.dev.energy.server.model.Entity;

public class CageInfo extends Entity {
	private static final long serialVersionUID = 5463623040381064878L;
	//仓库
	private Warehouse warehouse;
	//代码
	private String code;
	//波次
	private WaveDoc waveDoc;
	//箱型
	private BoxModel boxModel;
	//发货月台
	private Location dock;
	//创建日期
	private Date createDate;
	//描述
	private String descriptions;
	
	private String shipToName;//收获客户
	
	private double volumn;
	
	private double weight;
	
	private Set<Task> tasks = new HashSet<Task>();
	//是否笼车
	private boolean beCage = true;
	//是否已经加入BOL，避免重复统计
	private boolean hasBOL;
	
	public boolean isHasBOL() {
		return hasBOL;
	}
	public void setHasBOL(boolean hasBOL) {
		this.hasBOL = hasBOL;
	}
	public String getShipToName() {
		return shipToName;
	}
	public void setShipToName(String shipToName) {
		this.shipToName = shipToName;
	}
	public boolean isBeCage() {
		return beCage;
	}
	public void setBeCage(boolean beCage) {
		this.beCage = beCage;
	}
	public Set<Task> getTasks() {
		return tasks;
	}
	public void setTasks(Set<Task> tasks) {
		this.tasks = tasks;
	}
	public int hashCode() {
		return new HashCodeBuilder().append(warehouse).append(code)
				.toHashCode();
	}
	public boolean equals(final Object other) {
		if (!(other instanceof CageInfo))
			return false;
		CageInfo castOther = (CageInfo) other;
		return new EqualsBuilder().append(warehouse, castOther.warehouse)
				.append(code, castOther.code).isEquals();
	}
	public Warehouse getWarehouse() {
		return warehouse;
	}
	public void setWarehouse(Warehouse warehouse) {
		this.warehouse = warehouse;
	}
	public BoxModel getBoxModel() {
		return boxModel;
	}
	public void setBoxModel(BoxModel boxModel) {
		this.boxModel = boxModel;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public String getDescriptions() {
		return descriptions;
	}
	public void setDescriptions(String descriptions) {
		this.descriptions = descriptions;
	}
	public Location getDock() {
		return dock;
	}
	public void setDock(Location dock) {
		this.dock = dock;
	}
	
	public WaveDoc getWaveDoc() {
		return waveDoc;
	}
	public void setWaveDoc(WaveDoc waveDoc) {
		this.waveDoc = waveDoc;
	}
	public double getVolumn() {
		return volumn;
	}
	public void setVolumn(double volumn) {
		this.volumn = volumn;
	}
	public double getWeight() {
		return weight;
	}
	public void setWeight(double weight) {
		this.weight = weight;
	}
	
	
}
