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

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.production.mapper.TDailyProductionReportMapper;
import com.ruoyi.project.production.domain.TDailyProductionReport;
import com.ruoyi.project.production.service.ITDailyProductionReportService;

/**
 * 每日生产报告Service业务层处理
 *
 * @author ruoyi
 * @date 2022-08-23
 */
@Service
public class TDailyProductionReportServiceImpl implements ITDailyProductionReportService
{
    @Autowired
    private TDailyProductionReportMapper tDailyProductionReportMapper;

    /**
     * 查询每日生产报告
     *
     * @param id 每日生产报告ID
     * @return 每日生产报告
     */
    @Override
    public TDailyProductionReport selectTDailyProductionReportById(Long id)
    {
        return tDailyProductionReportMapper.selectTDailyProductionReportById(id);
    }

    /**
     * 查询每日生产报告
     *
     * @param reportDate 每日生产报告日期
     * @return 每日生产报告
     */
    @Override
    public TDailyProductionReport selectTDailyProductionReportByReportDate(Date reportDate)
    {
        return tDailyProductionReportMapper.selectTDailyProductionReportByReportDate(reportDate);
    }

    /**
     * 查询每日生产报告列表
     *
     * @param tDailyProductionReport 每日生产报告
     * @return 每日生产报告
     */
    @Override
    public List<TDailyProductionReport> selectTDailyProductionReportList(TDailyProductionReport tDailyProductionReport)
    {
        return tDailyProductionReportMapper.selectTDailyProductionReportList(tDailyProductionReport);
    }

    /**
     * 新增每日生产报告
     *
     * @param tDailyProductionReport 每日生产报告
     * @return 结果
     */
    @Override
    public int insertTDailyProductionReport(TDailyProductionReport tDailyProductionReport)
    {
        return tDailyProductionReportMapper.insertTDailyProductionReport(tDailyProductionReport);
    }

    /**
     * 修改每日生产报告
     *
     * @param tDailyProductionReport 每日生产报告
     * @return 结果
     */
    @Override
    public int updateTDailyProductionReport(TDailyProductionReport tDailyProductionReport)
    {
        return tDailyProductionReportMapper.updateTDailyProductionReport(tDailyProductionReport);
    }

    /**
     * 批量删除每日生产报告
     *
     * @param ids 需要删除的每日生产报告ID
     * @return 结果
     */
    @Override
    public int deleteTDailyProductionReportByIds(Long[] ids)
    {
        return tDailyProductionReportMapper.deleteTDailyProductionReportByIds(ids);
    }

    /**
     * 删除每日生产报告信息
     *
     * @param id 每日生产报告ID
     * @return 结果
     */
    @Override
    public int deleteTDailyProductionReportById(Long id)
    {
        return tDailyProductionReportMapper.deleteTDailyProductionReportById(id);
    }
}
