From 995ea55da3dea2eee8784d1e45f6973013d20540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=8E=E9=96=93?= Date: Thu, 24 Aug 2023 09:33:26 +0900 Subject: [PATCH] =?UTF-8?q?feat:=E6=8C=87=E6=91=98=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/repositories/ultmarc_doctor_repository.py | 6 +++--- .../src/repositories/ultmarc_inst_repository.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ecs/jskult-webapp/src/repositories/ultmarc_doctor_repository.py b/ecs/jskult-webapp/src/repositories/ultmarc_doctor_repository.py index a97ec2ee..498733d7 100644 --- a/ecs/jskult-webapp/src/repositories/ultmarc_doctor_repository.py +++ b/ecs/jskult-webapp/src/repositories/ultmarc_doctor_repository.py @@ -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( diff --git a/ecs/jskult-webapp/src/repositories/ultmarc_inst_repository.py b/ecs/jskult-webapp/src/repositories/ultmarc_inst_repository.py index d751ba33..64eb0796 100644 --- a/ecs/jskult-webapp/src/repositories/ultmarc_inst_repository.py +++ b/ecs/jskult-webapp/src/repositories/ultmarc_inst_repository.py @@ -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]