9be470c1 by 周伟奇

gb page order

1 parent 4ab9525a
......@@ -337,7 +337,7 @@ class Command(BaseCommand, LoggerMixin):
ic_merge = False
rp_merge = False
for classify in (consts.IC_CLASSIFY, consts.MVI_CLASSIFY):
for classify in (consts.IC_CLASSIFY, consts.MVI_CLASSIFY, consts.MVC_CLASSIFY):
license_list = license_summary.get(classify)
......@@ -394,8 +394,20 @@ class Command(BaseCommand, LoggerMixin):
price = round(price_total * 100 / (rate + 100), 2)
license_dict['不含税价(逻辑计算)'] = price
return ic_merge, rp_merge
if classify == consts.MVC_CLASSIFY: # 机动车登记证先1/2页,后3/4页
key, _, _ = consts.FIELD_ORDER_MAP.get(classify)
page_1_2 = []
page_3_4 = []
for license_dict in license_list:
if key in license_dict:
page_3_4.append(license_dict)
else:
page_1_2.append(license_dict)
page_1_2.extend(page_3_4)
license_summary[classify] = page_1_2
page_1_2 = page_3_4 = None
return ic_merge, rp_merge
def parse_img_path(self, img_path):
img_name, _ = os.path.splitext(os.path.basename(img_path))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!