package com.czg.market.vo;

import com.alibaba.fastjson2.JSONArray;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class DingAttendanceStatsVO {
    /** 出勤天数 */
    private String attendDays;

    /** 休息天数 */
    private String restDays;

    /** 工作时长（小时/分钟，可自行约定） */
    private String workDuration;

    /** 迟到次数 */
    private String lateCount;

    /** 迟到时长（分钟） */
    private String lateDuration;

    /** 应出勤天数 */
    private String shouldAttendDays;

    /**
     * 用户名
     */
    private String name;
    private String userId;
    /**
     * 用户是否有有效考勤数据
     */
    private boolean isActive;
    /**
     * 旷工天数
     */
    private String absenceDays;

    private JSONArray report;

    public void setValByName(String name, String val) {
        switch (name) {
            case "出勤天数":
                this.attendDays = val;
                break;
            case "休息天数":
                this.restDays = val;
                break;
            case "工作时长":
                this.workDuration = val;
                break;
            case "迟到次数":
                this.lateCount = val;
                break;
            case "迟到时长":
                this.lateDuration = val;
                break;
            case "应出勤天数":
                this.shouldAttendDays = val;
                break;
            case "旷工天数":
                this.absenceDays = val;
                break;

        }
    }

}
