package com.hzs.scm.purchase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.scm.purchase.IcPurchaseInB;
import com.hzs.common.domain.scm.purchase.ext.IcPurchaseInBExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 采购订单明细 Mapper 接口
 * </p>
 *
 * @author hzs
 * @since 2023-11-17
 */
public interface IcPurchaseInBMapper extends BaseMapper<IcPurchaseInB> {

    /*
     * @description: 根据主表主键查询采购入库单明细
     * @author: sui q
     * @date: 2023/11/25 15:02
     * @param: null null
     **/
    List<IcPurchaseInBExt> queryPurchaseInbByPk(@Param("icPurchaseInbList") List<IcPurchaseInBExt> icPurchaseInbList);

    /*
     * @description: 审核通过，更新累计入库数量，用于分批退货
     * @author: sui q
     * @date: 2024/4/10 16:19
     * @param: null null
     **/
    void updatePurchaseInbByPk(@Param("icPurchaseInbList") List<IcPurchaseInBExt> icPurchaseInbList);

    /*
     * @description:
     * @author: sui q
     * @date: 2024/4/10 16:43
     * @param: null null
     **/
    void mergePurchaseInBiByPurchaseBack(@Param("icPurchaseInbList") List<IcPurchaseInBExt> icPurchaseInbList);

    /*
     * @description: 删除入库单子表明细
     * @author: sui q
     * @date: 2023/11/23 10:38
     * @param: null null
     **/
    void deletePurchaseInbByList(@Param("purchaseInbList") List<IcPurchaseInB> purchaseInbList);
}
