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


import com.jeeplus.common.persistence.ActEntity;
import com.jeeplus.common.persistence.DataEntity;
import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
import com.jeeplus.modules.sys.entity.User;
import com.jeeplus.modules.sys.entity.Workattachment;
import com.jeeplus.modules.workcontent.entity.WorkContentType;
import com.jeeplus.modules.workcontent.web.WorkContentTypeController;
import com.jeeplus.modules.workreview.entity.WorkReviewAudit;
import com.jeeplus.modules.workreview.entity.WorkReviewStandard;
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.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 报告详情Entity
 * @author yangfan
 * @version 2018-06-05
 */
public class ProjectReportData extends ActEntity<ProjectReportData> {
	
	private static final long serialVersionUID = 1L;
	private String companyId;		// 公司id
	private String officeId;		// 部门id
	private String officeName;		// 部门id
	private ProjectRecords project;		// 项目id
	private String name;		// 报告名称
	private String number;		// 报告编号
	private String type;		// 工作内容类型
	private String achievementType;		// 成功类型
	private String reviewStandard;		// 复核标准
	private User signCostOne;		// 签字造价师一
	private User signCostTwo;		// 签字造价师二
	private User master;		// 负责人
	private Date reportDate;		// 报告日期
	private String fileStatus;		// 归档状态
	private String status;		// 报告状态 1待归档 2已归档
	private String invalidStatus;		// 报告作废状态
	private Date startDate;
	private Date endDate;
	private List<Workattachment> workAttachments;
	private String processInstanceId; // 流程实例编号
	private String invalidProcessInstanceId; // 流程实例编号
	private String home;
	private List<ProjectContentData> projectContentDataList;
	private List<ProjectBasedData> projectBasedDataList;
	private List<WorkReviewAudit> projectReviewList;
	private String reportId;
	private String numberPath;
	private Integer directorRejectedNum;//主任驳回次数
	private Integer eventuallyRejectedNum;//总工驳回次数

	public Integer getDirectorRejectedNum() {
		return directorRejectedNum;
	}

	public void setDirectorRejectedNum(Integer directorRejectedNum) {
		this.directorRejectedNum = directorRejectedNum;
	}

	public Integer getEventuallyRejectedNum() {
		return eventuallyRejectedNum;
	}

	public void setEventuallyRejectedNum(Integer eventuallyRejectedNum) {
		this.eventuallyRejectedNum = eventuallyRejectedNum;
	}

	public String getNumberPath() {
		return numberPath;
	}

	public void setNumberPath(String numberPath) {
		this.numberPath = numberPath;
	}

	private ProjectReportData beforeEntity;
	private Integer beforeCount;
	private String clientName;
	private String contractNum;
	private String contractName;
	private String projectMaster;
	private String projectMasterId;
	private Date createStartDate;
	private Date createEndDate;
	private Date createDate;
	private String typeName;
	private String projectName;
	private String projectNum;
	private String signCostOneName;
	private String signCostTwoName;
	private String masterName;
	private String upId;


	private Double reviewFee;  //送审价
	private Double approvalFee;  //审定价
	private Double contractFee;   //合同价
	private Double verifyFee;    //核增核减额
	private Double verifyRate;    //核增核减率
	private Double consultFee;    //咨询标的额
	private Double buildingFee;   //土建额
	private Double installFee;    //安装额

	public String getUpId() {
		return upId;
	}

	public void setUpId(String upId) {
		this.upId = upId;
	}


	public String getReportType() {
		return reportType;
	}

	public void setReportType(String reportType) {
		this.reportType = reportType;
	}

	private String reportType;		// 签章类型 电子章/实体章
	// 流程任务
	private Task task;
	private Map<String, Object> variables;
	// 运行中的流程实例
	private ProcessInstance processInstance;
	// 历史的流程实例
	private HistoricProcessInstance historicProcessInstance;
	// 流程定义
	private ProcessDefinition processDefinition;
	
	public ProjectReportData() {
		super();
	}

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

	public String getCompanyId() {
		return companyId;
	}

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

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

