package com.ssj.service.conch.zyb.model;

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

/** 
 * @author  ZhangCaibao 
 * @version 2018年3月13日 下午2:26:50 
 * 类说明  对应知识点的特性理解记忆运用
 */
public class BgDetailsFeature implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = -2510167424218360576L;
	/**
     * 百分比
     */
	private BigDecimal percentage;
	/**
	 * 错题总数
	 */
    private Integer wrongCount; 
	/**
	 * 总数
	 */
	private Integer totalCount;
	
	
	
	private String  name;
	
	private List<BgKnow> knowList = new ArrayList<BgKnow>();
	
	
	
	public BgDetailsFeature(){};
	public BgDetailsFeature(String name,Integer totalCount ,Integer wrongCount){
		this.name = name;
		this.totalCount = totalCount;
		this.wrongCount = wrongCount;
		if(totalCount>0){
			BigDecimal  totalBig =new BigDecimal(totalCount);
			BigDecimal  wrongBig =new BigDecimal(wrongCount);
			this.percentage =wrongBig.multiply(new BigDecimal(100)).divide(totalBig,0,BigDecimal.ROUND_HALF_UP);
		}else{
			this.percentage = new BigDecimal(0);
		}
	};
	

	public BigDecimal getPercentage() {
		return percentage;
	}

	public void setPercentage(BigDecimal percentage) {
		this.percentage = percentage;
	}

	public Integer getWrongCount() {
		return wrongCount;
	}

	public void setWrongCount(Integer wrongCount) {
		this.wrongCount = wrongCount;
	}

	public Integer getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	public List<BgKnow> getKnowList() {
		return knowList;
	}
	public void setKnowList(List<BgKnow> knowList) {
		this.knowList = knowList;
	}
	
}
