package com.mortals.xhx.module.dept.model;
import java.math.BigDecimal;
import java.util.Date;
import cn.hutool.core.date.DateUtil;
import com.mortals.framework.annotation.Excel;
import com.mortals.xhx.module.dept.model.vo.DeptPerformStatVo;
import lombok.Data;
/**
 * 部门绩效分数统计实体对象
 *
 * @author zxfei
 * @date 2023-07-20
 */
@Data
public class DeptPerformStatEntity extends DeptPerformStatVo {
    private static final long serialVersionUID = 1L;

    /**
     * 部门id号
     */
    private Long deptId;
    /**
     * 部门名称
     */
    private String deptName;
    /**
     * 部门绩效总分数
     */
    @Excel(name = "部门绩效总分数")
    private BigDecimal totalScore;
    /**
     * 部门绩效加分总分数汇总
     */
    @Excel(name = "部门绩效加分总分数汇总")
    private BigDecimal totalAddScore;
    /**
     * 部门绩效减分总分数汇总
     */
    @Excel(name = "部门绩效减分总分数汇总")
    private BigDecimal totalSubScore;
    /**
     * 考勤绩效指标增加分数
     */
    private BigDecimal attendScoreAdd;
    /**
     * 考勤绩效指标扣减分数
     */
    private BigDecimal attendScoreSub;
    /**
     * 评价绩效指标增加分数
     */
    private BigDecimal reviewScoreAdd;
    /**
     * 评价绩效指标扣减分数
     */
    private BigDecimal reviewScoreSub;
    /**
     * 投诉绩效指标增加分数
     */
    private BigDecimal complainScoreAdd;
    /**
     * 投诉绩效指标扣减分数
     */
    private BigDecimal complainScoreSub;
    /**
     * 办件绩效指标增加分数
     */
    private BigDecimal goworkScoreAdd;
    /**
     * 办件绩效指标扣减分数
     */
    private BigDecimal goworkScoreSub;
    /**
     * 效能绩效指标增加分数
     */
    private BigDecimal effectScoreAdd;
    /**
     * 效能绩效指标扣减分数
     */
    private BigDecimal effectScoreSub;
    /**
     * 其它绩效指标增加分数
     */
    private BigDecimal otherScoreAdd;
    /**
     * 其它绩效指标扣减分数
     */
    private BigDecimal otherScoreSub;
    /**
     * 部门绩效平均分数，根据部门所属人数平均
     */
    @Excel(name = "部门绩效平均分数，根据部门所属人数平均")
    private BigDecimal averageScore;
    /**
     * 备注
     */
    private String remark;
    /**
     * 年
     */
    private Integer year;
    /**
     * 月
     */
    private Integer month;
    /**
     * 日
     */
    private Integer day;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof DeptPerformStatEntity) {
            DeptPerformStatEntity tmp = (DeptPerformStatEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

        this.deptId = 0L;

        this.deptName = "";

        this.totalScore = new BigDecimal(0);

        this.totalAddScore = new BigDecimal(0);

        this.totalSubScore = new BigDecimal(0);

        this.attendScoreAdd = new BigDecimal(0);

        this.attendScoreSub = new BigDecimal(0);

        this.reviewScoreAdd = new BigDecimal(0);

        this.reviewScoreSub = new BigDecimal(0);

        this.complainScoreAdd = new BigDecimal(0);

        this.complainScoreSub = new BigDecimal(0);

        this.goworkScoreAdd = new BigDecimal(0);

        this.goworkScoreSub = new BigDecimal(0);

        this.effectScoreAdd = new BigDecimal(0);

        this.effectScoreSub = new BigDecimal(0);

        this.otherScoreAdd = new BigDecimal(0);

        this.otherScoreSub = new BigDecimal(0);

        this.averageScore = new BigDecimal(0);

        this.remark = "";

        this.year = DateUtil.year(new Date());

        this.month = DateUtil.month(new Date())+1;

        this.day = DateUtil.dayOfMonth(new Date());
    }
}