package com.sw.mes.sap.dao;

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

import org.springframework.data.jpa.repository.Query;

import com.sw.mes.core.base.BaseDao;
import com.sw.mes.sap.dto.WarehouseStatisticsDto;
import com.sw.mes.sap.entity.LogSapStock;


/**
 * 对账数据
 * @author liru
 */
public interface LogSapStockDao extends BaseDao<LogSapStock, Long>
{

	List<LogSapStock> findByLgortAndMatnrAndCharg(String lgort, String matnr, String charg);

	void deleteByMatnrAndLgort(String matnr, String lgort);

	void deleteByLgort(String lgort);

	List<LogSapStock> findByLgortAndMatnr(String lgort, String matnr);

	List<LogSapStock> findByLgort(String lgort);

	
	//@Query(value = "SELECT * FROM sap_store_comparison", nativeQuery = true)
	List<Map<Object, Object>> realTimeReconciliationOfInventory(WarehouseStatisticsDto dto);
	
	List<String> realTimeReconciliationOfInventoryLgorts();
	
	List<String> realTimeReconciliationOfInventoryChargs();

}
