package com.jasamedika.medifirst2000.service;

import com.jasamedika.medifirst2000.entities.LogbookKinerja;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.vo.LogbookKinerjaVO;
import com.jasamedika.medifirst2000.vo.SkorDokterVO;
import org.springframework.orm.jpa.JpaSystemException;

import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface LogbookKinerjaService extends BaseVoService<LogbookKinerja, LogbookKinerjaVO, String> {

	LogbookKinerjaVO verify(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException;

	LogbookKinerjaVO addPengajuanKontrakKinerja(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException;

	LogbookKinerjaVO updatePengajuanKontrakKinerja(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException;

	List<Map<String, Object>> findPengajuanKontrakKinerja(Integer idPegawai, Integer idJabatan)
			throws JpaSystemException;

	List<Map<String, Object>> findDupKontrakKinerja(Integer idPegawai, Integer idJabatan, Long bulan,
			Integer idIndikator) throws JpaSystemException;

	Map<String, Object> findKontrakKinerja(Integer idPegawai, Integer idJabatan, Long bulan) throws JpaSystemException;

	List<Map<String, Object>> findKontrakKinerja(Integer idIndikator) throws JpaSystemException;

	Map<String, Object> findLogbookKinerja(Integer idPegawai, Integer idJabatan, Long bulan) throws JpaSystemException;

	List<Map<String, Object>> findAksesPegawai(Integer idPegawai, List<Integer> listIdKelompokJabatan);

	List<Map<String, Object>> findLogbookJamKerjaDokter(Integer idPegawai, Long bulan);

	List<Map<String, Object>> findLogbookLuarJamKerjaDokter(Integer idPegawai, Long bulan);

	List<Map<String, Object>> findDetailLogbookJamKerjaDokter(Integer idPegawai, Integer idIndikator, Integer idProduk,
			String tglPelayanan, Integer idJenisPetugas, Double skor);

	List<Map<String, Object>> findDetailLogbookLuarJamKerjaDokter(Integer idPegawai, Integer idIndikator,
			Integer idProduk, String tglPelayanan, Integer idJenisPetugas, Double skor);

	Map<String, Object> findPenilaianKinerja(Integer idPegawai, Integer idJabatan, Long bulan)
			throws JpaSystemException;

	List<Map<String, Object>> findRekapPenilaianKinerja(Long bulan, Integer idUnitKerja, Integer idSubunitKerja,
			Integer idPegawai) throws JpaSystemException;

	void autoVerifKontrakJamKerjaDokter(Date bulan);

	void autoVerifLogbookJamKerjaDokter(Date bulan);

	List<SkorDokterVO> hitungTargetSkorLogbookDokter(String bulanAwal, String bulanAkhir) throws ParseException;

	List<Double> findBobotJenisJabatan(Long periode, Integer idJabatan);

	List<Map<String, Object>> findJabatanKontrakVerifKinerja(Integer idPegawai, Integer idPegawaiLogin);

	List<Map<String, Object>> findLogbookPerawat(Integer idPegawai, Long bulan);

	List<Map<String, Object>> findDetailLogbookPerawat(Integer idPegawai, Integer idProduk, String tglPelayanan);

	List<Map<String, Object>> findLogbookNakes(Integer idPegawai, Long bulan);

	List<Map<String, Object>> findDetailLogbookNakes(Integer idPegawai, Integer idProduk, String tglPelayanan);

	List<Map<String, Object>> findLogbookFarmakologi(Integer idPegawai, Long bulan);

	List<Map<String, Object>> findDetailLogbookFarmakologi(Integer idPegawai, Integer idProduk, String tglPelayanan);

	List<Map<String, Object>> findJabatanByLogbookPegawai(Integer idPegawai, Long bulan);

}
