enterprise/common/model/approval_checkin.go

36 lines
894 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 (
"github.com/smbrave/goutil"
"github.com/spf13/cast"
"gitlab.batiao8.com/open/gosdk/qyweixin"
"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-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
}