/**
 * 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.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 RuralProjectRecordsAlter extends ActEntity<RuralProjectRecordsAlter> {

	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;        //总合同额

	@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 int projectStatus;//项目状态

	private String auditType;
	@NotBlank(message = "变更原因不能为空")
	private String alterReason;

	private RuralProjectRecords alterBeforeRecords;

	private Date beginDate;
	private Date endDate;

	private String home;

	private String alterProjectId;

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

	public RuralProjectRecordsAlter() {
		super();
	}

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

	public WorkContractInfo getWorkContractInfo() {
		return workContractInfo;
	}

	public void setWorkContractInfo(WorkContractInfo contract) {
		this.workContractInfo = contract;
	}

	@ExcelField(title="项目编号", align=2, sort=7)
	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	@ExcelField(title="项目名称", align=2, sort=8)
	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;
	}

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

	public int getProjectStatus() {
		return projectStatus;
	}

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

	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 getAlterReason() {
		return alterReason;
	}

	public void setAlterReason(String alterReason) {
		this.alterReason = alterReason;
	}

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

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

    public RuralProjectRecords getAlterBeforeRecords() {
        return alterBeforeRecords;
    }

    public void setAlterBeforeRecords(RuralProjectRecords alterBeforeRecords) {
        this.alterBeforeRecords = alterBeforeRecords;
    }

    public String getHome() {
        return home;
    }

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

    public String getAlterProjectId() {
        return alterProjectId;
    }

    public void setAlterProjectId(String alterProjectId) {
        this.alterProjectId = alterProjectId;
    }

	public String getContractNumber() {
		if (workContractInfo!=null) {
			return workContractInfo.getContractNum();
		}else {
			return "";
		}
	}

	public String getContractName() {
		if (workContractInfo!=null) {
			return workContractInfo.getName();
		}else {
			return "";
		}
	}

	public String getContractPrice() {
		if (workContractInfo!=null) {
			return workContractInfo.getContractPrice();
		}else {
			return "";
		}
	}

	public String getClientName() {
		if (workContractInfo!=null && workContractInfo.getClient()!=null){
			return workContractInfo.getClient().getName();
		}else {
			return "";
		}
	}

	public String getContractType() {
		if (workContractInfo!=null) {
			return workContractInfo.getConstructionProjectTypeStr();
		}else {
			return "";
		}
	}


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