package com.dxhy.core.job.thread;

import com.dxhy.api.model.config.CollectionControlModel;
import com.dxhy.common.utils.SpringContextUtils;
import com.dxhy.core.job.service.InvoiceInterfaceService;

/**
 * @author  Allen
 * @date    2023/8/15 17:28
 * 增值税发票归集线程
*/
public class ZzsfpgjHandle extends Thread {
    private InvoiceInterfaceService invoiceInterfaceService;
    /*
        type 1-进项数据 2-销项数据
     */
    private final String type;
    private final CollectionControlModel ccm;

    /**
     * 入参，执行接口方法
     */
    public ZzsfpgjHandle(CollectionControlModel ccm, String type) {
        this.ccm = ccm;
        this.type = type;
    }

    @Override
    public void run() {
        invoiceInterfaceService = (InvoiceInterfaceService)SpringContextUtils.getBean("InvoiceInterfaceService");
        invoiceInterfaceService.zzsfpcj(ccm,type);
    }
}
