yudao-module-hrm-api/src/main/java/cn/iocoder/yudao/module/hrm/enums/HrmAttendanceClockTypeEnum.java
@@ -16,7 +16,14 @@ NORMAL(1, "正常"), LATE(2, "迟到"), EARLY(3, "早退"), MISSING(4, "缺卡"); MISSING(4, "缺卡"), /** * 请假 * * 当天有审批通过的请假单时为该类型。请假当天仍允许打卡, * 但打卡不会被判定为迟到/早退,未打卡也不会判定为缺卡。 */ LEAVE(5, "请假"); private final Integer type; private final String name; @@ -28,4 +35,19 @@ return ARRAYS; } /** * 根据类型获取名称,未知类型返回 null */ public static String getNameByType(Integer type) { if (type == null) { return null; } for (HrmAttendanceClockTypeEnum value : values()) { if (value.getType().equals(type)) { return value.getName(); } } return null; } }