package com.ruoyi.baseinfo.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.baseinfo.mapper.BasePlandetailInfoMapper;
import com.ruoyi.baseinfo.domain.BasePlandetailInfo;
import com.ruoyi.baseinfo.service.IBasePlandetailInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 计划明细Service业务层处理
 * 
 * @author CaesarBao
 * @date 2020-10-23
 */
@Service
public class BasePlandetailInfoServiceImpl implements IBasePlandetailInfoService 
{
    @Autowired
    private BasePlandetailInfoMapper basePlandetailInfoMapper;

    /**
     * 查询计划明细
     * 
     * @param objid 计划明细ID
     * @return 计划明细
     */
    @Override
    public BasePlandetailInfo selectBasePlandetailInfoById(Long objid)
    {
        return basePlandetailInfoMapper.selectBasePlandetailInfoById(objid);
    }

    /**
     * 查询计划明细列表
     * 
     * @param basePlandetailInfo 计划明细
     * @return 计划明细
     */
    @Override
    public List<BasePlandetailInfo> selectBasePlandetailInfoList(BasePlandetailInfo basePlandetailInfo)
    {
        return basePlandetailInfoMapper.selectBasePlandetailInfoList(basePlandetailInfo);
    }

    /**
     * 新增计划明细
     * 
     * @param basePlandetailInfo 计划明细
     * @return 结果
     */
    @Override
    public int insertBasePlandetailInfo(BasePlandetailInfo basePlandetailInfo)
    {
        basePlandetailInfo.setCreateTime(DateUtils.getNowDate());
        return basePlandetailInfoMapper.insertBasePlandetailInfo(basePlandetailInfo);
    }

    /**
     * 修改计划明细
     * 
     * @param basePlandetailInfo 计划明细
     * @return 结果
     */
    @Override
    public int updateBasePlandetailInfo(BasePlandetailInfo basePlandetailInfo)
    {
        basePlandetailInfo.setUpdateTime(DateUtils.getNowDate());
        return basePlandetailInfoMapper.updateBasePlandetailInfo(basePlandetailInfo);
    }

    /**
     * 删除计划明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBasePlandetailInfoByIds(String ids)
    {
        return basePlandetailInfoMapper.deleteBasePlandetailInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除计划明细信息
     * 
     * @param objid 计划明细ID
     * @return 结果
     */
    @Override
    public int deleteBasePlandetailInfoById(Long objid)
    {
        return basePlandetailInfoMapper.deleteBasePlandetailInfoById(objid);
    }
}
