|
@@ -105,7 +105,7 @@ public class StatisticsController extends BaseController {
|
|
|
long t1 = System.currentTimeMillis();
|
|
|
List<Statistics> countPfl = statisticsService.countPfl(statistics);
|
|
|
long t2 = System.currentTimeMillis();
|
|
|
- System.err.println("================================================::"+(t2-t1));
|
|
|
+ System.err.println("================================================::" + (t2 - t1));
|
|
|
resultList.add(getCountValue(countPfl, result));
|
|
|
}
|
|
|
|
|
@@ -250,6 +250,7 @@ public class StatisticsController extends BaseController {
|
|
|
@GetMapping("/xlcdByPoint")
|
|
|
public AjaxResult xlcdByPoint(Statistics statistics) {
|
|
|
Map<String, Statistics> map = new HashMap<>();
|
|
|
+ setMap(map);
|
|
|
List<Statistics> xlcdByPoint = statisticsService.countXlcdByPoint(statistics);
|
|
|
Statistics result = null;
|
|
|
for (Statistics point : xlcdByPoint) {
|
|
@@ -258,9 +259,7 @@ public class StatisticsController extends BaseController {
|
|
|
pointType = "取样连接系统";
|
|
|
}
|
|
|
Integer count = point.getCount();
|
|
|
- if (map.get(pointType) == null) {
|
|
|
- result = new Statistics();
|
|
|
- }
|
|
|
+ result =map.get(pointType);
|
|
|
switch (point.getContent()) {
|
|
|
case "1":
|
|
|
result.setWxlCount(count);
|
|
@@ -278,6 +277,29 @@ public class StatisticsController extends BaseController {
|
|
|
return AjaxResult.success(map.values());
|
|
|
}
|
|
|
|
|
|
+ private void setMap(Map<String, Statistics> map) {
|
|
|
+ map.put("泵", setStatistics("泵"));
|
|
|
+ map.put("阀门", setStatistics("阀门"));
|
|
|
+ map.put("法兰", setStatistics("法兰"));
|
|
|
+ map.put("搅拌器", setStatistics("搅拌器"));
|
|
|
+ map.put("连接件", setStatistics("连接件"));
|
|
|
+ map.put("泄压设备", setStatistics("泄压设备"));
|
|
|
+ map.put("压缩机", setStatistics("压缩机"));
|
|
|
+ map.put("开口阀或开口管线", setStatistics("开口阀或开口管线"));
|
|
|
+ map.put("取样连接系统", setStatistics("取样连接系统"));
|
|
|
+ map.put("其他", setStatistics("其他"));
|
|
|
+ }
|
|
|
+
|
|
|
+ private Statistics setStatistics(String pointType) {
|
|
|
+ Statistics s = new Statistics();
|
|
|
+ s.setPointType(pointType);
|
|
|
+ s.setWxlCount(0);
|
|
|
+ s.setYzxlCount(0);
|
|
|
+ s.setYbxlCount(0);
|
|
|
+ return s;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@GetMapping("/pflByPoint")
|
|
|
public AjaxResult pflByPoint(Statistics statistics) {
|
|
|
List<Statistics> resultList = new ArrayList<>();
|