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

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ems.report.mapper.EmsReportPointWaterMapper;
import com.ruoyi.ems.report.domain.EmsReportPointWater;
import com.ruoyi.ems.report.service.IEmsReportPointWaterService;

/**
 * 水整点数据Service业务层处理
 *
 * @author Yinq
 * @date 2024-05-22
 */
@Service
public class EmsReportPointWaterServiceImpl implements IEmsReportPointWaterService {
    @Autowired
    private EmsReportPointWaterMapper emsReportPointWaterMapper;

    /**
     * 查询水整点数据
     *
     * @param objId 水整点数据主键
     * @return 水整点数据
     */
    @Override
    public EmsReportPointWater selectEmsReportPointWaterByObjId(Long objId) {
        return emsReportPointWaterMapper.selectEmsReportPointWaterByObjId(objId);
    }

    /**
     * 查询水整点数据列表
     *
     * @param emsReportPointWater 水整点数据
     * @return 水整点数据
     */
    @Override
    public List<EmsReportPointWater> selectEmsReportPointWaterList(EmsReportPointWater emsReportPointWater) {
        return emsReportPointWaterMapper.selectEmsReportPointWaterList(emsReportPointWater);
    }

    /**
     * 新增水整点数据
     *
     * @param emsReportPointWater 水整点数据
     * @return 结果
     */
    @Override
    public int insertEmsReportPointWater(EmsReportPointWater emsReportPointWater) {
        emsReportPointWater.setCreateTime(DateUtils.getNowDate());
        return emsReportPointWaterMapper.insertEmsReportPointWater(emsReportPointWater);
    }

    /**
     * 修改水整点数据
     *
     * @param emsReportPointWater 水整点数据
     * @return 结果
     */
    @Override
    public int updateEmsReportPointWater(EmsReportPointWater emsReportPointWater) {
        emsReportPointWater.setUpdateTime(DateUtils.getNowDate());
        return emsReportPointWaterMapper.updateEmsReportPointWater(emsReportPointWater);
    }

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

    /**
     * 删除水整点数据信息
     *
     * @param objId 水整点数据主键
     * @return 结果
     */
    @Override
    public int deleteEmsReportPointWaterByObjId(Long objId) {
        return emsReportPointWaterMapper.deleteEmsReportPointWaterByObjId(objId);
    }
}
