package cn.estsh.i3plus.pojo.mes.model;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * @Description : JIT队列列表Model
 * @Reference :
 * @Author : dragon.xu
 * @CreateDate : 2019-05-22 16:34
 * @Modify:
 **/
@Data
@Api("JIT队列列表Model")
public class QueueOrderModel implements Serializable {
    private Long id;
    @ApiParam("队列序号")
    public Double queueSeq;
    @ApiParam("队列明细序号")
    public Double queDetailSeq;
    @ApiParam("客户标识号")
    public String custFlagNo;
    @ApiParam("产品配置名称")
    public String prodCfgNameRdd;
    @ApiParam("产品类型名称")
    public String categoryNameRdd;
    @ApiParam("产品条码")
    public String serialNumber;
    @ApiParam("物料号")
    public String partNo;
    @ApiParam("物料名称")
    public String partNameRdd;
    @ApiParam("条码状态")
    public Integer snStatus;
    @ApiParam("生产类型")
    public String workType;
    @Transient
    @ApiParam("显示颜色")
    private String color;
    @ApiParam("工厂代码")
    private String organizeCode;
    @ApiParam("展示行数")
    private Integer prodNum;
    @ApiParam("产线")
    private String workCenterCode;
    @ApiParam("工位")
    private String workCellCode;
    @ApiParam("队列类型")
    private Integer queueType;

    @ApiParam("已生产数量")
    private Double finsihQty;

    @ApiParam("包装数量")
    private Double qty;

    @ApiParam("生产组代码")
    private String pgCode;
    @ApiParam("分组队列编号")
    private String queueGroupNo;
    @ApiParam("组内编号")
    private Integer groupNo;
    @ApiParam("产品配置代码")
    private String prodCfgCode;
    @ApiParam("是否已扫描")
    private int isScan;

    @ApiParam("队列编号")
    private String orderNo;
    @ApiParam("料架是否已打印")
    private Integer isGroupPrinted;

    @Column(name = "PPT_CODE")
    @ApiParam("产品类型名称")
    private String pptCode;

    @ApiParam("JIT队列批次")
    private String jitLotNo;

    @ApiParam("vin")
    private String vinCode;

    @ApiParam("客户JIT队列编号")
    private String jitActualNo;

    @ApiParam("产品位置")
    private String produceCategoryCode;

    @ApiParam("项目代码")
    private String prodCfgTypeCode;

    @ApiParam("配方内容")
    private String formulaContent;

    @ApiParam("分组序号")
    private String groupSeq;

    @ApiParam("客户产线代码")
    private String custProdLineCode;
    @ApiParam("JIT排序号")
    private String jitSeq;
    private Integer status;

    @ApiParam("回冲标识")
    private String jisBackflushStatus;
    @ApiParam("队列编号")
    private String jisActualNo;

    @ApiParam("是否放空")
    private Integer isEmpty;
    @ApiParam("特殊标识")
    private Integer specialFlag;

    @ApiParam("箱条码")
    private String packageNo;

    public QueueOrderModel() {
    }

    public double getQtyVal() {
        return this.qty == null ? 0.0d : this.qty;
    }

    public double getFinsihQtyVal() {
        return this.finsihQty == null ? 0.0d : this.finsihQty;
    }


    public QueueOrderModel(Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
                           String serialNumber, String partNo, String partNameRdd, Integer snStatus, String workType) {
        this.queueSeq = queueSeq;
        this.queDetailSeq = queDetailSeq;
        this.custFlagNo = custFlagNo;
        this.prodCfgNameRdd = prodCfgNameRdd;
        this.categoryNameRdd = categoryNameRdd;
        this.serialNumber = serialNumber;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.snStatus = snStatus;
        this.workType = workType;
    }

    public QueueOrderModel(Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
                           String serialNumber, String partNo, String partNameRdd, Integer snStatus, String workType, Double finsihQty, Double qty) {
        this.id = id;
        this.queueSeq = queueSeq;
        this.queDetailSeq = queDetailSeq;
        this.custFlagNo = custFlagNo;
        this.prodCfgNameRdd = prodCfgNameRdd;
        this.categoryNameRdd = categoryNameRdd;
        this.serialNumber = serialNumber;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.snStatus = snStatus;
        this.workType = workType;
        this.finsihQty = finsihQty;
        this.qty = qty;
    }

