Commit f9ac98f1 by 李杨杨

1.添加危险品码‘114’,危险品违法和卡口均将车型更改为‘114’;

2.添加逆行事件对接码。
1 parent 48b73505
This file is too large to display.
...@@ -113,6 +113,13 @@ def make_vehicle(event_data_dict): ...@@ -113,6 +113,13 @@ def make_vehicle(event_data_dict):
# 车辆类型 # 车辆类型
if 'type' in event_data_dict['vehicle']['body']: if 'type' in event_data_dict['vehicle']['body']:
event_data_dict['CLLX'] = event_data_dict['vehicle']['body']['type'].pop('code') event_data_dict['CLLX'] = event_data_dict['vehicle']['body']['type'].pop('code')
# 危险品标志为1,或特殊车辆类型为2时转换车辆类型为‘114’
if 'b_dangerous' in event_data_dict['vehicle'].keys():
if event_data_dict['vehicle']['b_dangerous'] == 1:
event_data_dict['CLLX'] = '114'
elif "special_type" in event_data_dict['vehicle']['body']['type'].keys():
if event_data_dict['vehicle']['body']['type']['special_type'] == 2:
event_data_dict['CLLX'] = '114'
else: else:
event_data_dict['CLLX'] = 'X99' event_data_dict['CLLX'] = 'X99'
# 二次识别-号牌类plate # 二次识别-号牌类plate
...@@ -217,8 +224,19 @@ def make_vehicle(event_data_dict): ...@@ -217,8 +224,19 @@ def make_vehicle(event_data_dict):
if event_data_dict['HPZL'] in ['31','32','00']: if event_data_dict['HPZL'] in ['31','32','00']:
event_data_dict['HPZL'] = convert_code(event_data_dict['HPZL'], wenan_code_huawei_code_HPZL) event_data_dict['HPZL'] = convert_code(event_data_dict['HPZL'], wenan_code_huawei_code_HPZL)
# 车辆类型 # 车辆类型
if 'type' in event_data_dict['vehicle']['body']:
event_data_dict['CLLX'] = event_data_dict['vehicle']['body']['type'].pop('code') event_data_dict['CLLX'] = event_data_dict['vehicle']['body']['type'].pop('code')
# 危险品标志为1,或特殊车辆类型为2时转换车辆类型为‘114’
if 'b_dangerous' in event_data_dict['vehicle'].keys():
if event_data_dict['vehicle']['b_dangerous'] == 1:
event_data_dict['CLLX'] = '114'
elif "special_type" in event_data_dict['vehicle']['body']['type'].keys():
if event_data_dict['vehicle']['body']['type']['special_type'] == 2:
event_data_dict['CLLX'] = '114'
else:
event_data_dict['CLLX'] = 'X99'
# #违法地行政区划分 # #违法地行政区划分
# event_data_dict['XZQH'] = '430801' # event_data_dict['XZQH'] = '430801'
# #违法地点 # #违法地点
...@@ -632,8 +650,8 @@ def recv_data(): ...@@ -632,8 +650,8 @@ def recv_data():
#交通违法 #交通违法
print '交通违法数据......' print '交通违法数据......'
# 若是危险品车辆的话CLLX码转成114 # 若是危险品车辆的话CLLX码转成114
if event_data['WFDM'] == '13440': # if event_data['WFDM'] == '13440':
event_data['CLLX'] = '114' # event_data['CLLX'] = '114'
WFKSSJ = event_data['WFKSSJ'] WFKSSJ = event_data['WFKSSJ']
WFJSSJ = event_data['WFJSSJ'] WFJSSJ = event_data['WFJSSJ']
CDH = event_data['CDH'] CDH = event_data['CDH']
......
...@@ -27,7 +27,7 @@ wenan_code_huawei_code_CSYS = [['02', 'A'], ['03', 'B'], ['12', 'C'], ['15', 'D' ...@@ -27,7 +27,7 @@ wenan_code_huawei_code_CSYS = [['02', 'A'], ['03', 'B'], ['12', 'C'], ['15', 'D'
#['08','04'],['09','01'],['10','99'],['11','99']] #['08','04'],['09','01'],['10','99'],['11','99']]
#wenan_code_huawei_code_CLLX = [['H30','01'],['K33', '02'], ['H10', '03'],['K20','04'],['H20','03'],['K30','05'], ['K10', '06']] #wenan_code_huawei_code_CLLX = [['H30','01'],['K33', '02'], ['H10', '03'],['K20','04'],['H20','03'],['K30','05'], ['K10', '06']]
wenan_code_huawei_code_CLLX = [['H30','005'],['K33', '001'], ['H10', '006'],['K20','003'],['H20','006'],['K30','003'], ['K10', '004'], ['X99','999']] wenan_code_huawei_code_CLLX = [['H30','005'],['K33', '001'], ['H10', '006'],['K20','003'],['H20','006'],['K30','003'], ['K10', '004'], ['X99','999'],['114','114']]
def convert_code(analyze_code,wenan_code_to_huawei_code): def convert_code(analyze_code,wenan_code_to_huawei_code):
#print("----",analyze_code,wenan_code_to_huawei_code) #print("----",analyze_code,wenan_code_to_huawei_code)
......
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!