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

import com.fasterxml.jackson.annotation.JsonFormat;
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.workfullmanage.entity.WorkFullManage;
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.Date;
import java.util.List;
import java.util.Map;

/**
 * 项目实施Entity
 * @author fgy
 * @version 2017-10-27
 */
public class WorkFullExecute extends ActEntity<WorkFullExecute> {
	
	private static final long serialVersionUID = 1L;
	private String fileName;		// 文件名
	private String fileType;		// 文件类型（1地勘报告、2施工图、3图审报告、4会审纪要、5投标书、6甲供材料、7设备台账、8工程联系函、9建议、10合同管理台账、11造价咨询专题会议纪要、12造价咨询工作报告、13其他）
	private String fileTypeDeclare;		// 文件类型说明
	private Date startTime;		// 编制开始日期
	private Date endTime;		// 编制完成日期
	private WorkFullManage workFullManage;		// 项目
	private String workFullManageId ;           //项目id
	private String processInstanceId;		// 实例流程id
	private Boolean processEnded;            //流程是否走到了结束状态(结束：false，未结束：true)
	private String companyId;		// 公司id
	private String officeId;
	private String status ;         //审核状态（0暂存、1审核中、2已通过、3未通过,4已撤销）
	private List<Workattachment> executeFile;       //实施文件 work_attachment中attachment_flag = 2
	private Workattachment exeFile;
	private List<Workattachment> manuscriptFile;   //工作底稿  work_attachment中attachment_flag = 3
	private String name ;     //仅用作一些数据的传递，无实义
	private List<Workattachment> manuscriptList = new ArrayList<>();  //工作底稿
	private List<Workattachment> workAttachments;
	// 流程任务
	private Task task;
	//
	private Map<String, Object> variables;
	// 运行中的流程实例
	private ProcessInstance processInstance;
	// 历史的流程实例
	private HistoricProcessInstance historicProcessInstance;
	// 流程定义
	private ProcessDefinition processDefinition;

	public WorkFullExecute() {
		super();
	}

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

	@ExcelField(title="文件名", align=2, sort=1)
	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	
	@ExcelField(title="文件类型（1地勘报告、2施工图、3图审报告、4会审纪要、5投标书、6甲供材料、7设备台账、8工程联系函、9建议、10合同管理台账、11造价咨询专题会议纪要、12造价咨询工作报告、13其他）", dictType="work_full_execute_fileType", align=2, sort=2)
	public String getFileType() {
		return fileType;
	}

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}
	
	@ExcelField(title="文件类型说明", align=2, sort=3)
	public String getFileTypeDeclare() {
		return fileTypeDeclare;
	}

	public void setFileTypeDeclare(String fileTypeDeclare) {
		this.fileTypeDeclare = fileTypeDeclare;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="编制开始日期", align=2, sort=4)
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="编制完成日期", align=2, sort=5)
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	@ExcelField(title="项目id", align=2, sort=6)
	public WorkFullManage getWorkFullManage() {
		return workFullManage;
	}

	public void setWorkFullManage(WorkFullManage workFullManage) {
		this.workFullManage = workFullManage;
	}
	
	@ExcelField(title="实例流程id", align=2, sort=7)
	public String getProcessInstanceId() {
		return processInstanceId;
	}

	public void setProcessInstanceId(String processInstanceId) {
		this.processInstanceId = processInstanceId;
	}
	
	@ExcelField(title="公司id", align=2, sort=8)
	public String getCompanyId() {
		return companyId;
	}

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

	public List<Workattachment> getManuscriptList() {
		return manuscriptList;
	}

	public void setManuscriptList(List<Workattachment> manuscriptList) {
		this.manuscriptList = manuscriptList;
	}

	public String getWorkFullManageId() {
		return workFullManageId;
	}

	public void setWorkFullManageId(String workFullManageId) {
		this.workFullManageId = workFullManageId;
	}

	public String getStatus() {
		return status;
	}

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

	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 getName() {
		return name;
	}

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

	public Task getTask() {
		return task;
	}

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

	public String getOfficeId() {
		return officeId;
	}

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

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

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

	public List<Workattachment> getExecuteFile() {
		return executeFile;
	}

	public void setExecuteFile(List<Workattachment> executeFile) {
		this.executeFile = executeFile;
	}

	public List<Workattachment> getManuscriptFile() {
		return manuscriptFile;
	}

	public void setManuscriptFile(List<Workattachment> manuscriptFile) {
		this.manuscriptFile = manuscriptFile;
	}

	public Workattachment getExeFile() {
		return exeFile;
	}

	public void setExeFile(Workattachment exeFile) {
		this.exeFile = exeFile;
	}

	public Boolean getProcessEnded() {
		return processEnded;
	}

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