This commit is contained in:
jiangyong27 2025-04-01 18:29:31 +08:00
parent b54a7f0461
commit ac2e7666f3
1 changed files with 7 additions and 0 deletions

View File

@ -29,6 +29,7 @@ type Salary struct {
UpdateTime string `json:"update_time,omitempty"`
Extra string `json:"extra,omitempty"`
Status string `json:"status,omitempty"`
Tags string `json:"tags,omitempty"`
}
type CreateSalaryReq struct {
@ -77,6 +78,12 @@ func (s *Salary) From(m *model.StaffSalary) {
s.UpdateTime = goutil.TimeToDateTime(m.UpdateTime)
s.Extra = m.Extra
s.Status = cast.ToString(m.Status)
if s.AttendDay+s.HolidayDay != s.ShouldDay {
s.Tags = "出勤异常"
} else {
s.Tags = "出勤正常"
}
}
func (s *Salary) Add(o *Salary) {