/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.workbidingdocument.entity;

import com.jeeplus.common.persistence.ActEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.sys.entity.Workattachment;
import com.jeeplus.modules.workbidproject.entity.WorkBidProject;
import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 标书Entity
 * @author fgy
 * @version 2017-10-16
 */
public class WorkBidingDocument extends ActEntity<WorkBidingDocument> {
	
	private static final long serialVersionUID = 1L;
	private WorkBidProject workBidProject;		// 投标项目
	private String status ;		// 编制状态(0待编制、1暂存、2审核中、3已通过、4未通过、5已撤销)
	private String processInstanceId;		// 实例流程id
	private Boolean processEnded;            //流程是否走到了结束状态(结束：false，未结束：true)
	private String quote;		// 报价
	private String companyId;  //公司id
	private String officeId;
	private String queryCon; //
	private String name ;     //仅用作一些数据的传递，无实义
	private String optionFlag ; //是否可以修改（0否，1是，2是  --- 项目负责人和登记人修改权限为1，部门负责人的修改权限为2）
								//是否可以选择送标员（0否，1是 --- 仅项目登记人权限）
	private String sender ;   // 送标员id
	private String bidStatus = "0" ; //中标状态（0待投标，1投标进行中，2中标，3未中标）
	//work_attachment中attachment_flag = 0 评价汇总表 , attachment_flag = 1 标书编制表
	private List<Workattachment> workattachmentList = new ArrayList<>();
	private List<Workattachment> workAttachments = new ArrayList<>();

	// -- 临时属性 --//
	// 流程任务
	private Task task;
	private Map<String, Object> variables;
	// 运行中的流程实例
	private ProcessInstance processInstance;
	// 历史的流程实例
	private HistoricProcessInstance historicProcessInstance;
	// 流程定义
	private ProcessDefinition processDefinition;

	public WorkBidingDocument() {
		super();
	}

	public WorkBidingDocument(String id){
		super(id);
	}

	@ExcelField(title="投标项目id", align=2, sort=1)
	public WorkBidProject getWorkBidProject() {
		return workBidProject;
	}

	public void setWorkBidProject(WorkBidProject workBidProject) {
		this.workBidProject = workBidProject;
	}

	@ExcelField(title="当前状态(0待编制、1暂存、2审核中、3已通过、4未通过)", dictType="biding_document_type", align=2, sort=4)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@ExcelField(title="报价", align=2, sort=7)
	public String getQuote() {
		return quote;
	}

	public void setQuote(String quote) {
		this.quote = quote;
	}

	public Task getTask() {
		return task;
	}

	public void setTask(Task task) {
		this.task = task;
	}

	public Map<String, Object> getVariables() {
		return variables;
	}

	public void setVariables(Map<String, Object> variables) {
		this.variables = variables;
	}

	public ProcessInstance getProcessInstance() {
		return processInstance;
	}

	public void setProcessInstance(ProcessInstance processInstance) {
		this.processInstance = processInstance;
	}

	public HistoricProcessInstance getHistoricProcessInstance() {
		return historicProcessInstance;
	}

	public void setHistoricProcessInstance(HistoricProcessInstance historicProcessInstance) {
		this.historicProcessInstance = historicProcessInstance;
	}

	public ProcessDefinition getProcessDefinition() {
		return processDefinition;
	}

	public void setProcessDefinition(ProcessDefinition processDefinition) {
		this.processDefinition = processDefinition;
	}

	public String getProcessInstanceId() {
		return processInstanceId;
	}

	public void setProcessInstanceId(String processInstanceId) {
		this.processInstanceId = processInstanceId;
	}


	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public List<Workattachment> getWorkattachmentList() {
		return workattachmentList;
	}

	public void setWorkattachmentList(List<Workattachment> workattachmentList) {
		this.workattachmentList = workattachmentList;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}


	public String getSender() {
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	public String getBidStatus() {
		return bidStatus;
	}

	public void setBidStatus(String bidStatus) {
		this.bidStatus = bidStatus;
	}

	public String getOptionFlag() {
		return optionFlag;
	}

	public void setOptionFlag(String optionFlag) {
		this.optionFlag = optionFlag;
	}

	public String getOfficeId() {
		return officeId;
	}

	public void setOfficeId(String officeId) {
		this.officeId = officeId;
	}

	public String getQueryCon() {
		return queryCon;
	}

	public void setQueryCon(String queryCon) {
		this.queryCon = queryCon;
	}

	public List<Workattachment> getWorkAttachments() {
		return workAttachments;
	}

	public void setWorkAttachments(List<Workattachment> workAttachments) {
		this.workAttachments = workAttachments;
	}

	public Boolean getProcessEnded() {
		return processEnded;
	}

	public void setProcessEnded(Boolean processEnded) {
		this.processEnded = processEnded;
	}
}
