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

import java.util.Date;

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

public class Transportation extends Entity {
	/**
	 * @Description：车辆信息
	 * @author  dev
	 * @Date：2009-2-11
	 */
	private static final long serialVersionUID = 1L;
	private String code;//车辆编号
	private String license;//车牌号
	private Structure organization;//承运商	beCarrier = true
	private String teamNo;//所属车队
	private TransportationType type;//车辆类型
	private String trailType;//挂车类型(TrailType)：平板、箱式、笼式、其他
	private double weight=0;//额定载重
	private double volume=0;//体积
	private double baseFuel=0;//百公里油耗
	private String gps;//GPS设备号
	private String chassisCode;//底盘号
	private String engineNo;//发动机号
	private Pilot masterPilot;//主司机
	private Pilot minorPilot; //副司机
	private String contractType;//承包类型(ContractType)：自营、外包
	private String contractNo;//承包合同号
	private Date produceDate;//制造日期
	private Date purchaseDate;//购买日期
	private int totalDistance = 0;//总里程数
	private String status;//车辆状态(VehicleStatus)：可用、在途、维修、其他
	private String description;//描述
	private boolean disabled=false;//是否有效
	
	public boolean equals(final Object other) {
		if (!(other instanceof Transportation))
			return false;
		Transportation castOther = (Transportation) other;
		return new EqualsBuilder().append(code, castOther.code).isEquals();
	}

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

	public double getBaseFuel() {
		return baseFuel;
	}

	public void setBaseFuel(double baseFuel) {
		this.baseFuel = baseFuel;
	}

	public String getChassisCode() {
		return chassisCode;
	}

	public void setChassisCode(String chassisCode) {
		this.chassisCode = chassisCode;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getContractNo() {
		return contractNo;
	}

	public void setContractNo(String contractNo) {
		this.contractNo = contractNo;
	}

	public String getContractType() {
		return contractType;
	}

	public void setContractType(String contractType) {
		this.contractType = contractType;
	}

	public String getDescription() {
		return description;
	}

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

	public String getEngineNo() {
		return engineNo;
	}

	public void setEngineNo(String engineNo) {
		this.engineNo = engineNo;
	}

	public String getGps() {
		return gps;
	}

	public void setGps(String gps) {
		this.gps = gps;
	}

	public String getLicense() {
		return license;
	}

	public void setLicense(String license) {
		this.license = license;
	}

	public Pilot getMasterPilot() {
		return masterPilot;
	}

	public void setMasterPilot(Pilot masterPilot) {
		this.masterPilot = masterPilot;
	}

	public Pilot getMinorPilot() {
		return minorPilot;
	}

	public void setMinorPilot(Pilot minorPilot) {
		this.minorPilot = minorPilot;
	}

	public Structure getOrganization() {
		return organization;
	}

	public void setOrganization(Structure organization) {
		this.organization = organization;
	}

	public Date getProduceDate() {
		return produceDate;
	}

	public void setProduceDate(Date produceDate) {
		this.produceDate = produceDate;
	}

	public Date getPurchaseDate() {
		return purchaseDate;
	}

	public void setPurchaseDate(Date purchaseDate) {
		this.purchaseDate = purchaseDate;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getTeamNo() {
		return teamNo;
	}

	public void setTeamNo(String teamNo) {
		this.teamNo = teamNo;
	}

	public int getTotalDistance() {
		return totalDistance;
	}

	public void setTotalDistance(int totalDistance) {
		this.totalDistance = totalDistance;
	}

	public String getTrailType() {
		return trailType;
	}

	public void setTrailType(String trailType) {
		this.trailType = trailType;
	}

	public TransportationType getType() {
		return type;
	}

	public void setType(TransportationType type) {
		this.type = type;
	}

	public double getVolume() {
		return volume;
	}

	public void setVolume(double volume) {
		this.volume = volume;
	}

	public double getWeight() {
		return weight;
	}

	public void setWeight(double weight) {
		this.weight = weight;
	}

	public boolean isDisabled() {
		return disabled;
	}

	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}
}
