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.TMonthlyQualityReportS5012Mapper;
import com.ruoyi.project.production.domain.TMonthlyQualityReportS5012;
import com.ruoyi.project.production.service.ITMonthlyQualityReportS5012Service;

/**
 * 质量月报S5012Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-27
 */
@Service
public class TMonthlyQualityReportS5012ServiceImpl implements ITMonthlyQualityReportS5012Service
{
    @Autowired
    private TMonthlyQualityReportS5012Mapper tMonthlyQualityReportS5012Mapper;

    /**
     * 查询质量月报S5012
     *
     * @param id 质量月报S5012ID
     * @return 质量月报S5012
     */
    @Override
    public TMonthlyQualityReportS5012 selectTMonthlyQualityReportS5012ById(Long id)
    {
        return tMonthlyQualityReportS5012Mapper.selectTMonthlyQualityReportS5012ById(id);
    }

    /**
     * 查询质量月报S5012列表
     *
     * @param tMonthlyQualityReportS5012 质量月报S5012
     * @return 质量月报S5012
     */
    @Override
    public List<TMonthlyQualityReportS5012> selectTMonthlyQualityReportS5012List(TMonthlyQualityReportS5012 tMonthlyQualityReportS5012)
    {
        return tMonthlyQualityReportS5012Mapper.selectTMonthlyQualityReportS5012List(tMonthlyQualityReportS5012);
    }

    /**
     * 新增质量月报S5012
     *
     * @param tMonthlyQualityReportS5012 质量月报S5012
     * @return 结果
     */
    @Override
    public int insertTMonthlyQualityReportS5012(TMonthlyQualityReportS5012 tMonthlyQualityReportS5012)
    {
        tMonthlyQualityReportS5012.setCreateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS5012Mapper.insertTMonthlyQualityReportS5012(tMonthlyQualityReportS5012);
    }

    /**
     * 修改质量月报S5012
     *
     * @param tMonthlyQualityReportS5012 质量月报S5012
     * @return 结果
     */
    @Override
    public int updateTMonthlyQualityReportS5012(TMonthlyQualityReportS5012 tMonthlyQualityReportS5012)
    {
        tMonthlyQualityReportS5012.setUpdateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS5012Mapper.updateTMonthlyQualityReportS5012(tMonthlyQualityReportS5012);
    }

    /**
     * 批量删除质量月报S5012
     *
     * @param ids 需要删除的质量月报S5012ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS5012ByIds(Long[] ids)
    {
        return tMonthlyQualityReportS5012Mapper.deleteTMonthlyQualityReportS5012ByIds(ids);
    }

    /**
     * 删除质量月报S5012信息
     *
     * @param id 质量月报S5012ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS5012ById(Long id)
    {
        return tMonthlyQualityReportS5012Mapper.deleteTMonthlyQualityReportS5012ById(id);
    }
}
