package com.mortals.xhx.module.perform.model;
import java.math.BigDecimal;
import java.util.Date;
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.model.BaseEntityLong;
import com.mortals.xhx.module.perform.model.vo.PerformErrorMessageVo;
import lombok.Data;
/**
 * 绩效异常信息实体对象
 *
 * @author zxfei
 * @date 2024-04-30
 */
@Data
public class PerformErrorMessageEntity extends PerformErrorMessageVo {
    private static final long serialVersionUID = 1L;

    /**
     * 核查记录Id
     */
    private Long checkRecordId;
    /**
     * 部门id号
     */
    private Long deptId;
    /**
     * 部门名称
     */
    private String deptName;
    /**
     * 所属大厅
     */
    private Long salaId;
    /**
     * 所属大厅名称
     */
    private String salaName;
    /**
     * 绩效责任人id
     */
    private Long staffId;
    /**
     * 绩效负责人名称
     */
    private String staffName;
    /**
     * 工号
     */
    private String workNum;
    /**
     * 异常时间
     */
    private Date errorTime;
    /**
     * 绩效规则id
     */
    private Long ruleId;
    /**
     * 规则名称
     */
    private String ruleName;
    /**
     * 增减类型(1.增加,2.扣除)
     */
    private Integer subAddType;
    /**
     * 扣分或增加分值
     */
    private BigDecimal score;
    /**
     * 阅读状态0未读1已读
     */
    private Integer readStatus;
    /**
     * 核查处理状态1.未处理,2.已处理
     */
    private Integer checkStatus;
    /**
     * 申诉状态(0.未申诉,1.申诉中,2.申诉拒绝,3.申诉通过)
     */
    private Integer appealStatus;
    /**
     * 备注
     */
    private String remark;
    /**
     * 绩效类型【attend:考勤绩效,review:评价差评绩效,complain:评价投诉绩效,gowork:办件绩效,effect:效能绩效,other:其它绩效】
     */
    private String performType;
    /**
     * 核查时间
     */
    private Date checkTime;
    /**
     * 申诉时间
     */
    private Date appealTime;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof PerformErrorMessageEntity) {
            PerformErrorMessageEntity tmp = (PerformErrorMessageEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.checkRecordId = null;
        this.deptId = null;
        this.deptName = "";
        this.salaId = null;
        this.salaName = "";
        this.staffId = null;
        this.staffName = "";
        this.workNum = "";
        this.errorTime = new Date();
        this.ruleId = null;
        this.ruleName = "";
        this.subAddType = 1;
        this.score = BigDecimal.ZERO;
        this.readStatus = 0;
        this.checkStatus = 0;
        this.appealStatus = 0;
        this.remark = "";
        this.performType = "";
        this.checkTime = new Date();
        this.appealTime = new Date();
    }
}