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.EmsReportPointDnbMapper;
import com.ruoyi.ems.report.domain.EmsReportPointDnb;
import com.ruoyi.ems.report.service.IEmsReportPointDnbService;

/**
 * 电整点数据Service业务层处理
 *
 * @author Yinq
 * @date 2024-05-22
 */
@Service
public class EmsReportPointDnbServiceImpl implements IEmsReportPointDnbService {
    @Autowired
    private EmsReportPointDnbMapper emsReportPointDnbMapper;

    /**
     * 查询电整点数据
     *
     * @param objId 电整点数据主键
     * @return 电整点数据
     */
    @Override
    public EmsReportPointDnb selectEmsReportPointDnbByObjId(Long objId) {
        return emsReportPointDnbMapper.selectEmsReportPointDnbByObjId(objId);
    }

    /**
     * 查询电整点数据列表
     *
     * @param emsReportPointDnb 电整点数据
     * @return 电整点数据
     */
    @Override
    public List<EmsReportPointDnb> selectEmsReportPointDnbList(EmsReportPointDnb emsReportPointDnb) {
        return emsReportPointDnbMapper.selectEmsReportPointDnbList(emsReportPointDnb);
    }

    /**
     * 新增电整点数据
     *
     * @param emsReportPointDnb 电整点数据
     * @return 结果
     */
    @Override
    public int insertEmsReportPointDnb(EmsReportPointDnb emsReportPointDnb) {
        emsReportPointDnb.setCreateTime(DateUtils.getNowDate());
        return emsReportPointDnbMapper.insertEmsReportPointDnb(emsReportPointDnb);
    }

    /**
     * 修改电整点数据
     *
     * @param emsReportPointDnb 电整点数据
     * @return 结果
     */
    @Override
    public int updateEmsReportPointDnb(EmsReportPointDnb emsReportPointDnb) {
        emsReportPointDnb.setUpdateTime(DateUtils.getNowDate());
        return emsReportPointDnbMapper.updateEmsReportPointDnb(emsReportPointDnb);
    }

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

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