Merge branch 'dev/remun/kinerja/hapus' into prod/base

This commit is contained in:
Salman Manoe 2024-11-11 11:39:04 +07:00
commit 5969617896
15 changed files with 580 additions and 344 deletions

View File

@ -1,18 +1,20 @@
package com.jasamedika.medifirst2000.dao;
import com.jasamedika.medifirst2000.entities.LogbookKinerja;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import java.util.Date;
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.stereotype.Repository;
import com.jasamedika.medifirst2000.entities.LogbookKinerja;
import java.util.Optional;
@Repository("logbookKinerjaDao")
public interface LogbookKinerjaDao extends PagingAndSortingRepository<LogbookKinerja, String> {
public interface LogbookKinerjaDao extends JpaRepository<LogbookKinerja, String> {
Optional<LogbookKinerja> findByNoRec(String noRec);
@Query("select new Map(lk.noRec as noRec," + "pg.id as pegawaiId,pg.namaLengkap as namaPegawai,"
+ "jb.id as jabatanId,jb.namaJabatan as namaJabatan,"
@ -260,4 +262,5 @@ public interface LogbookKinerjaDao extends PagingAndSortingRepository<LogbookKin
+ "inner join lkt.jabatan jb " + "where lkt.statusEnabled is true " + "and lkt.pegawaiId = :pegawaiId "
+ "and to_char(lkt.bulan,'yyyy-MM') = :bulan")
List<Map<String, Object>> findJabatanByPegawai(@Param("pegawaiId") Integer idPegawai, @Param("bulan") String bulan);
}

View File

@ -9,10 +9,13 @@ import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@Repository("logbookKinerjaDetailDao")
public interface LogbookKinerjaDetailDao extends PagingAndSortingRepository<LogbookKinerjaDetail, String> {
Optional<LogbookKinerjaDetail> findByNoRec(String noRec);
String strGetWR = "select new Map(lkh.noRec as logbookNoRec," + "lkd.noRec as noRec,"
+ "ikm.id as indikatorId,ikm.namaIndikator as namaIndikator," + "ikm.jenisIndikator as jenisIndikatorId,"
+ "(case when ikm.jenisIndikator = 1 then 'Kuantitas' " + "when ikm.jenisIndikator = 2 then 'Kualitas' "

View File

@ -0,0 +1,31 @@
package com.jasamedika.medifirst2000.dao;
import com.jasamedika.medifirst2000.entities.LogbookKinerjaDetailLog;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
/**
* @author salmanoe
* @version 1.0.0
* @since 31/10/2024
*/
public interface LogbookKinerjaDetailLogDao extends JpaRepository<LogbookKinerjaDetailLog, String> {
@Query("select log from LogbookKinerjaDetailLog log " + "inner join log.catatanKinerja lkd "
+ "inner join lkd.logbookKinerja lk " + "inner join lk.indikatorKinerja ikm "
+ "inner join lk.pegawai pg " + "inner join log.pegawai ats "
+ "where lower(ikm.namaIndikator) like %:querySearch% " + "or lower(lkd.namaKegiatan) like %:querySearch% "
+ "or to_char(lkd.tanggalKegiatan, 'yyyy') like %:querySearch% "
+ "or to_char(lkd.tanggalKegiatan, 'MM/yyyy') like %:querySearch% "
+ "or to_char(lkd.tanggalKegiatan, 'dd/MM/yyyy') like %:querySearch% "
+ "or lower(pg.namaLengkap) like %:querySearch% " + "or lower(log.jenisLog) like %:querySearch% "
+ "or to_char(log.tanggalDibuat, 'yyyy') like %:querySearch% "
+ "or to_char(log.tanggalDibuat, 'MM/yyyy') like %:querySearch% "
+ "or to_char(log.tanggalDibuat, 'dd/MM/yyyy') like %:querySearch% "
+ "or lower(ats.nipPns) like %:querySearch% " + "or lower(ats.namaLengkap) like %:querySearch%")
Page<LogbookKinerjaDetailLog> findBySearchQuery(@Param("querySearch") String querySearch, Pageable pageable);
}

View File

@ -0,0 +1,19 @@
package com.jasamedika.medifirst2000.service;
import com.jasamedika.medifirst2000.dto.LogbookKinerjaDetailLogDto;
import com.jasamedika.medifirst2000.dto.LogbookKinerjaDetailLogReqDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
/**
* @author salmanoe
* @version 1.0.0
* @since 31/10/2024
*/
public interface LogbookKinerjaDetailLogService {
void save(LogbookKinerjaDetailLogReqDto dto);
Page<LogbookKinerjaDetailLogDto> list(Pageable pageable);
}

View File

@ -1,24 +1,25 @@
package com.jasamedika.medifirst2000.service;
import com.jasamedika.medifirst2000.entities.LogbookKinerjaDetail;
import com.jasamedika.medifirst2000.vo.LogbookKinerjaDetailVO;
import org.springframework.orm.jpa.JpaSystemException;
import java.util.List;
import java.util.Map;
import org.springframework.orm.jpa.JpaSystemException;
import com.jasamedika.medifirst2000.entities.LogbookKinerjaDetail;
import com.jasamedika.medifirst2000.vo.LogbookKinerjaDetailVO;
public interface LogbookKinerjaDetailService
extends BaseVoService<LogbookKinerjaDetail, LogbookKinerjaDetailVO, String> {
public List<Map<String, Object>> findWorkingRecord(Integer idPegawai, Integer idJabatan, Long bulan,
Boolean statusVerif) throws JpaSystemException;
List<Map<String, Object>> findWorkingRecord(Integer idPegawai, Integer idJabatan, Long bulan, Boolean statusVerif)
throws JpaSystemException;
public List<Map<String, Object>> findWorkingRecord(Integer idPegawai, Integer idJabatan, Integer idIndikator,
Long bulan) throws JpaSystemException;
List<Map<String, Object>> findWorkingRecord(Integer idPegawai, Integer idJabatan, Integer idIndikator, Long bulan)
throws JpaSystemException;
public List<Map<String, Object>> findAksesPegawai(Integer idPegawai) throws JpaSystemException;
List<Map<String, Object>> findAksesPegawai(Integer idPegawai) throws JpaSystemException;
public Map<String, Object> findWidgetStatusVerifikasi(Integer idPegawai, Long bulan) throws JpaSystemException;
Map<String, Object> findWidgetStatusVerifikasi(Integer idPegawai, Long bulan) throws JpaSystemException;
void hapusCatatanKinerja(String norec);
}

View File

@ -1,40 +1,35 @@
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;
import org.springframework.orm.jpa.JpaSystemException;
import com.jasamedika.medifirst2000.entities.LogbookKinerja;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.vo.LogbookKinerjaVO;
import com.jasamedika.medifirst2000.vo.SkorDokterVO;
public interface LogbookKinerjaService extends BaseVoService<LogbookKinerja, LogbookKinerjaVO, String> {
LogbookKinerjaVO verify(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException;
LogbookKinerjaVO addPengajuanKontrakKinerja(LogbookKinerjaVO vo)
throws JpaSystemException, ServiceVOException;
LogbookKinerjaVO addPengajuanKontrakKinerja(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException;
LogbookKinerjaVO updatePengajuanKontrakKinerja(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;
Integer idIndikator) throws JpaSystemException;
Map<String, Object> findKontrakKinerja(Integer idPegawai, Integer idJabatan, Long bulan)
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;
Map<String, Object> findLogbookKinerja(Integer idPegawai, Integer idJabatan, Long bulan) throws JpaSystemException;
List<Map<String, Object>> findAksesPegawai(Integer idPegawai, List<Integer> listIdKelompokJabatan);
@ -42,20 +37,20 @@ public interface LogbookKinerjaService extends BaseVoService<LogbookKinerja, Log
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>> 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);
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;
Integer idPegawai) throws JpaSystemException;
void autoVerifKontrakJamKerjaDokter(Date bulan);
void autoVerifLogbookJamKerjaDokter(Date bulan);
List<SkorDokterVO> hitungTargetSkorLogbookDokter(String bulanAwal, String bulanAkhir) throws ParseException;
@ -74,9 +69,8 @@ public interface LogbookKinerjaService extends BaseVoService<LogbookKinerja, Log
List<Map<String, Object>> findLogbookFarmakologi(Integer idPegawai, Long bulan);
List<Map<String, Object>> findDetailLogbookFarmakologi(Integer idPegawai, Integer idProduk,
String tglPelayanan);
List<Map<String, Object>> findDetailLogbookFarmakologi(Integer idPegawai, Integer idProduk, String tglPelayanan);
List<Map<String, Object>> findJabatanByLogbookPegawai(Integer idPegawai, Long bulan);
}

View File

@ -0,0 +1,92 @@
package com.jasamedika.medifirst2000.service.impl;
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
import com.jasamedika.medifirst2000.dao.LogbookKinerjaDetailDao;
import com.jasamedika.medifirst2000.dao.LogbookKinerjaDetailLogDao;
import com.jasamedika.medifirst2000.dto.LogbookKinerjaDetailLogDto;
import com.jasamedika.medifirst2000.dto.LogbookKinerjaDetailLogReqDto;
import com.jasamedika.medifirst2000.entities.LogbookKinerjaDetail;
import com.jasamedika.medifirst2000.entities.LogbookKinerjaDetailLog;
import com.jasamedika.medifirst2000.entities.Pegawai;
import com.jasamedika.medifirst2000.service.LogbookKinerjaDetailLogService;
import com.jasamedika.medifirst2000.service.LoginUserService;
import com.jasamedika.medifirst2000.vo.LogbookKinerjaDetailVO;
import com.jasamedika.medifirst2000.vo.PegawaiVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;
/**
* @author salmanoe
* @version 1.0.0
* @since 31/10/2024
*/
@Service
@Transactional
public class LogbookKinerjaDetailLogServiceImpl implements LogbookKinerjaDetailLogService {
@Autowired
private LoginUserService loginUserService;
@Autowired
private LogbookKinerjaDetailDao logbookKinerjaDetailDao;
@Autowired
private LogbookKinerjaDetailLogDao logbookKinerjaDetailLogDao;
@Autowired
private BaseConverterImpl<LogbookKinerjaDetailVO, LogbookKinerjaDetail> catatanKinerjaConverter;
@Autowired
private BaseConverterImpl<PegawaiVO, Pegawai> pegawaiConverter;
@Override
public void save(LogbookKinerjaDetailLogReqDto dto) {
LogbookKinerjaDetailLog.LogbookKinerjaDetailLogBuilder logBuilder = LogbookKinerjaDetailLog.builder();
{
Optional<LogbookKinerjaDetail> byNoRec = logbookKinerjaDetailDao.findByNoRec(dto.getCatatanKinerjaId());
byNoRec.ifPresent(logBuilder::catatanKinerja);
}
{
Pegawai subject = loginUserService.getLoginUser().getPegawai();
logBuilder.pegawai(subject);
}
LogbookKinerjaDetailLog log = logBuilder.jenisLog(dto.getJenisLog()).keterangan(dto.getKeterangan())
.tanggalDibuat(new Date()).build();
log.setKdProfile((short) 0);
log.setStatusEnabled(true);
logbookKinerjaDetailLogDao.save(log);
}
@Override
public Page<LogbookKinerjaDetailLogDto> list(Pageable pageable) {
Page<LogbookKinerjaDetailLog> logPage = logbookKinerjaDetailLogDao.findAll(pageable);
List<LogbookKinerjaDetailLogDto> dtoList = new ArrayList<>();
logPage.getContent().forEach(log -> {
LogbookKinerjaDetailLogDto.LogbookKinerjaDetailLogDtoBuilder dtoBuilder = LogbookKinerjaDetailLogDto
.builder();
{
LogbookKinerjaDetailVO catatanKinerjaVO = catatanKinerjaConverter
.transferModelToVO(log.getCatatanKinerja(), new LogbookKinerjaDetailVO());
dtoBuilder.catatanKinerja(catatanKinerjaVO);
}
{
PegawaiVO pegawaiVO = pegawaiConverter.transferModelToVO(log.getPegawai(), new PegawaiVO());
dtoBuilder.pegawai(pegawaiVO);
}
LogbookKinerjaDetailLogDto dto = dtoBuilder.jenisLog(log.getJenisLog()).keterangan(log.getKeterangan())
.tanggalDibuat(log.getTanggalDibuat()).build();
dtoList.add(dto);
});
return new PageImpl<>(dtoList, pageable, logPage.getTotalElements());
}
}

View File

@ -5,9 +5,11 @@ import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
import com.jasamedika.medifirst2000.dao.LogbookKinerjaDao;
import com.jasamedika.medifirst2000.dao.LogbookKinerjaDetailDao;
import com.jasamedika.medifirst2000.dao.SettingDataFixedDao;
import com.jasamedika.medifirst2000.dto.LogbookKinerjaDetailLogReqDto;
import com.jasamedika.medifirst2000.entities.LogbookKinerja;
import com.jasamedika.medifirst2000.entities.LogbookKinerjaDetail;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.LogbookKinerjaDetailLogService;
import com.jasamedika.medifirst2000.service.LogbookKinerjaDetailService;
import com.jasamedika.medifirst2000.util.CommonUtil;
import com.jasamedika.medifirst2000.util.DateUtil;
@ -15,6 +17,7 @@ import com.jasamedika.medifirst2000.vo.LogbookKinerjaDetailVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.jpa.JpaSystemException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
@ -24,9 +27,16 @@ import java.time.LocalTime;
import java.time.ZoneId;
import java.util.*;
import static com.jasamedika.medifirst2000.constants.Master.SatuanIndikator.PERCENTAGE;
import static com.jasamedika.medifirst2000.enums.JenisLog.HAPUS;
@Service("LogbookKinerjaDetailService")
@Transactional
public class LogbookKinerjaDetailServiceImpl extends BaseVoServiceImpl implements LogbookKinerjaDetailService {
@Autowired
private LogbookKinerjaDetailLogService logCatatanKinerjaService;
@Autowired
private BaseConverterImpl<LogbookKinerjaDetailVO, LogbookKinerjaDetail> logbookKinerjaDetailConverter;
@ -52,8 +62,8 @@ public class LogbookKinerjaDetailServiceImpl extends BaseVoServiceImpl implement
* menghitung capaian indikator satuan yang harus dihitung secara
* akumulatif
*/
List<Map<String, Object>> dataSatuanJumlah = logbookKinerjaDetailDao.findSumCapaianByKontrak(
vo.getLogbookKinerja().getNoRec(), Arrays.asList(Master.SatuanIndikator.PERCENTAGE));
List<Map<String, Object>> dataSatuanJumlah = logbookKinerjaDetailDao
.findSumCapaianByKontrak(vo.getLogbookKinerja().getNoRec(), Arrays.asList(PERCENTAGE));
if (CommonUtil.isNotNullOrEmpty(dataSatuanJumlah)) {
List<LogbookKinerja> models = new ArrayList<>();
for (Map<String, Object> map : dataSatuanJumlah) {
@ -67,8 +77,8 @@ public class LogbookKinerjaDetailServiceImpl extends BaseVoServiceImpl implement
* menghitung capaian indikator satuan yang harus dihitung secara
* rata-rata
*/
List<Map<String, Object>> dataSatuanRatarata = logbookKinerjaDetailDao.findAvgCapaianByKontrak(
vo.getLogbookKinerja().getNoRec(), Arrays.asList(Master.SatuanIndikator.PERCENTAGE));
List<Map<String, Object>> dataSatuanRatarata = logbookKinerjaDetailDao
.findAvgCapaianByKontrak(vo.getLogbookKinerja().getNoRec(), Arrays.asList(PERCENTAGE));
if (CommonUtil.isNotNullOrEmpty(dataSatuanRatarata)) {
List<LogbookKinerja> models = new ArrayList<>();
for (Map<String, Object> map : dataSatuanRatarata) {
@ -97,8 +107,8 @@ public class LogbookKinerjaDetailServiceImpl extends BaseVoServiceImpl implement
* menghitung capaian indikator satuan yang harus dihitung secara
* akumulatif
*/
List<Map<String, Object>> dataSatuanJumlah = logbookKinerjaDetailDao.findSumCapaianByKontrak(
vo.getLogbookKinerja().getNoRec(), Arrays.asList(Master.SatuanIndikator.PERCENTAGE));
List<Map<String, Object>> dataSatuanJumlah = logbookKinerjaDetailDao
.findSumCapaianByKontrak(vo.getLogbookKinerja().getNoRec(), Arrays.asList(PERCENTAGE));
if (CommonUtil.isNotNullOrEmpty(dataSatuanJumlah)) {
List<LogbookKinerja> models = new ArrayList<>();
for (Map<String, Object> map : dataSatuanJumlah) {
@ -112,8 +122,8 @@ public class LogbookKinerjaDetailServiceImpl extends BaseVoServiceImpl implement
* menghitung capaian indikator satuan yang harus dihitung secara
* rata-rata
*/
List<Map<String, Object>> dataSatuanRatarata = logbookKinerjaDetailDao.findAvgCapaianByKontrak(
vo.getLogbookKinerja().getNoRec(), Arrays.asList(Master.SatuanIndikator.PERCENTAGE));
List<Map<String, Object>> dataSatuanRatarata = logbookKinerjaDetailDao
.findAvgCapaianByKontrak(vo.getLogbookKinerja().getNoRec(), Arrays.asList(PERCENTAGE));
if (CommonUtil.isNotNullOrEmpty(dataSatuanRatarata)) {
List<LogbookKinerja> models = new ArrayList<>();
for (Map<String, Object> map : dataSatuanRatarata) {
@ -291,4 +301,44 @@ public class LogbookKinerjaDetailServiceImpl extends BaseVoServiceImpl implement
return result;
}
@Override
public void hapusCatatanKinerja(String norec) {
Optional<LogbookKinerjaDetail> byNoRec = logbookKinerjaDetailDao.findByNoRec(norec);
byNoRec.ifPresent(catatanKinerja -> {
{
catatanKinerja.setStatusVerifikasi(false);
catatanKinerja.setStatusEnabled(false);
logbookKinerjaDetailDao.save(catatanKinerja);
}
{
Optional<LogbookKinerja> byIdLogbook = logbookKinerjaDao
.findByNoRec(catatanKinerja.getLogbookKinerjaId());
byIdLogbook.ifPresent(logbookKinerja -> {
if (Arrays.asList(PERCENTAGE)
.contains(logbookKinerja.getIndikatorKinerja().getSatuanIndikatorId())) {
List<Map<String, Object>> listCatatan = logbookKinerjaDetailDao
.findAvgCapaianByKontrak(logbookKinerja.getNoRec(), Arrays.asList(PERCENTAGE));
Optional<Map<String, Object>> catatan = listCatatan.stream()
.filter(c -> logbookKinerja.getNoRec().equals(c.get("logbookId"))).findFirst();
catatan.ifPresent(
c -> logbookKinerja.setCapaian(Double.parseDouble(c.get("avgCapaian").toString())));
} else {
List<Map<String, Object>> listCatatan = logbookKinerjaDetailDao
.findSumCapaianByKontrak(logbookKinerja.getNoRec(), Arrays.asList(PERCENTAGE));
Optional<Map<String, Object>> catatan = listCatatan.stream()
.filter(c -> logbookKinerja.getNoRec().equals(c.get("logbookId"))).findFirst();
catatan.ifPresent(
c -> logbookKinerja.setCapaian(Double.parseDouble(c.get("sumCapaian").toString())));
}
logbookKinerjaDao.save(logbookKinerja);
});
}
{
LogbookKinerjaDetailLogReqDto reqDto = LogbookKinerjaDetailLogReqDto.builder().catatanKinerjaId(norec)
.jenisLog(HAPUS).build();
logCatatanKinerjaService.save(reqDto);
}
});
}
}

View File

@ -0,0 +1,10 @@
package com.jasamedika.medifirst2000.enums;
/**
* @author salmanoe
* @version 1.0.0
* @since 31/10/2024
*/
public enum JenisLog {
BUAT, BACA, PERBARUI, HAPUS
}

View File

@ -0,0 +1,42 @@
package com.jasamedika.medifirst2000.dto;
import com.jasamedika.medifirst2000.enums.JenisLog;
import com.jasamedika.medifirst2000.helper.Caption;
import com.jasamedika.medifirst2000.vo.LogbookKinerjaDetailVO;
import com.jasamedika.medifirst2000.vo.PegawaiVO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
/**
* @author salmanoe
* @version 1.0.0
* @since 31/10/2024
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class LogbookKinerjaDetailLogDto {
@Caption(value = "Catatan Kinerja")
private LogbookKinerjaDetailVO catatanKinerja;
@NotNull(message = "Jenis log tidak boleh kosong")
private JenisLog jenisLog;
@Size(max = 300, message = "Keterangan maksimal {max} karakter")
@Caption(value = "Keterangan")
private String keterangan;
private Date tanggalDibuat;
@Caption(value = "Pegawai")
private PegawaiVO pegawai;
}

View File

@ -0,0 +1,34 @@
package com.jasamedika.medifirst2000.dto;
import com.jasamedika.medifirst2000.enums.JenisLog;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
/**
* @author salmanoe
* @version 1.0.0
* @since 05/11/2024
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class LogbookKinerjaDetailLogReqDto {
@Caption(value = "ID Catatan Kinerja")
private String catatanKinerjaId;
@NotNull(message = "Jenis log tidak boleh kosong")
private JenisLog jenisLog;
@Size(max = 300, message = "Keterangan maksimal {max} karakter")
@Caption(value = "Keterangan")
private String keterangan;
}

View File

@ -1,23 +1,22 @@
package com.jasamedika.medifirst2000.entities;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Getter
@Setter
@Entity
@Table(name = "sdm_logbookkinerja_t")
public class LogbookKinerja extends BaseTransaction {
private static final long serialVersionUID = -3476750878291376532L;
@Caption(value = "Bulan")
@Column(name = "bulan", nullable = false)
@Temporal(TemporalType.DATE)
@ -32,7 +31,7 @@ public class LogbookKinerja extends BaseTransaction {
private Double bobot;
@Caption(value = "Capaian")
@Column(name = "capaian", nullable = true, columnDefinition = "float8 default 0")
@Column(name = "capaian", columnDefinition = "float8 default 0")
private Double capaian;
@Column(name = "statusverifikasi", nullable = false)
@ -45,7 +44,7 @@ public class LogbookKinerja extends BaseTransaction {
@Caption(value = "Pegawai")
private Pegawai pegawai;
@Column(name = "objectpegawaifk", insertable = false, updatable = false, nullable = true)
@Column(name = "objectpegawaifk", insertable = false, updatable = false)
private Integer pegawaiId;
@ManyToOne
@ -54,7 +53,7 @@ public class LogbookKinerja extends BaseTransaction {
@Caption(value = "Jabatan")
private Jabatan jabatan;
@Column(name = "objectjabatanfk", insertable = false, updatable = false, nullable = true)
@Column(name = "objectjabatanfk", insertable = false, updatable = false)
private Integer jabatanId;
@ManyToOne
@ -63,95 +62,7 @@ public class LogbookKinerja extends BaseTransaction {
@Caption(value = "Indikator Kinerja")
private IndikatorKinerja indikatorKinerja;
@Column(name = "objectindikatorkinerjafk", insertable = false, updatable = false, nullable = true)
@Column(name = "objectindikatorkinerjafk", insertable = false, updatable = false)
private Integer indikatorKinerjaId;
public Date getBulan() {
return bulan;
}
public void setBulan(Date bulan) {
this.bulan = bulan;
}
public Double getTarget() {
return target;
}
public void setTarget(Double target) {
this.target = target;
}
public Double getBobot() {
return bobot;
}
public void setBobot(Double bobot) {
this.bobot = bobot;
}
public Double getCapaian() {
return capaian;
}
public void setCapaian(Double capaian) {
this.capaian = capaian;
}
public Boolean getStatusVerifikasi() {
return statusVerifikasi;
}
public void setStatusVerifikasi(Boolean statusVerifikasi) {
this.statusVerifikasi = statusVerifikasi;
}
public Pegawai getPegawai() {
return pegawai;
}
public void setPegawai(Pegawai pegawai) {
this.pegawai = pegawai;
}
public Integer getPegawaiId() {
return pegawaiId;
}
public void setPegawaiId(Integer pegawaiId) {
this.pegawaiId = pegawaiId;
}
public Jabatan getJabatan() {
return jabatan;
}
public void setJabatan(Jabatan jabatan) {
this.jabatan = jabatan;
}
public Integer getJabatanId() {
return jabatanId;
}
public void setJabatanId(Integer jabatanId) {
this.jabatanId = jabatanId;
}
public IndikatorKinerja getIndikatorKinerja() {
return indikatorKinerja;
}
public void setIndikatorKinerja(IndikatorKinerja indikatorKinerja) {
this.indikatorKinerja = indikatorKinerja;
}
public Integer getIndikatorKinerjaId() {
return indikatorKinerjaId;
}
public void setIndikatorKinerjaId(Integer indikatorKinerjaId) {
this.indikatorKinerjaId = indikatorKinerjaId;
}
}

View File

@ -1,24 +1,21 @@
package com.jasamedika.medifirst2000.entities;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Getter
@Setter
@Entity
@Table(name = "sdm_logbookkinerjadetail_t")
public class LogbookKinerjaDetail extends BaseTransaction {
private static final long serialVersionUID = -7534794958436007877L;
private static final long serialVersionUID = -775261066377264716L;
@Column(name = "namakegiatan", nullable = false)
@Caption(value = "Nama Kegiatan")
@ -28,7 +25,7 @@ public class LogbookKinerjaDetail extends BaseTransaction {
@Caption(value = "Capaian")
private Double capaian;
@Column(name = "catatan", nullable = true)
@Column(name = "catatan")
@Caption(value = "Catatan")
private String catatan;
@ -47,63 +44,7 @@ public class LogbookKinerjaDetail extends BaseTransaction {
@Caption(value = "Logbook Kinerja")
private LogbookKinerja logbookKinerja;
@Column(name = "objectlogbookkinerjafk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = true)
@Column(name = "objectlogbookkinerjafk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
private String logbookKinerjaId;
public String getNamaKegiatan() {
return namaKegiatan;
}
public void setNamaKegiatan(String namaKegiatan) {
this.namaKegiatan = namaKegiatan;
}
public Double getCapaian() {
return capaian;
}
public void setCapaian(Double capaian) {
this.capaian = capaian;
}
public String getCatatan() {
return catatan;
}
public void setCatatan(String catatan) {
this.catatan = catatan;
}
public Date getTanggalKegiatan() {
return tanggalKegiatan;
}
public void setTanggalKegiatan(Date tanggalKegiatan) {
this.tanggalKegiatan = tanggalKegiatan;
}
public Boolean getStatusVerifikasi() {
return statusVerifikasi;
}
public void setStatusVerifikasi(Boolean statusVerifikasi) {
this.statusVerifikasi = statusVerifikasi;
}
public LogbookKinerja getLogbookKinerja() {
return logbookKinerja;
}
public void setLogbookKinerja(LogbookKinerja logbookKinerja) {
this.logbookKinerja = logbookKinerja;
}
public String getLogbookKinerjaId() {
return logbookKinerjaId;
}
public void setLogbookKinerjaId(String logbookKinerjaId) {
this.logbookKinerjaId = logbookKinerjaId;
}
}

View File

@ -0,0 +1,58 @@
package com.jasamedika.medifirst2000.entities;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.enums.JenisLog;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.*;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import static javax.persistence.EnumType.STRING;
import static javax.persistence.TemporalType.TIMESTAMP;
/**
* @author salmanoe
* @version 1.0.0
* @since 31/10/2024
*/
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "sdm_logbookkinerjadetaillog_t")
public class LogbookKinerjaDetailLog extends BaseTransaction implements Serializable {
@OneToOne
@MapsId
@JoinColumn(name = "norec", columnDefinition = "CHAR(32)")
@NotNull(message = "Logbook tidak boleh kosong")
@Caption(value = "Logbook Kinerja")
private LogbookKinerjaDetail catatanKinerja;
@Column(length = 30, nullable = false)
@Enumerated(STRING)
@NotNull(message = "Jenis log tidak boleh kosong")
private JenisLog jenisLog;
@Column(length = 300)
@Size(max = 300, message = "Keterangan maksimal {max} karakter")
@Caption(value = "Keterangan")
private String keterangan;
@Temporal(TIMESTAMP)
private Date tanggalDibuat;
@ManyToOne
@NotNull(message = "Pegawai tidak boleh kosong")
@JoinColumn(name = "objectpegawaifk", nullable = false)
@Caption(value = "Pegawai")
private Pegawai pegawai;
}