	@Override
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public void setProject(ProjectRecords project) {
		this.project = project;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	@ExcelField(title="报告编号", align=2, sort=1)
	public String getNumber() {
		return number;
	}

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

	public String getType() {
		return type;
	}
	@ExcelField(title="工作内容类型", align=2, sort=3)
	public String getTypeName() {
		return WorkContentTypeController.getContentTypeName(this.type,"");
	}

	@ExcelField(title="成果类型", align=2, sort=4,mainDictType = "achievement_type")
	public String getAchievementType() {
		return achievementType;
	}

	public User getSignCostOne() {
		return signCostOne;
	}

	@ExcelField(title="签字造价师一", align=2, sort=5)
	public String getSignCostOneName() {
		return this.signCostOne.getName();
	}

	@ExcelField(title="签字造价师二", align=2, sort=6)
	public String getSignCostTwoName() {
		return this.signCostTwo.getName();
	}

	public User getSignCostTwo() {
		return signCostTwo;
	}

	@ExcelField(title="复核标准", align=2, sort=7,dictType = "reviewStandard")
	public String getReviewStandard() {
		return reviewStandard;
	}

	@ExcelField(title="报告状态", align=2, sort=8,dictType = "audit_state")
	public String getStatus() {
		return status;
	}

	@ExcelField(title="报告日期", align=2, sort=9)
	public Date getReportDate() {
		return reportDate;
	}

	@ExcelField(title="归档状态", align=2, sort=10,dictType = "record_state")
	public String getFileStatus() {
		return fileStatus;
	}

	@ExcelField(title="负责人", align=2, sort=11)
	public String getMasterName() {
		return this.master.getName();
	}

	@ExcelField(title="所属部门", align=2, sort=12)
	public String getOfficeName() {
		return officeName;
	}

	@ExcelField(title="创建时间", align=2, sort=13)
	@Override
	public Date getCreateDate() {
		return createDate;
	}

	public ProjectRecords getProject() {
		return project;
	}

	@ExcelField(title="所属项目", align=2, sort=14)
	public String getProjectName() {
		return this.project.getProjectName();
	}

	@ExcelField(title="项目负责人", align=2, sort=15)
	public String getProjectMaster() {
		return projectMaster;
	}

	@ExcelField(title="合同编号", align=2, sort=16)
	public String getContractNum() {
		return contractNum;
	}

	@ExcelField(title="主委托方", align=2, sort=17)
	public String getClientName() {
		return clientName;
	}

	public void setNumber(String number) {
		this.number = number;
	}
	
	public void setType(String type) {
		this.type = type;
	}
	
	public void setAchievementType(String achievementType) {
		this.achievementType = achievementType;
	}
	
	public void setReviewStandard(String reviewStandard) {
		this.reviewStandard = reviewStandard;
	}

	public void setSignCostOne(User signCostOne) {
		this.signCostOne = signCostOne;
	}
	
	public void setSignCostTwo(User signCostTwo) {
		this.signCostTwo = signCostTwo;
	}
	
	public void setMaster(User master) {
		this.master = master;
	}
	
	public void setReportDate(Date reportDate) {
		this.reportDate = reportDate;
	}
	
	public void setFileStatus(String fileStatus) {
		this.fileStatus = fileStatus;
	}
	
	public void setStatus(String status) {
		this.status = status;
	}

	public String getInvalidStatus() {
		return invalidStatus;
	}

	public void setInvalidStatus(String invalidStatus) {
		this.invalidStatus = invalidStatus;
	}

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

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

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

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

	public List<ProjectContentData> getProjectContentDataList() {
		return projectContentDataList;
	}

	public void setProjectContentDataList(List<ProjectContentData> projectContentDataList) {
		this.projectContentDataList = projectContentDataList;
	}

	public String getReportId() {
		return reportId;
	}

	public void setReportId(String reportId) {
		this.reportId = reportId;
	}

	public ProjectReportData getBeforeEntity() {
		return beforeEntity;
	}

	public void setBeforeEntity(ProjectReportData beforeEntity) {
		this.beforeEntity = beforeEntity;
	}

	public Integer getBeforeCount() {
		return beforeCount;
	}

	public void setBeforeCount(Integer beforeCount) {
		this.beforeCount = beforeCount;
	}

	public String getInvalidProcessInstanceId() {
		return invalidProcessInstanceId;
	}

	public void setInvalidProcessInstanceId(String invalidProcessInstanceId) {
		this.invalidProcessInstanceId = invalidProcessInstanceId;
	}

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

	public void setClientName(String clientName) {
		this.clientName = clientName;
	}

	public void setContractNum(String contractNum) {
		this.contractNum = contractNum;
	}

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

	public Date getCreateStartDate() {
		return createStartDate;
	}

	public void setCreateStartDate(Date createStartDate) {
		this.createStartDate = createStartDate;
	}

	public Date getCreateEndDate() {
		return createEndDate;
	}

	public void setCreateEndDate(Date createEndDate) {
		this.createEndDate = createEndDate;
	}

	public String getProjectMasterId() {
		return projectMasterId;
	}

	public void setProjectMasterId(String projectMasterId) {
		this.projectMasterId = projectMasterId;
	}

	public String getContractName() {
		return contractName;
	}

	public String getProjectNum() {
		return this.project.getProjectId();
	}
	public User getMaster() {
		return master;
	}

	public List<ProjectBasedData> getProjectBasedDataList() {
		return projectBasedDataList;
	}

	public void setProjectBasedDataList(List<ProjectBasedData> projectBasedDataList) {
		this.projectBasedDataList = projectBasedDataList;
	}

	public List<WorkReviewAudit> getProjectReviewList() {
		return projectReviewList;
	}

	public void setProjectReviewList(List<WorkReviewAudit> projectReviewList) {
		this.projectReviewList = projectReviewList;
	}


	public Double getReviewFee() {
		return reviewFee;
	}

	public void setReviewFee(Double reviewFee) {
		this.reviewFee = reviewFee;
	}

	public Double getApprovalFee() {
		return approvalFee;
	}

	public void setApprovalFee(Double approvalFee) {
		this.approvalFee = approvalFee;
	}

	public Double getContractFee() {
		return contractFee;
	}

	public void setContractFee(Double contractFee) {
		this.contractFee = contractFee;
	}

	public Double getVerifyFee() {
		return verifyFee;
	}

	public void setVerifyFee(Double verifyFee) {
		this.verifyFee = verifyFee;
	}

	public Double getVerifyRate() {
		return verifyRate;
	}

	public void setVerifyRate(Double verifyRate) {
		this.verifyRate = verifyRate;
	}

	public Double getConsultFee() {
		return consultFee;
	}

	public void setConsultFee(Double consultFee) {
		this.consultFee = consultFee;
	}

	public Double getBuildingFee() {
		return buildingFee;
	}

	public void setBuildingFee(Double buildingFee) {
		this.buildingFee = buildingFee;
	}

	public Double getInstallFee() {
		return installFee;
	}

	public void setInstallFee(Double installFee) {
		this.installFee = installFee;
	}
}