package com.dxhy.core.job.thread;

import javax.annotation.Resource;

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

import lombok.extern.slf4j.Slf4j;

/**
 * @author user
 */
@Slf4j
public class InvoiceStateHandle extends Thread {
    @Resource
    private InvoiceInterfaceService invoiceInterfaceService;

    private final String taxno;
    private final String db;
    private final String aceId;
    private final String aceKey;

    public InvoiceStateHandle(String taxno, String db, String aceId, String aceKey) {
        this.taxno = taxno;
        this.db = db;
        this.aceId = aceId;
        this.aceKey = aceKey;
    }

    @Override
    public void run() {
        invoiceInterfaceService = (InvoiceInterfaceService)SpringContextUtils.getBean("InvoiceInterfaceService");
        invoiceInterfaceService.sendStateRequest(taxno, db, aceId, aceKey);
    }
}
