Update service pelayanan pasien
Penyesuaian validasi produk paket persalinan saja yang menggunankan kode voucher ibu
This commit is contained in:
parent
1c1ae2d23e
commit
7993077571
@ -13,9 +13,11 @@ import java.util.Set;
|
|||||||
* @since 21 Sep 2023
|
* @since 21 Sep 2023
|
||||||
*/
|
*/
|
||||||
public interface MapProdukPaketDao extends JpaRepository<MapProdukPaket, String> {
|
public interface MapProdukPaketDao extends JpaRepository<MapProdukPaket, String> {
|
||||||
|
|
||||||
@Query("select mpaket.paketId from MapProdukPaket mpaket")
|
@Query("select mpaket.paketId from MapProdukPaket mpaket")
|
||||||
Set<Integer> findPaketId();
|
Set<Integer> findPaketId();
|
||||||
|
|
||||||
@Query("select mpaket.produkEntriId from MapProdukPaket mpaket")
|
@Query("select mpaket.produkEntriId from MapProdukPaket mpaket")
|
||||||
List<Integer> findProdukEntriId();
|
List<Integer> findProdukEntriId();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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.SubUnitKerja.*;
|
||||||
import static com.jasamedika.medifirst2000.constants.Master.TipePegawai.PURNA_WAKTU;
|
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.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.PERAWAT;
|
||||||
import static com.jasamedika.medifirst2000.enums.JenisMappingProdukPaket.TINDAKAN_UTAMA;
|
import static com.jasamedika.medifirst2000.enums.JenisMappingProdukPaket.TINDAKAN_UTAMA;
|
||||||
|
|
||||||
@ -151,6 +152,9 @@ public class PelayananPasienServiceImpl extends BaseVoServiceImpl implements Pel
|
|||||||
@Autowired
|
@Autowired
|
||||||
private MapJabatanProfesiDao mapJabatanProfesiDao;
|
private MapJabatanProfesiDao mapJabatanProfesiDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ProdukPaketDao produkPaketDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> savePelayananPasien(PelayananPasienVO vo) {
|
public Map<String, Object> savePelayananPasien(PelayananPasienVO vo) {
|
||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
@ -3663,6 +3667,7 @@ public class PelayananPasienServiceImpl extends BaseVoServiceImpl implements Pel
|
|||||||
|
|
||||||
private void diskonPaket(String kodeVoucher, List<TagihanPendaftaranDto> dtoList) {
|
private void diskonPaket(String kodeVoucher, List<TagihanPendaftaranDto> dtoList) {
|
||||||
VoucherPaket voucher = getVoucher(kodeVoucher, false);
|
VoucherPaket voucher = getVoucher(kodeVoucher, false);
|
||||||
|
Optional<ProdukPaket> produkPaket = produkPaketDao.findById(voucher.getPaketId());
|
||||||
List<String> norecPelayanan = dtoList.stream().map(TagihanPendaftaranDto::getNoRec)
|
List<String> norecPelayanan = dtoList.stream().map(TagihanPendaftaranDto::getNoRec)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
List<PelayananPasien> byNorecPelayanan = pelayananPasienDao.findAll(norecPelayanan);
|
List<PelayananPasien> byNorecPelayanan = pelayananPasienDao.findAll(norecPelayanan);
|
||||||
@ -3675,11 +3680,14 @@ public class PelayananPasienServiceImpl extends BaseVoServiceImpl implements Pel
|
|||||||
Integer ibuId = null;
|
Integer ibuId = null;
|
||||||
if (CommonUtil.isNotNullOrEmpty(ibuNoCm))
|
if (CommonUtil.isNotNullOrEmpty(ibuNoCm))
|
||||||
ibuId = pasienDao.findIdByNoCm(ibuNoCm);
|
ibuId = pasienDao.findIdByNoCm(ibuNoCm);
|
||||||
if ((CommonUtil.isNotNullOrEmpty(ibuId) && !voucher.getPasienId().equals(ibuId))
|
if (CommonUtil.isNotNullOrEmpty(produkPaket) && produkPaket.isPresent()
|
||||||
|| (CommonUtil.isNullOrEmpty(ibuId) && !voucher.getPasienId().equals(pasienId)))
|
&& PERSALINAN.equals(produkPaket.get().getTipePaket())) {
|
||||||
throw new ServiceVOException("Kode voucher tidak sesuai dengan pasien yang diperuntukkan");
|
if ((CommonUtil.isNotNullOrEmpty(ibuId) && !voucher.getPasienId().equals(ibuId))
|
||||||
p.setVoucherPaket(voucher);
|
|| (CommonUtil.isNullOrEmpty(ibuId) && !voucher.getPasienId().equals(pasienId)))
|
||||||
pasienDaftarDao.save(p);
|
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())
|
if (noRegistrasi.isEmpty())
|
||||||
throw new ServiceVOException("Nomor registrasi harus diisi");
|
throw new ServiceVOException("Nomor registrasi harus diisi");
|
||||||
VoucherPaket voucher = getVoucher(kodeVoucher, basicValidation);
|
VoucherPaket voucher = getVoucher(kodeVoucher, basicValidation);
|
||||||
|
Optional<ProdukPaket> produkPaket = produkPaketDao.findById(voucher.getPaketId());
|
||||||
PasienDaftar pendaftaran = pasienDaftarDao.findByNoRegistrasi(noRegistrasi);
|
PasienDaftar pendaftaran = pasienDaftarDao.findByNoRegistrasi(noRegistrasi);
|
||||||
String ibuNoCm = pendaftaran.getPasien().getReportDisplay();
|
String ibuNoCm = pendaftaran.getPasien().getReportDisplay();
|
||||||
Integer ibuId = null;
|
Integer ibuId = null;
|
||||||
if (CommonUtil.isNotNullOrEmpty(ibuNoCm))
|
if (CommonUtil.isNotNullOrEmpty(ibuNoCm))
|
||||||
ibuId = pasienDao.findIdByNoCm(ibuNoCm);
|
ibuId = pasienDao.findIdByNoCm(ibuNoCm);
|
||||||
if ((CommonUtil.isNotNullOrEmpty(ibuId) && !voucher.getPasienId().equals(ibuId))
|
if (CommonUtil.isNotNullOrEmpty(produkPaket) && produkPaket.isPresent()
|
||||||
|| (CommonUtil.isNullOrEmpty(ibuId) && CommonUtil.isNotNullOrEmpty(pendaftaran)
|
&& PERSALINAN.equals(produkPaket.get().getTipePaket())) {
|
||||||
&& !pendaftaran.getPasien().getId().equals(voucher.getPasienId())))
|
if ((CommonUtil.isNotNullOrEmpty(ibuId) && !voucher.getPasienId().equals(ibuId))
|
||||||
throw new ServiceVOException("Kode voucher tidak sesuai dengan pasien yang diperuntukkan");
|
|| (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;
|
return voucher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package com.jasamedika.medifirst2000.entities;
|
package com.jasamedika.medifirst2000.entities;
|
||||||
|
|
||||||
import com.jasamedika.medifirst2000.base.BaseTransaction;
|
import com.jasamedika.medifirst2000.base.BaseTransaction;
|
||||||
import com.jasamedika.medifirst2000.entities.constant.JenisPaket;
|
|
||||||
import com.jasamedika.medifirst2000.enums.JenisMappingProdukPaket;
|
import com.jasamedika.medifirst2000.enums.JenisMappingProdukPaket;
|
||||||
import com.jasamedika.medifirst2000.helper.Caption;
|
import com.jasamedika.medifirst2000.helper.Caption;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@ -9,7 +8,6 @@ import lombok.Setter;
|
|||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
import static javax.persistence.EnumType.STRING;
|
import static javax.persistence.EnumType.STRING;
|
||||||
import static javax.persistence.FetchType.LAZY;
|
import static javax.persistence.FetchType.LAZY;
|
||||||
@ -25,6 +23,7 @@ import static javax.persistence.FetchType.LAZY;
|
|||||||
@Table(name = "mapprodukpaket_m", uniqueConstraints = {
|
@Table(name = "mapprodukpaket_m", uniqueConstraints = {
|
||||||
@UniqueConstraint(columnNames = { "paketfk", "produkPaketfk" }), })
|
@UniqueConstraint(columnNames = { "paketfk", "produkPaketfk" }), })
|
||||||
public class MapProdukPaket extends BaseTransaction {
|
public class MapProdukPaket extends BaseTransaction {
|
||||||
|
|
||||||
@ManyToOne(fetch = LAZY)
|
@ManyToOne(fetch = LAZY)
|
||||||
@JoinColumn(name = "paketfk")
|
@JoinColumn(name = "paketfk")
|
||||||
@NotNull(message = "Paket tidak boleh kosong")
|
@NotNull(message = "Paket tidak boleh kosong")
|
||||||
@ -54,9 +53,4 @@ public class MapProdukPaket extends BaseTransaction {
|
|||||||
@Caption(value = "Status Aktif")
|
@Caption(value = "Status Aktif")
|
||||||
private Boolean isAktif;
|
private Boolean isAktif;
|
||||||
|
|
||||||
@Column(length = 30)
|
|
||||||
@Enumerated(STRING)
|
|
||||||
@Size(max = 30, message = "Jenis paket maksimal {max} karakter")
|
|
||||||
@Caption(value = "Jenis paket")
|
|
||||||
private JenisPaket jenisPaket;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package com.jasamedika.medifirst2000.vo;
|
|||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
|
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
|
||||||
import com.jasamedika.medifirst2000.entities.ProdukDto;
|
import com.jasamedika.medifirst2000.entities.ProdukDto;
|
||||||
import com.jasamedika.medifirst2000.entities.constant.JenisPaket;
|
|
||||||
import com.jasamedika.medifirst2000.enums.JenisMappingProdukPaket;
|
import com.jasamedika.medifirst2000.enums.JenisMappingProdukPaket;
|
||||||
import com.jasamedika.medifirst2000.helper.Caption;
|
import com.jasamedika.medifirst2000.helper.Caption;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@ -42,6 +41,4 @@ public class MapProdukPaketVO extends BaseTransactionVO {
|
|||||||
@Caption(value = "Status Aktif")
|
@Caption(value = "Status Aktif")
|
||||||
private Boolean isAktif;
|
private Boolean isAktif;
|
||||||
|
|
||||||
@Caption(value = "Jenis paket")
|
|
||||||
private JenisPaket jenisPaket;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,11 +59,11 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException sve) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, sve.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -78,11 +78,11 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
|
|
||||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||||
} catch (ServiceVOException e) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -95,11 +95,11 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
Map<String, Object> result = produkService.getMappingPaketToProduk(idMapping);
|
Map<String, Object> result = produkService.getMappingPaketToProduk(idMapping);
|
||||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||||
} catch (ServiceVOException e) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -113,11 +113,11 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException sve) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, sve.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -131,11 +131,11 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException sve) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, sve.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -152,11 +152,11 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException e) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -172,11 +172,11 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException e) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -193,11 +193,11 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException e) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -212,11 +212,11 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException e) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -232,12 +232,12 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(dtoList, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(dtoList, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException e) {
|
} catch (ServiceVOException e) {
|
||||||
LOGGER.error("Got exception {} when simpan diskon tagihan", e.getMessage());
|
LOGGER.error("Got ServiceVOException {} when simpan diskon tagihan", e.getMessage());
|
||||||
Map<String, String> error = new HashMap<>();
|
Map<String, String> error = new HashMap<>();
|
||||||
error.put("bad_request", e.getMessage());
|
error.put("bad_request", e.getMessage());
|
||||||
return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error);
|
return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -251,12 +251,12 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(dto, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(dto, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException e) {
|
} catch (ServiceVOException e) {
|
||||||
LOGGER.error("Got exception {} when batal diskon paket", e.getMessage());
|
LOGGER.error("Got ServiceVOException {} when batal diskon paket", e.getMessage());
|
||||||
Map<String, String> error = new HashMap<>();
|
Map<String, String> error = new HashMap<>();
|
||||||
error.put("bad_request", e.getMessage());
|
error.put("bad_request", e.getMessage());
|
||||||
return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error);
|
return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -271,12 +271,12 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(validVoucher, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(validVoucher, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException e) {
|
} catch (ServiceVOException e) {
|
||||||
LOGGER.error("Got exception {} when check voucher validity", e.getMessage());
|
LOGGER.error("Got ServiceVOException {} when check voucher validity", e.getMessage());
|
||||||
Map<String, String> error = new HashMap<>();
|
Map<String, String> error = new HashMap<>();
|
||||||
error.put("bad_request", e.getMessage());
|
error.put("bad_request", e.getMessage());
|
||||||
return RestUtil.getJsonResponse(false, HttpStatus.BAD_REQUEST, error);
|
return RestUtil.getJsonResponse(false, HttpStatus.BAD_REQUEST, error);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -291,12 +291,12 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(vos, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(vos, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException e) {
|
} 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<String, String> error = new HashMap<>();
|
Map<String, String> error = new HashMap<>();
|
||||||
error.put("bad_request", e.getMessage());
|
error.put("bad_request", e.getMessage());
|
||||||
return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error);
|
return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
@ -311,14 +311,15 @@ public class PelayananController extends LocaleController<PelayananPasienVO> {
|
|||||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||||
return RestUtil.getJsonResponse(vos, HttpStatus.OK, mapHeaderMessage);
|
return RestUtil.getJsonResponse(vos, HttpStatus.OK, mapHeaderMessage);
|
||||||
} catch (ServiceVOException e) {
|
} 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<String, String> error = new HashMap<>();
|
Map<String, String> error = new HashMap<>();
|
||||||
error.put("bad_request", e.getMessage());
|
error.put("bad_request", e.getMessage());
|
||||||
return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error);
|
return RestUtil.getJsonResponse(null, HttpStatus.BAD_REQUEST, error);
|
||||||
} catch (JpaSystemException jse) {
|
} 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());
|
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||||
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user