自定义报表优化处理
This commit is contained in:
@@ -848,7 +848,6 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
System.out.println(sql);
|
||||
}
|
||||
|
||||
|
||||
List<Map<String, Object>> mapList = influxDbUtils.getMapResult(sql.toString());
|
||||
if (CollUtil.isEmpty(mapList)) {
|
||||
data = data.stream().peek(item -> item.setValue("/")).collect(Collectors.toList());
|
||||
@@ -870,30 +869,26 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
}
|
||||
|
||||
//判断是否越限
|
||||
String key = item.getLimitName() + "#" + item.getStatMethod().toLowerCase() + "#pq_overlimit";
|
||||
if (limitMap.containsKey(key)) {
|
||||
ReportTemplateDTO tem = limitMap.get(key);
|
||||
double limitVal = Double.parseDouble(tem.getValue());
|
||||
if (v > limitVal) {
|
||||
tem.setOverLimitFlag(1);
|
||||
tem.setValue(tem.getValue());
|
||||
assNoPassMap.put(key, tem);
|
||||
} else if (!assNoPassMap.containsKey(key)) {
|
||||
tem.setOverLimitFlag(0);
|
||||
assNoPassMap.put(key, tem);
|
||||
tem.setValue(tem.getValue());
|
||||
if(limitMap.size()!=0) {
|
||||
String key = item.getLimitName() + "#" + item.getStatMethod().toLowerCase() + "#pq_overlimit";
|
||||
if (limitMap.containsKey(key)) {
|
||||
ReportTemplateDTO tem = limitMap.get(key);
|
||||
double limitVal = Double.parseDouble(tem.getValue());
|
||||
if (v > limitVal) {
|
||||
tem.setOverLimitFlag(1);
|
||||
|
||||
assNoPassMap.put(key, tem);
|
||||
} else if (!assNoPassMap.containsKey(key)) {
|
||||
tem.setOverLimitFlag(0);
|
||||
assNoPassMap.put(key, tem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
item.setValue("/");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
endList.addAll(data);
|
||||
}
|
||||
|
||||
@@ -972,8 +967,13 @@ public class CustomReportServiceImpl implements CustomReportService {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//处理合格率
|
||||
assNoPassMap.forEach((key, val) -> {
|
||||
limitTargetMapX.remove(key);
|
||||
if("Voltage_Dev".equals(val.getTemplateName())||"Freq_Dev".equals(val.getTemplateName())){
|
||||
val.setValue("±"+val.getValue());
|
||||
}
|
||||
if (val.getOverLimitFlag() == 1) {
|
||||
val.setValue("不合格 ("+val.getValue()+")");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user