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

import com.google.common.collect.Lists;
import com.jeeplus.common.persistence.ActEntity;
import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
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 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 lw
 * @version 2018-07-31
 */
public class WorkRelationship extends ActEntity<WorkRelationship> {
	//通知 67   附件108     zzsql3125f1f194c82bdea9miiii750904        rlzybzr    rlzy    qyr
	//remarks-1代表首次添加 0/空代表非首次添加
	//首次签约  通知90     附件108      zzsql3125f1f194c1234ea9miiii750904    qyr
	// 是否自动续签is_relation              //距离合同终止日期天数      relation_day
	private static final long serialVersionUID = 1L;
	private String processInstanceId;		// 流程号
	private String officeId;		// 部门
	private String companyId;		// 公司
	private String status;		// 状态
	private WorkStaffBasicInfo workStaffBasicInfo;		// 人员主键
	private String contractType;		// 合同类型relsp_cType总：1劳动合同2劳务合同3补充协议   relsp_cType1 ：1劳动合同3补充协议 relsp_cType2 ：2劳务3补充
	private String contractNum;		// 合同编号
	private String contractLimit;		// 合同期限  contract_limit 1固定 2无固定 3以任务为限
	private Date contractStartTime;		// 合同起始日期
	private Date contractEndTime;		// 合同终止日期
	private Date tryEndTime;		// 试用期结束日期
	private Date transactTime;		// 办理日期
	private String renew;			//续签/不续签    0续签  1不续签
	private String home;       //跳转首页标记
	private Date beginContractDate;		// 开始
	private Date endContractDate;		// 结束
	private Date beginContractDates;		// 开始
	private Date endContractDates;		// 结束
	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();//附件 108
	private  List<WorkRelationship> workRelationships = Lists.newArrayList(); //历史关系

	private String dateSign;         //自动流程发起标记
	private String jobGrade;
	private String pay;

	//临时属性
	private String endDate;
	private String startDate;
	private String tDate;
	private String url;
	private String uName;
	// 流程任务
	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 List<WorkClientAttachment> getWorkAttachments() {
		return workAttachments;
	}

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

	public Task getTask() {
		return task;
	}

	public String getEndDate() {
		return endDate;
	}

	public String getDateSign() {
		return dateSign;
	}

	public void setDateSign(String dateSign) {
		this.dateSign = dateSign;
	}

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

	public String getStartDate() {
		return startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String gettDate() {
		return tDate;
	}

	public void settDate(String tDate) {
		this.tDate = tDate;
	}

	public String getuName() {
		return uName;
	}

	public void setuName(String uName) {
		this.uName = uName;
	}

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

	public String getJobGrade() {
		return jobGrade;
	}

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

	public String getPay() {
		return pay;
	}

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

	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 List<WorkRelationship> getWorkRelationships() {
		return workRelationships;
	}

	public void setWorkRelationships(List<WorkRelationship> workRelationships) {
		this.workRelationships = workRelationships;
	}

	public ProcessDefinition getProcessDefinition() {
		return processDefinition;
	}

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

	public WorkRelationship() {
		super();
	}

	public WorkRelationship(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 getOfficeId() {
		return officeId;
	}

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

	public String getRenew() {
		return renew;
	}

	public void setRenew(String renew) {
		this.renew = renew;
	}

	@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 getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@ExcelField(title="人员主键", align=2, sort=11)
	public WorkStaffBasicInfo getWorkStaffBasicInfo() {
		return workStaffBasicInfo;
	}

	public void setWorkStaffBasicInfo(WorkStaffBasicInfo workStaffBasicInfo) {
		this.workStaffBasicInfo = workStaffBasicInfo;
	}
	
	@ExcelField(title="合同类型", align=2, sort=12)
	public String getContractType() {
		return contractType;
	}

	public void setContractType(String contractType) {
		this.contractType = contractType;
	}
	
	@ExcelField(title="合同编号", align=2, sort=13)
	public String getContractNum() {
		return contractNum;
	}

	public void setContractNum(String contractNum) {
		this.contractNum = contractNum;
	}
	
	@ExcelField(title="合同期限", align=2, sort=14)
	public String getContractLimit() {
		return contractLimit;
	}

	public void setContractLimit(String contractLimit) {
		this.contractLimit = contractLimit;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="合同起始日期", align=2, sort=15)
	public Date getContractStartTime() {
		return contractStartTime;
	}

	public void setContractStartTime(Date contractStartTime) {
		this.contractStartTime = contractStartTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="合同终止日期", align=2, sort=16)
	public Date getContractEndTime() {
		return contractEndTime;
	}

	public void setContractEndTime(Date contractEndTime) {
		this.contractEndTime = contractEndTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="试用期结束日期", align=2, sort=17)
	public Date getTryEndTime() {
		return tryEndTime;
	}

	public void setTryEndTime(Date tryEndTime) {
		this.tryEndTime = tryEndTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="办理日期", align=2, sort=18)
	public Date getTransactTime() {
		return transactTime;
	}

	public void setTransactTime(Date transactTime) {
		this.transactTime = transactTime;
	}
	
}