package com.fuint.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.common.dto.MaterialTypeSearchDto;
import com.fuint.common.vo.MaterialTypeVo;
import com.fuint.framework.pagination.PaginationRequest;
import com.fuint.framework.pagination.PaginationResponse;
import com.fuint.framework.web.PageResult;
import com.fuint.framework.web.ResponseObject;
import com.fuint.repository.model.MtMaterialType;
import com.fuint.framework.exception.BusinessCheckException;
import java.util.List;
import java.util.Map;

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

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

    /**
     * 添加材料类型表
     *
     * @param  mtMaterialType
     * @throws BusinessCheckException
     * @return
     */
    ResponseObject addMaterialType(MtMaterialType mtMaterialType) throws BusinessCheckException;

    /**
     * 根据ID获取材料类型表信息
     *
     * @param id ID
     * @throws BusinessCheckException
     * @return
     */
    MtMaterialType queryMaterialTypeById(Long id) throws BusinessCheckException;

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

    /**
     * 更新材料类型表
     * @param  mtMaterialType
     * @throws BusinessCheckException
     * @return
     * */
    MtMaterialType updateMaterialType(MtMaterialType mtMaterialType) throws BusinessCheckException;

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

    /**
     * 材料类型表列表查询
     *
     * @return 材料类型表列表
     */
	PageResult<MaterialTypeVo> selectMaterialTypeList(MaterialTypeSearchDto materialTypeSearchDto);

    /**
     * 根据id删除材料类型数据
     *
     * @return 结果
     */
    ResponseObject deleteHandler(Long id) throws BusinessCheckException;
}
