This commit is contained in:
jiangyong27 2025-03-14 13:06:49 +08:00
parent fd04d1ebc3
commit 15f77196f6
2 changed files with 7 additions and 3 deletions

View File

@ -39,6 +39,7 @@ type UpdateSalaryReq struct {
Id string `json:"id"`
OtherIncome string `json:"other_income"`
OtherDeduct string `json:"other_deduct"`
PersonalDeduct string `json:"personal_deduct"`
}
type ListSalaryReq struct {

View File

@ -106,6 +106,9 @@ func (s *StaffSalary) Update(sess *session.AdminSession, req *api.UpdateSalaryRe
if req.OtherDeduct != "" {
salary.OtherDeduct = cast.ToFloat64(req.OtherDeduct)
}
if req.PersonalDeduct != "" {
salary.PersonalDeduct = cast.ToFloat64(req.PersonalDeduct)
}
err = dao.NewStaffSalaryDao().Update(salary)
session.CheckDBError(err)
}