package com.ruoyi.ems.record.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ems.record.mapper.EmsRecordDnbInstantMapper;
import com.ruoyi.ems.record.domain.EmsRecordDnbInstant;
import com.ruoyi.ems.record.service.IEmsRecordDnbInstantService;

/**
 * 电实时数据Service业务层处理
 *
 * @author Yinq
 * @date 2024-05-11
 */
@Service
public class EmsRecordDnbInstantServiceImpl implements IEmsRecordDnbInstantService {
    @Autowired
    private EmsRecordDnbInstantMapper emsRecordDnbInstantMapper;

    /**
     * 查询电实时数据
     *
     * @param objId 电实时数据主键
     * @return 电实时数据
     */
    @Override
    public EmsRecordDnbInstant selectEmsRecordDnbInstantByObjId(Long objId) {
        return emsRecordDnbInstantMapper.selectEmsRecordDnbInstantByObjId(objId);
    }

    /**
     * 查询电实时数据列表
     *
     * @param emsRecordDnbInstant 电实时数据
     * @return 电实时数据
     */
    @Override
    public List<EmsRecordDnbInstant> selectEmsRecordDnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant) {
        return emsRecordDnbInstantMapper.selectEmsRecordDnbInstantList(emsRecordDnbInstant);
    }

    /**
     * 新增电实时数据
     *
     * @param emsRecordDnbInstant 电实时数据
     * @return 结果
     */
    @Override
    public int insertEmsRecordDnbInstant(EmsRecordDnbInstant emsRecordDnbInstant) {
        emsRecordDnbInstant.setRecordTime(new Date());
        return emsRecordDnbInstantMapper.insertEmsRecordDnbInstant(emsRecordDnbInstant);
    }

    /**
     * 修改电实时数据
     *
     * @param emsRecordDnbInstant 电实时数据
     * @return 结果
     */
    @Override
    public int updateEmsRecordDnbInstant(EmsRecordDnbInstant emsRecordDnbInstant) {
        return emsRecordDnbInstantMapper.updateEmsRecordDnbInstant(emsRecordDnbInstant);
    }

    /**
     * 批量删除电实时数据
     *
     * @param objIds 需要删除的电实时数据主键
     * @return 结果
     */
    @Override
    public int deleteEmsRecordDnbInstantByObjIds(Long[] objIds) {
        return emsRecordDnbInstantMapper.deleteEmsRecordDnbInstantByObjIds(objIds);
    }

    /**
     * 删除电实时数据信息
     *
     * @param objId 电实时数据主键
     * @return 结果
     */
    @Override
    public int deleteEmsRecordDnbInstantByObjId(Long objId) {
        return emsRecordDnbInstantMapper.deleteEmsRecordDnbInstantByObjId(objId);
    }

    /**
     * 查询电实时数据
     * @param emsRecordDnbInstant
     * @return
     */
    @Override
    public List<EmsRecordDnbInstant> selectDnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant) {
        return emsRecordDnbInstantMapper.selectDnbInstantList(emsRecordDnbInstant);
    }
}
