}
}
private void buildProblemReportResult(ProblemReport problemReport, String ip, String type, String name,
Map<String, String> data) {
ProblemStatistics problemStatistics = new ProblemStatistics();
if (ip.equalsIgnoreCase(Payload.ALL)) {
problemStatistics.setAllIp(true);
} else {
problemStatistics.setIp(ip);
}
problemStatistics.visitProblemReport(problemReport);
if (StringUtils.isEmpty(name) && StringUtils.isEmpty(type)) {
Map<String, TypeStatistics> status = problemStatistics.getStatus();
for (Entry<String, TypeStatistics> temp : status.entrySet()) {
String key = temp.getKey();
TypeStatistics value = temp.getValue();
data.put(key + COUNT, String.valueOf(value.getCount()));
}
} else if (StringUtils.isEmpty(name) && !StringUtils.isEmpty(type)) {
Map<String, TypeStatistics> status = problemStatistics.getStatus();
TypeStatistics value = status.get(type);
if (value != null) {
data.put(COUNT, String.valueOf(value.getCount()));
for (Entry<String, StatusStatistics> temp : value.getStatus().entrySet()) {
data.put(temp.getKey() + COUNT, String.valueOf(temp.getValue().getCount()));
}
}
} else if (!StringUtils.isEmpty(name) && !StringUtils.isEmpty(type)) {
Map<String, TypeStatistics> status = problemStatistics.getStatus();
TypeStatistics value = status.get(type);
if (value != null) {
StatusStatistics nameValue = value.getStatus().get(name);
if (nameValue != null) {