From b54a7f04611301721efc8c7785b3790ae10b9dc0 Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Tue, 1 Apr 2025 18:13:55 +0800 Subject: [PATCH] worker hour2 --- service/staff_salary.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/staff_salary.go b/service/staff_salary.go index b2100d6..d7b0d5f 100644 --- a/service/staff_salary.go +++ b/service/staff_salary.go @@ -297,7 +297,7 @@ func (s *StaffSalary) getRealWorkDay(month string) float64 { //其他按工作时长结算 if checkin.EndTime > 0 && checkin.StartTime > 0 { - duration := float64(checkin.EndTime-checkin.StartTime) / (cast.ToFloat64(corp.GetConfig().WorkerHouer) + 1.5) //加上午休的1.5小时 + duration := (float64(checkin.EndTime-checkin.StartTime)/float64(3600) - 1.5) / cast.ToFloat64(corp.GetConfig().WorkerHouer) //减去午休的1.5小时 realWorkdays += goutil.If(duration > 1, 1, duration) } }