package com.xjrsoft.module.job;

import cn.hutool.extra.spring.SpringUtil;
import com.xjrsoft.module.base.service.IBaseCourseSubjectService;
import com.xjrsoft.module.xycxedu.service.IExamSubjectScoreService;
import com.xjrsoft.module.xycxedu.service.IXycxeduExamListService;
import com.xjrsoft.module.xycxedu.util.DataUtil;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.scheduling.annotation.Scheduled;

import static org.junit.jupiter.api.Assertions.*;

/**
 * @author dzx
 * @date 2024/7/18
 */
@SpringBootTest
class ExamScoreDataTaskTest {
    @Autowired
    private IXycxeduExamListService examListService;

    @Autowired
    private IExamSubjectScoreService scoreService;

    @Autowired
    private IBaseCourseSubjectService courseService;
    @Test
    public void RefreshConnectionPool() {
        doExecute();
    }

    void doExecute(){
        //同步考试计划数据
        DataUtil dataUtil = new DataUtil();
        dataUtil.examListData(examListService);

        //同步成绩
        dataUtil.studentScoreData(examListService, scoreService, courseService);
    }
}