优化命名,类与模块最好不要重名
This commit is contained in:
@@ -2,7 +2,7 @@ import logging
|
||||
import re
|
||||
from datetime import datetime
|
||||
|
||||
from util import util
|
||||
from util import common_util
|
||||
|
||||
|
||||
# 处理金额类数据
|
||||
@@ -29,7 +29,7 @@ def handle_decimal(string):
|
||||
def parse_money(capital_num, num):
|
||||
if capital_num:
|
||||
try:
|
||||
money = util.chinese_money_to_number(capital_num)
|
||||
money = common_util.chinese_money_to_number(capital_num)
|
||||
return capital_num, money
|
||||
except Exception as e:
|
||||
logging.warning("大写金额解析失败", exc_info=e)
|
||||
@@ -172,7 +172,7 @@ def parse_hospital(string):
|
||||
if not string:
|
||||
return result
|
||||
|
||||
string = util.traditional_to_simple_chinese(string)
|
||||
string = common_util.traditional_to_simple_chinese(string)
|
||||
string_without_brackets = string.replace(")", "").replace(")", "").replace("(", " ").replace("(", " ")
|
||||
string_without_company = string_without_brackets.replace("有限公司", "")
|
||||
split_hospitals = string_without_company.replace("医院", "医院 ")
|
||||
|
||||
Reference in New Issue
Block a user