check len
This commit is contained in:
parent
cfc44a71a5
commit
c5ed26fa20
|
@ -206,11 +206,13 @@ func (q *AppCheckin) GetCheckinDataV2(startDay, endDay string, userIds []string)
|
||||||
|
|
||||||
if earliestTime == lastestTime {
|
if earliestTime == lastestTime {
|
||||||
ruleCheckinTimes := dat.Get("base_info.rule_info.checkintime").Array()
|
ruleCheckinTimes := dat.Get("base_info.rule_info.checkintime").Array()
|
||||||
|
if len(ruleCheckinTimes) > 2 {
|
||||||
if earliestTime < ruleCheckinTimes[1].Get("work_sec").Int() {
|
if earliestTime < ruleCheckinTimes[1].Get("work_sec").Int() {
|
||||||
userData.Exception = "下班未打卡"
|
userData.Exception = "下班未打卡"
|
||||||
} else {
|
} else {
|
||||||
userData.Exception = "上班未打卡"
|
userData.Exception = "上班未打卡"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if dat.Get("summary_info.regular_work_sec").Int() < dat.Get("summary_info.standard_work_sec").Int() {
|
if dat.Get("summary_info.regular_work_sec").Int() < dat.Get("summary_info.standard_work_sec").Int() {
|
||||||
userData.Exception = "出勤异常"
|
userData.Exception = "出勤异常"
|
||||||
|
|
Loading…
Reference in New Issue