package com.xhkjedu.sexam.utils;

import ch.qos.logback.core.net.SyslogOutputStream;
import com.xhkjedu.sexam.listener.MessageSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

/**
 * @author ywx
 * @classname ConvertUtil
 * @description 文件转换工具类
 * @date 2021/10/27 9:32
 **/
@Component
public class ConvertUtil {
    @Autowired
    private MessageSender messageSender;

    /**
     * 学生答案图片合并mq
     *
     * @param [psqid, userAnswers, device(1线上线下2答题卡)]
     * @return void
     * @author ywx
     * @date 2022/5/9 14:57
     */
    public void imgMerge(Integer psqid, List<String> userAnswers, Integer device) {
        messageSender.imgMerge(psqid, userAnswers, device);
    }

    /**
     * @Description  答题卡base64转pdf
     * @Param [epid, examid, imgs, savefolder]
     * @Return void
     * @Author wn
     * @Date 2022/8/2 17:20
     **/
    public void baseToPdf(Integer epid,Integer examid, List<String> imgs, String savefolder,Integer scantroncol) {
        messageSender.base64ToPdf(epid, examid,imgs, savefolder,scantroncol);
    }

}
