修复路口诊断列表中可用路口获取逻辑
This commit is contained in:
parent
ea22d285a6
commit
432418465d
|
|
@ -43,7 +43,7 @@ def query_cross_list(params):
|
|||
"09:00-17:00",
|
||||
"17:00-19:00",
|
||||
"19:00-22:00",
|
||||
"22:00-00:00"
|
||||
"22:00-23:59"
|
||||
]
|
||||
peak_tp = [
|
||||
"07:00-09:00",
|
||||
|
|
|
|||
|
|
@ -67,7 +67,13 @@ class TmnetDbHelper(TableDbHelperBase):
|
|||
from (select name,crossid, location,nodeid, area_id from `cross` where nodeid = %s and area_id = %s and at_edge=0 and isdeleted=0 ) as t1
|
||||
left join (select name,crossid, location,nodeid, area_id from `cross_ledger_update_info` where nodeid = %s and area_id = %s and at_edge=0 and isdeleted=0 ) as t2 on t1.crossid=t2.crossid
|
||||
""" % (nodeid, area_id, nodeid, area_id)
|
||||
return self.do_select(sql)
|
||||
cross_list = self.do_select(sql)
|
||||
if area_id != 0:
|
||||
area_cross_sql = f'select * from bound_crosses where nodeid = {nodeid} and area_id = {area_id}'
|
||||
area_crosses = self.do_select(area_cross_sql)
|
||||
area_cross_list = [cross['crossid'] for cross in area_crosses]
|
||||
cross_list = [cross for cross in cross_list if cross['crossid'] in area_cross_list]
|
||||
return cross_list
|
||||
|
||||
def query_cross_inroads(self, crossid, nodeid):
|
||||
sql = """
|
||||
|
|
|
|||
Loading…
Reference in New Issue