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.TMonthlyQualityReportS5010Mapper;
import com.ruoyi.project.production.domain.TMonthlyQualityReportS5010;
import com.ruoyi.project.production.service.ITMonthlyQualityReportS5010Service;

/**
 * 质量月报S5010Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-27
 */
@Service
public class TMonthlyQualityReportS5010ServiceImpl implements ITMonthlyQualityReportS5010Service
{
    @Autowired
    private TMonthlyQualityReportS5010Mapper tMonthlyQualityReportS5010Mapper;

    /**
     * 查询质量月报S5010
     *
     * @param id 质量月报S5010ID
     * @return 质量月报S5010
     */
    @Override
    public TMonthlyQualityReportS5010 selectTMonthlyQualityReportS5010ById(Long id)
    {
        return tMonthlyQualityReportS5010Mapper.selectTMonthlyQualityReportS5010ById(id);
    }

    /**
     * 查询质量月报S5010列表
     *
     * @param tMonthlyQualityReportS5010 质量月报S5010
     * @return 质量月报S5010
     */
    @Override
    public List<TMonthlyQualityReportS5010> selectTMonthlyQualityReportS5010List(TMonthlyQualityReportS5010 tMonthlyQualityReportS5010)
    {
        return tMonthlyQualityReportS5010Mapper.selectTMonthlyQualityReportS5010List(tMonthlyQualityReportS5010);
    }

    /**
     * 新增质量月报S5010
     *
     * @param tMonthlyQualityReportS5010 质量月报S5010
     * @return 结果
     */
    @Override
    public int insertTMonthlyQualityReportS5010(TMonthlyQualityReportS5010 tMonthlyQualityReportS5010)
    {
        tMonthlyQualityReportS5010.setCreateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS5010Mapper.insertTMonthlyQualityReportS5010(tMonthlyQualityReportS5010);
    }

    /**
     * 修改质量月报S5010
     *
     * @param tMonthlyQualityReportS5010 质量月报S5010
     * @return 结果
     */
    @Override
    public int updateTMonthlyQualityReportS5010(TMonthlyQualityReportS5010 tMonthlyQualityReportS5010)
    {
        tMonthlyQualityReportS5010.setUpdateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS5010Mapper.updateTMonthlyQualityReportS5010(tMonthlyQualityReportS5010);
    }

    /**
     * 批量删除质量月报S5010
     *
     * @param ids 需要删除的质量月报S5010ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS5010ByIds(Long[] ids)
    {
        return tMonthlyQualityReportS5010Mapper.deleteTMonthlyQualityReportS5010ByIds(ids);
    }

    /**
     * 删除质量月报S5010信息
     *
     * @param id 质量月报S5010ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS5010ById(Long id)
    {
        return tMonthlyQualityReportS5010Mapper.deleteTMonthlyQualityReportS5010ById(id);
    }
}
