package com.ktg.iscs.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.ktg.iscs.domain.IsMaterials;
import com.ktg.iscs.domain.dto.hardwareApi.LoanParamDTO;
import com.ktg.iscs.domain.dto.materials.MaterialBindingDTO;
import com.ktg.iscs.domain.dto.materials.MaterialsPageDTO;
import com.ktg.iscs.domain.vo.hardwareMaterialApi.CheckMaterialsDateVO;
import com.ktg.iscs.domain.vo.materials.ImportMaterialsVO;
import com.ktg.iscs.domain.vo.materials.MaterialsPageVO;

import java.util.List;

/**
 * 物资Service接口
 *
 * @author cgj
 * @date 2024-11-08
 */
public interface IIsMaterialsService extends IService<IsMaterials>
{
    /**
     * 查询物资
     *
     * @param materialsId 物资主键
     * @return 物资
     */
    IsMaterials selectIsMaterialsByMaterialsId(Long materialsId);

    /**
     * 查询物资列表
     *
     * @param isMaterials 物资
     * @return 物资集合
     */
    List<IsMaterials> selectIsMaterialsList(IsMaterials isMaterials);

    /**
     * 新增物资
     *
     * @param isMaterials 物资
     * @return 结果
     */
    int insertIsMaterials(IsMaterials isMaterials);

    /**
     * 修改物资
     *
     * @param isMaterials 物资
     * @return 结果
     */
    int updateIsMaterials(IsMaterials isMaterials);

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

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

    /**
     * 分页
     * @return
     */
    Page<MaterialsPageVO> getIsMaterialsPage(Page<IsMaterials> page, MaterialsPageDTO dto) throws JsonProcessingException;

    String updateIsMaterialById(LoanParamDTO dto);

    String importMaterials(List<ImportMaterialsVO> itemList, boolean updateSupport, String operName) throws JsonProcessingException;

    Boolean updateMaterialsBinding(MaterialBindingDTO dto);

    List<MaterialsPageVO> getExMaterials(MaterialsPageDTO dto);

    List<CheckMaterialsDateVO> getCheckMaterialsByCabinetId(Long cabinetId);

    List<IsMaterials> getMaterialListByRfid(List<String> rfidList);

}
