package com.shinsoft.sto.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shinsoft.sto.model.Onhand;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

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

/**
 * <p>
 * 库存现有量 Mapper 接口
 * </p>
 *
 * @author system
 * @since 2024-10-08
 */
public interface OnhandMapper extends BaseMapper<Onhand> {

 @Select("SELECT * FROM STO_ONHAND WHERE ID = #{id}" )
 Onhand selectByPK(String id);

 Map<String,Object> querySumOnhand(Map<String,Object> map);
 Map<String,Object> querySumOnhandKf(Map<String,Object> map);
 Map<String,Object> querySumOnhandQh(Map<String,Object> map);
 Map<String,Object> querySumOnhandDw(Map<String,Object> map);


 List<Onhand> selectDelvOut(Map<String, Object> map);

 IPage<Onhand> queryList (Page<Onhand> autoPage,@Param("map") Map<String, Object> map);

 List<Onhand> getSumList(@Param("storeCd") List<String> list ,@Param("itemCd") List<String> itemlist );

 Page<Onhand> selectOnhand(Page<Onhand> page2,@Param("storeNm") String storeNm,@Param("itemType") String itemType,@Param("areaCd") String areaCd,@Param("stackCd") String stackCd,@Param("itemNm") String itemNm);
}
