Clean code

This commit is contained in:
salmanoe 2022-10-17 20:43:45 +07:00
parent bd6390cac0
commit fb399e783c
2 changed files with 6 additions and 11 deletions

View File

@ -280,17 +280,6 @@ public interface BridgingDao extends PagingAndSortingRepository<DetailDiagnosaPa
"where produk.id = :idproduk ")
public List<Map<String,Object>> findTarifAkomodasi(@Param("idproduk")Integer idproduk);
@Query(" select kelas.id "+
"from MappingKelasToKelasBios mapping "+
"left join mapping.kelas kelas "+
"left join mapping.kelasBios kelasBios "+
"where kelasBios.id = :id")
public List<Integer> findMappingKelasToKelasBios(@Param("id")Integer id);
@Query(" select new map(kelasBios.id as idKelas, kelasBios.kode_kelas as kode_kelas) "+
"from KelasBios kelasBios")
public List<Map<String,Object>> findKelasId();
@Query(" select count(pasienDaftar.noRec) "+
"from PasienDaftar pasienDaftar "+
"left join pasienDaftar.kelas kelas "+

View File

@ -489,4 +489,10 @@ public final class DateUtil implements Serializable {
return Date.from(month.with(TemporalAdjusters.lastDayOfYear()).atTime(LocalTime.MAX)
.atZone(ZoneId.systemDefault()).toInstant());
}
public static Integer dayOfWeek(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
return c.get(Calendar.DAY_OF_WEEK);
}
}