|
@@ -419,12 +419,30 @@ public class StatisticalServiceImpl implements IStatisticalService {
|
419
|
419
|
//项目公客排行折线图获取
|
420
|
420
|
Map<String,Object> gkBarMap = getGkBarData(orgId,startDate,endDate,personBuildingList);
|
421
|
421
|
map.put("gkBarMap",gkBarMap);
|
|
422
|
+
|
422
|
423
|
//项目私客排行折线图获取
|
|
424
|
+ Map<String,Object> skBarMap = getSkBarData(orgId,startDate,endDate,personBuildingList);
|
|
425
|
+ map.put("skBarMap",skBarMap);
|
|
426
|
+
|
423
|
427
|
//项目访问人数排行折线图获取
|
|
428
|
+ Map<String,Object> wgBarMap = getWgBarData(orgId,startDate,endDate,personBuildingList);
|
|
429
|
+ map.put("wgBarMap",wgBarMap);
|
|
430
|
+
|
424
|
431
|
//项目访问次数排行折线图获取
|
|
432
|
+ Map<String,Object> fwBarMap = getFwBarData(orgId,startDate,endDate,personBuildingList);
|
|
433
|
+ map.put("fwBarMap",fwBarMap);
|
|
434
|
+
|
425
|
435
|
return ResponseBean.success(map);
|
426
|
436
|
}
|
427
|
437
|
|
|
438
|
+ /**
|
|
439
|
+ * 项目公客排行折线图获取
|
|
440
|
+ * @param orgId
|
|
441
|
+ * @param startDate
|
|
442
|
+ * @param endDate
|
|
443
|
+ * @param personBuildingList
|
|
444
|
+ * @return
|
|
445
|
+ */
|
428
|
446
|
private Map<String, Object> getGkBarData(Integer orgId, LocalDate startDate, LocalDate endDate, List<TaPersonBuilding> personBuildingList) {
|
429
|
447
|
Map<String,Object> map = new HashMap<>();
|
430
|
448
|
List<Map<String, Object>> gkBarData = taBuildingMapper.getGkBarData(orgId, startDate, endDate, personBuildingList);
|
|
@@ -437,4 +455,68 @@ public class StatisticalServiceImpl implements IStatisticalService {
|
437
|
455
|
}
|
438
|
456
|
return map;
|
439
|
457
|
}
|
|
458
|
+
|
|
459
|
+ /**
|
|
460
|
+ * 项目私客排行折线图获取
|
|
461
|
+ * @param orgId
|
|
462
|
+ * @param startDate
|
|
463
|
+ * @param endDate
|
|
464
|
+ * @param personBuildingList
|
|
465
|
+ * @return
|
|
466
|
+ */
|
|
467
|
+ private Map<String, Object> getSkBarData(Integer orgId, LocalDate startDate, LocalDate endDate, List<TaPersonBuilding> personBuildingList) {
|
|
468
|
+ Map<String,Object> map = new HashMap<>();
|
|
469
|
+ List<Map<String, Object>> skBarData = taBuildingMapper.getSkBarData(orgId, startDate, endDate, personBuildingList);
|
|
470
|
+ if (skBarData.size() > 0){
|
|
471
|
+ map.put("data",skBarData);
|
|
472
|
+ List<Object> buildingNameList = skBarData.stream().map(x -> x.get("buildingName")).collect(Collectors.toList());
|
|
473
|
+ map.put("buildingNameList",buildingNameList);
|
|
474
|
+ List<Object> gkNumList = skBarData.stream().map(x -> x.get("skNum")).collect(Collectors.toList());
|
|
475
|
+ map.put("numList",gkNumList);
|
|
476
|
+ }
|
|
477
|
+ return map;
|
|
478
|
+ }
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+ /**
|
|
482
|
+ * 项目访问人数排行折线图获取
|
|
483
|
+ * @param orgId
|
|
484
|
+ * @param startDate
|
|
485
|
+ * @param endDate
|
|
486
|
+ * @param personBuildingList
|
|
487
|
+ * @return
|
|
488
|
+ */
|
|
489
|
+ private Map<String, Object> getWgBarData(Integer orgId, LocalDate startDate, LocalDate endDate, List<TaPersonBuilding> personBuildingList) {
|
|
490
|
+ Map<String,Object> map = new HashMap<>();
|
|
491
|
+ List<Map<String, Object>> wgBarData = taBuildingMapper.getWgBarData(orgId, startDate, endDate, personBuildingList);
|
|
492
|
+ if (wgBarData.size() > 0){
|
|
493
|
+ map.put("data",wgBarData);
|
|
494
|
+ List<Object> buildingNameList = wgBarData.stream().map(x -> x.get("buildingName")).collect(Collectors.toList());
|
|
495
|
+ map.put("buildingNameList",buildingNameList);
|
|
496
|
+ List<Object> gkNumList = wgBarData.stream().map(x -> x.get("wgNum")).collect(Collectors.toList());
|
|
497
|
+ map.put("numList",gkNumList);
|
|
498
|
+ }
|
|
499
|
+ return map;
|
|
500
|
+ }
|
|
501
|
+
|
|
502
|
+ /**
|
|
503
|
+ * 项目访问次数排行折线图获取
|
|
504
|
+ * @param orgId
|
|
505
|
+ * @param startDate
|
|
506
|
+ * @param endDate
|
|
507
|
+ * @param personBuildingList
|
|
508
|
+ * @return
|
|
509
|
+ */
|
|
510
|
+ private Map<String, Object> getFwBarData(Integer orgId, LocalDate startDate, LocalDate endDate, List<TaPersonBuilding> personBuildingList) {
|
|
511
|
+ Map<String,Object> map = new HashMap<>();
|
|
512
|
+ List<Map<String, Object>> fwBarData = taBuildingMapper.getFwBarData(orgId, startDate, endDate, personBuildingList);
|
|
513
|
+ if (fwBarData.size() > 0){
|
|
514
|
+ map.put("data",fwBarData);
|
|
515
|
+ List<Object> buildingNameList = fwBarData.stream().map(x -> x.get("buildingName")).collect(Collectors.toList());
|
|
516
|
+ map.put("buildingNameList",buildingNameList);
|
|
517
|
+ List<Object> gkNumList = fwBarData.stream().map(x -> x.get("pvNum")).collect(Collectors.toList());
|
|
518
|
+ map.put("numList",gkNumList);
|
|
519
|
+ }
|
|
520
|
+ return map;
|
|
521
|
+ }
|
440
|
522
|
}
|