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.TMonthlyQualityReportS2005Mapper;
import com.ruoyi.project.production.domain.TMonthlyQualityReportS2005;
import com.ruoyi.project.production.service.ITMonthlyQualityReportS2005Service;

/**
 * 质量月报S2005Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-27
 */
@Service
public class TMonthlyQualityReportS2005ServiceImpl implements ITMonthlyQualityReportS2005Service
{
    @Autowired
    private TMonthlyQualityReportS2005Mapper tMonthlyQualityReportS2005Mapper;

    /**
     * 查询质量月报S2005
     *
     * @param id 质量月报S2005ID
     * @return 质量月报S2005
     */
    @Override
    public TMonthlyQualityReportS2005 selectTMonthlyQualityReportS2005ById(Long id)
    {
        return tMonthlyQualityReportS2005Mapper.selectTMonthlyQualityReportS2005ById(id);
    }

    /**
     * 查询质量月报S2005列表
     *
     * @param tMonthlyQualityReportS2005 质量月报S2005
     * @return 质量月报S2005
     */
    @Override
    public List<TMonthlyQualityReportS2005> selectTMonthlyQualityReportS2005List(TMonthlyQualityReportS2005 tMonthlyQualityReportS2005)
    {
        return tMonthlyQualityReportS2005Mapper.selectTMonthlyQualityReportS2005List(tMonthlyQualityReportS2005);
    }

    /**
     * 新增质量月报S2005
     *
     * @param tMonthlyQualityReportS2005 质量月报S2005
     * @return 结果
     */
    @Override
    public int insertTMonthlyQualityReportS2005(TMonthlyQualityReportS2005 tMonthlyQualityReportS2005)
    {
        tMonthlyQualityReportS2005.setCreateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS2005Mapper.insertTMonthlyQualityReportS2005(tMonthlyQualityReportS2005);
    }

    /**
     * 修改质量月报S2005
     *
     * @param tMonthlyQualityReportS2005 质量月报S2005
     * @return 结果
     */
    @Override
    public int updateTMonthlyQualityReportS2005(TMonthlyQualityReportS2005 tMonthlyQualityReportS2005)
    {
        tMonthlyQualityReportS2005.setUpdateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS2005Mapper.updateTMonthlyQualityReportS2005(tMonthlyQualityReportS2005);
    }

    /**
     * 批量删除质量月报S2005
     *
     * @param ids 需要删除的质量月报S2005ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS2005ByIds(Long[] ids)
    {
        return tMonthlyQualityReportS2005Mapper.deleteTMonthlyQualityReportS2005ByIds(ids);
    }

    /**
     * 删除质量月报S2005信息
     *
     * @param id 质量月报S2005ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS2005ById(Long id)
    {
        return tMonthlyQualityReportS2005Mapper.deleteTMonthlyQualityReportS2005ById(id);
    }
}
