package com.ruoyi.ems.service.impl;

import java.util.List;

import com.ruoyi.ems.domain.EmsFacsAbility;
import com.ruoyi.ems.service.IEmsFacsAbilityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ems.mapper.EmsFacsAbilityMapper;

/**
 * 能源设施能力Service业务层处理
 *
 * @author ruoyi
 * @date 2024-08-22
 */
@Service
public class EmsFacsAbilityServiceImpl implements IEmsFacsAbilityService {
    @Autowired
    private EmsFacsAbilityMapper emsFacsAbilityMapper;

    /**
     * 查询能源设施能力
     *
     * @param id 能源设施能力主键
     * @return 能源设施能力
     */
    @Override
    public EmsFacsAbility selectEmsFacsAbilityById(Long id) {
        return emsFacsAbilityMapper.selectEmsFacsAbilityById(id);
    }

    /**
     * 查询能源设施能力列表
     *
     * @param emsFacsAbility 能源设施能力
     * @return 能源设施能力
     */
    @Override
    public List<EmsFacsAbility> selectEmsFacsAbilityList(EmsFacsAbility emsFacsAbility) {
        return emsFacsAbilityMapper.selectEmsFacsAbilityList(emsFacsAbility);
    }

    /**
     * 新增能源设施能力
     *
     * @param emsFacsAbility 能源设施能力
     * @return 结果
     */
    @Override
    public int insertEmsFacsAbility(EmsFacsAbility emsFacsAbility) {
        return emsFacsAbilityMapper.insertEmsFacsAbility(emsFacsAbility);
    }

    /**
     * 批量-新增能源设施能力
     *
     * @param emsFacsAbilitys 能源设施能力list
     * @return 结果
     */
    @Override
    public int insertEmsFacsAbilityBatch(List<EmsFacsAbility> emsFacsAbilitys) {
        return emsFacsAbilityMapper.insertEmsFacsAbilityBatch(emsFacsAbilitys);
    }

    /**
     * 修改能源设施能力
     *
     * @param emsFacsAbility 能源设施能力
     * @return 结果
     */
    @Override
    public int updateEmsFacsAbility(EmsFacsAbility emsFacsAbility) {
        return emsFacsAbilityMapper.updateEmsFacsAbility(emsFacsAbility);
    }

    /**
     * 批量删除能源设施能力
     *
     * @param ids 需要删除的能源设施能力主键
     * @return 结果
     */
    @Override
    public int deleteEmsFacsAbilityByIds(Long[] ids) {
        return emsFacsAbilityMapper.deleteEmsFacsAbilityByIds(ids);
    }

    /**
     * 删除能源设施能力信息
     *
     * @param id 能源设施能力主键
     * @return 结果
     */
    @Override
    public int deleteEmsFacsAbilityById(Long id) {
        return emsFacsAbilityMapper.deleteEmsFacsAbilityById(id);
    }

    @Override
    public int deleteAbilityByFacsCode(String facsCode) {
        return emsFacsAbilityMapper.deleteEmsFacsAbilityFacsCode(facsCode);
    }
}
