package com.engine.organization.wrapper;

import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.organization.service.OrgChartService;
import com.engine.organization.service.impl.OrgChartServiceImpl;
import weaver.hrm.User;

import java.util.Map;

/**
 * @className: OrgChartWrapper
 * @author: dengjp
 * @date: 2022/7/7
 * @description: 组织架构图Wrapper
 **/
public class OrgChartWrapper extends Service {
    private OrgChartService getOrgChartService(User user) {
        return ServiceUtil.getService(OrgChartServiceImpl.class, user);
    }


    public Map<String, Object> getOptionCondition(Map<String, Object> request2Map, User user) {
        return getOrgChartService(user).getOptionCondition(request2Map, user);
    }

    public Map<String, Object> getCompanyData(Map<String, Object> request2Map, User user) {
        return getOrgChartService(user).getCompanyData(request2Map, user);
    }

    public Map<String, Object> getUserData(Map<String, Object> request2Map, User user) {
        return getOrgChartService(user).getUserData(request2Map, user);
    }

    public Map<String, Object> asyncUserData(Map<String, Object> request2Map, User user) {
        return getOrgChartService(user).asyncUserData(request2Map, user);
    }

    public Map<String, Object> asyncCompanyData(Map<String, Object> request2Map, User user) {
        return getOrgChartService(user).asyncCompanyData(request2Map, user);
    }

    public String synchronousData(Map<String, Object> request2Map) {
        return getOrgChartService(user).synchronousData(request2Map, user);
    }

}
