Merge branch 'develop' into feature-NEWDWH2021-1199
This commit is contained in:
commit
a7d2dc6a8a
@ -7,6 +7,7 @@ from src.model.db.ultmarc_doctor import UltmarcDoctorDBModel
|
||||
from src.model.db.ultmarc_doctor_info import UltmarcDoctorInfoDBModel
|
||||
from src.model.request.ultmarc_doctor import UltmarcDoctorSearchModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
from src.system_var import environment
|
||||
from src.util.string_util import is_not_empty
|
||||
|
||||
logger = get_logger('COM_医師取得')
|
||||
@ -46,6 +47,7 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
com_dr_wrkplace.dcf_dsf_inst_cd,
|
||||
com_dr_wrkplace.blng_sec_cd,
|
||||
com_dr_trt_course.trt_course_cd
|
||||
LIMIT {limit}
|
||||
\
|
||||
"""
|
||||
|
||||
@ -55,7 +57,8 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
# 文字列の検索を部分一致にするため、モデルをコピー。以降はこのコピーを使用する。
|
||||
clone_parameter = UltmarcDoctorSearchModel(**parameter.model_dump())
|
||||
where_clause = self.__build_condition(clone_parameter)
|
||||
query = self.FETCH_SQL.format(where_clause=where_clause)
|
||||
query = self.FETCH_SQL.format(
|
||||
where_clause=where_clause, limit=environment.ULTMARC_SEARCH_RESULT_MAX_COUNT + 1)
|
||||
result = self._database.execute_select(query, clone_parameter.model_dump())
|
||||
models = [UltmarcDoctorDBModel(**r) for r in result]
|
||||
|
||||
@ -149,7 +152,7 @@ class UltmarcDoctorRepository(BaseRepository):
|
||||
'', '', "(com_dr.use_stop_div NOT IN ('01','03','04') OR com_dr.use_stop_div IS NULL)", literal=True))
|
||||
|
||||
# 廃業除外
|
||||
if where_clauses:
|
||||
if len(where_clauses) > 0:
|
||||
where_clauses.append(SQLCondition(
|
||||
'', '', '(length(com_inst.abolish_ymd) = 0 OR com_inst.abolish_ymd IS NULL)', literal=True))
|
||||
where_clauses.append(SQLCondition(
|
||||
|
||||
@ -7,6 +7,7 @@ from src.model.db.ultmarc_inst import UltmarcInstDBModel
|
||||
from src.model.db.ultmarc_inst_info import UltmarcInstInfoDBModel
|
||||
from src.model.request.ultmarc_inst import UltmarcInstSearchModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
from src.system_var import environment
|
||||
from src.util.string_util import is_not_empty
|
||||
|
||||
logger = get_logger('COM_施設取得')
|
||||
@ -32,6 +33,7 @@ class UltmarcInstRepository(BaseRepository):
|
||||
LEFT JOIN src05.com_hp_assrt ON com_inst.hp_assrt_cd = com_hp_assrt.hp_assrt_cd
|
||||
WHERE {where_clause}
|
||||
ORDER BY dcf_dsf_inst_cd
|
||||
LIMIT {limit}
|
||||
\
|
||||
"""
|
||||
|
||||
@ -41,7 +43,8 @@ class UltmarcInstRepository(BaseRepository):
|
||||
# 文字列の検索を部分一致にするため、モデルをコピー。以降はこのコピーを使用する。
|
||||
clone_parameter = UltmarcInstSearchModel(**parameter.model_dump())
|
||||
where_clause = self.__build_condition(clone_parameter)
|
||||
query = self.FETCH_SQL.format(where_clause=where_clause)
|
||||
query = self.FETCH_SQL.format(
|
||||
where_clause=where_clause, limit=environment.ULTMARC_SEARCH_RESULT_MAX_COUNT + 1)
|
||||
result = self._database.execute_select(query, clone_parameter.model_dump())
|
||||
models = [UltmarcInstDBModel(**r) for r in result]
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ DB_PASSWORD = os.environ['DB_PASSWORD']
|
||||
DB_SCHEMA = os.environ['DB_SCHEMA']
|
||||
|
||||
BIO_SEARCH_RESULT_MAX_COUNT = int(os.environ.get('BIO_SEARCH_RESULT_MAX_COUNT', 35000))
|
||||
ULTMARC_SEARCH_RESULT_MAX_COUNT = int(os.environ['ULTMARC_SEARCH_RESULT_MAX_COUNT'])
|
||||
ULTMARC_SEARCH_RESULT_MAX_COUNT = int(os.environ.get('ULTMARC_SEARCH_RESULT_MAX_COUNT', 500))
|
||||
SESSION_EXPIRE_MINUTE = int(os.environ['SESSION_EXPIRE_MINUTE'])
|
||||
|
||||
LOG_LEVEL = os.environ.get('LOG_LEVEL', 'INFO')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user