package com.aucma.dms.service.impl;

//import com.hw.common.core.utils.DateUtils;
//import com.aucma.dms.domain.DmsBaseDeviceSupplies;
//import com.aucma.dms.mapper.DmsBaseDeviceSuppliesMapper;
//import com.aucma.dms.service.IDmsBaseDeviceSuppliesService;

import com.aucma.common.utils.DateUtils;
import com.aucma.dms.domain.DmsBaseDeviceSupplies;
import com.aucma.dms.mapper.DmsBaseDeviceSuppliesMapper;
import com.aucma.dms.service.IDmsBaseDeviceSuppliesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 设备配套信息Service业务层处理
 * 
 * @author zangch
 * @date 2024-09-19
 */
@Service
public class DmsBaseDeviceSuppliesServiceImpl implements IDmsBaseDeviceSuppliesService
{
    @Autowired
    private DmsBaseDeviceSuppliesMapper dmsBaseDeviceSuppliesMapper;

    /**
     * 查询设备配套信息
     * 
     * @param deviceSuppliesId 设备配套信息主键
     * @return 设备配套信息
     */
    @Override
    public DmsBaseDeviceSupplies selectDmsBaseDeviceSuppliesByDeviceSuppliesId(Long deviceSuppliesId)
    {
        return dmsBaseDeviceSuppliesMapper.selectDmsBaseDeviceSuppliesByDeviceSuppliesId(deviceSuppliesId);
    }

    /**
     * 查询设备配套信息列表
     * 
     * @param dmsBaseDeviceSupplies 设备配套信息
     * @return 设备配套信息
     */
    @Override
    public List<DmsBaseDeviceSupplies> selectDmsBaseDeviceSuppliesList(DmsBaseDeviceSupplies dmsBaseDeviceSupplies)
    {
        return dmsBaseDeviceSuppliesMapper.selectDmsBaseDeviceSuppliesList(dmsBaseDeviceSupplies);
    }

    /**
     * 新增设备配套信息
     * 
     * @param dmsBaseDeviceSupplies 设备配套信息
     * @return 结果
     */
    @Override
    public int insertDmsBaseDeviceSupplies(DmsBaseDeviceSupplies dmsBaseDeviceSupplies)
    {
        dmsBaseDeviceSupplies.setCreateTime(DateUtils.getNowDate());
        return dmsBaseDeviceSuppliesMapper.insertDmsBaseDeviceSupplies(dmsBaseDeviceSupplies);
    }

    /**
     * 修改设备配套信息
     * 
     * @param dmsBaseDeviceSupplies 设备配套信息
     * @return 结果
     */
    @Override
    public int updateDmsBaseDeviceSupplies(DmsBaseDeviceSupplies dmsBaseDeviceSupplies)
    {
        dmsBaseDeviceSupplies.setUpdateTime(DateUtils.getNowDate());
        return dmsBaseDeviceSuppliesMapper.updateDmsBaseDeviceSupplies(dmsBaseDeviceSupplies);
    }

    /**
     * 批量删除设备配套信息
     * 
     * @param deviceSuppliesIds 需要删除的设备配套信息主键
     * @return 结果
     */
    @Override
    public int deleteDmsBaseDeviceSuppliesByDeviceSuppliesIds(Long[] deviceSuppliesIds)
    {
        return dmsBaseDeviceSuppliesMapper.deleteDmsBaseDeviceSuppliesByDeviceSuppliesIds(deviceSuppliesIds);
    }

    /**
     * 删除设备配套信息信息
     * 
     * @param deviceSuppliesId 设备配套信息主键
     * @return 结果
     */
    @Override
    public int deleteDmsBaseDeviceSuppliesByDeviceSuppliesId(Long deviceSuppliesId)
    {
        return dmsBaseDeviceSuppliesMapper.deleteDmsBaseDeviceSuppliesByDeviceSuppliesId(deviceSuppliesId);
    }

    @Override
    public List<DmsBaseDeviceSupplies> selectDmsBaseDeviceSuppliesListByDeviceId(Long deviceId)
    {
        return dmsBaseDeviceSuppliesMapper.selectDmsBaseDeviceSuppliesListByDeviceId(deviceId);
    }
}
