RequestOutItemBean.java 4.8 KB
package com.myproject.bean.qisda;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 *
 * 用于出库请求的JSON转换
 * Created by sunke on 2019/12/14.
 */
public class RequestOutItemBean {

    /**
     * 动作(首盘,分盘,补料盘,急料,指定料,单独出库)
     */
    private String action;
    /**
     * 需求单号
     */
    private String hSerial;

    /**
     * 工单
     */
    private String so;

    /**
     * 工单序号
     */
    private String soseq;

    /**
     * 备料单号
     */
    private String refno;

    /**
     * 建议出仓日期
     */
    @JsonProperty("Sdte")
    private String sdte;

    /**
     * 建议出仓日期
     */
    private String stme;

    /**
     * 建议出仓日期
     */
    private String mdte;

    /**
     * 建议出仓日期
     */
    private String mtme;

    /**
     * 料站
     */
    private String slot;
    /**
     * facility
     */
    private String facility;

    /**
     * 是否是分盘料
     */
    private String reelcut;

    /**
     * PN
     */
    private String partNum;

    @JsonProperty("ReelID")
    private String reelID;

    @JsonProperty("Location")
    private String location;

    /**
     * 料站序号
     */
    @JsonProperty("slotserial")
    private int slotlocation;

    /**
     * 需求单中数量
     */
    private int qty;

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getFacility() {
        return facility;
    }

    public void setFacility(String facility) {
        this.facility = facility;
    }

    public String gethSerial() {
        return hSerial;
    }

    public void sethSerial(String hSerial) {
        this.hSerial = hSerial;
    }

    public String getMdte() {
        return mdte;
    }

    public void setMdte(String mdte) {
        this.mdte = mdte;
    }

    public String getMtme() {
        return left0Str(mtme);
    }

    public void setMtme(String mtme) {
        this.mtme = mtme;
    }

    public String getPartNum() {
        return partNum;
    }

    public void setPartNum(String partNum) {
        this.partNum = partNum;
    }

    public int getQty() {
        return qty;
    }

    public void setQty(int qty) {
        this.qty = qty;
    }

    public String getReelcut() {
        return reelcut;
    }

    public void setReelcut(String reelcut) {
        this.reelcut = reelcut;
    }

    public String getRefno() {
        return refno;
    }

    public void setRefno(String refno) {
        this.refno = refno;
    }

    public String getSdte() {
        return sdte;
    }

    public void setSdte(String sdte) {
        this.sdte = sdte;
    }

    public String getSlot() {
        return slot;
    }

    public void setSlot(String slot) {
        this.slot = slot;
    }

    public String getSo() {
        return so;
    }

    public void setSo(String so) {
        this.so = so;
    }

    public String getStme() {
        return left0Str(stme);
    }

    /**
     * 不够位数的在前面补0,保留code的长度位数字
     * @param code
     * @return
     */
    private String left0Str(String code) {
        if(code == null || code.isEmpty()){
            code = "0";
        }
        // 保留code的位数
        return String.format("%06d", Integer.parseInt(code));
    }

    public void setStme(String stme) {
        this.stme = stme;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getReelID() {
        return reelID;
    }

    public void setReelID(String reelID) {
        this.reelID = reelID;
    }

    public String getSoseq() {
        return soseq;
    }

    public void setSoseq(String soseq) {
        this.soseq = soseq;
    }

    public int getSlotlocation() {
        return slotlocation;
    }

    public void setSlotlocation(int slotlocation) {
        this.slotlocation = slotlocation;
    }

    @Override
    public String toString() {
        return "RequestOutItemBean{" +
                "action='" + action + '\'' +
                ", hSerial='" + hSerial + '\'' +
                ", so='" + so + '\'' +
                ", refno='" + refno + '\'' +
                ", sdte='" + sdte + '\'' +
                ", stme='" + stme + '\'' +
                ", mdte='" + mdte + '\'' +
                ", mtme='" + mtme + '\'' +
                ", slot='" + slot + '\'' +
                ", slotlocation='" + slotlocation + '\'' +
                ", facility='" + facility + '\'' +
                ", reelcut='" + reelcut + '\'' +
                ", partNum='" + partNum + '\'' +
                ", qty=" + qty +
                '}';
    }
}