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.BmsChargeDetailMapper;
import com.evobms.project.bms.domain.BmsChargeDetail;
import com.evobms.project.bms.service.IBmsChargeDetailService;

/**
 * BMS充电过程详细数据Service业务层处理
 * 
 * @author tzy
 * @date 2026-02-23
 */
@Service
public class BmsChargeDetailServiceImpl extends ServiceImpl<BmsChargeDetailMapper, BmsChargeDetail> implements IBmsChargeDetailService 
{
    @Autowired
    private BmsChargeDetailMapper bmsChargeDetailMapper;

    /**
     * 查询BMS充电过程详细数据
     * 
     * @param id BMS充电过程详细数据主键
     * @return BMS充电过程详细数据
     */
    @Override
    public BmsChargeDetail selectBmsChargeDetailById(Long id)
    {
        return bmsChargeDetailMapper.selectBmsChargeDetailById(id);
    }

    /**
     * 查询BMS充电过程详细数据列表
     * 
     * @param bmsChargeDetail BMS充电过程详细数据
     * @return BMS充电过程详细数据
     */
    @Override
    public List<BmsChargeDetail> selectBmsChargeDetailList(BmsChargeDetail bmsChargeDetail)
    {
        return bmsChargeDetailMapper.selectBmsChargeDetailList(bmsChargeDetail);
    }

    /**
     * 新增BMS充电过程详细数据
     * 
     * @param bmsChargeDetail BMS充电过程详细数据
     * @return 结果
     */
    @Override
    public int insertBmsChargeDetail(BmsChargeDetail bmsChargeDetail)
    {
        bmsChargeDetail.setCreateTime(DateUtils.getNowDate());
        return bmsChargeDetailMapper.insertBmsChargeDetail(bmsChargeDetail);
    }

    /**
     * 修改BMS充电过程详细数据
     * 
     * @param bmsChargeDetail BMS充电过程详细数据
     * @return 结果
     */
    @Override
    public int updateBmsChargeDetail(BmsChargeDetail bmsChargeDetail)
    {
        bmsChargeDetail.setUpdateTime(DateUtils.getNowDate());
        return bmsChargeDetailMapper.updateBmsChargeDetail(bmsChargeDetail);
    }

    /**
     * 批量删除BMS充电过程详细数据
     * 
     * @param ids 需要删除的BMS充电过程详细数据主键
     * @return 结果
     */
    @Override
    public int deleteBmsChargeDetailByIds(Long[] ids)
    {
        return bmsChargeDetailMapper.deleteBmsChargeDetailByIds(ids);
    }

    /**
     * 删除BMS充电过程详细数据信息
     * 
     * @param id BMS充电过程详细数据主键
     * @return 结果
     */
    @Override
    public int deleteBmsChargeDetailById(Long id)
    {
        return bmsChargeDetailMapper.deleteBmsChargeDetailById(id);
    }
}
