package com.bonus.sgzb.material.mapper;

import com.bonus.sgzb.material.domain.RepairAuditDetails;
import com.bonus.sgzb.material.domain.RepairPart;
import com.bonus.sgzb.material.domain.RepairRecord;
import com.bonus.sgzb.material.domain.RepairTaskDetails;
import com.bonus.sgzb.material.vo.RepairAuditDetailsVO;
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 修试审核详细repair_apply_detailsMapper接口
 * 
 * @author bonus
 * @date 2023-12-16
 */
@Mapper
public interface RepairAuditDetailsMapper 
{
    /**
     * 查询修试审核详细repair_apply_details
     * 
     * @param id 修试审核详细repair_apply_details主键
     * @return 修试审核详细repair_apply_details
     */
    public RepairAuditDetails selectRepairAuditDetailsById(Long id);

    /**
     * 查询修试审核详细repair_apply_details列表
     * 
     * @param repairAuditDetails 修试审核详细repair_apply_details
     * @return 修试审核详细repair_apply_details集合
     */
    public List<RepairAuditDetails> selectRepairAuditDetailsList(RepairAuditDetails repairAuditDetails);

    /**
     * 新增修试审核详细repair_apply_details
     * 
     * @param repairAuditDetails 修试审核详细repair_apply_details
     * @return 结果
     */
    public int insertRepairAuditDetails(RepairAuditDetails repairAuditDetails);

    /**
     * 修改修试审核详细repair_apply_details
     * 
     * @param repairAuditDetails 修试审核详细repair_apply_details
     * @return 结果
     */
    public int updateRepairAuditDetails(RepairAuditDetails repairAuditDetails);

    /**
     * 删除修试审核详细repair_apply_details
     * 
     * @param id 修试审核详细repair_apply_details主键
     * @return 结果
     */
    public int deleteRepairAuditDetailsById(Long id);

    /**
     * 批量删除修试审核详细repair_apply_details
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteRepairAuditDetailsByIds(Long[] ids);

    /**
     * 查询
     * @param repairAuditDetails
     * @return
     */
    List<ScrapApplyDetailsVO> selectRepairQuestList(RepairAuditDetails repairAuditDetails);

    /**
     * 查询
     * @param taskId
     * @return
     */
    List<RepairAuditDetails> selectRepairAuditDetailsByTaskId(Long taskId);

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

    /**
     * 导出
     * @param bean
     * @return
     */
    List<RepairAuditDetailsVO> exportRepairQuestList(RepairAuditDetails bean);

    /**
     * 查询
     * @param taskId
     * @return
     */
    List<RepairAuditDetails> selectRepairInputByTaskId(Long taskId);

    /**
     * 查询
     * @param taskId
     * @return
     */
    List<RepairAuditDetails> selectScrapNumByTaskId(Long taskId);

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

    /**
     * 新增
     * @param repairTaskDetails
     * @return
     */
    int insertRepairDetails(RepairTaskDetails repairTaskDetails);

    /**
     * 查询
     * @param repairId
     * @return
     */
    Long getBackId(Long repairId);

    /**
     * 查询
     * @param taskId
     * @return
     */
    List<RepairAuditDetails> selectnotAuditByTaskId(Long taskId);

    List<RepairRecord> getRepairRecord(RepairAuditDetails repairAuditDetails);

    RepairAuditDetails getRepairId(RepairAuditDetails repairAuditDetails);

    List<RepairPart> getPartRecord(RepairAuditDetails bean);

    int updateRepairCost(@Param("inputDetails")RepairAuditDetails inputDetails, @Param("status") String status);

    List<String> getRepairApplyRecordId(Long repairId);

    void updateRecodeStatus(String id);
}
