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.TGasAbnormalityMapper;
import com.zehong.system.domain.TGasAbnormality;
import com.zehong.system.service.ITGasAbnormalityService;

/**
 * 气瓶异常分析Service业务层处理
 * 
 * @author zehong
 * @date 2026-03-19
 */
@Service
public class TGasAbnormalityServiceImpl implements ITGasAbnormalityService 
{
    @Autowired
    private TGasAbnormalityMapper tGasAbnormalityMapper;

    /**
     * 查询气瓶异常分析
     * 
     * @param abnormalityId 气瓶异常分析ID
     * @return 气瓶异常分析
     */
    @Override
    public TGasAbnormality selectTGasAbnormalityById(Long abnormalityId)
    {
        return tGasAbnormalityMapper.selectTGasAbnormalityById(abnormalityId);
    }

    /**
     * 查询气瓶异常分析列表
     * 
     * @param tGasAbnormality 气瓶异常分析
     * @return 气瓶异常分析
     */
    @Override
    public List<TGasAbnormality> selectTGasAbnormalityList(TGasAbnormality tGasAbnormality)
    {
        return tGasAbnormalityMapper.selectTGasAbnormalityList(tGasAbnormality);
    }

    /**
     * 新增气瓶异常分析
     * 
     * @param tGasAbnormality 气瓶异常分析
     * @return 结果
     */
    @Override
    public int insertTGasAbnormality(TGasAbnormality tGasAbnormality)
    {
        tGasAbnormality.setCreateTime(DateUtils.getNowDate());
        return tGasAbnormalityMapper.insertTGasAbnormality(tGasAbnormality);
    }

    /**
     * 修改气瓶异常分析
     * 
     * @param tGasAbnormality 气瓶异常分析
     * @return 结果
     */
    @Override
    public int updateTGasAbnormality(TGasAbnormality tGasAbnormality)
    {
        return tGasAbnormalityMapper.updateTGasAbnormality(tGasAbnormality);
    }

    /**
     * 批量删除气瓶异常分析
     * 
     * @param abnormalityIds 需要删除的气瓶异常分析ID
     * @return 结果
     */
    @Override
    public int deleteTGasAbnormalityByIds(Long[] abnormalityIds)
    {
        return tGasAbnormalityMapper.deleteTGasAbnormalityByIds(abnormalityIds);
    }

    /**
     * 删除气瓶异常分析信息
     * 
     * @param abnormalityId 气瓶异常分析ID
     * @return 结果
     */
    @Override
    public int deleteTGasAbnormalityById(Long abnormalityId)
    {
        return tGasAbnormalityMapper.deleteTGasAbnormalityById(abnormalityId);
    }
}
