|
@ -65,8 +65,13 @@ public abstract class DataQualityBaseService extends BaseJpaService {
|
|
|
totalMap.put("name", name);
|
|
|
totalMap.put("count", platformNum);
|
|
|
totalMap.put("total", orgNum);
|
|
|
double rate = calDoubleRate(platformNum, orgNum);
|
|
|
totalMap.put("rate", rate + "%");
|
|
|
if (orgNum == 0 ){
|
|
|
totalMap.put("rate", "--");
|
|
|
}else {
|
|
|
double rate = calDoubleRate(platformNum, orgNum);
|
|
|
totalMap.put("rate", rate + "%");
|
|
|
}
|
|
|
|
|
|
return totalMap;
|
|
|
}
|
|
|
|
|
@ -77,7 +82,11 @@ public abstract class DataQualityBaseService extends BaseJpaService {
|
|
|
public void rateComparator(List<Map<String, Object>> list ){
|
|
|
comparator(list,"rate",1);
|
|
|
list.forEach(map->{
|
|
|
map.put("rate",map.get("rate") + "%");
|
|
|
if (map.get("total") == null || (double) map.get("total") == 0) {
|
|
|
map.put("rate","--");
|
|
|
}else {
|
|
|
map.put("rate",map.get("rate") + "%");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
@ -89,6 +98,7 @@ public abstract class DataQualityBaseService extends BaseJpaService {
|
|
|
*/
|
|
|
public void comparator(List<Map<String, Object>> list ,String orderField,int order){
|
|
|
Collections.sort(list, new Comparator<Map<String, Object>>() {
|
|
|
@Override
|
|
|
public int compare(Map<String, Object> o1, Map<String, Object> o2) {
|
|
|
if (order==0) {
|
|
|
return getDoubleValue(o1.get(orderField)).compareTo(getDoubleValue(o2.get(orderField)));
|