Spaces:
Sleeping
Sleeping
OnlyBiggg
commited on
Commit
·
95682d6
1
Parent(s):
1e8145d
fix
Browse files
app/dialogflow/api/v1/dialogflow.py
CHANGED
|
@@ -307,6 +307,7 @@ async def get_trip_list(request: Request) -> Response:
|
|
| 307 |
|
| 308 |
try:
|
| 309 |
data = await dialog_service.search_trip(from_time, to_time, route_ids, ticket_count)
|
|
|
|
| 310 |
if len(data) > 0:
|
| 311 |
if origin_office and dest_office:
|
| 312 |
trip_by_time_office = dialog_service.get_trip_by_time_and_office_id(data, time, origin_id, dest_id)
|
|
@@ -330,8 +331,8 @@ async def get_trip_list(request: Request) -> Response:
|
|
| 330 |
data_by_office = data
|
| 331 |
# Tìm 4 chuyến xe gần thời gian chỉ định nhất
|
| 332 |
trip_surrounding_time = dialog_service.get_4_surrounding_trip(data_by_office, time)
|
| 333 |
-
|
| 334 |
-
trip_dialogflow = []
|
| 335 |
|
| 336 |
for trip in trip_surrounding_time:
|
| 337 |
if ticket_count <= trip["empty_seat_quantity"]:
|
|
|
|
| 307 |
|
| 308 |
try:
|
| 309 |
data = await dialog_service.search_trip(from_time, to_time, route_ids, ticket_count)
|
| 310 |
+
print(data)
|
| 311 |
if len(data) > 0:
|
| 312 |
if origin_office and dest_office:
|
| 313 |
trip_by_time_office = dialog_service.get_trip_by_time_and_office_id(data, time, origin_id, dest_id)
|
|
|
|
| 331 |
data_by_office = data
|
| 332 |
# Tìm 4 chuyến xe gần thời gian chỉ định nhất
|
| 333 |
trip_surrounding_time = dialog_service.get_4_surrounding_trip(data_by_office, time)
|
| 334 |
+
print(trip_surrounding_time)
|
| 335 |
+
trip_dialogflow = []
|
| 336 |
|
| 337 |
for trip in trip_surrounding_time:
|
| 338 |
if ticket_count <= trip["empty_seat_quantity"]:
|