- pemisahan verifikasi otomatis dan manual karena error hibernate untuk converter virtual object logboook kinerja dokter
- perubahan waktu timer verifikasi otomatis logbook kinerja dokter
This commit is contained in:
parent
e03c938c5f
commit
e468a79a9a
@ -21,6 +21,7 @@ import java.util.stream.Collectors;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.orm.jpa.JpaSystemException;
|
import org.springframework.orm.jpa.JpaSystemException;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.jasamedika.medifirst2000.constants.Master;
|
import com.jasamedika.medifirst2000.constants.Master;
|
||||||
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
|
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
|
||||||
@ -217,6 +218,28 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
|||||||
return resultVO;
|
return resultVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void autoVerify(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException {
|
||||||
|
DateFormat df = new SimpleDateFormat("yyyy-MM");
|
||||||
|
|
||||||
|
Map<String, Object> kontrak = logbookKinerjaDao.findKontrakByLogbook(df.format(vo.getBulan()),
|
||||||
|
vo.getPegawai().getId(), vo.getIndikatorKinerja().getId());
|
||||||
|
LogbookKinerja logbookKinerja = logbookKinerjaDao.findOne(kontrak.get("noRec").toString());
|
||||||
|
|
||||||
|
Pegawai pegawai = new Pegawai();
|
||||||
|
pegawai.setId(vo.getPegawai().getId());
|
||||||
|
Jabatan jabatan = new Jabatan();
|
||||||
|
jabatan.setId(Integer.valueOf(kontrak.get("jabatanId").toString()));
|
||||||
|
IndikatorKinerja indikatorKinerja = new IndikatorKinerja();
|
||||||
|
indikatorKinerja.setId(vo.getIndikatorKinerja().getId());
|
||||||
|
|
||||||
|
logbookKinerja.setPegawai(pegawai);
|
||||||
|
logbookKinerja.setJabatan(jabatan);
|
||||||
|
logbookKinerja.setIndikatorKinerja(indikatorKinerja);
|
||||||
|
logbookKinerja.setCapaian(vo.getCapaian());
|
||||||
|
logbookKinerjaDao.save(logbookKinerja);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LogbookKinerjaVO addPengajuanKontrakKinerja(LogbookKinerjaVO vo)
|
public LogbookKinerjaVO addPengajuanKontrakKinerja(LogbookKinerjaVO vo)
|
||||||
throws JpaSystemException, ServiceVOException {
|
throws JpaSystemException, ServiceVOException {
|
||||||
@ -2075,7 +2098,7 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
|||||||
vo.setIndikatorKinerja(indikator);
|
vo.setIndikatorKinerja(indikator);
|
||||||
vo.setBulan(bulan);
|
vo.setBulan(bulan);
|
||||||
vo.setCapaian(capaian);
|
vo.setCapaian(capaian);
|
||||||
this.verify(vo);
|
this.autoVerify(vo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,9 +22,9 @@ public class AutoLogbookVerification extends LocaleController<LogbookKinerjaVO>
|
|||||||
private LogbookKinerjaService logbookKinerjaService;
|
private LogbookKinerjaService logbookKinerjaService;
|
||||||
|
|
||||||
public AutoLogbookVerification() {
|
public AutoLogbookVerification() {
|
||||||
int day = 4;
|
int day = 5;
|
||||||
int hour = 23;
|
int hour = 0;
|
||||||
int minute = 59;
|
int minute = 00;
|
||||||
LogbookVerificationTimer.schedule(new Runnable() {
|
LogbookVerificationTimer.schedule(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user