package com.lframework.xingyun.sc.service.stock;

import com.lframework.starter.web.resp.PageResult;
import com.lframework.starter.web.service.BaseMpService;
import com.lframework.xingyun.core.dto.stock.ProductStockChangeDto;
import com.lframework.xingyun.sc.entity.ProductStock;
import com.lframework.xingyun.sc.vo.stock.AddProductStockVo;
import com.lframework.xingyun.sc.vo.stock.QueryProductStockVo;
import com.lframework.xingyun.sc.vo.stock.SubProductStockVo;
import java.util.List;

public interface ProductStockService extends BaseMpService<ProductStock> {

  /**
   * 查询列表
   *
   * @param pageIndex
   * @param pageSize
   * @param vo
   * @return
   */
  PageResult<ProductStock> query(Integer pageIndex, Integer pageSize, QueryProductStockVo vo);

  /**
   * 查询列表
   *
   * @param vo
   * @return
   */
  List<ProductStock> query(QueryProductStockVo vo);

  /**
   * 根据商品ID、仓库ID查询
   *
   * @param productId
   * @param scId
   * @return
   */
  ProductStock getByProductIdAndScId(String productId, String scId);

  ProductStock getByProductId(String productId);

  /**
   * 根据商品ID、仓库ID查询
   *
   * @param productIds
   * @param scId
   * @return
   */
  List<ProductStock> getByProductIdsAndScId(List<String> productIds, String scId,
      Integer productType);

  List<ProductStock> getByProductIds(List<String> productIds, Integer productType);

  /**
   * 入库
   *
   * @param vo
   */
  ProductStockChangeDto addStock(AddProductStockVo vo);

  /**
   * 出库
   *
   * @param vo
   */
  ProductStockChangeDto subStock(SubProductStockVo vo);



}
