package com.zehong.system.service.impl;

import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TLpgVehicleInfoMapper;
import com.zehong.system.domain.TLpgVehicleInfo;
import com.zehong.system.service.ITLpgVehicleInfoService;

import javax.servlet.http.HttpServletResponse;

/**
 * 液化石油车辆信息Service业务层处理
 * 
 * @author zehong
 * @date 2024-07-19
 */
@Service
public class TLpgVehicleInfoServiceImpl implements ITLpgVehicleInfoService 
{
    @Autowired
    private TLpgVehicleInfoMapper tLpgVehicleInfoMapper;

    /**
     * 查询液化石油车辆信息
     * 
     * @param vehicleId 液化石油车辆信息ID
     * @return 液化石油车辆信息
     */
    @Override
    public TLpgVehicleInfo selectTLpgVehicleInfoById(Long vehicleId)
    {
        return tLpgVehicleInfoMapper.selectTLpgVehicleInfoById(vehicleId);
    }

    /**
     * 查询液化石油车辆信息列表
     * 
     * @param tLpgVehicleInfo 液化石油车辆信息
     * @return 液化石油车辆信息
     */
    @Override
    public List<TLpgVehicleInfo> selectTLpgVehicleInfoList(TLpgVehicleInfo tLpgVehicleInfo)
    {
        return tLpgVehicleInfoMapper.selectTLpgVehicleInfoList(tLpgVehicleInfo);
    }

    /**
     * 新增液化石油车辆信息
     * 
     * @param tLpgVehicleInfo 液化石油车辆信息
     * @return 结果
     */
    @Override
    public int insertTLpgVehicleInfo(TLpgVehicleInfo tLpgVehicleInfo)
    {
        return tLpgVehicleInfoMapper.insertTLpgVehicleInfo(tLpgVehicleInfo);
    }

    /**
     * 修改液化石油车辆信息
     * 
     * @param tLpgVehicleInfo 液化石油车辆信息
     * @return 结果
     */
    @Override
    public int updateTLpgVehicleInfo(TLpgVehicleInfo tLpgVehicleInfo)
    {
        return tLpgVehicleInfoMapper.updateTLpgVehicleInfo(tLpgVehicleInfo);
    }

    /**
     * 批量删除液化石油车辆信息
     * 
     * @param vehicleIds 需要删除的液化石油车辆信息ID
     * @return 结果
     */
    @Override
    public int deleteTLpgVehicleInfoByIds(Long[] vehicleIds)
    {
        return tLpgVehicleInfoMapper.deleteTLpgVehicleInfoByIds(vehicleIds);
    }

    /**
     * 删除液化石油车辆信息信息
     * 
     * @param vehicleId 液化石油车辆信息ID
     * @return 结果
     */
    @Override
    public int deleteTLpgVehicleInfoById(Long vehicleId)
    {
        return tLpgVehicleInfoMapper.deleteTLpgVehicleInfoById(vehicleId);
    }

    /**
     * 导入
     * @param XmbhList data
     * @param updateSupport 是否更新
     * @param response res
     * @return r
     */
    @Override
    public void importLpgSafeCheckRecordInfo(List<TLpgVehicleInfo> XmbhList, boolean updateSupport, HttpServletResponse response) {

        if(XmbhList.size() > 0) {
            tLpgVehicleInfoMapper.insertBatch(XmbhList);
        }
    }
}
