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.EmsRecordWaterInstantMapper;
import com.ruoyi.ems.record.domain.EmsRecordWaterInstant;
import com.ruoyi.ems.record.service.IEmsRecordWaterInstantService;

/**
 * 水实时数据Service业务层处理
 * 
 * @author Yinq
 * @date 2024-05-14
 */
@Service
public class EmsRecordWaterInstantServiceImpl implements IEmsRecordWaterInstantService 
{
    @Autowired
    private EmsRecordWaterInstantMapper emsRecordWaterInstantMapper;

    /**
     * 查询水实时数据
     * 
     * @param objId 水实时数据主键
     * @return 水实时数据
     */
    @Override
    public EmsRecordWaterInstant selectEmsRecordWaterInstantByObjId(Long objId)
    {
        return emsRecordWaterInstantMapper.selectEmsRecordWaterInstantByObjId(objId);
    }

    /**
     * 查询水实时数据列表
     * 
     * @param emsRecordWaterInstant 水实时数据
     * @return 水实时数据
     */
    @Override
    public List<EmsRecordWaterInstant> selectEmsRecordWaterInstantList(EmsRecordWaterInstant emsRecordWaterInstant)
    {
        return emsRecordWaterInstantMapper.selectEmsRecordWaterInstantList(emsRecordWaterInstant);
    }

    /**
     * 新增水实时数据
     * 
     * @param emsRecordWaterInstant 水实时数据
     * @return 结果
     */
    @Override
    public int insertEmsRecordWaterInstant(EmsRecordWaterInstant emsRecordWaterInstant)
    {
        emsRecordWaterInstant.setRecordTime(new Date());
        return emsRecordWaterInstantMapper.insertEmsRecordWaterInstant(emsRecordWaterInstant);
    }

    /**
     * 修改水实时数据
     * 
     * @param emsRecordWaterInstant 水实时数据
     * @return 结果
     */
    @Override
    public int updateEmsRecordWaterInstant(EmsRecordWaterInstant emsRecordWaterInstant)
    {
        return emsRecordWaterInstantMapper.updateEmsRecordWaterInstant(emsRecordWaterInstant);
    }

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

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