package com.engine.organization.wrapper;

import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam;
import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.service.HrmResourceService;
import com.engine.organization.service.impl.HrmResourceServiceImpl;
import weaver.hrm.User;

import java.util.Map;

/**
 * @author:dxfeng
 * @createTime: 2022/06/21
 * @version: 1.0
 */
public class HrmResourceWrapper extends Service {
    private HrmResourceService getHrmResourceService(User user) {
        return ServiceUtil.getService(HrmResourceServiceImpl.class, user);
    }


    public Map<String, Object> getSearchTree(SearchTreeParams params) {
        return getHrmResourceService(user).getSearchTree(params);
    }

    public Map<String, Object> listPage(HrmResourceSearchParam params) {
        return getHrmResourceService(user).listPage(params);
    }

    public Map<String, Object> getSaveForm() {
        return getHrmResourceService(user).getSaveForm();
    }

    public Long saveBaseForm(Map<String, Object> params) {
        return getHrmResourceService(user).saveBaseForm(params);
    }

    public Map<String, Object> getBaseForm(Map<String, Object> params) {
        return getHrmResourceService(user).getBaseForm(params);
    }

    public int updateForm(Map<String, Object> params) {
        return getHrmResourceService(user).updateForm(params);
    }

    public Map<String, Object> getSearchCondition(Map<String, Object> params) {
        return getHrmResourceService(user).getSearchCondition(params);
    }

    public Map<String, Object> getHasRight() {
        return getHrmResourceService(user).getHasRight();
    }


}
