AttendDay
This commit is contained in:
parent
17e2f347cb
commit
d3a04a8662
|
@ -6,6 +6,7 @@ import (
|
|||
"enterprise/common/registry"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cast"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -29,6 +30,14 @@ func (s *SalaryCalculator1002) Calculate(salary *model.StaffSalary) {
|
|||
return
|
||||
}
|
||||
|
||||
if salary.UserName == "luoyi" {
|
||||
salary.AttendDay = float64(salary.ShouldDay - 3)
|
||||
} else if strings.ToLower(salary.UserName) == "wangyan" {
|
||||
salary.AttendDay = float64(salary.ShouldDay) - 3.5
|
||||
} else if strings.ToLower(salary.UserName) == "zhouhong" {
|
||||
salary.AttendDay = float64(salary.ShouldDay) - 3.5
|
||||
}
|
||||
|
||||
salary.AttendSalary = cast.ToFloat64(userSlary.Base) * (salary.AttendDay / float64(salary.ShouldDay))
|
||||
salary.TargetSalary = cast.ToFloat64(userSlary.Target)
|
||||
|
||||
|
|
Loading…
Reference in New Issue