|
|
|
@ -66,7 +66,9 @@ public class HighGasController { |
|
|
|
|
if (StringUtils.isBlank(storeName)) { |
|
|
|
|
storeName = null; |
|
|
|
|
} |
|
|
|
|
List<Map<String, Object>> storeList = highGasOilPriceService.getStoreListByOilNo(storeName,regionId, oilNoName); |
|
|
|
|
SecRegion region = commonService.getParentByRegion(regionId); |
|
|
|
|
if (region != null) { |
|
|
|
|
List<Map<String, Object>> storeList = highGasOilPriceService.getStoreListByOilNo(storeName,region.getRegionId(), oilNoName); |
|
|
|
|
for (Map<String, Object> store : storeList) { |
|
|
|
|
double distance = CoordCommonUtil.getDistance(Double.valueOf(store.get("latitude").toString()), Double.valueOf(store.get("longitude").toString()), Double.valueOf(latitude), Double.valueOf(longitude)); |
|
|
|
|
store.put("distance", Math.round(distance/100d)/10d); |
|
|
|
@ -79,7 +81,8 @@ public class HighGasController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return ResponseMsgUtil.success(PageUtil.initPageInfoObj(pageNum,distance.size(),pageSize,new PageInfo<>(distance))); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return ResponseMsgUtil.success(new PageInfo<>()); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("HighGasController -> getGasDetailByStoreKey() error!",e); |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|