package com.mortals.xhx.common.pdu;

import lombok.Data;

import java.math.BigDecimal;

/**
 * 权重pdu
 */
@Data
public class WeightPdu {
    private static BigDecimal NUMBER_100 = new BigDecimal(100);
    /**
     * 自评权重 百分比
     */
    private Integer selfWeight = 15;

    /**
     * 考勤权重
     */
    private Integer attendWeight = 30;

    /**
     * 效能权重
     */
    private Integer effectWeight = 30;

    /**
     * 办件权重
     */
    private Integer goworkWeight = 5;

    /**
     * 群众评议分数默认为20分，不计算权重
     */
    private Integer reviewWeight = 20;


    public BigDecimal selfWeight(){
        return new BigDecimal(this.selfWeight).divide(NUMBER_100);
    }
    public BigDecimal attendWeight(){
        return new BigDecimal(this.attendWeight);
    }
    public BigDecimal effectWeight(){
        return new BigDecimal(this.effectWeight);
    }
    public BigDecimal goworkWeight(){
        return new BigDecimal(this.goworkWeight);
    }
    public BigDecimal reviewWeight(){
        return new BigDecimal(this.reviewWeight);
    }

}
