package com.engine.kq.service.impl;

import com.engine.core.impl.Service;
import com.engine.kq.cmd.group.*;
import com.engine.kq.service.KQGroupService;
import weaver.hrm.User;

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

public class KQGroupServiceImpl extends Service implements KQGroupService {

    @Override
    public Map<String, Object> getTabs(Map<String, Object> params, User user) {
        return commandExecutor.execute(new GetTabsCmd(params, user));
    }

    @Override
    public Map<String, Object> getSearchCondition(Map<String, Object> params, User user) {
        return commandExecutor.execute(new GetGroupSearchConditionCmd(params, user));
    }

    @Override
    public Map<String, Object> getSearchList(Map<String, Object> params, User user) {
        return commandExecutor.execute(new GetGroupSearchListCmd(params, user));
    }

    @Override
    public Map<String, Object> save(Map<String, Object> params, User user) {
        return commandExecutor.execute(new SaveGroupCmd(params, user));
    }

    @Override
    public Map<String, Object> del(Map<String, Object> params, User user) {
        return commandExecutor.execute(new DelGroupCmd(params, user));
    }

    @Override
    public Map<String, Object> getForm(Map<String, Object> params, User user) {
        return commandExecutor.execute(new GetGroupFormCmd(params, user));
    }

    @Override
    public Map<String, Object> importExcel(Map<String, Object> params, User user) {
        return commandExecutor.execute(new ImportExcelCmd(params, user));
    }

    @Override
    public Map<String, Object> exportExcel(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response, User user) {
        return commandExecutor.execute(new ExportExcelCmd(params, request, response, user));
    }

    @Override
    public Map<String, Object> getGroupTree(Map<String, Object> params, User user) {
        return commandExecutor.execute(new GetGroupTreeCmd(params, user));
    }

    @Override
    public Map<String, Object> getShiftCycleForm(Map<String, Object> params, User user) {
        return commandExecutor.execute(new GetShiftCycleFormCmd(params, user));
    }

    @Override
    public Map<String, Object> getMainTabs(Map<String, Object> params, User user) {
        return commandExecutor.execute(new GetMainTabsCmd(params, user));
    }

    @Override
    public Map<String, Object> getGroupMemeberCondition(Map<String, Object> params, User user) {
        return commandExecutor.execute(new GetGroupMemberConditionCmd(params, user));
    }

    @Override
    public Map<String, Object> getAddMemberCondition(Map<String, Object> params, User user) {
        return commandExecutor.execute(new GetAddMemberConditionCmd(params, user));
    }

    @Override
    public Map<String, Object> getGroupMemberList(Map<String, Object> params, User user) {
        return commandExecutor.execute(new GetGroupMemberListCmd(params, user));
    }

    @Override
    public Map<String, Object> saveAddMenber(Map<String, Object> params, User user) {
        return commandExecutor.execute(new SaveAddMemberCmd(params, user));
    }
}
