package com.dxhy.core.job.thread;

import com.dxhy.common.utils.SpringContextUtils;
import com.dxhy.core.job.service.InvoiceInterfaceService;

/**
 * @author  Allen
 * @date    2023/8/15 17:28
 * 数电票源文件获取线程---武汉不支持
*/
public class SdpYwjHandle extends Thread {
    private InvoiceInterfaceService invoiceInterfaceService;
    private final String taxno;
    private final String linkName;
    private final String aceId;
    private final String aceKey;
    private final String company;
    private final String jxxxType;

    /**
     * 入参，执行接口方法
     *
     *            类型
     * @param taxno
     *            税号
     * @param linkName
     *            mycat标识
     * @param aceId
     * @param aceKey
     * @param company
     * @param jxxxType
     */
    public SdpYwjHandle(String taxno, String linkName, String aceId, String aceKey, String company, String jxxxType) {
        this.taxno = taxno;
        this.linkName = linkName;
        this.aceId = aceId;
        this.aceKey = aceKey;
        this.company = company;
        this.jxxxType = jxxxType;
    }

    @Override
    public void run() {
        invoiceInterfaceService = (InvoiceInterfaceService)SpringContextUtils.getBean("InvoiceInterfaceService");
        invoiceInterfaceService.getSdpYwj(taxno, linkName, aceId, aceKey, company,jxxxType);
    }
}
