package com.mortals.xhx.module.attendance.model;
import java.math.BigDecimal;
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.attendance.model.vo.AttendanceStatVo;
import lombok.Data;
/**
 * 考勤汇总信息实体对象
 *
 * @author zxfei
 * @date 2023-07-18
 */
@Data
public class AttendanceStatEntity extends AttendanceStatVo {
    private static final long serialVersionUID = 1L;

    /**
     * 窗口类别
     */
    @Excel(name = "窗口类别")
    private String windowCategory;
    /**
     * 员工ID
     */
    private Long staffId;
    /**
     * 员工姓名
     */
    private String staffName;
    /**
     * 所属部门
     */
    private Long deptId;
    /**
     * 所属部门名称
     */
    private String deptName;
    /**
     * 回单位（天）
     */
    @Excel(name = "回单位")
    private BigDecimal backToUnit;
    /**
     * 因公请假（天）
     */
    @Excel(name = "因公请假")
    private BigDecimal onDutyLeave;
    /**
     * 外出勘验（天）
     */
    @Excel(name = "外出勘验")
    private BigDecimal outOfOffice;
    /**
     * 值班补班（天）
     */
    @Excel(name = "值班补班")
    private BigDecimal shiftCompensation;
    /**
     * 体检（天）
     */
    @Excel(name = "体检")
    private BigDecimal physicalExamination;
    /**
     * 隔离（天）
     */
    @Excel(name = "隔离")
    private BigDecimal quarantine;
    /**
     * 因公外出（与窗口工作无关/天）
     */
    @Excel(name = "因公外出")
    private BigDecimal businessTrip;
    /**
     * 公休（天）
     */
    @Excel(name = "公休")
    private BigDecimal publicHoliday;
    /**
     * 病假（天）
     */
    @Excel(name = "病假")
    private BigDecimal sickLeave;
    /**
     * 丧假（天）
     */
    @Excel(name = "丧假")
    private BigDecimal funeralLeave;
    /**
     * 婚假（天）
     */
    @Excel(name = "婚假")
    private BigDecimal marriageLeave;
    /**
     * 育儿假（天）
     */
    @Excel(name = "育儿假")
    private BigDecimal childRearingLeave;
    /**
     * 产假（天））
     */
    @Excel(name = "产假")
    private BigDecimal maternityLeave;
    /**
     * 调回单位（或离职/天）
     */
    @Excel(name = "调回单位")
    private BigDecimal transferBack;
    /**
     * 探亲假（天）
     */
    @Excel(name = "探亲假")
    private BigDecimal homeLeave;
    /**
     * 事假（天）
     */
    @Excel(name = "事假")
    private BigDecimal personalLeave;
    /**
     * 考勤汇总-旷工（天）
     */
    @Excel(name = "考勤汇总-旷工")
    private BigDecimal absenteeismDays;
    /**
     * 考勤汇总-其他（天）
     */
    @Excel(name = "考勤汇总-其他")
    private BigDecimal otherDays;
    /**
     * 考勤汇总-出勤率（%）
     */
    @Excel(name = "考勤汇总-出勤率")
    private BigDecimal attendanceRate;
    /**
     * 考勤汇总-未按规定打卡（含忘记打卡）
     */
    @Excel(name = "考勤汇总-未按规定打卡")
    private BigDecimal nonCompliancePunch;
    /**
     * 考勤汇总-迟到（次）
     */
    @Excel(name = "考勤汇总-迟到")
    private Integer lateTimes;
    /**
     * 考勤汇总-上网耍手机（次）
     */
    @Excel(name = "考勤汇总-上网耍手机")
    private Integer surfingMobileTimes;
    /**
     * 考勤汇总-溜班（次）
     */
    @Excel(name = "考勤汇总-溜班")
    private Integer overtimeTimes;
    /**
     * 考勤汇总-空岗
     */
    @Excel(name = "考勤汇总-空岗")
    private BigDecimal vacancy;
    /**
     * 考勤汇总-未规范着装（次）
     */
    @Excel(name = "考勤汇总-未规范着装")
    private Integer nonStandardDressTimes;
    /**
     * 考勤汇总-无故缺席会议
     */
    @Excel(name = "考勤汇总-无故缺席会议")
    private BigDecimal unexcusedMeetingAbsence;
    /**
     * 考勤汇总-会议早退
     */
    @Excel(name = "考勤汇总-会议早退")
    private BigDecimal earlyLeaveMeeting;
    /**
     * 年
     */
    private Integer year;
    /**
     * 月
     */
    private Integer month;
    /**
     * 日
     */
    private Integer day;
    /**
     * 备注
     */
    private String remark;
    /**
     * 哺乳假（天）
     */
    @Excel(name = "哺乳假")
    private BigDecimal breastfeedingLeaveDays;
    /**
     * 例假（天）
     */
    @Excel(name = "例假")
    private BigDecimal menstrualLeaveDays;
    /**
     * 年假（天）
     */
    @Excel(name = "年假")
    private BigDecimal annualLeaveDays;
    /**
     * 调休（天）
     */
    @Excel(name = "调休")
    private BigDecimal compensatedLeaveDays;
    /**
     * 陪产假（天）
     */
    @Excel(name = "陪产假")
    private BigDecimal paternityLeaveDays;
    /**
     * 手机号码
     */
    private String phoneNumer;
    /**
     * 出勤天数
     */
    private Integer goTimes;
    /**
     * 上午缺卡次数
     */
    private Integer morningTimes;
    /**
     * 下午缺卡次数
     */
    private Integer afternoonTimes;
    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof AttendanceStatEntity) {
            AttendanceStatEntity tmp = (AttendanceStatEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

        this.windowCategory = "";

        this.staffId = -1L;

        this.staffName = "";

        this.deptId = -1L;

        this.deptName = "";

        this.backToUnit = BigDecimal.valueOf(0.0);

        this.onDutyLeave = BigDecimal.valueOf(0.0);

        this.outOfOffice = BigDecimal.valueOf(0.0);

        this.shiftCompensation = BigDecimal.valueOf(0.0);

        this.physicalExamination = BigDecimal.valueOf(0.0);

        this.quarantine = BigDecimal.valueOf(0.0);

        this.businessTrip = BigDecimal.valueOf(0.0);

        this.publicHoliday = BigDecimal.valueOf(0.0);

        this.sickLeave = BigDecimal.valueOf(0.0);

        this.funeralLeave = BigDecimal.valueOf(0.0);

        this.marriageLeave = BigDecimal.valueOf(0.0);

        this.childRearingLeave = BigDecimal.valueOf(0.0);

        this.maternityLeave = BigDecimal.valueOf(0.0);

        this.transferBack = BigDecimal.valueOf(0.0);

        this.homeLeave = BigDecimal.valueOf(0.0);

        this.personalLeave = BigDecimal.valueOf(0.0);

        this.absenteeismDays = BigDecimal.valueOf(0.0);

        this.otherDays = BigDecimal.valueOf(0.0);

        this.attendanceRate = BigDecimal.valueOf(0.00);

        this.nonCompliancePunch = BigDecimal.valueOf(0);

        this.lateTimes = 0;

        this.surfingMobileTimes = 0;

        this.overtimeTimes = 0;

        this.vacancy = BigDecimal.valueOf(0);

        this.nonStandardDressTimes = 0;

        this.unexcusedMeetingAbsence = BigDecimal.valueOf(0);

        this.earlyLeaveMeeting = BigDecimal.valueOf(0);

        this.year = -1;

        this.month = -1;

        this.day = -1;

        this.remark = "";

        this.breastfeedingLeaveDays = BigDecimal.valueOf(0.0);

        this.menstrualLeaveDays = BigDecimal.valueOf(0.0);

        this.annualLeaveDays = BigDecimal.valueOf(0.0);

        this.compensatedLeaveDays = BigDecimal.valueOf(0.0);

        this.paternityLeaveDays = BigDecimal.valueOf(0.0);

        this.phoneNumer = "";

        this.goTimes = 0;

        this.morningTimes = 0;

        this.afternoonTimes = 0;
    }
}