From 315612150ca28d1f3e56ad047b1993668980c0c2 Mon Sep 17 00:00:00 2001 From: zhongjun Date: Sat, 8 Jul 2023 10:29:28 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20#3047=20=E3=80=90=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E3=80=91=E8=8E=B7=E5=8F=96=E5=91=98=E5=B7=A5?= =?UTF-8?q?=E6=89=93=E5=8D=A1=E8=A7=84=E5=88=99=E6=8E=A5=E5=8F=A3=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=80=BC=E5=A2=9E=E5=8A=A0=E6=B7=BB=E5=8A=A0=E6=8E=92?= =?UTF-8?q?=E7=8F=AD=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cp/bean/oa/WxCpCheckinGroupBase.java | 477 ++++++++++++++++++ .../weixin/cp/bean/oa/WxCpCheckinOption.java | 144 +----- .../cp/bean/oa/WxCpCropCheckinOption.java | 452 +---------------- 3 files changed, 482 insertions(+), 591 deletions(-) create mode 100644 weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinGroupBase.java diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinGroupBase.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinGroupBase.java new file mode 100644 index 000000000..f1c1a8580 --- /dev/null +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinGroupBase.java @@ -0,0 +1,477 @@ +package me.chanjar.weixin.cp.bean.oa; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 打卡规则基础信息 + * + * @author zhongjun96 + * @date 2023/7/7 + **/ +@Data +public class WxCpCheckinGroupBase implements Serializable { + + private static final long serialVersionUID = -2763570465930237249L; + + + /** + * 打卡规则类型,1:固定时间上下班;2:按班次上下班;3:自由上下班 + */ + @SerializedName("grouptype") + private Long groupType; + + /** + * 打卡规则id + */ + @SerializedName("groupid") + private Long groupId; + + /** + * 打卡规则名称 + */ + @SerializedName("groupname") + private String groupName; + + /** + * 打卡时间,当规则类型为排班时没有意义 + */ + @SerializedName("checkindate") + private List checkinDate; + + /** + * 特殊日期-必须打卡日期信息,timestamp表示具体时间 + */ + @SerializedName("spe_workdays") + private List speWorkdays; + + /** + * 特殊日期-不用打卡日期信息, timestamp表示具体时间 + */ + @SerializedName("spe_offdays") + private List speOffDays; + + /** + * 是否同步法定节假日,true为同步,false为不同步,当前排班不支持 + */ + @SerializedName("sync_holidays") + private Boolean syncHolidays; + + /** + * 是否打卡必须拍照,true为必须拍照,false为不必须拍照 + */ + @SerializedName("need_photo") + private Boolean needPhoto; + + /** + * 是否备注时允许上传本地图片,true为允许,false为不允许 + */ + @SerializedName("note_can_use_local_pic") + private Boolean noteCanUseLocalPic; + + /** + * 是否非工作日允许打卡,true为允许,false为不允许 + */ + @SerializedName("allow_checkin_offworkday") + private Boolean allowCheckinOffWorkDay; + + /** + * 是否允许提交补卡申请,true为允许,false为不允许 + */ + @SerializedName("allow_apply_offworkday") + private Boolean allowApplyOffWorkDay; + + /** + * 打卡地点-WiFi打卡信息 + */ + @SerializedName("wifimac_infos") + private List wifiMacInfos; + + /** + * 打卡地点-WiFi打卡信息 + */ + @SerializedName("loc_infos") + private List locInfos; + + + /** + * 排班信息,只有规则为按班次上下班打卡时才有该配置 + */ + @SerializedName("schedulelist") + private List schedulelist; + + + /** + * The type Checkin date. + */ + @Data + public static class CheckinDate implements Serializable { + private static final long serialVersionUID = -8560643656775167406L; + /** + * 工作日。若为固定时间上下班或自由上下班,则1到6分别表示星期一到星期六,0表示星期日 + */ + @SerializedName("workdays") + private List workdays; + + /** + * 工作日上下班打卡时间信息 + */ + @SerializedName("checkintime") + private List checkinTime; + + /** + * 下班不需要打卡,true为下班不需要打卡,false为下班需要打卡 + */ + @SerializedName("noneed_offwork") + private Boolean noneedOffwork; + + /** + * 打卡时间限制(毫秒) + */ + @SerializedName("limit_aheadtime") + private Long limitAheadtime; + + /** + * 弹性时间(毫秒)只有flex_on_duty_time,flex_off_duty_time不生效时(值为-1)才有意义 + */ + @SerializedName("flex_time") + private Integer flexTime; + + /** + * 允许迟到时间,单位ms + */ + @SerializedName("flex_on_duty_time") + private Integer flexOnDutyTime; + + /** + * 允许早退时间,单位ms + */ + @SerializedName("flex_off_duty_time") + private Integer flexOffDutyTime; + } + + /** + * The type Checkin time. + */ + @Data + public static class CheckinTime implements Serializable { + + private static final long serialVersionUID = -5507709858609705279L; + /** + * 上班时间,表示为距离当天0点的秒数。 + */ + @SerializedName("work_sec") + private Integer workSec; + + /** + * 下班时间,表示为距离当天0点的秒数。 + */ + @SerializedName("off_work_sec") + private Integer offWorkSec; + + /** + * 上班提醒时间,表示为距离当天0点的秒数。。 + */ + @SerializedName("remind_work_sec") + private Integer remindWorkSec; + + /** + * 下班提醒时间,表示为距离当天0点的秒数。 + */ + @SerializedName("remind_off_work_sec") + private Integer remindOffWorkSec; + } + + /** + * The type Spe workday. + */ + @Data + public static class SpeWorkday implements Serializable { + + private static final long serialVersionUID = -4620710297258742666L; + /** + * 特殊日期-必须打卡日期时间戳 + */ + @SerializedName("timestamp") + private Long timestamp; + + /** + * 特殊日期备注 + */ + @SerializedName("notes") + private String notes; + + /** + * 特殊日期-必须打卡日期-上下班打卡时间 + */ + @SerializedName("checkintime") + private List checkinTime; + } + + /** + * The type Spe off day. + */ + @Data + public static class SpeOffDay implements Serializable { + private static final long serialVersionUID = 9214798931489490993L; + /** + * 特殊日期-不用打卡日期时间戳 + */ + @SerializedName("timestamp") + private Long timestamp; + + /** + * 特殊日期备注 + */ + @SerializedName("notes") + private String notes; + } + + /** + * The type Wifi mac info. + */ + @Data + public static class WifiMacInfo implements Serializable { + + private static final long serialVersionUID = 6742659716677227089L; + + /** + * WiFi打卡地点名称 + */ + @SerializedName("wifiname") + private String wifiname; + + /** + * WiFi打卡地点MAC地址/bssid + */ + @SerializedName("wifimac") + private String wifimac; + } + + /** + * The type Loc info. + */ + @Data + public static class LocInfo implements Serializable { + + private static final long serialVersionUID = -5591379191341944101L; + /** + * 位置打卡地点纬度,是实际纬度的1000000倍,与腾讯地图一致采用GCJ-02坐标系统标准 + */ + @SerializedName("lat") + private Long lat; + + /** + * 位置打卡地点经度,是实际经度的1000000倍,与腾讯地图一致采用GCJ-02坐标系统标准 + */ + @SerializedName("lng") + private Long lng; + + /** + * 位置打卡地点名称 + */ + @SerializedName("loc_title") + private String locTitle; + + /** + * 位置打卡地点详情 + */ + @SerializedName("loc_detail") + private String locDetail; + + /** + * 允许打卡范围(米) + */ + @SerializedName("distance") + private Integer distance; + } + + + /** + * The type Schedule. + */ + @Data + public static class Schedule implements Serializable { + + private static final long serialVersionUID = -2461113644925307266L; + + /** + * 班次id + */ + @SerializedName("schedule_id") + private Integer scheduleId; + + /** + * 班次名称 + */ + @SerializedName("schedule_name") + private String scheduleName; + + /** + * 班次上下班时段信息 + */ + @SerializedName("time_section") + private List timeSection; + + /** + * 允许提前打卡时间 + */ + @SerializedName("limit_aheadtime") + private Long limitAheadTime; + + /** + * 下班xx秒后不允许打下班卡 + */ + @SerializedName("limit_offtime") + private Integer limitOffTime; + + /** + * 下班不需要打卡 + */ + @SerializedName("noneed_offwork") + private Boolean noNeedOffWork; + + /** + * 是否允许弹性时间 + */ + @SerializedName("allow_flex") + private Boolean allowFlex; + + /** + * 允许迟到时间 + */ + @SerializedName("flex_on_duty_time") + private Integer flexOnDutyTime; + + /** + * 允许早退时间 + */ + @SerializedName("flex_off_duty_time") + private Integer flexOffDutyTime; + + /** + * 非工作日加班,跨天时间,距离当天00:00的秒数 + */ + @SerializedName("late_rule") + private LateRule lateRule; + + /** + * 最早可打卡时间限制 + */ + @SerializedName("max_allow_arrive_early") + private Integer maxAllowArriveEarly; + + /** + * 最晚可打卡时间限制,max_allow_arrive_early、max_allow_arrive_early与flex_on_duty_time、flex_off_duty_time互斥,当设置其中一组时,另一组数值置0 + */ + @SerializedName("max_allow_arrive_late") + private Integer maxAllowArriveLate; + + } + + + /** + * The type Time section. + */ + @Data + public static class TimeSection implements Serializable { + private static final long serialVersionUID = 7497252128339062724L; + + /** + * 时段id,为班次中某一堆上下班时间组合的id + */ + @SerializedName("time_id") + private Integer timeId; + + /** + * 上班时间,表示为距离当天0点的秒数。 + */ + @SerializedName("work_sec") + private Integer workSec; + + /** + * 下班时间,表示为距离当天0点的秒数。 + */ + @SerializedName("off_work_sec") + private Integer offWorkSec; + + /** + * 上班提醒时间,表示为距离当天0点的秒数。 + */ + @SerializedName("remind_work_sec") + private Long remindWorkSec; + + /** + * 下班提醒时间,表示为距离当天0点的秒数。 + */ + @SerializedName("remind_off_work_sec") + private Integer remindOffWorkSec; + + /** + * 休息开始时间,仅单时段支持,距离0点的秒 + */ + @SerializedName("rest_begin_time") + private Integer restBeginTime; + + /** + * 休息结束时间,仅单时段支持,距离0点的秒 + */ + @SerializedName("rest_end_time") + private Integer restEndTime; + + /** + * 是否允许休息 + */ + @SerializedName("allow_rest") + private Boolean allowRest; + } + + + /** + * The type Late rule. + */ + @Data + public static class LateRule implements Serializable { + + private static final long serialVersionUID = 5604969713950037053L; + + + /** + * 是否允许超时下班(下班晚走次日晚到)允许时onwork_flex_time,offwork_after_time才有意义 + */ + @SerializedName("allow_offwork_after_time") + private Boolean allowOffWorkAfterTime; + + /** + * 迟到规则时间 + */ + @SerializedName("timerules") + private List timerules; + } + + + /** + * The type Time rule. + */ + @Data + public static class TimeRule implements Serializable { + + private static final long serialVersionUID = 5680614050081598333L; + + /** + * 晚走的时间 距离最晚一个下班的时间单位:秒 + */ + @SerializedName("offwork_after_time") + private Integer offWorkAfterTime; + + /** + * 第二天第一个班次允许迟到的弹性时间单位:秒 + */ + @SerializedName("onwork_flex_time") + private Integer onWorkFlexTime; + + } +} diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinOption.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinOption.java index db7a78c1b..9b3154a86 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinOption.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCheckinOption.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import lombok.Data; import java.io.Serializable; -import java.util.List; /** * 企业微信打卡规则. @@ -18,145 +17,6 @@ public class WxCpCheckinOption implements Serializable { @SerializedName("userid") private String userId; - private Group group; - - /** - * The type Checkin date. - */ - @Data - public static class CheckinDate implements Serializable { - private static final long serialVersionUID = -5601722383347110974L; - - private List workdays; - - @SerializedName("checkintime") - private CheckinTime[] checkinTime; - - @SerializedName("flex_time") - private Long flexTime; - - @SerializedName("noneed_offwork") - private Boolean noNeedOffwork; - - @SerializedName("limit_aheadtime") - private Long limitAheadTime; - } - - /** - * The type Checkin time. - */ - @Data - public static class CheckinTime implements Serializable { - private static final long serialVersionUID = -8579954143265336276L; - - @SerializedName("work_sec") - private Long workSec; - - @SerializedName("off_work_sec") - private Long offWorkSec; - - @SerializedName("remind_work_sec") - private Long remindWorkSec; - - @SerializedName("remind_off_work_sec") - private Long remindOffWorkSec; - } - - /** - * The type Group. - */ - @Data - public static class Group implements Serializable { - - private static final long serialVersionUID = -5888406969613403044L; - - @SerializedName("groupid") - private Long id; - - @SerializedName("groupname") - private String name; - - @SerializedName("grouptype") - private Integer type; - - @SerializedName("checkindate") - private List checkinDate; - - @SerializedName("spe_workdays") - private List speWorkdays; - - @SerializedName("spe_offdays") - private List speOffdays; - - @SerializedName("sync_holidays") - private Boolean syncHolidays; - - @SerializedName("need_photo") - private Boolean needPhoto; - - @SerializedName("note_can_use_local_pic") - private Boolean noteCanUseLocalPic; - - @SerializedName("allow_checkin_offworkday") - private Boolean allowCheckinOffWorkday; - - @SerializedName("allow_apply_offworkday") - private Boolean allowApplyOffWorkday; - - @SerializedName("wifimac_infos") - private List wifiMacInfos; - - @SerializedName("loc_infos") - private List locInfos; - - } - - /** - * The type Wifi mac info. - */ - @Data - public static class WifiMacInfo implements Serializable { - private static final long serialVersionUID = -4657809185716627368L; - - @SerializedName("wifiname") - private String name; - - @SerializedName("wifimac") - private String mac; - } - - /** - * The type Loc info. - */ - @Data - public static class LocInfo implements Serializable { - private static final long serialVersionUID = -618965280668099608L; - - private Long lat; - private Long lng; - - @SerializedName("loc_title") - private String title; - - @SerializedName("loc_detail") - private String detail; - - private Long distance; - } - - /** - * The type Spe day. - */ - @Data - public static class SpeDay implements Serializable { - private static final long serialVersionUID = -3538818921359212748L; - - private Long timestamp; - private String notes; - - @SerializedName("checkintime") - private List checkinTime; - - } - + @SerializedName("group") + private WxCpCheckinGroupBase group; } diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCropCheckinOption.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCropCheckinOption.java index 98ac78d71..bda77447f 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCropCheckinOption.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/WxCpCropCheckinOption.java @@ -2,6 +2,7 @@ package me.chanjar.weixin.cp.bean.oa; import com.google.gson.annotations.SerializedName; import lombok.Data; +import lombok.EqualsAndHashCode; import java.io.Serializable; import java.util.List; @@ -11,88 +12,11 @@ import java.util.List; * * @author Liuwm */ +@EqualsAndHashCode(callSuper = true) @Data -public class WxCpCropCheckinOption implements Serializable { +public class WxCpCropCheckinOption extends WxCpCheckinGroupBase implements Serializable { private static final long serialVersionUID = 1725954575430704232L; - /** - * 打卡规则类型,1:固定时间上下班;2:按班次上下班;3:自由上下班 - */ - @SerializedName("grouptype") - private Long groupType; - - /** - * 打卡规则id - */ - @SerializedName("groupid") - private Long groupId; - - /** - * 打卡规则名称 - */ - @SerializedName("groupname") - private String groupName; - - /** - * 打卡时间,当规则类型为排班时没有意义 - */ - @SerializedName("checkindate") - private List checkinDate; - - /** - * 特殊日期-必须打卡日期信息,timestamp表示具体时间 - */ - @SerializedName("spe_workdays") - private List speWorkdays; - - /** - * 特殊日期-不用打卡日期信息, timestamp表示具体时间 - */ - @SerializedName("spe_offdays") - private List speOffDays; - - /** - * 是否同步法定节假日,true为同步,false为不同步,当前排班不支持 - */ - @SerializedName("sync_holidays") - private Boolean syncHolidays; - - /** - * 是否打卡必须拍照,true为必须拍照,false为不必须拍照 - */ - @SerializedName("need_photo") - private Boolean needPhoto; - - /** - * 是否备注时允许上传本地图片,true为允许,false为不允许 - */ - @SerializedName("note_can_use_local_pic") - private Boolean noteCanUseLocalPic; - - /** - * 是否非工作日允许打卡,true为允许,false为不允许 - */ - @SerializedName("allow_checkin_offworkday") - private Boolean allowCheckinOffWorkDay; - - /** - * 是否允许提交补卡申请,true为允许,false为不允许 - */ - @SerializedName("allow_apply_offworkday") - private Boolean allowApplyOffWorkDay; - - /** - * 打卡地点-WiFi打卡信息 - */ - @SerializedName("wifimac_infos") - private List wifiMacInfos; - - /** - * 打卡地点-WiFi打卡信息 - */ - @SerializedName("loc_infos") - private List locInfos; - /** * 打卡人员信息 */ @@ -165,12 +89,6 @@ public class WxCpCropCheckinOption implements Serializable { @SerializedName("update_userid") private String updateUserid; - /** - * 加班信息,相关信息需要设置后才能显示 - */ - @SerializedName("schedulelist") - private List schedulelist; - /** * 自由签到,上班打卡后xx秒可打下班卡 @@ -178,186 +96,6 @@ public class WxCpCropCheckinOption implements Serializable { @SerializedName("offwork_interval_time") private Integer offWorkIntervalTime; - - /** - * The type Checkin date. - */ - @Data - public static class CheckinDate implements Serializable { - private static final long serialVersionUID = -8560643656775167406L; - /** - * 工作日。若为固定时间上下班或自由上下班,则1到6分别表示星期一到星期六,0表示星期日 - */ - @SerializedName("workdays") - private List workdays; - - /** - * 工作日上下班打卡时间信息 - */ - @SerializedName("checkintime") - private List checkinTime; - - /** - * 下班不需要打卡,true为下班不需要打卡,false为下班需要打卡 - */ - @SerializedName("noneed_offwork") - private Boolean noneedOffwork; - - /** - * 打卡时间限制(毫秒) - */ - @SerializedName("limit_aheadtime") - private Long limitAheadtime; - - /** - * 允许迟到时间,单位ms - */ - @SerializedName("flex_on_duty_time") - private Integer flexOnDutyTime; - - /** - * 允许早退时间,单位ms - */ - @SerializedName("flex_off_duty_time") - private Integer flexOffDutyTime; - } - - /** - * The type Checkin time. - */ - @Data - public static class CheckinTime implements Serializable { - - private static final long serialVersionUID = -5507709858609705279L; - /** - * 上班时间,表示为距离当天0点的秒数。 - */ - @SerializedName("work_sec") - private Integer workSec; - - /** - * 下班时间,表示为距离当天0点的秒数。 - */ - @SerializedName("off_work_sec") - private Integer offWorkSec; - - /** - * 上班提醒时间,表示为距离当天0点的秒数。。 - */ - @SerializedName("remind_work_sec") - private Integer remindWorkSec; - - /** - * 下班提醒时间,表示为距离当天0点的秒数。 - */ - @SerializedName("remind_off_work_sec") - private Integer remindOffWorkSec; - } - - /** - * The type Spe workday. - */ - @Data - public static class SpeWorkday implements Serializable { - - private static final long serialVersionUID = -4620710297258742666L; - /** - * 特殊日期-必须打卡日期时间戳 - */ - @SerializedName("timestamp") - private Long timestamp; - - /** - * 特殊日期备注 - */ - @SerializedName("notes") - private String notes; - - /** - * 特殊日期-必须打卡日期-上下班打卡时间 - */ - @SerializedName("checkintime") - private List checkinTime; - } - - /** - * The type Spe off day. - */ - @Data - public static class SpeOffDay implements Serializable { - private static final long serialVersionUID = 9214798931489490993L; - /** - * 特殊日期-不用打卡日期时间戳 - */ - @SerializedName("timestamp") - private Long timestamp; - - /** - * 特殊日期备注 - */ - @SerializedName("notes") - private String notes; - } - - /** - * The type Wifi mac info. - */ - @Data - public static class WifiMacInfo implements Serializable { - - private static final long serialVersionUID = 6742659716677227089L; - - /** - * WiFi打卡地点名称 - */ - @SerializedName("wifiname") - private String wifiname; - - /** - * WiFi打卡地点MAC地址/bssid - */ - @SerializedName("wifimac") - private String wifimac; - } - - /** - * The type Loc info. - */ - @Data - public static class LocInfo implements Serializable { - - private static final long serialVersionUID = -5591379191341944101L; - /** - * 位置打卡地点纬度,是实际纬度的1000000倍,与腾讯地图一致采用GCJ-02坐标系统标准 - */ - @SerializedName("lat") - private Long lat; - - /** - * 位置打卡地点经度,是实际经度的1000000倍,与腾讯地图一致采用GCJ-02坐标系统标准 - */ - @SerializedName("lng") - private Long lng; - - /** - * 位置打卡地点名称 - */ - @SerializedName("loc_title") - private String locTitle; - - /** - * 位置打卡地点详情 - */ - @SerializedName("loc_detail") - private String locDetail; - - /** - * 允许打卡范围(米) - */ - @SerializedName("distance") - private Integer distance; - } - /** * The type Range. */ @@ -680,188 +418,4 @@ public class WxCpCropCheckinOption implements Serializable { private Integer otNonworkingDaySpanDayTime; } - - /** - * The type Schedule. - */ - @Data - public static class Schedule implements Serializable { - - private static final long serialVersionUID = -2461113644925307266L; - - /** - * 班次id - */ - @SerializedName("schedule_id") - private Integer scheduleId; - - /** - * 班次名称 - */ - @SerializedName("schedule_name") - private String scheduleName; - - /** - * 班次上下班时段信息 - */ - @SerializedName("time_section") - private List timeSection; - - /** - * 允许提前打卡时间 - */ - @SerializedName("limit_aheadtime") - private Long limitAheadTime; - - /** - * 下班xx秒后不允许打下班卡 - */ - @SerializedName("limit_offtime") - private Integer limitOffTime; - - /** - * 下班不需要打卡 - */ - @SerializedName("noneed_offwork") - private Boolean noNeedOffWork; - - /** - * 是否允许弹性时间 - */ - @SerializedName("allow_flex") - private Boolean allowFlex; - - /** - * 允许迟到时间 - */ - @SerializedName("flex_on_duty_time") - private Integer flexOnDutyTime; - - /** - * 允许早退时间 - */ - @SerializedName("flex_off_duty_time") - private Integer flexOffDutyTime; - - /** - * 非工作日加班,跨天时间,距离当天00:00的秒数 - */ - @SerializedName("late_rule") - private LateRule lateRule; - - /** - * 最早可打卡时间限制 - */ - @SerializedName("max_allow_arrive_early") - private Integer maxAllowArriveEarly; - - /** - * 最晚可打卡时间限制,max_allow_arrive_early、max_allow_arrive_early与flex_on_duty_time、flex_off_duty_time互斥,当设置其中一组时,另一组数值置0 - */ - @SerializedName("max_allow_arrive_late") - private Integer maxAllowArriveLate; - - } - - - /** - * The type Time section. - */ - @Data - public static class TimeSection implements Serializable { - private static final long serialVersionUID = 7497252128339062724L; - - /** - * 时段id,为班次中某一堆上下班时间组合的id - */ - @SerializedName("time_id") - private Integer timeId; - - /** - * 上班时间,表示为距离当天0点的秒数。 - */ - @SerializedName("work_sec") - private Integer workSec; - - /** - * 下班时间,表示为距离当天0点的秒数。 - */ - @SerializedName("off_work_sec") - private Integer offWorkSec; - - /** - * 上班提醒时间,表示为距离当天0点的秒数。 - */ - @SerializedName("remind_work_sec") - private Long remindWorkSec; - - /** - * 下班提醒时间,表示为距离当天0点的秒数。 - */ - @SerializedName("remind_off_work_sec") - private Integer remindOffWorkSec; - - /** - * 休息开始时间,仅单时段支持,距离0点的秒 - */ - @SerializedName("rest_begin_time") - private Integer restBeginTime; - - /** - * 休息结束时间,仅单时段支持,距离0点的秒 - */ - @SerializedName("rest_end_time") - private Integer restEndTime; - - /** - * 是否允许休息 - */ - @SerializedName("allow_rest") - private Boolean allowRest; - } - - - /** - * The type Late rule. - */ - @Data - public static class LateRule implements Serializable { - - private static final long serialVersionUID = 5604969713950037053L; - - - /** - * 是否允许超时下班(下班晚走次日晚到)允许时onwork_flex_time,offwork_after_time才有意义 - */ - @SerializedName("allow_offwork_after_time") - private Boolean allowOffWorkAfterTime; - - /** - * 迟到规则时间 - */ - @SerializedName("timerules") - private List timerules; - } - - /** - * The type Time rule. - */ - @Data - public static class TimeRule implements Serializable { - - private static final long serialVersionUID = 5680614050081598333L; - - /** - * 晚走的时间 距离最晚一个下班的时间单位:秒 - */ - @SerializedName("offwork_after_time") - private Integer offWorkAfterTime; - - /** - * 第二天第一个班次允许迟到的弹性时间单位:秒 - */ - @SerializedName("onwork_flex_time") - private Integer onWorkFlexTime; - - } }