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")
|
+ "where tsdd.statusEnabled is true " + "and tsdd.targetSkorId = :noRec")
|
||||||
public List<Map<String, Object>> findByHeadId(@Param("noRec") String noRec) throws JpaSystemException;
|
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.ShiftKerjaDao;
|
||||||
import com.jasamedika.medifirst2000.dao.SkoringTindakanMedisDao;
|
import com.jasamedika.medifirst2000.dao.SkoringTindakanMedisDao;
|
||||||
import com.jasamedika.medifirst2000.dao.TabelAcuanIndeksIKIDao;
|
import com.jasamedika.medifirst2000.dao.TabelAcuanIndeksIKIDao;
|
||||||
|
import com.jasamedika.medifirst2000.dao.TargetSkorDokterDetailDao;
|
||||||
import com.jasamedika.medifirst2000.dao.custom.SkoringTindakanMedisDaoCustom;
|
import com.jasamedika.medifirst2000.dao.custom.SkoringTindakanMedisDaoCustom;
|
||||||
import com.jasamedika.medifirst2000.entities.IndikatorKinerja;
|
import com.jasamedika.medifirst2000.entities.IndikatorKinerja;
|
||||||
import com.jasamedika.medifirst2000.entities.IndikatorKinerjaDetail;
|
import com.jasamedika.medifirst2000.entities.IndikatorKinerjaDetail;
|
||||||
@ -149,6 +150,9 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PelayananNakesDao pelayananNakesDao;
|
private PelayananNakesDao pelayananNakesDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TargetSkorDokterDetailDao targetSkorDokterDetailDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LogbookKinerjaVO add(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException {
|
public LogbookKinerjaVO add(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException {
|
||||||
Pegawai pegawai = pegawaiConverter.transferVOToModel(vo.getPegawai(), new Pegawai());
|
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
|
* Komponen target kuantitas indikator pelayanan medis
|
||||||
*/
|
*/
|
||||||
List<Map<String, Object>> detailIndikator1 = logbookKinerjaDokterDao.findDetailLogbookDokter(
|
if (map.get("indikatorId").equals(Master.IndikatorKinerja.PELAYANAN_MEDIS_JAM_KERJA)) {
|
||||||
df.format(new Date(bulan)), idPegawai, idJabatan,
|
List<Double> target = targetSkorDokterDetailDao.findTargetByPegawai(idPegawai,
|
||||||
Integer.valueOf(map.get("indikatorId").toString()));
|
df.format(new Date(bulan)));
|
||||||
if (CommonUtil.isNotNullOrEmpty(detailIndikator1)) {
|
map.put("target", Math.floor(target.get(0)));
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user