package com.dxhy.core.job.thread;

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

/**
 * @author user
 */
@SuppressWarnings("FieldCanBeLocal")
public class CustomsHandle 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 CustomsInterfaceService customsInterfaceService;

    public CustomsHandle(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() {
        customsInterfaceService = (CustomsInterfaceService)SpringContextUtils.getBean("customsInterfaceService");
        customsInterfaceService.getCustoms(taxno, dbName, aceId, aceKey, company, taxName);
    }
}
