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

import com.dev.swms.server.model.base.Structure;
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 CompanyWorkRule extends Entity {
	private static final long serialVersionUID = -2397816278362845570L;
	/** 仓库 */
	private Warehouse warehouse;
	/** 货主 */
	private Structure company;
	/** 批次规则 */
	private LotRule lotRule;
	/** 周转方式 */
	private String companyTurnOverMode; 
	/** 盘点周期 */
	private int cycleDay = 0;
	/** 波次作业方式（默认、超商批拣） */
	private String pickBatchType;
	/** 货主分组：用于生成波次的时候使用，例如：货主A和货主B的分组相同，则两者的订单可以在一个波次中作业 */
	private String groupStr;
	/** 是否按收货日期生成批次号 */
	private boolean checkReceiveDate = false;
	/** 是否按收货单号生成批次号 */
	private boolean checkReceiveCode = false;
	/** 是否允许多收 */
	private boolean beRevLimit = false;
	/** 是否收货质检 */
	private boolean beAsnQuality = false;
	/** 是否允许现场更换上架库位 */
	private boolean beAllowed2ChangePutLoc = false;
	/** 是否允许现场更换拣货库位 */
	private boolean beAllowed2ChangePickLoc = false;
	/** 拣货自动补货 */
	private boolean batchPickingSupply = false;
	/** 是否允许拆托分配 */
	private boolean beAllowedSplitLPForAllocate = false;
	/** 是否允许拆包装分配 */
	private boolean beAllowedSplitPUForAllocate = false;
	/** 是否按单包箱 */
	private boolean bePackagedFollowASN = true;
	/** 是否预约发货 */
	private boolean invSubscribe = true;
	
	
	public boolean isInvSubscribe() {
		return invSubscribe;
	}
	public void setInvSubscribe(boolean invSubscribe) {
		this.invSubscribe = invSubscribe;
	}
	public int hashCode() {
		return new HashCodeBuilder().append(warehouse).append(company)
				.toHashCode();
	}
	public boolean equals(final Object other) {
		if (!(other instanceof CompanyWorkRule))
			return false;
		CompanyWorkRule castOther = (CompanyWorkRule) other;
		return new EqualsBuilder().append(warehouse, castOther.warehouse)
				.append(company, castOther.company).isEquals();
	}
	public boolean isBatchPickingSupply() {
		return batchPickingSupply;
	}
	public void setBatchPickingSupply(boolean batchPickingSupply) {
		this.batchPickingSupply = batchPickingSupply;
	}
	public boolean isBeAllowed2ChangePickLoc() {
		return beAllowed2ChangePickLoc;
	}
	public void setBeAllowed2ChangePickLoc(boolean beAllowed2ChangePickLoc) {
		this.beAllowed2ChangePickLoc = beAllowed2ChangePickLoc;
	}
	public boolean isBeAllowed2ChangePutLoc() {
		return beAllowed2ChangePutLoc;
	}
	public void setBeAllowed2ChangePutLoc(boolean beAllowed2ChangePutLoc) {
		this.beAllowed2ChangePutLoc = beAllowed2ChangePutLoc;
	}
	public boolean isBeAllowedSplitLPForAllocate() {
		return beAllowedSplitLPForAllocate;
	}
	public void setBeAllowedSplitLPForAllocate(boolean beAllowedSplitLPForAllocate) {
		this.beAllowedSplitLPForAllocate = beAllowedSplitLPForAllocate;
	}
	public boolean isBeAllowedSplitPUForAllocate() {
		return beAllowedSplitPUForAllocate;
	}
	public void setBeAllowedSplitPUForAllocate(boolean beAllowedSplitPUForAllocate) {
		this.beAllowedSplitPUForAllocate = beAllowedSplitPUForAllocate;
	}
	public boolean isBeAsnQuality() {
		return beAsnQuality;
	}
	public void setBeAsnQuality(boolean beAsnQuality) {
		this.beAsnQuality = beAsnQuality;
	}
	
	public boolean isBeRevLimit() {
		return beRevLimit;
	}
	public void setBeRevLimit(boolean beRevLimit) {
		this.beRevLimit = beRevLimit;
	}
	public boolean isBePackagedFollowASN() {
		return bePackagedFollowASN;
	}
	public void setBePackagedFollowASN(boolean bePackagedFollowASN) {
		this.bePackagedFollowASN = bePackagedFollowASN;
	}
	public boolean isCheckReceiveCode() {
		return checkReceiveCode;
	}
	public void setCheckReceiveCode(boolean checkReceiveCode) {
		this.checkReceiveCode = checkReceiveCode;
	}
	public boolean isCheckReceiveDate() {
		return checkReceiveDate;
	}
	public void setCheckReceiveDate(boolean checkReceiveDate) {
		this.checkReceiveDate = checkReceiveDate;
	}
	public Structure getCompany() {
		return company;
	}
	public void setCompany(Structure company) {
		this.company = company;
	}
	public int getCycleDay() {
		return cycleDay;
	}
	public void setCycleDay(int cycleDay) {
		this.cycleDay = cycleDay;
	}
	public String getGroupStr() {
		return groupStr;
	}
	public void setGroupStr(String groupStr) {
		this.groupStr = groupStr;
	}
	public LotRule getLotRule() {
		return lotRule;
	}
	public void setLotRule(LotRule lotRule) {
		this.lotRule = lotRule;
	}
	
	public String getCompanyTurnOverMode() {
		return companyTurnOverMode;
	}
	public void setCompanyTurnOverMode(String companyTurnOverMode) {
		this.companyTurnOverMode = companyTurnOverMode;
	}
	public Warehouse getWarehouse() {
		return warehouse;
	}
	public void setWarehouse(Warehouse warehouse) {
		this.warehouse = warehouse;
	}
	public String getPickBatchType() {
		return pickBatchType;
	}
	public void setPickBatchType(String pickBatchType) {
		this.pickBatchType = pickBatchType;
	}
	
	
}
