package com.dxhy.core.job.thread;

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

/**
 * 功能描述
 *
 * @author 陈刚扬
 * @date 2020/10/30
 */
@SuppressWarnings("FieldCanBeLocal")
public class ExportInvoiceHandle extends Thread {

    private final String taxno;
    private final String dbName;
    private final String aceId;
    private final String aceKey;
    private final String company;
    private final String taxName;

    private ExportInterfaceService exportInterfaceService;

    public ExportInvoiceHandle(String taxno, String dbName, String aceId, String aceKey, String company,
        String taxName) {
        this.taxno = taxno;
        this.dbName = dbName;
        this.aceId = aceId;
        this.aceKey = aceKey;
        this.company = company;
        this.taxName = taxName;
    }

    @Override
    public void run() {
        exportInterfaceService = (ExportInterfaceService)SpringContextUtils.getBean("exportInterfaceService");
        exportInterfaceService.getExportInvoice(taxno, dbName, aceId, aceKey, company, taxName);
    }
}
