package com.ktg.iscs.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ktg.iscs.domain.IsMaterialsCabinet;
import com.ktg.iscs.domain.dto.materials.BindingMaterialsDTO;
import com.ktg.iscs.domain.vo.cabinet.IsMaterialsCabinetVO;

import java.util.List;

/**
 * 物资柜Service接口
 *
 * @author cgj
 * @date 2024-11-08
 */
public interface IIsMaterialsCabinetService extends IService<IsMaterialsCabinet>
{
    /**
     * 查询物资柜
     *
     * @param cabinetId 物资柜主键
     * @return 物资柜
     */
    IsMaterialsCabinet selectIsMaterialsCabinetByCabinetId(Long cabinetId);

    /**
     * 查询物资柜列表
     *
     * @param isMaterialsCabinet 物资柜
     * @return 物资柜集合
     */
    List<IsMaterialsCabinet> selectIsMaterialsCabinetList(IsMaterialsCabinet isMaterialsCabinet);

    /**
     * 新增物资柜
     *
     * @param isMaterialsCabinet 物资柜
     * @return 结果
     */
    int insertIsMaterialsCabinet(IsMaterialsCabinet isMaterialsCabinet);

    /**
     * 修改物资柜
     *
     * @param isMaterialsCabinet 物资柜
     * @return 结果
     */
    int updateIsMaterialsCabinet(IsMaterialsCabinet isMaterialsCabinet);

    /**
     * 批量删除物资柜
     *
     * @param cabinetIds 需要删除的物资柜主键集合
     * @return 结果
     */
    int deleteIsMaterialsCabinetByCabinetIds(String cabinetIds);

    /**
     * 删除物资柜信息
     *
     * @param cabinetId 物资柜主键
     * @return 结果
     */
    int deleteIsMaterialsCabinetByCabinetId(Long cabinetId);

    /**
     * 查询物资柜列表
     *
     * @param isMaterialsCabinet 物资柜
     * @return 物资柜集合
     */
    Page<IsMaterialsCabinetVO> getIsMaterialsCabinetPage(Page<IsMaterialsCabinet> page, IsMaterialsCabinet isMaterialsCabinet);

    Boolean updateMaterialsBindingRemove(BindingMaterialsDTO dto);

    IsMaterialsCabinet getCabinetByCode(String cabinetCode);
}
