tags
This commit is contained in:
parent
b54a7f0461
commit
ac2e7666f3
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue