package com.zkqy.execution.produce.dispersed.entity;

import com.zkqy.common.annotation.Excel;
import com.zkqy.common.core.domain.BaseEntity;

import java.io.Serializable;

/**
 * 流程执行任务对象 bpm_execute_process
 *
 * @author hzh
 * @date 2023-11-01
 */
public class BpmExecuteProcess extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 435235L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 流程任务执行别名
     */
    @Excel(name = "流程任务执行别名")
    private String taskKey;

    /**
     * 任务计划key租户业务表中的唯一编码
     */
    @Excel(name = "任务计划key租户业务表中的唯一编码")
    private String taskPlanKey;

    /**
     * 任务名称，租户业务库中的计划名称（通过联合查询的方式得到）
     */
    @Excel(name = "任务名称")
    private String taskName;

    /**
     * 任务节点别名（记录当前流程执行过的最后一个节点id）
     */
    @Excel(name = "任务节点别名", readConverterExp = "记=录当前流程执行过的最后一个节点id")
    private String taskNodeKey;
    /**
     * 记录下一个需要执行的节点
     */
    @Excel(name = "任务节点别名", readConverterExp = "记录当前流程下一个执行节点")
    private String taskNodeNextKey;

    /**
     * 定义的流程别名
     */
    @Excel(name = "定义的流程别名")
    private String taskProcessKey;

    /**
     * xml标签内容
     */
    @Excel(name = "xml标签内容")
    private String taskProcessXmlContent;

    /**
     * 任务流程状态
     */
    @Excel(name = "任务流程状态")
    private Long taskProcessState;

    /**
     * 版本注释
     */
    @Excel(name = "版本注释")
    private String taskProcessNote;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    /**
     * 流程类型
     */
    @Excel(name = "流程类型")
    private String taskProcessType;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTaskKey() {
        return taskKey;
    }

    public void setTaskKey(String taskKey) {
        this.taskKey = taskKey;
    }

    public String getTaskPlanKey() {
        return taskPlanKey;
    }

    public void setTaskPlanKey(String taskPlanKey) {
        this.taskPlanKey = taskPlanKey;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskNodeKey() {
        return taskNodeKey;
    }

    public void setTaskNodeKey(String taskNodeKey) {
        this.taskNodeKey = taskNodeKey;
    }

    public String getTaskProcessKey() {
        return taskProcessKey;
    }

    public void setTaskProcessKey(String taskProcessKey) {
        this.taskProcessKey = taskProcessKey;
    }

    public String getTaskProcessXmlContent() {
        return taskProcessXmlContent;
    }

    public void setTaskProcessXmlContent(String taskProcessXmlContent) {
        this.taskProcessXmlContent = taskProcessXmlContent;
    }

    public Long getTaskProcessState() {
        return taskProcessState;
    }

    public void setTaskProcessState(Long taskProcessState) {
        this.taskProcessState = taskProcessState;
    }

    public String getTaskProcessNote() {
        return taskProcessNote;
    }

    public void setTaskProcessNote(String taskProcessNote) {
        this.taskProcessNote = taskProcessNote;
    }

    public String getDelFlag() {
        return (delFlag == null || delFlag.isEmpty()) ? "0" : delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getTaskProcessType() {
        return taskProcessType;
    }

    public void setTaskProcessType(String taskProcessType) {
        this.taskProcessType = taskProcessType;
    }

    public String getTaskNodeNextKey() {
        return taskNodeNextKey;
    }

    public void setTaskNodeNextKey(String taskNodeNextKey) {
        this.taskNodeNextKey = taskNodeNextKey;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("BpmExecuteProcess{");
        sb.append("id=").append(id);
        sb.append(", taskKey='").append(taskKey).append('\'');
        sb.append(", taskPlanKey='").append(taskPlanKey).append('\'');
        sb.append(", taskName='").append(taskName).append('\'');
        sb.append(", taskNodeKey='").append(taskNodeKey).append('\'');
        sb.append(", taskNodeNextKey='").append(taskNodeNextKey).append('\'');
        sb.append(", taskProcessKey='").append(taskProcessKey).append('\'');
        sb.append(", taskProcessXmlContent='").append(taskProcessXmlContent).append('\'');
        sb.append(", taskProcessState=").append(taskProcessState);
        sb.append(", taskProcessNote='").append(taskProcessNote).append('\'');
        sb.append(", delFlag='").append(delFlag).append('\'');
        sb.append(", taskProcessType='").append(taskProcessType).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
