bank service update [config]
This commit is contained in:
parent
c525ac1117
commit
5a5e58ff78
|
|
@ -173,9 +173,9 @@ def account_records_search():
|
||||||
fs, ac = similarity_result.get("similarity"), account_record.similarity or 0
|
fs, ac = similarity_result.get("similarity"), account_record.similarity or 0
|
||||||
if float(fs) >= 0.8 and float(fs) > float(ac):
|
if float(fs) >= 0.8 and float(fs) > float(ac):
|
||||||
found_list.append(similarity_result)
|
found_list.append(similarity_result)
|
||||||
# account_save_search_result(
|
account_save_search_result(
|
||||||
# account_record=account_record, similarity_result=similarity_result
|
account_record=account_record, similarity_result=similarity_result
|
||||||
# )
|
)
|
||||||
else:
|
else:
|
||||||
similarity_result = parse_comment_with_name_iban_description(
|
similarity_result = parse_comment_with_name_iban_description(
|
||||||
account_record=account_record
|
account_record=account_record
|
||||||
|
|
@ -183,9 +183,9 @@ def account_records_search():
|
||||||
fs, ac = similarity_result.get("similarity"), account_record.similarity or 0
|
fs, ac = similarity_result.get("similarity"), account_record.similarity or 0
|
||||||
if float(fs) >= 0.8 and float(fs) > float(ac):
|
if float(fs) >= 0.8 and float(fs) > float(ac):
|
||||||
found_list.append(similarity_result)
|
found_list.append(similarity_result)
|
||||||
# account_save_search_result(
|
account_save_search_result(
|
||||||
# account_record=account_record, similarity_result=similarity_result
|
account_record=account_record, similarity_result=similarity_result
|
||||||
# )
|
)
|
||||||
print("Account Records Search : ", len(found_list), "/", len(account_records_list))
|
print("Account Records Search : ", len(found_list), "/", len(account_records_list))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -323,9 +323,9 @@ def send_accounts_to_decision_payment():
|
||||||
|
|
||||||
|
|
||||||
def account_records_service() -> None:
|
def account_records_service() -> None:
|
||||||
# account_records_find_decision_book()
|
account_records_find_decision_book()
|
||||||
account_records_search()
|
account_records_search()
|
||||||
# send_accounts_to_decision_payment()
|
send_accounts_to_decision_payment()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,8 @@
|
||||||
class AccountConfig:
|
class AccountConfig:
|
||||||
BEFORE_DAY = 30
|
BEFORE_DAY = 30
|
||||||
|
CATEGORIES = {
|
||||||
|
"DAIRE": ["daire", "dagire", "daare", "nolu daire", "no", "nolu dairenin"],
|
||||||
|
"APARTMAN": ["apartman", "aparman", "aprmn"],
|
||||||
|
"VILLA": ["villa", "vlla"],
|
||||||
|
"BINA": ["bina", "binna"]
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from difflib import get_close_matches
|
from difflib import get_close_matches
|
||||||
|
from service_account_records.configs import AccountConfig
|
||||||
|
|
||||||
categories = {
|
|
||||||
"DAIRE": ["daire", "dagire", "daare", "nolu daire", "no", "nolu dairenin"],
|
|
||||||
"APARTMAN": ["apartman", "aparman", "aprmn"],
|
|
||||||
"VILLA": ["villa", "vlla"],
|
|
||||||
"BINA": ["bina", "binna"]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def word_straighten(word, ref_list, threshold=0.8):
|
def word_straighten(word, ref_list, threshold=0.8):
|
||||||
|
|
@ -16,6 +10,7 @@ def word_straighten(word, ref_list, threshold=0.8):
|
||||||
|
|
||||||
|
|
||||||
def category_finder(text, output_template="{kategori} {numara}"):
|
def category_finder(text, output_template="{kategori} {numara}"):
|
||||||
|
categories = AccountConfig.CATEGORIES
|
||||||
result = {category: [] for category in categories} # Sonuçları depolamak için bir sözlük
|
result = {category: [] for category in categories} # Sonuçları depolamak için bir sözlük
|
||||||
for category, patterns in categories.items():
|
for category, patterns in categories.items():
|
||||||
words = re.split(r'\W+', text)
|
words = re.split(r'\W+', text)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
# IP_ADDRESS: str = "http://10.10.2.46:41575/internal/isbank/retreive"
|
# IP_ADDRESS: str = "http://10.10.2.46:41575/internal/isbank/retreive"
|
||||||
SERVICE_TIMING: int = 900 # 15 min
|
SERVICE_TIMING: int = 900 # 15 min
|
||||||
|
|
||||||
UNREAD_PATH: str = "/home/bank/isbank/unread/"
|
CONTAINERS_PATH: str = "/service_app_banks"
|
||||||
PARSED_PATH: str = "/home/bank/isbank/parsed/parsed_data.json"
|
UNREAD_PATH: str = f"{CONTAINERS_PATH}/isbank/unread/"
|
||||||
ARCHIVE_PATH: str = "/home/bank/isbank/archive/"
|
PARSED_PATH: str = f"{CONTAINERS_PATH}/isbank/parsed/parsed_data.json"
|
||||||
INCOMING_PATH: str = "/home/bank/isbank/unread"
|
ARCHIVE_PATH: str = f"{CONTAINERS_PATH}/isbank/archive/"
|
||||||
COMPLETED_PATH: str = "/home/bank/isbank/completed"
|
INCOMING_PATH: str = f"{CONTAINERS_PATH}/isbank/unread"
|
||||||
|
COMPLETED_PATH: str = f"{CONTAINERS_PATH}/isbank/completed"
|
||||||
|
|
||||||
MAILBOX: str = "bilgilendirme@ileti.isbank.com.tr"
|
MAILBOX: str = "bilgilendirme@ileti.isbank.com.tr"
|
||||||
KARATAY: str = "karatay.berkay@gmail.com"
|
KARATAY: str = "karatay.berkay@gmail.com"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue