修改路口问题诊断问题列表,新增路口行政辖区信息返回

This commit is contained in:
xuwang 2026-05-27 11:20:36 +08:00
parent 6e19cc6383
commit f97b66d8c5
2 changed files with 6 additions and 3 deletions

View File

@ -1693,6 +1693,7 @@ def gen_cross_problem_detail(routing_crosses, high_park_problems, too_many_stop_
cross_name = routing_crosses[crossid]['name'] cross_name = routing_crosses[crossid]['name']
company = routing_crosses[crossid]['company'] company = routing_crosses[crossid]['company']
location = routing_crosses[crossid]['location'] location = routing_crosses[crossid]['location']
division = routing_crosses[crossid]['division']
high_park, stop_times_problem, inroad_problem, turn_problem, tide, phase, phase_desc, phase_color, phase_final_state = [], [], [], [], [], [], [], 9, 9 high_park, stop_times_problem, inroad_problem, turn_problem, tide, phase, phase_desc, phase_color, phase_final_state = [], [], [], [], [], [], [], 9, 9
inroad_turnlane, unmatched_lane_num, sample_sch, sample_tp, short_tp, insufficient_yellow, unreasonable_red, big_cycle, small_cycle, insufficient_ped_time = [], [], [], [], [], [], [], [], [], [] inroad_turnlane, unmatched_lane_num, sample_sch, sample_tp, short_tp, insufficient_yellow, unreasonable_red, big_cycle, small_cycle, insufficient_ped_time = [], [], [], [], [], [], [], [], [], []
if crossid in high_park_problems['problems'].keys(): if crossid in high_park_problems['problems'].keys():
@ -1845,6 +1846,7 @@ def gen_cross_problem_detail(routing_crosses, high_park_problems, too_many_stop_
'cross_name': cross_name, 'cross_name': cross_name,
'location': location, 'location': location,
'company': company, 'company': company,
'division': division,
'high_park_problem': high_park, 'high_park_problem': high_park,
'too_many_stop_times': stop_times_problem, 'too_many_stop_times': stop_times_problem,
'imbalance_inroad': inroad_problem, 'imbalance_inroad': inroad_problem,

View File

@ -507,18 +507,19 @@ class TmnetDbHelper(TableDbHelperBase):
if(t2.location is not null, t2.location, t1.location) as location, if(t2.location is not null, t2.location, t1.location) as location,
if(t2.internet is not null, t2.internet, t1.internet) as internet, if(t2.internet is not null, t2.internet, t1.internet) as internet,
if(t2.slc_company is not null, t2.slc_company, t1.slc_company) as slc_company, if(t2.slc_company is not null, t2.slc_company, t1.slc_company) as slc_company,
if(t2.division is not null, t2.division, t1.division) as division,
if(t2.cross_model is not null and t1.cross_model is not null and t2.cross_model != t1.cross_model, t2.cross_model, t1.cross_model) as cross_model, if(t2.cross_model is not null and t1.cross_model is not null and t2.cross_model != t1.cross_model, t2.cross_model, t1.cross_model) as cross_model,
t1.nodeid, t1.nodeid,
t1.area_id t1.area_id
from from
(select crossid, name, location, nodeid, area_id, cross_no, company,internet, slc_company, cross_model from `cross` where nodeid = %s and area_id = %s) t1 (select crossid, name, location, nodeid, area_id, cross_no, company,internet, slc_company, division, cross_model from `cross` where nodeid = %s and area_id = %s) t1
left join left join
(select crossid, name, location, nodeid, area_id, cross_no, company,internet, slc_company, cross_model from `cross_ledger_update_info` where nodeid = %s and area_id = %s ) t2 on t1.crossid = t2.crossid (select crossid, name, location, nodeid, area_id, cross_no, company,internet, slc_company, division, cross_model from `cross_ledger_update_info` where nodeid = %s and area_id = %s ) t2 on t1.crossid = t2.crossid
where t1.area_id = %s where t1.area_id = %s
and t1.nodeid = %s and t1.nodeid = %s
and t1.crossid in (select crossid from bound_crosses where area_id = %s and nodeid = %s and is_routing_inspection = 1) and t1.crossid in (select crossid from bound_crosses where area_id = %s and nodeid = %s and is_routing_inspection = 1)
union all union all
select crossid, name, location, nodeid, area_id, cross_no, company, internet, slc_company, cross_model from user_defined_cross where area_id = %s and nodeid = %s and crossid in (select crossid from bound_crosses where area_id = %s and nodeid = %s and is_routing_inspection = 1) select crossid, name, location, nodeid, area_id, cross_no, company, internet, slc_company, division, cross_model from user_defined_cross where area_id = %s and nodeid = %s and crossid in (select crossid from bound_crosses where area_id = %s and nodeid = %s and is_routing_inspection = 1)
""" % (nodeid, area_id, nodeid, area_id, area_id, nodeid, area_id, nodeid, area_id, nodeid, area_id, nodeid) """ % (nodeid, area_id, nodeid, area_id, area_id, nodeid, area_id, nodeid, area_id, nodeid, area_id, nodeid)
return self.do_select(sql) return self.do_select(sql)