package com.mortals.xhx.module.staff.model;
import java.math.BigDecimal;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.common.key.ParamKey;
import com.mortals.xhx.module.staff.model.vo.StaffPerformSummaryVo;
import lombok.Data;
/**
 * 员工绩效统计实体对象
 *
 * @author zxfei
 * @date 2024-07-22
 */
@Data
public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
    private static final long serialVersionUID = 1L;

    /**
     * 人员id
     */
    private Long staffId;
    /**
     * 所属中心
     */
    //@Excel(name = "所属中心")
    private String belongCenter;
    /**
     * 工号
     */
    @Excel(name = "工号",sort = 2)
    private String workNum;
    /**
     * 人员名称
     */
    @Excel(name = "姓名",sort = 1)
    private String staffName;
    /**
     * 所属大厅
     */
    private Long salaId;
    /**
     * 所属大厅名称
     */
    @Excel(name = "所属大厅",sort = 4)
    private String salaName;
    /**
     * 部门id号
     */
    private Long deptId;
    /**
     * 部门名称
     */
    @Excel(name = "所属部门",sort = 5)
    private String deptName;
    /**
     * 考勤绩效指标分数
     */
    @Excel(name = "服务规范(考勤绩效)",sort = 7)
    private BigDecimal attendScore;
    /**
     * 评价绩效指标分数
     */
    @Excel(name = "群众评议",sort = 9)
    private BigDecimal reviewScore;
    /**
     * 投诉绩效指标分数
     */
    @Excel(name = "综合管理(自评绩效)",sort = 8)
    private BigDecimal complainScore;
    /**
     * 办件绩效分数
     */
    @Excel(name = "工作效能(办件绩效)",sort = 10)
    private BigDecimal goworkScore;
    /**
     * 效能绩效分数
     */
    @Excel(name = "工作纪律(效能绩效)",sort = 6)
    private BigDecimal effectScore;
    /**
     * 其它绩效分数 加分项
     */
    @Excel(name = "加分(其它绩效)",sort = 11)
    private BigDecimal otherScore;
    /**
     * 累计异常分数
     */
    //@Excel(name = "累计异常分数")
    private BigDecimal errorScore;
    /**
     * 当月得分数
     */
    @Excel(name = "本月绩效得分数",sort = 12)
    private BigDecimal totalScore;
    /**
     * 备注
     */
    @Excel(name = "备注1",sort = 19)
    private String remark;
    /**
     * 年
     */
    @Excel(name = "年",sort = 15)
    private Integer year;
    /**
     * 月
     */
    @Excel(name = "月",sort = 16)
    private Integer month;
    /**
     * 加分备注
     */

    private String remarkAdd;
    /**
     * 加分合计
     */
    @Excel(name = "加分",sort = 13)
    private BigDecimal addTotalScore;
    /**
     * 合计得分
     */
    @Excel(name = "合计得分",sort = 14)
    private BigDecimal sumScore;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof StaffPerformSummaryEntity) {
            StaffPerformSummaryEntity tmp = (StaffPerformSummaryEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.staffId = 0L;

        this.workNum = "";

        this.staffName = "";

        this.deptId = 0L;

        this.deptName = "";

        this.attendScore = new BigDecimal(0);

        this.reviewScore = new BigDecimal(0);

        this.complainScore = new BigDecimal(0);

        this.goworkScore = new BigDecimal(0);

        this.effectScore = new BigDecimal(0);

        this.otherScore = new BigDecimal(0);

        this.errorScore = new BigDecimal(0);

        this.totalScore = new BigDecimal(100);

        this.remark = "";

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

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

        String belong = GlobalSysInfo.getParamValue(ParamKey.SYS_PARAM_BELONG);
        // SpringUtils.getBean(Pa)

        this.belongCenter = belong==null?"宜宾市民中心":belong;

        this.salaId = null;

        this.salaName = "";

        this.remarkAdd = "";

        this.addTotalScore = BigDecimal.ZERO;

        this.sumScore = new BigDecimal(100);;
    }
}