package com.ssj.service.conch.parents.v2.dto;

import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * @description
 * @author yrf
 * @time 2019/11/27 11:14
 */
public class MonthlyReportDTO implements Serializable {

    private static final long serialVersionUID = -1345208810374322818L;

    @JSONField(serialize = false)
    private String homeworkMonth;

    private String year;
    private String month;

    private Integer learningScore;
    private Double transcendedStudentProportion;
    private Integer increasedScore;

    public String getHomeworkMonth() {
        return homeworkMonth;
    }

    public void setHomeworkMonth(String homeworkMonth) {
        this.homeworkMonth = homeworkMonth;
    }

    public String getYear() {
        if (StringUtils.isBlank(year) && StringUtils.isNotBlank(homeworkMonth)) {
            year = homeworkMonth.split("-")[0];
        }
        return year;
    }

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

    public String getMonth() {
        if (StringUtils.isBlank(month) && StringUtils.isNotBlank(homeworkMonth)) {
            month = Integer.valueOf(homeworkMonth.split("-")[1]).toString();
        }
        return month;
    }

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

    public Integer getLearningScore() {
        return learningScore;
    }

    public void setLearningScore(Integer learningScore) {
        this.learningScore = learningScore;
    }

    public Double getTranscendedStudentProportion() {
        return transcendedStudentProportion;
    }

    public void setTranscendedStudentProportion(Double transcendedStudentProportion) {
        this.transcendedStudentProportion = transcendedStudentProportion;
    }

    public Integer getIncreasedScore() {
        return increasedScore;
    }

    public void setIncreasedScore(Integer increasedScore) {
        this.increasedScore = increasedScore;
    }
}
