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

import cn.estsh.i3plus.ext.mes.pojo.util.MesExtEnumUtil;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import io.swagger.annotations.ApiParam;
import lombok.Data;

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

/**
 * @author yinxiao
 * @date 2023-2023/2/6 11:20
 * @Description 援入援出时间汇总报表
 */
@Data
public class MesAssistOutAndEnterDateSumModel implements Serializable {

    private static final long serialVersionUID = -3294894625272375151L;

    private String organizeCode;
    @ApiParam("日期")
    private String influenceDate;

    @ApiParam("系别")
    private String isDont;

    @ApiParam("班别")
    private String dontClass;

    @ApiParam("生产线代码")
    private String workCenterCode;

    @ApiParam("生产线名称")
    private String workCenterName;

    @ApiParam("援入")
    private Double assistEnter = 0d;

    @ApiParam("内部援出")
    private Double inAssistOut = 0d;

    @ApiParam("新人援出")
    private Double newcomerAssistOut = 0d;

    @ApiParam("外部援出")
    private Double externalAssistOut = 0d;

    @ApiParam("制造援出")
    private Double makeAssistOut = 0d;

    @ApiParam(value = "总援出")
    private Double countAssistOut = 0d;


    @ApiParam("日期开始")
    private String influenceDateStart;


    @ApiParam("日期结束")
    private String influenceDateEnd;

    @ApiParam("援入")
    private String assistEnterStr;

    @ApiParam("内部援出")
    private String inAssistOutStr;

    @ApiParam("新人援出")
    private String newcomerAssistOutStr;

    @ApiParam("外部援出")
    private String externalAssistOutStr;

    @ApiParam("制造援出")
    private String makeAssistOutStr;

    @ApiParam("查询维度")
    private Integer dimension;

    @ApiParam("查询维度")
    private Integer dimension1;


    @Column(name = "INFLUENCE_TIME")
    @ApiParam("影响时间(分钟)，影响人数*（结束时间-开始时间）")
    private Double influenceTime;


    @Column(name = "ASSIST_OUT_AND_ENTER_DETAIL")
    @ApiParam("援入援出明细项")
    @AnnoOutputColumn(refClass = MesExtEnumUtil.ASSIST_OUT_AND_ENTER_DETAIL.class)
    private Integer assistOutAndEnterDetail;

    public MesAssistOutAndEnterDateSumModel(String influenceDate, Double influenceTime, Integer assistOutAndEnterDetail, String isDont, String dontClass, String workCenterCode, String workCenterName) {
        this.influenceDate = influenceDate;
        this.isDont = isDont;
        this.dontClass = dontClass;
        this.workCenterCode = workCenterCode;
        this.workCenterName = workCenterName;
        this.assistOutAndEnterDetail = assistOutAndEnterDetail;
        this.influenceTime = influenceTime;
    }


    public MesAssistOutAndEnterDateSumModel() {
    }
}
