赵士淞
2023-04-28 5a31047fa94abde105ee964a70891dd975403f89
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package me.zhengjie.modules.quartz.task;
 
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.quartz.service.impl.DingTalkServiceImpl;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
/**
 * 钉钉定时任务(取考勤记录)
 */
@Slf4j
@Service
@RequiredArgsConstructor
@Async
public class OapiDingTalkMethod {
 
    private final DingTalkServiceImpl dingTalkService;
 
    /**
     * 凌晨0点执行,新增用户考勤信息
     *
     * @throws Exception
     */
    public void getDingTalkAttendanceList() throws Exception {
        // 凌晨0点执行,新增用户考勤信息
        dingTalkService.getDingTalkAttendanceList(null, null);
    }
 
    /**
     * 中午12点30执行,更新早打卡情况
     */
    public void getDingTalkAttendanceListOfNoon() throws Exception {
        // 中午12点30执行,更新早打卡情况
        dingTalkService.getDingTalkAttendanceListOfNoon(null,null);
    }
 
    /**
     * 凌晨02:30执行,更新晚打卡情况
     */
    public void getDingTalkAttendanceListOfNight() throws Exception {
        // 凌晨02:30执行,更新晚打卡情况
        dingTalkService.getDingTalkAttendanceListOfNight(null,null);
    }
}