package org.dromara.ems.report.service.impl;

import org.dromara.common.core.utils.DateUtils;
import org.dromara.ems.report.domain.EmsReportPointSteam;
import org.dromara.ems.report.mapper.EmsReportPointSteamMapper;
import org.dromara.ems.report.service.IEmsReportPointSteamService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 蒸汽整点数据Service业务层处理
 *
 * @author Yinq
 * @date 2024-06-11
 */
@Service
@RequiredArgsConstructor
public class EmsReportPointSteamServiceImpl implements IEmsReportPointSteamService
{
    
    private final EmsReportPointSteamMapper emsReportPointSteamMapper;

    /**
     * 查询蒸汽整点数据
     *
     * @param objId 蒸汽整点数据主键
     * @return 蒸汽整点数据
     */
    @Override
    public EmsReportPointSteam selectEmsReportPointSteamByObjId(Long objId)
    {
        return emsReportPointSteamMapper.selectEmsReportPointSteamByObjId(objId);
    }

    /**
     * 查询蒸汽整点数据列表
     *
     * @param emsReportPointSteam 蒸汽整点数据
     * @return 蒸汽整点数据
     */
    @Override
    public List<EmsReportPointSteam> selectEmsReportPointSteamList(EmsReportPointSteam emsReportPointSteam)
    {
        return emsReportPointSteamMapper.selectEmsReportPointSteamList(emsReportPointSteam);
    }

    /**
     * 新增蒸汽整点数据
     *
     * @param emsReportPointSteam 蒸汽整点数据
     * @return 结果
     */
    @Override
    public int insertEmsReportPointSteam(EmsReportPointSteam emsReportPointSteam)
    {
        emsReportPointSteam.setCreateTime(DateUtils.getNowDate());
        return emsReportPointSteamMapper.insertEmsReportPointSteam(emsReportPointSteam);
    }

    /**
     * 修改蒸汽整点数据
     *
     * @param emsReportPointSteam 蒸汽整点数据
     * @return 结果
     */
    @Override
    public int updateEmsReportPointSteam(EmsReportPointSteam emsReportPointSteam)
    {
        emsReportPointSteam.setUpdateTime(DateUtils.getNowDate());
        return emsReportPointSteamMapper.updateEmsReportPointSteam(emsReportPointSteam);
    }

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

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