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.TCarTaskInspectMapper;
import com.zehong.system.domain.TCarTaskInspect;
import com.zehong.system.service.ITCarTaskInspectService;

/**
 * 巡检车打卡Service业务层处理
 * 
 * @author zehong
 * @date 2026-05-15
 */
@Service
public class TCarTaskInspectServiceImpl implements ITCarTaskInspectService 
{
    @Autowired
    private TCarTaskInspectMapper tCarTaskInspectMapper;

    /**
     * 查询巡检车打卡
     * 
     * @param id 巡检车打卡ID
     * @return 巡检车打卡
     */
    @Override
    public TCarTaskInspect selectTCarTaskInspectById(Long id)
    {
        return tCarTaskInspectMapper.selectTCarTaskInspectById(id);
    }

    /**
     * 查询巡检车打卡列表
     * 
     * @param tCarTaskInspect 巡检车打卡
     * @return 巡检车打卡
     */
    @Override
    public List<TCarTaskInspect> selectTCarTaskInspectList(TCarTaskInspect tCarTaskInspect)
    {
        return tCarTaskInspectMapper.selectTCarTaskInspectList(tCarTaskInspect);
    }

    /**
     * 新增巡检车打卡
     * 
     * @param tCarTaskInspect 巡检车打卡
     * @return 结果
     */
    @Override
    public int insertTCarTaskInspect(TCarTaskInspect tCarTaskInspect)
    {
        tCarTaskInspect.setCreateTime(DateUtils.getNowDate());
        return tCarTaskInspectMapper.insertTCarTaskInspect(tCarTaskInspect);
    }

    /**
     * 修改巡检车打卡
     * 
     * @param tCarTaskInspect 巡检车打卡
     * @return 结果
     */
    @Override
    public int updateTCarTaskInspect(TCarTaskInspect tCarTaskInspect)
    {
        return tCarTaskInspectMapper.updateTCarTaskInspect(tCarTaskInspect);
    }

    /**
     * 批量删除巡检车打卡
     * 
     * @param ids 需要删除的巡检车打卡ID
     * @return 结果
     */
    @Override
    public int deleteTCarTaskInspectByIds(Long[] ids)
    {
        return tCarTaskInspectMapper.deleteTCarTaskInspectByIds(ids);
    }

    /**
     * 删除巡检车打卡信息
     * 
     * @param id 巡检车打卡ID
     * @return 结果
     */
    @Override
    public int deleteTCarTaskInspectById(Long id)
    {
        return tCarTaskInspectMapper.deleteTCarTaskInspectById(id);
    }
}
