Update PegawaiDao.java

Perbaikan service notifikasi expired sip str
This commit is contained in:
Salman Manoe 2024-02-20 13:11:46 +07:00
parent 5ed9638ccc
commit e1cd94e969

View File

@ -668,7 +668,8 @@ public interface PegawaiDao extends JpaRepository<Pegawai, Integer>, JpaSpecific
+ "left join mapPegawai.pegawai p " + "left join mapPegawai.subUnitKerjaPegawai subUnitKerja "
+ "left join mapPegawai.unitKerjaPegawai unitKerja " + "where mapPegawai.isPrimary is true "
+ "and mapPegawai.statusEnabled is true " + "and p.statusEnabled is true " + "and p.id = :id "
+ "and (tglBerakhirSip <= :date or p.isSipSeumurHidup is false) " + "order by tglBerakhirSip, namaLengkap")
+ "and tglBerakhirSip <= :date " + "and p.isSipSeumurHidup is false "
+ "order by tglBerakhirSip, namaLengkap")
Map<String, Object> findSipExpiredByPegawai(@Param("date") Date date, @Param("id") Integer id);
@Query("select new map (p.id as id, " + "p.tglBerakhirStr as tglBerakhirStr, "
@ -678,7 +679,8 @@ public interface PegawaiDao extends JpaRepository<Pegawai, Integer>, JpaSpecific
+ "left join mapPegawai.pegawai p " + "left join mapPegawai.subUnitKerjaPegawai subUnitKerja "
+ "left join mapPegawai.unitKerjaPegawai unitKerja " + "where mapPegawai.isPrimary is true "
+ "and mapPegawai.statusEnabled is true " + "and p.statusEnabled is true " + "and p.id = :id "
+ "and (tglBerakhirStr <= :date or p.isStrSeumurHidup is false) " + "order by tglBerakhirStr, namaLengkap")
+ "and tglBerakhirStr <= :date " + "and p.isStrSeumurHidup is false "
+ "order by tglBerakhirStr, namaLengkap")
Map<String, Object> findStrExpiredByPegawai(@Param("date") Date date, @Param("id") Integer id);
@Query("select new map (unitKerja.name as unitKerja, count(pegawai.id) as value )"