package com.engine.salary.wrapper;

import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldSettingListDTO;
import com.engine.salary.entity.datacollection.param.AttendQuoteFieldSettingQueryParam;
import com.engine.salary.entity.datacollection.param.AttendQuoteFieldSettingRecoverParam;
import com.engine.salary.entity.datacollection.param.AttendQuoteFieldSettingSaveParam;
import com.engine.salary.service.AttendQuoteFieldSettingService;
import com.engine.salary.service.impl.AttendQuoteFieldSettingServiceImpl;
import weaver.hrm.User;

import java.util.List;

/**
 * 考勤引用字段设置
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
public class AttendQuoteFieldSettingWrapper extends Service {

    private AttendQuoteFieldSettingService getAttendQuoteFieldSettingService(User user) {
        return  ServiceUtil.getService(AttendQuoteFieldSettingServiceImpl.class, user);
    }
    
    /**
     * 考勤引用字段设置列表
     *
     * @param queryParam
     * @return
     */
    public List<AttendQuoteFieldSettingListDTO> list(AttendQuoteFieldSettingQueryParam queryParam) {
        return getAttendQuoteFieldSettingService(user).list(queryParam);
    }

    /**
     * 考勤引用字段设置-保存
     *
     * @param saveParam
     * @return
     */
    public String save(AttendQuoteFieldSettingSaveParam saveParam) {
        return getAttendQuoteFieldSettingService(user).save(saveParam);
    }

    /**
     * 考勤引用字段设置-恢复默认设置
     *
     * @param recoverParam
     * @return
     */
    public List<AttendQuoteFieldSettingListDTO> recoverAsDefault(AttendQuoteFieldSettingRecoverParam recoverParam) {
        return getAttendQuoteFieldSettingService(user).recoverAsDefault(recoverParam);
    }

    /**
     * 考勤引用字段设置-设为默认设置
     *
     * @param saveParam
     * @return
     */
    public String saveAsDefault(AttendQuoteFieldSettingSaveParam saveParam) {
        return getAttendQuoteFieldSettingService(user).saveAsDefault(saveParam);
    }
}
