package com.ruoyi.fire.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fire.mapper.FireFacilityReplacementMapper;
import com.ruoyi.fire.domain.FireFacilityReplacement;
import com.ruoyi.fire.service.IFireFacilityReplacementService;

/**
 * 消防设施更换记录Service业务层处理
 * 
 * @author Junhau
 * @date 2025-07-17
 */
@Service
public class FireFacilityReplacementServiceImpl implements IFireFacilityReplacementService 
{
    @Autowired
    private FireFacilityReplacementMapper fireFacilityReplacementMapper;

    /**
     * 查询消防设施更换记录
     * 
     * @param id 消防设施更换记录主键
     * @return 消防设施更换记录
     */
    @Override
    public FireFacilityReplacement selectFireFacilityReplacementById(Long id)
    {
        return fireFacilityReplacementMapper.selectFireFacilityReplacementById(id);
    }

    /**
     * 查询消防设施更换记录列表
     * 
     * @param fireFacilityReplacement 消防设施更换记录
     * @return 消防设施更换记录
     */
    @Override
    public List<FireFacilityReplacement> selectFireFacilityReplacementList(FireFacilityReplacement fireFacilityReplacement)
    {
        return fireFacilityReplacementMapper.selectFireFacilityReplacementList(fireFacilityReplacement);
    }

    /**
     * 新增消防设施更换记录
     * 
     * @param fireFacilityReplacement 消防设施更换记录
     * @return 结果
     */
    @Override
    public int insertFireFacilityReplacement(FireFacilityReplacement fireFacilityReplacement)
    {
        fireFacilityReplacement.setCreateTime(DateUtils.getNowDate());
        return fireFacilityReplacementMapper.insertFireFacilityReplacement(fireFacilityReplacement);
    }

    /**
     * 修改消防设施更换记录
     * 
     * @param fireFacilityReplacement 消防设施更换记录
     * @return 结果
     */
    @Override
    public int updateFireFacilityReplacement(FireFacilityReplacement fireFacilityReplacement)
    {
        return fireFacilityReplacementMapper.updateFireFacilityReplacement(fireFacilityReplacement);
    }

    /**
     * 批量删除消防设施更换记录
     * 
     * @param ids 需要删除的消防设施更换记录主键
     * @return 结果
     */
    @Override
    public int deleteFireFacilityReplacementByIds(Long[] ids)
    {
        return fireFacilityReplacementMapper.deleteFireFacilityReplacementByIds(ids);
    }

    /**
     * 删除消防设施更换记录信息
     * 
     * @param id 消防设施更换记录主键
     * @return 结果
     */
    @Override
    public int deleteFireFacilityReplacementById(Long id)
    {
        return fireFacilityReplacementMapper.deleteFireFacilityReplacementById(id);
    }
}
