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

import com.google.common.collect.Lists;
import com.jeeplus.common.persistence.ActEntity;
import com.jeeplus.modules.sys.utils.UserUtils;
import com.jeeplus.modules.workcatalogueitem.entity.WorkCatalogueItem;
import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
import com.jeeplus.modules.workitemstock.entity.WorkItemStock;
import com.jeeplus.modules.worksupplier.entity.WorkSupplier;

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;

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

/**
 * 采购合同Entity
 * @author lw
 * @version 2018-07-11
 */
public class WorkStockContract extends ActEntity<WorkStockContract> {
	//通知 57
	private static final long serialVersionUID = 1L;
	private String processInstanceId;		// 流程号
	private String officeId;		// 部门
	private String officeName;      //部门名称
	private String companyId;		// 公司
	private String status;		// 状态
	private String name;		// 合同名称
	private String number;		// 合同编号
	private WorkSupplier supplier;		// 供应商
	private String linkName;		// 联系人名称
	private String money;		// 合同金额（元）
	private Date signDate;		// 签订日期
	private String completeStatus;		// 完成状态 1未完成  2已完成
	private String home;       //跳转首页标记
	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();    //附件 103
	private List<WorkClientAttachment> workRecordAttachments = Lists.newArrayList(); //归档附件 104
	private Date beginContractDate;		// 开始 签订日期
	private Date endContractDate;		// 结束 签订日期
	private List<WorkItemStock> workCatalogueItemList = Lists.newArrayList();//商品列表

	//导出属性
	private String supplierName;   //供应商名称
	private String monerStr;       //合同金额
	// 流程任务
	private Task task;
	private Map<String, Object> variables;
	// 运行中的流程实例
	private ProcessInstance processInstance;
	// 历史的流程实例
	private HistoricProcessInstance historicProcessInstance;
	// 流程定义
	private ProcessDefinition processDefinition;
	public WorkStockContract() {
		super();
	}

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

	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;
	}
	
	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}
	@ExcelField(title="合同状态", align=2, sort=20,dictType = "audit_state")
	public String getStatus() {
		return status;
	}

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

	public Date getBeginContractDate() {
		return beginContractDate;
	}

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

	public String getOfficeName() {
		return officeName;
	}

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

	public Date getEndContractDate() {
		return endContractDate;
	}

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

	@ExcelField(title="合同名称", align=2, sort=11)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@ExcelField(title="合同编号", align=2, sort=12)
	public String getNumber() {
		return number;
	}
	@ExcelField(title="供应商名称", align=2, sort=13)
	public String getSupplierName() {
		return supplierName;
	}
	@ExcelField(title="合同金额（元）", align=2, sort=15)
	public String getMonerStr() {
		return UserUtils.getDecimalFormat(new BigDecimal(this.money));
	}
	public void setNumber(String number) {
		this.number = number;
	}
	
	public WorkSupplier getSupplier() {
		return supplier;
	}

	public void setSupplier(WorkSupplier supplier) {
		this.supplier = supplier;
	}
	
	@ExcelField(title="联系人名称", align=2, sort=14)
	public String getLinkName() {
		return linkName;
	}

	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;
	}

	public List<WorkClientAttachment> getWorkRecordAttachments() {
		return workRecordAttachments;
	}

	public void setWorkRecordAttachments(List<WorkClientAttachment> workRecordAttachments) {
		this.workRecordAttachments = workRecordAttachments;
	}

	public Task getTask() {
		return task;
	}


	public void setSupplierName(String supplierName) {
		this.supplierName = supplierName;
	}



	public void setMonerStr(String monerStr) {
		this.monerStr = monerStr;
	}

	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 List<WorkItemStock> getWorkCatalogueItemList() {
		return workCatalogueItemList;
	}

	public void setWorkCatalogueItemList(List<WorkItemStock> workCatalogueItemList) {
		this.workCatalogueItemList = workCatalogueItemList;
	}

	public ProcessDefinition getProcessDefinition() {
		return processDefinition;
	}

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

	public void setLinkName(String linkName) {
		this.linkName = linkName;
	}
	

	public String getMoney() {
		return money;
	}

	public void setMoney(String money) {
		this.money = money;
	}
	
	@ExcelField(title="签订日期", align=2, sort=16)
	public Date getSignDate() {
		return signDate;
	}

	public void setSignDate(Date signDate) {
		this.signDate = signDate;
	}
	
	@ExcelField(title="完成状态", align=2, sort=17,dictType = "complete_status")
	public String getCompleteStatus() {
		return completeStatus;
	}

	public void setCompleteStatus(String completeStatus) {
		this.completeStatus = completeStatus;
	}
	
}