package com.ruoyi.record.service.impl;

import java.util.List;

import com.ruoyi.record.domain.VO.RecordBusbarAlarmCountResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.record.mapper.RecordBusbarAlarmMapper;
import com.ruoyi.record.domain.RecordBusbarAlarm;
import com.ruoyi.record.service.IRecordBusbarAlarmService;

/**
 * 巡检报警记录Service业务层处理
 *
 * @author zangch
 * @date 2024-12-03
 */
@Service
public class RecordBusbarAlarmServiceImpl implements IRecordBusbarAlarmService
{
    @Autowired
    private RecordBusbarAlarmMapper recordBusbarAlarmMapper;

    /**
     * 查询巡检报警记录
     *
     * @param objId 巡检报警记录主键
     * @return 巡检报警记录
     */
    @Override
    public RecordBusbarAlarm selectRecordBusbarAlarmByObjId(Long objId)
    {
        return recordBusbarAlarmMapper.selectRecordBusbarAlarmByObjId(objId);
    }

    /**
     * 查询巡检报警记录列表
     *
     * @param recordBusbarAlarm 巡检报警记录
     * @return 巡检报警记录
     */
    @Override
    public List<RecordBusbarAlarm> selectRecordBusbarAlarmList(RecordBusbarAlarm recordBusbarAlarm)
    {
        return recordBusbarAlarmMapper.selectRecordBusbarAlarmList(recordBusbarAlarm);
    }

    /**
     * 新增巡检报警记录
     *
     * @param recordBusbarAlarm 巡检报警记录
     * @return 结果
     */
    @Override
    public int insertRecordBusbarAlarm(RecordBusbarAlarm recordBusbarAlarm)
    {
        return recordBusbarAlarmMapper.insertRecordBusbarAlarm(recordBusbarAlarm);
    }

    /**
     * 修改巡检报警记录
     *
     * @param recordBusbarAlarm 巡检报警记录
     * @return 结果
     */
    @Override
    public int updateRecordBusbarAlarm(RecordBusbarAlarm recordBusbarAlarm)
    {
        return recordBusbarAlarmMapper.updateRecordBusbarAlarm(recordBusbarAlarm);
    }

    /**
     * 批量删除巡检报警记录
     *
     * @param objIds 需要删除的巡检报警记录主键
     * @return 结果
     */
    @Override
    public int deleteRecordBusbarAlarmByObjIds(Long[] objIds)
    {
        return recordBusbarAlarmMapper.deleteRecordBusbarAlarmByObjIds(objIds);
    }

    /**
     * 删除巡检报警记录信息
     *
     * @param objId 巡检报警记录主键
     * @return 结果
     */
    @Override
    public int deleteRecordBusbarAlarmByObjId(Long objId)
    {
        return recordBusbarAlarmMapper.deleteRecordBusbarAlarmByObjId(objId);
    }


    @Override
    public  List<RecordBusbarAlarmCountResult> recordBusbarAlarmCount(RecordBusbarAlarm recordBusbarAlarm){
        return recordBusbarAlarmMapper.recordBusbarAlarmCount(recordBusbarAlarm);
    }
}
