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

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

import com.fasterxml.jackson.annotation.JsonFormat;

import com.google.common.collect.Lists;
import com.jeeplus.common.persistence.ActEntity;
import com.jeeplus.common.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.workresignationtemplate.entity.WorkResignationTemplate;
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 rh
 * @version 2018-08-04
 */
public class WorkResignation extends ActEntity<WorkResignation> {
	//通知 71      zzsql3125f1f194clzsqea9miiii750904        bmzr    rlzy
	private static final long serialVersionUID = 1L;
	private String processInstanceId;		// 流程号
	private String companyId;		// 公司
	private String officeId;		// 部门
	private String status;		// 状态
	private WorkStaffBasicInfo workStaffBasicInfo;		// 人员
	private String type;		// 离职类型(1离职 2 退休)
	private Date date;		// 离职日期
	private String reason;		// 离职原因
	private Date endDate;		// 考勤截止日期

	private String home;       //跳转首页标记
	private Date beginContractDate;		// 开始       离职
	private Date endContractDate;		// 结束
	private Date beginContractDates;		// 开始  考勤
	private Date endContractDates;		// 结束
	private String jobGrade;
	private String pay;
	List<WorkResignationTemplate> templateList = Lists.newArrayList();
	// 流程任务
	private Task task;
	private Map<String, Object> variables;
	// 运行中的流程实例
	private ProcessInstance processInstance;
	// 历史的流程实例
	private HistoricProcessInstance historicProcessInstance;
	// 流程定义
	private ProcessDefinition processDefinition;

	public String getHome() {
		return home;
	}

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

	public Date getBeginContractDate() {
		return beginContractDate;
	}

	public void setBeginContractDate(Date beginContractDate) {
		this.beginContractDate = beginContractDate;
	}

	public Date getEndContractDate() {
		return endContractDate;
	}

	public void setEndContractDate(Date endContractDate) {
		this.endContractDate = endContractDate;
	}

	public Date getBeginContractDates() {
		return beginContractDates;
	}

	public void setBeginContractDates(Date beginContractDates) {
		this.beginContractDates = beginContractDates;
	}

	public Date getEndContractDates() {
		return endContractDates;
	}

	public void setEndContractDates(Date endContractDates) {
		this.endContractDates = endContractDates;
	}

	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 String getJobGrade() {
		return jobGrade;
	}

	public void setJobGrade(String jobGrade) {
		this.jobGrade = jobGrade;
	}

	public String getPay() {
		return pay;
	}

	public List<WorkResignationTemplate> getTemplateList() {
		return templateList;
	}

	public void setTemplateList(List<WorkResignationTemplate> templateList) {
		this.templateList = templateList;
	}

	public void setPay(String pay) {
		this.pay = pay;
	}

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

	public ProcessDefinition getProcessDefinition() {
		return processDefinition;
	}

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

	public WorkResignation() {
		super();
	}

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

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

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

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	
	@ExcelField(title="部门", align=2, sort=9)
	public String getOfficeId() {
		return officeId;
	}

	public void setOfficeId(String officeId) {
		this.officeId = officeId;
	}
	
	@ExcelField(title="状态", align=2, sort=10)
	public String getStatus() {
		return status;
	}

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

	public WorkStaffBasicInfo getWorkStaffBasicInfo() {
		return workStaffBasicInfo;
	}

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

	@ExcelField(title="离职类型", dictType="resignation_type", align=2, sort=12)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="离职日期", align=2, sort=13)
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
	@ExcelField(title="离职原因", align=2, sort=14)
	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="考勤截止日期", align=2, sort=15)
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
}