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.PerformErrorRecordVo;
import lombok.Data;
/**
* 绩效异常记录信息实体对象
*
* @author zxfei
* @date 2024-01-24
*/
@Data
public class PerformErrorRecordEntity extends PerformErrorRecordVo {
    private static final long serialVersionUID = 1L;

    /**
    * 员工ID
    */
    private Long staffId;
    /**
    * 员工姓名
    */
    @Excel(name = "员工姓名")
    private String staffName;
    /**
    * 工号
    */
    @Excel(name = "工号")
    private String workNum;
    /**
    * 窗口编号
    */
    @Excel(name = "窗口编号")
    private String windowNum;
    /**
    * 所属部门
    */
    private Long deptId;
    /**
    * 所属部门名称
    */
    @Excel(name = "所属部门名称")
    private String deptName;
    /**
    * 违规类型(1.脱岗,2.离岗,3.玩手机,4.睡觉)
    */
    @Excel(name = "违规类型", readConverterExp = "1=脱岗,2=离岗,3=玩手机,4=睡觉")
    private Integer irregularType;
    /**
    * 发生时间
    */
    @Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date happenTime;
    /**
    * 持续时间，秒
    */
    private Integer duration;
    /**
    * 报警时间
    */
    private Date alarmTime;
    /**
    * 图片凭证地址
    */
    private String snapPath;
    /**
    * 绩效规则分类id
    */
    private Long categoryId;
    /**
    * 规则名称
    */
    private String categoryName;
    /**
    * 绩效规则id
    */
    private Long ruleId;
    /**
    * 规则名称
    */
    private String ruleName;
    /**
    * 扣分方式(1.系统自动,2.人工添加)
    */
    private Integer subMethod;
    /**
    * 扣分人员
    */
    @Excel(name = "扣分人员")
    private String deductPerson;
    /**
    * 扣分时间
    */
    private Date deductTime;
    /**
    * 增减类型(1.增加,2.扣除)
    */
    private Integer subAddType;
    /**
    * 扣分或增加分值
    */
    private BigDecimal score;
    /**
    * 处理状态(1.未处理,2.已处理)
    */
    @Excel(name = "处理状态", readConverterExp = "1=未处理,2=已处理")
    private Integer processStatus;
    /**
    * 附件名称，多个逗号分割
    */
    @Excel(name = "附件名称，多个逗号分割")
    private String fileNames;
    /**
    * 附件下载地址，多个逗号分割
    */
    @Excel(name = "附件下载地址，多个逗号分割")
    private String filePaths;
    /**
    * 备注
    */
    private String remark;
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof PerformErrorRecordEntity) {
            PerformErrorRecordEntity tmp = (PerformErrorRecordEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
            this.staffId = null;
            this.staffName = "";
            this.workNum = "";
            this.windowNum = "";
            this.deptId = null;
            this.deptName = "";
            this.irregularType = 0;
            this.happenTime = new Date();
            this.duration = 0;
            this.alarmTime = new Date();
            this.snapPath = "";
            this.categoryId = null;
            this.categoryName = "";
            this.ruleId = null;
            this.ruleName = "";
            this.subMethod = 2;
            this.deductPerson = "";
            this.deductTime = new Date();
            this.subAddType = 1;
            this.score = BigDecimal.ZERO;
            this.processStatus = 1;
            this.fileNames = "";
            this.filePaths = "";
            this.remark = "";
    }
}