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.Warehouse;
import com.dev.energy.server.model.Entity;

public class WaveRule extends Entity {
	private static final long serialVersionUID = -6950533740134126239L;
	
	public final static String DAY_TYPE="DAY_TYPE";//天模式
	public final static String WEEK_TYPE="WEEK_TYPE";//周模式
	public final static String MONTH_TYPE="MONTH_TYPE";//月模式
	
	//仓库
	private Warehouse warehouse;
	//波次号
	private String waveCode;
//	作业模式
	private String workModel;
	//作业开始时间
	private String startTime;
	//作业结束事件
	private String endTime;
	//时间基准：天/周/月
	private String dateType;
	//订单时间开始时间
	private String orderStartTime;
	//订单结束时间
	private String orderEndTime;
	
	private Long sortIndex; //优先级
	
	/** 运输方式 **/
	private String shipmentMethod;  
	
	//货主分组
	private String companyGroupStr;
	//收货人分组
	private String customerGroupStr;
	
	//波次策略--高级设置
	private String waveRules;
	
	//描述
	private String description;

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setOrderEndTime(String orderEndTime) {
		this.orderEndTime = orderEndTime;
	}

	public void setOrderStartTime(String orderStartTime) {
		this.orderStartTime = orderStartTime;
	}

	public int hashCode() {
		return new HashCodeBuilder().append(warehouse).
				append(waveCode).toHashCode();
	}

	public boolean equals(final Object other) {
		if (!(other instanceof WaveRule))
			return false;
		WaveRule castOther = (WaveRule) other;
		return new EqualsBuilder().append(warehouse, castOther.warehouse)
				.append(waveCode, castOther.waveCode).isEquals();
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public Warehouse getWarehouse() {
		return warehouse;
	}

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

	public String getWaveCode() {
		return waveCode;
	}

	public void setWaveCode(String waveCode) {
		this.waveCode = waveCode;
	}

	public String getWaveRules() {
		return waveRules;
	}

	public void setWaveRules(String waveRules) {
		this.waveRules = waveRules;
	}

	public String getWorkModel() {
		return workModel;
	}

	public void setWorkModel(String workModel) {
		this.workModel = workModel;
	}

	public String getCompanyGroupStr() {
		return companyGroupStr;
	}

	public void setCompanyGroupStr(String companyGroupStr) {
		this.companyGroupStr = companyGroupStr;
	}

	public String getCustomerGroupStr() {
		return customerGroupStr;
	}

	public void setCustomerGroupStr(String customerGroupStr) {
		this.customerGroupStr = customerGroupStr;
	}

	public String getDateType() {
		return dateType;
	}

	public void setDateType(String dateType) {
		this.dateType = dateType;
	}

	public String getOrderEndTime() {
		return orderEndTime;
	}

	public String getOrderStartTime() {
		return orderStartTime;
	}

	public String getShipmentMethod() {
		return shipmentMethod;
	}

	public void setShipmentMethod(String shipmentMethod) {
		this.shipmentMethod = shipmentMethod;
	}

	public Long getSortIndex() {
		return sortIndex;
	}

	public void setSortIndex(Long sortIndex) {
		this.sortIndex = sortIndex;
	}

}
