package cn.com.countrygarden.bi.main.model.performance.monthly;

import java.util.Date;

/**
 * 绩效月度平均完成率
 *
 * @author Max Date:2018/09/20
 * @version 1.0
 * @since 1.8
 */
public class PerformanceMonthlyStatistics implements Comparable<PerformanceMonthlyStatistics>{
    private Long pmsId;//编号

    private Long elementId;//指标编号

    private Integer year;//年

    private Integer month;//月

    private String averageRate;//平均完成率

    private Date createdDate;//创建日期

    private String createdBy;//创建人

    private Date updateDate;//更新日期

    private String updateBy;//更新人

    public PerformanceMonthlyStatistics(Long pmsId, Long elementId, Integer year, Integer month, String averageRate, Date createdDate, String createdBy, Date updateDate, String updateBy) {
        this.pmsId = pmsId;
        this.elementId = elementId;
        this.year = year;
        this.month = month;
        this.averageRate = averageRate;
        this.createdDate = createdDate;
        this.createdBy = createdBy;
        this.updateDate = updateDate;
        this.updateBy = updateBy;
    }

    public PerformanceMonthlyStatistics() {
        super();
    }

    public Long getPmsId() {
        return pmsId;
    }

    public void setPmsId(Long pmsId) {
        this.pmsId = pmsId;
    }

    public Long getElementId() {
        return elementId;
    }

    public void setElementId(Long elementId) {
        this.elementId = elementId;
    }

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    public Integer getMonth() {
        return month;
    }

    public void setMonth(Integer month) {
        this.month = month;
    }

    public String getAverageRate() {
        return averageRate;
    }

    public void setAverageRate(String averageRate) {
        this.averageRate = averageRate == null ? null : averageRate.trim();
    }

    public Date getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy == null ? null : createdBy.trim();
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy == null ? null : updateBy.trim();
    }

    @Override
    public int compareTo(PerformanceMonthlyStatistics that) {
        if(this.month < that.month)
            return -1;
        else if(this.month > that.month)
            return 1;
        return 0;
    }
}