package com.gtiit.shr.utils;

import com.kingdee.shr.api.Response;
import com.kingdee.shr.api.SHRClient;
import java.io.IOException;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ShrClientUtil {
    @Autowired
    private FinalParamUtil finalParamUtil;


    public Response sendShr(String osfName, Map map) throws IOException {
        return this.getOSFData(osfName, map);
    }

    private Response getOSFData(String osfName, Map map) throws IOException {
        SHRClient client = new SHRClient();
        return client.executeService(this.finalParamUtil.getShrUrl(), osfName, map);
    }

}
