package com.hw.dms.service.impl;

import java.util.List;
import com.hw.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.dms.mapper.DmsBaseDeviceDepreciationMapper;
import com.hw.dms.domain.DmsBaseDeviceDepreciation;
import com.hw.dms.service.IDmsBaseDeviceDepreciationService;

/**
 * 设备折旧信息Service业务层处理
 * 
 * @author xins
 * @date 2023-12-27
 */
@Service
public class DmsBaseDeviceDepreciationServiceImpl implements IDmsBaseDeviceDepreciationService 
{
    @Autowired
    private DmsBaseDeviceDepreciationMapper dmsBaseDeviceDepreciationMapper;

    /**
     * 查询设备折旧信息
     * 
     * @param deviceDepreciationId 设备折旧信息主键
     * @return 设备折旧信息
     */
    @Override
    public DmsBaseDeviceDepreciation selectDmsBaseDeviceDepreciationByDeviceDepreciationId(Long deviceDepreciationId)
    {
        return dmsBaseDeviceDepreciationMapper.selectDmsBaseDeviceDepreciationByDeviceDepreciationId(deviceDepreciationId);
    }

    /**
     * 查询设备折旧信息列表
     * 
     * @param dmsBaseDeviceDepreciation 设备折旧信息
     * @return 设备折旧信息
     */
    @Override
    public List<DmsBaseDeviceDepreciation> selectDmsBaseDeviceDepreciationList(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation)
    {
        return dmsBaseDeviceDepreciationMapper.selectDmsBaseDeviceDepreciationList(dmsBaseDeviceDepreciation);
    }

    /**
     * 新增设备折旧信息
     * 
     * @param dmsBaseDeviceDepreciation 设备折旧信息
     * @return 结果
     */
    @Override
    public int insertDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation)
    {
        dmsBaseDeviceDepreciation.setCreateTime(DateUtils.getNowDate());
        return dmsBaseDeviceDepreciationMapper.insertDmsBaseDeviceDepreciation(dmsBaseDeviceDepreciation);
    }

    /**
     * 修改设备折旧信息
     * 
     * @param dmsBaseDeviceDepreciation 设备折旧信息
     * @return 结果
     */
    @Override
    public int updateDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation)
    {
        dmsBaseDeviceDepreciation.setUpdateTime(DateUtils.getNowDate());
        return dmsBaseDeviceDepreciationMapper.updateDmsBaseDeviceDepreciation(dmsBaseDeviceDepreciation);
    }

    /**
     * 批量删除设备折旧信息
     * 
     * @param deviceDepreciationIds 需要删除的设备折旧信息主键
     * @return 结果
     */
    @Override
    public int deleteDmsBaseDeviceDepreciationByDeviceDepreciationIds(Long[] deviceDepreciationIds)
    {
        return dmsBaseDeviceDepreciationMapper.deleteDmsBaseDeviceDepreciationByDeviceDepreciationIds(deviceDepreciationIds);
    }

    /**
     * 删除设备折旧信息信息
     * 
     * @param deviceDepreciationId 设备折旧信息主键
     * @return 结果
     */
    @Override
    public int deleteDmsBaseDeviceDepreciationByDeviceDepreciationId(Long deviceDepreciationId)
    {
        return dmsBaseDeviceDepreciationMapper.deleteDmsBaseDeviceDepreciationByDeviceDepreciationId(deviceDepreciationId);
    }
}
