8ef092e1 by 周伟奇

Merge branch 'feature/mvc' into feature/compare

2 parents c238b4d4 9cf4b759
...@@ -197,7 +197,32 @@ class Command(BaseCommand, LoggerMixin): ...@@ -197,7 +197,32 @@ class Command(BaseCommand, LoggerMixin):
197 res_list.append((pno, ino, part_idx, consts.RES_SUCCESS_EMPTY)) 197 res_list.append((pno, ino, part_idx, consts.RES_SUCCESS_EMPTY))
198 return 198 return
199 res_list.append((pno, ino, part_idx, consts.RES_SUCCESS)) 199 res_list.append((pno, ino, part_idx, consts.RES_SUCCESS))
200 if classify == consts.IC_CLASSIFY: 200 if classify == consts.MVC_CLASSIFY: # 车辆登记证 3/4页结果整合
201 for mvc_dict in license_data:
202 try:
203 mvc_page = mvc_dict.pop('page')
204 except Exception as e:
205 pass
206 else:
207 if mvc_page == 'VehicleRegArea':
208 tmp_dict = {
209 '姓名/名称': [],
210 '身份证明名称/号码': [],
211 '转移登记日期': [],
212 }
213 mvc_res = mvc_dict.pop('results', {})
214 for register_info in mvc_res.get('register_info', []):
215 if register_info.get('register_type', 0) == 2:
216 tmp_dict['姓名/名称'].append(
217 register_info.get('details', {}).get('name', {}).get('words', ''))
218 tmp_dict['身份证明名称/号码'].append(
219 register_info.get('details', {}).get('idno', {}).get('words', ''))
220 tmp_dict['转移登记日期'].append(
221 register_info.get('details', {}).get('date', {}).get('words', ''))
222 mvc_dict = tmp_dict
223 del tmp_dict
224 del mvc_res
225 if classify == consts.IC_CLASSIFY: # 身份证真伪
201 for id_card_dict in license_data: 226 for id_card_dict in license_data:
202 try: 227 try:
203 base64_img = id_card_dict.pop('base64_img') 228 base64_img = id_card_dict.pop('base64_img')
......
...@@ -659,30 +659,10 @@ class BSWorkbook(Workbook): ...@@ -659,30 +659,10 @@ class BSWorkbook(Workbook):
659 if classify == consts.IC_CLASSIFY and license_dict.get('类别') == '1': # 居住证处理 659 if classify == consts.IC_CLASSIFY and license_dict.get('类别') == '1': # 居住证处理
660 license_summary.setdefault(consts.RP_CLASSIFY, []).append(license_dict) 660 license_summary.setdefault(consts.RP_CLASSIFY, []).append(license_dict)
661 continue 661 continue
662 if classify == consts.MVC_CLASSIFY:
663 try:
664 mvc_page = license_dict.pop('page')
665 except Exception as e:
666 pass
667 else:
668 if mvc_page == 'VehicleRegArea':
669 tmp_dict = {
670 '姓名/名称': [],
671 '身份证明名称/号码': [],
672 '转移登记日期': [],
673 }
674 mvc_res = license_dict.get('results', {})
675 for register_info in mvc_res.get('register_info', []):
676 if register_info.get('register_type', 0) == 2:
677 tmp_dict['姓名/名称'].append(register_info.get('details', {}).get('name', {}).get('words', ''))
678 tmp_dict['身份证明名称/号码'].append(register_info.get('details', {}).get('idno', {}).get('words', ''))
679 tmp_dict['转移登记日期'].append(register_info.get('details', {}).get('date', {}).get('words', ''))
680 license_dict = tmp_dict
681 del tmp_dict
682 if side_diff: 662 if side_diff:
683 key, field_order_yes, field_order_no = consts.FIELD_ORDER_MAP.get(classify) 663 key, field_order_yes, field_order_no = consts.FIELD_ORDER_MAP.get(classify)
684 field_order = field_order_yes if key in license_dict else field_order_no 664 field_order = field_order_yes if key in license_dict else field_order_no
685 if classify == consts.MVI_CLASSIFY: 665 if classify == consts.MVI_CLASSIFY: # 机动车销售统一发票, 增加不含税价(逻辑计算)
686 price = '' 666 price = ''
687 rate_str = license_dict.get('增值税税率') 667 rate_str = license_dict.get('增值税税率')
688 price_total_str = license_dict.get('价税合计小写') 668 price_total_str = license_dict.get('价税合计小写')
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!