ログとかインデント調整

This commit is contained in:
x.azuma.m@nds-tyo.co.jp 2023-05-09 22:30:06 +09:00
parent f299cb9379
commit 1bff52f8c7
3 changed files with 14 additions and 9 deletions

View File

@ -57,5 +57,5 @@ class JjskDataLoadManager:
# データベース登録
self._import_to_db(local_file_name, target["condkey"])
logger.debug('JjskDataLoadManager#load end')
logger.debug('JjskDataLoadManager#load done')
return

View File

@ -27,7 +27,7 @@ def _check_if_file_exists(src_list: list, condkey: str) -> bool:
ret = True
break
logger.debug(f"_check_if_file_exists end (return : {ret})")
logger.debug(f"_check_if_file_exists done (return : {ret})")
return ret
@ -100,7 +100,7 @@ def _check_received_files():
if not _check_if_file_exists(received_s3_files, vjsk_mapper.CONDKEY_LOT_NUM_MST):
raise BatchOperationException(f'製造ロット番号マスタファイルがありません ファイル一覧:{received_s3_files}')
logger.debug('_check_received_files end')
logger.debug('_check_received_files done')
return True
@ -115,11 +115,15 @@ def _import_file_to_db():
# S3バケット「実消化&アルトマーク V実消化データ受領バケット」の受領ファイルをローカルストレージにdownloadして辞書化する
target_dict = {}
for s3_file_path in received_s3_files:
file_name = s3_file_path.get('filename')
# S3バケットにある受領ファイルをローカルストレージにdownloadする
local_file_path = vjsk_recv_bucket.download_data_file(s3_file_path.get('filename'))
logger.debug(f"download s3 file start : {file_name}")
local_file_path = vjsk_recv_bucket.download_data_file(file_name)
logger.debug(f"download s3 file done : {file_name}")
# データファイル名に該当する辞書アクセス用のキーを取得する
key = vjsk_mapper.get_condkey_by_s3_file_path(s3_file_path.get('filename'))
key = vjsk_mapper.get_condkey_by_s3_file_path(file_name)
# 想定されたデータファイルであれば辞書登録する
if key is not None:
@ -172,7 +176,7 @@ def _import_file_to_db():
# DB登録 製造ロット番号マスタ
JjskDataLoadManager.Load(target_dict[vjsk_mapper.CONDKEY_LOT_NUM_MST])
logger.debug('_import_file_to_db end')
logger.debug('_import_file_to_db done')
def _determine_today_is_stockslipdata_target():
@ -193,7 +197,7 @@ def _determine_today_is_stockslipdata_target():
except Exception as e:
logger.error(f'{e}')
raise e
logger.debug("_determine_today_is_stockslipdata_target end")
logger.debug("_determine_today_is_stockslipdata_target done")
return ret

View File

@ -325,7 +325,8 @@ class VjskRecvFileMapper:
,t.REC_STS_KBN
,t.INS_DT
,t.UPD_DT
,SYSDATE() FROM org05.hld_mst_v AS t
,SYSDATE()
FROM org05.hld_mst_v AS t
ON DUPLICATE KEY UPDATE
V_HLD_CD=t.V_HLD_CD
,SUB_NUM=t.SUB_NUM
@ -1122,7 +1123,7 @@ class VjskRecvFileMapper:
,t.INS_DT
,t.INS_USR
,SYSDATE()
FROM org05.whole_stock AS t
FROM org05.whole_stock AS t
ON DUPLICATE KEY UPDATE
REC_DATA=t.REC_DATA
,REC_WHS_CD=t.REC_WHS_CD