package com.engine.salary.wrapper;

import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.entity.salaryBill.dto.SalarySendRangeListDTO;
import com.engine.salary.entity.salaryBill.param.SalarySendRangeQueryParam;
import com.engine.salary.entity.salaryBill.param.SalarySendRangeSaveParam;
import com.engine.salary.service.SalarySendRangeService;
import com.engine.salary.service.impl.SalarySendRangeServiceImpl;
import com.engine.salary.util.page.PageInfo;
import weaver.hrm.User;

import java.util.ArrayList;
import java.util.Collection;

public class SalarySendRangeWrapper extends Service {
    private SalarySystemConfigWrapper getSalarySysConfService(User user) {
        return ServiceUtil.getService(SalarySystemConfigWrapper.class, user);
    }

    private SalarySendRangeService getSalarySendRangeService(User user) {
        return ServiceUtil.getService(SalarySendRangeServiceImpl.class, user);
    }

    public PageInfo<SalarySendRangeListDTO> listPage(SalarySendRangeQueryParam queryParam) {
        return getSalarySendRangeService(user).listPage(queryParam);
    }

    public void save(SalarySendRangeSaveParam saveParam) {
        getSalarySendRangeService(user).save(saveParam);
    }

    public void deleteByIds(Collection<Long> ids) {
        getSalarySendRangeService(user).deleteByIds(new ArrayList<>(ids));
    }
}
