package com.dxhy.core.job.thread;

import javax.annotation.Resource;

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

/**
 * @author user
 */
public class DataPlatformInvoiceStateHandle extends Thread {
    @Resource
    private DataPlatformCollectService dataPlatformCollectService;

    private final String taxno;
    private final String db;
    private final String type;
    private final String params;
    private final String taxname;
    private final String company;
    private final String aceId;
    private final String aceKey;

    public DataPlatformInvoiceStateHandle(String taxno, String db, String taxname, String type, String params,
        String company, String aceId, String aceKey) {
        this.taxno = taxno;
        this.db = db;
        this.type = type;
        this.params = params;
        this.taxname = taxname;
        this.company = company;
        this.aceId = aceId;
        this.aceKey = aceKey;
    }

    @Override
    public void run() {
        dataPlatformCollectService =
            (DataPlatformCollectService)SpringContextUtils.getBean("dataPlatformCollectService");
        dataPlatformCollectService.sendStateRequest(taxno, db, taxname, type, params, company, aceId, aceKey);
    }
}
