package com.engine.organization.wrapper;

import com.api.browser.bean.SearchConditionItem;
import com.engine.common.util.ServiceUtil;
import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.service.PersonnelResumeService;
import com.engine.organization.service.impl.PersonnelResumeServiceImpl;
import com.engine.organization.util.OrganizationWrapper;
import tebie.applib.api.O;
import weaver.hrm.User;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * @author:dxfeng
 * @createTime: 2022/12/28
 * @version: 1.0
 */
public class PersonnelResumeWrapper extends OrganizationWrapper {
    private PersonnelResumeService getPersonnelResumeService(User user) {
        return ServiceUtil.getService(PersonnelResumeServiceImpl.class, user);
    }

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

    public Map<String, Object> hasRight() {
        return getPersonnelResumeService(user).hasRight();
    }

    public Map<String, Object> getResumeList(Integer uId) {
        return getPersonnelResumeService(user).getResumeList(uId);
    }

    public String downloadPerResume(Integer type, HttpServletResponse response) throws Exception {
        return getPersonnelResumeService(user).downloadPerResume(type, response);
    }

    public List<SearchConditionItem> personnelScreening() {
        return getPersonnelResumeService(user).personnelScreening();
    }
}
