package com.jasamedika.medifirst2000.dao;

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

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.jasamedika.medifirst2000.entities.StrukPelayananDNoBatch;

/**
 * @author Shakato
 */
@Repository("StrukPelayananDNoBatchDao")
public interface StrukPelayananDNoBatchDao extends PagingAndSortingRepository<StrukPelayananDNoBatch, String> {

	@Query("select new Map( batch.qtyproduk as qtyProduk,batch.tglkadaluarsa as tanggalKadaluarsa, "
			+ "batch.tglproduksi as tanggalProduksi,batch.tglpelayanan as tanggalPelayanan )from StrukPelayananDNoBatch batch "
			+ "left join batch.nostruk detail where detail.noRec=:noRec")
	List<Map<String,Object>> findNoBatchByParent(@Param("noRec") String noRec);
	
	
	
}
