package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TSupervisionInspectionMapper;
import com.zehong.system.domain.TSupervisionInspection;
import com.zehong.system.service.ITSupervisionInspectionService;

/**
 * 监督检查记录Service业务层处理
 *
 * @author zehong
 * @date 2026-03-16
 */
@Service
public class TSupervisionInspectionServiceImpl implements ITSupervisionInspectionService
{
    @Autowired
    private TSupervisionInspectionMapper tSupervisionInspectionMapper;

    /**
     * 查询监督检查记录
     *
     * @param id 监督检查记录ID
     * @return 监督检查记录
     */
    @Override
    public TSupervisionInspection selectTSupervisionInspectionById(Long id)
    {
        return tSupervisionInspectionMapper.selectTSupervisionInspectionById(id);
    }

    /**
     * 查询监督检查记录列表
     *
     * @param tSupervisionInspection 监督检查记录
     * @return 监督检查记录
     */
    @Override
    public List<TSupervisionInspection> selectTSupervisionInspectionList(TSupervisionInspection tSupervisionInspection)
    {
        return tSupervisionInspectionMapper.selectTSupervisionInspectionList(tSupervisionInspection);
    }

    /**
     * 新增监督检查记录
     *
     * @param tSupervisionInspection 监督检查记录
     * @return 结果
     */
    @Override
    public int insertTSupervisionInspection(TSupervisionInspection tSupervisionInspection)
    {
        tSupervisionInspection.setCreateTime(DateUtils.getNowDate());
        return tSupervisionInspectionMapper.insertTSupervisionInspection(tSupervisionInspection);
    }

    /**
     * 修改监督检查记录
     *
     * @param tSupervisionInspection 监督检查记录
     * @return 结果
     */
    @Override
    public int updateTSupervisionInspection(TSupervisionInspection tSupervisionInspection)
    {
        return tSupervisionInspectionMapper.updateTSupervisionInspection(tSupervisionInspection);
    }

    /**
     * 批量删除监督检查记录
     *
     * @param ids 需要删除的监督检查记录ID
     * @return 结果
     */
    @Override
    public int deleteTSupervisionInspectionByIds(Long[] ids)
    {
        return tSupervisionInspectionMapper.deleteTSupervisionInspectionByIds(ids);
    }

    /**
     * 删除监督检查记录信息
     *
     * @param id 监督检查记录ID
     * @return 结果
     */
    @Override
    public int deleteTSupervisionInspectionById(Long id)
    {
        return tSupervisionInspectionMapper.deleteTSupervisionInspectionById(id);
    }
}