package com.evobms.project.bms.service.impl;

import java.util.List;
import com.evobms.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.evobms.project.bms.mapper.BmsRuntimeDataMapper;
import com.evobms.project.bms.domain.BmsRuntimeData;
import com.evobms.project.bms.service.IBmsRuntimeDataService;

/**
 * BMS实时运行数据Service业务层处理
 * 
 * @author tzy
 * @date 2026-02-23
 */
@Service
public class BmsRuntimeDataServiceImpl extends ServiceImpl<BmsRuntimeDataMapper, BmsRuntimeData> implements IBmsRuntimeDataService 
{
    @Autowired
    private BmsRuntimeDataMapper bmsRuntimeDataMapper;

    /**
     * 查询BMS实时运行数据
     * 
     * @param id BMS实时运行数据主键
     * @return BMS实时运行数据
     */
    @Override
    public BmsRuntimeData selectBmsRuntimeDataById(Long id)
    {
        return bmsRuntimeDataMapper.selectBmsRuntimeDataById(id);
    }

    /**
     * 查询BMS实时运行数据列表
     * 
     * @param bmsRuntimeData BMS实时运行数据
     * @return BMS实时运行数据
     */
    @Override
    public List<BmsRuntimeData> selectBmsRuntimeDataList(BmsRuntimeData bmsRuntimeData)
    {
        return bmsRuntimeDataMapper.selectBmsRuntimeDataList(bmsRuntimeData);
    }

    /**
     * 新增BMS实时运行数据
     * 
     * @param bmsRuntimeData BMS实时运行数据
     * @return 结果
     */
    @Override
    public int insertBmsRuntimeData(BmsRuntimeData bmsRuntimeData)
    {
        bmsRuntimeData.setCreateTime(DateUtils.getNowDate());
        return bmsRuntimeDataMapper.insertBmsRuntimeData(bmsRuntimeData);
    }

    /**
     * 修改BMS实时运行数据
     * 
     * @param bmsRuntimeData BMS实时运行数据
     * @return 结果
     */
    @Override
    public int updateBmsRuntimeData(BmsRuntimeData bmsRuntimeData)
    {
        bmsRuntimeData.setUpdateTime(DateUtils.getNowDate());
        return bmsRuntimeDataMapper.updateBmsRuntimeData(bmsRuntimeData);
    }

    /**
     * 批量删除BMS实时运行数据
     * 
     * @param ids 需要删除的BMS实时运行数据主键
     * @return 结果
     */
    @Override
    public int deleteBmsRuntimeDataByIds(Long[] ids)
    {
        return bmsRuntimeDataMapper.deleteBmsRuntimeDataByIds(ids);
    }

    /**
     * 删除BMS实时运行数据信息
     * 
     * @param id BMS实时运行数据主键
     * @return 结果
     */
    @Override
    public int deleteBmsRuntimeDataById(Long id)
    {
        return bmsRuntimeDataMapper.deleteBmsRuntimeDataById(id);
    }
}
