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 ZzsfpgjjgjxHandle 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;

    /*
        01 进项增值税发票归集 02 销项增值税发票归集
     */
    private final String type;

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

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