OnlyBiggg commited on
Commit
b400a48
·
1 Parent(s): a77f5a4
app/dialogflow/api/v1/dialogflow.py CHANGED
@@ -307,6 +307,10 @@ async def get_trip_list(request: Request) -> Response:
307
  data = await dialog_service.search_trip(from_time, to_time, route_ids, ticket_count)
308
  if len(data) > 0:
309
  ################################## bug choox nay
 
 
 
 
310
  trip_by_time_office = dialog_service.get_trip_by_time_and_office_id(data, time, origin_id, dest_id)
311
  # Nếu có chuyến xe theo thời gian và văn phòng chỉ định
312
  if trip_by_time_office:
 
307
  data = await dialog_service.search_trip(from_time, to_time, route_ids, ticket_count)
308
  if len(data) > 0:
309
  ################################## bug choox nay
310
+ if origin_office:
311
+ origin_id = origin_ids
312
+ if dest_office:
313
+ dest_id = dest_ids
314
  trip_by_time_office = dialog_service.get_trip_by_time_and_office_id(data, time, origin_id, dest_id)
315
  # Nếu có chuyến xe theo thời gian và văn phòng chỉ định
316
  if trip_by_time_office:
app/dialogflow/services/dialog_service.py CHANGED
@@ -121,8 +121,6 @@ class DialogService:
121
  # Chuyến đi khớp với thời gian và văn phòng đón trả
122
  @staticmethod
123
  def get_trip_by_time_and_office_id(trips: list, time: str ,origin_id: int, dest_id: int) -> dict:
124
- print(origin_id, dest_id)
125
-
126
  if time is None or origin_id is None or dest_id is None:
127
  return {}
128
  for trip in trips:
 
121
  # Chuyến đi khớp với thời gian và văn phòng đón trả
122
  @staticmethod
123
  def get_trip_by_time_and_office_id(trips: list, time: str ,origin_id: int, dest_id: int) -> dict:
 
 
124
  if time is None or origin_id is None or dest_id is None:
125
  return {}
126
  for trip in trips: