package com.jasamedika.medifirst2000.dao; import java.util.List; 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.MasalahKeperawatanDetail; /** * @author Shakato */ @Repository("MasalahKeperawatanDetailDao") public interface MasalahKeperawatanDetailDao extends PagingAndSortingRepository { @Query("select p from MasalahKeperawatanDetail p where p.masalahKeperawatan.noRec=:noRec") List findByMasalahKeperawatan(@Param("noRec")String noRec); @Query("select to_char(a.tanggalDitemukan,'yyyy-MM-dd'), a.dataMasalahKeperawatan, to_char(a.tanggalTeratasi,'yyyy-MM-dd') from MasalahKeperawatanDetail a, MasalahKeperawatan b where a.pasienDaftar.pasienDaftar.pasien.noCm=:noCm and to_char(b.tglInput,'yyyy-MM-dd')=:tglInput") List findByNocmAndTglInput(@Param("noCm")String noCm,@Param("tglInput") String tglInput); }