package cn.com.countrygarden.bi.main.dto;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.collections.bidimap.DualHashBidiMap;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import cn.com.countrygarden.bi.main.util.DateTimeDeserializer;

/**
 * 调查列表
 * 
 * @author 木木子
 *
 */
public class ReviewInvestigationVo implements Serializable {
	/**
	 * 被调查人ID
	 */
	private Integer investigatedId;
	
	 private Integer personneltagId;

	/**
	 * 被调查人姓名
	 */
	private String name;

	/**
	 * 问卷ID
	 */
	private Integer questionnaireId;
	
	/**
	 * 问卷管理Id
	 */
	private Integer investigationmanagementId;

	
	public Integer getInvestigationmanagementId() {
		return investigationmanagementId;
	}

	public void setInvestigationmanagementId(Integer investigationmanagementId) {
		this.investigationmanagementId = investigationmanagementId;
	}

	public Integer getQuestionnaireId() {
		return questionnaireId;
	}

	public void setQuestionnaireId(Integer questionnaireId) {
		this.questionnaireId = questionnaireId;
	}

	/**
	 * 调查问卷名
	 */

	private String questionnaireName;
	/**
	 * 调查问卷名命名查询
	 */

	private String questionName;

	/**
	 * 是否结束调查
	 */
	private Integer flag;

	/**
	 * 发起时间 与创建被调查人时间一致
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date launchTime;
	/**
	 * 正在进行中的人数
	 */
	private Integer underWay;
	/**
	 * 总共参与评价的人数
	 */
	private Integer total;

	/**
	 * 上级正在进行中的人数
	 */
	private double superiorUnderWay;

	/**
	 * 上级总共参与评价的人数
	 */
	private double superiorTotal;
	/**
	 * 上级评价百分比
	 */
	private Integer superiorPercentage;

	/**
	 * 同级正在进行中的人数
	 */
	private double equativeUnderWay;
	/**
	 * 同级总共参与评价的人数
	 */
	private double equativeTotal;
	/**
	 * 同级参与百分比
	 */
	private Integer equativePercentage;

	/**
	 * 下级正在进行中的人数
	 */
	private double subordinateUnderWay;
	/**
	 * 下级总共参与评价的人数
	 */
	private double subordinateTotal;

	/**
	 * 下级参与百分比
	 */
	private Integer subordinatePercentage;
	
	
	
	
	private boolean haseole;
	
	private String getusercode;
	
	
	public boolean isHaseole() {
		return haseole;
	}

	public void setHaseole(boolean haseole) {
		this.haseole = haseole;
	}

	public String getGetusercode() {
		return getusercode;
	}

	public void setGetusercode(String getusercode) {
		this.getusercode = getusercode;
	}

	public String getQuestionName() {
		return questionName;
	}

	public void setQuestionName(String questionName) {
		this.questionName = questionName;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getQuestionnaireName() {
		return questionnaireName;
	}

	public void setQuestionnaireName(String questionnaireName) {
		this.questionnaireName = questionnaireName;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public Date getLaunchTime() {
		return launchTime;
	}

	public void setLaunchTime(Date launchTime) {
		this.launchTime = launchTime;
	}

	public Integer getUnderWay() {
		return underWay;
	}

	public void setUnderWay(Integer underWay) {
		this.underWay = underWay;
	}

	public Integer getTotal() {
		return total;
	}

	public void setTotal(Integer total) {
		this.total = total;
	}

	public double getSuperiorUnderWay() {
		return superiorUnderWay;
	}

	public void setSuperiorUnderWay(double superiorUnderWay) {
		this.superiorUnderWay = superiorUnderWay;
	}

	public double getSuperiorTotal() {
		return superiorTotal;
	}

	public void setSuperiorTotal(double superiorTotal) {
		this.superiorTotal = superiorTotal;
	}

	public Integer getSuperiorPercentage() {
		if (this.superiorUnderWay == 0 && this.superiorTotal > 0) {
			return 100;
		} else if (this.superiorUnderWay == this.superiorTotal && this.superiorTotal > 0) {
			return 0;
		} else if (this.superiorUnderWay == this.superiorTotal && this.superiorTotal == 0) {
			return 1000;
		} else {
			return (int) Math.round((this.superiorUnderWay / this.superiorTotal) * 100);
		}

	}

	public double getEquativeUnderWay() {
		return equativeUnderWay;
	}

	public void setEquativeUnderWay(double equativeUnderWay) {
		this.equativeUnderWay = equativeUnderWay;
	}

	public double getEquativeTotal() {
		return equativeTotal;
	}

	public void setEquativeTotal(double equativeTotal) {
		this.equativeTotal = equativeTotal;
	}

	public Integer getEquativePercentage() {
		if (this.equativeUnderWay == 0 && this.equativeTotal > 0) {
			return 100;
		} else if (this.equativeUnderWay == this.equativeTotal && this.equativeTotal > 0) {
			return 0;
		} else if (this.equativeUnderWay == this.equativeTotal && this.equativeTotal == 0) {
			return 1000;
		} else {
			return (int) Math.round((this.equativeUnderWay / this.equativeTotal) * 100);
		}

	}

	public double getSubordinateUnderWay() {
		return subordinateUnderWay;
	}

	public void setSubordinateUnderWay(double subordinateUnderWay) {
		this.subordinateUnderWay = subordinateUnderWay;
	}

	public double getSubordinateTotal() {
		return subordinateTotal;
	}

	public void setSubordinateTotal(double subordinateTotal) {
		this.subordinateTotal = subordinateTotal;
	}

	public Integer getSubordinatePercentage() {
		if (this.subordinateUnderWay == 0 && this.subordinateTotal > 0) {
			return 100;
		} else if (this.subordinateUnderWay == this.subordinateTotal && this.subordinateTotal > 0) {
			return 0;
		} else if (this.subordinateUnderWay == this.subordinateTotal && this.subordinateTotal == 0) {
			return 1000;
		} else {
			return (int) Math.round((this.subordinateUnderWay / this.subordinateTotal) * 100);
		}

	}

	public Integer getInvestigatedId() {
		return investigatedId;
	}

	public void setInvestigatedId(Integer investigatedId) {
		this.investigatedId = investigatedId;
	}

	public Integer getPersonneltagId() {
		return personneltagId;
	}

	public void setPersonneltagId(Integer personneltagId) {
		this.personneltagId = personneltagId;
	}

}
