|
@@ -181,14 +181,22 @@ public class ParkPreCounter {
|
|
|
//更新并检查所有需更新房间
|
|
//更新并检查所有需更新房间
|
|
|
List<JSONObject> updatedRooms = roomRange.stream()
|
|
List<JSONObject> updatedRooms = roomRange.stream()
|
|
|
.filter(this::countRoom).collect(Collectors.toList());
|
|
.filter(this::countRoom).collect(Collectors.toList());
|
|
|
- //按层级统计面积
|
|
|
|
|
- //楼层
|
|
|
|
|
- List<JSONObject> fatherLcs = findFathers(updatedRooms, allLc);
|
|
|
|
|
- //楼栋
|
|
|
|
|
- List<JSONObject> fatherLds = findFathers(fatherLcs, allLd);
|
|
|
|
|
- //楼宇/产业园
|
|
|
|
|
- List<JSONObject> fatherLys = findFathers(fatherLds, allLy);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ List<JSONObject> fatherLys;
|
|
|
|
|
+ List<JSONObject> fatherLds;
|
|
|
|
|
+ List<JSONObject> fatherLcs;
|
|
|
|
|
+ if (forceUpdate){
|
|
|
|
|
+ fatherLcs =allLc;
|
|
|
|
|
+ fatherLds =allLd;
|
|
|
|
|
+ fatherLys =allLy;
|
|
|
|
|
+ }else {
|
|
|
|
|
+ //按层级统计面积
|
|
|
|
|
+ //楼层
|
|
|
|
|
+ fatherLcs = findFathers(updatedRooms, allLc);
|
|
|
|
|
+ //楼栋
|
|
|
|
|
+ fatherLds = findFathers(fatherLcs, allLd);
|
|
|
|
|
+ //楼宇/产业园
|
|
|
|
|
+ fatherLys = findFathers(fatherLds, allLy);
|
|
|
|
|
+ }
|
|
|
//常规父子计算
|
|
//常规父子计算
|
|
|
fatherLcs.forEach(this::countParkByChild);
|
|
fatherLcs.forEach(this::countParkByChild);
|
|
|
fatherLds.forEach(this::countParkByChild);
|
|
fatherLds.forEach(this::countParkByChild);
|