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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.collect.Lists;
import com.jeeplus.common.persistence.ActEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
import com.jeeplus.modules.workproject.entity.WorkProject;
import com.jeeplus.modules.workreimbursementback.entity.WorkReimbursementBack;
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.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 财务报销Entity
 * @author 孟祥越
 * @version 2017-05-02
 */
public class WorkReimbursement extends ActEntity<WorkReimbursement> {
	
	private static final long serialVersionUID = 1L;
	public static final String SERIAL_BIZCODE = "7";//编号模板类型

	private String processInstanceId; // 流程实例编号
	private String number;		// 报销编号
	private String businessType;		// 业务类型
	private String businessTypeName;		// 业务类型
	private String officeId;		// 报销人的部门编号   项目登记人的信息
	private String submitterId;		// 报销人 项目登记人
	private String submitterName;		// 报销人 项目登记人
	private Date submitterDate;		// 报销日期
	private ProjectRecords project;		// 报销项目
	private BigDecimal money;		// 报销金额
	private String status;		// 报销状态
	private String attachment;		// 附件
	private String companyId; //提交人的公司编号
	private String projectMaster;
	private String projectMasterName;
	private String submitter;
	private WorkAccount workAccount;
	private String projectName;
	private String ext;
	private String officeName;
	private String bankCard;
	private String isPublic;//是否对公报销
	private String comname;//公司名称
	private String backmoney;//本次还款总额
	private String backmoneys;
	private String checkMoneys;
	private String createOffice;// 创建人的部门编号
	private String type;
	public String getCreateOffice() {
		return createOffice;
	}

	public void setCreateOffice(String createOffice) {
		this.createOffice = createOffice;
	}

	public String getBackmoneys() {
		return backmoneys;
	}

	public void setBackmoneys(String backmoneys) {
		this.backmoneys = backmoneys;
	}

	public String getCheckMoneys() {
		return checkMoneys;
	}

	public void setCheckMoneys(String checkMoneys) {
		this.checkMoneys = checkMoneys;
	}

	public String getBackmoney() {
		return backmoney;
	}

	public void setBackmoney(String backmoney) {
		this.backmoney = backmoney;
	}

	public String getAchivesId() {
		return achivesId;
	}

	public void setAchivesId(String achivesId) {
		this.achivesId = achivesId;
	}

	private String achivesId;
	public String getComnameId() {
		return comnameId;
	}

	public void setComnameId(String comnameId) {
		this.comnameId = comnameId;
	}

	private String comnameId;//公司名称
	private String bank;//开户行
	private String bankNo;//银行账号
	private List<WorkAccount> workAccountList = Lists.newArrayList();		// 子表列表
	private List<ReimbursementVATTax> reimbursementVATTaxes = Lists.newArrayList();		// 子表列表
	private List<WorkReimbursementBack> reimbursementBackList = Lists.newArrayList();		// 子表列表
	public String getUserName() {
		return userName;
	}

	public List<WorkReimbursementBack> getReimbursementBackList() {
		return reimbursementBackList;
	}

	public void setReimbursementBackList(List<WorkReimbursementBack> reimbursementBackList) {
		this.reimbursementBackList = reimbursementBackList;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	private String userName;//公司名称
	private String limitCond; //限制条件
	private String queryCon; //限制条件
	private String home;
	private Date startDate;
	private Date endDate;
	private Task task;
	private Map<String, Object> variables;
	// 运行中的流程实例
	private ProcessInstance processInstance;
	// 历史的流程实例
	private HistoricProcessInstance historicProcessInstance;
	// 流程定义
	private ProcessDefinition processDefinition;
	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();
	public List<WorkClientAttachment> getWorkAttachments() {
		return workAttachments;
	}
	// 流程任务

	public String getIsPublic() {
		return isPublic;
	}

	public void setIsPublic(String isPublic) {
		this.isPublic = isPublic;
	}

	public String getComname() {
		return comname;
	}

	public void setComname(String comname) {
		this.comname = comname;
	}

	public String getBank() {
		return bank;
	}

	public void setBank(String bank) {
		this.bank = bank;
	}

	public String getBankNo() {
		return bankNo;
	}

	public void setBankNo(String bankNo) {
		this.bankNo = bankNo;
	}

//	private List<WorkClientAttachment> workClientAttachmentList = Lists.newArrayList();

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

	public WorkReimbursement() {
		super();
	}

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

	@ExcelField(title="报销编号", align=2, sort=1)
	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}
	
