package cn.estsh.i3plus.ext.mes.pcn.pojo.context;

import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.io.Serializable;

/**
 * 生产过程上下文对象-装配件清单信息
 */
@Data
public class MesAssemblyShowContext implements Serializable {

    private static final long serialVersionUID = -3650546953572889323L;

    @ApiParam("生产工单号")
    private String workOrderNo;

    @ApiParam("零件编码")
    private String partNo;

    @ApiParam("装配件零件编码")
    private String assemblyPartNo;

    @ApiParam("装配件零件名称")
    private String assemblyPartName;

    @ApiParam("装配件条码")
    private String assemblySn;

    @ApiParam(value = "装备序号")
    private Integer routeSeq;

    @ApiParam("显示颜色")
    private String color;

    @ApiParam(value = "显示颜色(配置)")
    private String showColor;

    @ApiParam("装配零件状态")
    private Integer assemblyStatus;

    @ApiParam("装配件条码确认方式")
    private Integer matchType;

    @ApiParam("扫描规则")
    public String matchRule;

    @ApiParam("装配零件状态")
    private String assemblyStatusName;

    @ApiParam("装配件条码确认方式")
    private String matchTypeName;

    @ApiParam("工位代码")
    public String workCellCode;

    @ApiParam(value = "工艺顺序号")
    private Integer processSeq;

    @ApiParam("序号")
    private Integer index;

    @ApiParam("匹配时间")
    public String matchDatetime;

    @ApiParam(value = "是否置顶")
    private Integer isTop = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue();

    public MesAssemblyShowContext index(Integer index){
        this.index = index;
        return this;
    }

    public MesAssemblyShowContext isTop(){
        this.isTop = CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue();
        return this;
    }

    public MesAssemblyShowContext assemblyPartName(String assemblyPartName) {
        this.assemblyPartName = assemblyPartName;
        return this;
    }
}
