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

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author chchen
 */

public class SuperScholarFeedbackDto implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 是否已评价，0未评价，1已评价
     */
    private int hasJudge;

    private String childName;

    private String img;

    private int feedbackIndex;

    private int totalCourse;

    private int courseRate;

    private String[] infoNameList = {"师生互动", "知识点掌握", "作业书写", "课堂纪律"};

    private int[] thisCourseInfoList = new int[4];

    private int[] lastCourseInfoList = new int[4];

    private List<String> teacherSayList;

    private List<String> parentHelpLabels;

    private List<String> otherHelps;

    private List<String> nextStudyList;

    private List<FeedbackSubjectDto> courseList;

    public SuperScholarFeedbackDto () {
        teacherSayList = new ArrayList<>();
        parentHelpLabels = new ArrayList<>();
        otherHelps = new ArrayList<>();
        nextStudyList = new ArrayList<>();
        courseList = new ArrayList<>();
    }

    public int getHasJudge() {
        return hasJudge;
    }

    public void setHasJudge(int hasJudge) {
        this.hasJudge = hasJudge;
    }

    public String getChildName() {
        return childName;
    }

    public void setChildName(String childName) {
        this.childName = childName;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public int getFeedbackIndex() {
        return feedbackIndex;
    }

    public void setFeedbackIndex(int feedbackIndex) {
        this.feedbackIndex = feedbackIndex;
    }

    public int getTotalCourse() {
        return totalCourse;
    }

    public void setTotalCourse(int totalCourse) {
        this.totalCourse = totalCourse;
    }

    public int getCourseRate() {
        return courseRate;
    }

    public void setCourseRate(int courseRate) {
        this.courseRate = courseRate;
    }

    public void calculateCourseRate () {
        if (this.totalCourse > 0){
            this.courseRate = (int)((this.feedbackIndex * 1.0 / this.totalCourse) * 100);
        }
    }

    public String[] getInfoNameList() {
        return infoNameList;
    }

    public void setInfoNameList(String[] infoNameList) {
        this.infoNameList = infoNameList;
    }

    public int[] getThisCourseInfoList() {
        return thisCourseInfoList;
    }

    public void setThisCourseInfoList(int[] thisCourseInfoList) {
        this.thisCourseInfoList = thisCourseInfoList;
    }

    public void insertThisCourseInfo (int level, int index){
        this.thisCourseInfoList[index] = level;
    }

    public int[] getLastCourseInfoList() {
        return lastCourseInfoList;
    }

    public void setLastCourseInfoList(int[] lastCourseInfoList) {
        this.lastCourseInfoList = lastCourseInfoList;
    }

    public void insertLastCourseInfo (int level, int index) {
        this.lastCourseInfoList[index] = level;
    }

    public List<String> getTeacherSayList() {
        return teacherSayList;
    }

    public void setTeacherSayList(List<String> teacherSayList) {
        this.teacherSayList = teacherSayList;
    }

    public List<String> getParentHelpLabels() {
        return parentHelpLabels;
    }

    public void setParentHelpLabels(List<String> parentHelpLabels) {
        this.parentHelpLabels = parentHelpLabels;
    }

    public List<String> getOtherHelps() {
        return otherHelps;
    }

    public void setOtherHelps(List<String> otherHelps) {
        this.otherHelps = otherHelps;
    }

    public List<String> getNextStudyList() {
        return nextStudyList;
    }

    public void setNextStudyList(List<String> nextStudyList) {
        this.nextStudyList = nextStudyList;
    }

    public List<FeedbackSubjectDto> getCourseList() {
        return courseList;
    }

    public void setCourseList(List<FeedbackSubjectDto> courseList) {
        this.courseList = courseList;
    }

    public void addCourse (FeedbackSubjectDto fd) {
        if (fd != null) {
            this.courseList.add(fd);
        }
    }
}
