package cn.com.qmth.stmms.biz.report.utils;

import java.text.DecimalFormat;

import cn.com.qmth.stmms.common.annotation.ExcelField;

public class ReportSubjectRangeDTO {

    @ExcelField(title = "分数段", align = 2, sort = 10)
    private String score;

    @ExcelField(title = "人数", align = 2, sort = 20)
    private Integer rangeCount;

    @ExcelField(title = "频率", align = 2, sort = 30)
    private String rangeRate;

    public ReportSubjectRangeDTO(String score, Integer rangeCount, Double rangeRate) {
        this.score = score;
        this.rangeCount = rangeCount;
        this.rangeRate = rangeRate > 0 ? (new DecimalFormat("####.###").format(rangeRate) + "%") : "0%";
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public Integer getRangeCount() {
        return rangeCount;
    }

    public void setRangeCount(Integer rangeCount) {
        this.rangeCount = rangeCount;
    }

    public String getRangeRate() {
        return rangeRate;
    }

    public void setRangeRate(String rangeRate) {
        this.rangeRate = rangeRate;
    }

}
