package com.ruoyi.project.production.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.project.production.mapper.TMonthlyQualityReportS5001Mapper;
import com.ruoyi.project.production.domain.TMonthlyQualityReportS5001;
import com.ruoyi.project.production.service.ITMonthlyQualityReportS5001Service;

/**
 * 质量月报S5001Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-27
 */
@Service
public class TMonthlyQualityReportS5001ServiceImpl implements ITMonthlyQualityReportS5001Service
{
    @Autowired
    private TMonthlyQualityReportS5001Mapper tMonthlyQualityReportS5001Mapper;

    /**
     * 查询质量月报S5001
     *
     * @param id 质量月报S5001ID
     * @return 质量月报S5001
     */
    @Override
    public TMonthlyQualityReportS5001 selectTMonthlyQualityReportS5001ById(Long id)
    {
        return tMonthlyQualityReportS5001Mapper.selectTMonthlyQualityReportS5001ById(id);
    }

    /**
     * 查询质量月报S5001列表
     *
     * @param tMonthlyQualityReportS5001 质量月报S5001
     * @return 质量月报S5001
     */
    @Override
    public List<TMonthlyQualityReportS5001> selectTMonthlyQualityReportS5001List(TMonthlyQualityReportS5001 tMonthlyQualityReportS5001)
    {
        return tMonthlyQualityReportS5001Mapper.selectTMonthlyQualityReportS5001List(tMonthlyQualityReportS5001);
    }

    /**
     * 新增质量月报S5001
     *
     * @param tMonthlyQualityReportS5001 质量月报S5001
     * @return 结果
     */
    @Override
    public int insertTMonthlyQualityReportS5001(TMonthlyQualityReportS5001 tMonthlyQualityReportS5001)
    {
        tMonthlyQualityReportS5001.setCreateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS5001Mapper.insertTMonthlyQualityReportS5001(tMonthlyQualityReportS5001);
    }

    /**
     * 修改质量月报S5001
     *
     * @param tMonthlyQualityReportS5001 质量月报S5001
     * @return 结果
     */
    @Override
    public int updateTMonthlyQualityReportS5001(TMonthlyQualityReportS5001 tMonthlyQualityReportS5001)
    {
        tMonthlyQualityReportS5001.setUpdateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS5001Mapper.updateTMonthlyQualityReportS5001(tMonthlyQualityReportS5001);
    }

    /**
     * 批量删除质量月报S5001
     *
     * @param ids 需要删除的质量月报S5001ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS5001ByIds(Long[] ids)
    {
        return tMonthlyQualityReportS5001Mapper.deleteTMonthlyQualityReportS5001ByIds(ids);
    }

    /**
     * 删除质量月报S5001信息
     *
     * @param id 质量月报S5001ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS5001ById(Long id)
    {
        return tMonthlyQualityReportS5001Mapper.deleteTMonthlyQualityReportS5001ById(id);
    }
}
