Update PegawaiDao.java

Perbaikan kondisi untuk validasi kombinasi tanggal expired dan checklist berlaku seumur hidup
This commit is contained in:
Salman Manoe 2024-02-19 11:41:01 +07:00
parent 2b2929b7e9
commit f718510639

View File

@ -666,9 +666,8 @@ public interface PegawaiDao extends JpaRepository<Pegawai, Integer>, JpaSpecific
+ "unitKerja.name as unitKerja) " + "from MapPegawaiJabatanToUnitKerja mapPegawai "
+ "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.isSipSeumurHidup is true " + "and p.id = :id " + "and tglBerakhirSip <= :date "
+ "order by tglBerakhirSip, namaLengkap")
+ "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")
Map<String, Object> findSipExpiredByPegawai(@Param("date") Date date, @Param("id") Integer id);
@Query("select new map (p.id as id, " + "p.tglBerakhirStr as tglBerakhirStr, "
@ -677,9 +676,8 @@ public interface PegawaiDao extends JpaRepository<Pegawai, Integer>, JpaSpecific
+ "unitKerja.name as unitKerja) " + "from MapPegawaiJabatanToUnitKerja mapPegawai "
+ "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.isStrSeumurHidup is false " + "and p.id = :id " + "and tglBerakhirStr <= :date "
+ "order by tglBerakhirStr, namaLengkap")
+ "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")
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 )"