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

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

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 CustomerWorkRule extends Entity {
	private static final long serialVersionUID = 8209713229523673937L;
	/** 仓库 */
	private Warehouse warehouse;
	/** 收货客户*/
	private Structure customer;
	/** 周转方式 */
	private String customerTurnOverMode; 
    /**	收货人分组：用于生成波次的时候使用，例如：收货人A和收货人B的分组相同，则两者的订单可以在一个波次中作业 */
	private String groupStr;
	/** 是否允许部分发货 */
	private boolean shipPart = true;
	/** 是否严格批次属性发货 */
	private boolean beAllowed2ChangePickLot = false;
	/** 是否允许多发 */
	private boolean beShipLimit = false;
	
	public int hashCode() {
		return new HashCodeBuilder().append(warehouse).append(customer)
				.toHashCode();
	}
	public boolean equals(final Object other) {
		if (!(other instanceof CustomerWorkRule))
			return false;
		CustomerWorkRule castOther = (CustomerWorkRule) other;
		return new EqualsBuilder().append(warehouse, castOther.warehouse)
				.append(customer, castOther.customer).isEquals();
	}
	
	public boolean isBeShipLimit() {
		return beShipLimit;
	}
	public void setBeShipLimit(boolean beShipLimit) {
		this.beShipLimit = beShipLimit;
	}
	public Structure getCustomer() {
		return customer;
	}
	public void setCustomer(Structure customer) {
		this.customer = customer;
	}
	public String getGroupStr() {
		return groupStr;
	}
	public void setGroupStr(String groupStr) {
		this.groupStr = groupStr;
	}
	public boolean isShipPart() {
		return shipPart;
	}
	public void setShipPart(boolean shipPart) {
		this.shipPart = shipPart;
	}
	
	public String getCustomerTurnOverMode() {
		return customerTurnOverMode;
	}
	public void setCustomerTurnOverMode(String customerTurnOverMode) {
		this.customerTurnOverMode = customerTurnOverMode;
	}
	public Warehouse getWarehouse() {
		return warehouse;
	}
	public void setWarehouse(Warehouse warehouse) {
		this.warehouse = warehouse;
	}
	public boolean isBeAllowed2ChangePickLot() {
		return beAllowed2ChangePickLot;
	}
	public void setBeAllowed2ChangePickLot(boolean beAllowed2ChangePickLot) {
		this.beAllowed2ChangePickLot = beAllowed2ChangePickLot;
	}
	
	
}
