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

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

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

/**
 * @author wangjie
 * @version 1.0
 * @date 2021/1/15 15:32
 **/
@Data
@ApiModel("作业时间明细报表model")
public class BuWorkTimeDetailModel implements Serializable {

    private static final long serialVersionUID = -5203964835073461074L;

    @ApiParam("id")
    private Long id;

    @ApiParam("工作中心代码")
    private String workCenterCode;

    @ApiParam("班次代码")
    private String shiftCode;

    @ApiParam("班次名称")
    private String shiftName;

    @ApiParam("作业时间")
    private String workTime;

    @ApiParam("作业内容代码")
    private String prodCode;

    @ApiParam("开始时间")
    private String startTime;

    @ApiParam("结束时间")
    private String endTime;

    @ApiParam("作业内容名称")
    private String prodName;

    @AnnoOutputColumn(refClass = MesExtEnumUtil.SHIFT_PROD_CATEGORY.class, refForeignKey = "value", value = "description")
    @ApiParam("作业内容分类")
    private Integer prodCategory;

    @ApiParam("是否作业时间")
    private Integer isProdTime;

    @AnnoOutputColumn(refClass = MesExtEnumUtil.SHIFT_PROD_TYPE.class, refForeignKey = "value", value = "description")
    @ApiParam("作业类型")
    private Integer prodType;

    @ApiParam("作业人数")
    private Double workerQty;

    @ApiParam("备注")
    private String memo;

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

    @ApiParam("作业时间开始")
    private String workTimeStart;

    @ApiParam("作业时间结束")
    private String workTimeEnd;

    @ApiParam("作业内容分类")
    private String prodCategoryName;

    @ApiParam("是否作业时间")
    private String isProdTimeName;

    @ApiParam("作业类型")
    private String prodTypeName;

    @ApiParam("工作中心名称")
    private String workCenterName;

    @ApiParam("时长")
    private Double duration;

    @ApiParam("损失工时")
    private Double lossHour;

    @ApiParam("安灯队列编号")
    private String andonOrderNo;

    @ApiParam("物料编码")
    private String partNo;

    @ApiParam("物料名称")
    private String partName;

    @ApiParam("创建用户")
    public String createUser;

    @ApiParam("创建日期")
    public String createDatetime;

    @ApiParam("修改人")
    public String modifyUser;

    @ApiParam("修改日期")
    public String modifyDatetime;

    @ApiParam("单号")
    public String orderNo;

    @ApiParam("产品别")
    private String categoryCode;

    @ApiParam("产品别")
    private String categoryName;

    @ApiParam("事业别")
    private String careerCode;

    @ApiParam("事业别")
    private String careerName;

    @ApiParam("机种切换次数")
    private Integer partCutCount;

    @ApiParam(value = "在籍人数")
    @ColumnDefault("0")
    public Integer atHomeNum;

    @ApiParam(value = "缺勤人数")
    @ColumnDefault("0")
    public Integer absenteeismNum;

    @ApiParam(value = "加班人数")
    @ColumnDefault("0")
    public Integer overtimeNum;

    @ApiParam(value = "新上班人数")
    @ColumnDefault("0")
    public Integer newWorkNum;

    @ApiParam(value = "退职人数")
    @ColumnDefault("0")
    public Integer quitWorkNum;

    @ApiParam("主要原因")
    private String mainReason;

    @ApiParam(value = "责任部门")
    private String ownerDepartment;

    @ApiParam("对策")
    private String countermeasure;

    @ApiParam("实施日")
    private String implDate;

    @ApiParam("决策者")
    private String decisionMaker;

}
