package com.shkj.wms.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shkj.common.core.domain.Result;
import com.shkj.wms.bo.SysStockDetailQueryBo;
import com.shkj.wms.bo.SysStockReduceBo;
import com.shkj.wms.domain.SysStockDetail;
import com.shkj.wms.vo.SysStockDetailVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 库存明细Mapper接口
 *
 * @author lch
 * @date 2023-05-05
 */
public interface SysStockDetailMapper extends BaseMapper<SysStockDetail> {

     List<SysStockDetailVo> StockInquiry(SysStockDetailQueryBo bo);

     /**
      * 根据产品编码获取对应的货位id
      * @param goodsnoList
      * @return
      */
     List<SysStockDetailVo> getLocation(List<String> goodsnoList);

     /**
      * 获取物料在库库存情况
      * @param goodsNo
      * @return
      */
     Map<String,String> getInventoryInStockByGoods(List<String> goodsNoList,String goodsNo);

     int updateSysStockDetail(SysStockReduceBo bo);

     List<SysStockDetail> getStockDetailByLocationId(String id);

     List<SysStockDetail> selectsystock(@Param("GoodsNos")List<String> GoodsNos, @Param("locationid") Long locationid);

     void deleteBySysStockByLocationId(@Param("locationId") Long locationId);

}
