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.TInspectionResultMapper;
import com.zehong.system.domain.TInspectionResult;
import com.zehong.system.service.ITInspectionResultService;

/**
 * 巡检结果采集Service业务层处理
 *
 * @author zehong
 * @date 2026-03-14
 */
@Service
public class TInspectionResultServiceImpl implements ITInspectionResultService
{
    @Autowired
    private TInspectionResultMapper tInspectionResultMapper;

    /**
     * 查询巡检结果采集
     *
     * @param id 巡检结果采集ID
     * @return 巡检结果采集
     */
    @Override
    public TInspectionResult selectTInspectionResultById(Long id)
    {
        return tInspectionResultMapper.selectTInspectionResultById(id);
    }

    /**
     * 查询巡检结果采集列表
     *
     * @param tInspectionResult 巡检结果采集
     * @return 巡检结果采集
     */
    @Override
    public List<TInspectionResult> selectTInspectionResultList(TInspectionResult tInspectionResult)
    {
        return tInspectionResultMapper.selectTInspectionResultList(tInspectionResult);
    }

    /**
     * 新增巡检结果采集
     *
     * @param tInspectionResult 巡检结果采集
     * @return 结果
     */
    @Override
    public int insertTInspectionResult(TInspectionResult tInspectionResult)
    {
        tInspectionResult.setCreateTime(DateUtils.getNowDate());
        return tInspectionResultMapper.insertTInspectionResult(tInspectionResult);
    }

    /**
     * 修改巡检结果采集
     *
     * @param tInspectionResult 巡检结果采集
     * @return 结果
     */
    @Override
    public int updateTInspectionResult(TInspectionResult tInspectionResult)
    {
        return tInspectionResultMapper.updateTInspectionResult(tInspectionResult);
    }

    /**
     * 批量删除巡检结果采集
     *
     * @param ids 需要删除的巡检结果采集ID
     * @return 结果
     */
    @Override
    public int deleteTInspectionResultByIds(Long[] ids)
    {
        return tInspectionResultMapper.deleteTInspectionResultByIds(ids);
    }

    /**
     * 删除巡检结果采集信息
     *
     * @param id 巡检结果采集ID
     * @return 结果
     */
    @Override
    public int deleteTInspectionResultById(Long id)
    {
        return tInspectionResultMapper.deleteTInspectionResultById(id);
    }
}