package com.czg.service.product.mapper;

import com.czg.product.dto.ConsStockFlowDTO;
import com.czg.product.entity.ConsStockFlow;
import com.czg.product.param.ConsInfoParam;
import com.czg.product.vo.ConsStatisticsVo;
import com.czg.product.vo.ShopVendorBillRecordVO;
import com.mybatisflex.core.BaseMapper;
import jakarta.validation.constraints.NotEmpty;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 耗材库存变动记录
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 1.0 2025-02-21
 */
@Mapper
public interface ConsStockFlowMapper extends BaseMapper<ConsStockFlow> {
    ConsStatisticsVo getConsStatistics(ConsInfoParam param);

    List<ShopVendorBillRecordVO> selectByVendorId(@Param("shopId") Long shopId, @Param("vendorId") Integer vendorId, @Param("key") String key);

    List<ConsStockFlow> selectUnPaid(@Param("shopId") Long shopId, @Param("vendorIds") @NotEmpty List<Long> vendorIds);

    List<ConsStockFlowDTO> findConsStockFlowPage(@Param("shopId") Long shopId, @Param("inOutType") String inOutType, @Param("inOutItem") String inOutItem, @Param("conId") Long conId);
}
