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

import com.google.common.collect.Lists;
import com.jeeplus.common.persistence.ActEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
import com.jeeplus.modules.sys.entity.Area;
import com.jeeplus.modules.sys.entity.Office;
import com.jeeplus.modules.sys.entity.User;
import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 项目登记Entity
 * @author ppt
 * @version 2018-05-02
 */
public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {

	public static final String SERIAL_BIZCODE ="1";
	private static final long serialVersionUID = 1L;
	@NotNull(message = "合同信息不能为空")
	private WorkContractInfo workContractInfo;		// 合同id
	private String projectId;		// 项目编号
	@NotBlank(message = "项目名称不能为空")
	private String projectName;		// 项目名称
	private String scaleType;		// 规模类型
	private String scaleUnit;		// 规模单位
	private Double scaleQuantity;		// 规模数量
	private Area area;		// 项目所在地
	private String projectSite;		// 建设地点
	private String province;  //项目所在省
	private String city;  //项目所在市
	private String county;//项目所在区
	private String projectStructure;   //工程结构
	private String onGroundNum;    //地上层数
	private String underGroundNum;    //地下层数
	private String buildingScale;    //建筑规模
	private String measuringUnit;     //规模单位
	private String projectUse;        //工程用途
	private Double installFees;      //安装造价
	private Double buildingFees;      //土建造价
	private Double buildingPercent;    //土建百分比
	private Double installPercent;     //安装百分比
	private Double unitFees;     //单位造价
	private Double buildingUnitFees;  //土建单位造价
	private Double installUnitFees;    //安装单位造价
	private Double totalFees;        //总合同额

	private ProjectReportData reportData;//报告

	public ProjectReportData getReportData() {
		return reportData;
	}

	public void setReportData(ProjectReportData reportData) {
		this.reportData = reportData;
	}

	@NotNull(message = "委托方联系人不能为空")
	private List<WorkClientLinkman> workClientLinkmanList;		// 委托方联系人
	private List<WorkClientLinkman> workConstructionLinkmanList;		// 施工方及联系人
	@NotBlank(message = "工程概况不能为空")
	private String projectDesc;		// 工程概况
	@NotNull(message = "项目负责人不能为空")
	private List<User> projectLeaders; //项目负责人

	private List<User> projectMembers;  //项目组成员

	private String leaderNameStr;
	private String leaderIds;
	private String memberNameStr;
	private String memberIds;

	private String processInstanceId;

	private Office company;
	private Office office;
	private Integer projectStatus;//项目状态

	private String auditType;

	private String alterProcessId;
	private String userIds;
	private String delUserIds;
	private List<User> users;
	private String userId;

	private String home;
	private Date beginDate;
	private Date endDate;
	private int membercount;
	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();

	private List<ProjectReportData> projectReportData = Lists.newArrayList();

	public RuralProjectRecords() {
		super();
	}

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

	public WorkContractInfo getWorkContractInfo() {
		return workContractInfo;
	}

	public void setWorkContractInfo(WorkContractInfo contract) {
		this.workContractInfo = contract;
	}
	
	@ExcelField(title="项目编号", align=2, sort=1)
	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}
	
	@ExcelField(title="项目名称", align=2, sort=2)
	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}
	
	@ExcelField(title="规模类型", align=2, sort=9)
	public String getScaleType() {
		return scaleType;
	}

	public void setScaleType(String scaleType) {
		this.scaleType = scaleType;
	}
	
	@ExcelField(title="规模单位", align=2, sort=10)
	public String getScaleUnit() {
		return scaleUnit;
	}

	public void setScaleUnit(String scaleUnit) {
		this.scaleUnit = scaleUnit;
	}
	
	@ExcelField(title="规模数量", align=2, sort=11)
	public Double getScaleQuantity() {
		return scaleQuantity;
	}

	public void setScaleQuantity(Double scaleQuantity) {
		this.scaleQuantity = scaleQuantity;
	}
	
	@ExcelField(title="项目所在地", align=2, sort=12)
	public Area getArea() {
		return area;
	}

	public void setArea(Area area) {
		this.area = area;
	}
	
	@ExcelField(title="建设地点", align=2, sort=13)
	public String getProjectSite() {
		return projectSite;
	}

	public void setProjectSite(String projectSite) {
		this.projectSite = projectSite;
	}

	public List<WorkClientLinkman> getWorkClientLinkmanList() {
		return workClientLinkmanList;
	}

	public void setWorkClientLinkmanList(List<WorkClientLinkman> workClientLinkmanList) {
		this.workClientLinkmanList = workClientLinkmanList;
	}

	@ExcelField(title="工程概况", align=2, sort=16)
	public String getProjectDesc() {
		return projectDesc;
	}
	@ExcelField(title="特殊要求", align=2, sort=17)
	public String getRemarks() {
		return remarks;
	}
	@ExcelField(title="创建日期", align=2, sort=18)
	public Date getCreateDate() {
		return createDate;
	}

	public void setProjectDesc(String projectDesc) {
		this.projectDesc = projectDesc;
	}

	public List<User> getProjectLeaders() {
		return projectLeaders;
	}

	public void setProjectLeaders(List<User> projectLeaders) {
		this.projectLeaders = projectLeaders;
	}

	public List<User> getProjectMembers() {
		return projectMembers;
	}

	public void setProjectMembers(List<User> projectMembers) {
		this.projectMembers = projectMembers;
	}

	public List<WorkClientLinkman> getWorkConstructionLinkmanList() {
		return workConstructionLinkmanList;
	}

	public void setWorkConstructionLinkmanList(List<WorkClientLinkman> workConstructionLinkmanList) {
		this.workConstructionLinkmanList = workConstructionLinkmanList;
	}

    @ExcelField(title="项目状态", align=2, sort=19,dictType = "audit_state")
	public Integer getProjectStatus() {
		return projectStatus;
	}

	public void setProjectStatus(Integer projectStatus) {
		this.projectStatus = projectStatus;
	}

	@ExcelField(title="负责人", align=2, sort=8)
	public String getLeaderNameStr() {
		return leaderNameStr;
	}

	public void setLeaderNameStr(String leaderNameStr) {
		this.leaderNameStr = leaderNameStr;
	}

	public String getMemberNameStr() {
		return memberNameStr;
	}

	public void setMemberNameStr(String memberNameStr) {
		this.memberNameStr = memberNameStr;
	}

	public String getLeaderIds() {
		return leaderIds;
	}

	public void setLeaderIds(String leaderIds) {
		this.leaderIds = leaderIds;
	}

	public String getMemberIds() {
		return memberIds;
	}

	public void setMemberIds(String memberIds) {
		this.memberIds = memberIds;
	}

	public String getProcessInstanceId() {
		return processInstanceId;
	}

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

	public String getAuditType() {
		return auditType;
	}

	public void setAuditType(String auditType) {
		this.auditType = auditType;
	}

	public Office getCompany() {
		return company;
	}

	public void setCompany(Office company) {
		this.company = company;
	}

	public Office getOffice() {
		return office;
	}

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

	public String getAlterProcessId() {
		return alterProcessId;
	}

	public void setAlterProcessId(String alterProcessId) {
		this.alterProcessId = alterProcessId;
	}

	public List<WorkClientAttachment> getWorkAttachments() {
		return workAttachments;
	}

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

	public String getUserIds() {
		return userIds;
	}

	public void setUserIds(String userIds) {
		this.userIds = userIds;
	}

	public String getDelUserIds() {
		return delUserIds;
	}

	public void setDelUserIds(String delUserIds) {
		this.delUserIds = delUserIds;
	}

	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	@ExcelField(title="合同名称", align=2, sort=4)
	public String getContractName() {
		if (workContractInfo!=null) {
			return workContractInfo.getName();
		}else {
			return "";
		}
	}
	@ExcelField(title="合同编号", align=2, sort=3)
	public String getContractNumber() {
		if (workContractInfo!=null) {
			return workContractInfo.getContractNum();
		}else {
			return "";
		}
	}
	@ExcelField(title="合同金额", align=2, sort=5)
	public String getContractPrice() {
		if (workContractInfo!=null) {
			return workContractInfo.getContractPrice();
		}else {
			return "";
		}
	}
	@ExcelField(title="工程分类", align=2, sort=7)
	public String getContractType() {
		if (workContractInfo!=null) {
			return workContractInfo.getConstructionProjectTypeStr();
		}else {
			return "";
		}
	}
	@ExcelField(title="主委托方", align=2, sort=6)
	public String getClientName() {
		if (workContractInfo!=null && workContractInfo.getClient()!=null){
			return workContractInfo.getClient().getName();
		}else {
			return "";
		}
	}

    public String getHome() {
        return home;
    }

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

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getEndDate() {
        return endDate;
    }

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

	public int getMembercount() {
		return membercount;
	}

	public void setMembercount(int membercount) {
		this.membercount = membercount;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCounty() {
		return county;
	}

	public void setCounty(String county) {
		this.county = county;
	}

	public String getProjectStructure() {
		return projectStructure;
	}

	public void setProjectStructure(String projectStructure) {
		this.projectStructure = projectStructure;
	}

	public String getOnGroundNum() {
		return onGroundNum;
	}

	public void setOnGroundNum(String onGroundNum) {
		this.onGroundNum = onGroundNum;
	}

	public String getUnderGroundNum() {
		return underGroundNum;
	}

	public void setUnderGroundNum(String underGroundNum) {
		this.underGroundNum = underGroundNum;
	}

	public String getBuildingScale() {
		return buildingScale;
	}

	public void setBuildingScale(String buildingScale) {
		this.buildingScale = buildingScale;
	}

	public String getMeasuringUnit() {
		return measuringUnit;
	}

	public void setMeasuringUnit(String measuringUnit) {
		this.measuringUnit = measuringUnit;
	}

	public String getProjectUse() {
		return projectUse;
	}

	public void setProjectUse(String projectUse) {
		this.projectUse = projectUse;
	}

	public Double getInstallFees() {
		return installFees;
	}

	public void setInstallFees(Double installFees) {
		this.installFees = installFees;
	}

	public Double getBuildingFees() {
		return buildingFees;
	}

	public void setBuildingFees(Double buildingFees) {
		this.buildingFees = buildingFees;
	}

	public Double getBuildingPercent() {
		return buildingPercent;
	}

	public void setBuildingPercent(Double buildingPercent) {
		this.buildingPercent = buildingPercent;
	}

	public Double getInstallPercent() {
		return installPercent;
	}

	public void setInstallPercent(Double installPercent) {
		this.installPercent = installPercent;
	}

	public Double getUnitFees() {
		return unitFees;
	}

	public void setUnitFees(Double unitFees) {
		this.unitFees = unitFees;
	}

	public Double getBuildingUnitFees() {
		return buildingUnitFees;
	}

	public void setBuildingUnitFees(Double buildingUnitFees) {
		this.buildingUnitFees = buildingUnitFees;
	}

	public Double getInstallUnitFees() {
		return installUnitFees;
	}

	public void setInstallUnitFees(Double installUnitFees) {
		this.installUnitFees = installUnitFees;
	}

	public Double getTotalFees() {
		return totalFees;
	}

	public void setTotalFees(Double totalFees) {
		this.totalFees = totalFees;
	}

	public List<ProjectReportData> getProjectReportData() {
		return projectReportData;
	}

	public void setProjectReportData(List<ProjectReportData> projectReportData) {
		this.projectReportData = projectReportData;
	}
}