Update SkoringTindakanMedisService

Penerapan number format untuk skoring tindakan medis
This commit is contained in:
Salman Manoe 2022-03-09 09:09:54 +07:00
parent 1a13b34fc8
commit 8221374c7a

View File

@ -196,6 +196,8 @@ public class SkoringTindakanMedisServiceImpl extends BaseVoServiceImpl implement
@Override
public List<Map<String, Object>> findAllEnabled(List<Integer> listIdKelompokKerja, String namaProduk,
String detailProduk, Boolean statusVerifikasi) throws JpaSystemException {
NumberFormat nf = NumberFormat.getInstance();
List<Map<String, Object>> result = new ArrayList<>();
List<Map<String, Object>> data = new ArrayList<>();
List<Map<String, Object>> filter = new ArrayList<>();
@ -278,6 +280,7 @@ public class SkoringTindakanMedisServiceImpl extends BaseVoServiceImpl implement
for (Map<String, Object> mapData : data) {
if (mapFilter.get("produkId").equals(mapData.get("produkId"))
&& mapFilter.get("kelompokKerjaId").equals(mapData.get("kelompokKerjaId"))) {
mapData.put("skor", nf.format(Double.parseDouble(mapData.get("skor").toString())));
result.add(mapData);
break;
}
@ -560,7 +563,6 @@ public class SkoringTindakanMedisServiceImpl extends BaseVoServiceImpl implement
tempList.addAll(Arrays.asList(Master.DetailJenisProduk.PENUNJANG_PATOLOGI_ANATOMI));
tempList.addAll(Arrays.asList(Master.DetailJenisProduk.PENUNJANG_PATOLOGI_KLINIK));
tempList.addAll(Arrays.asList(Master.DetailJenisProduk.PENUNJANG_RADIOLOGI));
tempList.addAll(Arrays.asList(Master.DetailJenisProduk.LABORATORIUM));
List<Integer> listIdDetailJenisProdukLogbookSkor = tempList.stream().sorted().distinct()
.collect(Collectors.toList());