    public QueueOrderModel(Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
                           String serialNumber, String partNo, String partNameRdd, Integer snStatus, String workType) {
        this.id = id;
        this.queueSeq = queueSeq;
        this.queDetailSeq = queDetailSeq;
        this.custFlagNo = custFlagNo;
        this.prodCfgNameRdd = prodCfgNameRdd;
        this.categoryNameRdd = categoryNameRdd;
        this.serialNumber = serialNumber;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.snStatus = snStatus;
        this.workType = workType;
    }

    public QueueOrderModel(String orderNo, Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
                           String serialNumber, String partNo, String partNameRdd, Integer snStatus, String workType, Double finsihQty, Double qty) {
        this.id = id;
        this.queueSeq = queueSeq;
        this.queDetailSeq = queDetailSeq;
        this.custFlagNo = custFlagNo;
        this.prodCfgNameRdd = prodCfgNameRdd;
        this.categoryNameRdd = categoryNameRdd;
        this.serialNumber = serialNumber;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.snStatus = snStatus;
        this.workType = workType;
        this.finsihQty = finsihQty;
        this.qty = qty;
        this.orderNo = orderNo;
    }

    public QueueOrderModel(String orderNo, Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
                           String serialNumber, String partNo, String partNameRdd, Integer snStatus, String workType) {
        this.id = id;
        this.queueSeq = queueSeq;
        this.queDetailSeq = queDetailSeq;
        this.custFlagNo = custFlagNo;
        this.prodCfgNameRdd = prodCfgNameRdd;
        this.categoryNameRdd = categoryNameRdd;
        this.serialNumber = serialNumber;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.snStatus = snStatus;
        this.workType = workType;
        this.orderNo = orderNo;
    }

    // getPrintSnQueueOrderModel
    public QueueOrderModel(Long id, Double queDetailSeq, String pgCode, String queueGroupNo, Integer groupNo, String prodCfgCode, Integer isGroupPrinted, String jitActualNo,
                           String prodCfgTypeCode, String produceCategoryCode, Double qty, String vinCode, Double queueSeq,
                           String groupSeq, String serialNumber, String custProdLineCode, Integer specialFlag, String workType) {
        this.id = id;
        this.queDetailSeq = queDetailSeq;
        this.pgCode = pgCode;
        this.queueGroupNo = queueGroupNo;
        this.groupNo = groupNo;
        this.prodCfgCode = prodCfgCode;
        this.isGroupPrinted = isGroupPrinted;
        this.jitActualNo = jitActualNo;
        this.prodCfgTypeCode = prodCfgTypeCode;
        this.produceCategoryCode = produceCategoryCode;
        this.qty = qty;
        this.vinCode = vinCode;
        this.queueSeq = queueSeq;
        this.groupSeq = groupSeq;
        this.serialNumber = serialNumber;
        this.custProdLineCode = custProdLineCode;
        this.specialFlag = specialFlag;
        this.workType = workType;
    }

    public QueueOrderModel(String orderNo, Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
                           String partNo, String partNameRdd, String workType, Double finsihQty, Double qty) {
        this.id = id;
        this.queueSeq = queueSeq;
        this.queDetailSeq = queDetailSeq;
        this.custFlagNo = custFlagNo;
        this.prodCfgNameRdd = prodCfgNameRdd;
        this.categoryNameRdd = categoryNameRdd;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.workType = workType;
        this.finsihQty = finsihQty;
        this.qty = qty;
        this.orderNo = orderNo;
    }

    //getWaitQueueOrderModelNoSn
    public QueueOrderModel(String serialNumber, String orderNo, Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
                           String partNo, String partNameRdd, String workType, Double finsihQty, Double qty, String pptCode, String produceCategoryCode, String queueGroupNo, Integer groupNo) {
        this.serialNumber = serialNumber;
        this.id = id;
        this.queueSeq = queueSeq;
        this.queDetailSeq = queDetailSeq;
        this.custFlagNo = custFlagNo;
        this.prodCfgNameRdd = prodCfgNameRdd;
        this.categoryNameRdd = categoryNameRdd;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.workType = workType;
        this.finsihQty = finsihQty;
        this.qty = qty;
        this.orderNo = orderNo;
        this.pptCode = pptCode;
        this.produceCategoryCode = produceCategoryCode;
        this.queueGroupNo = queueGroupNo;
        this.groupNo = groupNo;
    }

