update file utils and report_detail.xlsx
This commit is contained in:
parent
d17b1c741b
commit
70358eef67
@ -396,17 +396,20 @@ def dict2xlsx(input: json, _type='report'):
|
|||||||
'D': 'imei_user_submitted',
|
'D': 'imei_user_submitted',
|
||||||
'E': "imei_ocr_retrieved",
|
'E': "imei_ocr_retrieved",
|
||||||
'F': "imei1_accuracy",
|
'F': "imei1_accuracy",
|
||||||
'G': "purchase_date_user_submitted",
|
'G': "invoice_purchase_date_consumer",
|
||||||
'H': "purchase_date_ocr_retrieved",
|
'H': "invoice_purchase_date_ocr",
|
||||||
'I': "purchase_date_accuracy",
|
'I': "invoice_purchase_date_accuracy",
|
||||||
'J': "retailer_user_submitted",
|
'J': "invoice_retailer_consumer",
|
||||||
'K': "retailer_ocr_retrieved",
|
'K': "invoice_retailer_ocr",
|
||||||
'L': "retailer_accuracy",
|
'L': "invoice_retailer_accuracy",
|
||||||
'M': "average_accuracy",
|
'M': "ocr_image_accuracy",
|
||||||
'N': "ocr_processing_time",
|
'N': "ocr_image_speed",
|
||||||
'O': "is_reviewed",
|
'O': "is_reviewed",
|
||||||
'P': "bad_image_reasons",
|
'P': "bad_image_reasons",
|
||||||
'Q': "countermeasures",
|
'Q': "countermeasures",
|
||||||
|
'R': 'imei_revised_accuracy',
|
||||||
|
'S': 'purchase_date_revised_accuracy',
|
||||||
|
'T': 'retailer_revised_accuracy',
|
||||||
}
|
}
|
||||||
start_index = 4
|
start_index = 4
|
||||||
|
|
||||||
@ -425,7 +428,7 @@ def dict2xlsx(input: json, _type='report'):
|
|||||||
elif _type == 'report_detail':
|
elif _type == 'report_detail':
|
||||||
if 'accuracy' in mapping[key] and type(value) in [int, float] and value < 95:
|
if 'accuracy' in mapping[key] and type(value) in [int, float] and value < 95:
|
||||||
ws[key + str(start_index)].style = normal_cell_red
|
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
|
ws[key + str(start_index)].style = normal_cell_red
|
||||||
else:
|
else:
|
||||||
ws[key + str(start_index)].style = normal_cell
|
ws[key + str(start_index)].style = normal_cell
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user