From 1cb9046402ab628379909dcec46ab97b42205aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=8E=E9=96=93?= Date: Tue, 30 May 2023 16:36:59 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=90=E3=83=83=E3=83=81=E5=87=A6=E7=90=86?= =?UTF-8?q?=E4=B8=AD=E3=82=B9=E3=83=86=E3=83=BC=E3=82=BF=E3=82=B9=E3=81=AB?= =?UTF-8?q?=E3=82=88=E3=81=A3=E3=81=A6=E8=AD=A6=E5=91=8A=E3=83=A1=E3=83=83?= =?UTF-8?q?=E3=82=BB=E3=83=BC=E3=82=B8=E3=81=AE=E8=A1=A8=E7=A4=BA=E5=88=B6?= =?UTF-8?q?=E5=BE=A1=E3=82=92=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecs/jskult-webapp/src/controller/ultmarc.py | 7 ++++++- .../src/model/view/ultmarc_doctor_view_model.py | 2 +- ecs/jskult-webapp/src/templates/docSearch.html | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ecs/jskult-webapp/src/controller/ultmarc.py b/ecs/jskult-webapp/src/controller/ultmarc.py index ed966685..f440332d 100644 --- a/ecs/jskult-webapp/src/controller/ultmarc.py +++ b/ecs/jskult-webapp/src/controller/ultmarc.py @@ -27,15 +27,20 @@ router.route_class = AuthenticatedRoute @router.get('/docSearch') def ultmarc_view( request: Request, - # batch_status_service:BatchStatusService=Depends(get_service(BatchStatusService)), + batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService)), ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)) ): session: UserSession = request.session # バッチ処理中の場合、機能を利用させない + is_batch_processing = batch_status_service.is_batch_processing() + # if batch_status_service.is_batch_processing(): # raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BATCH_PROCESSING) + # # 検索項目の取得 ultmarc = ultmarc_service.prepare_ultmarc_doctor_view(session) + ultmarc.is_batch_processing = is_batch_processing + # セッション書き換え session.update( actions=[ diff --git a/ecs/jskult-webapp/src/model/view/ultmarc_doctor_view_model.py b/ecs/jskult-webapp/src/model/view/ultmarc_doctor_view_model.py index 1e3cf236..894573e4 100644 --- a/ecs/jskult-webapp/src/model/view/ultmarc_doctor_view_model.py +++ b/ecs/jskult-webapp/src/model/view/ultmarc_doctor_view_model.py @@ -14,7 +14,7 @@ from src.system_var import environment class UltmarcDoctorViewModel(BaseModel): subtitle: str = '医師検索一覧' - batch_status: Optional[str] + is_batch_processing: Optional[bool] prefc_models: list[PrefcMasterModel] doctor_data: Optional[list[BisDisplayModel]] = [] form_data: Optional[BioModel] diff --git a/ecs/jskult-webapp/src/templates/docSearch.html b/ecs/jskult-webapp/src/templates/docSearch.html index 45189de3..26d17b9f 100644 --- a/ecs/jskult-webapp/src/templates/docSearch.html +++ b/ecs/jskult-webapp/src/templates/docSearch.html @@ -162,7 +162,10 @@ if (!isset($isDBSuccess)) { // バッチ処理中判断 if(getDateBatchJSString($dbs, $user, $pass) && $isDBSuccess){ ?> --> -
日次バッチ処理中のため、データが正しく表示されない可能性があります
+ {% if ultmarc.is_batch_processing %} +
日次バッチ処理中のため、データが正しく表示されない可能性があります
+ {% endif %} +