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

import com.google.common.collect.Lists;
import com.jeeplus.common.persistence.ActEntity;
import com.jeeplus.modules.casebuildinfo.entity.CaseBuildInfo;
import com.jeeplus.modules.casecategory.entity.CaseCategory;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeeplus.modules.casedesigninfo.entity.CaseDesignInfo;
import com.jeeplus.modules.caseexecuteinfo.entity.CaseExecuteInfo;
import com.jeeplus.modules.casematerials.entity.CaseMaterials;
import com.jeeplus.modules.casematerialsnorm.entity.CaseMaterialsNorm;
import com.jeeplus.modules.casemechanicalnorm.entity.CaseMechanicalNorm;
import com.jeeplus.modules.casenorm.entity.CaseNorm;
import com.jeeplus.modules.casepeoplenorm.entity.CasePeopleNorm;
import com.jeeplus.modules.caseprojectfeature.entity.CaseProjectFeature;
import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
import com.jeeplus.modules.sys.entity.Area;
import com.jeeplus.modules.sys.entity.Office;
import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
import com.jeeplus.modules.workproject.entity.WorkProject;

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 liuw
 * @version 2018-01-24
 */
public class CaseInfo extends ActEntity<CaseInfo> {
	
	private static final long serialVersionUID = 1L;
	private CaseCategory caseCategory;		// 分类id
	private Boolean processEnded;            //流程是否走到了结束状态(结束：false，未结束：true)
	private String name;		// 案例名称
	private Date startDate;		// 开工日期
	private Date endDate;		// 竣工日期
	private Area area;		// 工程所在地
	private String price;		// 单位造价
	private ProjectRecords project;		// 所属项目
	private String feature;		// 案例特性
	private String record;        //偏差分析/记录
	private String source;        //案例来源
	private String companyName;   //公司名称
	private String officeName;   //部门名称
	private String contractName;    //项目名称
	private String ext;             //项目内外标识
	private String peculiarity;    //项目特征
	private String unit;       //造价指标单位
	private List<CaseBuildInfo> caseBuildInfoList = Lists.newArrayList();		// 建设单位子表列表
	private List<CaseDesignInfo> caseDesignInfoList = Lists.newArrayList();		// 设计单位子表列表
	private List<CaseExecuteInfo> caseExecuteInfoList = Lists.newArrayList();		// 施工单位子表列表
	private List<CaseProjectFeature> caseProjectFeatureList = Lists.newArrayList();		// 特征子表列表(弃用)
	private List<CaseMaterials> caseMaterialsList = Lists.newArrayList();		// 材料子表列表
	private List<CaseMaterialsNorm> caseMaterialsNormList = Lists.newArrayList();		// 材料消耗量指标列表
	private List<CaseMechanicalNorm> caseMechanicalNormList = Lists.newArrayList();		// 	机械消耗量指标列表
	private List<CasePeopleNorm> casePeopleNormList = Lists.newArrayList();		// 人工消耗量指标列表

	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();//附件表
	/*暂时弃用*/
	private List<CaseNorm> caseNormList = Lists.newArrayList();		// 指标子表列表

	private String status;      //审核状态（1暂存2审核中3未通过4已通过5已撤销）
	private String userids;      //本人及当前部门负责人
	private String shareStatus;   //共享状态（1一般案例：全平台 2典型案例:全公司）
	private String companyId;		// 公司id
	private String officeId;
	private Office office;         //部门
	private String processInstanceId; // 流程实例编号
	private String namee;			//查看修改标识
	private String dateOrder;      //时间排序
	private String home;
	private String memberId;      //会员id
	// -- 临时属性 --//
	// 流程任务
	private Task task;
	private Map<String, Object> variables;
	// 运行中的流程实例
	private ProcessInstance processInstance;
	// 历史的流程实例
	private HistoricProcessInstance historicProcessInstance;
	// 流程定义
	private ProcessDefinition processDefinition;

	public String getCompanyId() {
		return companyId;
	}

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

	public String getOfficeName() {
		return officeName;
	}

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

	public String getOfficeId() {
		return officeId;
	}

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

