From 1416cd04d2864341de36a8efd54b76902b503130 Mon Sep 17 00:00:00 2001 From: daovietanh99 Date: Thu, 15 Feb 2024 14:36:01 +0700 Subject: [PATCH 1/4] update migrate csv --- cope2n-ai-fi/modules/sdsvkvu | 2 +- cope2n-api/fwd_api/management/commands/migrate-csv.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cope2n-ai-fi/modules/sdsvkvu b/cope2n-ai-fi/modules/sdsvkvu index b6d4fab..6907ea0 160000 --- a/cope2n-ai-fi/modules/sdsvkvu +++ b/cope2n-ai-fi/modules/sdsvkvu @@ -1 +1 @@ -Subproject commit b6d4fab46f7f8689dd6b050cfbff2faa6a6f3fec +Subproject commit 6907ea0183b141e3b4f3c21758c9123f1e9b2a27 diff --git a/cope2n-api/fwd_api/management/commands/migrate-csv.py b/cope2n-api/fwd_api/management/commands/migrate-csv.py index 2be1be0..ddb63d1 100644 --- a/cope2n-api/fwd_api/management/commands/migrate-csv.py +++ b/cope2n-api/fwd_api/management/commands/migrate-csv.py @@ -53,14 +53,14 @@ class Command(BaseCommand): is_match = True if field == 'imei_number': - if not reviewed_result == request_review: + if not reviewed_result in request_review["imei_number"]: request_review["imei_number"].append(reviewed_result) - if not user_feedback == request_feedback: + if not user_feedback in request_feedback["imei_number"]: request_feedback["imei_number"].append(user_feedback) else: - if not reviewed_result == request_review: + if not reviewed_result == request_review[field]: request_review[field] = reviewed_result - if not user_feedback == request_feedback: + if not user_feedback == request_feedback[field]: request_feedback[field] = user_feedback _predict_result = copy.deepcopy(predict_result_to_ready(request.predict_result)) From a7b86730aa761ccb08161d19ebe9d9237785f9e3 Mon Sep 17 00:00:00 2001 From: daovietanh99 Date: Thu, 15 Feb 2024 15:21:53 +0700 Subject: [PATCH 2/4] UPDATE: update report xlsx and file utils --- cope2n-api/fwd_api/utils/file.py | 41 ++++++++++++++++--------------- cope2n-api/report.xlsx | Bin 6546 -> 6954 bytes 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/cope2n-api/fwd_api/utils/file.py b/cope2n-api/fwd_api/utils/file.py index 4b5e55e..b71604e 100644 --- a/cope2n-api/fwd_api/utils/file.py +++ b/cope2n-api/fwd_api/utils/file.py @@ -443,20 +443,21 @@ def dict2xlsx(input: json, _type='report'): mapping = { 'A': 'subs', 'B': 'extraction_date', - 'C': 'num_imei', - 'D': 'num_invoice', - 'E': 'total_images', - 'F': 'images_quality.successful', - 'G': 'images_quality.successful_percent', - 'H': 'images_quality.bad', - 'I': 'images_quality.bad_percent', - 'J': 'average_accuracy_rate.imei', - 'K': 'average_accuracy_rate.purchase_date', - 'L': 'average_accuracy_rate.retailer_name', - 'M': 'average_processing_time.imei', - 'N': 'average_processing_time.invoice', - 'O': 'usage.imei', - 'P': 'usage.invoice', + 'C': 'usage.total_images', + 'D': 'usage.imei', + 'E': 'usage.invoice', + 'F': 'total_images', + 'G': 'num_imei', + 'H': 'num_invoice', + 'I': 'images_quality.successful', + 'J': 'images_quality.successful_percent', + 'K': 'images_quality.bad', + 'L': 'images_quality.bad_percent', + 'M': 'average_accuracy_rate.imei', + 'N': 'average_accuracy_rate.purchase_date', + 'O': 'average_accuracy_rate.retailer_name', + 'P': 'average_processing_time.imei', + 'Q': 'average_processing_time.invoice', } start_index = 5 @@ -497,7 +498,7 @@ def dict2xlsx(input: json, _type='report'): if subtotal['subs'] == '+': ws[key + str(start_index)].font = font_black_bold if key_index in [6, 8, 9, 10, 11, 12, 13]: - ws[key + str(start_index)].number_format = numbers.FORMAT_NUMBER_00 + ws[key + str(start_index)].number_format = '0.0' if key_index == 0 or (key_index >= 9 and key_index <= 15): ws[key + str(start_index)].fill = fill_gray elif key_index == 1: @@ -506,19 +507,19 @@ def dict2xlsx(input: json, _type='report'): ws[key + str(start_index)].fill = fill_yellow else: if 'average_accuracy_rate' in mapping[key] and type(value) in [int, float]: - if value < 95: + if value < 98: ws[key + str(start_index)].style = normal_cell_red - ws[key + str(start_index)].number_format = numbers.FORMAT_NUMBER_00 + ws[key + str(start_index)].number_format = '0.0' elif 'average_processing_time' in mapping[key] and type(value) in [int, float]: if value > 2.0: ws[key + str(start_index)].style = normal_cell_red - ws[key + str(start_index)].number_format = numbers.FORMAT_NUMBER_00 + ws[key + str(start_index)].number_format = '0.0' elif 'bad_percent' in mapping[key] and type(value) in [int, float]: if value > 10: ws[key + str(start_index)].style = normal_cell_red - ws[key + str(start_index)].number_format = numbers.FORMAT_NUMBER_00 + ws[key + str(start_index)].number_format = '0.0' elif 'percent' in mapping[key] and type(value) in [int, float]: - ws[key + str(start_index)].number_format = numbers.FORMAT_NUMBER_00 + ws[key + str(start_index)].number_format = '0.0' else : ws[key + str(start_index)].style = normal_cell elif _type == 'report_detail': diff --git a/cope2n-api/report.xlsx b/cope2n-api/report.xlsx index fc5b37d989c90238850317ab48fca2472ee7f76f..a7fa7e2ac06c6812f5f8a86c869885a2fce4a75e 100644 GIT binary patch delta 4963 zcmZu#2Q(b*_ggv6R5QMO5^xjLN6J3N=gJ4IGwMbaKBsvi_t3-$hN%USqgs7`T zi4p|MpYNRC_vQP}|IV2+cg~r)=RWtD`@D1C6!8j4u%XU1JP3%0hzPW=V2})E13u_? ziju|dgv1LT-JVq>DkyEy)okIEU~A{`Vs1bbeT>>WRHdONOMKm#LH#UcLBv`NjvX zRvkB;K=O)Dd~M7EZ=E~EVWKTIfdpzF*Sm#N0A6dfo~OrcFD-VK#|q+$_qb4;kGi#W zi$cqwt<+%WSd!p5=dk9!?>njFjAWvkdQ=&lnC))5v8E(WY--|0oBV4~G}$ z+GSnP`nY1ae>stO_y2NG7y@>{(&%XploI~lE+Xi?vT{1OEV{xuXTw(CtR+pq;$%LY z^KN2d!WbX+*XjpF4v!t1G25JaPD>o|a~B1GjhT99alN{DP($cJ$Mk5P+^!8FI@L9r zR_AC7yK&U~W1PB<%xLiE=&wsW8GPCp469z#s zS$oUYshSm5MnM6*qP-75Y2!I3@U^r!Q7PM6&t^gAt>VzW;=+*}mar3Xlh58585!#i zakUj*7juq{$GaUK*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WZ7Wmf#{koW*#9X5)I5H?jW4=Q z9JAkFBkdnZ&)2XYF7CKfnbBx3+yCJ>E2M@y7BOPYCk5`e6;cqh6%_r9LIYw~mr|-U z3qdFBXd@$85*}a7EfT^E3yFn+E0Xc&R-?2Fb~4(7r?c&07ej<78+jSuNb;4<=aZ{* zYoOi7MbT{r$j?3yi>7CC`NS`ppW!aZ9qC`5ERWJ8Mgn#b^+_YODdAba?C>Kt`kD2m z4Z1H0_`U`KkREV(DM9mpw-QGGi`TJ^OoG2ca%>tCD*-dMhKcX$ueiK#T0sBsva|Cg zfl&XKF@AsLu@_A2zk6^nvjRN{u~~#rf&Y#F|HJ?3#{UZI|4w+UKQkN0?_d0JI57PU zxXhiBVR6i`-=IHWg6@S^Y!18{c~^8{sZKTm1E)fJ Date: Thu, 15 Feb 2024 15:23:42 +0700 Subject: [PATCH 3/4] UPDATE: chang number format to 1 decimal place --- cope2n-api/fwd_api/utils/file.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cope2n-api/fwd_api/utils/file.py b/cope2n-api/fwd_api/utils/file.py index b71604e..1a49e30 100644 --- a/cope2n-api/fwd_api/utils/file.py +++ b/cope2n-api/fwd_api/utils/file.py @@ -524,8 +524,10 @@ def dict2xlsx(input: json, _type='report'): ws[key + str(start_index)].style = normal_cell elif _type == 'report_detail': if 'accuracy' in mapping[key] and type(value) in [int, float] and value < 75: + ws[key + str(start_index)].number_format = '0.0' ws[key + str(start_index)].style = normal_cell_red elif 'speed' in mapping[key] and type(value) in [int, float] and value > 2.0: + ws[key + str(start_index)].number_format = '0.0' ws[key + str(start_index)].style = normal_cell_red else: ws[key + str(start_index)].style = normal_cell From f1baee2bf09e693ce27a01f58631176dae224366 Mon Sep 17 00:00:00 2001 From: daovietanh99 Date: Thu, 15 Feb 2024 15:39:03 +0700 Subject: [PATCH 4/4] UPDATE: add subs field to report detail --- cope2n-api/fwd_api/utils/file.py | 41 ++++++++++++++++--------------- cope2n-api/report_detail.xlsx | Bin 6335 -> 6672 bytes 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/cope2n-api/fwd_api/utils/file.py b/cope2n-api/fwd_api/utils/file.py index 1a49e30..c5094fb 100644 --- a/cope2n-api/fwd_api/utils/file.py +++ b/cope2n-api/fwd_api/utils/file.py @@ -465,26 +465,27 @@ def dict2xlsx(input: json, _type='report'): wb = load_workbook(filename = 'report_detail.xlsx') ws = wb['Sheet1'] mapping = { - 'A': 'request_id', - 'B': 'redemption_number', - 'C': 'image_type', - 'D': 'imei_user_submitted', - 'E': "imei_ocr_retrieved", - 'F': "imei1_accuracy", - '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', + 'A': 'subs', + 'B': 'request_id', + 'C': 'redemption_number', + 'D': 'image_type', + 'E': 'imei_user_submitted', + 'F': "imei_ocr_retrieved", + 'G': "imei1_accuracy", + 'H': "invoice_purchase_date_consumer", + 'I': "invoice_purchase_date_ocr", + 'J': "invoice_purchase_date_accuracy", + 'K': "invoice_retailer_consumer", + 'L': "invoice_retailer_ocr", + 'M': "invoice_retailer_accuracy", + 'N': "ocr_image_accuracy", + 'O': "ocr_image_speed", + 'P': "is_reviewed", + 'Q': "bad_image_reasons", + 'R': "countermeasures", + 'S': 'imei_revised_accuracy', + 'T': 'purchase_date_revised_accuracy', + 'U': 'retailer_revised_accuracy', } start_index = 4 diff --git a/cope2n-api/report_detail.xlsx b/cope2n-api/report_detail.xlsx index 6850d8eaf52e793f77fcda5caa9e394cdfbbd189..566defc618701c19499d939a6b24b26464033bd7 100644 GIT binary patch delta 4562 zcmZu#1zc3y)}N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