ruleCheckinTimes

This commit is contained in:
jiangyong 2025-03-10 00:35:31 +08:00
parent 8fa7509eb5
commit 2f47649d3d
1 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ func (q *AppCheckin) GetCheckinDataV2(startDay, endDay string, userIds []string)
for _, dat := range g.Get("datas").Array() { for _, dat := range g.Get("datas").Array() {
ruleCheckinTimes := dat.Get("base_info.rule_info.checkintime").Array() ruleCheckinTimes := dat.Get("base_info.rule_info.checkintime").Array()
if len(ruleCheckinTimes) < 2 { if len(ruleCheckinTimes) < 1 {
continue continue
} }
userData := new(UserCheckIn) userData := new(UserCheckIn)
@ -210,7 +210,7 @@ func (q *AppCheckin) GetCheckinDataV2(startDay, endDay string, userIds []string)
} }
if earliestTime == lastestTime { if earliestTime == lastestTime {
if earliestTime < ruleCheckinTimes[1].Get("work_sec").Int() { if earliestTime <= ruleCheckinTimes[0].Get("off_work_sec").Int() {
userData.Exception = "下班未打卡" userData.Exception = "下班未打卡"
} else { } else {
userData.Exception = "上班未打卡" userData.Exception = "上班未打卡"