    //getWaitQueueOrderModelNoSnMgn
    public QueueOrderModel(String serialNumber, String orderNo, Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
                           String partNo, String partNameRdd, String workType, Double finsihQty, Double qty, String pptCode, String produceCategoryCode, String prodCfgTypeCode,
                           String vinCode, String formulaContent, String queueGroupNo, String jitSeq) {
        this.serialNumber = serialNumber;
        this.id = id;
        this.queueSeq = queueSeq;
        this.queDetailSeq = queDetailSeq;
        this.custFlagNo = custFlagNo;
        this.prodCfgNameRdd = prodCfgNameRdd;
        this.categoryNameRdd = categoryNameRdd;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.workType = workType;
        this.finsihQty = finsihQty;
        this.qty = qty;
        this.orderNo = orderNo;
        this.pptCode = pptCode;
        this.produceCategoryCode = produceCategoryCode;
        this.prodCfgTypeCode = prodCfgTypeCode;
        this.vinCode = vinCode;
        this.formulaContent = formulaContent;
        this.queueGroupNo = queueGroupNo;
        this.jitSeq = jitSeq;
    }

    //getAlreadyQueueOrderModelNoSnMgn
    public QueueOrderModel(String serialNumber, String orderNo, Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
                           String partNo, String partNameRdd, String workType, String prodCfgTypeCode, String vinCode, String formulaContent,
                           String queueGroupNo, String produceCategoryCode, String jitSeq) {
        this.id = id;
        this.queueSeq = queueSeq;
        this.queDetailSeq = queDetailSeq;
        this.custFlagNo = custFlagNo;
        this.prodCfgNameRdd = prodCfgNameRdd;
        this.categoryNameRdd = categoryNameRdd;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.workType = workType;
        this.orderNo = orderNo;
        this.serialNumber = serialNumber;
        this.prodCfgTypeCode = prodCfgTypeCode;
        this.vinCode = vinCode;
        this.formulaContent = formulaContent;
        this.queueGroupNo = queueGroupNo;
        this.produceCategoryCode = produceCategoryCode;
        this.jitSeq = jitSeq;
    }

    //getAlreadyQueueOrderModelNoSn
    public QueueOrderModel(String serialNumber, String orderNo, Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
                           String partNo, String partNameRdd, String workType) {
        this.id = id;
        this.queueSeq = queueSeq;
        this.queDetailSeq = queDetailSeq;
        this.custFlagNo = custFlagNo;
        this.prodCfgNameRdd = prodCfgNameRdd;
        this.categoryNameRdd = categoryNameRdd;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.workType = workType;
        this.orderNo = orderNo;
        this.serialNumber = serialNumber;
    }

    //料架分组队列展示组件-getQueueOrderDetailListByQueueGroupNo
    public QueueOrderModel(String queueGroupNo, Integer groupNo, String orderNo,
                           Double queueSeq, Double queDetailSeq, String partNo,
                           String partNameRdd, String organizeCode, String vinCode, String produceCategoryCode, String serialNumber) {
        this.queueGroupNo = queueGroupNo;
        this.groupNo = groupNo;
        this.orderNo = orderNo;
        this.queueSeq = queueSeq;
        this.queDetailSeq = queDetailSeq;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.organizeCode = organizeCode;
        this.vinCode = vinCode;
        this.produceCategoryCode = produceCategoryCode;
        this.serialNumber = serialNumber;
    }

    // getQueueOrderBySerialNumber
    public QueueOrderModel(Long id, String orderNo, String queueGroupNo, String jitLotNo, String vinCode, String organizeCode, String produceCategoryCode, String workType,
                           String partNo, String prodCfgTypeCode) {
        this.id = id;
        this.orderNo = orderNo;
        this.queueGroupNo = queueGroupNo;
        this.jitLotNo = jitLotNo;
        this.vinCode = vinCode;
        this.organizeCode = organizeCode;
        this.produceCategoryCode = produceCategoryCode;
        this.workType = workType;
        this.partNo = partNo;
        this.prodCfgTypeCode = prodCfgTypeCode;
    }

    // getQueueJitActualJitSeq
    public QueueOrderModel(Long id, Double queueSeq, String serialNumber, String orderNo, String prodCfgTypeCode, String vinCode, String queueGroupNo, String jitSeq, Integer status) {
        this.id = id;
        this.queueSeq = queueSeq;
        this.serialNumber = serialNumber;
        this.orderNo = orderNo;
        this.prodCfgTypeCode = prodCfgTypeCode;
        this.vinCode = vinCode;
        this.queueGroupNo = queueGroupNo;
        this.jitSeq = jitSeq;
        this.status = status;
    }

    // getQueueJitActualDetailByNo
    public QueueOrderModel(Long id, String jisActualNo, String serialNumber, String vinCode, String jisBackflushStatus) {
        this.id = id;
        this.jisActualNo = jisActualNo;
        this.serialNumber = serialNumber;
        this.vinCode = vinCode;
        this.jisBackflushStatus = jisBackflushStatus;
    }
}
