AttendDay2

This commit is contained in:
jiangyong27 2025-04-02 18:07:40 +08:00
parent f66182de94
commit de6cfbc773
1 changed files with 6 additions and 4 deletions

View File

@ -103,14 +103,16 @@ func (s *StaffSalary) CalcSalary(salary *model.StaffSalary, month, expr string)
func (s *StaffSalary) calculate(corp *model.Corp, salary *model.StaffSalary, expression string) {
//获取基础数据
data := s.getCalcData(salary)
//获取业务数据
dataFactory := registry.NewSalaryCalculator(corp, s.user)
var biz interface{} = nil
if dataFactory != nil {
data["biz"] = dataFactory.Calculate(salary)
biz = dataFactory.Calculate(salary)
}
data := s.getCalcData(salary)
data["biz"] = biz
salary.Extra = goutil.EncodeJSONIndent(data)
salary.SetExtra("calculate", goutil.GetNowTime())