package com.dxhy.core.task;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.dxhy.core.feign.GylAuthFeign;
import com.dxhy.core.job.service.SysUserService;

import lombok.extern.slf4j.Slf4j;

/**
 * @author Jiao Hong Yang（焦红阳）
 * @date 2021/6/15
 */
@Component("gylTask")
@Slf4j
public class GylTask {
    @Resource
    private GylAuthFeign gylAuthFeign;
    @Resource
    private SysUserService sysUserService;

    public void sendMail() {
        log.info("发送邮件定时任务开始");
        try {
            gylAuthFeign.sendMail();
        } catch (Exception e) {
            e.printStackTrace();
        }
        log.info("发送邮件定时任务结束");
    }

    public void getInvoicePdf() {
        log.info("下载PDF文件定时任务开始");
        try {
            gylAuthFeign.getInvoicePdf();
        } catch (Exception e) {
            e.printStackTrace();
        }
        log.info("下载PDF文件定时任务结束");
    }

    /**
     * 获取图片
     * 
     */
    public void getFpzyztp() {
        sysUserService.getFpzyztp();
    }

    /**
     * 获取签章id
     *
     * 
     */
    public void getSignatureId() {
        sysUserService.getSignatureId();
    }

    /**
     * 税盘注册
     */
    public void getLicenseCode() {
        sysUserService.getLicenseCode();
    }

}
