package com.sy.coinage.workshop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sy.coinage.workshop.model.*;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * -I实时库存表Service
 */
public interface IStockService extends IService<Stock> {
    Stock getStock(Integer securitiesId, Integer wareId, Integer areaId);

    /**
     * 库存减少
     *
     * @param securitiesId
     * @param securities
     * @param areaId
     * @param wareId
     * @param wareCn
     * @param racketNum
     * @param boxNum
     * @param piecesTotal
     * @param checkBox
     * @return
     */

    void stockSub(Integer securitiesId, String securities, Integer areaId, Integer wareId, String wareCn,
                  Integer racketNum, Integer boxNum, Integer piecesTotal, Integer checkBox);

    /**
     * 库存增加
     *
     * @param securitiesId
     * @param securities
     * @param areaId
     * @param wareId
     * @param wareCn
     * @param racketNum
     * @param boxNum
     * @param piecesTotal
     * @param checkBox
     */
    void stockAdd(Integer securitiesId, String securities, Integer areaId, Integer wareId, String wareCn,
                  Integer racketNum, Integer boxNum, Integer piecesTotal, Integer checkBox);

    List<Stock> getStockList(Integer wareId, Integer securitiesId);

    Integer getEliminateStockTotal(Integer wareId, Integer securitiesId, Product product);

    Stock getLastStock(Integer wareId);

    Integer getProductStockTotal(Integer wareId, Integer securitiesId, Product product);
}
