package com.hzs.scm.trans.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.scm.trans.IcTransOutH;
import com.hzs.common.domain.scm.trans.ext.IcTransOutHExt;
import com.hzs.common.domain.scm.trans.ext.TransferOrderExt;
import com.hzs.scm.trans.param.TransferItemParam;
import com.hzs.scm.trans.param.TransferParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 调拨出库单表头 Mapper 接口
 * </p>
 *
 * @author hzs
 * @since 2023-12-04
 */
public interface IcTransOutHMapper extends BaseMapper<IcTransOutH> {

    /*
     * @description: 根据主键查询其他入库、其他入库明细
     * @author: sui q
     * @date: 2023/11/21 10:49
     * @param: null null
     **/
    IcTransOutHExt queryTransOutById(@Param("pkId") Long pkId, @Param("orderStatus") Integer orderStatus);

    /*
     * @description: 查询待入库的调拨订单,第一条带明细表，其他的没有明细表
     * @author: sui q
     * @date: 2023/11/23 13:53
     * @param: null null
     **/
    List<IcTransOutHExt> queryTransferOutToStoreByCondition(TransferParam transferParam);

    /*
     * @description: 查询会员端显示的采购入库单
     * @author: sui q
     * @date: 2023/11/25 9:55
     * @param: null null
     **/
    List<IcTransOutHExt> queryDisTransOutExtByCondition(TransferParam transferParam);

    /*
     * @description: 参照生成采购入库单，可能存在多个调拨订单生成一个入库单，支持1对多 多对1
     * @author: sui q
     * @date: 2023/11/21 17:47
     * @param: null null
     **/
    List<IcTransOutHExt> queryTransferOutByOrderItems(@Param("orderItemsParamList") List<TransferItemParam> orderItemsParamList);
}
