package com.fjhx.service.stock;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.base.BaseService;
import com.fjhx.entity.stock.Stock;
import com.fjhx.params.stock.StockVo;

import java.math.BigDecimal;
import java.util.Map;

/**
 * <p>
 * 库存 服务类
 * </p>
 *
 * @author ${author}
 * @since 2022-11-24
 */
public interface StockService extends BaseService<Stock> {

    Page<Stock> getPage(Map<String, Object> condition);

    void add(StockVo stockVo);

    void edit(StockVo stockVo);

    void delete(StockVo stockVo);

    /**
     * 变更数量
     * 入库正数，出库负数
     *
     * @param goodsId     物品id
     * @param warehouseId 仓库id
     * @param quantity    数量
     * @param detailsType 出入库详细类型
     * @param remarks     备注
     */
    void changeQuantity(Long goodsId, Long warehouseId, BigDecimal quantity, Integer detailsType, String remarks);

}
