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

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.NewLotInfo;
import com.dev.swms.server.model.base.PackageUnit;
import com.dev.energy.server.model.Entity;

public class InventoryApplyDetail extends Entity {
	
//  补货单明细内容：补货单、货品、批次属性【LotInfo】、计划补货数量MU、包装 
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/** 补货申请单 */
	private InventoryApply inventoryApply;
	/** 具体商品 */
	private Item item;
	/** 批次属性 */
	private NewLotInfo newLotInfo;
	/** 计划补货数量 */
	private double planQuantity;
	/** 包装单位 */
	private PackageUnit packageUnit;
	
	@Override
	public boolean equals(final Object other) {
		if (!(other instanceof InventoryApplyDetail))
			return false;
		InventoryApplyDetail castOther = (InventoryApplyDetail) other;
		return new EqualsBuilder().append(inventoryApply,
				castOther.inventoryApply).append(item, castOther.item).append(
				newLotInfo, castOther.newLotInfo).append(packageUnit,
				castOther.packageUnit).isEquals();
	}

	@Override
	public int hashCode() {
		return new HashCodeBuilder().append(inventoryApply).append("|")
				.append(item).append("|")
				.append(newLotInfo).append("|")
				.append(packageUnit).toHashCode();
	}

	public double getPlanQuantity() {
		return planQuantity;
	}

	public void setPlanQuantity(double planQuantity) {
		this.planQuantity = planQuantity;
	}

	public InventoryApply getInventoryApply() {
		return inventoryApply;
	}

	public void setInventoryApply(InventoryApply inventoryApply) {
		this.inventoryApply = inventoryApply;
	}

	public Item getItem() {
		return item;
	}

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

	public NewLotInfo getNewLotInfo() {
		return newLotInfo;
	}

	public void setNewLotInfo(NewLotInfo newLotInfo) {
		this.newLotInfo = newLotInfo;
	}

	public PackageUnit getPackageUnit() {
		return packageUnit;
	}

	public void setPackageUnit(PackageUnit packageUnit) {
		this.packageUnit = packageUnit;
	}

}
