enterprise/common/model/approval_checkin.go

41 lines
984 B
Go
Raw Normal View History

2024-01-07 18:53:21 +08:00
package model
2024-01-22 23:06:30 +08:00
import (
2024-08-09 13:57:03 +08:00
"git.u8t.cn/open/gosdk/qyweixin"
2024-01-22 23:06:30 +08:00
"github.com/smbrave/goutil"
"github.com/spf13/cast"
"strings"
"time"
)
func (ac *ApprovalCheckin) From(d *qyweixin.ApproveDetail) {
value := strings.SplitN(d.GetValue("补卡"), ",", 3)
ac.SpNo = d.SpNo
ac.Username = d.GetUserid()
ac.ApplyTime = goutil.TimeToDateTime(d.ApplyTime)
ac.CheckinRemark = d.GetValue("补卡事由")
ac.CheckinDate = goutil.TimeToDate(cast.ToInt64(value[0]))
ac.Month = time.Unix(cast.ToInt64(value[0]), 0).Format("200601")
ac.CheckinTime = goutil.TimeToDateTime(cast.ToInt64(value[1]))
ac.CheckinType = value[2]
}
2024-01-31 20:49:43 +08:00
type UsernameCount struct {
Username string `json:"username"`
Count int64 `json:"count"`
}
2024-01-07 18:53:21 +08:00
type ApprovalCheckin struct {
Id int64
Username string
2024-01-07 22:54:33 +08:00
Month string
2024-01-07 18:53:21 +08:00
SpNo string
CheckinType string
CheckinDate string
CheckinTime string
CheckinRemark string
ApplyTime string
CreateTime int64
UpdateTime int64
}