package com.engine.kq.service.impl;

import com.engine.core.impl.Service;
import com.engine.kq.cmd.leaverules.*;
import com.engine.kq.service.KQLeaveRulesService;
import weaver.hrm.User;

import java.util.Map;

public class KQLeaveRulesServiceImpl extends Service implements KQLeaveRulesService {

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

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

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

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

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

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

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

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

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