|
@@ -862,9 +862,9 @@ public class PassengerApiController {
|
|
|
|
|
|
//距离详情
|
|
//距离详情
|
|
String distanceStr = null;
|
|
String distanceStr = null;
|
|
- if (dis>=1000){
|
|
|
|
- distanceStr = dis/1000 + "公里";
|
|
|
|
- }else {
|
|
|
|
|
|
+ if (dis >= 1000) {
|
|
|
|
+ distanceStr = dis / 1000 + "公里";
|
|
|
|
+ } else {
|
|
distanceStr = dis + "米";
|
|
distanceStr = dis + "米";
|
|
}
|
|
}
|
|
|
|
|
|
@@ -878,7 +878,7 @@ public class PassengerApiController {
|
|
if (personStationIndex > stationIndex) {
|
|
if (personStationIndex > stationIndex) {
|
|
|
|
|
|
int diff = personStationIndex - stationIndex;
|
|
int diff = personStationIndex - stationIndex;
|
|
- des = diff + "站 " +distanceStr;
|
|
|
|
|
|
+ des = diff + "站 " + distanceStr;
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -930,7 +930,7 @@ public class PassengerApiController {
|
|
public MessageResult<NearbyStationDTO> nearbyStationInfo(String id, String longitude, String latitude) {
|
|
public MessageResult<NearbyStationDTO> nearbyStationInfo(String id, String longitude, String latitude) {
|
|
MessageResult<NearbyStationDTO> messageResult = new MessageResult<>();
|
|
MessageResult<NearbyStationDTO> messageResult = new MessageResult<>();
|
|
|
|
|
|
- // List<NearbyStationDTO> nearbyStationDTOList = new ArrayList<>();
|
|
|
|
|
|
+ // List<NearbyStationDTO> nearbyStationDTOList = new ArrayList<>();
|
|
try {
|
|
try {
|
|
|
|
|
|
|
|
|
|
@@ -1013,9 +1013,9 @@ public class PassengerApiController {
|
|
|
|
|
|
//距离详情
|
|
//距离详情
|
|
String distanceStr = null;
|
|
String distanceStr = null;
|
|
- if (dis>=1000){
|
|
|
|
- distanceStr = dis/1000 + "公里";
|
|
|
|
- }else {
|
|
|
|
|
|
+ if (dis >= 1000) {
|
|
|
|
+ distanceStr = dis / 1000 + "公里";
|
|
|
|
+ } else {
|
|
distanceStr = dis + "米";
|
|
distanceStr = dis + "米";
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1135,13 +1135,55 @@ public class PassengerApiController {
|
|
|
|
|
|
try {
|
|
try {
|
|
|
|
|
|
|
|
+ List<RouteStationDTO> list = new ArrayList<>();
|
|
|
|
+ Map<String, Object> pageMap = new HashMap<>();
|
|
Map<String, Object> searchParams = new HashMap<>();
|
|
Map<String, Object> searchParams = new HashMap<>();
|
|
searchParams.put("name", "%" + name + "%");
|
|
searchParams.put("name", "%" + name + "%");
|
|
List<Sort> sortList = new ArrayList<>();
|
|
List<Sort> sortList = new ArrayList<>();
|
|
sortList.add(new Sort("create_time", "desc"));
|
|
sortList.add(new Sort("create_time", "desc"));
|
|
Page<RouteInfo> page = routeInfoService.pageSearch(searchParams, pageIndex, pageSize, true, sortList);
|
|
Page<RouteInfo> page = routeInfoService.pageSearch(searchParams, pageIndex, pageSize, true, sortList);
|
|
|
|
+ List<RouteInfo> routeInfoList = page.getResult();
|
|
|
|
+ if (routeInfoList.size() > 0) {
|
|
|
|
+ pageMap.put("recordsTotal", page.getTotal());
|
|
|
|
+ pageMap.put("recordsFiltered", page.getTotal());
|
|
|
|
+ pageMap.put("totalPage", page.getPages());
|
|
|
|
+ pageMap.put("pageNumber", page.getPageNum());
|
|
|
|
+ pageMap.put("pageSize", page.getPageSize());
|
|
|
|
+
|
|
|
|
+ for (RouteInfo routeInfo : routeInfoList){
|
|
|
|
+ RouteStationDTO routeStationDTO = new RouteStationDTO();
|
|
|
|
+ routeStationDTO.setId(routeInfo.getId());
|
|
|
|
+ routeStationDTO.setName(routeInfo.getName());
|
|
|
|
+ list.add(routeStationDTO);
|
|
|
|
+ }
|
|
|
|
|
|
- messageResult.setData(PojoUtils.pageWrapper(page));
|
|
|
|
|
|
+ } else {
|
|
|
|
+ Page<StationInfo> page1 = stationInfoService.pageSearch(searchParams, pageIndex, pageSize, true, sortList);
|
|
|
|
+ List<StationInfo> stationInfoList = page1.getResult();
|
|
|
|
+
|
|
|
|
+ pageMap.put("recordsTotal", page1.getTotal());
|
|
|
|
+ pageMap.put("recordsFiltered", page1.getTotal());
|
|
|
|
+ pageMap.put("totalPage", page1.getPages());
|
|
|
|
+ pageMap.put("pageNumber", page1.getPageNum());
|
|
|
|
+ pageMap.put("pageSize", page1.getPageSize());
|
|
|
|
+ if (stationInfoList.size() > 0) {
|
|
|
|
+ for (StationInfo stationInfo : stationInfoList) {
|
|
|
|
+ RouteStationDTO routeStationDTO = new RouteStationDTO();
|
|
|
|
+ routeStationDTO.setId(stationInfo.getRouteId());
|
|
|
|
+ routeStationDTO.setName(stationInfo.getName());
|
|
|
|
+ list.add(routeStationDTO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ pageMap.put("data", list);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ messageResult.setData(pageMap);
|
|
messageResult.setCode(200);
|
|
messageResult.setCode(200);
|
|
messageResult.setResult(true);
|
|
messageResult.setResult(true);
|
|
|
|
|
|
@@ -1435,7 +1477,7 @@ public class PassengerApiController {
|
|
|
|
|
|
//购票类型
|
|
//购票类型
|
|
String ticketTypeName = "成人票";
|
|
String ticketTypeName = "成人票";
|
|
- if ("1".equals(orderInfo.getTicketType())){
|
|
|
|
|
|
+ if ("1".equals(orderInfo.getTicketType())) {
|
|
ticketTypeName = "儿童票";
|
|
ticketTypeName = "儿童票";
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1448,7 +1490,7 @@ public class PassengerApiController {
|
|
passengerRecordDetailDTO.setTicketDes(ticketTypeName + " " + orderInfo.getTotalFee().subtract(orderInfo.getGoodsTicket()) + "元");
|
|
passengerRecordDetailDTO.setTicketDes(ticketTypeName + " " + orderInfo.getTotalFee().subtract(orderInfo.getGoodsTicket()) + "元");
|
|
passengerRecordDetailDTO.setGoodsTicket(orderInfo.getGoodsTicket() + "元");
|
|
passengerRecordDetailDTO.setGoodsTicket(orderInfo.getGoodsTicket() + "元");
|
|
passengerRecordDetailDTO.setTotalFee(orderInfo.getTotalFee());
|
|
passengerRecordDetailDTO.setTotalFee(orderInfo.getTotalFee());
|
|
- passengerRecordDetailDTO.setPayTime(DateUtil.format(orderInfo.getPayTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
|
+ passengerRecordDetailDTO.setPayTime(DateUtil.format(orderInfo.getPayTime(), "yyyy-MM-dd HH:mm:ss"));
|
|
passengerRecordDetailDTO.setTicketStatus(passengerInfo.getStatus());
|
|
passengerRecordDetailDTO.setTicketStatus(passengerInfo.getStatus());
|
|
passengerRecordDetailDTO.setTicketStatusName(passengerRecordDetailDTO.getTicketStatusName(passengerRecordDetailDTO.getTicketStatus()));
|
|
passengerRecordDetailDTO.setTicketStatusName(passengerRecordDetailDTO.getTicketStatusName(passengerRecordDetailDTO.getTicketStatus()));
|
|
passengerRecordDetailDTO.setShiftInfo(shiftInfo);
|
|
passengerRecordDetailDTO.setShiftInfo(shiftInfo);
|
|
@@ -1469,7 +1511,6 @@ public class PassengerApiController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
@PostMapping("problemFeedback")
|
|
@PostMapping("problemFeedback")
|
|
@ApiOperation(value = "问题反馈")
|
|
@ApiOperation(value = "问题反馈")
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
@@ -1690,12 +1731,12 @@ public class PassengerApiController {
|
|
@ApiImplicitParam(name = "shiftId", value = "班次id", paramType = "form"),
|
|
@ApiImplicitParam(name = "shiftId", value = "班次id", paramType = "form"),
|
|
@ApiImplicitParam(name = "openId", value = "openId", paramType = "form")
|
|
@ApiImplicitParam(name = "openId", value = "openId", paramType = "form")
|
|
})
|
|
})
|
|
- public MessageResult<List<StationRemind>> passengerShiftRemindList(String shiftId,String openId) {
|
|
|
|
|
|
+ public MessageResult<List<StationRemind>> passengerShiftRemindList(String shiftId, String openId) {
|
|
MessageResult<List<StationRemind>> messageResult = new MessageResult<>();
|
|
MessageResult<List<StationRemind>> messageResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
try {
|
|
|
|
|
|
- List<StationRemind> stationRemindList = stationRemindService.findByOpenIdAndVehicleShiftId(openId,shiftId);
|
|
|
|
|
|
+ List<StationRemind> stationRemindList = stationRemindService.findByOpenIdAndVehicleShiftId(openId, shiftId);
|
|
|
|
|
|
messageResult.setData(stationRemindList);
|
|
messageResult.setData(stationRemindList);
|
|
messageResult.setResult(true);
|
|
messageResult.setResult(true);
|
|
@@ -1710,7 +1751,6 @@ public class PassengerApiController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
@PostMapping("passengerRemindList")
|
|
@PostMapping("passengerRemindList")
|
|
@ApiOperation(value = "乘客提醒列表")
|
|
@ApiOperation(value = "乘客提醒列表")
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|