package com.bonus.sgzb.material.mapper;

import com.bonus.sgzb.base.api.domain.BackApplyInfo;
import com.bonus.sgzb.material.domain.RepairAuditDetails;
import com.bonus.sgzb.material.domain.RepairRecord;
import com.bonus.sgzb.material.domain.ScrapApplyDetails;
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 报废任务详细scrap_apply_detailsMapper接口
 * 
 * @author bonus
 * @date 2023-12-15
 */
@Mapper
public interface ScrapApplyDetailsMapper 
{
    /**
     * 查询报废任务详细scrap_apply_details
     * 
     * @param id 报废任务详细scrap_apply_details主键
     * @return 报废任务详细scrap_apply_details
     */
    public ScrapApplyDetails selectScrapApplyDetailsById(Long id);

    /**
     * 查询报废任务详细scrap_apply_details列表
     * 
     * @param scrapApplyDetails 报废任务详细scrap_apply_details
     * @return 报废任务详细scrap_apply_details集合
     */
    public List<ScrapApplyDetailsVO> selectScrapApplyDetailsList(ScrapApplyDetails scrapApplyDetails);

    /**
     * 新增报废任务详细scrap_apply_details
     * 
     * @param scrapApplyDetails 报废任务详细scrap_apply_details
     * @return 结果
     */
    public int insertScrapApplyDetails(ScrapApplyDetails scrapApplyDetails);

    /**
     * 修改报废任务详细scrap_apply_details
     * 
     * @param scrapApplyDetails 报废任务详细scrap_apply_details
     * @return 结果
     */
    public int updateScrapApplyDetails(ScrapApplyDetails scrapApplyDetails);

    /**
     * 删除报废任务详细scrap_apply_details
     * 
     * @param id 报废任务详细scrap_apply_details主键
     * @return 结果
     */
    public int deleteScrapApplyDetailsById(Long id);

    /**
     * 批量删除报废任务详细scrap_apply_details
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteScrapApplyDetailsByIds(Long[] ids);

    /**
     *查询ScrapApplyDetails
     * @param scrapApplyDetails
     * @return
     */
    List<ScrapApplyDetails> selectScrapAuditList(ScrapApplyDetails scrapApplyDetails);

    /**
     *查询ScrapApplyDetails
     * @param taskId
     * @return
     */
    List<ScrapApplyDetails> selectScrapDetailsByTaskId(Long taskId);

    /**
     *修改
     * @param maId
     * @return
     */
    int updateMachine(Long maId);

    /**
     *查询
     * @param taskId
     * @return
     */
    String selectTypeNameByTaskId(Long taskId);

    /**
     *导出
     * @param bean
     * @return
     */
    List<ScrapApplyDetailsVO> exportScrapApplyDetailsList(ScrapApplyDetails bean);

    /**
     *查询
     * @param taskId
     * @return
     */
    List<ScrapApplyDetails> selectnotScrapByTaskId(Long taskId);

    /**
     *添加
     * @param bean
     * @return
     */
    int addBackDetails(ScrapApplyDetails bean);

    /**
     *查询
     * @param parentId
     * @return
     */
    BackApplyInfo getBackApplyInfo(int parentId);

    /**
     *添加
     * @param backApplyInfo
     * @return
     */
    int addBackInfo(BackApplyInfo backApplyInfo);

    /**
     *查询RepairAuditDetails
     * @param parentId
     * @return
     */
    RepairAuditDetails getRepairAudit(Long parentId);

    /**
     *添加
     * @param details
     * @return
     */
    int addRepaieAudit(RepairAuditDetails details);

    /**
     *修改
     * @param bean
     * @return
     */
    int updateStatus(ScrapApplyDetails bean);

    String getRepairId(ScrapApplyDetails scrapApplyDetails);

    RepairAuditDetails getByRepairId(String repairId);

    List<RepairRecord> getRepairRecord(RepairAuditDetails bean);

    String getFileUrl(String s);

    List<RepairRecord> getGyoupRepairRecord(RepairAuditDetails byRepairId);

    /**
     * 查询预报废申请列表
     * @param scrapApplyDetails 包含预报废申请详情的实体对象，用于筛选申请列表的条件。
     * @return
     */
    List<ScrapApplyDetailsVO> getScrapApplyList(ScrapApplyDetails scrapApplyDetails);

    List<ScrapApplyDetailsVO> scrapTaskReviewList(ScrapApplyDetails scrapApplyDetails);
}
