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.TLpgTraceBackMapper;
import com.zehong.system.domain.TLpgTraceBack;
import com.zehong.system.service.ITLpgTraceBackService;

/**
 * 气瓶追溯Service业务层处理
 * 
 * @author zehong
 * @date 2026-03-20
 */
@Service
public class TLpgTraceBackServiceImpl implements ITLpgTraceBackService 
{
    @Autowired
    private TLpgTraceBackMapper tLpgTraceBackMapper;

    /**
     * 查询气瓶追溯
     * 
     * @param traceId 气瓶追溯ID
     * @return 气瓶追溯
     */
    @Override
    public TLpgTraceBack selectTLpgTraceBackById(Long traceId)
    {
        return tLpgTraceBackMapper.selectTLpgTraceBackById(traceId);
    }

    /**
     * 查询气瓶追溯列表
     * 
     * @param tLpgTraceBack 气瓶追溯
     * @return 气瓶追溯
     */
    @Override
    public List<TLpgTraceBack> selectTLpgTraceBackList(TLpgTraceBack tLpgTraceBack)
    {
        return tLpgTraceBackMapper.selectTLpgTraceBackList(tLpgTraceBack);
    }

    /**
     * 新增气瓶追溯
     * 
     * @param tLpgTraceBack 气瓶追溯
     * @return 结果
     */
    @Override
    public int insertTLpgTraceBack(TLpgTraceBack tLpgTraceBack)
    {
        tLpgTraceBack.setCreateTime(DateUtils.getNowDate());
        return tLpgTraceBackMapper.insertTLpgTraceBack(tLpgTraceBack);
    }

    /**
     * 修改气瓶追溯
     * 
     * @param tLpgTraceBack 气瓶追溯
     * @return 结果
     */
    @Override
    public int updateTLpgTraceBack(TLpgTraceBack tLpgTraceBack)
    {
        return tLpgTraceBackMapper.updateTLpgTraceBack(tLpgTraceBack);
    }

    /**
     * 批量删除气瓶追溯
     * 
     * @param traceIds 需要删除的气瓶追溯ID
     * @return 结果
     */
    @Override
    public int deleteTLpgTraceBackByIds(Long[] traceIds)
    {
        return tLpgTraceBackMapper.deleteTLpgTraceBackByIds(traceIds);
    }

    /**
     * 删除气瓶追溯信息
     * 
     * @param traceId 气瓶追溯ID
     * @return 结果
     */
    @Override
    public int deleteTLpgTraceBackById(Long traceId)
    {
        return tLpgTraceBackMapper.deleteTLpgTraceBackById(traceId);
    }
}
