package com.sqx.modules.artificerselfgoods.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sqx.modules.artificerselfgoods.entity.BlArtificerSelfGoods;

import java.math.BigDecimal;
import java.util.List;

public interface BlArtificerSelfGoodsService extends IService<BlArtificerSelfGoods> {

	/**
	 * 根据技师ID获取所有库
	 * @param artificerId
	 * @return
	 */
	List<BlArtificerSelfGoods> findArtificerSelfGoodsByArtificerId(String artificerId);

	/**
	 * 根据技师ID和商品类型ID获取所有库
	 * @param artificerId
	 * @param goodsTypeId
	 * @return
	 */
	List<BlArtificerSelfGoods> findArtificerSelfGoodsByArtificerIdAndGoodsTypeId(String artificerId, String goodsTypeId);

	/**
	 * 根据技师ID和商品ID获取指定库
	 * @param artificerId
	 * @param goodsId
	 * @return
	 */
	BlArtificerSelfGoods findArtificerSelfGoodsByArtificerIdAndGoodsId(String artificerId, String goodsId);

	/**
	 * 新增或入库
	 * @param artificerSelfGoods
	 * @return
	 */
	boolean addOrInWarehouse(BlArtificerSelfGoods artificerSelfGoods);

	/**
	 * 批量新增或入库
	 * @param artificerSelfGoodsList
	 * @return
	 */
	boolean addOrInWarehouse(List<BlArtificerSelfGoods> artificerSelfGoodsList);

	/**
	 * 新增库
	 * @param artificerSelfGoods
	 * @return
	 */
	boolean addWarehouse(BlArtificerSelfGoods artificerSelfGoods);

	/**
	 * 批量新增库
	 * @param artificerSelfGoodsList
	 * @return
	 */
	boolean addWarehouse(List<BlArtificerSelfGoods> artificerSelfGoodsList);

	/**
	 * 入库
	 * @param artificerSelfGoodsId
	 * @param changeNum
	 * @return
	 */
	boolean inWarehouse(Long artificerSelfGoodsId, BigDecimal purchasePrice, int changeNum);

	/**
	 * 批量入库
	 * @param artificerSelfGoodsList
	 * @return
	 */
	boolean inWarehouse(List<BlArtificerSelfGoods> artificerSelfGoodsList);

	/**
	 * 出库
	 * @param artificerSelfGoodsId
	 * @param changeNum
	 * @return
	 */
	boolean outWarehouse(Long artificerSelfGoodsId, int changeNum, String userId);

	/**
	 * 批量出库
	 * @param artificerSelfGoodsList
	 * @return
	 */
	boolean outWarehouse(List<BlArtificerSelfGoods> artificerSelfGoodsList);

	/**
	 * 修改库
	 * @param artificerSelfGoodsId
	 * @param changeNum
	 * @return
	 */
	boolean editWarehouseById(Long artificerSelfGoodsId, int changeNum, String remark);

	/**
	 * 批量修改库
	 * @param artificerSelfGoodsList
	 * @return
	 */
	boolean editWarehouseById(List<BlArtificerSelfGoods> artificerSelfGoodsList);

	/**
	 * 修改库
	 * @param artificerSelfGoods
	 * @return
	 */
	boolean editWarehouse(BlArtificerSelfGoods artificerSelfGoods);

	/**
	 * 批量修改库
	 * @param artificerSelfGoodsList
	 * @return
	 */
	boolean editWarehouse(List<BlArtificerSelfGoods> artificerSelfGoodsList);

}
