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.TMonthlyQualityReportS2002Mapper;
import com.ruoyi.project.production.domain.TMonthlyQualityReportS2002;
import com.ruoyi.project.production.service.ITMonthlyQualityReportS2002Service;

/**
 * 质量月报S2002Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-27
 */
@Service
public class TMonthlyQualityReportS2002ServiceImpl implements ITMonthlyQualityReportS2002Service
{
    @Autowired
    private TMonthlyQualityReportS2002Mapper tMonthlyQualityReportS2002Mapper;

    /**
     * 查询质量月报S2002
     *
     * @param id 质量月报S2002ID
     * @return 质量月报S2002
     */
    @Override
    public TMonthlyQualityReportS2002 selectTMonthlyQualityReportS2002ById(Long id)
    {
        return tMonthlyQualityReportS2002Mapper.selectTMonthlyQualityReportS2002ById(id);
    }

    /**
     * 查询质量月报S2002列表
     *
     * @param tMonthlyQualityReportS2002 质量月报S2002
     * @return 质量月报S2002
     */
    @Override
    public List<TMonthlyQualityReportS2002> selectTMonthlyQualityReportS2002List(TMonthlyQualityReportS2002 tMonthlyQualityReportS2002)
    {
        return tMonthlyQualityReportS2002Mapper.selectTMonthlyQualityReportS2002List(tMonthlyQualityReportS2002);
    }

    /**
     * 新增质量月报S2002
     *
     * @param tMonthlyQualityReportS2002 质量月报S2002
     * @return 结果
     */
    @Override
    public int insertTMonthlyQualityReportS2002(TMonthlyQualityReportS2002 tMonthlyQualityReportS2002)
    {
        tMonthlyQualityReportS2002.setCreateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS2002Mapper.insertTMonthlyQualityReportS2002(tMonthlyQualityReportS2002);
    }

    /**
     * 修改质量月报S2002
     *
     * @param tMonthlyQualityReportS2002 质量月报S2002
     * @return 结果
     */
    @Override
    public int updateTMonthlyQualityReportS2002(TMonthlyQualityReportS2002 tMonthlyQualityReportS2002)
    {
        tMonthlyQualityReportS2002.setUpdateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS2002Mapper.updateTMonthlyQualityReportS2002(tMonthlyQualityReportS2002);
    }

    /**
     * 批量删除质量月报S2002
     *
     * @param ids 需要删除的质量月报S2002ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS2002ByIds(Long[] ids)
    {
        return tMonthlyQualityReportS2002Mapper.deleteTMonthlyQualityReportS2002ByIds(ids);
    }

    /**
     * 删除质量月报S2002信息
     *
     * @param id 质量月报S2002ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS2002ById(Long id)
    {
        return tMonthlyQualityReportS2002Mapper.deleteTMonthlyQualityReportS2002ById(id);
    }
}
