Penambahan service simpan, update, delete, view untuk target skor dokter kelompok kerja dan individu. Penambahan hitung pembagian skor kelopmok kerja untuk individu.
34 lines
1.6 KiB
Java
34 lines
1.6 KiB
Java
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.orm.jpa.JpaSystemException;
|
|
import org.springframework.stereotype.Repository;
|
|
|
|
import com.jasamedika.medifirst2000.entities.IndeksKinerjaDokter;
|
|
|
|
/**
|
|
* @author salmanoe
|
|
* @since Nov 29, 2021
|
|
*/
|
|
@Repository("indeksKinerjaDokterDao")
|
|
public interface IndeksKinerjaDokterDao extends PagingAndSortingRepository<IndeksKinerjaDokter, String> {
|
|
|
|
@Query("select new Map(ikid.noRec as noRec," + "ikid.bulan as bulan," + "ikid.unitKerjaId as unitKerjaId,"
|
|
+ "ikid.subunitKerjaId as subunitKerjaId," + "ikid.pegawaiId as pegawaiId," + "ikid.iki as iki,"
|
|
+ "ikid.skor as skor," + "ikid.skorDasar as skorDasar) " + "from IndeksKinerjaDokter ikid "
|
|
+ "where ikid.statusEnabled is true " + "and to_char(ikid.bulan,'yyyy') = :tahun")
|
|
List<Map<String, Object>> findAll(@Param("tahun") String tahun) throws JpaSystemException;
|
|
|
|
@Query("select new Map(ikid.unitKerjaId as unitKerjaId," + "ikid.subunitKerjaId as subunitKerjaId,"
|
|
+ "coalesce(sum(ikid.skorDasar),0) as totalSkorDasar) " + "from IndeksKinerjaDokter ikid "
|
|
+ "where ikid.statusEnabled is true " + "and to_char(ikid.bulan,'yyyy') = :tahun "
|
|
+ "group by ikid.unitKerjaId, ikid.subunitKerjaId " + "order by ikid.unitKerjaId, ikid.subunitKerjaId")
|
|
List<Map<String, Object>> findTotalSkorByKelompokKerja(@Param("tahun") String tahun) throws JpaSystemException;
|
|
|
|
}
|