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.TMonthlyQualityReportS2007Mapper;
import com.ruoyi.project.production.domain.TMonthlyQualityReportS2007;
import com.ruoyi.project.production.service.ITMonthlyQualityReportS2007Service;

/**
 * 质量月报S2007Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-27
 */
@Service
public class TMonthlyQualityReportS2007ServiceImpl implements ITMonthlyQualityReportS2007Service
{
    @Autowired
    private TMonthlyQualityReportS2007Mapper tMonthlyQualityReportS2007Mapper;

    /**
     * 查询质量月报S2007
     *
     * @param id 质量月报S2007ID
     * @return 质量月报S2007
     */
    @Override
    public TMonthlyQualityReportS2007 selectTMonthlyQualityReportS2007ById(Long id)
    {
        return tMonthlyQualityReportS2007Mapper.selectTMonthlyQualityReportS2007ById(id);
    }

    /**
     * 查询质量月报S2007列表
     *
     * @param tMonthlyQualityReportS2007 质量月报S2007
     * @return 质量月报S2007
     */
    @Override
    public List<TMonthlyQualityReportS2007> selectTMonthlyQualityReportS2007List(TMonthlyQualityReportS2007 tMonthlyQualityReportS2007)
    {
        return tMonthlyQualityReportS2007Mapper.selectTMonthlyQualityReportS2007List(tMonthlyQualityReportS2007);
    }

    /**
     * 新增质量月报S2007
     *
     * @param tMonthlyQualityReportS2007 质量月报S2007
     * @return 结果
     */
    @Override
    public int insertTMonthlyQualityReportS2007(TMonthlyQualityReportS2007 tMonthlyQualityReportS2007)
    {
        tMonthlyQualityReportS2007.setCreateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS2007Mapper.insertTMonthlyQualityReportS2007(tMonthlyQualityReportS2007);
    }

    /**
     * 修改质量月报S2007
     *
     * @param tMonthlyQualityReportS2007 质量月报S2007
     * @return 结果
     */
    @Override
    public int updateTMonthlyQualityReportS2007(TMonthlyQualityReportS2007 tMonthlyQualityReportS2007)
    {
        tMonthlyQualityReportS2007.setUpdateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS2007Mapper.updateTMonthlyQualityReportS2007(tMonthlyQualityReportS2007);
    }

    /**
     * 批量删除质量月报S2007
     *
     * @param ids 需要删除的质量月报S2007ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS2007ByIds(Long[] ids)
    {
        return tMonthlyQualityReportS2007Mapper.deleteTMonthlyQualityReportS2007ByIds(ids);
    }

    /**
     * 删除质量月报S2007信息
     *
     * @param id 质量月报S2007ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS2007ById(Long id)
    {
        return tMonthlyQualityReportS2007Mapper.deleteTMonthlyQualityReportS2007ById(id);
    }
}
