作者 yangfu

fix: 打卡工时修改

... ... @@ -182,9 +182,13 @@ func (productAttendanceRecord *ProductAttendanceRecord) AttendanceBreakTime(prod
checkSignIn, checkSignOut time.Time
)
checkSignIn = v.GetCheckBeginTime(signIn.Local())
checkSignOut = checkSignIn //v.GetCheckEndTime(signIn.Local())
if xtime.BeforeEqual(signIn.Local(), checkSignIn) && xtime.AfterEqual(signOut.Local(), checkSignOut) {
bt += v.BreakTime
checkSignOut = v.GetCheckEndTime(signIn.Local())
if xtime.BeforeEqual(signIn.Local(), checkSignIn) && xtime.AfterEqual(signOut.Local(), checkSignIn) {
if xtime.AfterEqual(signOut.Local(), checkSignOut) {
bt += v.BreakTime
} else {
bt += utils.Round(signOut.Local().Sub(checkSignIn).Hours(), 2)
}
}
log.Logger.Debug(fmt.Sprintf("range(%v,%v) actual(%v,%v) break_time:%v", checkSignIn, checkSignOut, signIn.Local(), signOut.Local(), bt))
}
... ...