Update LogbookKinerjaService
Penyesuaian default target skor dokter saat pembuatan kontrak kinerja dokter
This commit is contained in:
parent
d38e5bd003
commit
a807599f25
@ -22,4 +22,9 @@ public interface TargetSkorDokterDetailDao extends PagingAndSortingRepository<Ta
|
||||
+ "where tsdd.statusEnabled is true " + "and tsdd.targetSkorId = :noRec")
|
||||
public List<Map<String, Object>> findByHeadId(@Param("noRec") String noRec) throws JpaSystemException;
|
||||
|
||||
@Query("select tsd.skor " + "from TargetSkorDokterDetail tsd " + "inner join tsd.targetSkor ts "
|
||||
+ "where tsd.pegawaiId = :pegawaiId " + "and to_char(ts.tmt,'yyyy-MM') < :bulan " + "order by ts.tmt desc")
|
||||
public List<Double> findTargetByPegawai(@Param("pegawaiId") Integer idPegawai, @Param("bulan") String bulan)
|
||||
throws JpaSystemException;
|
||||
|
||||
}
|
||||
|
||||
@ -45,6 +45,7 @@ import com.jasamedika.medifirst2000.dao.PelayananPasienPetugasDao;
|
||||
import com.jasamedika.medifirst2000.dao.ShiftKerjaDao;
|
||||
import com.jasamedika.medifirst2000.dao.SkoringTindakanMedisDao;
|
||||
import com.jasamedika.medifirst2000.dao.TabelAcuanIndeksIKIDao;
|
||||
import com.jasamedika.medifirst2000.dao.TargetSkorDokterDetailDao;
|
||||
import com.jasamedika.medifirst2000.dao.custom.SkoringTindakanMedisDaoCustom;
|
||||
import com.jasamedika.medifirst2000.entities.IndikatorKinerja;
|
||||
import com.jasamedika.medifirst2000.entities.IndikatorKinerjaDetail;
|
||||
@ -149,6 +150,9 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
||||
@Autowired
|
||||
private PelayananNakesDao pelayananNakesDao;
|
||||
|
||||
@Autowired
|
||||
private TargetSkorDokterDetailDao targetSkorDokterDetailDao;
|
||||
|
||||
@Override
|
||||
public LogbookKinerjaVO add(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException {
|
||||
Pegawai pegawai = pegawaiConverter.transferVOToModel(vo.getPegawai(), new Pegawai());
|
||||
@ -425,16 +429,10 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
||||
/**
|
||||
* Komponen target kuantitas indikator pelayanan medis
|
||||
*/
|
||||
List<Map<String, Object>> detailIndikator1 = logbookKinerjaDokterDao.findDetailLogbookDokter(
|
||||
df.format(new Date(bulan)), idPegawai, idJabatan,
|
||||
Integer.valueOf(map.get("indikatorId").toString()));
|
||||
if (CommonUtil.isNotNullOrEmpty(detailIndikator1)) {
|
||||
double detailTarget = 0.0;
|
||||
for (Map<String, Object> detail : detailIndikator1) {
|
||||
detailTarget += Double.parseDouble(detail.get("detailTarget").toString());
|
||||
}
|
||||
map.put("target", detailTarget);
|
||||
map.put("detail", detailIndikator1);
|
||||
if (map.get("indikatorId").equals(Master.IndikatorKinerja.PELAYANAN_MEDIS_JAM_KERJA)) {
|
||||
List<Double> target = targetSkorDokterDetailDao.findTargetByPegawai(idPegawai,
|
||||
df.format(new Date(bulan)));
|
||||
map.put("target", Math.floor(target.get(0)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user