package com.dev.swms.server.service.receiving.pojo;

import com.dev.swms.server.model.base.Location;

public class LocationWrap {
	private Location location;
	private String type;
	private double leftQuantity;
	private int sortIndex;
	//库位已有托盘数
	private int LPCount;
	//库位剩余可放托盘数
	private int allowLpCount;
	
	public LocationWrap(Location location, double quantity) {
		super();
		this.location = location;
		this.type = location.getType();
		this.leftQuantity = quantity;
		this.sortIndex = location.getSortIndex();
		this.LPCount = location.getTotalLP() + location.getQueuedLP();
		this.allowLpCount = location.getStowage().getLpLimit() - this.LPCount;
		if (this.allowLpCount < 0) {
			this.allowLpCount = 0;
		}
	}
	
	public Location getLocation() {
		return location;
	}
	public void setLocation(Location location) {
		this.location = location;
	}
	public double getLeftQuantity() {
		return leftQuantity;
	}
	public void setLeftQuantity(double leftQuantity) {
		this.leftQuantity = leftQuantity;
	}
	public int getSortIndex() {
		return sortIndex;
	}
	public void setSortIndex(int sortIndex) {
		this.sortIndex = sortIndex;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public int getLPCount() {
		return LPCount;
	}
	public void setLPCount(int count) {
		LPCount = count;
	}
	public int getAllowLpCount() {
		return allowLpCount;
	}
	public void setAllowLpCount(int allowLpCount) {
		this.allowLpCount = allowLpCount;
	}
		
}
