package com.djhk.uav.equ.service.impl;

import com.djhk.uav.equ.domain.EquModelParam;
import com.djhk.uav.equ.domain.EquParamDefine;
import com.djhk.uav.equ.domain.EquType;
import com.djhk.uav.equ.mapper.EquTypeMapper;
import com.djhk.uav.equ.service.IEquTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 设备类别Service业务层处理
 * 
 * @author huangqingguo
 * @date 2023-06-02
 */
@Service
public class EquTypeServiceImpl implements IEquTypeService
{
    @Autowired
    private EquTypeMapper equTypeMapper;

    /**
     * 查询设备类别
     * 
     * @param typeId 设备类别主键
     * @return 设备类别
     */
    @Override
    public EquType selectEquTypeByTypeId(String typeId)
    {
        return equTypeMapper.selectEquTypeByTypeId(typeId);
    }

    /**
     * 查询设备类别列表
     * 
     * @param equType 设备类别
     * @return 设备类别
     */
    @Override
    public List<EquType> selectEquTypeList(EquType equType)
    {
        return equTypeMapper.selectEquTypeList(equType);
    }

    /**
     * 新增设备类别
     * 
     * @param equType 设备类别
     * @return 结果
     */
    @Override
    public int insertEquType(EquType equType)
    {
        return equTypeMapper.insertEquType(equType);
    }

    /**
     * 修改设备类别
     * 
     * @param equType 设备类别
     * @return 结果
     */
    @Override
    public int updateEquType(EquType equType)
    {
        return equTypeMapper.updateEquType(equType);
    }

    /**
     * 批量删除设备类别
     * 
     * @param typeIds 需要删除的设备类别主键
     * @return 结果
     */
    @Override
    public int deleteEquTypeByTypeIds(String[] typeIds)
    {
        return equTypeMapper.deleteEquTypeByTypeIds(typeIds);
    }

    /**
     * 删除设备类别信息
     * 
     * @param typeId 设备类别主键
     * @return 结果
     */
    @Override
    public int deleteEquTypeByTypeId(String typeId)
    {
        return equTypeMapper.deleteEquTypeByTypeId(typeId);
    }

    @Override
    public List<EquType> queryEquType() {
        return equTypeMapper.selectEquType();
    }

    @Override
    public List<EquParamDefine> getEqumodelDefine(Long typeId) {
        return equTypeMapper.getEqumodelDefine(typeId);
    }

    @Override
    public List<EquModelParam> getEqumodelParam(Long modelId) {
        return equTypeMapper.getEqumodelParam(modelId);
    }


}
