From 70358eef67fa4baaba4b87b1a81f9326492d946b Mon Sep 17 00:00:00 2001 From: daovietanh99 Date: Wed, 31 Jan 2024 09:50:58 +0700 Subject: [PATCH] update file utils and report_detail.xlsx --- cope2n-api/fwd_api/utils/file.py | 21 ++++++++++++--------- cope2n-api/report_detail.xlsx | Bin 6209 -> 6335 bytes 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/cope2n-api/fwd_api/utils/file.py b/cope2n-api/fwd_api/utils/file.py index 04eb5ce..994b9dc 100644 --- a/cope2n-api/fwd_api/utils/file.py +++ b/cope2n-api/fwd_api/utils/file.py @@ -396,17 +396,20 @@ def dict2xlsx(input: json, _type='report'): 'D': 'imei_user_submitted', 'E': "imei_ocr_retrieved", 'F': "imei1_accuracy", - 'G': "purchase_date_user_submitted", - 'H': "purchase_date_ocr_retrieved", - 'I': "purchase_date_accuracy", - 'J': "retailer_user_submitted", - 'K': "retailer_ocr_retrieved", - 'L': "retailer_accuracy", - 'M': "average_accuracy", - 'N': "ocr_processing_time", + 'G': "invoice_purchase_date_consumer", + 'H': "invoice_purchase_date_ocr", + 'I': "invoice_purchase_date_accuracy", + 'J': "invoice_retailer_consumer", + 'K': "invoice_retailer_ocr", + 'L': "invoice_retailer_accuracy", + 'M': "ocr_image_accuracy", + 'N': "ocr_image_speed", 'O': "is_reviewed", 'P': "bad_image_reasons", 'Q': "countermeasures", + 'R': 'imei_revised_accuracy', + 'S': 'purchase_date_revised_accuracy', + 'T': 'retailer_revised_accuracy', } start_index = 4 @@ -425,7 +428,7 @@ def dict2xlsx(input: json, _type='report'): elif _type == 'report_detail': if 'accuracy' in mapping[key] and type(value) in [int, float] and value < 95: ws[key + str(start_index)].style = normal_cell_red - elif 'time' in mapping[key] and type(value) in [int, float] and value > 2.0: + elif 'speed' in mapping[key] and type(value) in [int, float] and value > 2.0: ws[key + str(start_index)].style = normal_cell_red else: ws[key + str(start_index)].style = normal_cell diff --git a/cope2n-api/report_detail.xlsx b/cope2n-api/report_detail.xls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