package com.ruoyi.system.service.impl.project;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.project.BmConstructionEntry;
import com.ruoyi.system.mapper.project.BmConstructionEntryMapper;
import com.ruoyi.system.service.project.IBmConstructionEntryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 项目入规
(跟项目一对一)Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-20
 */
@Service
public class BmConstructionEntryServiceImpl implements IBmConstructionEntryService
{
    @Autowired
    private BmConstructionEntryMapper bmConstructionEntryMapper;

    /**
     * 查询项目入规
(跟项目一对一)
     * 
     * @param id 项目入规
(跟项目一对一)ID
     * @return 项目入规
(跟项目一对一)
     */
    @Override
    public BmConstructionEntry selectBmConstructionEntryById(Long id)
    {
        return bmConstructionEntryMapper.selectBmConstructionEntryById(id);
    }

    /**
     * 查询项目入规
(跟项目一对一)列表
     * 
     * @param bmConstructionEntry 项目入规
(跟项目一对一)
     * @return 项目入规
(跟项目一对一)
     */
    @Override
    public List<BmConstructionEntry> selectBmConstructionEntryList(BmConstructionEntry bmConstructionEntry)
    {
        return bmConstructionEntryMapper.selectBmConstructionEntryList(bmConstructionEntry);
    }

    /**
     * 新增项目入规
(跟项目一对一)
     * 
     * @param bmConstructionEntry 项目入规
(跟项目一对一)
     * @return 结果
     */
    @Override
    public int insertBmConstructionEntry(BmConstructionEntry bmConstructionEntry)
    {
        bmConstructionEntry.setCreateTime(DateUtils.getNowDate());
        return bmConstructionEntryMapper.insertBmConstructionEntry(bmConstructionEntry);
    }

    /**
     * 修改项目入规
(跟项目一对一)
     * 
     * @param bmConstructionEntry 项目入规
(跟项目一对一)
     * @return 结果
     */
    @Override
    public int updateBmConstructionEntry(BmConstructionEntry bmConstructionEntry)
    {
        bmConstructionEntry.setUpdateTime(DateUtils.getNowDate());
        return bmConstructionEntryMapper.updateBmConstructionEntry(bmConstructionEntry);
    }

    /**
     * 批量删除项目入规
(跟项目一对一)
     * 
     * @param ids 需要删除的项目入规
(跟项目一对一)ID
     * @return 结果
     */
    @Override
    public int deleteBmConstructionEntryByIds(Long[] ids)
    {
        return bmConstructionEntryMapper.deleteBmConstructionEntryByIds(ids);
    }

    /**
     * 删除项目入规
(跟项目一对一)信息
     * 
     * @param id 项目入规
(跟项目一对一)ID
     * @return 结果
     */
    @Override
    public int deleteBmConstructionEntryById(Long id)
    {
        return bmConstructionEntryMapper.deleteBmConstructionEntryById(id);
    }
}
