package com.ruoyi.traceability.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.traceability.mapper.ProDownrecordMapper;
import com.ruoyi.traceability.domain.ProDownrecord;
import com.ruoyi.traceability.service.IProDownrecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 下料记录Service业务层处理
 * 
 * @author wenjy
 * @date 2022-11-13
 */
@Service
public class ProDownrecordServiceImpl implements IProDownrecordService 
{
    @Autowired
    private ProDownrecordMapper proDownrecordMapper;

    /**
     * 查询下料记录
     * 
     * @param id 下料记录主键
     * @return 下料记录
     */
    @Override
    public ProDownrecord selectProDownrecordById(Long id)
    {
        return proDownrecordMapper.selectProDownrecordById(id);
    }

    /**
     * 查询下料记录列表
     * 
     * @param proDownrecord 下料记录
     * @return 下料记录
     */
    @Override
    public List<ProDownrecord> selectProDownrecordList(ProDownrecord proDownrecord)
    {
        return proDownrecordMapper.selectProDownrecordList(proDownrecord);
    }

    /**
     * 新增下料记录
     * 
     * @param proDownrecord 下料记录
     * @return 结果
     */
    @Override
    public int insertProDownrecord(ProDownrecord proDownrecord)
    {
        return proDownrecordMapper.insertProDownrecord(proDownrecord);
    }

    /**
     * 修改下料记录
     * 
     * @param proDownrecord 下料记录
     * @return 结果
     */
    @Override
    public int updateProDownrecord(ProDownrecord proDownrecord)
    {
        return proDownrecordMapper.updateProDownrecord(proDownrecord);
    }

    /**
     * 批量删除下料记录
     * 
     * @param ids 需要删除的下料记录主键
     * @return 结果
     */
    @Override
    public int deleteProDownrecordByIds(String ids)
    {
        return proDownrecordMapper.deleteProDownrecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除下料记录信息
     * 
     * @param id 下料记录主键
     * @return 结果
     */
    @Override
    public int deleteProDownrecordById(Long id)
    {
        return proDownrecordMapper.deleteProDownrecordById(id);
    }
}
