package com.bonus.material.scrap.mapper;

import com.bonus.material.repair.domain.RepairPartDetails;
import com.bonus.material.scrap.domain.ScrapReason;

import java.util.List;

/**
 * 报废原因管理Mapper接口
 * 
 * @author hongchao
 * @date 2024-01-07
 */
public interface ScrapReasonMapper
{

    /**
     * 查询二级类型下拉框列表
     *
     * @param scrapReason 查询二级类型下拉框列表
     * @return 查询二级类型下拉框列表
     */
    List<ScrapReason> levelTwolist(ScrapReason scrapReason);

    /**
     * 查询三级类型下拉框列表
     *
     * @param scrapReason 查询三级类型下拉框列表
     * @return 查询三级类型下拉框列表
     */
    List<ScrapReason> levelThreelist(ScrapReason scrapReason);


    /**
     * 查询报废原因列表
     *
     * @param scrapReason 报废原因
     * @return 报废原因
     */
    List<ScrapReason> selectScrapReasonList(ScrapReason scrapReason);

    /**
     * 新增报废原因
     *
     * @param scrapReason 新增报废原因
     * @return 结果
     */
    int insertScrapReasonInfo(ScrapReason scrapReason);

    /**
     * 查询报废原因
     * @param id
     * @return
     */
    ScrapReason selectScrapReasonById(Long id);

    /**
     * 修改报废原因
     *
     * @param scrapReason 修改报废原因
     * @return 结果
     */
    int updateScrapReasonInfo(ScrapReason scrapReason);

    /**
     * 删除报废原因
     *
     * @param scrapReason 删除报废原因
     * @return 结果
     */
    int deleteScrapReasonInfo(ScrapReason scrapReason);

    /**
     * 查询报废原因列表
     * @param scrapReason
     * @return
     */
    List<ScrapReason> getList(ScrapReason scrapReason);

    /**
     * 查询维修记录
     * @param scrapReason
     * @return
     */
    List<RepairPartDetails> getRepairRecord(ScrapReason scrapReason);

    int updateRepairRecord(ScrapReason scrapReason);
}
