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

import com.google.common.collect.Lists;
import com.jeeplus.common.persistence.ActEntity;
import com.jeeplus.modules.sys.entity.Office;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeeplus.common.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;

/**
 * 外勤申请Entity
 * @author ssrh
 * @version 2018-09-06
 */
public class WorkField extends ActEntity<WorkField> {
	//外勤zzsqliuokjyhg94yuhbqasdfiiii750904（通知79 附件75 编码29 assignmentType21）
	private static final long serialVersionUID = 1L;
	public static final String SERIAL_BIZCODE = "29";
	private String processInstanceId;		// 流程号
	private String officeId;	// 部门
	private String companyId;		// 公司
	private String num;		// 加班编号
	private String name;		// 姓名
	private Date startDate;		// 开始日期
	private String startType;		// 类型1
	private Date endDate;		// 结束日期
	private String endType;		// 类型2
	private String reason;		// 外勤事由
	private WorkStaffBasicInfo workStaffBasicInfo;		// 档案
	private String status;		// 状态
	private String days;		// 外勤天数
	private String home;
	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();

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

	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 WorkField() {
		super();
	}

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

	@ExcelField(title="流程号", align=2, sort=7)
	public String getProcessInstanceId() {
		return processInstanceId;
	}

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

	public String getOfficeId() {
		return officeId;
	}

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

	@ExcelField(title="公司", align=2, sort=9)
	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	
	@ExcelField(title="加班编号", align=2, sort=10)
	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}
	
	@ExcelField(title="姓名", align=2, sort=11)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="开始日期", align=2, sort=12)
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	@ExcelField(title="类型1", align=2, sort=13)
	public String getStartType() {
		return startType;
	}

	public void setStartType(String startType) {
		this.startType = startType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="结束日期", align=2, sort=14)
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@ExcelField(title="类型2", align=2, sort=15)
	public String getEndType() {
		return endType;
	}

	public void setEndType(String endType) {
		this.endType = endType;
	}
	
	@ExcelField(title="外勤事由", align=2, sort=16)
	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public WorkStaffBasicInfo getWorkStaffBasicInfo() {
		return workStaffBasicInfo;
	}

	public void setWorkStaffBasicInfo(WorkStaffBasicInfo workStaffBasicInfo) {
		this.workStaffBasicInfo = workStaffBasicInfo;
	}

	public String getHome() {
		return home;
	}

	public void setHome(String home) {
		this.home = home;
	}

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

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

	@ExcelField(title="状态", align=2, sort=18)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@ExcelField(title="外勤天数", align=2, sort=19)
	public String getDays() {
		return days;
	}

	public void setDays(String days) {
		this.days = days;
	}
	
}