/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.workloan.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.projectrecord.entity.ProjectRecords;
import com.jeeplus.modules.workrepay.entity.WorkRepay;
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-10-16
 */
public class WorkLoan extends ActEntity<WorkLoan> {
	//通知87     //编码30   //流程表 ggh3125f1f194c82bdea93555c75edfv  //	assignmentType29
	private static final long serialVersionUID = 1L;
	public static final String SERIAL_BIZCODE = "30";//编号模板类型

	private String processInstanceId;		// 流程号
	private String officeId;		// 部门
	private String companyId;		// 公司
	private String status;		// 状态
	private WorkStaffBasicInfo workStaffBasicInfo;		// 档案
	private String num;		// 借款编码
	private String type;		// 借款类型   (1行政借款2项目借款)
	private ProjectRecords projectRecords;		// 借款项目
	private String contractNotRepay;		// 合同未还款累计
	private String money;		// 借款金额
	private String notRepay;		// 未还借款累计
	private Date loanDate;		// 借款日期
	private String repay;		// 还款金额
	private String repayState;		// 还款状态（1已还款2部分还款3未还款）
	private String home;
	private Date beginContractDate;		// 开始
	private Date endContractDate;		// 结束
	//还款明细
	private List<WorkRepay> workRepays = Lists.newArrayList();

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

	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 String getHome() {
		return home;
	}

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

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

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

	public List<WorkRepay> getWorkRepays() {
		return workRepays;
	}

	public void setWorkRepays(List<WorkRepay> workRepays) {
		this.workRepays = workRepays;
	}

	@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;
	}
	
	@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 getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}
	
	@ExcelField(title="借款类型", align=2, sort=13)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}



	@ExcelField(title="借款项目", align=2, sort=14)
	public ProjectRecords getProjectRecords() {
		return projectRecords;
	}

	public void setProjectRecords(ProjectRecords projectRecords) {
		this.projectRecords = projectRecords;
	}
	@ExcelField(title="合同未还款累计", align=2, sort=15)
	public String getContractNotRepay() {
		return contractNotRepay;
	}

	public void setContractNotRepay(String contractNotRepay) {
		this.contractNotRepay = contractNotRepay;
	}
	
	@ExcelField(title="借款金额", align=2, sort=16)
	public String getMoney() {
		return money;
	}

	public void setMoney(String money) {
		this.money = money;
	}
	
	@ExcelField(title="未还借款累计", align=2, sort=17)
	public String getNotRepay() {
		return notRepay;
	}

	public void setNotRepay(String notRepay) {
		this.notRepay = notRepay;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="借款日期", align=2, sort=18)
	public Date getLoanDate() {
		return loanDate;
	}

	public void setLoanDate(Date loanDate) {
		this.loanDate = loanDate;
	}
	
	@ExcelField(title="还款金额", align=2, sort=19)
	public String getRepay() {
		return repay;
	}

	public void setRepay(String repay) {
		this.repay = repay;
	}
	
	@ExcelField(title="还款状态", align=2, sort=20)
	public String getRepayState() {
		return repayState;
	}

	public void setRepayState(String repayState) {
		this.repayState = repayState;
	}
	
}