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.TMonthlyQualityReportS4012Mapper;
import com.ruoyi.project.production.domain.TMonthlyQualityReportS4012;
import com.ruoyi.project.production.service.ITMonthlyQualityReportS4012Service;

/**
 * 质量月报S4012Service业务层处理
 *
 * @author ruoyi
 * @date 2023-10-27
 */
@Service
public class TMonthlyQualityReportS4012ServiceImpl implements ITMonthlyQualityReportS4012Service
{
    @Autowired
    private TMonthlyQualityReportS4012Mapper tMonthlyQualityReportS4012Mapper;

    /**
     * 查询质量月报S4012
     *
     * @param id 质量月报S4012ID
     * @return 质量月报S4012
     */
    @Override
    public TMonthlyQualityReportS4012 selectTMonthlyQualityReportS4012ById(Long id)
    {
        return tMonthlyQualityReportS4012Mapper.selectTMonthlyQualityReportS4012ById(id);
    }

    /**
     * 查询质量月报S4012列表
     *
     * @param tMonthlyQualityReportS4012 质量月报S4012
     * @return 质量月报S4012
     */
    @Override
    public List<TMonthlyQualityReportS4012> selectTMonthlyQualityReportS4012List(TMonthlyQualityReportS4012 tMonthlyQualityReportS4012)
    {
        return tMonthlyQualityReportS4012Mapper.selectTMonthlyQualityReportS4012List(tMonthlyQualityReportS4012);
    }

    /**
     * 新增质量月报S4012
     *
     * @param tMonthlyQualityReportS4012 质量月报S4012
     * @return 结果
     */
    @Override
    public int insertTMonthlyQualityReportS4012(TMonthlyQualityReportS4012 tMonthlyQualityReportS4012)
    {
        tMonthlyQualityReportS4012.setCreateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS4012Mapper.insertTMonthlyQualityReportS4012(tMonthlyQualityReportS4012);
    }

    /**
     * 修改质量月报S4012
     *
     * @param tMonthlyQualityReportS4012 质量月报S4012
     * @return 结果
     */
    @Override
    public int updateTMonthlyQualityReportS4012(TMonthlyQualityReportS4012 tMonthlyQualityReportS4012)
    {
        tMonthlyQualityReportS4012.setUpdateTime(DateUtils.getNowDate());
        return tMonthlyQualityReportS4012Mapper.updateTMonthlyQualityReportS4012(tMonthlyQualityReportS4012);
    }

    /**
     * 批量删除质量月报S4012
     *
     * @param ids 需要删除的质量月报S4012ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS4012ByIds(Long[] ids)
    {
        return tMonthlyQualityReportS4012Mapper.deleteTMonthlyQualityReportS4012ByIds(ids);
    }

    /**
     * 删除质量月报S4012信息
     *
     * @param id 质量月报S4012ID
     * @return 结果
     */
    @Override
    public int deleteTMonthlyQualityReportS4012ById(Long id)
    {
        return tMonthlyQualityReportS4012Mapper.deleteTMonthlyQualityReportS4012ById(id);
    }
}
