Merge pull request #5 from SDSRV-IDP/vietanh99-request-update
Vietanh99 request update
This commit is contained in:
commit
3f524e677d
@ -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
|
||||||
|
|
||||||
@ -420,12 +423,14 @@ def dict2xlsx(input: json, _type='report'):
|
|||||||
ws[key + str(start_index)].font = font_black_bold
|
ws[key + str(start_index)].font = font_black_bold
|
||||||
if key_index == 0 or (key_index >= 9 and key_index <= 15):
|
if key_index == 0 or (key_index >= 9 and key_index <= 15):
|
||||||
ws[key + str(start_index)].fill = fill_gray
|
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:
|
elif key_index >= 4 and key_index <= 8:
|
||||||
ws[key + str(start_index)].fill = fill_yellow
|
ws[key + str(start_index)].fill = fill_yellow
|
||||||
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