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

import java.util.Date;

import com.dev.swms.server.model.base.ItemKey;
import com.dev.swms.server.model.base.Warehouse;
import com.dev.energy.server.model.Entity;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 * 每日库存汇总
 */
public class StorageDaily extends Entity {
	/** 仓库 */
	private Warehouse warehouse;
	/** 商品 */
	private ItemKey itemKey;
	/** 汇总日期 */
	private Date computeDate;
	/** 汇总年度 */
	private int computeYear;
	/** 汇总月份 */
	private int computeMonth;
	/** 前日剩余 */
	private double previousQuantity;
	/** 当日入库 */
	private double inQuantity;
	/** 当日入库调整 */
//	private double inAdjustQuantity;
	/** 当日出库 */
	private double outQuantity;
	/** 当日出库调整 */
//	private double outAdjustQuantity;
	/** 当日出库退回 */
//	private double outBackQuantity;
	/** 当日库存调整 */
//	private double inventoryAdjustQuantity;
	/** 当日剩余 */
	private double leftQuantity;
	/** 加工消耗 */
	private double processDownQuantity;
	/** 加工上架 */
	private double processUpQuantity;
	/** 盘点调整 */
	private double countAdjustQuantity;
	/**货权转出*/
	private double companyTransOutQuantity;
	/**货权转入*/
	private double companyTransInQuantity;

	public double getCompanyTransInQuantity() {
		return companyTransInQuantity;
	}

	public void setCompanyTransInQuantity(double companyTransInQuantity) {
		this.companyTransInQuantity = companyTransInQuantity;
	}

	public double getCompanyTransOutQuantity() {
		return companyTransOutQuantity;
	}

	public void setCompanyTransOutQuantity(double companyTransOutQuantity) {
		this.companyTransOutQuantity = companyTransOutQuantity;
	}

	protected StorageDaily(){
		
	}
	
	public Date getComputeDate() {
		return computeDate;
	}
	public void setComputeDate(Date computeDate) {
		this.computeDate = computeDate;
	}
	/*public double getInAdjustQuantity() {
		return inAdjustQuantity;
	}
	public void setInAdjustQuantity(double inAdjustQuantity) {
		this.inAdjustQuantity = inAdjustQuantity;
	}*/
	public double getInQuantity() {
		return inQuantity;
	}
	public void setInQuantity(double inQuantity) {
		this.inQuantity = inQuantity;
	}
	/*public double getInventoryAdjustQuantity() {
		return inventoryAdjustQuantity;
	}
	public void setInventoryAdjustQuantity(double inventoryAdjustQuantity) {
		this.inventoryAdjustQuantity = inventoryAdjustQuantity;
	}*/
	public ItemKey getItemKey() {
		return itemKey;
	}
	public void setItemKey(ItemKey itemKey) {
		this.itemKey = itemKey;
	}
	public double getLeftQuantity() {
		return leftQuantity;
	}
	public void setLeftQuantity(double leftQuantity) {
		this.leftQuantity = leftQuantity;
	}
	/*public double getOutAdjustQuantity() {
		return outAdjustQuantity;
	}
	public void setOutAdjustQuantity(double outAdjustQuantity) {
		this.outAdjustQuantity = outAdjustQuantity;
	}*/
	public double getOutQuantity() {
		return outQuantity;
	}
	public void setOutQuantity(double outQuantity) {
		this.outQuantity = outQuantity;
	}
	public double getPreviousQuantity() {
		return previousQuantity;
	}
	public void setPreviousQuantity(double previousQuantity) {
		this.previousQuantity = previousQuantity;
	}
	public Warehouse getWarehouse() {
		return warehouse;
	}
	public void setWarehouse(Warehouse warehouse) {
		this.warehouse = warehouse;
	}
	/*public double getOutBackQuantity() {
		return outBackQuantity;
	}
	public void setOutBackQuantity(double outBackQuantity) {
		this.outBackQuantity = outBackQuantity;
	}*/
	public int getComputeMonth() {
		return computeMonth;
	}
	public void setComputeMonth(int computeMonth) {
		this.computeMonth = computeMonth;
	}
	public int getComputeYear() {
		return computeYear;
	}
	public void setComputeYear(int computeYear) {
		this.computeYear = computeYear;
	}
	
	public boolean equals(final Object other) {
		if (!(other instanceof StorageDaily))
			return false;
		StorageDaily castOther = (StorageDaily) other;
		return new EqualsBuilder().append(warehouse, castOther.getWarehouse())
				.append(itemKey, castOther.getItemKey())
				.append(computeDate,castOther.getComputeDate())
				.isEquals();
	}
	public int hashCode() {
		return new HashCodeBuilder().append(warehouse).append(itemKey).append(
				computeDate).toHashCode();
	}

	public double getProcessDownQuantity() {
		return processDownQuantity;
	}

	public void setProcessDownQuantity(double processDownQuantity) {
		this.processDownQuantity = processDownQuantity;
	}

	public double getProcessUpQuantity() {
		return processUpQuantity;
	}

	public void setProcessUpQuantity(double processUpQuantity) {
		this.processUpQuantity = processUpQuantity;
	}

	public double getCountAdjustQuantity() {
		return countAdjustQuantity;
	}

	public void setCountAdjustQuantity(double countAdjustQuantity) {
		this.countAdjustQuantity = countAdjustQuantity;
	}
}
