diff --git a/cope2n-api/fwd_api/utils/file.py b/cope2n-api/fwd_api/utils/file.py index 04eb5ce..bd0b4c8 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 @@ -420,12 +423,14 @@ def dict2xlsx(input: json, _type='report'): ws[key + str(start_index)].font = font_black_bold if key_index == 0 or (key_index >= 9 and key_index <= 15): ws[key + str(start_index)].fill = fill_gray + elif key_index == 1: + ws[key + str(start_index)].fill = fill_green elif key_index >= 4 and key_index <= 8: ws[key + str(start_index)].fill = fill_yellow 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.xlsx index aa552cc..6850d8e 100644 Binary files a/cope2n-api/report_detail.xlsx and b/cope2n-api/report_detail.xlsx differ