package com.ruoyi.ems.base.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.base.mapper.EmsBaseMonitorWorkUnitMapper;
import com.ruoyi.ems.base.domain.EmsBaseMonitorWorkUnit;
import com.ruoyi.ems.base.service.IEmsBaseMonitorWorkUnitService;

/**
 * 统计计量信息Service业务层处理
 * 
 * @author Yinq
 * @date 2024-05-09
 */
@Service
public class EmsBaseMonitorWorkUnitServiceImpl implements IEmsBaseMonitorWorkUnitService 
{
    @Autowired
    private EmsBaseMonitorWorkUnitMapper emsBaseMonitorWorkUnitMapper;

    /**
     * 查询统计计量信息
     * 
     * @param objId 统计计量信息主键
     * @return 统计计量信息
     */
    @Override
    public EmsBaseMonitorWorkUnit selectEmsBaseMonitorWorkUnitByObjId(Long objId)
    {
        return emsBaseMonitorWorkUnitMapper.selectEmsBaseMonitorWorkUnitByObjId(objId);
    }

    /**
     * 查询统计计量信息列表
     * 
     * @param emsBaseMonitorWorkUnit 统计计量信息
     * @return 统计计量信息
     */
    @Override
    public List<EmsBaseMonitorWorkUnit> selectEmsBaseMonitorWorkUnitList(EmsBaseMonitorWorkUnit emsBaseMonitorWorkUnit)
    {
        emsBaseMonitorWorkUnit.setCreateTime(DateUtils.getNowDate());
        return emsBaseMonitorWorkUnitMapper.selectEmsBaseMonitorWorkUnitList(emsBaseMonitorWorkUnit);
    }

    /**
     * 新增统计计量信息
     * 
     * @param emsBaseMonitorWorkUnit 统计计量信息
     * @return 结果
     */
    @Override
    public int insertEmsBaseMonitorWorkUnit(EmsBaseMonitorWorkUnit emsBaseMonitorWorkUnit)
    {
        emsBaseMonitorWorkUnit.setUpdateTime(DateUtils.getNowDate());
        return emsBaseMonitorWorkUnitMapper.insertEmsBaseMonitorWorkUnit(emsBaseMonitorWorkUnit);
    }

    /**
     * 修改统计计量信息
     * 
     * @param emsBaseMonitorWorkUnit 统计计量信息
     * @return 结果
     */
    @Override
    public int updateEmsBaseMonitorWorkUnit(EmsBaseMonitorWorkUnit emsBaseMonitorWorkUnit)
    {
        return emsBaseMonitorWorkUnitMapper.updateEmsBaseMonitorWorkUnit(emsBaseMonitorWorkUnit);
    }

    /**
     * 批量删除统计计量信息
     * 
     * @param objIds 需要删除的统计计量信息主键
     * @return 结果
     */
    @Override
    public int deleteEmsBaseMonitorWorkUnitByObjIds(Long[] objIds)
    {
        return emsBaseMonitorWorkUnitMapper.deleteEmsBaseMonitorWorkUnitByObjIds(objIds);
    }

    /**
     * 删除统计计量信息信息
     * 
     * @param objId 统计计量信息主键
     * @return 结果
     */
    @Override
    public int deleteEmsBaseMonitorWorkUnitByObjId(Long objId)
    {
        return emsBaseMonitorWorkUnitMapper.deleteEmsBaseMonitorWorkUnitByObjId(objId);
    }
}
