package cn.com.ctop.check.script;

import cn.com.ctop.check.component.execute.GroovyScriptExecutor;
import cn.com.ctop.check.service.ICtopCheckTaskListService;
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
import cn.com.ctop.common.module.service.ICustomDataByAccountService;
import cn.com.ctop.common.module.service.IUReportExportService;
import cn.com.ctop.common.module.service.IUserAllocationService;
import cn.com.ctop.notice.handler.SendWeChatHandle;
import org.jeecg.common.api.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/rest/script")
public class TestGroovyScript {

    @Autowired
    ICtopCheckTaskListService checkTaskListService;

    @Autowired
    ICtopOauthTokenService ctopOauthTokenService;

    @Autowired
    GroovyScriptExecutor groovyScriptExecutor;

    @Autowired
    SendWeChatHandle sendWeChatHandle;

    @Autowired
    IUserAllocationService userAllocationService;

    @Autowired
    ICustomDataByAccountService customDataByAccountService;

    @Autowired
    IUReportExportService iuReportExportService;

    @GetMapping("/test")
    public Result testGroovy(){
        //groovyScriptExecutor.execute(2,"CheckAccountStatusScript");
        //groovyScriptExecutor.execute(13,"CheckKsDataDiffScript");
        //groovyScriptExecutor.execute(14,"CheckByDataDiffScript");
        iuReportExportService.exportExcel("file:2048球球大作战-日报.ureport.xml ");
        return Result.ok();
    }
}
