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.TMonthlyQualityReportS2011Mapper;
import com.ruoyi.project.production.domain.TMonthlyQualityReportS2011;
import com.ruoyi.project.production.service.ITMonthlyQualityReportS2011Service;

/**
 * 质量月报S2011Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-27
 */
@Service
public class TMonthlyQualityReportS2011ServiceImpl implements ITMonthlyQualityReportS2011Service
{
    @Autowired
    private TMonthlyQualityReportS2011Mapper tMonthlyQualityReportS2011Mapper;

    /**
     * 查询质量月报S2011
     *
     * @param id 质量月报S2011ID
     * @return 质量月报S2011
     */
    @Override
    public TMonthlyQualityReportS2011 selectTMonthlyQualityReportS2011ById(Long id)
    {
        return tMonthlyQualityReportS2011Mapper.selectTMonthlyQualityReportS2011ById(id);
    }

    /**
     * 查询质量月报S2011列表
     *
     * @param tMonthlyQualityReportS2011 质量月报S2011
     * @return 质量月报S2011
     */
    @Override
    public List<TMonthlyQualityReportS2011> selectTMonthlyQualityReportS2011List(TMonthlyQualityReportS2011 tMonthlyQualityReportS2011)
    {
        return tMonthlyQualityReportS2011Mapper.selectTMonthlyQualityReportS2011List(tMonthlyQualityReportS2011);
    }

    /**
     * 新增质量月报S2011
     *
     * @param tMonthlyQualityReportS2011 质量月报S2011
     * @return 结果
     */
    @Override
    public int insertTMonthlyQualityReportS2011(TMonthlyQualityReportS2011 tMonthlyQualityReportS2011)
    {
        tMonthlyQualityReportS2011.setCreateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS2011Mapper.insertTMonthlyQualityReportS2011(tMonthlyQualityReportS2011);
    }

    /**
     * 修改质量月报S2011
     *
     * @param tMonthlyQualityReportS2011 质量月报S2011
     * @return 结果
     */
    @Override
    public int updateTMonthlyQualityReportS2011(TMonthlyQualityReportS2011 tMonthlyQualityReportS2011)
    {
        tMonthlyQualityReportS2011.setUpdateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS2011Mapper.updateTMonthlyQualityReportS2011(tMonthlyQualityReportS2011);
    }

    /**
     * 批量删除质量月报S2011
     *
     * @param ids 需要删除的质量月报S2011ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS2011ByIds(Long[] ids)
    {
        return tMonthlyQualityReportS2011Mapper.deleteTMonthlyQualityReportS2011ByIds(ids);
    }

    /**
     * 删除质量月报S2011信息
     *
     * @param id 质量月报S2011ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS2011ById(Long id)
    {
        return tMonthlyQualityReportS2011Mapper.deleteTMonthlyQualityReportS2011ById(id);
    }
}
