package com.mortals.xhx.module.check.model;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.check.model.vo.CheckAttendRecordVo;
import lombok.Data;
/**
 * 考勤绩效记录核查信息实体对象
 *
 * @author zxfei
 * @date 2023-07-17
 */
@Data
public class CheckAttendRecordEntity extends CheckAttendRecordVo {
    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    private Long recordId;
    /**
     * 员工ID
     */
    private Long staffId;
    /**
     * 员工姓名
     */
    @Excel(name = "员工姓名")
    private String staffName;
    /**
     * 工号
     */
    @Excel(name = "工号")
    private String workNum;
    /**
     * 所属部门
     */
    private Long deptId;
    /**
     * 所属部门名称
     */
    @Excel(name = "所属部门名称")
    private String deptName;
    /**
     * 所属考勤组ID
     */
    private Long attendanceGroupId;
    /**
     * 所属考勤组名称
     */
    @Excel(name = "所属考勤组名称")
    private String attendanceGroupName;
    /**
     * 考勤时间
     */
    @Excel(name = "考勤时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date attendanceDate;
    /**
     * 绩效规则id
     */
    private Long ruleId;
    /**
     * 规则名称
     */
    @Excel(name = "规则名称")
    private String ruleName;
    /**
     * 增减类型(1.增加,2.扣除)
     */
    @Excel(name = "增减类型", readConverterExp = "1=增加,2.扣除")
    private Integer subAddType;
    /**
     * 扣分或增加分值
     */
    @Excel(name = "扣分或增加分值")
    private BigDecimal score;
    /**
     * 上下班时间
     */
    @Excel(name = "上下班时间")
    private String goOffTimeStr;
    /**
     * 异常时间
     */
    @Excel(name = "异常时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date errorTime;
    /**
     * 实际打卡时间
     */
    @Excel(name = "实际打卡时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date actualAttendTime;
    /**
     * 异常处理结果
     */
    @Excel(name = "异常处理结果")
    private String errorResult;
    /**
     * 核查人员
     */
    @Excel(name = "核查人员")
    private String checkPerson;
    /**
     * 核查时间
     */
    @Excel(name = "核查时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date checkTime;
    /**
     * 核查说明
     */
    @Excel(name = "核查说明")
    private String checkDesc;
    /**
     * 核查结果(1.加分或扣分,2.不扣分)
     */
    @Excel(name = "核查结果", readConverterExp = "加分或扣分=加分或扣分,不扣分=不扣分")
    private String checkResult;
    /**
     * 处理状态(1.未处理,2.已处理)
     */
    private Integer checkStatus;
    /**
     * 扣分方式(1.系统自动,2.人工添加,3.大厅巡查)
     */
    private Integer subMethod;
    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;
    /**
     * 附件名称，多个逗号分割
     */
    private String fileNames;
    /**
     * 附件下载地址，多个逗号分割
     */
    private String filePaths;
    /**
     * 绩效规则分类id
     */
    private Long categoryId;
    /**
     * 种类名称
     */
    @Excel(name = "种类名称")
    private String categoryName;
    /**
     * 扣分人员
     */
    @Excel(name = "扣分人员")
    private String deductPerson;
    /**
     * 扣分时间
     */
    @Excel(name = "扣分时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deductTime;
    /**
     * 窗口编号
     */
    @Excel(name = "窗口编号")
    private String windowNum;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof CheckAttendRecordEntity) {
            CheckAttendRecordEntity tmp = (CheckAttendRecordEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

        this.recordId = -1L;

        this.staffId = -1L;

        this.staffName = "";

        this.workNum = "";

        this.deptId = -1L;

        this.deptName = "";

        this.attendanceGroupId = -1L;

        this.attendanceGroupName = "";

        this.attendanceDate = null;

        this.ruleId = -1L;

        this.ruleName = "";

        this.subAddType = 1;

        this.score = BigDecimal.valueOf(0.00);

        this.goOffTimeStr = "";

        this.errorTime = null;

        this.actualAttendTime = null;

        this.errorResult = "";

        this.checkPerson = "";

        this.checkTime = null;

        this.checkDesc = "";

        this.checkResult = "";

        this.checkStatus = 1;

        this.subMethod = 1;

        this.remark = "";

        this.fileNames = "";

        this.filePaths = "";

        this.categoryId = -1L;

        this.categoryName = "";

        this.deductPerson = "";

        this.deductTime = null;

        this.windowNum = "";
    }
}