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

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

import org.apache.commons.lang3.StringUtils;

/**
 * @author chchen
 * @date 2018/9/21 14:16
 */
public class TotalitySituationAdapter implements Serializable{

    /**
	 * 
	 */
	private static final long serialVersionUID = 4462020269475962105L;

	private int speedScore;

    private int activeScore;

    private int automaticScore;

    private int concernScore;

    public void setLearningStateScore(List<LearningStateDto> list) {
        if (list != null) {
            for (LearningStateDto item : list){
                if (StringUtils.isNotBlank(item.getName()) && "作业速度".equals(item.getName().trim())){
                    this.speedScore = item.getScore();
                } else if (StringUtils.isNotBlank(item.getName()) && "自律性".equals(item.getName().trim())){
                    this.automaticScore = item.getScore();
                } else if (StringUtils.isNotBlank(item.getName()) && ("积极性".equals(item.getName().trim())
                        || "学习积极性".equals(item.getName().trim()))){
                    this.activeScore = item.getScore();
                } else if (StringUtils.isNotBlank(item.getName()) && "专注度".equals(item.getName().trim())){
                    this.concernScore = item.getScore();
                }
            }
        }
    }


    public int getSpeedScore() {
        return speedScore;
    }

    public int getActiveScore() {
        return activeScore;
    }


    public int getAutomaticScore() {
        return automaticScore;
    }

    public int getConcernScore() {
        return concernScore;
    }

}
