package nckd.jimin.jyyy.bd.task;

import kd.bos.context.RequestContext;
import kd.bos.exception.KDException;
import kd.bos.ext.fi.plugin.ArApConvert.util.EmptyUtils;
import kd.bos.logging.Log;
import kd.bos.logging.LogFactory;
import kd.bos.schedule.api.StopTask;
import kd.bos.schedule.executor.AbstractTask;
import kd.sdk.plugin.Plugin;

import nckd.jimin.jyyy.bd.task.impl.SynSapServiceImpl;

import java.util.HashMap;
import java.util.Map;

/**
 * 同步OA讲者定时任务
 */
public class SynSpeakerForOATask extends AbstractTask implements StopTask {
    private static final Log logger = LogFactory.getLog(SynProjectForSAPTask.class);
    @Override
    public void execute(RequestContext requestContext, Map<String, Object> map) throws KDException {
        SynSapServiceImpl synSapService = new SynSapServiceImpl();
        logger.info("------同步OA讲者 ----------");
        Map<String, String> result =synSapService.synSpeakerForOA();
        if(!result.get("code").equals("200")){
            logger.info("同步OA讲者失败, " + result.get("msg"));
        }else{
            logger.info("同步OA讲者成功, "  + result.get("msg"));
        }
    }
}