package com.hw.qms.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hw.common.core.annotation.Excel;
import com.hw.common.core.web.domain.BaseEntity;

/**
 * 质检工单实例节点对象 qms_quality_instance_activity
 *
 * @author xins
 * @date 2024-01-23
 */
public class QmsQualityInstanceActivity extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 质检工单实例节点ID */
    private Long instanceActivityId;

    /** 质检工单实例ID，关联qms_quality_instance的quality_instance_id */
    @Excel(name = "质检工单实例ID，关联qms_quality_instance的quality_instance_id")
    private Long qualityInstanceId;

    /** 工单流程节点ID（关联wf_process_activity的process_activity_id） */
    @Excel(name = "工单流程节点ID", readConverterExp = "关=联wf_process_activity的process_activity_id")
    private Long processActivityId;

    /** 处理意见 */
    @Excel(name = "处理意见")
    private String processHandleResolution;

    /** 工单处理描述（预留） */
    @Excel(name = "工单处理描述", readConverterExp = "预=留")
    private String processHandleDesc;

    /** 状态(0已结束，1执行中，2、待接取，3、已转发） */
    @Excel(name = "状态(0已结束，1执行中，2、待接取，3、已转发）")
    private String processHandleStatus;

    /** 工单流程步骤顺序 */
    @Excel(name = "工单流程步骤顺序")
    private Long processStepOrder;

    /** 执行开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "执行开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 执行结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "执行结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 处理人ID（关联sys_user的user_id) */
    @Excel(name = "处理人ID", readConverterExp = "处理人ID（关联sys_user的user_id)")
    private Long handleUserId;

    /** 处理人 */
    @Excel(name = "处理人")
    private String handleBy;

    /** 处理时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date handleTime;

    /** 转单人用户id或转发协助用户id;1、在转发时，生成新的工单节点实例，执行人id为转发的用户，而转单人是刚才转发给此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束2、在添加协助时，生成新的工单节点实例，执行人id为添加协助的用户，而转单人是刚才添加协助此用户的用户id，是否协助工单为1，并且转发后当前工单的状态仍为执行中 */
    @Excel(name = "转单人用户id或转发协助用户id;1、在转发时，生成新的工单节点实例，执行人id为转发的用户，而转单人是刚才转发给此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束此用户的用户id，是否协助工单为0，并且转发后当前工单的状态为已结束2、在添加协助时，生成新的工单节点实例，执行人id为添加协助的用户，而转单人是刚才添加协助此用户的用户id，是否协助工单为1，并且转发后当前工单的状态仍为执行中")
    private Long transferUserId;

    /** 质检文件信息 */
    private List<QmsCheckInstanceFile> qmsCheckInstanceFileList;

    private boolean editedAble = false;//是否可编辑

    public void setInstanceActivityId(Long instanceActivityId)
    {
        this.instanceActivityId = instanceActivityId;
    }

    public Long getInstanceActivityId()
    {
        return instanceActivityId;
    }
    public void setQualityInstanceId(Long qualityInstanceId)
    {
        this.qualityInstanceId = qualityInstanceId;
    }

    public Long getQualityInstanceId()
    {
        return qualityInstanceId;
    }
    public void setProcessActivityId(Long processActivityId)
    {
        this.processActivityId = processActivityId;
    }

    public Long getProcessActivityId()
    {
        return processActivityId;
    }
    public void setProcessHandleResolution(String processHandleResolution)
    {
        this.processHandleResolution = processHandleResolution;
    }

    public String getProcessHandleResolution()
    {
        return processHandleResolution;
    }
    public void setProcessHandleDesc(String processHandleDesc)
    {
        this.processHandleDesc = processHandleDesc;
    }

    public String getProcessHandleDesc()
    {
        return processHandleDesc;
    }
    public void setProcessHandleStatus(String processHandleStatus)
    {
        this.processHandleStatus = processHandleStatus;
    }

    public String getProcessHandleStatus()
    {
        return processHandleStatus;
    }
    public void setProcessStepOrder(Long processStepOrder)
    {
        this.processStepOrder = processStepOrder;
    }

    public Long getProcessStepOrder()
    {
        return processStepOrder;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setHandleUserId(Long handleUserId)
    {
        this.handleUserId = handleUserId;
    }

    public Long getHandleUserId()
    {
        return handleUserId;
    }
    public void setHandleBy(String handleBy)
    {
        this.handleBy = handleBy;
    }

    public String getHandleBy()
    {
        return handleBy;
    }
    public void setHandleTime(Date handleTime)
    {
        this.handleTime = handleTime;
    }

    public Date getHandleTime()
    {
        return handleTime;
    }
    public void setTransferUserId(Long transferUserId)
    {
        this.transferUserId = transferUserId;
    }

    public Long getTransferUserId()
    {
        return transferUserId;
    }

    public List<QmsCheckInstanceFile> getQmsCheckInstanceFileList() {
        return qmsCheckInstanceFileList;
    }

    public void setQmsCheckInstanceFileList(List<QmsCheckInstanceFile> qmsCheckInstanceFileList) {
        this.qmsCheckInstanceFileList = qmsCheckInstanceFileList;
    }

    public boolean isEditedAble() {
        return editedAble;
    }

    public void setEditedAble(boolean editedAble) {
        this.editedAble = editedAble;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("instanceActivityId", getInstanceActivityId())
            .append("qualityInstanceId", getQualityInstanceId())
            .append("processActivityId", getProcessActivityId())
            .append("processHandleResolution", getProcessHandleResolution())
            .append("processHandleDesc", getProcessHandleDesc())
            .append("processHandleStatus", getProcessHandleStatus())
            .append("processStepOrder", getProcessStepOrder())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("handleUserId", getHandleUserId())
            .append("handleBy", getHandleBy())
            .append("handleTime", getHandleTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("transferUserId", getTransferUserId())
            .toString();
    }
}
