float cut

This commit is contained in:
jiangyong27 2023-09-05 10:49:24 +08:00
parent f6d0700068
commit 7118d4c9f6
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package service
import (
butil "enterprise/base/util"
"enterprise/common/config"
"enterprise/common/dao"
"enterprise/common/model"
@ -182,6 +183,11 @@ func (s *StaffSalary) Summary(month string, ctx *gin.Context) {
summary.PersonalTax += staff.PersonalTax
summary.Holiday += staff.Holiday
}
summary.Holiday = butil.FloatCut(summary.Holiday)
summary.BaseSalary = butil.FloatCut(summary.BaseSalary)
summary.RealSalary = butil.FloatCut(summary.RealSalary)
summary.SocialInsurence = butil.FloatCut(summary.SocialInsurence)
summary.PersonalTax = butil.FloatCut(summary.PersonalTax)
datas = append(datas, []string{"合计", "-", "-", "-",
cast.ToString(summary.BaseSalary), cast.ToString(summary.RealSalary), cast.ToString(summary.SocialInsurence),
cast.ToString(summary.PersonalTax), cast.ToString(summary.Holiday),

View File

@ -20,7 +20,7 @@ func Init() error {
go SyncCheckin(time.Now().Format("2006-01-02"))
})
cron.Every(1).Day().At("03:00").Do(func() {
cron.Every(1).Day().At("01:00").Do(func() {
go SyncStaffInfo()
})
cron.Every(1).Month(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).At("02:00").Do(func() {