package com.mortals.xhx.module.attendance.model;
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.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.attendance.model.vo.AttendanceRecordErrorVo;
import lombok.Data;
/**
 * 考勤打卡记录异常信息实体对象
 *
 * @author zxfei
 * @date 2024-01-11
 */
@Data
public class AttendanceRecordErrorEntity extends AttendanceRecordErrorVo {
    private static final long serialVersionUID = 1L;

    /**
     * 员工ID
     */
    private Long staffId;
    /**
     * 员工姓名
     */
    private String staffName;
    /**
     * 工号
     */
    private String workNum;
    /**
     * 所属部门
     */
    private Long deptId;
    /**
     * 所属部门名称
     */
    private String deptName;
    /**
     * 职位ID
     */
    private Long positionId;
    /**
     * 职位名称
     */
    private String positionName;
    /**
     * 所属考勤组ID
     */
    private Long attendanceGroupId;
    /**
     * 所属考勤组名称
     */
    private String attendanceGroupName;
    /**
     * 班次ID
     */
    private Long shiftsId;
    /**
     * 班次名称
     */
    private String shiftsName;
    /**
     * 上下班时间
     */
    @JsonFormat(pattern = "HH:mm")
    @JSONField(format = "HH:mm")
    private Date goOffDateTime;
    /**
     * 异常时间
     */
    private Date errorDateTime;
    /**
     * 实际打卡时间
     */
    private Date actualAttendanceDateTime;
    /**
     * 处理时间
     */
    private Date operDateTime;
    /**
     * 处理人
     */
    private String opertor;
    /**
     * 异常状态(0.缺卡,1.早退,2.缺卡)
     */
    private Integer errorStatus;
    /**
     * 处理状态(0.未处理,1.已处理)
     */
    private Integer processStatus;
    /**
     * 处理结果
     */
    private String processResult;
    /**
     * 备注
     */
    private String remark;
    /**
     * 所属大厅
     */
    private Long salaId;
    /**
     * 所属大厅名称
     */
    private String salaName;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof AttendanceRecordErrorEntity) {
            AttendanceRecordErrorEntity tmp = (AttendanceRecordErrorEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
        this.staffId = null;
        this.staffName = "";
        this.workNum = "";
        this.deptId = null;
        this.deptName = "";
        this.positionId = null;
        this.positionName = "";
        this.attendanceGroupId = null;
        this.attendanceGroupName = "";
        this.shiftsId = null;
        this.shiftsName = "";
        this.goOffDateTime = null;
        this.errorDateTime = null;
        this.actualAttendanceDateTime = null;
        this.operDateTime = null;
        this.opertor = "";
        this.errorStatus = 0;
        this.processStatus = 0;
        this.processResult = "";
        this.remark = "";
        this.salaId = null;
        this.salaName = "";
    }
}