package com.fuint.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.common.dto.MaterialSearchDto;
import com.fuint.common.vo.MaterialVo;
import com.fuint.framework.pagination.PaginationRequest;
import com.fuint.framework.pagination.PaginationResponse;
import com.fuint.framework.web.PageResult;
import com.fuint.repository.model.MtMaterial;
import com.fuint.framework.exception.BusinessCheckException;
import java.util.List;
import java.util.Map;

/**
 * 材料表业务接口
 *
 * Created by PZG
 * CopyRight https://www.fuint.cn
 */
public interface MaterialService extends IService<MtMaterial> {

    /**
     * 分页查询列表
     *
     * @param paginationRequest
     * @return
     */
    PaginationResponse<MtMaterial> queryMaterialListByPagination(PaginationRequest paginationRequest) throws BusinessCheckException;

    /**
     * 添加材料表
     *
     * @param  mtMaterial
     * @throws BusinessCheckException
     * @return
     */
    MtMaterial addMaterial(MtMaterial mtMaterial) throws BusinessCheckException;

    /**
     * 根据ID获取材料表信息
     *
     * @param id ID
     * @throws BusinessCheckException
     * @return
     */
    MtMaterial queryMaterialById(Long id) throws BusinessCheckException;

    /**
     * 根据ID删除材料表
     *
     * @param id ID
     * @param operator 操作人
     * @throws BusinessCheckException
     * @return
     */
    void deleteMaterial(Long id, String operator) throws BusinessCheckException;

    /**
     * 更新材料表
     * @param  mtMaterial
     * @throws BusinessCheckException
     * @return
     * */
    MtMaterial updateMaterial(MtMaterial mtMaterial) throws BusinessCheckException;

    /**
     * 根据条件搜索材料表
     *
     * @param params 查询参数
     * @throws BusinessCheckException
     * @return
     * */
    List<MtMaterial> queryMaterialListByParams(Map<String, Object> params) throws BusinessCheckException;

    /**
     * 分页查询数据
     * @param materialSearchDto 参数体
     * @return 结果
     */
	PageResult<MaterialVo> selectMaterialList(MaterialSearchDto materialSearchDto);
}
