From f0866babb5c611a60141b5f0583d30010e0aff66 Mon Sep 17 00:00:00 2001 From: markwang <617514823@qq.com> Date: Wed, 14 Jan 2026 12:54:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1-?= =?UTF-8?q?=E6=89=93=E5=8D=A1=E8=A7=84=E5=88=99=E6=94=AF=E6=8C=81=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=A4=A7=E5=B0=8F=E5=91=A8=E8=A7=84=E5=88=99=20(#872)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- work/checkin/checkin.go | 43 +++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/work/checkin/checkin.go b/work/checkin/checkin.go index 9255e8b..576a81d 100644 --- a/work/checkin/checkin.go +++ b/work/checkin/checkin.go @@ -158,24 +158,32 @@ type OptionGroupRuleCheckinDate struct { MaxAllowArriveEarly int64 `json:"max_allow_arrive_early"` MaxAllowArriveLate int64 `json:"max_allow_arrive_late"` LateRule OptionGroupLateRule `json:"late_rule"` + Biweekly OptionGroupBiweekly `json:"biweekly,omitempty"` } // OptionGroupRuleCheckinTime 工作日上下班打卡时间信息 type OptionGroupRuleCheckinTime struct { - TimeID int64 `json:"time_id"` - WorkSec int64 `json:"work_sec"` - OffWorkSec int64 `json:"off_work_sec"` - RemindWorkSec int64 `json:"remind_work_sec"` - RemindOffWorkSec int64 `json:"remind_off_work_sec"` - AllowRest bool `json:"allow_rest"` - RestBeginTime int64 `json:"rest_begin_time"` - RestEndTime int64 `json:"rest_end_time"` - EarliestWorkSec int64 `json:"earliest_work_sec"` - LatestWorkSec int64 `json:"latest_work_sec"` - EarliestOffWorkSec int64 `json:"earliest_off_work_sec"` - LatestOffWorkSec int64 `json:"latest_off_work_sec"` - NoNeedCheckOn bool `json:"no_need_checkon"` - NoNeedCheckOff bool `json:"no_need_checkoff"` + TimeID int64 `json:"time_id"` + WorkSec int64 `json:"work_sec"` + OffWorkSec int64 `json:"off_work_sec"` + RemindWorkSec int64 `json:"remind_work_sec"` + RemindOffWorkSec int64 `json:"remind_off_work_sec"` + AllowRest bool `json:"allow_rest"` + RestBeginTime int64 `json:"rest_begin_time"` + RestEndTime int64 `json:"rest_end_time"` + EarliestWorkSec int64 `json:"earliest_work_sec"` + LatestWorkSec int64 `json:"latest_work_sec"` + EarliestOffWorkSec int64 `json:"earliest_off_work_sec"` + LatestOffWorkSec int64 `json:"latest_off_work_sec"` + NoNeedCheckOn bool `json:"no_need_checkon"` + NoNeedCheckOff bool `json:"no_need_checkoff"` + RestTimes []OptionGroupRuleRestTimes `json:"rest_times,omitempty"` +} + +// OptionGroupRuleRestTimes 多组休息时间 +type OptionGroupRuleRestTimes struct { + RestBeginTime int64 `json:"rest_begin_time,omitempty"` + RestEndTime int64 `json:"rest_end_time,omitempty"` } // OptionGroupLateRule 晚走晚到时间规则信息 @@ -192,6 +200,13 @@ type OptionGroupTimeRule struct { OnWorkFlexTime int64 `json:"onwork_flex_time"` } +// OptionGroupBiweekly 大小周规则 +type OptionGroupBiweekly struct { + EnableWeekdayRecurrence bool `json:"enable_weekday_recurrence"` + OddWorkdays []int64 `json:"odd_workdays"` + EvenWorkdays []int64 `json:"even_workdays"` +} + // OptionGroupSpeWorkdays 特殊工作日 type OptionGroupSpeWorkdays struct { Timestamp int64 `json:"timestamp"`