package com.bonus.sgzb.material.mapper;

import com.bonus.sgzb.material.domain.BmNoticeInfo;
import com.bonus.sgzb.base.api.domain.MachinePart;
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
import com.bonus.sgzb.material.domain.PurchaseInput;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 新购验收任务purchase_check_infoMapper接口
 *
 * @author bonus
 * @date 2023-12-10
 */
@Mapper
public interface PurchaseCheckInfoMapper {
    /**
     * 查询新购验收任务purchase_check_info
     *
     * @param taskId 新购验收任务purchase_check_info主键
     * @return 新购验收任务purchase_check_info
     */
    public PurchaseCheckInfo selectPurchaseCheckInfoByTaskId(Long taskId);

    /**
     * 查询新购验收任务purchase_check_info列表
     *
     * @param purchaseCheckInfo 新购验收任务purchase_check_info
     * @return 新购验收任务purchase_check_info集合
     */
    public List<PurchaseCheckInfo> selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfo);

    /**
     * 新增新购验收任务purchase_check_info
     *
     * @param purchaseCheckInfo 新购验收任务purchase_check_info
     * @return 结果
     */
    public int insertPurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo);

    /**
     * 修改新购验收任务purchase_check_info
     *
     * @param purchaseCheckInfo 新购验收任务purchase_check_info
     * @return 结果
     */
    public int updatePurchaseCheckInfo(PurchaseCheckInfo purchaseCheckInfo);

    /**
     * 删除新购验收任务purchase_check_info
     *
     * @param taskId 新购验收任务purchase_check_info主键
     * @return 结果
     */
    public int deletePurchaseCheckInfoByTaskId(Long taskId);

    /**
     * 批量删除新购验收任务purchase_check_info
     *
     * @param taskIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePurchaseCheckInfoByTaskIds(Long[] taskIds);

    /**
     * 查询新购入库任务列表
     *
     * @param taskId * @param type 1-验收，2-入库
     * @return
     */
    String selectTypeNameByTaskId(@Param("taskId") Long taskId, @Param("type") String type);

    /**
     * 插入
     *
     * @param bmNoticeInfo
     * @return
     */
    int insertBmNoticeInfo(BmNoticeInfo bmNoticeInfo);

    /**
     * 查询
     *
     * @param purchaseCheckInfo
     * @return
     */
    List<PurchaseCheckInfo> selectPutInListList(PurchaseCheckInfo purchaseCheckInfo);

    /**
     * 新购验收
     *
     * @param purchaseCheckInfo
     * @return
     */
    List<PurchaseCheckInfo> exportList(PurchaseCheckInfo purchaseCheckInfo);

    /**
     * 新购入库导出
     *
     * @param purchaseCheckInfo
     * @return
     */
    List<PurchaseInput> putInExportList(PurchaseCheckInfo purchaseCheckInfo);

    /**
     * 查询
     *
     * @param purchaseCheckInfo
     * @return
     */
    List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo);

    /**
     * 查询 类型名称和管理类型
     *
     * @param taskId
     * @return
     */
    List<PurchaseCheckInfo> selectTypeNameAndManageTypeByTaskId(Long taskId);

    /**
     * 查询成套机具明细
     *
     * @param purchaseCheckInfo
     * @return
     */
    List<MachinePart> getWholeSetDetails(PurchaseCheckInfo purchaseCheckInfo);
}
