Commit fd984f25a786299eabbae89cce128d4b0392d745
1 parent
5b6077aa
null
Showing
1 changed file
with
21 additions
and
21 deletions
src/main/java/com/zteits/irain/portal/web/govclouds/RealTimeInfoController.java
... | ... | @@ -117,34 +117,34 @@ public class RealTimeInfoController { |
117 | 117 | |
118 | 118 | // 获取所有空闲车位为零的停车场信息列表 |
119 | 119 | List<ZeroBerthParkingLotDTO> zeroBerthplDTOList = plBerthsService.getZeroBerthParkinglotList(request); |
120 | - | |
121 | 120 | List<WarningInfoDTO> warningInfoList = new ArrayList<WarningInfoDTO>(); |
122 | - logger.debug("zeroBerthplDTOList---->" + JSON.toJSONString(zeroBerthplDTOList, false)); | |
123 | - | |
124 | - for (ZeroBerthParkingLotDTO zeroBerthpl: zeroBerthplDTOList) { | |
125 | - | |
126 | - List<ParkinglotAndGeoInfoDTO> plgInfoList = ParkingLotGeoCacheUtil.queryParkLotsWithDistanceAndCoordinateByAsc( | |
127 | - LonLatTypeEnum.LON_LAT_TYPE_1, zeroBerthpl.getLongitude(), zeroBerthpl.getLatitude(), 5000D, 50L); | |
121 | + if (null != zeroBerthplDTOList) { | |
122 | + logger.debug("zeroBerthplDTOList---->" + JSON.toJSONString(zeroBerthplDTOList, false)); | |
128 | 123 | |
129 | - int notZeroBerthPlCount = 0;// 非零空闲泊位数的停车场个数 | |
130 | - if (null != plgInfoList && !CollectionUtils.isEmpty(plgInfoList)) { | |
131 | - WarningInfoDTO warningInfoDTO = new WarningInfoDTO(); | |
132 | - for (ParkinglotAndGeoInfoDTO ParkinglotAndGeoInfoDTO: plgInfoList) { | |
133 | - if (0 < ParkFreeBerthsCacheUtil.getFreeBerthsByPlNo(ParkinglotAndGeoInfoDTO.getPlNo())) | |
134 | - { | |
135 | - notZeroBerthPlCount += 1; | |
136 | - } | |
137 | - } | |
124 | + for (ZeroBerthParkingLotDTO zeroBerthpl: zeroBerthplDTOList) { | |
125 | + | |
126 | + List<ParkinglotAndGeoInfoDTO> plgInfoList = ParkingLotGeoCacheUtil.queryParkLotsWithDistanceAndCoordinateByAsc( | |
127 | + LonLatTypeEnum.LON_LAT_TYPE_1, zeroBerthpl.getLongitude(), zeroBerthpl.getLatitude(), 5000D, 50L); | |
138 | 128 | |
139 | - if (0 < notZeroBerthPlCount) { | |
140 | - warningInfoDTO.setParkingLotName(zeroBerthpl.getParkingLotName()); | |
141 | - warningInfoDTO.setPlCountHavingFreeBerth(notZeroBerthPlCount); | |
129 | + int notZeroBerthPlCount = 0;// 非零空闲泊位数的停车场个数 | |
130 | + if (null != plgInfoList && !CollectionUtils.isEmpty(plgInfoList)) { | |
131 | + WarningInfoDTO warningInfoDTO = new WarningInfoDTO(); | |
132 | + for (ParkinglotAndGeoInfoDTO ParkinglotAndGeoInfoDTO: plgInfoList) { | |
133 | + if (0 < ParkFreeBerthsCacheUtil.getFreeBerthsByPlNo(ParkinglotAndGeoInfoDTO.getPlNo())) | |
134 | + { | |
135 | + notZeroBerthPlCount += 1; | |
136 | + } | |
137 | + } | |
142 | 138 | |
143 | - warningInfoList.add(warningInfoDTO); | |
139 | + if (0 < notZeroBerthPlCount) { | |
140 | + warningInfoDTO.setParkingLotName(zeroBerthpl.getParkingLotName()); | |
141 | + warningInfoDTO.setPlCountHavingFreeBerth(notZeroBerthPlCount); | |
142 | + | |
143 | + warningInfoList.add(warningInfoDTO); | |
144 | + } | |
144 | 145 | } |
145 | 146 | } |
146 | 147 | } |
147 | - | |
148 | 148 | return new BizResultVO<>(new BizResult<>(warningInfoList)) ; |
149 | 149 | } |
150 | 150 | } | ... | ... |