Spaces:
Sleeping
Sleeping
OnlyBiggg
commited on
Commit
·
413bfe0
1
Parent(s):
95682d6
fix
Browse files
app/dialogflow/api/v1/dialogflow.py
CHANGED
|
@@ -302,12 +302,11 @@ async def get_trip_list(request: Request) -> Response:
|
|
| 302 |
elif raw_destination_city:
|
| 303 |
dest_id, dest_code = get_origin_id_and_code(raw_destination_city)
|
| 304 |
route_ids = await dialog_service.search_all_route_ids(origin_code=origin_code, from_id=origin_id, orign_ids=origin_ids, dest_code=dest_code, to_id=dest_id, dest_ids=dest_ids)
|
| 305 |
-
|
| 306 |
|
| 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,7 +330,6 @@ async def get_trip_list(request: Request) -> Response:
|
|
| 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:
|
|
|
|
| 302 |
elif raw_destination_city:
|
| 303 |
dest_id, dest_code = get_origin_id_and_code(raw_destination_city)
|
| 304 |
route_ids = await dialog_service.search_all_route_ids(origin_code=origin_code, from_id=origin_id, orign_ids=origin_ids, dest_code=dest_code, to_id=dest_id, dest_ids=dest_ids)
|
| 305 |
+
print(route_ids)
|
| 306 |
|
| 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 |
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 |
trip_dialogflow = []
|
| 334 |
|
| 335 |
for trip in trip_surrounding_time:
|