feat:指摘内容を修正

This commit is contained in:
野間 2023-08-24 09:33:26 +09:00
parent 67838a754d
commit 995ea55da3
2 changed files with 5 additions and 5 deletions

View File

@ -57,8 +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, limit=environment.
ULTMARC_SEARCH_RESULT_MAX_COUNT + 1)
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]
@ -152,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(

View File

@ -43,8 +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, limit=environment.
ULTMARC_SEARCH_RESULT_MAX_COUNT + 1)
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]