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

import java.util.Date;

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

import com.dev.swms.server.model.base.Item;
import com.dev.swms.server.model.base.Structure;
import com.dev.swms.server.model.base.Warehouse;
import com.dev.energy.server.model.Entity;

public class InventoryCount extends Entity {
	/** 所属仓库 */
	private Warehouse warehouse;
	
	private Date countDate;//日期
	
	private Structure company;//客户
	
	private String itemFeeType;//货品结算分类
	
	private Item item;//货品
	
	private Double quantity;//数量
	
	private Double weight;//重量
	
	private Double volume;//体积
	
	private Integer lpQty;//托数
	
	private boolean flag = false;//结算标志【已结算、未结算】
	
	
	public Integer getLpQty() {
		return lpQty;
	}

	public void setLpQty(Integer lpQty) {
		this.lpQty = lpQty;
	}

	public InventoryCount(Structure company,String itemFeeType,Item item,Double quantity,
			Double weight,Double volume,Long lpQty){
		this.company = company;
		this.itemFeeType = itemFeeType;
		this.item = item;
		this.quantity = quantity;
		this.weight = weight;
		this.volume = volume;
		this.lpQty = Integer.valueOf(lpQty.toString());
	}
	
	public InventoryCount(){
		
	}

	public int hashCode() {
		return new HashCodeBuilder().append(countDate).append(company).append(
				itemFeeType).append(item).toHashCode();
	}

	public boolean equals(final Object other) {
		if (!(other instanceof InventoryCount))
			return false;
		InventoryCount castOther = (InventoryCount) other;
		return new EqualsBuilder().append(countDate, castOther.countDate)
				.append(company, castOther.company).append(itemFeeType,
						castOther.itemFeeType).append(item, castOther.item)
				.isEquals();
	}

	public Date getCountDate() {
		return countDate;
	}

	public void setCountDate(Date countDate) {
		this.countDate = countDate;
	}

	public Structure getCompany() {
		return company;
	}

	public void setCompany(Structure company) {
		this.company = company;
	}

	public String getItemFeeType() {
		return itemFeeType;
	}

	public void setItemFeeType(String itemFeeType) {
		this.itemFeeType = itemFeeType;
	}

	public Item getItem() {
		return item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	public Double getQuantity() {
		return quantity;
	}

	public void setQuantity(Double quantity) {
		this.quantity = quantity;
	}

	public Double getVolume() {
		return volume;
	}

	public void setVolume(Double volume) {
		this.volume = volume;
	}

	public Double getWeight() {
		return weight;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	public boolean isFlag() {
		return flag;
	}

	public void setFlag(boolean flag) {
		this.flag = flag;
	}

	public Warehouse getWarehouse() {
		return warehouse;
	}

	public void setWarehouse(Warehouse warehouse) {
		this.warehouse = warehouse;
	}

}
