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

import cn.estsh.i3plus.pojo.mes.bean.recyclablepackage.MesRecyclablePackageBinding;
import cn.estsh.i3plus.pojo.mes.bean.recyclablepackage.MesRecyclablePackageBindingDetail;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.io.Serializable;

/**
 * 生产过程上下文对象-可回用包装
 */
@Data
public class MesProductionRecyclablePackageContext implements Serializable {

    private static final long serialVersionUID = 4337949265011880288L;

    @ApiParam("组织代码")
    private String organizeCode;

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

    @ApiParam(name = "包条码")
    private String packageSn;

    @ApiParam(name = "包类型")
    private String packageTypeCode;

    @ApiParam("零件条码ID")
    private Long id;

    @ApiParam("零件条码")
    private String productSn;

    @ApiParam("零件号")
    private String partNo;

    @ApiParam("零件名称")
    private String partName;

    public MesProductionRecyclablePackageContext() {
    }


    public MesProductionRecyclablePackageContext(MesRecyclablePackageBinding recyclablePackageBinding,MesRecyclablePackageBindingDetail mesRecyclablePackageBindingDetail) {
        this.organizeCode = recyclablePackageBinding.getOrganizeCode();
        this.packageSn = recyclablePackageBinding.getPackageSn();
        this.partName = mesRecyclablePackageBindingDetail.getPartName();
        this.partNo = mesRecyclablePackageBindingDetail.getPartNo();
        this.productSn = mesRecyclablePackageBindingDetail.getProductSn();
    }

    public MesProductionRecyclablePackageContext setId(long id){
        this.id = id;
        return this;
    }

}
