package com.prolog.upcloud.base.wh.operate.dao;

import com.prolog.framework.dao.mapper.BaseMapper;
import com.prolog.upcloud.base.wh.operate.model.WmsReplenishD;
import com.prolog.upcloud.base.wh.operate.vo.ReplenishListVO;
import com.prolog.upcloud.base.wh.operate.vo.ReplenishQueryVO;
import com.prolog.upcloud.base.wh.operate.vo.ReplenishUnshelveVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wujunjie
 * @date 2021-05-14
 */
@Mapper
public interface WmsReplenishDMapper extends BaseMapper<WmsReplenishD> {
    /**
     * 查询补货列表
     *
     * @return 补货列表
     */
    List<ReplenishListVO> selectReplenishList(
            @Param("query") ReplenishQueryVO queryVO,
            @Param("enterpriseId") String enterpriseId
    );

    List<ReplenishUnshelveVO> getReplenishUnshelveList(
            @Param("enterpriseId") String enterpriseId,
            @Param("warehouseId") String warehouseId,
            @Param("dcId") String dcId,
            @Param("conditions") String[] conditions,
            @Param("userId") String userId,
            @Param("businessType") String businessType
    );

    List<WmsReplenishD> findByDetailId(
            @Param("enterpriseId") String enterpriseId,
            @Param("list") ArrayList<String> list
    );

    void updateBatch(@Param("list") List<WmsReplenishD> wmsReplenishDList);
}
