From 79930775719e40217ef8d24a05ae3d343a9c59cd Mon Sep 17 00:00:00 2001 From: Salman Manoe Date: Mon, 18 Nov 2024 13:33:01 +0700 Subject: [PATCH] Update service pelayanan pasien Penyesuaian validasi produk paket persalinan saja yang menggunankan kode voucher ibu --- .../medifirst2000/dao/MapProdukPaketDao.java | 2 + .../impl/PelayananPasienServiceImpl.java | 30 +++++++--- .../entities/MapProdukPaket.java | 8 +-- .../medifirst2000/vo/MapProdukPaketVO.java | 3 - .../controller/PelayananController.java | 57 ++++++++++--------- 5 files changed, 53 insertions(+), 47 deletions(-) diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/MapProdukPaketDao.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/MapProdukPaketDao.java index b5a5b914..bece140e 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/MapProdukPaketDao.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/MapProdukPaketDao.java @@ -13,9 +13,11 @@ import java.util.Set; * @since 21 Sep 2023 */ public interface MapProdukPaketDao extends JpaRepository { + @Query("select mpaket.paketId from MapProdukPaket mpaket") Set findPaketId(); @Query("select mpaket.produkEntriId from MapProdukPaket mpaket") List findProdukEntriId(); + } diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/PelayananPasienServiceImpl.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/PelayananPasienServiceImpl.java index f249b7ba..60d172e5 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/PelayananPasienServiceImpl.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/PelayananPasienServiceImpl.java @@ -46,6 +46,7 @@ import static com.jasamedika.medifirst2000.constants.Master.Ruangan.*; import static com.jasamedika.medifirst2000.constants.Master.SubUnitKerja.*; import static com.jasamedika.medifirst2000.constants.Master.TipePegawai.PURNA_WAKTU; import static com.jasamedika.medifirst2000.constants.Master.UnitKerja.KSM_OBGYN; +import static com.jasamedika.medifirst2000.entities.constant.TipePaket.PERSALINAN; import static com.jasamedika.medifirst2000.enums.JenisMappingProdukPaket.PERAWAT; import static com.jasamedika.medifirst2000.enums.JenisMappingProdukPaket.TINDAKAN_UTAMA; @@ -151,6 +152,9 @@ public class PelayananPasienServiceImpl extends BaseVoServiceImpl implements Pel @Autowired private MapJabatanProfesiDao mapJabatanProfesiDao; + @Autowired + private ProdukPaketDao produkPaketDao; + @Override public Map savePelayananPasien(PelayananPasienVO vo) { Map result = new HashMap<>(); @@ -3663,6 +3667,7 @@ public class PelayananPasienServiceImpl extends BaseVoServiceImpl implements Pel private void diskonPaket(String kodeVoucher, List dtoList) { VoucherPaket voucher = getVoucher(kodeVoucher, false); + Optional produkPaket = produkPaketDao.findById(voucher.getPaketId()); List norecPelayanan = dtoList.stream().map(TagihanPendaftaranDto::getNoRec) .collect(Collectors.toList()); List byNorecPelayanan = pelayananPasienDao.findAll(norecPelayanan); @@ -3675,11 +3680,14 @@ public class PelayananPasienServiceImpl extends BaseVoServiceImpl implements Pel Integer ibuId = null; if (CommonUtil.isNotNullOrEmpty(ibuNoCm)) ibuId = pasienDao.findIdByNoCm(ibuNoCm); - if ((CommonUtil.isNotNullOrEmpty(ibuId) && !voucher.getPasienId().equals(ibuId)) - || (CommonUtil.isNullOrEmpty(ibuId) && !voucher.getPasienId().equals(pasienId))) - throw new ServiceVOException("Kode voucher tidak sesuai dengan pasien yang diperuntukkan"); - p.setVoucherPaket(voucher); - pasienDaftarDao.save(p); + if (CommonUtil.isNotNullOrEmpty(produkPaket) && produkPaket.isPresent() + && PERSALINAN.equals(produkPaket.get().getTipePaket())) { + if ((CommonUtil.isNotNullOrEmpty(ibuId) && !voucher.getPasienId().equals(ibuId)) + || (CommonUtil.isNullOrEmpty(ibuId) && !voucher.getPasienId().equals(pasienId))) + throw new ServiceVOException("Kode voucher tidak sesuai dengan pasien yang diperuntukkan"); + p.setVoucherPaket(voucher); + pasienDaftarDao.save(p); + } }); } { @@ -3945,15 +3953,19 @@ public class PelayananPasienServiceImpl extends BaseVoServiceImpl implements Pel if (noRegistrasi.isEmpty()) throw new ServiceVOException("Nomor registrasi harus diisi"); VoucherPaket voucher = getVoucher(kodeVoucher, basicValidation); + Optional produkPaket = produkPaketDao.findById(voucher.getPaketId()); PasienDaftar pendaftaran = pasienDaftarDao.findByNoRegistrasi(noRegistrasi); String ibuNoCm = pendaftaran.getPasien().getReportDisplay(); Integer ibuId = null; if (CommonUtil.isNotNullOrEmpty(ibuNoCm)) ibuId = pasienDao.findIdByNoCm(ibuNoCm); - if ((CommonUtil.isNotNullOrEmpty(ibuId) && !voucher.getPasienId().equals(ibuId)) - || (CommonUtil.isNullOrEmpty(ibuId) && CommonUtil.isNotNullOrEmpty(pendaftaran) - && !pendaftaran.getPasien().getId().equals(voucher.getPasienId()))) - throw new ServiceVOException("Kode voucher tidak sesuai dengan pasien yang diperuntukkan"); + if (CommonUtil.isNotNullOrEmpty(produkPaket) && produkPaket.isPresent() + && PERSALINAN.equals(produkPaket.get().getTipePaket())) { + if ((CommonUtil.isNotNullOrEmpty(ibuId) && !voucher.getPasienId().equals(ibuId)) + || (CommonUtil.isNullOrEmpty(ibuId) && CommonUtil.isNotNullOrEmpty(pendaftaran) + && !pendaftaran.getPasien().getId().equals(voucher.getPasienId()))) + throw new ServiceVOException("Kode voucher tidak sesuai dengan pasien yang diperuntukkan"); + } return voucher; } diff --git a/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/MapProdukPaket.java b/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/MapProdukPaket.java index 6390a497..11afbe4e 100644 --- a/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/MapProdukPaket.java +++ b/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/MapProdukPaket.java @@ -1,7 +1,6 @@ package com.jasamedika.medifirst2000.entities; import com.jasamedika.medifirst2000.base.BaseTransaction; -import com.jasamedika.medifirst2000.entities.constant.JenisPaket; import com.jasamedika.medifirst2000.enums.JenisMappingProdukPaket; import com.jasamedika.medifirst2000.helper.Caption; import lombok.Getter; @@ -9,7 +8,6 @@ import lombok.Setter; import javax.persistence.*; import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; import static javax.persistence.EnumType.STRING; import static javax.persistence.FetchType.LAZY; @@ -25,6 +23,7 @@ import static javax.persistence.FetchType.LAZY; @Table(name = "mapprodukpaket_m", uniqueConstraints = { @UniqueConstraint(columnNames = { "paketfk", "produkPaketfk" }), }) public class MapProdukPaket extends BaseTransaction { + @ManyToOne(fetch = LAZY) @JoinColumn(name = "paketfk") @NotNull(message = "Paket tidak boleh kosong") @@ -54,9 +53,4 @@ public class MapProdukPaket extends BaseTransaction { @Caption(value = "Status Aktif") private Boolean isAktif; - @Column(length = 30) - @Enumerated(STRING) - @Size(max = 30, message = "Jenis paket maksimal {max} karakter") - @Caption(value = "Jenis paket") - private JenisPaket jenisPaket; } diff --git a/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/vo/MapProdukPaketVO.java b/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/vo/MapProdukPaketVO.java index 200bea4f..c1c56efd 100644 --- a/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/vo/MapProdukPaketVO.java +++ b/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/vo/MapProdukPaketVO.java @@ -3,7 +3,6 @@ package com.jasamedika.medifirst2000.vo; import com.fasterxml.jackson.annotation.JsonInclude; import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO; import com.jasamedika.medifirst2000.entities.ProdukDto; -import com.jasamedika.medifirst2000.entities.constant.JenisPaket; import com.jasamedika.medifirst2000.enums.JenisMappingProdukPaket; import com.jasamedika.medifirst2000.helper.Caption; import lombok.Getter; @@ -42,6 +41,4 @@ public class MapProdukPaketVO extends BaseTransactionVO { @Caption(value = "Status Aktif") private Boolean isAktif; - @Caption(value = "Jenis paket") - private JenisPaket jenisPaket; } diff --git a/jasamedika-pelayanan/src/main/java/com/jasamedika/medifirst2000/controller/PelayananController.java b/jasamedika-pelayanan/src/main/java/com/jasamedika/medifirst2000/controller/PelayananController.java index fbf152db..f26fe82c 100644 --- a/jasamedika-pelayanan/src/main/java/com/jasamedika/medifirst2000/controller/PelayananController.java +++ b/jasamedika-pelayanan/src/main/java/com/jasamedika/medifirst2000/controller/PelayananController.java @@ -59,11 +59,11 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException sve) { - LOGGER.error("Got exception {} when calculate indikator pelayanan", sve.getMessage()); + LOGGER.error("Got ServiceVOException {} when calculate indikator pelayanan", sve.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, sve.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when calculate indikator pelayanan", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when calculate indikator pelayanan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -78,11 +78,11 @@ public class PelayananController extends LocaleController { return RestUtil.getJsonResponse(result, HttpStatus.OK); } catch (ServiceVOException e) { - LOGGER.error("Got exception {} when validate nama produk", e.getMessage()); + LOGGER.error("Got ServiceVOException {} when validate nama produk", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when validate nama produk", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when validate nama produk", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -95,11 +95,11 @@ public class PelayananController extends LocaleController { Map result = produkService.getMappingPaketToProduk(idMapping); return RestUtil.getJsonResponse(result, HttpStatus.OK); } catch (ServiceVOException e) { - LOGGER.error("Got exception {} when get mapping paket to produk", e.getMessage()); + LOGGER.error("Got ServiceVOException {} when get mapping paket to produk", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when get mapping paket to produk", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when get mapping paket to produk", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -113,11 +113,11 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException sve) { - LOGGER.error("Got exception {} when get all data paket to produk", sve.getMessage()); + LOGGER.error("Got ServiceVOException {} when get all data paket to produk", sve.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, sve.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when get all data paket to produk", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when get all data paket to produk", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -131,11 +131,11 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException sve) { - LOGGER.error("Got exception {} when get all master satuan standar distinct on", sve.getMessage()); + LOGGER.error("Got ServiceVOException {} when get all master satuan standar distinct on", sve.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, sve.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when get all master satuan standar distinct on", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when get all master satuan standar distinct on", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -152,11 +152,11 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { - LOGGER.error("Got exception {} when klaim diskon karyawan", e.getMessage()); + LOGGER.error("Got ServiceVOException {} when klaim diskon karyawan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when klaim diskon karyawan", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when klaim diskon karyawan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -172,11 +172,11 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { - LOGGER.error("Got exception {} when klaim diskon karyawan", e.getMessage()); + LOGGER.error("Got ServiceVOException {} when reset klaim diskon karyawan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when klaim diskon karyawan", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when reset klaim diskon karyawan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -193,11 +193,11 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { - LOGGER.error("Got exception {} when check existing harga produk kelas", e.getMessage()); + LOGGER.error("Got ServiceVOException {} when check existing harga produk kelas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when check existing harga produk kelas", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when check existing harga produk kelas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -212,11 +212,11 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { - LOGGER.error("Got exception {} when get daftar tagihan {}", e.getMessage(), noRegistrasi); + LOGGER.error("Got ServiceVOException {} when get daftar tagihan {}", e.getMessage(), noRegistrasi); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when get daftar tagihan {}", jse.getMessage(), noRegistrasi); + LOGGER.error("Got JpaSystemException {} when get daftar tagihan {}", jse.getMessage(), noRegistrasi); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -232,12 +232,12 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(dtoList, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { - LOGGER.error("Got exception {} when simpan diskon tagihan", e.getMessage()); + LOGGER.error("Got ServiceVOException {} when simpan diskon tagihan", e.getMessage()); Map error = new HashMap<>(); error.put("bad_request", e.getMessage()); return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when simpan diskon tagihan", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when simpan diskon tagihan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -251,12 +251,12 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(dto, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { - LOGGER.error("Got exception {} when batal diskon paket", e.getMessage()); + LOGGER.error("Got ServiceVOException {} when batal diskon paket", e.getMessage()); Map error = new HashMap<>(); error.put("bad_request", e.getMessage()); return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when batal diskon paket", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when batal diskon paket", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -271,12 +271,12 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(validVoucher, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { - LOGGER.error("Got exception {} when check voucher validity", e.getMessage()); + LOGGER.error("Got ServiceVOException {} when check voucher validity", e.getMessage()); Map error = new HashMap<>(); error.put("bad_request", e.getMessage()); return RestUtil.getJsonResponse(false, HttpStatus.BAD_REQUEST, error); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when check voucher validity", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when check voucher validity", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -291,12 +291,12 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(vos, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { - LOGGER.error("Got exception {} when simpan mapping list produk paket", e.getMessage()); + LOGGER.error("Got ServiceVOException {} when simpan mapping list produk paket", e.getMessage()); Map error = new HashMap<>(); error.put("bad_request", e.getMessage()); return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when simpan mapping list produk paket", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when simpan mapping list produk paket", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } @@ -311,14 +311,15 @@ public class PelayananController extends LocaleController { getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(vos, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { - LOGGER.error("Got exception {} when simpan mapping entri produk paket", e.getMessage()); + LOGGER.error("Got ServiceVOException {} when simpan mapping entri produk paket", e.getMessage()); Map error = new HashMap<>(); error.put("bad_request", e.getMessage()); return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error); } catch (JpaSystemException jse) { - LOGGER.error("Got exception {} when simpan mapping entri produk paket", jse.getMessage()); + LOGGER.error("Got JpaSystemException {} when simpan mapping entri produk paket", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } + }