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

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 javax.persistence.Column;
import java.io.Serializable;

/**
 * @DESCRIPTION:
 * @USER: wangjie
 * @DATE: 2022-11-01 15:54
 */
@Data
@ApiModel("援交MODEL")
public class SxAssistOutAndEnterModel implements Serializable {

    private static final long serialVersionUID = -2447125001711483243L;

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

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

    @ApiParam("援入援出明细项")
    private Integer assistOutAndEnterDetail;

    @ApiParam("援入援出明细项")
    private String assistOutAndEnterDetailName;

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

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

    @ApiParam("工作内容")
    private String workContent;

    @ApiParam("开始时间(年月日 时分秒)")
    private String startTime;

    @ApiParam("结束时间(年月日 时分秒)")
    private String endTime;

    @ApiParam("影响人数")
    private Integer influenceNumber;

    @ApiParam("间隔时间(分钟)")
    private Double intervalTime;

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

    @ApiParam("影响日期（年月日）")
    private String influenceDate;

    @ApiParam("外协（备注）")
    private String cooperation;

    @ApiParam("人件费")
    private String personnelCost;

    @ApiParam("金额（影响时间*生产线的人件费）")
    private Double amount;

    @ApiParam("确认人")
    private String confirmUser;

    @ApiParam("确认时间")
    private String confirmDatetime;

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

    @ApiParam("有效性")
    private Integer isValid = 1;

    @ApiParam("操作人")
    private String userInfo;

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

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

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

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

    @ApiParam("id")
    private String idStr;

    @ApiParam("影响日期（年月日）开始")
    private String influenceDateStart;

    @ApiParam("影响日期（年月日）结束")
    private String influenceDateEnd;

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

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

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

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

    @ApiParam("时间")
    private String date;

    @ApiParam("合计金额")
    private Double statistics;

    @ApiParam(value = "生产线代码")
    private String workCenterCodeArr;

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

    @ApiParam("责任归属")
    @AnnoOutputColumn(refClass = MesExtEnumUtil.LIABILITY_ATTRIBUTION.class, refForeignKey = "value", value = "description")
    private Integer liabilityAttribution;

    @ApiParam("担当和责任人是否确认")
    private Boolean confirm;

    @ApiParam("担当是否确认")
    private Boolean takeOnConfirmBool;

    @ApiParam("担当")
    private String takeOn;

    @ApiParam("担当用户名")
    private String takeOnUserName;

    @ApiParam("担当确认")
    private String takeOnConfirm;

    @ApiParam("担当确认时间")
    private String takeOnConfirmTime;

    @ApiParam("责任人是否确认")
    private Boolean personResponsibleConfirmBool;

    @ApiParam("责任人")
    private String personResponsible;

    @ApiParam("责任人用户名")
    private String personResponsibleUserName;

    @ApiParam("责任人确认")
    private String personResponsibleConfirm;

    @ApiParam("责任人确认时间")
    private String personResponsibleConfirmTime;

    @ApiParam("部长是否确认")
    private Boolean responsibleMinistergeConfirmBool;

    @ApiParam("责任部长")
    private String responsibleMinister;

    @ApiParam("责任部长用户名")
    private String responsibleMinisterUserName;

    @ApiParam("责任部长确认")
    private String responsibleMinisterConfirm;

    @ApiParam("责任部长确认时间")
    private String responsibleMinisterConfirmTime;

    @ApiParam("援进援出确认级别")
    @AnnoOutputColumn(refClass = MesExtEnumUtil.ASSIST_OUT_AND_ENTER_CONFIRM_LEVEL.class, refForeignKey = "value", value = "description")
    private Integer level;

    public SxAssistOutAndEnterModel() {}

    public SxAssistOutAndEnterModel(String influenceDateStart, String influenceDateEnd) {
        this.influenceDateStart = influenceDateStart;
        this.influenceDateEnd = influenceDateEnd;
    }

    public SxAssistOutAndEnterModel(String organizeCode, String influenceDateStart, String influenceDateEnd) {
        this.organizeCode = organizeCode;
        this.influenceDateStart = influenceDateStart;
        this.influenceDateEnd = influenceDateEnd;
    }

    public SxAssistOutAndEnterModel(String organizeCode, String workCenterCode, String influenceDateStart, String influenceDateEnd) {
        this.organizeCode = organizeCode;
        this.workCenterCode = workCenterCode;
        this.influenceDateStart = influenceDateStart;
        this.influenceDateEnd = influenceDateEnd;
    }
    public SxAssistOutAndEnterModel(String organizeCode, String categoryCode, String careerCode, Integer assistOutAndEnterDetail, String influenceDateStart, String influenceDateEnd,Boolean takeOnConfirmBool) {
        this.organizeCode = organizeCode;
        this.categoryCode = categoryCode;
        this.careerCode = careerCode;
        this.assistOutAndEnterDetail = assistOutAndEnterDetail;
        this.influenceDateStart = influenceDateStart;
        this.influenceDateEnd = influenceDateEnd;
        this.takeOnConfirmBool = takeOnConfirmBool;
    }

    public SxAssistOutAndEnterModel categoryCode(String categoryCode) {
        this.categoryCode = categoryCode;
        return this;
    }

    public SxAssistOutAndEnterModel categoryName(String categoryName) {
        this.categoryName = categoryName;
        return this;
    }

    public SxAssistOutAndEnterModel organizeCode(String organizeCode) {
        this.organizeCode = organizeCode;
        return this;
    }

    public SxAssistOutAndEnterModel ownerDepartment(String ownerDepartment) {
        this.ownerDepartment = ownerDepartment;
        return this;
    }

    public SxAssistOutAndEnterModel(String organizeCode, String influenceDateStart, String influenceDateEnd,
                                    boolean takeOnConfirmBool,boolean personResponsibleConfirmBool,boolean responsibleMinistergeConfirmBool) {
        this.organizeCode = organizeCode;
        this.influenceDateStart = influenceDateStart;
        this.influenceDateEnd = influenceDateEnd;
        this.takeOnConfirmBool = takeOnConfirmBool;
        this.personResponsibleConfirmBool = personResponsibleConfirmBool;
        this.responsibleMinistergeConfirmBool = responsibleMinistergeConfirmBool;
    }

    public SxAssistOutAndEnterModel liabilityAttribution(Integer liabilityAttribution){
        this.liabilityAttribution = liabilityAttribution;
        return this;
    }

    public SxAssistOutAndEnterModel ownerDepartmentArr(String ownerDepartmentArr){
        this.ownerDepartmentArr = ownerDepartmentArr;
        return this;
    }

}
