|
@@ -431,6 +431,7 @@ public class PassengerApiController {
|
|
|
searchParams.put("payStatus","2");
|
|
|
searchParams.put("shiftStatus","1");
|
|
|
searchParams.put("shiftId",shiftInfo.getId());
|
|
|
+ searchParams.put("passengerStatus","1");
|
|
|
searchParams.put("routeName",routeInfo.getName());
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
@@ -719,7 +720,7 @@ public class PassengerApiController {
|
|
|
@ApiImplicitParam(name = "latitude", value = "纬度", required = true, paramType = "form")
|
|
|
})
|
|
|
public MessageResult<List<NearbyStationDTO>> passengerNearbyStation(String longitude, String latitude, @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
|
|
|
- @RequestParam(value = "pageSize", defaultValue = "2") int pageSize) {
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "5") int pageSize) {
|
|
|
MessageResult<List<NearbyStationDTO>> messageResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
@@ -748,8 +749,27 @@ public class PassengerApiController {
|
|
|
|
|
|
List<NearbyStationDTO> nearbyStationDTOList = new ArrayList<>();
|
|
|
List<String> shiftIdList = new ArrayList<>();
|
|
|
+ List<StationInfo> stationInfos0 = new ArrayList<>();
|
|
|
if (stationInfoList.size() > 0) {
|
|
|
- for (StationInfo stationInfo : stationInfoList) {
|
|
|
+ int dis0 = 500;
|
|
|
+ StationInfo stationInfo0 = null;
|
|
|
+ for (StationInfo stationInfo : stationInfoList){
|
|
|
+ //距离
|
|
|
+ GlobalCoordinates source = new GlobalCoordinates(stationInfo.getLatitude(), stationInfo.getLongitude());
|
|
|
+ GlobalCoordinates target = new GlobalCoordinates(Double.valueOf(latitude), Double.valueOf(longitude));
|
|
|
+
|
|
|
+ double meter1 = CommonUtil.getDistanceMeter(source, target, Ellipsoid.Sphere);
|
|
|
+
|
|
|
+ int dis = (new Double(meter1)).intValue();
|
|
|
+ if (dis<dis0){
|
|
|
+ stationInfo0 = stationInfo;
|
|
|
+ dis0 = dis;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ stationInfos0.add(stationInfo0);
|
|
|
+
|
|
|
+
|
|
|
+ for (StationInfo stationInfo : stationInfos0) {
|
|
|
|
|
|
RouteInfo routeInfo0 = routeInfoService.get(stationInfo.getRouteId());
|
|
|
|
|
@@ -974,6 +994,7 @@ public class PassengerApiController {
|
|
|
Map<String,Object> searchParams = new HashMap<>();
|
|
|
searchParams.put("openId",openId);
|
|
|
searchParams.put("payStatus","2");
|
|
|
+ searchParams.put("passengerStatus","1");
|
|
|
searchParams.put("shiftStatus","1");
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
@@ -1054,6 +1075,7 @@ public class PassengerApiController {
|
|
|
searchParams.put("openId",openId);
|
|
|
searchParams.put("readStatus",false);
|
|
|
searchParams.put("shiftStatus","1");
|
|
|
+ searchParams.put("passengerStatus","1");
|
|
|
searchParams.put("payStatus","2");
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|