package cn.ysk.cashier.service;

import cn.ysk.cashier.dto.rabbit.StockRecordMsg;
import cn.ysk.cashier.pojo.product.TbProductStockOperate;
import cn.ysk.cashier.vo.ProductStockOperateVO;
import cn.ysk.cashier.dto.product.OutAndOnDto;
import cn.ysk.cashier.dto.product.TbProductStockOperateDto;
import cn.ysk.cashier.dto.product.TbProductStockOperateQueryCriteria;

import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
* @website https://eladmin.vip
* @description 服务接口
* @author lyf
* @date 2024-01-25
**/
public interface TbProductStockOperateService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @return Map<String,Object>
    */
    Map<String,Object> queryAllPage(TbProductStockOperateQueryCriteria criteria);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<TbProductStockOperateDto>
    */
    List<TbProductStockOperate> queryAll(TbProductStockOperateQueryCriteria criteria);

    /**
     * 作废
     */
    void nullify(Integer id);

    /**
     * 根据ID查询
     * @param id ID
     * @return TbProductStockOperateDto
     */
    ProductStockOperateVO findById(Integer id);

    /**
    * 创建
    * @param resources /
    * @return TbProductStockOperateDto
    */
    TbProductStockOperateDto create(TbProductStockOperate resources);


    OutAndOnDto  createOutAndONOperate(OutAndOnDto resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(TbProductStockOperate resources);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(Integer[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<TbProductStockOperate> all, HttpServletResponse response) throws IOException;

    void addStockRecord(StockRecordMsg stockRecordMsg);
}
