vacationDuration4
This commit is contained in:
parent
867487cc3f
commit
ab10f90ac6
|
@ -3,8 +3,10 @@ package main
|
|||
import (
|
||||
"enterprise/common/config"
|
||||
"enterprise/common/global"
|
||||
"enterprise/common/model"
|
||||
_ "enterprise/plugin"
|
||||
"enterprise/server"
|
||||
"enterprise/worker"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -13,7 +15,7 @@ func main() {
|
|||
config.LoadCorpConfig()
|
||||
global.InitGlobal()
|
||||
|
||||
//worker.NewApproval(1000).Sync("202504", model.ApprovalTypeVacation)
|
||||
worker.NewApproval(1000).Sync("202504", model.ApprovalTypeVacation)
|
||||
if err := server.Start(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ func (a *Approve) handleVacation(detail *qyweixin.ApproveDetail, spStatus int) {
|
|||
endTime, _ := time.ParseInLocation("2006-01-02 15:04:05", newData.VacationEndTime, time.Local)
|
||||
|
||||
cnt := 1
|
||||
for st := startTime; st.Format("2006-01-02") != endTime.Format("2006-01-02"); st.AddDate(0, 0, 1) {
|
||||
for st := startTime; st.Format("2006-01-02") != endTime.Format("2006-01-02"); st = st.AddDate(0, 0, 1) {
|
||||
cnt += 1
|
||||
}
|
||||
if newData.VacationDuration > float64(cnt) {
|
||||
|
|
Loading…
Reference in New Issue