RobotView.java 4.45 KB
package com.huaheng.api.wcs.domain;

import com.huaheng.pc.config.container.domain.Container;
import lombok.Data;

/***
 * @author tongzonghao
 */
@Data
public class RobotView {

    private String taskNo;
    private String area;
    private String containerCode;
    private String port;
    /**
     * boxType : 0:大型货物垛型
     * boxType : 1:小型货物垛型
     */
    private Integer boxType;

    /**
     * 源垛型
     */
    private Integer fromStackType;
    /**
     * 去向垛型
     */
    private Integer toStackType;
    /**
     * 来源托盘,起点 1左,2中,3右
     */
    private int formPallet;
    private String formPalletAlias;
    /**
     * 来源位置
     */
    private int formPosition;
    /**
     * 去向托盘,终点 1左,2中,3右
     */
    private int toPallet;
    private String toPalletAlias;
    /**
     * 去向位置
     */
    private int toPosition;

    private int state;

    private int totalQty;
    private int height;
    private int fromHeight;
    private int toHeight;

    public RobotView setFromStackType(Integer fromStackType) {
        if(fromStackType > 300){
            this.fromStackType = fromStackType - 100;
        }else{
            this.fromStackType = fromStackType;
        }
        return this;
    }

    public RobotView setToStackType(Integer toStackType) {
        if(toStackType > 300){
            this.toStackType = toStackType - 100;
        }else{
            this.toStackType = toStackType;
        }
        return this;
    }

    public RobotView setFromHeight(int fromHeight) {
        this.fromHeight = fromHeight;
        return this;
    }

    public RobotView setTaskNo(String taskNo) {
        this.taskNo = taskNo;
        return this;
    }

    public RobotView setArea(String area) {
        this.area = area;
        return this;
    }

    public RobotView setContainerCode(String containerCode) {
        this.containerCode = containerCode;
        return this;
    }

    public RobotView setPort(String port) {
        this.port = port;
        return this;
    }

    public RobotView setBoxType(Integer boxType) {
        this.boxType = boxType;
        return this;
    }



    public RobotView setFormPalletAlias(String formPalletAlias) {
        this.formPalletAlias = formPalletAlias;
        return this;
    }

    public RobotView setFormPosition(int formPosition) {
        this.formPosition = formPosition;
        return this;
    }

    public RobotView setToPalletAlias(String toPalletAlias) {
        this.toPalletAlias = toPalletAlias;
        return this;
    }

    public RobotView setToPosition(int toPosition) {
        this.toPosition = toPosition;
        return this;
    }

    public RobotView setState(int state) {
        this.state = state;
        return this;
    }

    public RobotView setTotalQty(int totalQty) {
        this.totalQty = totalQty;
        return this;
    }

    public RobotView setHeight(int height) {
        this.height = height;
        return this;
    }
    public RobotView setFormPallet(int formPallet) {
        this.formPallet = formPallet;
        transferPalletAlias();
        return this;
    }

    public RobotView setToPallet(int toPallet) {
        this.toPallet = toPallet;
        transferPalletAlias();
        return this;
    }
    public RobotView setToHeight(int toHeight) {
        this.toHeight = toHeight;
        return this;
    }

    public void transferPalletAlias(){
        switch (this.formPallet){
            case 1:
                this.formPalletAlias = "立库托盘";
                break;
            case 2:
                this.formPalletAlias = "出库托盘";
                break;
            case 3:
                this.formPalletAlias = "缓存托盘";
                break;
            default:
        }
        switch (this.toPallet){
            case 1:
                this.toPalletAlias = "立库托盘";
                break;
            case 2:
                this.toPalletAlias = "出库托盘";
                break;
            case 3:
                this.toPalletAlias = "缓存托盘";
                break;
            default:
        }
        switch (this.toPallet){
            case 1:
                this.toPalletAlias = "立库托盘";
                break;
            case 2:
                this.toPalletAlias = "出库托盘";
                break;
            case 3:
                this.toPalletAlias = "缓存托盘";
                break;
            default:
        }
    }


}