ce8753ee by 周伟奇

add mvc 3-4

1 parent 3591e645
......@@ -659,6 +659,26 @@ class BSWorkbook(Workbook):
if classify == consts.IC_CLASSIFY and license_dict.get('类别') == '1': # 居住证处理
license_summary.setdefault(consts.RP_CLASSIFY, []).append(license_dict)
continue
if classify == consts.MVC_CLASSIFY:
try:
mvc_page = license_dict.pop('page')
except Exception as e:
pass
else:
if mvc_page == 'VehicleRegArea':
tmp_dict = {
'姓名/名称': [],
'身份证明名称/号码': [],
'转移登记日期': [],
}
mvc_res = license_dict.get('results', {})
for register_info in mvc_res.get('register_info', []):
if register_info.get('register_type', 0) == 2:
tmp_dict['姓名/名称'].append(register_info.get('details', {}).get('name', {}).get('words', ''))
tmp_dict['身份证明名称/号码'].append(register_info.get('details', {}).get('idno', {}).get('words', ''))
tmp_dict['转移登记日期'].append(register_info.get('details', {}).get('date', {}).get('words', ''))
license_dict = tmp_dict
del tmp_dict
if side_diff:
key, field_order_yes, field_order_no = consts.FIELD_ORDER_MAP.get(classify)
field_order = field_order_yes if key in license_dict else field_order_no
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!