package com.fjhx.service.stock;

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

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

/**
 * <p>
 * 出入库流水记录 服务类
 * </p>
 *
 * @author ${author}
 * @since 2022-11-24
 */
public interface StockJournalService extends BaseService<StockJournal> {

    Page<StockJournal> getPage(Map<String, String> condition);

    void add(StockJournalVo stockJournalVo);

    void edit(StockJournalVo stockJournalVo);

    void delete(StockJournalVo stockJournalVo);

    /**
     * 添加流水记录
     *
     * @param type           出入库类型 0出库 1入库
     * @param detailsType    详细类型
     * @param goodsId        物品id
     * @param warehouseId    仓库id
     * @param changeQuantity 变更数量
     * @param remarks        备注
     */
    void add(Integer type, Integer detailsType, Long goodsId, Long warehouseId, BigDecimal changeQuantity, String remarks);

}
