gb page order
Showing
1 changed file
with
14 additions
and
2 deletions
| ... | @@ -337,7 +337,7 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -337,7 +337,7 @@ class Command(BaseCommand, LoggerMixin): |
| 337 | ic_merge = False | 337 | ic_merge = False |
| 338 | rp_merge = False | 338 | rp_merge = False |
| 339 | 339 | ||
| 340 | for classify in (consts.IC_CLASSIFY, consts.MVI_CLASSIFY): | 340 | for classify in (consts.IC_CLASSIFY, consts.MVI_CLASSIFY, consts.MVC_CLASSIFY): |
| 341 | 341 | ||
| 342 | license_list = license_summary.get(classify) | 342 | license_list = license_summary.get(classify) |
| 343 | 343 | ||
| ... | @@ -394,8 +394,20 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -394,8 +394,20 @@ class Command(BaseCommand, LoggerMixin): |
| 394 | price = round(price_total * 100 / (rate + 100), 2) | 394 | price = round(price_total * 100 / (rate + 100), 2) |
| 395 | license_dict['不含税价(逻辑计算)'] = price | 395 | license_dict['不含税价(逻辑计算)'] = price |
| 396 | 396 | ||
| 397 | return ic_merge, rp_merge | 397 | if classify == consts.MVC_CLASSIFY: # 机动车登记证先1/2页,后3/4页 |
| 398 | key, _, _ = consts.FIELD_ORDER_MAP.get(classify) | ||
| 399 | page_1_2 = [] | ||
| 400 | page_3_4 = [] | ||
| 401 | for license_dict in license_list: | ||
| 402 | if key in license_dict: | ||
| 403 | page_3_4.append(license_dict) | ||
| 404 | else: | ||
| 405 | page_1_2.append(license_dict) | ||
| 406 | page_1_2.extend(page_3_4) | ||
| 407 | license_summary[classify] = page_1_2 | ||
| 408 | page_1_2 = page_3_4 = None | ||
| 398 | 409 | ||
| 410 | return ic_merge, rp_merge | ||
| 399 | 411 | ||
| 400 | def parse_img_path(self, img_path): | 412 | def parse_img_path(self, img_path): |
| 401 | img_name, _ = os.path.splitext(os.path.basename(img_path)) | 413 | img_name, _ = os.path.splitext(os.path.basename(img_path)) | ... | ... |
-
Please register or sign in to post a comment