	public String getProcessInstanceId() {
		return processInstanceId;
	}

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

	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}

	public String getNamee() {
		return namee;
	}

	public void setNamee(String namee) {
		this.namee = namee;
	}

	public String getDateOrder() {
		return dateOrder;
	}

	public void setDateOrder(String dateOrder) {
		this.dateOrder = dateOrder;
	}

	public Task getTask() {
		return task;
	}

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

	public Map<String, Object> getVariables() {
		return variables;
	}

	public String getHome() {
		return home;
	}

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

	public void setVariables(Map<String, Object> variables) {
		this.variables = variables;
	}

	public ProcessInstance getProcessInstance() {
		return processInstance;
	}

	public void setProcessInstance(ProcessInstance processInstance) {
		this.processInstance = processInstance;
	}

	public Boolean getProcessEnded() {
		return processEnded;
	}

	public void setProcessEnded(Boolean processEnded) {
		this.processEnded = processEnded;
	}

	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 List<WorkClientAttachment> getWorkAttachments() {
		return workAttachments;
	}

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

	public List<CaseBuildInfo> getCaseBuildInfoList() {
		return caseBuildInfoList;
	}

	public void setCaseBuildInfoList(List<CaseBuildInfo> caseBuildInfoList) {
		this.caseBuildInfoList = caseBuildInfoList;
	}

	public List<CaseDesignInfo> getCaseDesignInfoList() {
		return caseDesignInfoList;
	}

	public void setCaseDesignInfoList(List<CaseDesignInfo> caseDesignInfoList) {
		this.caseDesignInfoList = caseDesignInfoList;
	}

	public String getStatus() {
		return status;
	}

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

	public String getSource() {
		return source;
	}

	public String getContractName() {
		return contractName;
	}

	public void setContractName(String contractName) {
		this.contractName = contractName;
	}

	public String getExt() {
		return ext;
	}

	public String getUserids() {
		return userids;
	}

	public void setUserids(String userids) {
		this.userids = userids;
	}

	public String getShareStatus() {
		return shareStatus;
	}

	public void setShareStatus(String shareStatus) {
		this.shareStatus = shareStatus;
	}

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

	public void setSource(String source) {
		this.source = source;
	}

	public String getPeculiarity() {
		return peculiarity;
	}

	public void setPeculiarity(String peculiarity) {
		this.peculiarity = peculiarity;
	}

	public List<CaseMaterialsNorm> getCaseMaterialsNormList() {
		return caseMaterialsNormList;
	}

	public void setCaseMaterialsNormList(List<CaseMaterialsNorm> caseMaterialsNormList) {
		this.caseMaterialsNormList = caseMaterialsNormList;
	}

	public List<CaseMechanicalNorm> getCaseMechanicalNormList() {
		return caseMechanicalNormList;
	}

	public void setCaseMechanicalNormList(List<CaseMechanicalNorm> caseMechanicalNormList) {
		this.caseMechanicalNormList = caseMechanicalNormList;
	}

	public List<CasePeopleNorm> getCasePeopleNormList() {
		return casePeopleNormList;
	}

	public void setCasePeopleNormList(List<CasePeopleNorm> casePeopleNormList) {
		this.casePeopleNormList = casePeopleNormList;
	}

	public String getCompanyName() {
		return companyName;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getRecord() {
		return record;
	}

	public void setRecord(String record) {
		this.record = record;
	}

	public List<CaseExecuteInfo> getCaseExecuteInfoList() {
		return caseExecuteInfoList;
	}

	public void setCaseExecuteInfoList(List<CaseExecuteInfo> caseExecuteInfoList) {
		this.caseExecuteInfoList = caseExecuteInfoList;
	}

	public List<CaseProjectFeature> getCaseProjectFeatureList() {
		return caseProjectFeatureList;
	}

	public void setCaseProjectFeatureList(List<CaseProjectFeature> caseProjectFeatureList) {
		this.caseProjectFeatureList = caseProjectFeatureList;
	}

	public List<CaseNorm> getCaseNormList() {
		return caseNormList;
	}

	public void setCaseNormList(List<CaseNorm> caseNormList) {
		this.caseNormList = caseNormList;
	}

	public List<CaseMaterials> getCaseMaterialsList() {
		return caseMaterialsList;
	}

	public void setCaseMaterialsList(List<CaseMaterials> caseMaterialsList) {
		this.caseMaterialsList = caseMaterialsList;
	}

	public CaseInfo() {
		super();
	}

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

	@ExcelField(title="分类id", align=2, sort=7)
	public CaseCategory getCaseCategory() {
		return caseCategory;
	}

	public void setCaseCategory(CaseCategory caseCategory) {
		this.caseCategory = caseCategory;
	}
	
	@ExcelField(title="案例名称", align=2, sort=8)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="开工日期", align=2, sort=9)
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="竣工日期", align=2, sort=10)
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@ExcelField(title="工程所在地", fieldType=Area.class, value="", align=2, sort=11)
	public Area getArea() {
		return area;
	}

	public void setArea(Area area) {
		this.area = area;
	}
	
	@ExcelField(title="单位造价", align=2, sort=12)
	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}
	
	@ExcelField(title="所属项目", align=2, sort=13)
	public ProjectRecords getProject() {
		return project;
	}

	public void setProject(ProjectRecords project) {
		this.project = project;
	}
	
	@ExcelField(title="案例特性", align=2, sort=14)
	public String getFeature() {
		return feature;
	}

	public void setFeature(String feature) {
		this.feature = feature;
	}

	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}
}