Update TargetSkorDokterService
Perbaikan format penulisan total target skor di menu monitoring target skor dokter
This commit is contained in:
parent
8ea721dd66
commit
3a208c8fcd
@ -1,6 +1,7 @@
|
||||
package com.jasamedika.medifirst2000.service.impl;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -211,11 +212,14 @@ public class TargetSkorDokterServiceImpl extends BaseVoServiceImpl implements Ta
|
||||
public List<Map<String, Object>> findAll(Long tahun) throws JpaSystemException {
|
||||
DateFormat tf = new SimpleDateFormat("yyyy");
|
||||
|
||||
NumberFormat nf = NumberFormat.getInstance();
|
||||
nf.setMinimumFractionDigits(2);
|
||||
|
||||
List<Map<String, Object>> result = targetSkorDao.findAll(tf.format(new Date(tahun)));
|
||||
for (Map<String, Object> rs : result) {
|
||||
double totalTargetSkor = Double.parseDouble(rs.get("totalTargetSkor").toString());
|
||||
|
||||
rs.put("totalTargetSkor", MathUtil.round(totalTargetSkor, 2));
|
||||
rs.put("totalTargetSkor", nf.format(MathUtil.round(totalTargetSkor, 2)));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user