| | |
| | | import com.xiaopeng.operation.mapper.XpPointMapper; |
| | | import com.xiaopeng.operation.mapper.XpSystemSettingMapper; |
| | | import com.xiaopeng.operation.query.PointByNameQuery; |
| | | import com.xiaopeng.operation.service.IXpElectronicFenceAreaService; |
| | | import com.xiaopeng.operation.service.IXpElectronicFenceService; |
| | | import com.xiaopeng.operation.service.IXpTradingStrategyService; |
| | | import com.xiaopeng.operation.service.XpPointService; |
| | | import com.xiaopeng.operation.service.*; |
| | | import com.xiaopeng.operation.utils.TimeRangeChecker; |
| | | import com.xiaopeng.operation.utils.holiday.HolidayUtil; |
| | | import com.xiaopeng.operation.utils.map.FastDistanceCalculator; |
| | | import com.xiaopeng.api.vo.operation.NearestNextVo; |
| | | import com.xiaopeng.operation.vo.NearestVo; |
| | | import com.xiaopeng.operation.vo.OrderDistanceVo; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private IXpTradingStrategyService xpTradingStrategyService; |
| | | |
| | | @Resource |
| | | @Lazy |
| | | private XpStationService xpStationService; |
| | | |
| | | /** |
| | | * 如果站点是挂在场站下的 需要返回一个场站id stationId |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | Integer parkingTimeLimit = xpPoint.getParkingTimeLimit(); |
| | | //如果点位位于场站内,则使用场站的限停时间 |
| | | if(null != xpPoint.getStationId()){ |
| | | XpStation xpStation = xpStationService.getById(xpPoint.getStationId()); |
| | | parkingTimeLimit = xpStation.getParkingTimeLimit(); |
| | | } |
| | | XpHistoryStartPointsVo xpHistoryStartPointsVo = new XpHistoryStartPointsVo(); |
| | | xpHistoryStartPointsVo.setOperationStatus(1); |
| | | xpHistoryStartPointsVo.setName(xpPoint.getPointName()); |
| | |
| | | xpHistoryStartPointsVo.setId(xpPoint.getId()); |
| | | double distanced = FastDistanceCalculator.distanceFast(historyStartPointsDto.getLat(), historyStartPointsDto.getLon(), xpPoint.getPointLat(), xpPoint.getPointLon()); |
| | | xpHistoryStartPointsVo.setDistance(distanced); |
| | | xpHistoryStartPointsVo.setTime(xpPoint.getParkingTimeLimit()); |
| | | xpHistoryStartPointsVo.setTime(parkingTimeLimit); |
| | | xpHistoryStartPointsVo.setElectronicAreaId(xpPoint.getElectronicAreaId()); |
| | | // 判断是否收藏 |
| | | if(pointIdsByUserId!=null && !pointIdsByUserId.getData().isEmpty()){ |
| | |
| | | continue; |
| | | } |
| | | } |
| | | Integer parkingTimeLimit = xpPoint.getParkingTimeLimit(); |
| | | //如果点位位于场站内,则使用场站的限停时间 |
| | | if(null != xpPoint.getStationId()){ |
| | | XpStation xpStation = xpStationService.getById(xpPoint.getStationId()); |
| | | parkingTimeLimit = xpStation.getParkingTimeLimit(); |
| | | } |
| | | XpHistoryEndPointsVo xpHistoryEndPointsVo = new XpHistoryEndPointsVo(); |
| | | xpHistoryEndPointsVo.setOperationStatus(1); |
| | | xpHistoryEndPointsVo.setName(xpPoint.getPointName()); |
| | |
| | | xpHistoryEndPointsVo.setId(xpPoint.getId()); |
| | | double distanced = FastDistanceCalculator.distanceFast(historyEndPointsDto.getLat(), historyEndPointsDto.getLon(), xpPoint.getPointLat(), xpPoint.getPointLon()); |
| | | xpHistoryEndPointsVo.setDistance(distanced); |
| | | xpHistoryEndPointsVo.setTime(xpPoint.getParkingTimeLimit()); |
| | | xpHistoryEndPointsVo.setTime(parkingTimeLimit); |
| | | xpHistoryEndPointsVo.setElectronicAreaId(xpPoint.getElectronicAreaId()); |
| | | |
| | | // 判断是否收藏 |