	@ExcelField(title="业务类型", align=2, sort=2)
	public String getBusinessType() {
		return businessType;
	}

	public void setBusinessType(String businessType) {
		this.businessType = businessType;
	}
	

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="报销日期", align=2, sort=5)
	public Date getSubmitterDate() {
		return submitterDate;
	}

	public void setSubmitterDate(Date submitterDate) {
		this.submitterDate = submitterDate;
	}
	

	@ExcelField(title="报销金额", align=2, sort=7)
	public BigDecimal getMoney() {
		return money;
	}

	public void setMoney(BigDecimal money) {
		this.money = money;
	}
	
	@ExcelField(title="报销状态", align=2, dictType = "reimbursement_status" ,sort=8)
	public String getStatus() {
		return status;
	}

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

	@ExcelField(title="报销公司/部门", align=2, sort=3)
    public String getOfficeId() {
        return officeId;
    }

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

	@ExcelField(title="报销人", align=2, sort=4)
    public String getSubmitterId() {
        return submitterId;
    }

    public void setSubmitterId(String submitterId) {
        this.submitterId = submitterId;
    }

	@ExcelField(title="报销项目", align=2, value="project.projectName",sort=5)
    public ProjectRecords getProject() {
        return project;
    }

    public void setProject(ProjectRecords project) {
        this.project = project;
    }

	public String getSubmitter() {
		return submitter;
	}

	public void setSubmitter(String submitter) {
		this.submitter = submitter;
	}

	@ExcelField(title="附件", align=2, sort=9)
	public String getAttachment() {
		return attachment;
	}

    public void setAttachment(String attachment) {
		this.attachment = attachment;
	}

	public String getCompanyId() {
		return companyId;
	}

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

	public List<WorkAccount> getWorkAccountList() {
		return workAccountList;
	}

	public void setWorkAccountList(List<WorkAccount> workAccountList) {
		this.workAccountList = workAccountList;
	}

	public List<ReimbursementVATTax> getReimbursementVATTaxes() {
		return reimbursementVATTaxes;
	}

	public void setReimbursementVATTaxes(List<ReimbursementVATTax> reimbursementVATTaxes) {
		this.reimbursementVATTaxes = reimbursementVATTaxes;
	}

	public String getProcessInstanceId() {
		return processInstanceId;
	}

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

	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 WorkAccount getWorkAccount() {
		return workAccount;
	}

	public void setWorkAccount(WorkAccount workAccount) {
		this.workAccount = workAccount;
	}

//	public List<WorkClientAttachment> getWorkClientAttachmentList() {
//		return workClientAttachmentList;
//	}
//
//	public void setWorkClientAttachmentList(List<WorkClientAttachment> workClientAttachmentList) {
//		this.workClientAttachmentList = workClientAttachmentList;
//	}

	public String getLimitCond() {
		return limitCond;
	}

	public void setLimitCond(String limitCond) {
		this.limitCond = limitCond;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getExt() {
		return ext;
	}

	public void setExt(String ext) {
		this.ext = ext;
	}

	public String getOfficeName() {
		return officeName;
	}

	public void setOfficeName(String officeName) {
		this.officeName = officeName;
	}

	public String getProjectMaster() {
		return projectMaster;
	}

	public void setProjectMaster(String projectMaster) {
		this.projectMaster = projectMaster;
	}

	public String getQueryCon() {
		return queryCon;
	}

	public void setQueryCon(String queryCon) {
		this.queryCon = queryCon;
	}

	public String getBusinessTypeName() {
		return businessTypeName;
	}

	public void setBusinessTypeName(String businessTypeName) {
		this.businessTypeName = businessTypeName;
	}

	public String getSubmitterName() {
		return submitterName;
	}

	public void setSubmitterName(String submitterName) {
		this.submitterName = submitterName;
	}

	public String getProjectMasterName() {
		return projectMasterName;
	}

	public void setProjectMasterName(String projectMasterName) {
		this.projectMasterName = projectMasterName;
	}

	public String getBankCard() {
		return bankCard;
	}

	public void setBankCard(String bankCard) {
		this.bankCard = bankCard;
	}

	public String getHome() {
		return home;
	}

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

	public Date getStartDate() {
		return startDate;
	}

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

	public Date getEndDate() {
		return endDate;
	}

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

	public String getType() {
		return type;
	}

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