Merge branch 'develop' into feature-NEWDWH2021-1065
This commit is contained in:
commit
8db0509eb7
1110
ecs/crm-datafetch/Pipfile.lock
generated
1110
ecs/crm-datafetch/Pipfile.lock
generated
File diff suppressed because it is too large
Load Diff
@ -13,4 +13,10 @@ JSKULT_CONFIG_CALENDAR_FOLDER=jskult/calendar
|
||||
JSKULT_CONFIG_CALENDAR_HOLIDAY_LIST_FILE_NAME=jskult_holiday_list.txt
|
||||
VJSK_BACKUP_FOLDER=vjsk
|
||||
VJSK_DATA_SEND_FOLDER=send
|
||||
VJSK_DATA_BUCKET=*************
|
||||
VJSK_DATA_BUCKET=*************
|
||||
# 連携データ抽出期間
|
||||
SALES_LAUNDERING_EXTRACT_DATE_PERIOD=0
|
||||
# 洗替対象テーブル名
|
||||
SALES_LAUNDERING_TARGET_TABLE_NAME=src05.sales_lau
|
||||
# 卸実績洗替で作成するデータの期間(年単位)
|
||||
SALES_LAUNDERING_TARGET_YEAR_OFFSET=5
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
from src.batch.batch_functions import logging_sql
|
||||
from src.batch.common.batch_context import BatchContext
|
||||
from src.db.database import Database
|
||||
from src.error.exceptions import BatchOperationException
|
||||
from src.logging.get_logger import get_logger
|
||||
from src.time.elapsed_time import ElapsedTime
|
||||
|
||||
batch_context = BatchContext.get_instance()
|
||||
logger = get_logger('生物由来卸販売ロット分解')
|
||||
@ -7,19 +11,388 @@ logger = get_logger('生物由来卸販売ロット分解')
|
||||
|
||||
def exec():
|
||||
"""生物由来卸販売ロット分解"""
|
||||
logger.debug('生物由来卸販売ロット分解:起動')
|
||||
logger.debug('生物由来卸販売ロット分解処理開始')
|
||||
|
||||
# 営業日ではない場合、処理をスキップする
|
||||
if batch_context.is_not_business_day:
|
||||
logger.info('営業日ではないため、生物由来卸販売ロット分解処理をスキップします。')
|
||||
return
|
||||
db = Database.get_instance()
|
||||
try:
|
||||
db.connect()
|
||||
db.begin()
|
||||
# 生物由来ロット分解データの未確定データを削除する
|
||||
_delete_not_confirm_data_in_bio_sales_lot(db)
|
||||
# 生物由来ロット分解データを作成する
|
||||
_insert_bio_sales_lot(db)
|
||||
# 生物由来ロット分解データの不要レコードを削除する
|
||||
_delete_empty_lot_record(db)
|
||||
# MDB変換マスタビュー(生物由来ロット分解処理用)、メルク施設マスタから施設情報を生物由来ロット分解データにセットする
|
||||
_set_inst_info_from_mdb_or_mst_inst(db)
|
||||
# V製品マスタから製品情報を生物由来ロット分解データにセットする
|
||||
_set_prd_info_from_v_prd_mst(db)
|
||||
# 製造ロット管理番号マスタから有効期限を生物由来ロット分解データにセットする
|
||||
_set_expr_dt_from_lot_num_mst(db)
|
||||
db.commit()
|
||||
logger.debug('生物由来卸販売ロット分解処理終了')
|
||||
return
|
||||
except Exception as e:
|
||||
db.rollback()
|
||||
raise BatchOperationException(e)
|
||||
finally:
|
||||
db.disconnect()
|
||||
|
||||
# # 非同期処理のサンプル
|
||||
# import time
|
||||
# for _ in range(50):
|
||||
# logger.info('処理中')
|
||||
# time.sleep(0.5)
|
||||
|
||||
# TODO: ここに処理を追記していく
|
||||
def _delete_not_confirm_data_in_bio_sales_lot(db: Database):
|
||||
logger.debug('生物由来ロット分解データの未確定データ削除開始')
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
DELETE lot FROM src05.bio_sales_lot AS lot
|
||||
INNER JOIN src05.bio_sales AS bio
|
||||
ON bio.slip_mgt_num = lot.slip_mgt_num
|
||||
AND DATE(bio.dwh_upd_dt) = src05.get_syor_date()
|
||||
"""
|
||||
res = db.execute(sql)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'Query OK, {res.rowcount} rows affected ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('生物由来ロット分解データの未確定データ削除に失敗')
|
||||
raise e
|
||||
logger.debug('生物由来ロット分解データの未確定データ削除に成功')
|
||||
|
||||
logger.debug('生物由来卸販売ロット分解:終了')
|
||||
return
|
||||
|
||||
def _insert_bio_sales_lot(db: Database):
|
||||
logger.debug('生物由来ロット分解データの作成開始')
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
INSERT INTO src05.bio_sales_lot
|
||||
SELECT
|
||||
bio.slip_mgt_num AS slip_mgt_num,
|
||||
conv.conv_cd AS conv_cd,
|
||||
bio.rec_whs_cd AS rec_whs_cd,
|
||||
bio.rec_whs_sub_cd AS rec_whs_sub_cd,
|
||||
bio.rec_whs_org_cd AS rec_whs_org_cd,
|
||||
bio.rec_comm_cd AS rec_comm_cd,
|
||||
bio.rec_tran_kbn AS rec_tran_kbn,
|
||||
bio.rev_hsdnymd_srk AS rev_hsdnymd_srk,
|
||||
bio.rec_urag_num AS rec_urag_num,
|
||||
bio.rec_comm_name AS rec_comm_name,
|
||||
bio.rec_nonyu_fcl_name AS rec_nonyu_fcl_name,
|
||||
bio.rec_nonyu_fcl_addr AS rec_nonyu_fcl_addr,
|
||||
-- 3レコードに分解する
|
||||
CASE conv.conv_cd
|
||||
WHEN 1 THEN bio.rec_lot_num1
|
||||
WHEN 2 THEN bio.rec_lot_num2
|
||||
WHEN 3 THEN bio.rec_lot_num3
|
||||
END AS rec_lot_num,
|
||||
bio.rec_ymd AS rec_ymd,
|
||||
bio.v_tran_cd AS v_tran_cd,
|
||||
bio.tran_kbn_name AS tran_kbn_name,
|
||||
bio.whs_org_cd AS whs_org_cd,
|
||||
bio.v_whsorg_cd AS v_whsorg_cd,
|
||||
bio.whs_org_name AS whs_org_name,
|
||||
bio.v_whs_cd AS v_whs_cd,
|
||||
bio.whs_name AS whs_name,
|
||||
bio.nonyu_fcl_cd AS nonyu_fcl_cd,
|
||||
bio.v_inst_cd AS v_inst_cd,
|
||||
bio.v_inst_kn AS v_inst_kn,
|
||||
bio.v_inst_name AS v_inst_name,
|
||||
bio.v_inst_addr AS v_inst_addr,
|
||||
bio.comm_cd AS comm_cd,
|
||||
bio.product_name AS product_name,
|
||||
bio.whs_rep_comm_name AS whs_rep_comm_name,
|
||||
bio.whs_rep_nonyu_fcl_name AS whs_rep_nonyu_fcl_name,
|
||||
bio.whs_rep_nonyu_fcl_addr AS whs_rep_nonyu_fcl_addr,
|
||||
/* 製品名と製品コードは後ほどV製品マスタからセットする */
|
||||
-- 製品名
|
||||
NULL AS mkr_inf_1,
|
||||
-- 製品コード
|
||||
NULL AS mkr_cd,
|
||||
-- 数量
|
||||
-- Veeva取引区分の先頭が「2」の場合、マイナス表示にする
|
||||
CASE conv.conv_cd
|
||||
WHEN 1 THEN
|
||||
CASE
|
||||
WHEN (LEFT(bio.v_tran_cd, 1) = 2 AND bio.qty1 >= 1) THEN -bio.qty1
|
||||
ELSE bio.qty1
|
||||
END
|
||||
WHEN 2 THEN
|
||||
CASE
|
||||
WHEN (LEFT(bio.v_tran_cd, 1) = 2 AND bio.qty2 >= 1) THEN -bio.qty2
|
||||
ELSE bio.qty2
|
||||
END
|
||||
WHEN 3 THEN
|
||||
CASE
|
||||
WHEN (LEFT(bio.v_tran_cd, 1) = 2 AND bio.qty3 >= 1) THEN -bio.qty3
|
||||
ELSE bio.qty3
|
||||
END
|
||||
END AS qty,
|
||||
bio.slip_org_kbn AS slip_org_kbn,
|
||||
bio.bef_slip_mgt_num AS bef_slip_mgt_num,
|
||||
CASE conv.conv_cd
|
||||
WHEN 1 THEN bio.err_flg11
|
||||
WHEN 2 THEN bio.err_flg12
|
||||
WHEN 3 THEN bio.err_flg13
|
||||
END AS lot_no_err_flg,
|
||||
CASE bio.err_flg20
|
||||
WHEN 'M' THEN '*'
|
||||
ELSE NULL
|
||||
END AS iko_flg,
|
||||
CASE bio.rec_sts_kbn
|
||||
WHEN '0' THEN bio.rec_sts_kbn
|
||||
WHEN '1' THEN
|
||||
CASE conv.conv_cd
|
||||
WHEN 1 THEN bio.err_flg11
|
||||
WHEN 2 THEN bio.err_flg12
|
||||
WHEN 3 THEN bio.err_flg13
|
||||
END
|
||||
END AS rec_sts_kbn,
|
||||
CASE
|
||||
WHEN bio.bef_slip_mgt_num IS NOT NULL THEN bio.ins_dt
|
||||
ELSE NULL
|
||||
END AS ins_dt,
|
||||
CASE
|
||||
WHEN bio.bef_slip_mgt_num IS NOT NULL THEN bio.ins_usr
|
||||
ELSE NULL
|
||||
END AS ins_usr,
|
||||
bio.dwh_upd_dt AS dwh_upd_dt,
|
||||
/* 施設情報は後ほどセットする */
|
||||
-- 施設コード
|
||||
NULL AS inst_cd,
|
||||
-- 正式施設名(漢字)
|
||||
NULL AS inst_name_form,
|
||||
-- 施設住所
|
||||
NULL AS address,
|
||||
-- 施設電話番号
|
||||
NULL AS tel_num,
|
||||
CASE conv.conv_cd
|
||||
WHEN 1 THEN
|
||||
CASE bio.err_flg11
|
||||
WHEN '0' THEN '正常'
|
||||
WHEN '1' THEN 'ロットエラー'
|
||||
WHEN '2' THEN 'ロットエラー'
|
||||
WHEN '3' THEN 'エラー(解消済)'
|
||||
WHEN '4' THEN 'ロット不明'
|
||||
WHEN '5' THEN 'エラー(解消済)'
|
||||
WHEN '6' THEN 'ロット不明'
|
||||
WHEN '7' THEN '除外'
|
||||
WHEN '8' THEN '除外'
|
||||
WHEN 'Z' THEN '除外'
|
||||
END
|
||||
WHEN 2 THEN
|
||||
CASE bio.err_flg12
|
||||
WHEN '0' THEN '正常'
|
||||
WHEN '1' THEN 'ロットエラー'
|
||||
WHEN '2' THEN 'ロットエラー'
|
||||
WHEN '3' THEN 'エラー(解消済)'
|
||||
WHEN '4' THEN 'ロット不明'
|
||||
WHEN '5' THEN 'エラー(解消済)'
|
||||
WHEN '6' THEN 'ロット不明'
|
||||
WHEN '7' THEN '除外'
|
||||
WHEN '8' THEN '除外'
|
||||
WHEN 'Z' THEN '除外'
|
||||
END
|
||||
WHEN 3 THEN
|
||||
CASE bio.err_flg13
|
||||
WHEN '0' THEN '正常'
|
||||
WHEN '1' THEN 'ロットエラー'
|
||||
WHEN '2' THEN 'ロットエラー'
|
||||
WHEN '3' THEN 'エラー(解消済)'
|
||||
WHEN '4' THEN 'ロット不明'
|
||||
WHEN '5' THEN 'エラー(解消済)'
|
||||
WHEN '6' THEN 'ロット不明'
|
||||
WHEN '7' THEN '除外'
|
||||
WHEN '8' THEN '除外'
|
||||
WHEN 'Z' THEN '除外'
|
||||
END
|
||||
END AS data_kbn,
|
||||
CASE bio.slip_org_kbn
|
||||
WHEN 'J' THEN 'JD-NET'
|
||||
WHEN 'N' THEN 'NHI'
|
||||
WHEN 'H' THEN '手入力'
|
||||
END AS data_kind,
|
||||
CASE conv.conv_cd
|
||||
WHEN 1 THEN
|
||||
CASE bio.err_flg11
|
||||
WHEN '0' THEN '正常'
|
||||
WHEN '1' THEN 'ロットエラー'
|
||||
WHEN '2' THEN '日付エラー'
|
||||
WHEN '3' THEN 'ロットエラー(解消済)'
|
||||
WHEN '4' THEN 'ロットエラー(調査不能)'
|
||||
WHEN '5' THEN '日付エラー(解消済)'
|
||||
WHEN '6' THEN '日付エラー(調査不能)'
|
||||
WHEN '7' THEN '除外(卸都合)'
|
||||
WHEN '8' THEN '除外(再送信)'
|
||||
WHEN 'Z' THEN '過去データ'
|
||||
END
|
||||
WHEN 2 THEN
|
||||
CASE bio.err_flg12
|
||||
WHEN '0' THEN '正常'
|
||||
WHEN '1' THEN 'ロットエラー'
|
||||
WHEN '2' THEN '日付エラー'
|
||||
WHEN '3' THEN 'ロットエラー(解消済)'
|
||||
WHEN '4' THEN 'ロットエラー(調査不能)'
|
||||
WHEN '5' THEN '日付エラー(解消済)'
|
||||
WHEN '6' THEN '日付エラー(調査不能)'
|
||||
WHEN '7' THEN '除外(卸都合)'
|
||||
WHEN '8' THEN '除外(再送信)'
|
||||
WHEN 'Z' THEN '過去データ'
|
||||
END
|
||||
WHEN 3 THEN
|
||||
CASE bio.err_flg13
|
||||
WHEN '0' THEN '正常'
|
||||
WHEN '1' THEN 'ロットエラー'
|
||||
WHEN '2' THEN '日付エラー'
|
||||
WHEN '3' THEN 'ロットエラー(解消済)'
|
||||
WHEN '4' THEN 'ロットエラー(調査不能)'
|
||||
WHEN '5' THEN '日付エラー(解消済)'
|
||||
WHEN '6' THEN '日付エラー(調査不能)'
|
||||
WHEN '7' THEN '除外(卸都合)'
|
||||
WHEN '8' THEN '除外(再送信)'
|
||||
WHEN 'Z' THEN '過去データ'
|
||||
END
|
||||
END AS err_dtl_kind,
|
||||
NULL AS expr_dt
|
||||
FROM
|
||||
src05.bio_sales bio
|
||||
-- 生物由来変換マスタ
|
||||
CROSS JOIN src05.bio_conv conv
|
||||
WHERE
|
||||
bio.err_flg1 = '0'
|
||||
AND bio.err_flg2 = '0'
|
||||
AND bio.err_flg3 = '0'
|
||||
AND bio.err_flg4 = '0'
|
||||
AND bio.err_flg5 = '0'
|
||||
AND bio.err_flg6 = '0'
|
||||
AND bio.err_flg7 = '0'
|
||||
AND bio.err_flg8 = '0'
|
||||
AND bio.err_flg9 = '0'
|
||||
AND bio.err_flg10 = '0'
|
||||
AND bio.rec_sts_kbn <> '99'
|
||||
AND DATE(bio.dwh_upd_dt) = src05.get_syor_date()
|
||||
"""
|
||||
res = db.execute(sql)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'Query OK, {res.rowcount} rows affected ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('生物由来ロット分解データの作成に失敗')
|
||||
raise e
|
||||
logger.debug('生物由来ロット分解データの作成に成功')
|
||||
|
||||
|
||||
def _delete_empty_lot_record(db: Database):
|
||||
logger.debug('生物由来ロット分解データの製造番号が空のレコードを削除開始')
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
DELETE FROM src05.bio_sales_lot lot
|
||||
WHERE
|
||||
-- 空白15桁のデータはロット情報が空とみなして削除する
|
||||
lot.rec_lot_num = REPEAT(' ', 15) OR lot.rec_lot_num IS NULL
|
||||
"""
|
||||
res = db.execute(sql)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'Query OK, {res.rowcount} rows affected ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('生物由来ロット分解データの製造番号が空のレコードを削除に失敗')
|
||||
raise e
|
||||
logger.debug('生物由来ロット分解データの製造番号が空のレコードを削除に成功')
|
||||
|
||||
|
||||
def _set_inst_info_from_mdb_or_mst_inst(db: Database):
|
||||
logger.debug('MDB変換マスタビュー(生物由来ロット分解処理用)、メルク施設マスタから施設情報を生物由来ロット分解データにセット開始')
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
UPDATE
|
||||
src05.bio_sales_lot bio
|
||||
LEFT OUTER JOIN internal05.view_mdb_cnv_mst mdb
|
||||
ON bio.v_inst_cd = mdb.hco_vid_v
|
||||
LEFT OUTER JOIN src05.mst_inst inst
|
||||
ON bio.v_inst_cd = inst.inst_cd
|
||||
SET
|
||||
-- 施設コード
|
||||
bio.inst_cd = (
|
||||
CASE
|
||||
WHEN mdb.mdb_cd IS NOT NULL THEN mdb.mdb_cd
|
||||
ELSE bio.v_inst_cd
|
||||
END
|
||||
),
|
||||
-- 正式施設名(漢字)
|
||||
bio.inst_name_form = (
|
||||
CASE
|
||||
WHEN mdb.mdb_cd IS NOT NULL THEN mdb.inst_name_form
|
||||
ELSE inst.inst_name_form
|
||||
END
|
||||
),
|
||||
-- 施設住所
|
||||
bio.address = (
|
||||
CASE
|
||||
WHEN mdb.mdb_cd IS NOT NULL THEN mdb.address
|
||||
ELSE inst.address
|
||||
END
|
||||
),
|
||||
-- 施設電話番号
|
||||
bio.tel_num = (
|
||||
CASE
|
||||
WHEN mdb.mdb_cd IS NOT NULL THEN mdb.tel_num
|
||||
ELSE inst.tel_num
|
||||
END
|
||||
)
|
||||
"""
|
||||
res = db.execute(sql)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'Query OK, {res.rowcount} rows affected ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('MDB変換マスタビュー(生物由来ロット分解処理用)、メルク施設マスタから施設情報を生物由来ロット分解データにセットに失敗')
|
||||
raise e
|
||||
logger.debug('MDB変換マスタビュー(生物由来ロット分解処理用)、メルク施設マスタから施設情報を生物由来ロット分解データにセットに成功')
|
||||
|
||||
|
||||
def _set_prd_info_from_v_prd_mst(db: Database):
|
||||
logger.debug('V製品マスタから製品情報を生物由来ロット分解データにセット開始')
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
UPDATE
|
||||
src05.bio_sales_lot bio
|
||||
LEFT OUTER JOIN src05.phm_prd_mst_v prd
|
||||
ON bio.comm_cd = prd.prd_cd
|
||||
AND STR_TO_DATE(bio.rev_hsdnymd_srk,'%Y%m%d') BETWEEN prd.start_date AND prd.end_date
|
||||
AND prd.rec_sts_kbn <> '9'
|
||||
SET
|
||||
bio.mkr_inf_1 = prd.mkr_inf_1,
|
||||
bio.mkr_cd = prd.mkr_cd
|
||||
"""
|
||||
res = db.execute(sql)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'Query OK, {res.rowcount} rows affected ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('V製品マスタから製品情報を生物由来ロット分解データにセットに失敗')
|
||||
raise e
|
||||
logger.debug('V製品マスタから製品情報を生物由来ロット分解データにセットに成功')
|
||||
|
||||
|
||||
def _set_expr_dt_from_lot_num_mst(db: Database):
|
||||
# 製造ロット管理番号マスタから有効期限をセット
|
||||
logger.debug('製造ロット管理番号マスタから有効期限をセット開始')
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
UPDATE
|
||||
src05.bio_sales_lot bio
|
||||
LEFT OUTER JOIN src05.lot_num_mst lot
|
||||
ON bio.mkr_cd = lot.ser_num
|
||||
AND bio.rec_lot_num = lot.lot_num
|
||||
SET
|
||||
bio.expr_dt = lot.expr_dt
|
||||
"""
|
||||
res = db.execute(sql)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'Query OK, {res.rowcount} rows affected ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('製造ロット管理番号マスタから有効期限をセットに失敗')
|
||||
raise e
|
||||
logger.debug('製造ロット管理番号マスタから有効期限をセットに成功')
|
||||
|
||||
@ -24,6 +24,7 @@ def exec():
|
||||
logger.debug('DCF施設統合マスタ作成処理開始')
|
||||
# COM施設からDCF施設統合マスタに登録
|
||||
(is_add_dcf_inst_merge, duplication_inst_records) = _insert_dcf_inst_merge_from_com_inst(db)
|
||||
db.commit()
|
||||
# DCF施設統合マスタ追加のログを出力する
|
||||
if is_add_dcf_inst_merge:
|
||||
logger.info('[NOTICE]DCF施設統合マスタが追加されました。')
|
||||
@ -131,7 +132,6 @@ def _insert_dcf_inst_merge_from_com_inst(db: Database) -> tuple[bool, list[dict]
|
||||
elapsed_time = ElapsedTime()
|
||||
res = db.execute(insert_sql, params)
|
||||
logging_sql(logger, insert_sql)
|
||||
db.commit()
|
||||
logger.info(f'COM施設からDCF施設統合マスタに登録成功, {res.rowcount} 行更新 ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('COM施設からDCF施設統合マスタの登録に失敗')
|
||||
|
||||
@ -0,0 +1,647 @@
|
||||
from datetime import datetime, timedelta
|
||||
from src.batch.batch_functions import logging_sql
|
||||
from src.batch.common.batch_context import BatchContext
|
||||
from src.db.database import Database
|
||||
from src.error.exceptions import BatchOperationException
|
||||
from src.logging.get_logger import get_logger
|
||||
from src.time.elapsed_time import ElapsedTime
|
||||
|
||||
batch_context = BatchContext.get_instance()
|
||||
logger = get_logger('DCF施設統合マスタ日次更新')
|
||||
|
||||
|
||||
def exec():
|
||||
db = Database.get_instance()
|
||||
try:
|
||||
db.connect()
|
||||
db.begin()
|
||||
logger.debug('DCF施設統合マスタ日次更新処理開始')
|
||||
# DCF施設統合マスタ移行先コードのセット(無効フラグが『0(有効)』)
|
||||
enabled_dst_inst_merge_records = _set_enabled_dct_inst_merge(db)
|
||||
# DCF施設統合マスタ移行先コードのセット(無効フラグが『1(無効)』)
|
||||
_set_disabled_dct_inst_merge(db)
|
||||
# DCF施設統合マスタに無効フラグが『0(有効)』データが存在する場合
|
||||
if len(enabled_dst_inst_merge_records) > 0:
|
||||
_add_emp_chg_inst(db, enabled_dst_inst_merge_records)
|
||||
_add_ult_ident_presc(db, enabled_dst_inst_merge_records)
|
||||
db.commit()
|
||||
logger.debug('DCF施設統合マスタ日次更新処理終了')
|
||||
except Exception as e:
|
||||
db.rollback()
|
||||
raise BatchOperationException(e)
|
||||
finally:
|
||||
db.disconnect()
|
||||
|
||||
|
||||
def _set_enabled_dct_inst_merge(db: Database) -> list[dict]:
|
||||
# データ取得(無効フラグが『0(有効)』)
|
||||
enabled_dst_inst_merge_records = _select_dct_inst_merge(db, 0)
|
||||
# 移行先DCF施設コードの更新(無効フラグが『0(有効)』)
|
||||
if _update_dcf_inst_merge(db, 0) > 0:
|
||||
# DCF施設統合マスタの過去分の洗い替え
|
||||
for row in enabled_dst_inst_merge_records:
|
||||
_update_dcf_inst_cd_new(db, row['dup_opp_cd'], row['dcf_inst_cd'], '')
|
||||
|
||||
return enabled_dst_inst_merge_records
|
||||
|
||||
|
||||
def _set_disabled_dct_inst_merge(db: Database):
|
||||
# データ取得(無効フラグが『1(無効)』)
|
||||
disabled_dst_inst_merge_records = _select_dct_inst_merge(db, 1)
|
||||
# 移行先DCF施設コードの更新(無効フラグが『1(無効)』)
|
||||
if _update_dcf_inst_merge(db, 1) > 0:
|
||||
# DCF施設統合マスタの過去分の洗い替え
|
||||
for row in disabled_dst_inst_merge_records:
|
||||
_update_dcf_inst_cd_new(db, row['dcf_inst_cd'], row['dup_opp_cd'], '戻し')
|
||||
|
||||
|
||||
def _select_ult_ident_presc_dcf_inst_cd(db: Database, dcf_inst_cd: str) -> list[dict]:
|
||||
# 納入先処方元マスタから、DCF施設コードに対応したレコードの取得
|
||||
try:
|
||||
sql = """
|
||||
SELECT
|
||||
ta_cd,
|
||||
ult_ident_cd,
|
||||
ratio
|
||||
FROM
|
||||
src05.ult_ident_presc
|
||||
WHERE
|
||||
presc_cd = :dcf_inst_cd
|
||||
AND (SELECT ht.syor_date FROM src05.hdke_tbl AS ht) < end_date
|
||||
"""
|
||||
params = {'dcf_inst_cd': dcf_inst_cd}
|
||||
ult_ident_presc_ta_cd_records = db.execute_select(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info('納入先処方元マスタからDCF施設コードに対応したレコードの取得に成功')
|
||||
except Exception as e:
|
||||
logger.debug('納入先処方元マスタからDCF施設コードに対応したレコードの取得に失敗')
|
||||
raise e
|
||||
|
||||
return ult_ident_presc_ta_cd_records
|
||||
|
||||
|
||||
def _add_ult_ident_presc(db: Database, enabled_dst_inst_merge_records: list[dict]):
|
||||
# 納入先処方元マスタの追加
|
||||
logger.info('納入先処方元マスタの登録 開始')
|
||||
for data_inst_cnt, enabled_merge_record in enumerate(enabled_dst_inst_merge_records, start=1):
|
||||
tekiyo_month_first_day = _get_first_day_of_month(enabled_merge_record['tekiyo_month'])
|
||||
ult_ident_presc_source_records = _select_ult_ident_presc_dcf_inst_cd(db, enabled_merge_record['dcf_inst_cd'])
|
||||
for ult_ident_presc_source_record in ult_ident_presc_source_records:
|
||||
ult_ident_presc_records = _select_ult_ident_presc(db,
|
||||
enabled_merge_record['dcf_inst_cd'],
|
||||
enabled_merge_record['dup_opp_cd'],
|
||||
ult_ident_presc_source_record)
|
||||
for data_cnt, ult_ident_presc_row in enumerate(ult_ident_presc_records, start=1):
|
||||
logger.info(f'{data_inst_cnt}件目の移行施設の{data_cnt}レコード目処理 開始')
|
||||
# 処方元コード=重複時相手先コードが発生した場合
|
||||
if ult_ident_presc_row['opp_count'] > 0:
|
||||
continue
|
||||
|
||||
start_date = _str_to_date_time(ult_ident_presc_row['start_date'])
|
||||
set_start_date = start_date \
|
||||
if start_date > tekiyo_month_first_day else tekiyo_month_first_day
|
||||
set_start_date = _date_time_to_str(set_start_date)
|
||||
is_exists_duplicate_key = False
|
||||
if _count_duplicate_ult_ident_presc(db, set_start_date, ult_ident_presc_row) > 0:
|
||||
_delete_ult_ident_presc(db, set_start_date, ult_ident_presc_row,
|
||||
'納入先処方元マスタの重複予定データの削除')
|
||||
is_exists_duplicate_key = True
|
||||
else:
|
||||
logger.info('納入先処方元マスタの重複予定データなし')
|
||||
_insert_ult_ident_presc(db, set_start_date, enabled_merge_record['dup_opp_cd'], ult_ident_presc_row)
|
||||
|
||||
# 重複予定データが存在しない、且つ、適用終了日 ≧ 適用開始日の場合
|
||||
if not is_exists_duplicate_key and _str_to_date_time(ult_ident_presc_row['end_date']) >= start_date:
|
||||
last_end_date = tekiyo_month_first_day - timedelta(days=1)
|
||||
# 適用終了日を、DCF施設統合マスタの適用月度の前月末日で更新
|
||||
_update_ult_ident_presc_end_date(db, _date_time_to_str(last_end_date), ult_ident_presc_row)
|
||||
|
||||
logger.info('納入先処方元マスタの登録 終了')
|
||||
|
||||
|
||||
def _select_emp_chg_inst_ta_cd(db: Database, dcf_inst_cd: str) -> list[dict]:
|
||||
# 従業員担当施設マスタから、DCF施設コードに対応した領域コードの取得
|
||||
try:
|
||||
sql = """
|
||||
SELECT
|
||||
ta_cd
|
||||
FROM
|
||||
src05.emp_chg_inst
|
||||
WHERE
|
||||
inst_cd = :dcf_inst_cd
|
||||
AND enabled_flg = 'Y'
|
||||
AND (SELECT ht.syor_date FROM src05.hdke_tbl AS ht) < end_date
|
||||
"""
|
||||
params = {'dcf_inst_cd': dcf_inst_cd}
|
||||
emp_chg_inst_ta_cd_records = db.execute_select(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info('従業員担当施設マスタから領域コードの取得に成功')
|
||||
except Exception as e:
|
||||
logger.debug('従業員担当施設マスタから領域コードの取得に失敗')
|
||||
raise e
|
||||
|
||||
return emp_chg_inst_ta_cd_records
|
||||
|
||||
|
||||
def _add_emp_chg_inst(db: Database, enabled_dst_inst_merge_records: list[dict]):
|
||||
# 従業員担当施設マスタの登録
|
||||
logger.info('従業員担当施設マスタの登録 開始')
|
||||
for enabled_merge_record in enabled_dst_inst_merge_records:
|
||||
tekiyo_month_first_day = _get_first_day_of_month(enabled_merge_record['tekiyo_month'])
|
||||
emp_chg_inst_ta_cd_records = _select_emp_chg_inst_ta_cd(db, enabled_merge_record['dcf_inst_cd'])
|
||||
for emp_chg_inst_ta_cd_record in emp_chg_inst_ta_cd_records:
|
||||
emp_chg_inst_records = _select_emp_chg_inst(db, enabled_merge_record['dcf_inst_cd'], enabled_merge_record['dup_opp_cd'],
|
||||
emp_chg_inst_ta_cd_record['ta_cd'])
|
||||
for emp_chg_inst_row in emp_chg_inst_records:
|
||||
# 重複時相手先コードが存在したかのチェック
|
||||
if emp_chg_inst_row['opp_count'] > 0:
|
||||
continue
|
||||
|
||||
start_date = _str_to_date_time(emp_chg_inst_row['start_date'])
|
||||
set_start_date = start_date \
|
||||
if start_date > tekiyo_month_first_day else tekiyo_month_first_day
|
||||
|
||||
_insert_emp_chg_inst(db, enabled_merge_record['dup_opp_cd'], _date_time_to_str(set_start_date),
|
||||
emp_chg_inst_row)
|
||||
|
||||
# 適用開始日 < DCF施設統合マスタの適用月度の1日の場合
|
||||
if start_date < tekiyo_month_first_day:
|
||||
# DCF施設統合マスタの適用月度の前月末日で、適用終了日を更新する
|
||||
last_end_date = tekiyo_month_first_day - timedelta(days=1)
|
||||
_update_emp_chg_inst_end_date(db, enabled_merge_record['dcf_inst_cd'], _date_time_to_str(last_end_date),
|
||||
emp_chg_inst_row)
|
||||
continue
|
||||
# 適用開始日 ≧ DCF施設統合マスタの適用月度の1日の場合、N(論理削除レコード)に設定する
|
||||
_update_emp_chg_inst_disabled(db, enabled_merge_record['dcf_inst_cd'], emp_chg_inst_row['ta_cd'],
|
||||
emp_chg_inst_row['start_date'])
|
||||
|
||||
logger.info('従業員担当施設マスタの登録 終了')
|
||||
|
||||
|
||||
def _delete_ult_ident_presc(db: Database, start_date: str, ult_ident_presc_row: dict,
|
||||
log_message: str):
|
||||
# ult_ident_prescのDelete
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
DELETE FROM
|
||||
src05.ult_ident_presc
|
||||
WHERE
|
||||
ta_cd = :ta_cd
|
||||
AND ult_ident_cd = :ult_ident_cd
|
||||
AND ratio = :ratio
|
||||
AND start_date = :start_date
|
||||
"""
|
||||
params = {
|
||||
'ta_cd': ult_ident_presc_row['ta_cd'],
|
||||
'ult_ident_cd': ult_ident_presc_row['ult_ident_cd'],
|
||||
'ratio': ult_ident_presc_row['ratio'],
|
||||
'start_date': start_date
|
||||
}
|
||||
res = db.execute(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'{log_message} 成功, {res.rowcount} 行更新 ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug(f'{log_message} 失敗')
|
||||
raise e
|
||||
|
||||
|
||||
def _update_emp_chg_inst_disabled(db: Database, dcf_inst_cd: str, ta_cd: str, start_date: str):
|
||||
# emp_chg_instをUPDATE
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
UPDATE
|
||||
src05.emp_chg_inst
|
||||
SET
|
||||
enabled_flg = 'N',
|
||||
updater = CURRENT_USER(),
|
||||
update_date = SYSDATE()
|
||||
WHERE
|
||||
inst_cd = :dcf_inst_cd
|
||||
AND ta_cd = :ta_cd
|
||||
AND start_date = :start_date
|
||||
"""
|
||||
params = {'dcf_inst_cd': dcf_inst_cd, 'ta_cd': ta_cd, 'start_date': start_date}
|
||||
res = db.execute(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'従業員担当施設マスタのYorNフラグ更新に成功, {res.rowcount} 行更新 ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('従業員担当施設マスタのYorNフラグ更新に失敗')
|
||||
raise e
|
||||
|
||||
|
||||
def _update_emp_chg_inst_end_date(db: Database, dcf_inst_cd: str, last_end_date: str,
|
||||
emp_chg_inst_row: dict):
|
||||
# emp_chg_instをUPDATE
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
UPDATE
|
||||
src05.emp_chg_inst
|
||||
SET end_date = :end_date,
|
||||
updater = CURRENT_USER(),
|
||||
update_date = SYSDATE()
|
||||
WHERE
|
||||
inst_cd = :dcf_inst_cd
|
||||
AND ta_cd = :ta_cd
|
||||
AND emp_cd = :emp_cd
|
||||
AND bu_cd = :bu_cd
|
||||
AND start_date = :start_date
|
||||
"""
|
||||
params = {
|
||||
'end_date': last_end_date,
|
||||
'dcf_inst_cd': dcf_inst_cd,
|
||||
'ta_cd': emp_chg_inst_row['ta_cd'],
|
||||
'emp_cd': emp_chg_inst_row['emp_cd'],
|
||||
'bu_cd': emp_chg_inst_row['bu_cd'],
|
||||
'start_date': emp_chg_inst_row['start_date']
|
||||
}
|
||||
res = db.execute(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'従業員担当施設マスタの適用終了日更新 成功, {res.rowcount} 行更新 ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('従業員担当施設マスタの適用終了日更新 失敗')
|
||||
raise e
|
||||
|
||||
|
||||
def _insert_emp_chg_inst(db: Database, dup_opp_cd: str, set_start_date: str,
|
||||
emp_chg_inst_row: dict):
|
||||
# emp_chg_instにINSERT
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
INSERT INTO
|
||||
src05.emp_chg_inst(
|
||||
inst_cd,
|
||||
ta_cd,
|
||||
emp_cd,
|
||||
bu_cd,
|
||||
start_date,
|
||||
end_date,
|
||||
main_chg_flg,
|
||||
enabled_flg,
|
||||
creater,
|
||||
create_date,
|
||||
updater,
|
||||
update_date
|
||||
)
|
||||
VALUES(
|
||||
:dup_opp_cd,
|
||||
:ta_cd,
|
||||
:emp_cd,
|
||||
:bu_cd,
|
||||
:start_date,
|
||||
:end_date,
|
||||
:main_chg_flg,
|
||||
'Y',
|
||||
CURRENT_USER(),
|
||||
SYSDATE(),
|
||||
CURRENT_USER(),
|
||||
SYSDATE()
|
||||
)
|
||||
"""
|
||||
params = {
|
||||
'dup_opp_cd': dup_opp_cd,
|
||||
'ta_cd': emp_chg_inst_row['ta_cd'],
|
||||
'emp_cd': emp_chg_inst_row['emp_cd'],
|
||||
'bu_cd': emp_chg_inst_row['bu_cd'],
|
||||
'start_date': set_start_date,
|
||||
'end_date': emp_chg_inst_row['end_date'],
|
||||
'main_chg_flg': None
|
||||
if emp_chg_inst_row['main_chg_flg'] is None else emp_chg_inst_row['main_chg_flg']
|
||||
}
|
||||
res = db.execute(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'従業員担当施設マスタの追加に成功, {res.rowcount} 行更新 ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('従業員担当施設マスタの追加に失敗')
|
||||
raise e
|
||||
|
||||
|
||||
def _select_dct_inst_merge(db: Database, muko_flg: int) -> list[dict]:
|
||||
# dcf_inst_mergeからSELECT
|
||||
# 無効フラグがOFFのときは、移行先DCF施設コードが設定されてないデータを抽出する。
|
||||
# ONのときは、移行先DCF施設コードが設定されているデータを抽出する。
|
||||
try:
|
||||
sql = """
|
||||
SELECT
|
||||
dim.dcf_inst_cd,
|
||||
dim.dup_opp_cd,
|
||||
dim.tekiyo_month
|
||||
FROM
|
||||
src05.dcf_inst_merge AS dim
|
||||
INNER JOIN
|
||||
src05.hdke_tbl AS ht
|
||||
ON dim.tekiyo_month = DATE_FORMAT(ht.syor_date, '%Y%m')
|
||||
WHERE
|
||||
dim.muko_flg = :muko_flg
|
||||
AND dim.enabled_flg = 'Y'
|
||||
AND dim.dcf_inst_cd_new IS {not_null}NULL
|
||||
""".format(
|
||||
not_null='' if muko_flg == 0 else 'NOT '
|
||||
)
|
||||
params = {
|
||||
'muko_flg': muko_flg
|
||||
}
|
||||
dst_inst_merge_records = db.execute_select(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info('DCF施設統合マスタの取得に成功')
|
||||
except Exception as e:
|
||||
logger.debug('DCF施設統合マスタの取得に失敗')
|
||||
raise e
|
||||
|
||||
return dst_inst_merge_records
|
||||
|
||||
|
||||
def _update_dcf_inst_merge(db: Database, muko_flg: int) -> int:
|
||||
# dcf_inst_mergeをUPDATE
|
||||
# 無効フラグがOFFのときは、
|
||||
# 移行先DCF施設コードが設定されていないデータを抽出し、移行先DCF施設コードに重複時相手先コードを上書きする
|
||||
# 無効フラグがONのときは、
|
||||
# 移行先DCF施設コードが設定されているデータを抽出し、移行先DCF施設コードにNULLを上書きする。
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
log_message = '更新しました' if muko_flg == 0 else '無効データに戻しました'
|
||||
sql = """
|
||||
UPDATE
|
||||
src05.dcf_inst_merge AS updim
|
||||
INNER JOIN(
|
||||
SELECT
|
||||
dim.dcf_inst_cd AS base_dcf_inst_cd,
|
||||
dim.dup_opp_cd AS base_dup_opp_cd,
|
||||
dim.tekiyo_month AS base_tekiyo_month,
|
||||
dim.muko_flg AS base_muko_flg,
|
||||
dim.enabled_flg AS base_enabled_flg
|
||||
FROM
|
||||
src05.dcf_inst_merge AS dim
|
||||
INNER JOIN
|
||||
src05.hdke_tbl AS ht
|
||||
ON dim.tekiyo_month = DATE_FORMAT(ht.syor_date, '%Y%m')
|
||||
WHERE
|
||||
dim.muko_flg = :muko_flg
|
||||
AND dim.enabled_flg ='Y'
|
||||
AND dim.dcf_inst_cd_new IS {not_null}NULL
|
||||
) AS bf_dim
|
||||
SET
|
||||
updim.dcf_inst_cd_new = {column},
|
||||
updim.updater = CURRENT_USER(),
|
||||
updim.update_date = SYSDATE()
|
||||
WHERE
|
||||
updim.dcf_inst_cd = base_dcf_inst_cd
|
||||
AND updim.dup_opp_cd = base_dup_opp_cd
|
||||
AND updim.tekiyo_month = base_tekiyo_month
|
||||
AND updim.muko_flg = base_muko_flg
|
||||
AND updim.enabled_flg = base_enabled_flg
|
||||
""".format(
|
||||
not_null='' if muko_flg == 0 else 'NOT ',
|
||||
column='base_dup_opp_cd' if muko_flg == 0 else 'NULL'
|
||||
)
|
||||
params = {
|
||||
'muko_flg': muko_flg
|
||||
}
|
||||
res = db.execute(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'DCF施設統合マスタの有効データを{log_message} 成功, {res.rowcount} 行更新 ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug(f'DCF施設統合マスタの有効データを{log_message} 失敗')
|
||||
raise e
|
||||
|
||||
return res.rowcount
|
||||
|
||||
|
||||
def _update_dcf_inst_cd_new(db: Database, dcf_inst_cd_new_after: str, dcf_inst_cd_new_before: str, log_message: str):
|
||||
# dcf_inst_mergeをUPDATE
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
UPDATE
|
||||
src05.dcf_inst_merge
|
||||
SET
|
||||
dcf_inst_cd_new = :dcf_inst_cd_new_after,
|
||||
updater = CURRENT_USER(),
|
||||
update_date = SYSDATE()
|
||||
WHERE
|
||||
dcf_inst_cd_new = :dcf_inst_cd_new_before
|
||||
AND enabled_flg = 'Y'
|
||||
AND muko_flg = 0
|
||||
"""
|
||||
params = {
|
||||
'dcf_inst_cd_new_after': dcf_inst_cd_new_after,
|
||||
'dcf_inst_cd_new_before': dcf_inst_cd_new_before
|
||||
}
|
||||
res = db.execute(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'移行先DCF施設コードの{log_message}更新に成功, {res.rowcount} 行更新 ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug(f'移行先DCF施設コードの{log_message}更新に失敗')
|
||||
raise e
|
||||
|
||||
|
||||
def _update_ult_ident_presc_end_date(db: Database, last_end_date: str, ult_ident_presc_row: dict):
|
||||
# ult_ident_presc_endをUPDATE
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
UPDATE
|
||||
src05.ult_ident_presc
|
||||
SET end_date = :end_date,
|
||||
updater = CURRENT_USER(),
|
||||
update_date = SYSDATE()
|
||||
WHERE
|
||||
ta_cd = :ta_cd
|
||||
AND ult_ident_cd = :ult_ident_cd
|
||||
AND ratio = :ratio
|
||||
AND start_date = :start_date
|
||||
"""
|
||||
params = {
|
||||
'end_date': last_end_date,
|
||||
'ta_cd': ult_ident_presc_row['ta_cd'],
|
||||
'ult_ident_cd': ult_ident_presc_row['ult_ident_cd'],
|
||||
'ratio': ult_ident_presc_row['ratio'],
|
||||
'start_date': ult_ident_presc_row['start_date']
|
||||
}
|
||||
res = db.execute(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'終了日 > 開始月のため適用終了日を更新 成功, {res.rowcount} 行更新 ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('終了日 > 開始月のため適用終了日を更新 失敗')
|
||||
raise e
|
||||
|
||||
|
||||
def _insert_ult_ident_presc(db: Database, set_Start_Date: str, dup_opp_cd: str,
|
||||
ult_ident_presc_row: dict):
|
||||
# ult_ident_prescにINSERT
|
||||
try:
|
||||
elapsed_time = ElapsedTime()
|
||||
sql = """
|
||||
INSERT INTO
|
||||
src05.ult_ident_presc(
|
||||
ta_cd,
|
||||
ult_ident_cd,
|
||||
ratio,
|
||||
start_date,
|
||||
presc_cd,
|
||||
end_date,
|
||||
creater,
|
||||
create_date,
|
||||
update_date,
|
||||
updater
|
||||
)
|
||||
VALUES(
|
||||
:ta_cd,
|
||||
:ult_ident_cd,
|
||||
:ratio,
|
||||
:start_date,
|
||||
:presc_cd,
|
||||
:end_date,
|
||||
CURRENT_USER(),
|
||||
SYSDATE(),
|
||||
SYSDATE(),
|
||||
CURRENT_USER()
|
||||
)
|
||||
"""
|
||||
params = {
|
||||
'ta_cd': ult_ident_presc_row['ta_cd'],
|
||||
'ult_ident_cd': ult_ident_presc_row['ult_ident_cd'],
|
||||
'ratio': ult_ident_presc_row['ratio'],
|
||||
'start_date': set_Start_Date,
|
||||
'presc_cd': dup_opp_cd,
|
||||
'end_date': ult_ident_presc_row['end_date']
|
||||
}
|
||||
res = db.execute(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info(f'納入先処方元マスタに追加 成功, {res.rowcount} 行更新 ({elapsed_time.of})')
|
||||
except Exception as e:
|
||||
logger.debug('納入先処方元マスタに追加 失敗')
|
||||
raise e
|
||||
|
||||
|
||||
def _select_emp_chg_inst(db: Database, dcf_inst_cd: str, dup_opp_cd: str, ta_cd: str) -> list[dict]:
|
||||
# emp_chg_instからSELECT
|
||||
try:
|
||||
sql = """
|
||||
SELECT
|
||||
eci.inst_cd,
|
||||
eci.ta_cd,
|
||||
eci.emp_cd,
|
||||
eci.bu_cd,
|
||||
eci.start_date,
|
||||
eci.end_date,
|
||||
eci.main_chg_flg,
|
||||
eci.enabled_flg,
|
||||
(
|
||||
SELECT
|
||||
COUNT(eciopp.inst_cd)
|
||||
FROM
|
||||
src05.emp_chg_inst AS eciopp
|
||||
WHERE
|
||||
eciopp.inst_cd = :dup_opp_cd
|
||||
AND eciopp.ta_cd = :ta_cd
|
||||
) AS opp_count
|
||||
FROM
|
||||
src05.emp_chg_inst AS eci
|
||||
WHERE
|
||||
eci.inst_cd = :dcf_inst_cd
|
||||
AND eci.ta_cd = :ta_cd
|
||||
AND eci.enabled_flg = 'Y'
|
||||
AND (SELECT ht.syor_date FROM src05.hdke_tbl AS ht) < eci.end_date
|
||||
"""
|
||||
params = {'dcf_inst_cd': dcf_inst_cd, 'dup_opp_cd': dup_opp_cd, 'ta_cd': ta_cd}
|
||||
emp_chg_inst_records = db.execute_select(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info('従業員担当施設マスタの取得 成功')
|
||||
except Exception as e:
|
||||
logger.debug('従業員担当施設マスタの取得 失敗')
|
||||
raise e
|
||||
return emp_chg_inst_records
|
||||
|
||||
|
||||
def _select_ult_ident_presc(db: Database, dcf_inst_cd: str, dup_opp_cd: str,
|
||||
ult_ident_presc_row: dict) -> list[dict]:
|
||||
# ult_ident_prescからSELECT
|
||||
try:
|
||||
sql = """
|
||||
SELECT
|
||||
uip.ta_cd,
|
||||
uip.ult_ident_cd,
|
||||
uip.ratio,
|
||||
uip.start_date,
|
||||
uip.end_date,
|
||||
(
|
||||
SELECT
|
||||
COUNT(uipopp.ta_cd)
|
||||
FROM
|
||||
src05.ult_ident_presc AS uipopp
|
||||
WHERE
|
||||
uipopp.presc_cd = :dup_opp_cd
|
||||
AND uipopp.ta_cd = :ta_cd
|
||||
AND uipopp.ult_ident_cd = :ult_ident_cd
|
||||
AND uipopp.ratio = :ratio
|
||||
) AS opp_count
|
||||
FROM
|
||||
src05.ult_ident_presc AS uip
|
||||
WHERE
|
||||
uip.presc_cd = :dcf_inst_cd
|
||||
AND uip.ta_cd = :ta_cd
|
||||
AND (SELECT ht.syor_date FROM src05.hdke_tbl AS ht) < uip.end_date
|
||||
"""
|
||||
params = {
|
||||
'dcf_inst_cd': dcf_inst_cd,
|
||||
'dup_opp_cd': dup_opp_cd,
|
||||
'ta_cd': ult_ident_presc_row['ta_cd'],
|
||||
'ult_ident_cd': ult_ident_presc_row['ult_ident_cd'],
|
||||
'ratio': ult_ident_presc_row['ratio']
|
||||
}
|
||||
ult_ident_presc_records = db.execute_select(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info('納入先処方元マスタの取得 成功')
|
||||
except Exception as e:
|
||||
logger.debug('納入先処方元マスタの取得 失敗')
|
||||
raise e
|
||||
return ult_ident_presc_records
|
||||
|
||||
|
||||
def _count_duplicate_ult_ident_presc(db: Database, set_start_date: str,
|
||||
ult_ident_presc_row: dict) -> int:
|
||||
# ult_ident_prescの重複時相手先コードの件数取得
|
||||
try:
|
||||
sql = """
|
||||
SELECT
|
||||
COUNT(ta_cd) AS cnt
|
||||
FROM
|
||||
src05.ult_ident_presc
|
||||
WHERE
|
||||
ta_cd = :ta_cd
|
||||
AND ult_ident_cd = :ult_ident_cd
|
||||
AND ratio = :ratio
|
||||
AND start_date = :start_date
|
||||
"""
|
||||
params = {
|
||||
'ta_cd': ult_ident_presc_row['ta_cd'],
|
||||
'ult_ident_cd': ult_ident_presc_row['ult_ident_cd'],
|
||||
'ratio': ult_ident_presc_row['ratio'],
|
||||
'start_date': set_start_date
|
||||
}
|
||||
result = db.execute_select(sql, params)
|
||||
logging_sql(logger, sql)
|
||||
logger.info('納入先処方元マスタの重複予定データの存在チェック 成功')
|
||||
except Exception as e:
|
||||
logger.debug('納入先処方元マスタの重複予定データの存在チェック 失敗')
|
||||
raise e
|
||||
return result[0]['cnt']
|
||||
|
||||
|
||||
def _get_first_day_of_month(year_month: str) -> datetime:
|
||||
# year_monthの初日の日付を日付型に変換し返却する
|
||||
return datetime.strptime(year_month + '01', '%Y%m%d')
|
||||
|
||||
|
||||
def _str_to_date_time(str_date_time: str) -> datetime:
|
||||
# str_date_timeを日付型に変換して返却する
|
||||
return datetime.strptime(str_date_time, '%Y%m%d')
|
||||
|
||||
|
||||
def _date_time_to_str(date_time: datetime) -> str:
|
||||
# date_timeをYmd型に変換して返却する
|
||||
return date_time.strftime('%Y%m%d')
|
||||
@ -1,5 +1,8 @@
|
||||
from src.batch.common.batch_context import BatchContext
|
||||
from src.batch.laundering import create_inst_merge_for_laundering, emp_chg_inst_laundering, ult_ident_presc_laundering
|
||||
from src.batch.laundering import (
|
||||
create_inst_merge_for_laundering, emp_chg_inst_laundering,
|
||||
ult_ident_presc_laundering, sales_results_laundering)
|
||||
from src.batch.dcf_inst_merge import integrate_dcf_inst_merge
|
||||
from src.logging.get_logger import get_logger
|
||||
|
||||
batch_context = BatchContext.get_instance()
|
||||
@ -16,10 +19,14 @@ def exec():
|
||||
return
|
||||
# 洗替用マスタ作成
|
||||
create_inst_merge_for_laundering.exec()
|
||||
# DCF施設統合マスタ日次更新
|
||||
integrate_dcf_inst_merge.exec()
|
||||
# 施設担当者洗替
|
||||
emp_chg_inst_laundering.exec()
|
||||
# 納入先処方元マスタ洗替
|
||||
ult_ident_presc_laundering.exec()
|
||||
# 卸販売洗替
|
||||
sales_results_laundering.exec()
|
||||
|
||||
# # 並列処理のテスト用コード
|
||||
# import time
|
||||
|
||||
@ -0,0 +1,167 @@
|
||||
from src.batch.batch_functions import logging_sql
|
||||
from src.db.database import Database
|
||||
from src.error.exceptions import BatchOperationException
|
||||
from src.logging.get_logger import get_logger
|
||||
from src.system_var import environment
|
||||
|
||||
logger = get_logger('卸販売洗替')
|
||||
|
||||
|
||||
def exec():
|
||||
db = Database.get_instance(autocommit=True)
|
||||
try:
|
||||
db.connect()
|
||||
logger.debug('処理開始')
|
||||
# 卸販売実績テーブル(洗替後)過去5年以前のデータ削除
|
||||
_call_sales_lau_delete(db)
|
||||
# 卸販売実績テーブル(洗替後)作成
|
||||
_call_sales_lau_upsert(db)
|
||||
# 1:卸組織洗替
|
||||
_call_whs_org_laundering(db)
|
||||
# 3:HCO施設コードの洗替
|
||||
_update_sales_lau_from_vop_hco_merge_v(db)
|
||||
# 4:メルク施設コードの洗替
|
||||
_update_mst_inst_laundering(db)
|
||||
logger.debug('処理終了')
|
||||
except Exception as e:
|
||||
raise BatchOperationException(e)
|
||||
finally:
|
||||
db.disconnect()
|
||||
|
||||
|
||||
def _call_sales_lau_delete(db: Database):
|
||||
# 卸販売実績テーブル(洗替後)過去5年以前のデータ削除
|
||||
logger.info('sales_lau_delete(プロシージャ―) 開始')
|
||||
db.execute(f"""
|
||||
CALL src05.sales_lau_delete(
|
||||
'{environment.SALES_LAUNDERING_TARGET_TABLE_NAME}',
|
||||
{environment.SALES_LAUNDERING_TARGET_YEAR_OFFSET}
|
||||
)
|
||||
""")
|
||||
logger.info('sales_lau_delete(プロシージャ―) 終了')
|
||||
return
|
||||
|
||||
|
||||
def _call_sales_lau_upsert(db: Database):
|
||||
# 卸販売実績テーブル(洗替後)作成
|
||||
logger.info('sales_lau_upsert(プロシージャ―) 開始')
|
||||
db.execute(f"""
|
||||
CALL src05.sales_lau_upsert(
|
||||
'{environment.SALES_LAUNDERING_TARGET_TABLE_NAME}',
|
||||
(src05.get_syor_date() - interval {environment.SALES_LAUNDERING_EXTRACT_DATE_PERIOD} day),
|
||||
src05.get_syor_date()
|
||||
)
|
||||
""")
|
||||
logger.info('sales_lau_upsert(プロシージャ―) 終了')
|
||||
return
|
||||
|
||||
|
||||
def _call_whs_org_laundering(db: Database):
|
||||
# 卸組織洗替
|
||||
logger.info('whs_org_laundering(プロシージャ―) 開始')
|
||||
db.execute(f"""
|
||||
CALL src05.whs_org_laundering(
|
||||
'{environment.SALES_LAUNDERING_TARGET_TABLE_NAME}'
|
||||
)
|
||||
""")
|
||||
logger.info('whs_org_laundering(プロシージャ―) 終了')
|
||||
return
|
||||
|
||||
|
||||
def _update_sales_lau_from_vop_hco_merge_v(db: Database):
|
||||
# HCO施設コードの洗替
|
||||
if _count_v_inst_merge_t(db) == 0:
|
||||
logger.info('V施設統合マスタ(洗替処理一時テーブル)にデータは存在しません')
|
||||
return
|
||||
|
||||
_call_v_inst_merge_laundering(db)
|
||||
return
|
||||
|
||||
|
||||
def _count_v_inst_merge_t(db: Database) -> int:
|
||||
# V施設統合マスタ(洗替処理一時テーブル)のデータ件数の取得
|
||||
try:
|
||||
sql = """
|
||||
SELECT
|
||||
COUNT(v_inst_cd) AS cnt
|
||||
FROM
|
||||
internal05.v_inst_merge_t
|
||||
"""
|
||||
result = db.execute_select(sql)
|
||||
logging_sql(logger, sql)
|
||||
logger.info('V施設統合マスタ(洗替処理一時テーブル)のデータ件数の取得 成功')
|
||||
except Exception as e:
|
||||
logger.debug('V施設統合マスタ(洗替処理一時テーブル)のデータ件数の取得 失敗')
|
||||
raise e
|
||||
|
||||
return result[0]['cnt']
|
||||
|
||||
|
||||
def _call_v_inst_merge_laundering(db: Database):
|
||||
# HCO施設コードの洗替(プロシージャ―の呼び出し)
|
||||
logger.info('v_inst_merge_laundering(プロシージャ―) 開始')
|
||||
db.execute(f"""
|
||||
CALL src05.v_inst_merge_laundering(
|
||||
'{environment.SALES_LAUNDERING_TARGET_TABLE_NAME}'
|
||||
)
|
||||
""")
|
||||
logger.info('v_inst_merge_laundering(プロシージャ―) 終了')
|
||||
return
|
||||
|
||||
|
||||
def _update_mst_inst_laundering(db: Database):
|
||||
# メルク施設コードの洗替
|
||||
_call_hco_to_mdb_laundering(db)
|
||||
_update_sales_lau_from_dcf_inst_merge(db)
|
||||
|
||||
|
||||
def _call_hco_to_mdb_laundering(db: Database):
|
||||
# A:医療機関のデータはMDB変換表からHCO⇒DCFへ変換
|
||||
logger.info('hco_to_mdb_laundering(プロシージャ―) 開始')
|
||||
db.execute(f"""
|
||||
CALL src05.hco_to_mdb_laundering(
|
||||
'{environment.SALES_LAUNDERING_TARGET_TABLE_NAME}'
|
||||
)
|
||||
""")
|
||||
logger.info('hco_to_mdb_laundering(プロシージャ―) 終了')
|
||||
return
|
||||
|
||||
|
||||
def _update_sales_lau_from_dcf_inst_merge(db: Database):
|
||||
# B:DCF施設統合マスタがある場合は、コードを変換し、住所等をSETする
|
||||
if _count_inst_merge_t(db) == 0:
|
||||
logger.info('アルトマーク施設統合マスタ(洗替処理一時テーブル)にデータは存在しません')
|
||||
return
|
||||
_call_inst_merge_laundering(db)
|
||||
return
|
||||
|
||||
|
||||
def _count_inst_merge_t(db: Database) -> int:
|
||||
# アルトマーク施設統合マスタ(洗替処理一時テーブル)のデータ件数の取得
|
||||
try:
|
||||
sql = """
|
||||
SELECT
|
||||
COUNT(dcf_dsf_inst_cd) AS cnt
|
||||
FROM
|
||||
internal05.inst_merge_t
|
||||
"""
|
||||
result = db.execute_select(sql)
|
||||
logging_sql(logger, sql)
|
||||
logger.info('アルトマーク施設統合マスタ(洗替処理一時テーブル)のデータ件数の取得 成功')
|
||||
except Exception as e:
|
||||
logger.debug('アルトマーク施設統合マスタ(洗替処理一時テーブル)のデータ件数の取得 失敗')
|
||||
raise e
|
||||
|
||||
return result[0]['cnt']
|
||||
|
||||
|
||||
def _call_inst_merge_laundering(db: Database):
|
||||
# B:DCF施設統合マスタがある場合は、コードを変換し、住所等をSETする(プロシージャ―の呼び出し)
|
||||
logger.info('inst_merge_laundering(プロシージャ―) 開始')
|
||||
db.execute(f"""
|
||||
CALL src05.inst_merge_laundering(
|
||||
'{environment.SALES_LAUNDERING_TARGET_TABLE_NAME}'
|
||||
)
|
||||
""")
|
||||
logger.info('inst_merge_laundering(プロシージャ―) 終了')
|
||||
return
|
||||
@ -13,15 +13,17 @@ logger = get_logger(__name__)
|
||||
class Database:
|
||||
"""データベース操作クラス"""
|
||||
__connection: Connection = None
|
||||
__engine: Engine = None
|
||||
__transactional_engine: Engine = None
|
||||
__autocommit_engine: Engine = None
|
||||
__host: str = None
|
||||
__port: str = None
|
||||
__username: str = None
|
||||
__password: str = None
|
||||
__schema: str = None
|
||||
__autocommit: bool = None
|
||||
__connection_string: str = None
|
||||
|
||||
def __init__(self, username: str, password: str, host: str, port: int, schema: str) -> None:
|
||||
def __init__(self, username: str, password: str, host: str, port: int, schema: str, autocommit: bool = False) -> None:
|
||||
"""このクラスの新たなインスタンスを初期化します
|
||||
|
||||
Args:
|
||||
@ -30,12 +32,14 @@ class Database:
|
||||
host (str): DBホスト名
|
||||
port (int): DBポート
|
||||
schema (str): DBスキーマ名
|
||||
autocommit(bool): 自動コミットモードで接続するかどうか(Trueの場合、トランザクションの有無に限らず即座にコミットされる). Defaults to False.
|
||||
"""
|
||||
self.__username = username
|
||||
self.__password = password
|
||||
self.__host = host
|
||||
self.__port = int(port)
|
||||
self.__schema = schema
|
||||
self.__autocommit = autocommit
|
||||
|
||||
self.__connection_string = URL.create(
|
||||
drivername='mysql+pymysql',
|
||||
@ -47,16 +51,20 @@ class Database:
|
||||
query={"charset": "utf8mb4"}
|
||||
)
|
||||
|
||||
self.__engine = create_engine(
|
||||
self.__transactional_engine = create_engine(
|
||||
self.__connection_string,
|
||||
pool_timeout=5,
|
||||
poolclass=QueuePool
|
||||
)
|
||||
|
||||
self.__autocommit_engine = self.__transactional_engine.execution_options(isolation_level='AUTOCOMMIT')
|
||||
|
||||
@classmethod
|
||||
def get_instance(cls):
|
||||
def get_instance(cls, autocommit=False):
|
||||
"""インスタンスを取得します
|
||||
|
||||
Args:
|
||||
autocommit (bool, optional): 自動コミットモードで接続するかどうか(Trueの場合、トランザクションの有無に限らず即座にコミットされる). Defaults to False.
|
||||
Returns:
|
||||
Database: DB操作クラスインスタンス
|
||||
"""
|
||||
@ -65,7 +73,8 @@ class Database:
|
||||
password=environment.DB_PASSWORD,
|
||||
host=environment.DB_HOST,
|
||||
port=environment.DB_PORT,
|
||||
schema=environment.DB_SCHEMA
|
||||
schema=environment.DB_SCHEMA,
|
||||
autocommit=autocommit
|
||||
)
|
||||
|
||||
@retry(
|
||||
@ -77,12 +86,15 @@ class Database:
|
||||
stop=stop_after_attempt(environment.DB_CONNECTION_MAX_RETRY_ATTEMPT))
|
||||
def connect(self):
|
||||
"""
|
||||
DBに接続します。接続に失敗した場合、リトライします。
|
||||
DBに接続します。接続に失敗した場合、リトライします。\n
|
||||
インスタンスのautocommitがTrueの場合、自動コミットモードで接続する。(明示的なトランザクションも無視される)
|
||||
Raises:
|
||||
DBException: 接続失敗
|
||||
"""
|
||||
try:
|
||||
self.__connection = self.__engine.connect()
|
||||
self.__connection = (
|
||||
self.__autocommit_engine.connect() if self.__autocommit is True
|
||||
else self.__transactional_engine.connect())
|
||||
except Exception as e:
|
||||
raise DBException(e)
|
||||
|
||||
|
||||
@ -25,3 +25,10 @@ DB_CONNECTION_MAX_RETRY_ATTEMPT = int(os.environ.get('DB_CONNECTION_MAX_RETRY_AT
|
||||
DB_CONNECTION_RETRY_INTERVAL_INIT = int(os.environ.get('DB_CONNECTION_RETRY_INTERVAL', 5))
|
||||
DB_CONNECTION_RETRY_INTERVAL_MIN_SECONDS = int(os.environ.get('DB_CONNECTION_RETRY_MIN_SECONDS', 5))
|
||||
DB_CONNECTION_RETRY_INTERVAL_MAX_SECONDS = int(os.environ.get('DB_CONNECTION_RETRY_MAX_SECONDS', 50))
|
||||
|
||||
# 連携データ抽出期間
|
||||
SALES_LAUNDERING_EXTRACT_DATE_PERIOD = int(os.environ['SALES_LAUNDERING_EXTRACT_DATE_PERIOD'])
|
||||
# 洗替対象テーブル名
|
||||
SALES_LAUNDERING_TARGET_TABLE_NAME = os.environ['SALES_LAUNDERING_TARGET_TABLE_NAME']
|
||||
# 卸実績洗替で作成するデータの期間(年単位)
|
||||
SALES_LAUNDERING_TARGET_YEAR_OFFSET = os.environ['SALES_LAUNDERING_TARGET_YEAR_OFFSET']
|
||||
|
||||
@ -22,5 +22,6 @@ AWS_REGION=ap-northeast-1
|
||||
AUTHORIZE_ENDPOINT=oauth2/authorize
|
||||
TOKEN_ENDPOINT=oauth2/token
|
||||
BIO_SEARCH_RESULT_MAX_COUNT=35000
|
||||
ULTMARC_SEARCH_RESULT_MAX_COUNT=500
|
||||
SESSION_EXPIRE_MINUTE=20
|
||||
LOG_LEVEL=DEBUG
|
||||
@ -23,6 +23,7 @@ pandas = "*"
|
||||
openpyxl = "*"
|
||||
xlrd = "*"
|
||||
sqlalchemy = "*"
|
||||
mojimoji = "*"
|
||||
|
||||
[dev-packages]
|
||||
autopep8 = "*"
|
||||
|
||||
407
ecs/jskult-webapp/Pipfile.lock
generated
407
ecs/jskult-webapp/Pipfile.lock
generated
@ -1,7 +1,7 @@
|
||||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "3fc09dcad05f44b119f92f9955a7731128d9f9b1829240b7689102fb14f82edc"
|
||||
"sha256": "ebbab78060c475a430a1ce8c817736651277c081230c5c0e94f0b0d02f5f46df"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
@ -26,19 +26,19 @@
|
||||
},
|
||||
"boto3": {
|
||||
"hashes": [
|
||||
"sha256:30f8ab1cf89d5864a80ba2d5eb5316dbd2a63c9469877e0cffb522630438aa85",
|
||||
"sha256:77e8fa7c257f9ed8bfe0c3ffc2ccc47b1cfa27058f99415b6003699d1202e0c0"
|
||||
"sha256:2d4095e2029ce5ceccb25591f13e55aa5b8ba17794de09963654bd9ced45158f",
|
||||
"sha256:dd15823e8c0554d98c18584d9a6a0342c67611c1114ef61495934c2e560f632c"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.26.145"
|
||||
"version": "==1.26.155"
|
||||
},
|
||||
"botocore": {
|
||||
"hashes": [
|
||||
"sha256:264a3f19ed280d80711b7e278be09acff7ed379a96432fdf179b4e6e3a687e6a",
|
||||
"sha256:65e2a2b1cc70583225f87d6d63736215f93c6234721967bdab872270ba7a1f45"
|
||||
"sha256:32d5da68212e10c060fd484f41df4f7048fc7731ccd16fd00e37b11b6e841142",
|
||||
"sha256:7fbb7ebba5f645c9750fe557b1ea789d40017a028cdaa2c22fcbf06d4a4d3c1d"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==1.29.145"
|
||||
"version": "==1.29.155"
|
||||
},
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
@ -206,6 +206,13 @@
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==8.1.3"
|
||||
},
|
||||
"colorama": {
|
||||
"hashes": [
|
||||
"sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44",
|
||||
"sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"
|
||||
],
|
||||
"version": "==0.4.6"
|
||||
},
|
||||
"cryptography": {
|
||||
"hashes": [
|
||||
"sha256:059e348f9a3c1950937e1b5d7ba1f8e968508ab181e75fc32b879452f08356db",
|
||||
@ -248,11 +255,11 @@
|
||||
},
|
||||
"fastapi": {
|
||||
"hashes": [
|
||||
"sha256:4d9d3e8c71c73f11874bcf5e33626258d143252e329a01002f767306c64fb982",
|
||||
"sha256:d374dbc4ef2ad9b803899bd3360d34c534adc574546e25314ab72c0c4411749f"
|
||||
"sha256:95d757511c596409930bd20673358d4a4d709004edb85c5d24d6ffc48fabcbf2",
|
||||
"sha256:b53248ee45f64f19bb7600953696e3edf94b0f7de94df1e5433fc5c6136fa986"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.95.2"
|
||||
"version": "==0.97.0"
|
||||
},
|
||||
"greenlet": {
|
||||
"hashes": [
|
||||
@ -408,90 +415,113 @@
|
||||
},
|
||||
"markupsafe": {
|
||||
"hashes": [
|
||||
"sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed",
|
||||
"sha256:085fd3201e7b12809f9e6e9bc1e5c96a368c8523fad5afb02afe3c051ae4afcc",
|
||||
"sha256:090376d812fb6ac5f171e5938e82e7f2d7adc2b629101cec0db8b267815c85e2",
|
||||
"sha256:0b462104ba25f1ac006fdab8b6a01ebbfbce9ed37fd37fd4acd70c67c973e460",
|
||||
"sha256:137678c63c977754abe9086a3ec011e8fd985ab90631145dfb9294ad09c102a7",
|
||||
"sha256:1bea30e9bf331f3fef67e0a3877b2288593c98a21ccb2cf29b74c581a4eb3af0",
|
||||
"sha256:22152d00bf4a9c7c83960521fc558f55a1adbc0631fbb00a9471e097b19d72e1",
|
||||
"sha256:22731d79ed2eb25059ae3df1dfc9cb1546691cc41f4e3130fe6bfbc3ecbbecfa",
|
||||
"sha256:2298c859cfc5463f1b64bd55cb3e602528db6fa0f3cfd568d3605c50678f8f03",
|
||||
"sha256:28057e985dace2f478e042eaa15606c7efccb700797660629da387eb289b9323",
|
||||
"sha256:2e7821bffe00aa6bd07a23913b7f4e01328c3d5cc0b40b36c0bd81d362faeb65",
|
||||
"sha256:2ec4f2d48ae59bbb9d1f9d7efb9236ab81429a764dedca114f5fdabbc3788013",
|
||||
"sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036",
|
||||
"sha256:40627dcf047dadb22cd25ea7ecfe9cbf3bbbad0482ee5920b582f3809c97654f",
|
||||
"sha256:40dfd3fefbef579ee058f139733ac336312663c6706d1163b82b3003fb1925c4",
|
||||
"sha256:4cf06cdc1dda95223e9d2d3c58d3b178aa5dacb35ee7e3bbac10e4e1faacb419",
|
||||
"sha256:50c42830a633fa0cf9e7d27664637532791bfc31c731a87b202d2d8ac40c3ea2",
|
||||
"sha256:55f44b440d491028addb3b88f72207d71eeebfb7b5dbf0643f7c023ae1fba619",
|
||||
"sha256:608e7073dfa9e38a85d38474c082d4281f4ce276ac0010224eaba11e929dd53a",
|
||||
"sha256:63ba06c9941e46fa389d389644e2d8225e0e3e5ebcc4ff1ea8506dce646f8c8a",
|
||||
"sha256:65608c35bfb8a76763f37036547f7adfd09270fbdbf96608be2bead319728fcd",
|
||||
"sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7",
|
||||
"sha256:6d6607f98fcf17e534162f0709aaad3ab7a96032723d8ac8750ffe17ae5a0666",
|
||||
"sha256:7313ce6a199651c4ed9d7e4cfb4aa56fe923b1adf9af3b420ee14e6d9a73df65",
|
||||
"sha256:7668b52e102d0ed87cb082380a7e2e1e78737ddecdde129acadb0eccc5423859",
|
||||
"sha256:7df70907e00c970c60b9ef2938d894a9381f38e6b9db73c5be35e59d92e06625",
|
||||
"sha256:7e007132af78ea9df29495dbf7b5824cb71648d7133cf7848a2a5dd00d36f9ff",
|
||||
"sha256:835fb5e38fd89328e9c81067fd642b3593c33e1e17e2fdbf77f5676abb14a156",
|
||||
"sha256:8bca7e26c1dd751236cfb0c6c72d4ad61d986e9a41bbf76cb445f69488b2a2bd",
|
||||
"sha256:8db032bf0ce9022a8e41a22598eefc802314e81b879ae093f36ce9ddf39ab1ba",
|
||||
"sha256:99625a92da8229df6d44335e6fcc558a5037dd0a760e11d84be2260e6f37002f",
|
||||
"sha256:9cad97ab29dfc3f0249b483412c85c8ef4766d96cdf9dcf5a1e3caa3f3661cf1",
|
||||
"sha256:a4abaec6ca3ad8660690236d11bfe28dfd707778e2442b45addd2f086d6ef094",
|
||||
"sha256:a6e40afa7f45939ca356f348c8e23048e02cb109ced1eb8420961b2f40fb373a",
|
||||
"sha256:a6f2fcca746e8d5910e18782f976489939d54a91f9411c32051b4aab2bd7c513",
|
||||
"sha256:a806db027852538d2ad7555b203300173dd1b77ba116de92da9afbc3a3be3eed",
|
||||
"sha256:abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d",
|
||||
"sha256:b8526c6d437855442cdd3d87eede9c425c4445ea011ca38d937db299382e6fa3",
|
||||
"sha256:bb06feb762bade6bf3c8b844462274db0c76acc95c52abe8dbed28ae3d44a147",
|
||||
"sha256:c0a33bc9f02c2b17c3ea382f91b4db0e6cde90b63b296422a939886a7a80de1c",
|
||||
"sha256:c4a549890a45f57f1ebf99c067a4ad0cb423a05544accaf2b065246827ed9603",
|
||||
"sha256:ca244fa73f50a800cf8c3ebf7fd93149ec37f5cb9596aa8873ae2c1d23498601",
|
||||
"sha256:cf877ab4ed6e302ec1d04952ca358b381a882fbd9d1b07cccbfd61783561f98a",
|
||||
"sha256:d9d971ec1e79906046aa3ca266de79eac42f1dbf3612a05dc9368125952bd1a1",
|
||||
"sha256:da25303d91526aac3672ee6d49a2f3db2d9502a4a60b55519feb1a4c7714e07d",
|
||||
"sha256:e55e40ff0cc8cc5c07996915ad367fa47da6b3fc091fdadca7f5403239c5fec3",
|
||||
"sha256:f03a532d7dee1bed20bc4884194a16160a2de9ffc6354b3878ec9682bb623c54",
|
||||
"sha256:f1cd098434e83e656abf198f103a8207a8187c0fc110306691a2e94a78d0abb2",
|
||||
"sha256:f2bfb563d0211ce16b63c7cb9395d2c682a23187f54c3d79bfec33e6705473c6",
|
||||
"sha256:f8ffb705ffcf5ddd0e80b65ddf7bed7ee4f5a441ea7d3419e861a12eaf41af58"
|
||||
"sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e",
|
||||
"sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e",
|
||||
"sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431",
|
||||
"sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686",
|
||||
"sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559",
|
||||
"sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc",
|
||||
"sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c",
|
||||
"sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0",
|
||||
"sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4",
|
||||
"sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9",
|
||||
"sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575",
|
||||
"sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba",
|
||||
"sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d",
|
||||
"sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3",
|
||||
"sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00",
|
||||
"sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155",
|
||||
"sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac",
|
||||
"sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52",
|
||||
"sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f",
|
||||
"sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8",
|
||||
"sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b",
|
||||
"sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24",
|
||||
"sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea",
|
||||
"sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198",
|
||||
"sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0",
|
||||
"sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee",
|
||||
"sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be",
|
||||
"sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2",
|
||||
"sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707",
|
||||
"sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6",
|
||||
"sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58",
|
||||
"sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779",
|
||||
"sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636",
|
||||
"sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c",
|
||||
"sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad",
|
||||
"sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee",
|
||||
"sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc",
|
||||
"sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2",
|
||||
"sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48",
|
||||
"sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7",
|
||||
"sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e",
|
||||
"sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b",
|
||||
"sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa",
|
||||
"sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5",
|
||||
"sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e",
|
||||
"sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb",
|
||||
"sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9",
|
||||
"sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57",
|
||||
"sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc",
|
||||
"sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==2.1.2"
|
||||
"version": "==2.1.3"
|
||||
},
|
||||
"mojimoji": {
|
||||
"hashes": [
|
||||
"sha256:01a3d73e8b3c641386b1824d5106b8ea5c351a641623c910d89d8f02520c1b0e",
|
||||
"sha256:05b589361b6f35aef96df3a7f64c2a286a7e7aed9865cd7baf1a5876bb4cd16a",
|
||||
"sha256:515f6fa5659d77a172f1fb46950d34674f33cf487e9aa131bf9422cbe127e5f4",
|
||||
"sha256:59cc0af7d3be3b6847c8dcf1a4e0d09cc0646ff64c101308903d14871245403c",
|
||||
"sha256:61c03620528650603b3c92f367d6db2a645c2638408add5ba03fed982af7cd1d",
|
||||
"sha256:7a15864d8de07a487280c528fe3d2aeaad05bb2ce6d8bf201fc1480b0b5db337",
|
||||
"sha256:8a1285040b7ef7ca5bafe095b62b99507cf19e10c6000e3279bc44d9430da3d9",
|
||||
"sha256:9723531661911479bbfce08ec8a62c7b5958a307f33a025fe938d19550b13f9d",
|
||||
"sha256:98f41bf146b731ed4554c60495c53fd96339a52e02b22a869d6eaf2433047505",
|
||||
"sha256:a98fb09bd49245f9d9cd29603b912dc2f94e619e6d2f5b722553a5dbe113ce6c",
|
||||
"sha256:ae5e6e8d4e70849f4217fa00ca7d770354f5a13c04778b6f07f3bceb0a636abd",
|
||||
"sha256:b110101148b920eba60fa4627b904fa18801c5ca3667880494b7f0d25dd1a5fe",
|
||||
"sha256:b2247233f4b3bee6ab601ac7fcbd84124ad91788a7418c1430f93a4bac340218",
|
||||
"sha256:b379781a0cb95eeb79939608b4a013ad7b79ba03b7fe9b795eadc40bd96a06c9",
|
||||
"sha256:d974a034528cb9fb95fcade6f3ffb73dc1dc336e17413486a5094724cbe9e34f",
|
||||
"sha256:f180e2e8ff47e54cc36b0de147bceaf76fab88ef06775835a55b38ef6b82c161",
|
||||
"sha256:f7f4da9e809fa68588e817f1ae351c4274be2366e542c51393657cae7bcf114f"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.0.12"
|
||||
},
|
||||
"numpy": {
|
||||
"hashes": [
|
||||
"sha256:04847257662eef90599a1beca30c757d8e562aa8c7d64e91ea465f299469075d",
|
||||
"sha256:06bae17a3629416eb5bae3a429655dc075561206b6d3c1ddfa38b51f273bae5c",
|
||||
"sha256:1365157813810cfda2be9518806bf32f6b5f56e5e501d8299e3b681d53e405e2",
|
||||
"sha256:165b0fb4d5b6349eef7b909be2d61a673bc6e75e0eec43776eea3222385a9d11",
|
||||
"sha256:1bed69508b3b97dd3fb8c439352881c1bd232a0c8dd1e11d8df4e68046d434cf",
|
||||
"sha256:20dd2352806eb229bc79c4fa308431eaf1721c66f7928950ee0381df98a2d269",
|
||||
"sha256:224e8862a1cd357eede831b270b9e6c51d2cbc2bb5cc2e2b8d0c76d52cbd1edc",
|
||||
"sha256:236c8ff573c02677b873e0934419c8e9873bd2b35aaba885170b7b43cb26d5da",
|
||||
"sha256:416da35914d2fecc3afd31127b1eb1a283df33292cfcb453e1c8fb46d52611a1",
|
||||
"sha256:472bdc3ade289d3efa331738b1daa5a529eef0550650f5d5d2eadb936a2f83a5",
|
||||
"sha256:48e33b46b7db13de75dd0c1c919b8b297b5d7a4dc50b181066977ee17bed7cc3",
|
||||
"sha256:5e7ba92ad63ffded03400d5038af89f7788843794c77ad1a37522fa69762b06f",
|
||||
"sha256:7261d100c9bf722057fd5b9cd5b48f2973b17792b41e689eeaf9b55843cd1afd",
|
||||
"sha256:763fca81a8d8beb6bf4b9a9bbf4045b0c134c15ea66c81d26e5b8683b1861293",
|
||||
"sha256:7cf92c2bfbaf7bd52df1a21e56e8d34cff711594498ecbd02a39df3aaada763b",
|
||||
"sha256:8aad2f86d2036622af1e1eb9db94e26618f42a571e02583fa72d5b1983782bf8",
|
||||
"sha256:9a18d2c173a44e48e72614748df5624875439af2d352a416b9f3840583ad9efb",
|
||||
"sha256:a0dab69ef25ccabf6f066a4902e238767cbbe52bc5ff90aa99514f87812ba76a",
|
||||
"sha256:a4a9f1eaa63b5e35e23e5465ed59746b0a680eb5b5da06f2d432f828d32b26c1",
|
||||
"sha256:b1a22ae597ee1d0e2336044854b33965fd92e731efe3c2ab965826e02cca2a8c",
|
||||
"sha256:bd1de5d7ab75cdf56f2247aace7940dfd0a8fd048e07808358d8fca604f1d102",
|
||||
"sha256:dfe2e3845c3b630f6617f9e8a15c8a1cbaf452c9fa32c71ec0a77d09548cd662",
|
||||
"sha256:f59080829bbfe46660a201fc17315a4e8ec6e4499ee745bab3df61866f63e771",
|
||||
"sha256:f64b730004e500f836f6405ad5cd36d309b6ac065366a0855860155f23eb2ad5",
|
||||
"sha256:f8cbdb428d848f03a4f6f534284cf7fb168a6ec0e742357bf65ad268316906ea"
|
||||
"sha256:0ac6edfb35d2a99aaf102b509c8e9319c499ebd4978df4971b94419a116d0790",
|
||||
"sha256:26815c6c8498dc49d81faa76d61078c4f9f0859ce7817919021b9eba72b425e3",
|
||||
"sha256:4aedd08f15d3045a4e9c648f1e04daca2ab1044256959f1f95aafeeb3d794c16",
|
||||
"sha256:4c69fe5f05eea336b7a740e114dec995e2f927003c30702d896892403df6dbf0",
|
||||
"sha256:5177310ac2e63d6603f659fadc1e7bab33dd5a8db4e0596df34214eeab0fee3b",
|
||||
"sha256:5aa48bebfb41f93043a796128854b84407d4df730d3fb6e5dc36402f5cd594c0",
|
||||
"sha256:5b1b90860bf7d8a8c313b372d4f27343a54f415b20fb69dd601b7efe1029c91e",
|
||||
"sha256:6c284907e37f5e04d2412950960894b143a648dea3f79290757eb878b91acbd1",
|
||||
"sha256:6d183b5c58513f74225c376643234c369468e02947b47942eacbb23c1671f25d",
|
||||
"sha256:7412125b4f18aeddca2ecd7219ea2d2708f697943e6f624be41aa5f8a9852cc4",
|
||||
"sha256:7cd981ccc0afe49b9883f14761bb57c964df71124dcd155b0cba2b591f0d64b9",
|
||||
"sha256:85cdae87d8c136fd4da4dad1e48064d700f63e923d5af6c8c782ac0df8044542",
|
||||
"sha256:8aa130c3042052d656751df5e81f6d61edff3e289b5994edcf77f54118a8d9f4",
|
||||
"sha256:95367ccd88c07af21b379be1725b5322362bb83679d36691f124a16357390153",
|
||||
"sha256:9c7211d7920b97aeca7b3773a6783492b5b93baba39e7c36054f6e749fc7490c",
|
||||
"sha256:9e3f2b96e3b63c978bc29daaa3700c028fe3f049ea3031b58aa33fe2a5809d24",
|
||||
"sha256:b76aa836a952059d70a2788a2d98cb2a533ccd46222558b6970348939e55fc24",
|
||||
"sha256:b792164e539d99d93e4e5e09ae10f8cbe5466de7d759fc155e075237e0c274e4",
|
||||
"sha256:c0dc071017bc00abb7d7201bac06fa80333c6314477b3d10b52b58fa6a6e38f6",
|
||||
"sha256:cc3fda2b36482891db1060f00f881c77f9423eead4c3579629940a3e12095fe8",
|
||||
"sha256:d6b267f349a99d3908b56645eebf340cb58f01bd1e773b4eea1a905b3f0e4208",
|
||||
"sha256:d76a84998c51b8b68b40448ddd02bd1081bb33abcdc28beee6cd284fe11036c6",
|
||||
"sha256:e559c6afbca484072a98a51b6fa466aae785cfe89b69e8b856c3191bc8872a82",
|
||||
"sha256:ecc68f11404930e9c7ecfc937aa423e1e50158317bf67ca91736a9864eae0232",
|
||||
"sha256:f1accae9a28dc3cda46a91de86acf69de0d1b5f4edd44a9b0c3ceb8036dfff19"
|
||||
],
|
||||
"markers": "python_version < '3.10'",
|
||||
"version": "==1.25.0rc1"
|
||||
"version": "==1.25.0"
|
||||
},
|
||||
"openpyxl": {
|
||||
"hashes": [
|
||||
@ -541,48 +571,50 @@
|
||||
},
|
||||
"pydantic": {
|
||||
"hashes": [
|
||||
"sha256:052d8654cb65174d6f9490cc9b9a200083a82cf5c3c5d3985db765757eb3b375",
|
||||
"sha256:0c6fafa0965b539d7aab0a673a046466d23b86e4b0e8019d25fd53f4df62c277",
|
||||
"sha256:1243d28e9b05003a89d72e7915fdb26ffd1d39bdd39b00b7dbe4afae4b557f9d",
|
||||
"sha256:12f7b0bf8553e310e530e9f3a2f5734c68699f42218bf3568ef49cd9b0e44df4",
|
||||
"sha256:1410275520dfa70effadf4c21811d755e7ef9bb1f1d077a21958153a92c8d9ca",
|
||||
"sha256:16f8c3e33af1e9bb16c7a91fc7d5fa9fe27298e9f299cff6cb744d89d573d62c",
|
||||
"sha256:17aef11cc1b997f9d574b91909fed40761e13fac438d72b81f902226a69dac01",
|
||||
"sha256:191ba419b605f897ede9892f6c56fb182f40a15d309ef0142212200a10af4c18",
|
||||
"sha256:1952526ba40b220b912cdc43c1c32bcf4a58e3f192fa313ee665916b26befb68",
|
||||
"sha256:1ced8375969673929809d7f36ad322934c35de4af3b5e5b09ec967c21f9f7887",
|
||||
"sha256:2e4148e635994d57d834be1182a44bdb07dd867fa3c2d1b37002000646cc5459",
|
||||
"sha256:34d327c81e68a1ecb52fe9c8d50c8a9b3e90d3c8ad991bfc8f953fb477d42fb4",
|
||||
"sha256:35db5301b82e8661fa9c505c800d0990bc14e9f36f98932bb1d248c0ac5cada5",
|
||||
"sha256:3e59417ba8a17265e632af99cc5f35ec309de5980c440c255ab1ca3ae96a3e0e",
|
||||
"sha256:42aa0c4b5c3025483240a25b09f3c09a189481ddda2ea3a831a9d25f444e03c1",
|
||||
"sha256:666bdf6066bf6dbc107b30d034615d2627e2121506c555f73f90b54a463d1f33",
|
||||
"sha256:66a703d1983c675a6e0fed8953b0971c44dba48a929a2000a493c3772eb61a5a",
|
||||
"sha256:6a82d6cda82258efca32b40040228ecf43a548671cb174a1e81477195ed3ed56",
|
||||
"sha256:6f2e754d5566f050954727c77f094e01793bcb5725b663bf628fa6743a5a9108",
|
||||
"sha256:7456eb22ed9aaa24ff3e7b4757da20d9e5ce2a81018c1b3ebd81a0b88a18f3b2",
|
||||
"sha256:7b1f6cb446470b7ddf86c2e57cd119a24959af2b01e552f60705910663af09a4",
|
||||
"sha256:7d5b8641c24886d764a74ec541d2fc2c7fb19f6da2a4001e6d580ba4a38f7878",
|
||||
"sha256:84d80219c3f8d4cad44575e18404099c76851bc924ce5ab1c4c8bb5e2a2227d0",
|
||||
"sha256:88f195f582851e8db960b4a94c3e3ad25692c1c1539e2552f3df7a9e972ef60e",
|
||||
"sha256:93e6bcfccbd831894a6a434b0aeb1947f9e70b7468f274154d03d71fabb1d7c6",
|
||||
"sha256:93e766b4a8226e0708ef243e843105bf124e21331694367f95f4e3b4a92bbb3f",
|
||||
"sha256:ab523c31e22943713d80d8d342d23b6f6ac4b792a1e54064a8d0cf78fd64e800",
|
||||
"sha256:bb14388ec45a7a0dc429e87def6396f9e73c8c77818c927b6a60706603d5f2ea",
|
||||
"sha256:c0ab53b609c11dfc0c060d94335993cc2b95b2150e25583bec37a49b2d6c6c3f",
|
||||
"sha256:c33b60054b2136aef8cf190cd4c52a3daa20b2263917c49adad20eaf381e823b",
|
||||
"sha256:ceb6a23bf1ba4b837d0cfe378329ad3f351b5897c8d4914ce95b85fba96da5a1",
|
||||
"sha256:d532bf00f381bd6bc62cabc7d1372096b75a33bc197a312b03f5838b4fb84edd",
|
||||
"sha256:df7800cb1984d8f6e249351139667a8c50a379009271ee6236138a22a0c0f319",
|
||||
"sha256:e82d4566fcd527eae8b244fa952d99f2ca3172b7e97add0b43e2d97ee77f81ab",
|
||||
"sha256:f90c1e29f447557e9e26afb1c4dbf8768a10cc676e3781b6a577841ade126b85",
|
||||
"sha256:f9613fadad06b4f3bc5db2653ce2f22e0de84a7c6c293909b48f6ed37b83c61f"
|
||||
"sha256:07293ab08e7b4d3c9d7de4949a0ea571f11e4557d19ea24dd3ae0c524c0c334d",
|
||||
"sha256:0a2aabdc73c2a5960e87c3ffebca6ccde88665616d1fd6d3db3178ef427b267a",
|
||||
"sha256:0da48717dc9495d3a8f215e0d012599db6b8092db02acac5e0d58a65248ec5bc",
|
||||
"sha256:128d9453d92e6e81e881dd7e2484e08d8b164da5507f62d06ceecf84bf2e21d3",
|
||||
"sha256:2196c06484da2b3fded1ab6dbe182bdabeb09f6318b7fdc412609ee2b564c49a",
|
||||
"sha256:2e9aec8627a1a6823fc62fb96480abe3eb10168fd0d859ee3d3b395105ae19a7",
|
||||
"sha256:3283b574b01e8dbc982080d8287c968489d25329a463b29a90d4157de4f2baaf",
|
||||
"sha256:3c52eb595db83e189419bf337b59154bdcca642ee4b2a09e5d7797e41ace783f",
|
||||
"sha256:4b466a23009ff5cdd7076eb56aca537c745ca491293cc38e72bf1e0e00de5b91",
|
||||
"sha256:517a681919bf880ce1dac7e5bc0c3af1e58ba118fd774da2ffcd93c5f96eaece",
|
||||
"sha256:5f8bbaf4013b9a50e8100333cc4e3fa2f81214033e05ac5aa44fa24a98670a29",
|
||||
"sha256:6257bb45ad78abacda13f15bde5886efd6bf549dd71085e64b8dcf9919c38b60",
|
||||
"sha256:67195274fd27780f15c4c372f4ba9a5c02dad6d50647b917b6a92bf00b3d301a",
|
||||
"sha256:6cafde02f6699ce4ff643417d1a9223716ec25e228ddc3b436fe7e2d25a1f305",
|
||||
"sha256:73ef93e5e1d3c8e83f1ff2e7fdd026d9e063c7e089394869a6e2985696693766",
|
||||
"sha256:7845b31959468bc5b78d7b95ec52fe5be32b55d0d09983a877cca6aedc51068f",
|
||||
"sha256:7847ca62e581e6088d9000f3c497267868ca2fa89432714e21a4fb33a04d52e8",
|
||||
"sha256:7e1d5290044f620f80cf1c969c542a5468f3656de47b41aa78100c5baa2b8276",
|
||||
"sha256:7ee829b86ce984261d99ff2fd6e88f2230068d96c2a582f29583ed602ef3fc2c",
|
||||
"sha256:83fcff3c7df7adff880622a98022626f4f6dbce6639a88a15a3ce0f96466cb60",
|
||||
"sha256:939328fd539b8d0edf244327398a667b6b140afd3bf7e347cf9813c736211896",
|
||||
"sha256:95c70da2cd3b6ddf3b9645ecaa8d98f3d80c606624b6d245558d202cd23ea3be",
|
||||
"sha256:963671eda0b6ba6926d8fc759e3e10335e1dc1b71ff2a43ed2efd6996634dafb",
|
||||
"sha256:970b1bdc6243ef663ba5c7e36ac9ab1f2bfecb8ad297c9824b542d41a750b298",
|
||||
"sha256:9863b9420d99dfa9c064042304868e8ba08e89081428a1c471858aa2af6f57c4",
|
||||
"sha256:ad428e92ab68798d9326bb3e5515bc927444a3d71a93b4a2ca02a8a5d795c572",
|
||||
"sha256:b48d3d634bca23b172f47f2335c617d3fcb4b3ba18481c96b7943a4c634f5c8d",
|
||||
"sha256:b9cd67fb763248cbe38f0593cd8611bfe4b8ad82acb3bdf2b0898c23415a1f82",
|
||||
"sha256:d111a21bbbfd85c17248130deac02bbd9b5e20b303338e0dbe0faa78330e37e0",
|
||||
"sha256:e1aa5c2410769ca28aa9a7841b80d9d9a1c5f223928ca8bec7e7c9a34d26b1d4",
|
||||
"sha256:e692dec4a40bfb40ca530e07805b1208c1de071a18d26af4a2a0d79015b352ca",
|
||||
"sha256:e7c9900b43ac14110efa977be3da28931ffc74c27e96ee89fbcaaf0b0fe338e1",
|
||||
"sha256:eec39224b2b2e861259d6f3c8b6290d4e0fbdce147adb797484a42278a1a486f",
|
||||
"sha256:f0b7628fb8efe60fe66fd4adadd7ad2304014770cdc1f4934db41fe46cc8825f",
|
||||
"sha256:f50e1764ce9353be67267e7fd0da08349397c7db17a562ad036aa7c8f4adfdb6",
|
||||
"sha256:fab81a92f42d6d525dd47ced310b0c3e10c416bbfae5d59523e63ea22f82b31e"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==1.10.8"
|
||||
"version": "==1.10.9"
|
||||
},
|
||||
"pyjwt": {
|
||||
"extras": [],
|
||||
"extras": [
|
||||
"crypto"
|
||||
],
|
||||
"hashes": [
|
||||
"sha256:ba2b425b15ad5ef12f200dc67dd56af4e26de2331f965c5439994dad075876e1",
|
||||
"sha256:bd6ca4a3c4285c1a2d4349e5a035fdf8fb94e04ccd0fcbe6ba289dae9cc3e074"
|
||||
@ -592,11 +624,11 @@
|
||||
},
|
||||
"pymysql": {
|
||||
"hashes": [
|
||||
"sha256:5072fb2637f8bfff0e7a15a9c02a0f4ba98f97800e12432e1d6d95936ec6d496",
|
||||
"sha256:5cc02f2f60936c5d2d6122ffaff27783bd29ba7683ea45a8ab75c5083f00dc20"
|
||||
"sha256:766b72e4370aba94e6266a4dbd62c51fbc6a894c38de25a41a8a01f0461a2387",
|
||||
"sha256:aade29b861e81a3c68a9e90d43f3db257940c0208983a0128b82f1a4cef639aa"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.1.0rc1"
|
||||
"version": "==1.1.0rc2"
|
||||
},
|
||||
"pynamodb": {
|
||||
"hashes": [
|
||||
@ -723,50 +755,50 @@
|
||||
},
|
||||
"sqlalchemy": {
|
||||
"hashes": [
|
||||
"sha256:1a0754c2d9f0c7982bec0a31138e495ed1f6b8435d7e677c45be60ec18370acf",
|
||||
"sha256:1d6320a1d175447dce63618ec997a53836de48ed3b44bbe952f0b4b399b19941",
|
||||
"sha256:1e885dacb167077df15af2f9ccdacbd7f5dd0d538a6d74b94074f2cefc7bb589",
|
||||
"sha256:201a99f922ac8c780b3929128fbd9df901418877c70e160e19adb05665e51c31",
|
||||
"sha256:21c89044fc48a25c2184eba332edeffbbf9367913bb065cd31538235d828f06f",
|
||||
"sha256:256b2b9660e51ad7055a9835b12717416cf7288afcf465107413917b6bb2316f",
|
||||
"sha256:2e940a8659ef870ae10e0d9e2a6d5aaddf0ff6e91f7d0d7732afc9e8c4be9bbc",
|
||||
"sha256:3fb5d09f1d51480f711b69fe28ad42e4f8b08600a85ab2473baee669e1257800",
|
||||
"sha256:435f6807fa6a0597d84741470f19db204a7d34625ea121abd63e8d95f673f0c4",
|
||||
"sha256:4670ce853cb25f72115a1bbe366ae13cf3f28fc5c87222df14f8d3d55d51816e",
|
||||
"sha256:4a75fdb9a84072521bb2ebd31eefe1165d4dccea3039dda701a864f4b5daa17f",
|
||||
"sha256:4d61731a35eddb0f667774fe15e5a4831e444d066081d1e809e1b8a0e3f97cae",
|
||||
"sha256:51b19887c96d405599880da6a7cbdf8545a7e78ec5683e46a43bac8885e32d0f",
|
||||
"sha256:536c86ec81ca89291d533ff41a3a05f9e4e88e01906dcee0751fc7082f3e8d6c",
|
||||
"sha256:55ec62ddc0200b4fee94d11abbec7aa25948d5d21cb8df8807f4bdd3c51ba44b",
|
||||
"sha256:5cc48a7fda2b5c5b8860494d6c575db3a101a68416492105fed6591dc8a2728a",
|
||||
"sha256:670ecf74ee2e70b917028a06446ad26ff9b1195e84b09c3139c215123d57dc30",
|
||||
"sha256:6a3f8020e013e9b3b7941dcf20b0fc8f7429daaf7158760846731cbd8caa5e45",
|
||||
"sha256:6b42913a0259267e9ee335da0c36498077799e59c5e332d506e72b4f32de781d",
|
||||
"sha256:6f5784dfb2d45c19cde03c45c04a54bf47428610106197ed6e6fa79f33bc63d3",
|
||||
"sha256:6f80a9c9a9af0e4bd5080cc0955ce70274c28e9b931ad7e0fb07021afcd32af6",
|
||||
"sha256:78303719c6f72af97814b0072ad18bee72e70adca8d95cf8fecd59c5e1ddb040",
|
||||
"sha256:788d1772fb8dcd12091ca82809eef504ce0f2c423e45284bc351b872966ff554",
|
||||
"sha256:79bfe728219239bdc493950ea4a4d15b02138ecb304771f9024d0d6f5f4e3706",
|
||||
"sha256:810199d1c5b43603a9e815ae9487aef3ab1ade7ed9c0c485e12519358929fbfe",
|
||||
"sha256:88ab245ed2c96265441ed2818977be28c840cfa5204ba167425d6c26eb67b7e7",
|
||||
"sha256:933d30273861fe61f014ce2a7e3c364915f5efe9ed250ec1066ca6ea5942c0bd",
|
||||
"sha256:994a75b197662e0608b6a76935d7c345f7fd874eac0b7093d561033db61b0e8c",
|
||||
"sha256:9b31ebde27575b3b0708673ec14f0c305c4564d995b545148ab7ac0f4d9b847a",
|
||||
"sha256:9d810b4aacd5ef4e293aa4ea01f19fca53999e9edcfc4a8ef1146238b30bdc28",
|
||||
"sha256:ae1d8deb391ab39cc8f0d5844e588a115ae3717e607d91482023917f920f777f",
|
||||
"sha256:bc5c2b0da46c26c5f73f700834f871d0723e1e882641932468d56833bab09775",
|
||||
"sha256:cea7c4a3dfc2ca61f88a2b1ddd6b0bfbd116c9b1a361b3b66fd826034b833142",
|
||||
"sha256:d14282bf5b4de87f922db3c70858953fd081ef4f05dba6cca3dd705daffe1cc9",
|
||||
"sha256:d6b17cb86908e7f88be14007d6afe7d2ab11966e373044137f96a6a4d83eb21c",
|
||||
"sha256:da7381a883aee20b7d2ffda17d909b38134b6a625920e65239a1c681881df800",
|
||||
"sha256:db269f67ed17b07e80aaa8fba1f650c0d84aa0bdd9d5352e4ac38d5bf47ac568",
|
||||
"sha256:df25052b92bd514357a9b370d74f240db890ea79aaa428fb893520e10ee5bc18",
|
||||
"sha256:e17fdcb8971e77c439113642ca8861f9465e21fc693bd3916654ceef3ac26883",
|
||||
"sha256:f6fd3c88ea4b170d13527e93be1945e69facd917661d3725a63470eb683fbffe",
|
||||
"sha256:f7f994a53c0e6b44a2966fd6bfc53e37d34b7dca34e75b6be295de6db598255e"
|
||||
"sha256:0db6734cb5644c55d0262a813b764c6e2cda1e66e939a488b3d6298cdc7344c2",
|
||||
"sha256:0e4645b260cfe375a0603aa117f0a47680864cf37833129da870919e88b08d8f",
|
||||
"sha256:131f0c894c6572cb1bdcf97c92d999d3128c4ff1ca13061296057072f61afe13",
|
||||
"sha256:1e2caba78e7d1f5003e88817b7a1754d4e58f4a8f956dc423bf8e304c568ab09",
|
||||
"sha256:2de1477af7f48c633b8ecb88245aedd811dca88e88aee9e9d787b388abe74c44",
|
||||
"sha256:2f3b6c31b915159b96b68372212fa77f69230b0a32acab40cf539d2823954f5a",
|
||||
"sha256:3ef876615ff4b53e2033022195830ec4941a6e21068611f8d77de60203b90a98",
|
||||
"sha256:43e69c8c1cea0188b7094e22fb93ae1a1890aac748628b7e925024a206f75368",
|
||||
"sha256:53081c6fce0d49bb36d05f12dc87e008c9b0df58a163b792c5fc4ac638925f98",
|
||||
"sha256:5a934eff1a2882137be3384826f997db8441d43b61fda3094923e69fffe474be",
|
||||
"sha256:5e8522b49e0e640287308b68f71cc338446bbe1c226c8f81743baa91b0246e92",
|
||||
"sha256:61f2035dea56ff1a429077e481496f813378beb02b823d2e3e7eb05bc1a7a8ca",
|
||||
"sha256:63ea36c08792a7a8a08958bc806ecff6b491386feeaf14607c3d9d2d9325e67f",
|
||||
"sha256:6e85e315725807c127ad8ba3d628fdb861cf9ebfb0e10c39a97c01e257cdd71b",
|
||||
"sha256:7641f6ed2682de84d77c4894cf2e43700f3cf7a729361d7f9cac98febf3d8614",
|
||||
"sha256:7be04dbe3470fe8dd332fdb48c979887c381ef6c635eddf2dec43d2766111be4",
|
||||
"sha256:81d867c1be5abd49f7e547c108391f371a9d980ba7ec34666c50d683f782b754",
|
||||
"sha256:8544c6e62eacb77d5106e2055ef10f2407fc0dbd547e879f8745b2032eefd2bc",
|
||||
"sha256:8d3cbdb2f07fb0e4b897dc1df39166735e194fb946f28f26f4c9f9801c8b24f7",
|
||||
"sha256:8d6ef848e5afcd1bda3e9a843751f845c0ca888b61e669237680e913d84ec206",
|
||||
"sha256:8e2569dac4e3cb85365b91ab569d06a221e0e17e65ce59949d00c3958946282b",
|
||||
"sha256:90d320fde566b864adbc19abb40ecb80f4e25d6f084639969bb972d5cca16858",
|
||||
"sha256:91eb8f89fcce8f709f8a4d65d265bc48a80264ee14c7c9e955f3222f19b4b39c",
|
||||
"sha256:a08a791c75d6154d46914d1e23bd81d9455f2950ec1de81f2723848c593d2c8b",
|
||||
"sha256:a2e9f50a906d0b81292576a9fb458f8cace904c81a67088f4a2ca9ff2856f55d",
|
||||
"sha256:a5a2856e12cf5f54301ddf043bcbf0552561d61555e1bcf348b63f42b8e1eec2",
|
||||
"sha256:b2801f85c5c0293aa710f8aa5262c707a83c1c203962ae5a22b4d9095e71aa9d",
|
||||
"sha256:b72f4e4def50414164a1d899f2ce4e782a029fad0ed5585981d1611e8ae29a74",
|
||||
"sha256:bdaf89dd82f4a0e1b8b5ffc9cdc0c9551be6175f7eee5af6a838e92ba2e57100",
|
||||
"sha256:c5e333b81fe10d14efebd4e9429b7bb865ed9463ca8bef07a7136dfa1fd4a37b",
|
||||
"sha256:ce1fc3f64fd42d5f763d6b83651471f32920338a1ba107a3186211474861af57",
|
||||
"sha256:d0c96592f54edd571e00ba6b1ed5df8263328ca1da9e78088c0ebc93c2e6562c",
|
||||
"sha256:dc97238fa44be86971270943a0c21c19ce18b8d1596919048e57912e8abc02cc",
|
||||
"sha256:e19546924f0cf2ec930d1faf318b7365e5827276410a513340f31a2b423e96a4",
|
||||
"sha256:f2938edc512dd1fa48653e14c1655ab46144d4450f0e6b33da7acd8ba77fbfd7",
|
||||
"sha256:f387b496a4c9474d8580195bb2660264a3f295a04d3a9d00f4fa15e9e597427e",
|
||||
"sha256:f409f35a0330ab0cb18ece736b86d8b8233c64f4461fcb10993f67afc0ac7e5a",
|
||||
"sha256:f662cf69484c59f8a3435902c40dfc34d86050bdb15e23d437074ce9f153306b",
|
||||
"sha256:fbcc51fdbc89fafe4f4fe66f59372a8be88ded04de34ef438ab04f980beb12d4",
|
||||
"sha256:fc1dae11bd5167f9eb53b3ccad24a79813004612141e76de21cf4c028dc30b34",
|
||||
"sha256:ff6496ad5e9dc8baeb93a151cc2f599d01e5f8928a2aaf0b09a06428fdbaf553"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.0.15"
|
||||
"version": "==2.0.16"
|
||||
},
|
||||
"starlette": {
|
||||
"hashes": [
|
||||
@ -808,41 +840,6 @@
|
||||
"index": "pypi",
|
||||
"version": "==0.22.0"
|
||||
},
|
||||
"uvloop": {
|
||||
"hashes": [
|
||||
"sha256:0949caf774b9fcefc7c5756bacbbbd3fc4c05a6b7eebc7c7ad6f825b23998d6d",
|
||||
"sha256:0ddf6baf9cf11a1a22c71487f39f15b2cf78eb5bde7e5b45fbb99e8a9d91b9e1",
|
||||
"sha256:1436c8673c1563422213ac6907789ecb2b070f5939b9cbff9ef7113f2b531595",
|
||||
"sha256:23609ca361a7fc587031429fa25ad2ed7242941adec948f9d10c045bfecab06b",
|
||||
"sha256:2a6149e1defac0faf505406259561bc14b034cdf1d4711a3ddcdfbaa8d825a05",
|
||||
"sha256:2deae0b0fb00a6af41fe60a675cec079615b01d68beb4cc7b722424406b126a8",
|
||||
"sha256:307958f9fc5c8bb01fad752d1345168c0abc5d62c1b72a4a8c6c06f042b45b20",
|
||||
"sha256:30babd84706115626ea78ea5dbc7dd8d0d01a2e9f9b306d24ca4ed5796c66ded",
|
||||
"sha256:3378eb62c63bf336ae2070599e49089005771cc651c8769aaad72d1bd9385a7c",
|
||||
"sha256:3d97672dc709fa4447ab83276f344a165075fd9f366a97b712bdd3fee05efae8",
|
||||
"sha256:3db8de10ed684995a7f34a001f15b374c230f7655ae840964d51496e2f8a8474",
|
||||
"sha256:3ebeeec6a6641d0adb2ea71dcfb76017602ee2bfd8213e3fcc18d8f699c5104f",
|
||||
"sha256:45cea33b208971e87a31c17622e4b440cac231766ec11e5d22c76fab3bf9df62",
|
||||
"sha256:6708f30db9117f115eadc4f125c2a10c1a50d711461699a0cbfaa45b9a78e376",
|
||||
"sha256:68532f4349fd3900b839f588972b3392ee56042e440dd5873dfbbcd2cc67617c",
|
||||
"sha256:6aafa5a78b9e62493539456f8b646f85abc7093dd997f4976bb105537cf2635e",
|
||||
"sha256:7d37dccc7ae63e61f7b96ee2e19c40f153ba6ce730d8ba4d3b4e9738c1dccc1b",
|
||||
"sha256:864e1197139d651a76c81757db5eb199db8866e13acb0dfe96e6fc5d1cf45fc4",
|
||||
"sha256:8887d675a64cfc59f4ecd34382e5b4f0ef4ae1da37ed665adba0c2badf0d6578",
|
||||
"sha256:8efcadc5a0003d3a6e887ccc1fb44dec25594f117a94e3127954c05cf144d811",
|
||||
"sha256:9b09e0f0ac29eee0451d71798878eae5a4e6a91aa275e114037b27f7db72702d",
|
||||
"sha256:a4aee22ece20958888eedbad20e4dbb03c37533e010fb824161b4f05e641f738",
|
||||
"sha256:a5abddb3558d3f0a78949c750644a67be31e47936042d4f6c888dd6f3c95f4aa",
|
||||
"sha256:c092a2c1e736086d59ac8e41f9c98f26bbf9b9222a76f21af9dfe949b99b2eb9",
|
||||
"sha256:c686a47d57ca910a2572fddfe9912819880b8765e2f01dc0dd12a9bf8573e539",
|
||||
"sha256:cbbe908fda687e39afd6ea2a2f14c2c3e43f2ca88e3a11964b297822358d0e6c",
|
||||
"sha256:ce9f61938d7155f79d3cb2ffa663147d4a76d16e08f65e2c66b77bd41b356718",
|
||||
"sha256:dbbaf9da2ee98ee2531e0c780455f2841e4675ff580ecf93fe5c48fe733b5667",
|
||||
"sha256:f1e507c9ee39c61bfddd79714e4f85900656db1aec4d40c6de55648e85c2799c",
|
||||
"sha256:ff3d00b70ce95adce264462c930fbaecb29718ba6563db354608f37e49e09024"
|
||||
],
|
||||
"version": "==0.17.0"
|
||||
},
|
||||
"watchfiles": {
|
||||
"hashes": [
|
||||
"sha256:0089c6dc24d436b373c3c57657bf4f9a453b13767150d17284fc6162b2791911",
|
||||
|
||||
@ -69,16 +69,20 @@ def login(
|
||||
try:
|
||||
jwt_token = login_service.login(request.username, request.password)
|
||||
except NotAuthorizeException as e:
|
||||
logger.exception(e)
|
||||
logger.info(f'ログイン失敗:{e}')
|
||||
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail=constants.LOGOUT_REASON_LOGIN_ERROR)
|
||||
except JWTTokenVerifyException as e:
|
||||
logger.exception(e)
|
||||
logger.info(f'ログイン失敗:{e}')
|
||||
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail=constants.LOGOUT_REASON_SESSION_EXPIRED)
|
||||
|
||||
verified_token = jwt_token.verify_token()
|
||||
# 普通の認証だと、`cognito:username`に入る。
|
||||
user_id = verified_token.user_id
|
||||
user_record = login_service.logged_in_user(user_id)
|
||||
# ユーザーがマスタに存在しない場合、ログアウトにリダイレクトする
|
||||
if user_record is None:
|
||||
logger.info(f'存在しないユーザー: {user_id}, ユーザーID: {user_id}')
|
||||
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail=constants.LOGOUT_REASON_LOGIN_ERROR)
|
||||
# ユーザーが有効ではない場合、ログアウトにリダイレクトする
|
||||
if not user_record.is_enable_user():
|
||||
logger.info(f'無効なユーザー: {user_id}, 有効フラグ: {user_record.enabled_flg}')
|
||||
@ -126,12 +130,17 @@ def sso_authorize(
|
||||
# トークン検証
|
||||
verified_token = jwt_token.verify_token()
|
||||
except JWTTokenVerifyException as e:
|
||||
logger.exception(e)
|
||||
logger.exception(f'SSOログイン失敗:{e}')
|
||||
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail=constants.LOGOUT_REASON_SESSION_EXPIRED)
|
||||
|
||||
# トークンからユーザーIDを取得
|
||||
user_id = verified_token.user_id
|
||||
user_record = login_service.logged_in_user(user_id)
|
||||
|
||||
# ユーザーがマスタに存在しない場合、ログアウトにリダイレクトする
|
||||
if user_record is None:
|
||||
logger.info(f'存在しないユーザー: {user_id}, ユーザーID: {user_id}')
|
||||
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail=constants.LOGOUT_REASON_LOGIN_ERROR)
|
||||
# ユーザーが有効ではない場合、ログアウトにリダイレクトする
|
||||
if not user_record.is_enable_user():
|
||||
logger.info(f'無効なユーザー: {user_id}, 有効フラグ: {user_record.enabled_flg}')
|
||||
|
||||
185
ecs/jskult-webapp/src/controller/master_mainte.py
Normal file
185
ecs/jskult-webapp/src/controller/master_mainte.py
Normal file
@ -0,0 +1,185 @@
|
||||
from fastapi import APIRouter, Depends, HTTPException, Request
|
||||
from fastapi.responses import HTMLResponse
|
||||
from starlette import status
|
||||
|
||||
from src.depends.services import get_service
|
||||
from src.model.internal.session import UserSession
|
||||
from src.model.view.inst_emp_csv_download_view_model import \
|
||||
InstEmpCsvDownloadViewModel
|
||||
from src.model.view.inst_emp_csv_upload_view_model import \
|
||||
InstEmpCsvUploadViewModel
|
||||
from src.model.view.master_mainte_menu_view_model import \
|
||||
MasterMainteMenuViewModel
|
||||
from src.model.view.table_override_view_model import TableOverrideViewModel
|
||||
from src.router.session_router import AuthenticatedRoute
|
||||
from src.services.batch_status_service import BatchStatusService
|
||||
from src.services.session_service import set_session
|
||||
from src.system_var import constants
|
||||
from src.templates import templates
|
||||
|
||||
router = APIRouter()
|
||||
router.route_class = AuthenticatedRoute
|
||||
|
||||
#########################
|
||||
# Views #
|
||||
#########################
|
||||
|
||||
|
||||
@router.get('/masterMainteMenu', response_class=HTMLResponse)
|
||||
def menu_view(
|
||||
request: Request,
|
||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||
):
|
||||
session: UserSession = request.session
|
||||
|
||||
# マスタメンテメニューへのアクセス権がない場合、ログアウトさせる
|
||||
if session.master_mainte_flg != '1':
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
|
||||
|
||||
# バッチ処理中の場合、ログアウトさせる
|
||||
if batch_status_service.is_batch_processing():
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail=constants.LOGOUT_REASON_BATCH_PROCESSING_FOR_MAINTE)
|
||||
# dump処理中の場合、ログアウトさせる
|
||||
if batch_status_service.is_dump_processing():
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BACKUP_PROCESSING)
|
||||
|
||||
# 画面表示用のモデル
|
||||
menu = MasterMainteMenuViewModel()
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'masterMainteMenu.html',
|
||||
{
|
||||
'request': request,
|
||||
'menu': menu
|
||||
},
|
||||
headers={'session_key': session.session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
|
||||
@router.get('/instEmpCsvUL', response_class=HTMLResponse)
|
||||
def inst_emp_csv_upload_view(
|
||||
request: Request,
|
||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||
):
|
||||
session: UserSession = request.session
|
||||
|
||||
# マスタメンテメニューへのアクセス権がない場合、ログアウトさせる
|
||||
if session.master_mainte_flg != '1':
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
|
||||
|
||||
# バッチ処理中の場合、ログアウトさせる
|
||||
if batch_status_service.is_batch_processing():
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail=constants.LOGOUT_REASON_BATCH_PROCESSING_FOR_MAINTE)
|
||||
# dump処理中の場合、ログアウトさせる
|
||||
if batch_status_service.is_dump_processing():
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BACKUP_PROCESSING)
|
||||
|
||||
# 画面表示用のモデル
|
||||
view_model = InstEmpCsvUploadViewModel()
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'instEmpCsvUL.html',
|
||||
{
|
||||
'request': request,
|
||||
'view': view_model
|
||||
},
|
||||
headers={'session_key': session.session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
|
||||
@router.get('/instEmpCsvDL', response_class=HTMLResponse)
|
||||
def inst_emp_csv_download_view(
|
||||
request: Request,
|
||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||
):
|
||||
session: UserSession = request.session
|
||||
|
||||
# マスタメンテメニューへのアクセス権がない場合、ログアウトさせる
|
||||
if session.master_mainte_flg != '1':
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
|
||||
|
||||
# バッチ処理中の場合、ログアウトさせる
|
||||
if batch_status_service.is_batch_processing():
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail=constants.LOGOUT_REASON_BATCH_PROCESSING_FOR_MAINTE)
|
||||
# dump処理中の場合、ログアウトさせる
|
||||
if batch_status_service.is_dump_processing():
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BACKUP_PROCESSING)
|
||||
|
||||
# 画面表示用のモデル
|
||||
view_model = InstEmpCsvDownloadViewModel()
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'instEmpCsvDL.html',
|
||||
{
|
||||
'request': request,
|
||||
'view': view_model
|
||||
},
|
||||
headers={'session_key': session.session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
|
||||
@router.get('/tableOverride', response_class=HTMLResponse)
|
||||
def table_override_view(
|
||||
request: Request,
|
||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||
):
|
||||
session: UserSession = request.session
|
||||
|
||||
# マスタメンテメニューへのアクセス権がない場合、ログアウトさせる
|
||||
if session.master_mainte_flg != '1':
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN)
|
||||
|
||||
# バッチ処理中の場合、ログアウトさせる
|
||||
if batch_status_service.is_batch_processing():
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail=constants.LOGOUT_REASON_BATCH_PROCESSING_FOR_MAINTE)
|
||||
# dump処理中の場合、ログアウトさせる
|
||||
if batch_status_service.is_dump_processing():
|
||||
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=constants.LOGOUT_REASON_BACKUP_PROCESSING)
|
||||
|
||||
# 画面表示用のモデル
|
||||
view_model = TableOverrideViewModel()
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'tableOverride.html',
|
||||
{
|
||||
'request': request,
|
||||
'view': view_model
|
||||
},
|
||||
headers={'session_key': session.session_key}
|
||||
)
|
||||
return templates_response
|
||||
@ -32,6 +32,7 @@ def menu_view(
|
||||
hdke_tbl_record = batch_status_service.hdke_table_record
|
||||
|
||||
batch_status = hdke_tbl_record.bch_actf
|
||||
dump_status = hdke_tbl_record.dump_sts_kbn
|
||||
user = UserViewModel(
|
||||
doc_flg=session.doc_flg,
|
||||
inst_flg=session.inst_flg,
|
||||
@ -40,6 +41,7 @@ def menu_view(
|
||||
)
|
||||
menu = MenuViewModel(
|
||||
batch_status=batch_status,
|
||||
dump_status=dump_status,
|
||||
user_model=user
|
||||
)
|
||||
# セッション書き換え
|
||||
|
||||
347
ecs/jskult-webapp/src/controller/ultmarc.py
Normal file
347
ecs/jskult-webapp/src/controller/ultmarc.py
Normal file
@ -0,0 +1,347 @@
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import APIRouter, Depends, Request
|
||||
|
||||
from src.depends.services import get_service
|
||||
from src.model.internal.session import UserSession
|
||||
from src.model.request.ultmarc_doctor import (UltmarcDoctorInfoModel,
|
||||
UltmarcDoctorSearchModel)
|
||||
from src.model.request.ultmarc_inst import (UltmarcInstInfoModel,
|
||||
UltmarcInstSearchModel)
|
||||
from src.router.session_router import AuthenticatedRoute
|
||||
from src.services.batch_status_service import BatchStatusService
|
||||
from src.services.session_service import set_session
|
||||
from src.services.ultmarc_view_service import UltmarcViewService
|
||||
from src.templates import templates
|
||||
|
||||
router = APIRouter()
|
||||
router.route_class = AuthenticatedRoute
|
||||
|
||||
#########################
|
||||
# Views #
|
||||
#########################
|
||||
|
||||
#########################
|
||||
# アルトマーク施設検索 #
|
||||
#########################
|
||||
|
||||
|
||||
@router.get('/instSearch')
|
||||
def ultmarc_inst_view(
|
||||
request: Request,
|
||||
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()
|
||||
|
||||
# 検索項目の取得(都道府県・施設区分)
|
||||
ultmarc = ultmarc_service.prepare_ultmarc_inst_search_view()
|
||||
ultmarc.is_batch_processing = is_batch_processing
|
||||
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
session_key = set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'instSearch.html', {
|
||||
'request': request,
|
||||
'ultmarc': ultmarc,
|
||||
},
|
||||
headers={'session_key': session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
|
||||
@router.post('/instSearch')
|
||||
def search_inst(
|
||||
request: Request,
|
||||
ultmarc_inst_form: Optional[UltmarcInstSearchModel] = Depends(UltmarcInstSearchModel.as_form),
|
||||
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||
):
|
||||
session: UserSession = request.session
|
||||
|
||||
# バッチ処理中ステータスを取得
|
||||
is_batch_processing = batch_status_service.is_batch_processing()
|
||||
|
||||
# 施設データを検索
|
||||
ultmarc_inst_data = ultmarc_service.search_inst_data(ultmarc_inst_form)
|
||||
|
||||
# 検索項目の取得(都道府県・施設区分)
|
||||
ultmarc = ultmarc_service.prepare_ultmarc_inst_search_view()
|
||||
ultmarc.is_batch_processing = is_batch_processing
|
||||
ultmarc.inst_data = ultmarc_inst_data
|
||||
# 画面表示用にエスケープを解除して返す
|
||||
ultmarc.form_data = ultmarc_inst_form.unescape()
|
||||
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
session_key = set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'instSearch.html', {
|
||||
'request': request,
|
||||
'ultmarc': ultmarc,
|
||||
},
|
||||
headers={'session_key': session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
#########################
|
||||
# アルトマーク施設詳細 #
|
||||
#########################
|
||||
|
||||
|
||||
@router.get('/instInfo')
|
||||
def ultmarc_inst_info_view(
|
||||
request: Request,
|
||||
id: str,
|
||||
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()
|
||||
|
||||
# 施設情報の取得
|
||||
ultmarc = ultmarc_service.prepare_ultmarc_inst_info_view(id)
|
||||
# バッチ起動判定
|
||||
ultmarc.is_batch_processing = is_batch_processing
|
||||
# inst_id
|
||||
ultmarc.inst_id = id
|
||||
# ページ総数(件数)
|
||||
ultmarc.post_cnt = 1
|
||||
# ページ数(表示するページNo)
|
||||
ultmarc.page_num = 0
|
||||
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
session_key = set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'instInfo.html', {
|
||||
'request': request,
|
||||
'ultmarc': ultmarc,
|
||||
},
|
||||
headers={'session_key': session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
|
||||
@router.post('/instInfo')
|
||||
def ultmarc_inst_info_search(
|
||||
request: Request,
|
||||
ultmarc_inst_form: Optional[UltmarcInstInfoModel] = Depends(UltmarcInstInfoModel.as_form),
|
||||
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||
):
|
||||
session: UserSession = request.session
|
||||
# バッチ処理中ステータスを取得
|
||||
is_batch_processing = batch_status_service.is_batch_processing()
|
||||
|
||||
inst_id = ultmarc_inst_form.inst_id.split(',')
|
||||
|
||||
# 施設情報の取得
|
||||
ultmarc = ultmarc_service.prepare_ultmarc_inst_info_view(inst_id[ultmarc_inst_form.page_num])
|
||||
|
||||
# バッチ起動判定の取得
|
||||
ultmarc.is_batch_processing = is_batch_processing
|
||||
# inst_id
|
||||
ultmarc.inst_id = ultmarc_inst_form.inst_id
|
||||
# ページ総数(件数)
|
||||
ultmarc.post_cnt = len(inst_id)
|
||||
# ページ数(表示するページNo)
|
||||
ultmarc.page_num = ultmarc_inst_form.page_num
|
||||
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
session_key = set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'instInfo.html', {
|
||||
'request': request,
|
||||
'ultmarc': ultmarc,
|
||||
},
|
||||
headers={'session_key': session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
#########################
|
||||
# アルトマーク医師検索 #
|
||||
#########################
|
||||
|
||||
|
||||
@router.get('/docSearch')
|
||||
def ultmarc_doctor_view(
|
||||
request: Request,
|
||||
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()
|
||||
|
||||
# 検索項目の取得(都道府県)
|
||||
ultmarc = ultmarc_service.prepare_ultmarc_doctor_search_view()
|
||||
ultmarc.is_batch_processing = is_batch_processing
|
||||
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
session_key = set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'docSearch.html', {
|
||||
'request': request,
|
||||
'ultmarc': ultmarc,
|
||||
},
|
||||
headers={'session_key': session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
|
||||
@router.post('/docSearch')
|
||||
def search_doc(
|
||||
request: Request,
|
||||
ultmarc_doctor_form: Optional[UltmarcDoctorSearchModel] = Depends(UltmarcDoctorSearchModel.as_form),
|
||||
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||
):
|
||||
session: UserSession = request.session
|
||||
|
||||
# バッチ処理中ステータスを取得
|
||||
is_batch_processing = batch_status_service.is_batch_processing()
|
||||
|
||||
# 医師データを検索
|
||||
ultmarc_doctor_data = ultmarc_service.search_doctor_data(ultmarc_doctor_form)
|
||||
|
||||
# 検索項目などのデータを取得
|
||||
ultmarc = ultmarc_service.prepare_ultmarc_doctor_search_view()
|
||||
ultmarc.is_batch_processing = is_batch_processing
|
||||
ultmarc.doctor_data = ultmarc_doctor_data
|
||||
# 画面表示用にエスケープを解除して返す
|
||||
ultmarc.form_data = ultmarc_doctor_form.unescape()
|
||||
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
session_key = set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'docSearch.html', {
|
||||
'request': request,
|
||||
'ultmarc': ultmarc,
|
||||
},
|
||||
headers={'session_key': session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
#########################
|
||||
# アルトマーク医師詳細 #
|
||||
#########################
|
||||
|
||||
|
||||
@router.get('/docInfo')
|
||||
def ultmarc_doctor_info_view(
|
||||
request: Request,
|
||||
id: str,
|
||||
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()
|
||||
|
||||
# 医師情報の取得
|
||||
ultmarc = ultmarc_service.prepare_ultmarc_doctor_info_view(id)
|
||||
# バッチ起動判定の取得
|
||||
ultmarc.is_batch_processing = is_batch_processing
|
||||
# doc_id
|
||||
ultmarc.doc_id = id
|
||||
# ページ総数(件数)
|
||||
ultmarc.post_cnt = 1
|
||||
# ページ数(表示するページNo)
|
||||
ultmarc.page_num = 0
|
||||
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
session_key = set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'docInfo.html', {
|
||||
'request': request,
|
||||
'ultmarc': ultmarc,
|
||||
},
|
||||
headers={'session_key': session_key}
|
||||
)
|
||||
return templates_response
|
||||
|
||||
|
||||
@router.post('/docInfo')
|
||||
def ultmarc_doctor_info_search(
|
||||
request: Request,
|
||||
ultmarc_doctor_form: Optional[UltmarcDoctorInfoModel] = Depends(UltmarcDoctorInfoModel.as_form),
|
||||
ultmarc_service: UltmarcViewService = Depends(get_service(UltmarcViewService)),
|
||||
batch_status_service: BatchStatusService = Depends(get_service(BatchStatusService))
|
||||
):
|
||||
session: UserSession = request.session
|
||||
# バッチ処理中ステータスを取得
|
||||
is_batch_processing = batch_status_service.is_batch_processing()
|
||||
|
||||
doc_id = ultmarc_doctor_form.doc_id.split(',')
|
||||
|
||||
# 医師情報の取得
|
||||
ultmarc = ultmarc_service.prepare_ultmarc_doctor_info_view(doc_id[ultmarc_doctor_form.page_num])
|
||||
# バッチ起動判定の取得
|
||||
ultmarc.is_batch_processing = is_batch_processing
|
||||
# doc_id
|
||||
ultmarc.doc_id = ultmarc_doctor_form.doc_id
|
||||
# ページ総数(件数)
|
||||
ultmarc.post_cnt = len(doc_id)
|
||||
# ページ数(表示するページNo)
|
||||
ultmarc.page_num = ultmarc_doctor_form.page_num
|
||||
|
||||
# セッション書き換え
|
||||
session.update(
|
||||
actions=[
|
||||
UserSession.last_access_time.set(UserSession.new_last_access_time()),
|
||||
UserSession.record_expiration_time.set(UserSession.new_record_expiration_time()),
|
||||
]
|
||||
)
|
||||
session_key = set_session(session)
|
||||
templates_response = templates.TemplateResponse(
|
||||
'docInfo.html', {
|
||||
'request': request,
|
||||
'ultmarc': ultmarc,
|
||||
},
|
||||
headers={'session_key': session_key}
|
||||
)
|
||||
return templates_response
|
||||
@ -6,7 +6,7 @@ from starlette import status
|
||||
|
||||
import src.static as static
|
||||
from src.controller import (bio, bio_download, healthcheck, login, logout,
|
||||
menu, root)
|
||||
master_mainte, menu, root, ultmarc)
|
||||
from src.controller.sample_send_file import router as sample_router
|
||||
from src.core import tasks
|
||||
from src.error.exception_handler import http_exception_handler
|
||||
@ -26,9 +26,13 @@ app.include_router(logout.router, prefix='/logout')
|
||||
app.include_router(menu.router, prefix='/menu')
|
||||
# 生物由来関連のルーター
|
||||
app.include_router(bio.router, prefix='/bio')
|
||||
# アルトマークデータ照会のルーター
|
||||
app.include_router(ultmarc.router, prefix='/ultmarc')
|
||||
# 生物由来のダウンロード用APIルーター。
|
||||
# クライアントから非同期呼出しされるため、共通ルーターとは異なる扱いとする。
|
||||
app.include_router(bio_download.router, prefix='/bio')
|
||||
# マスタメンテ
|
||||
app.include_router(master_mainte.router, prefix='/masterMainte')
|
||||
# ヘルスチェック用のルーター
|
||||
app.include_router(healthcheck.router, prefix='/healthcheck')
|
||||
|
||||
|
||||
@ -5,3 +5,4 @@ from src.model.db.base_db_model import BaseDBModel
|
||||
|
||||
class HdkeTblModel(BaseDBModel):
|
||||
bch_actf: Optional[str]
|
||||
dump_sts_kbn: Optional[str]
|
||||
|
||||
8
ecs/jskult-webapp/src/model/db/inst_div_master.py
Normal file
8
ecs/jskult-webapp/src/model/db/inst_div_master.py
Normal file
@ -0,0 +1,8 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
|
||||
|
||||
class InstDivMasterModel(BaseDBModel):
|
||||
inst_div_cd: Optional[str]
|
||||
inst_div_name: Optional[str]
|
||||
8
ecs/jskult-webapp/src/model/db/prefc_master.py
Normal file
8
ecs/jskult-webapp/src/model/db/prefc_master.py
Normal file
@ -0,0 +1,8 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
|
||||
|
||||
class PrefcMasterModel(BaseDBModel):
|
||||
prefc_cd: Optional[str]
|
||||
prefc_name: Optional[str]
|
||||
19
ecs/jskult-webapp/src/model/db/ultmarc_doctor.py
Normal file
19
ecs/jskult-webapp/src/model/db/ultmarc_doctor.py
Normal file
@ -0,0 +1,19 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcDoctorDBModel(BaseDBModel):
|
||||
dcf_pcf_dr_cd: Optional[str]
|
||||
dr_name: Optional[str]
|
||||
form_inst_name_kanji: Optional[str]
|
||||
dcf_dsf_inst_cd: Optional[str]
|
||||
blng_sec_name: Optional[str]
|
||||
trt_course_name: Optional[str]
|
||||
form_post_name: Optional[str]
|
||||
alma: Optional[str]
|
||||
grad_y: Optional[str]
|
||||
prefc_name: Optional[str]
|
||||
blng_sec_cd: Optional[str]
|
||||
18
ecs/jskult-webapp/src/model/db/ultmarc_doctor_info.py
Normal file
18
ecs/jskult-webapp/src/model/db/ultmarc_doctor_info.py
Normal file
@ -0,0 +1,18 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcDoctorInfoDBModel(BaseDBModel):
|
||||
dcf_pcf_dr_cd: Optional[str]
|
||||
dr_name: Optional[str]
|
||||
dr_name_kana: Optional[str]
|
||||
sex: Optional[str]
|
||||
birthday: Optional[str]
|
||||
alma: Optional[str]
|
||||
hometown: Optional[str]
|
||||
grad_y: Optional[str]
|
||||
drday_y: Optional[str]
|
||||
estab_y: Optional[str]
|
||||
13
ecs/jskult-webapp/src/model/db/ultmarc_doctor_wrkplace.py
Normal file
13
ecs/jskult-webapp/src/model/db/ultmarc_doctor_wrkplace.py
Normal file
@ -0,0 +1,13 @@
|
||||
from datetime import date
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
|
||||
|
||||
class UltmarcDoctorWrkplaceDBModel(BaseDBModel):
|
||||
dcf_dsf_inst_cd: Optional[str]
|
||||
inst_name_kanji: Optional[str]
|
||||
blng_sec_name: Optional[str]
|
||||
univ_post_name: Optional[str]
|
||||
post_name: Optional[str]
|
||||
aply_start_ymd: Optional[date]
|
||||
@ -0,0 +1,9 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcDoctorWrkplaceCountDBModel(BaseDBModel):
|
||||
count: Optional[int]
|
||||
@ -0,0 +1,14 @@
|
||||
from datetime import date
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
|
||||
|
||||
class UltmarcDoctorWrkplaceHisDBModel(BaseDBModel):
|
||||
dcf_dsf_inst_cd: Optional[str]
|
||||
inst_name_kanji: Optional[str]
|
||||
blng_sec_name: Optional[str]
|
||||
univ_post_name: Optional[str]
|
||||
post_name: Optional[str]
|
||||
aply_start_ymd: Optional[date]
|
||||
aply_end_ymd: Optional[date]
|
||||
18
ecs/jskult-webapp/src/model/db/ultmarc_inst.py
Normal file
18
ecs/jskult-webapp/src/model/db/ultmarc_inst.py
Normal file
@ -0,0 +1,18 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcInstDBModel(BaseDBModel):
|
||||
dcf_dsf_inst_cd: Optional[str]
|
||||
abolish_ymd: Optional[str]
|
||||
delete_sche_reason_cd: Optional[str]
|
||||
form_inst_name_kanji: Optional[str]
|
||||
inst_addr: Optional[str]
|
||||
postal_number: Optional[str]
|
||||
inst_phone_number: Optional[str]
|
||||
inst_div_name: Optional[str]
|
||||
hp_assrt_name: Optional[str]
|
||||
prefc_name: Optional[str]
|
||||
56
ecs/jskult-webapp/src/model/db/ultmarc_inst_info.py
Normal file
56
ecs/jskult-webapp/src/model/db/ultmarc_inst_info.py
Normal file
@ -0,0 +1,56 @@
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
|
||||
|
||||
class UltmarcInstInfoDBModel(BaseDBModel):
|
||||
dcf_dsf_inst_cd: Optional[str]
|
||||
unconf_flg: Optional[str]
|
||||
dup_opp_cd: Optional[str]
|
||||
close_start_ym: Optional[str]
|
||||
close_flg: Optional[str]
|
||||
delete_sche_reason_cd: Optional[str]
|
||||
abolish_ymd: Optional[str]
|
||||
estab_sche_ym: Optional[str]
|
||||
estab_sche_flg: Optional[str]
|
||||
form_inst_name_kana: Optional[str]
|
||||
form_inst_name_kanji: Optional[str]
|
||||
inst_name_kana: Optional[str]
|
||||
inst_name_kanji: Optional[str]
|
||||
manage_cd: Optional[str]
|
||||
postal_number: Optional[str]
|
||||
inst_phone_number: Optional[str]
|
||||
addr_unknown_reason_cd: Optional[str]
|
||||
phone_number_non_flg: Optional[str]
|
||||
inst_addr_kana: Optional[str]
|
||||
inst_addr: Optional[str]
|
||||
re_exam_cd: Optional[str]
|
||||
rltd_univ_prnt_cd: Optional[str]
|
||||
insp_item_micrb: Optional[str]
|
||||
insp_item_serum: Optional[str]
|
||||
insp_item_blood: Optional[str]
|
||||
insp_item_patho: Optional[str]
|
||||
insp_item_paras: Optional[str]
|
||||
insp_item_biochem: Optional[str]
|
||||
insp_item_ri: Optional[str]
|
||||
prmit_bed_num_gen: Optional[str]
|
||||
prmit_bed_num_rcup: Optional[str]
|
||||
prmit_bed_num_mental: Optional[str]
|
||||
prmit_bed_num_infection: Optional[str]
|
||||
prmit_bed_num_tuber: Optional[str]
|
||||
prmit_bed_num_other: Optional[str]
|
||||
prmit_bed_num_sum: Optional[str]
|
||||
ward_abolish_flg: Optional[str]
|
||||
bed_num: Optional[str]
|
||||
prmit_bed_maint_ymd: Optional[str]
|
||||
inst_repre_cd: Optional[str]
|
||||
inst_repre_kana: Optional[str]
|
||||
inst_repre: Optional[str]
|
||||
sys_update_date: Optional[datetime]
|
||||
delete_sche_reason: Optional[str]
|
||||
inst_div_name: Optional[str]
|
||||
manage_name: Optional[str]
|
||||
hp_assrt_name: Optional[str]
|
||||
parent_name: Optional[str]
|
||||
dcf_prnt_inst_cd: Optional[str]
|
||||
@ -0,0 +1,9 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcInstTrtCourseDBModel(BaseDBModel):
|
||||
trt_course_name_abb: Optional[str]
|
||||
10
ecs/jskult-webapp/src/model/db/ultmarc_sosiety.py
Normal file
10
ecs/jskult-webapp/src/model/db/ultmarc_sosiety.py
Normal file
@ -0,0 +1,10 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcSosietyDBModel(BaseDBModel):
|
||||
sosiety_cd: Optional[str]
|
||||
sosiety_name: Optional[str]
|
||||
10
ecs/jskult-webapp/src/model/db/ultmarc_specialist_license.py
Normal file
10
ecs/jskult-webapp/src/model/db/ultmarc_specialist_license.py
Normal file
@ -0,0 +1,10 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcSpecialistLicenseDBModel(BaseDBModel):
|
||||
specialist_cd: Optional[str]
|
||||
specialist_license_name: Optional[str]
|
||||
9
ecs/jskult-webapp/src/model/db/ultmarc_trt_course.py
Normal file
9
ecs/jskult-webapp/src/model/db/ultmarc_trt_course.py
Normal file
@ -0,0 +1,9 @@
|
||||
from typing import Optional
|
||||
|
||||
from src.model.db.base_db_model import BaseDBModel
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class UltmarcTrtCourseDBModel(BaseDBModel):
|
||||
trt_course_name: Optional[str]
|
||||
20
ecs/jskult-webapp/src/model/request/request_base_model.py
Normal file
20
ecs/jskult-webapp/src/model/request/request_base_model.py
Normal file
@ -0,0 +1,20 @@
|
||||
import html
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from src.util.sanitize import sanitize
|
||||
|
||||
|
||||
@sanitize
|
||||
class RequestBaseModel(BaseModel):
|
||||
"""
|
||||
Webのリクエストを受け取る共通モデルクラス
|
||||
保持するメンバはエスケープされる
|
||||
エスケープを解除するには、unescapeメソッドを使用する
|
||||
"""
|
||||
|
||||
def unescape(self):
|
||||
for k, v in self.dict().items():
|
||||
if v is not None and type(v) is str:
|
||||
setattr(self, k, html.unescape(v))
|
||||
return self
|
||||
69
ecs/jskult-webapp/src/model/request/ultmarc_doctor.py
Normal file
69
ecs/jskult-webapp/src/model/request/ultmarc_doctor.py
Normal file
@ -0,0 +1,69 @@
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import Form
|
||||
|
||||
from src.model.request.request_base_model import RequestBaseModel
|
||||
|
||||
|
||||
class UltmarcDoctorSearchModel(RequestBaseModel):
|
||||
dcf_pcf_dr_cd: Optional[str]
|
||||
dr_name: Optional[str]
|
||||
dr_name_kana: Optional[str]
|
||||
dcf_dsf_inst_cd: Optional[str]
|
||||
form_inst_name_kanji: Optional[str]
|
||||
form_inst_name_kana: Optional[str]
|
||||
prefc_cd: Optional[str]
|
||||
blng_sec_name: Optional[str]
|
||||
trt_course_name: Optional[str]
|
||||
alma: Optional[str]
|
||||
grad_y: Optional[str]
|
||||
pagination_page_number: Optional[int]
|
||||
|
||||
@classmethod
|
||||
def as_form(
|
||||
cls,
|
||||
ctrl_dcf_pcf_dr_cd: str = Form(None),
|
||||
ctrl_dr_name: str = Form(None),
|
||||
ctrl_dr_name_kana: str = Form(None),
|
||||
ctrl_dcf_dsf_inst_cd: str = Form(None),
|
||||
ctrl_form_inst_name_kanji: str = Form(None),
|
||||
ctrl_form_inst_name_kana: str = Form(None),
|
||||
ctrl_prefc_cd: str = Form(None),
|
||||
ctrl_blng_sec_name: str = Form(None),
|
||||
ctrl_trt_course_name: str = Form(None),
|
||||
ctrl_alma: str = Form(None),
|
||||
ctrl_grad_y: str = Form(None),
|
||||
pagination_page_number: str = Form(None)
|
||||
):
|
||||
|
||||
return cls(
|
||||
dcf_pcf_dr_cd=ctrl_dcf_pcf_dr_cd,
|
||||
dr_name=ctrl_dr_name,
|
||||
dr_name_kana=ctrl_dr_name_kana,
|
||||
dcf_dsf_inst_cd=ctrl_dcf_dsf_inst_cd,
|
||||
form_inst_name_kanji=ctrl_form_inst_name_kanji,
|
||||
form_inst_name_kana=ctrl_form_inst_name_kana,
|
||||
prefc_cd=ctrl_prefc_cd,
|
||||
blng_sec_name=ctrl_blng_sec_name,
|
||||
trt_course_name=ctrl_trt_course_name,
|
||||
alma=ctrl_alma,
|
||||
grad_y=ctrl_grad_y,
|
||||
pagination_page_number=pagination_page_number
|
||||
)
|
||||
|
||||
|
||||
class UltmarcDoctorInfoModel(RequestBaseModel):
|
||||
doc_id: Optional[str]
|
||||
page_num: Optional[int]
|
||||
|
||||
@classmethod
|
||||
def as_form(
|
||||
cls,
|
||||
doc_id: str = Form(None),
|
||||
page_num: str = Form(None)
|
||||
):
|
||||
|
||||
return cls(
|
||||
doc_id=doc_id,
|
||||
page_num=int(page_num)
|
||||
)
|
||||
70
ecs/jskult-webapp/src/model/request/ultmarc_inst.py
Normal file
70
ecs/jskult-webapp/src/model/request/ultmarc_inst.py
Normal file
@ -0,0 +1,70 @@
|
||||
import html
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import Form
|
||||
|
||||
from src.model.request.request_base_model import RequestBaseModel
|
||||
|
||||
|
||||
# @sanitize
|
||||
class UltmarcInstSearchModel(RequestBaseModel):
|
||||
dcf_dsf_inst_cd: Optional[str]
|
||||
inst_div_cd: Optional[str]
|
||||
form_inst_name_kanji: Optional[str]
|
||||
form_inst_name_kana: Optional[str]
|
||||
postal_number: Optional[str]
|
||||
inst_phone_number: Optional[str]
|
||||
prefc_cd: Optional[str]
|
||||
delFlg: Optional[str]
|
||||
inst_addr: Optional[str]
|
||||
pagination_page_number: Optional[int]
|
||||
|
||||
@classmethod
|
||||
def as_form(
|
||||
cls,
|
||||
ctrl_dcf_dsf_inst_cd: str = Form(None),
|
||||
ctrl_inst_div_cd: str = Form(None),
|
||||
ctrl_form_inst_name_kanji: str = Form(None),
|
||||
ctrl_form_inst_name_kana: str = Form(None),
|
||||
ctrl_postal_number: str = Form(None),
|
||||
ctrl_inst_phone_number: str = Form(None),
|
||||
ctrl_prefc_cd: str = Form(None),
|
||||
delFlg_ctrl: str = Form(None),
|
||||
ctrl_inst_addr: str = Form(None),
|
||||
pagination_page_number: str = Form(None)
|
||||
):
|
||||
return cls(
|
||||
dcf_dsf_inst_cd=ctrl_dcf_dsf_inst_cd,
|
||||
inst_div_cd=ctrl_inst_div_cd,
|
||||
form_inst_name_kanji=ctrl_form_inst_name_kanji,
|
||||
form_inst_name_kana=ctrl_form_inst_name_kana,
|
||||
postal_number=ctrl_postal_number,
|
||||
inst_phone_number=ctrl_inst_phone_number,
|
||||
prefc_cd=ctrl_prefc_cd,
|
||||
delFlg=delFlg_ctrl,
|
||||
inst_addr=ctrl_inst_addr,
|
||||
pagination_page_number=pagination_page_number
|
||||
)
|
||||
|
||||
def unescape(self):
|
||||
for k, v in self.dict().items():
|
||||
if v is not None and type(v) is str:
|
||||
setattr(self, k, html.unescape(v))
|
||||
return self
|
||||
|
||||
|
||||
class UltmarcInstInfoModel(RequestBaseModel):
|
||||
inst_id: Optional[str]
|
||||
page_num: Optional[int]
|
||||
|
||||
@classmethod
|
||||
def as_form(
|
||||
cls,
|
||||
inst_id: str = Form(None),
|
||||
page_num: str = Form(None)
|
||||
):
|
||||
|
||||
return cls(
|
||||
inst_id=inst_id,
|
||||
page_num=int(page_num)
|
||||
)
|
||||
@ -127,7 +127,7 @@ class BioViewModel(BaseModel):
|
||||
return len(self.bio_data) == 0
|
||||
|
||||
def is_data_overflow_max_length(self):
|
||||
return len(self.bio_data) >= environment.BIO_SEARCH_RESULT_MAX_COUNT
|
||||
return len(self.bio_data) > environment.BIO_SEARCH_RESULT_MAX_COUNT
|
||||
|
||||
def _format_date_string(self, date_string):
|
||||
if date_string is None:
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class InstEmpCsvDownloadViewModel(BaseModel):
|
||||
subtitle: str = '施設担当者データCSVダウンロード'
|
||||
@ -0,0 +1,5 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class InstEmpCsvUploadViewModel(BaseModel):
|
||||
subtitle: str = '施設担当者データCSVアップロード'
|
||||
@ -0,0 +1,5 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class MasterMainteMenuViewModel(BaseModel):
|
||||
subtitle: str = 'MeDaCA マスターメンテメニュー'
|
||||
@ -3,15 +3,20 @@ from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
from src.model.view.user_view_model import UserViewModel
|
||||
from src.system_var import constants
|
||||
|
||||
|
||||
class MenuViewModel(BaseModel):
|
||||
subtitle: str = 'MeDaCA 機能メニュー'
|
||||
batch_status: Optional[str]
|
||||
dump_status: Optional[str]
|
||||
user_model: UserViewModel
|
||||
|
||||
def is_batch_processing(self):
|
||||
return self.batch_status == '1'
|
||||
return self.batch_status == constants.BATCH_STATUS_PROCESSING
|
||||
|
||||
def is_backup_processing(self):
|
||||
return self.dump_status != constants.DUMP_STATUS_UNPROCESSED
|
||||
|
||||
def is_available_ult_doctor_menu(self):
|
||||
return self.user_model.has_ult_doctor_permission()
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class TableOverrideViewModel(BaseModel):
|
||||
subtitle: str = 'テーブル上書きコピー'
|
||||
@ -0,0 +1,92 @@
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from src.model.db.ultmarc_doctor_info import UltmarcDoctorInfoDBModel
|
||||
from src.model.db.ultmarc_doctor_wrkplace import UltmarcDoctorWrkplaceDBModel
|
||||
from src.model.db.ultmarc_doctor_wrkplace_his import \
|
||||
UltmarcDoctorWrkplaceHisDBModel
|
||||
from src.model.db.ultmarc_sosiety import UltmarcSosietyDBModel
|
||||
from src.model.db.ultmarc_specialist_license import \
|
||||
UltmarcSpecialistLicenseDBModel
|
||||
from src.model.db.ultmarc_trt_course import UltmarcTrtCourseDBModel
|
||||
from src.system_var import environment
|
||||
|
||||
|
||||
class UltmarcDoctorInfoViewModel(BaseModel):
|
||||
subtitle: str = '医師情報'
|
||||
is_batch_processing: Optional[bool]
|
||||
doctor_info_data: Optional[UltmarcDoctorInfoDBModel]
|
||||
trt_coursed_data: Optional[list[UltmarcTrtCourseDBModel]]
|
||||
sosiety_data: Optional[list[UltmarcSosietyDBModel]]
|
||||
specialist_license_data: Optional[list[UltmarcSpecialistLicenseDBModel]]
|
||||
doctor_wrkplace_data: Optional[list[UltmarcDoctorWrkplaceDBModel]]
|
||||
doctor_wrkplace_his_data: Optional[list[UltmarcDoctorWrkplaceHisDBModel]]
|
||||
doc_id: Optional[str]
|
||||
post_cnt: Optional[int]
|
||||
page_num: Optional[int]
|
||||
|
||||
# 現在のページ(表示用)
|
||||
def is_page_num_view(self):
|
||||
return self.page_num + 1
|
||||
|
||||
# 前ボタン
|
||||
def is_disabled_prev(self):
|
||||
return 'disabled' if self.page_num == 0 else ''
|
||||
|
||||
# 次ボタン
|
||||
def is_disabled_next(self):
|
||||
if self.page_num == self.post_cnt - 1:
|
||||
return 'disabled'
|
||||
return ''
|
||||
|
||||
# 生年月日
|
||||
def is_input_birthday_format(self):
|
||||
return self._format_date_string(self.doctor_info_data.birthday)
|
||||
|
||||
# 開始年月日
|
||||
def is_input_aply_start_ymd_format(self, date_string):
|
||||
if date_string:
|
||||
return self._format_date(date_string)
|
||||
else:
|
||||
return ''
|
||||
|
||||
def is_input_his_aply_start_ymd_format(self, date_string):
|
||||
if date_string:
|
||||
return self._format_date(date_string)
|
||||
else:
|
||||
return ''
|
||||
|
||||
# 終了年月日
|
||||
def is_input_his_aply_end_ymd_format(self, date_string):
|
||||
if date_string:
|
||||
return self._format_date(date_string)
|
||||
else:
|
||||
return ''
|
||||
|
||||
def is_input_trt_course_data_size(self):
|
||||
return len(self.trt_coursed_data)
|
||||
|
||||
def disabled_button(self):
|
||||
return 'disabled' if self.is_data_empty() or self.is_data_overflow_max_length() else ''
|
||||
|
||||
def is_form_submitted(self):
|
||||
return self.form_data is not None
|
||||
|
||||
def is_data_empty(self):
|
||||
return len(self.doctor_data) == 0
|
||||
|
||||
def is_data_overflow_max_length(self):
|
||||
return len(self.doctor_data) > environment.ULTMARC_SEARCH_RESULT_MAX_COUNT
|
||||
|
||||
def _format_date_string(self, date_string):
|
||||
if date_string is None:
|
||||
return ''
|
||||
date_str = datetime.strptime(date_string, '%Y%m%d')
|
||||
return date_str.strftime('%Y/%m/%d')
|
||||
|
||||
def _format_date(self, date_time):
|
||||
if date_time is None:
|
||||
return ''
|
||||
return date_time.strftime('%Y/%m/%d')
|
||||
116
ecs/jskult-webapp/src/model/view/ultmarc_doctor_view_model.py
Normal file
116
ecs/jskult-webapp/src/model/view/ultmarc_doctor_view_model.py
Normal file
@ -0,0 +1,116 @@
|
||||
import json
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from src.model.db.prefc_master import PrefcMasterModel
|
||||
from src.model.db.ultmarc_doctor import UltmarcDoctorDBModel
|
||||
from src.model.request.ultmarc_doctor import UltmarcDoctorSearchModel
|
||||
from src.system_var import environment
|
||||
|
||||
|
||||
class UltmarcDoctorViewModel(BaseModel):
|
||||
subtitle: str = '医師検索一覧'
|
||||
is_batch_processing: Optional[bool]
|
||||
prefc_models: list[PrefcMasterModel]
|
||||
doctor_data: Optional[list[UltmarcDoctorDBModel]] = []
|
||||
form_data: Optional[UltmarcDoctorSearchModel]
|
||||
|
||||
def ultmarc_data_json_str(self):
|
||||
def date_handler(obj):
|
||||
return obj.isoformat() if hasattr(obj, 'isoformat') else obj
|
||||
return json.dumps([model.dict() for model in self.doctor_data], ensure_ascii=False, default=date_handler)
|
||||
|
||||
# ページネーションのページ番号
|
||||
# 検索時は最初のページを表示する
|
||||
# 詳細画面からの遷移時は、元のページを表示する
|
||||
def init_pagination_page_number(self):
|
||||
if not self.is_form_submitted():
|
||||
return 1
|
||||
return self.form_data.pagination_page_number or 1
|
||||
|
||||
# 医師コード
|
||||
def is_input_dcf_pcf_dr_cd(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.dcf_pcf_dr_cd or ''
|
||||
|
||||
# 氏名(漢字)
|
||||
def is_input_dr_name(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.dr_name or ''
|
||||
|
||||
# 氏名(かな・カナ)
|
||||
def is_input_dr_name_kana(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.dr_name_kana or ''
|
||||
|
||||
# 勤務先コード
|
||||
def is_input_dcf_dsf_inst_cd(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.dcf_dsf_inst_cd or ''
|
||||
|
||||
# 勤務先名(漢字)
|
||||
def is_input_form_inst_name_kanji(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.form_inst_name_kanji or ''
|
||||
|
||||
# 勤務先名(かな・カナ)
|
||||
def is_input_form_inst_name_kana(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.form_inst_name_kana or ''
|
||||
|
||||
# 勤務先都道府県
|
||||
def is_selected_prefc_cd(self, selected_prefc_cd):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self._selected_value(self.form_data.prefc_cd, selected_prefc_cd)
|
||||
|
||||
def is_input_form_prefc_cd(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.prefc_cd or ''
|
||||
|
||||
# 所属部科(漢字)
|
||||
def is_input_blng_sec_name(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.blng_sec_name or ''
|
||||
|
||||
# 診療科目(漢字)
|
||||
def is_input_trt_course_name(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.trt_course_name or ''
|
||||
|
||||
# 出身大学(漢字)
|
||||
def is_input_alma(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.alma or ''
|
||||
|
||||
# 卒年
|
||||
def is_input_grad_y(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.grad_y or ''
|
||||
|
||||
def disabled_button(self):
|
||||
return 'disabled' if self.is_data_empty() or self.is_data_overflow_max_length() else ''
|
||||
|
||||
def is_form_submitted(self):
|
||||
return self.form_data is not None
|
||||
|
||||
def is_data_empty(self):
|
||||
return len(self.doctor_data) == 0
|
||||
|
||||
def is_data_overflow_max_length(self):
|
||||
return len(self.doctor_data) > environment.ULTMARC_SEARCH_RESULT_MAX_COUNT
|
||||
|
||||
def _selected_value(self, form_value: str, current_value: str):
|
||||
return 'selected' if form_value == current_value else ''
|
||||
@ -0,0 +1,91 @@
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from src.model.db.ultmarc_inst_info import UltmarcInstInfoDBModel
|
||||
from src.model.db.ultmarc_inst_trt_course import UltmarcInstTrtCourseDBModel
|
||||
from src.system_var import environment
|
||||
|
||||
|
||||
class UltmarcInstInfoViewModel(BaseModel):
|
||||
subtitle: str = '施設情報'
|
||||
is_batch_processing: Optional[bool]
|
||||
inst_info_data: Optional[UltmarcInstInfoDBModel]
|
||||
inst_trt_coursed_data: Optional[list[UltmarcInstTrtCourseDBModel]]
|
||||
doctor_wrkplace_count: Optional[int]
|
||||
inst_id: Optional[str]
|
||||
post_cnt: Optional[int]
|
||||
page_num: Optional[int]
|
||||
|
||||
# 未確認
|
||||
def is_checked_unconf_flg(self):
|
||||
return 'checked' if self.inst_info_data.unconf_flg == '1' else ''
|
||||
|
||||
# 休院店
|
||||
def is_checked_close_flg(self):
|
||||
return 'checked' if self.inst_info_data.close_flg == '1' else ''
|
||||
|
||||
# 開業
|
||||
def is_checked_estab_sche_flg(self):
|
||||
return 'checked' if self.inst_info_data.estab_sche_flg == '1' else ''
|
||||
|
||||
# 住所不明
|
||||
def is_checked_addr_unknown_reason_cd(self):
|
||||
return 'checked' if self.inst_info_data.addr_unknown_reason_cd else ''
|
||||
|
||||
# 開業
|
||||
def is_checked_phone_number_non_flg(self):
|
||||
return 'checked' if self.inst_info_data.phone_number_non_flg == '1' else ''
|
||||
|
||||
# 再審査区分
|
||||
def is_checked_re_exam_cd(self):
|
||||
return 'checked' if self.inst_info_data.re_exam_cd else ''
|
||||
|
||||
# 病棟閉鎖
|
||||
def is_checked_ward_abolish_flg(self):
|
||||
return 'checked' if self.inst_info_data.ward_abolish_flg == '1' else ''
|
||||
|
||||
# 一部病棟閉鎖
|
||||
def is_checked_ward_abolish_flg_part(self):
|
||||
return 'checked' if self.inst_info_data.ward_abolish_flg == '2' else ''
|
||||
|
||||
# 修正年月日
|
||||
def is_input_sys_update_date(self):
|
||||
sys_update_date = str(self.inst_info_data.sys_update_date)
|
||||
return sys_update_date[:10]
|
||||
|
||||
# 勤務医師ボタン表示
|
||||
def is_disabled_doctor_wrkplace(self):
|
||||
return 'disabled' if self.doctor_wrkplace_count == 0 else ''
|
||||
|
||||
# 現在のページ(表示用)
|
||||
def is_page_num_view(self):
|
||||
return self.page_num + 1
|
||||
|
||||
# 前ボタン
|
||||
def is_disabled_prev(self):
|
||||
return 'disabled' if self.page_num == 0 else ''
|
||||
|
||||
# 次ボタン
|
||||
def is_disabled_next(self):
|
||||
if self.page_num == self.post_cnt - 1:
|
||||
return 'disabled'
|
||||
return ''
|
||||
|
||||
# 診療科目のデータ件数
|
||||
def is_input_inst_trt_course_data_size(self):
|
||||
if self.inst_trt_coursed_data is None:
|
||||
return 0
|
||||
return len(self.inst_trt_coursed_data)
|
||||
|
||||
def disabled_button(self):
|
||||
return 'disabled' if self.is_data_empty() or self.is_data_overflow_max_length() else ''
|
||||
|
||||
def is_form_submitted(self):
|
||||
return self.form_data is not None
|
||||
|
||||
def is_data_empty(self):
|
||||
return len(self.doctor_data) == 0
|
||||
|
||||
def is_data_overflow_max_length(self):
|
||||
return len(self.doctor_data) > environment.ULTMARC_SEARCH_RESULT_MAX_COUNT
|
||||
119
ecs/jskult-webapp/src/model/view/ultmarc_inst_view_model.py
Normal file
119
ecs/jskult-webapp/src/model/view/ultmarc_inst_view_model.py
Normal file
@ -0,0 +1,119 @@
|
||||
import json
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from src.model.db.inst_div_master import InstDivMasterModel
|
||||
from src.model.db.prefc_master import PrefcMasterModel
|
||||
from src.model.db.ultmarc_inst import UltmarcInstDBModel
|
||||
from src.model.request.ultmarc_inst import UltmarcInstSearchModel
|
||||
from src.system_var import environment
|
||||
|
||||
|
||||
class UltmarcInstViewModel(BaseModel):
|
||||
subtitle: str = '施設検索一覧'
|
||||
is_batch_processing: Optional[bool]
|
||||
prefc_models: list[PrefcMasterModel]
|
||||
inst_div_models: list[InstDivMasterModel]
|
||||
inst_data: Optional[list[UltmarcInstDBModel]] = []
|
||||
form_data: Optional[UltmarcInstSearchModel]
|
||||
|
||||
def ultmarc_data_json_str(self):
|
||||
def date_handler(obj):
|
||||
return obj.isoformat() if hasattr(obj, 'isoformat') else obj
|
||||
return json.dumps([model.dict() for model in self.inst_data], ensure_ascii=False, default=date_handler)
|
||||
|
||||
# ページネーションのページ番号
|
||||
# 検索時は最初のページを表示する
|
||||
# 詳細画面からの遷移時は、元のページを表示する
|
||||
def init_pagination_page_number(self):
|
||||
if not self.is_form_submitted():
|
||||
return 1
|
||||
return self.form_data.pagination_page_number or 1
|
||||
|
||||
# ULT施設コード
|
||||
def is_input_dcf_dsf_inst_cd(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.dcf_dsf_inst_cd or ''
|
||||
|
||||
# 施設区分
|
||||
def is_selected_inst_div_cd(self, selected_inst_div_cd):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self._selected_value(self.form_data.inst_div_cd, selected_inst_div_cd)
|
||||
|
||||
def is_input_form_inst_div_cd(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.inst_div_cd or ''
|
||||
|
||||
# ULT施設名(漢字)
|
||||
def is_input_form_inst_name_kanji(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.form_inst_name_kanji or ''
|
||||
|
||||
# ULT施設名(かな・カナ)
|
||||
def is_input_form_inst_name_kana(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.form_inst_name_kana or ''
|
||||
|
||||
# 郵便番号
|
||||
def is_input_postal_number(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.postal_number or ''
|
||||
|
||||
# 電話番号
|
||||
def is_input_inst_phone_number(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.inst_phone_number or ''
|
||||
|
||||
# 削除施設表示
|
||||
def is_checked_delFlg(self):
|
||||
if not self.is_form_submitted():
|
||||
return 'checked'
|
||||
return self._checked_value(self.form_data.delFlg)
|
||||
|
||||
def is_input_delFlg(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.delFlg or ''
|
||||
|
||||
# ULT施設住所
|
||||
def is_input_inst_addr(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.inst_addr or ''
|
||||
|
||||
# 勤務先都道府県
|
||||
def is_selected_prefc_cd(self, selected_prefc_cd):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self._selected_value(self.form_data.prefc_cd, selected_prefc_cd)
|
||||
|
||||
def is_input_form_prefc_cd(self):
|
||||
if not self.is_form_submitted():
|
||||
return ''
|
||||
return self.form_data.prefc_cd or ''
|
||||
|
||||
def disabled_button(self):
|
||||
return 'disabled' if self.is_data_empty() or self.is_data_overflow_max_length() else ''
|
||||
|
||||
def is_form_submitted(self):
|
||||
return self.form_data is not None
|
||||
|
||||
def is_data_empty(self):
|
||||
return len(self.inst_data) == 0
|
||||
|
||||
def is_data_overflow_max_length(self):
|
||||
return len(self.inst_data) >= environment.ULTMARC_SEARCH_RESULT_MAX_COUNT
|
||||
|
||||
def _selected_value(self, form_value: str, current_value: str):
|
||||
return 'selected' if form_value == current_value else ''
|
||||
|
||||
def _checked_value(self, form_value: str):
|
||||
return 'checked' if form_value else ''
|
||||
@ -4,10 +4,10 @@ from pydantic import BaseModel
|
||||
|
||||
|
||||
class UserViewModel(BaseModel):
|
||||
bio_flg: str # AUTH_FLG1
|
||||
doc_flg: str # AUTH_FLG2
|
||||
inst_flg: str # AUTH_FLG3
|
||||
master_mainte_flg: str # AUTH_FLG4
|
||||
bio_flg: Optional[str] # AUTH_FLG1
|
||||
doc_flg: Optional[str] # AUTH_FLG2
|
||||
inst_flg: Optional[str] # AUTH_FLG3
|
||||
master_mainte_flg: Optional[str] # AUTH_FLG4
|
||||
user_flg: Optional[str] # MNTUSER_FLG
|
||||
|
||||
def has_ult_doctor_permission(self):
|
||||
|
||||
@ -6,7 +6,7 @@ logger = get_logger('日付テーブル取得')
|
||||
|
||||
|
||||
class HdkeTblRepository(BaseRepository):
|
||||
FETCH_SQL = "SELECT bch_actf FROM src05.hdke_tbl"
|
||||
FETCH_SQL = "SELECT bch_actf, dump_sts_kbn FROM src05.hdke_tbl"
|
||||
|
||||
def fetch_all(self) -> list[HdkeTblModel]:
|
||||
try:
|
||||
|
||||
29
ecs/jskult-webapp/src/repositories/inst_master_repository.py
Normal file
29
ecs/jskult-webapp/src/repositories/inst_master_repository.py
Normal file
@ -0,0 +1,29 @@
|
||||
from src.model.db.inst_div_master import InstDivMasterModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class InstDivMasterRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT
|
||||
DISTINCT com_inst_div.inst_div_cd AS inst_div_cd,
|
||||
com_inst_div.inst_div_name AS inst_div_name
|
||||
FROM src05.com_inst
|
||||
JOIN src05.com_inst_div on com_inst.inst_div_cd = com_inst_div.inst_div_cd
|
||||
ORDER BY com_inst_div.inst_div_cd
|
||||
"""
|
||||
|
||||
def fetch_all(self) -> list[InstDivMasterModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
result = self._database.execute_select(self.FETCH_SQL)
|
||||
result_data = [res for res in result]
|
||||
models = [InstDivMasterModel(**r) for r in result_data]
|
||||
return models
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] getOroshiData DB Error. ")
|
||||
print(f"[ERROR] ErrorMessage: {e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
@ -0,0 +1,31 @@
|
||||
from src.model.db.prefc_master import PrefcMasterModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class PrefcMasterRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT DISTINCT
|
||||
com_inst.prefc_cd AS prefc_cd,
|
||||
mst_prefc.prefc_name AS prefc_name
|
||||
FROM
|
||||
src05.com_inst
|
||||
JOIN src05.mst_prefc ON com_inst.prefc_cd = mst_prefc.prefc_cd
|
||||
ORDER BY
|
||||
mst_prefc.prefc_cd
|
||||
"""
|
||||
|
||||
def fetch_all(self) -> list[PrefcMasterModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
result = self._database.execute_select(self.FETCH_SQL)
|
||||
result_data = [res for res in result]
|
||||
models = [PrefcMasterModel(**r) for r in result_data]
|
||||
return models
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] getOroshiData DB Error. ")
|
||||
print(f"[ERROR] ErrorMessage: {e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
185
ecs/jskult-webapp/src/repositories/ultmarc_doctor_repository.py
Normal file
185
ecs/jskult-webapp/src/repositories/ultmarc_doctor_repository.py
Normal file
@ -0,0 +1,185 @@
|
||||
from src.db import sql_condition as condition
|
||||
from src.db.sql_condition import SQLCondition
|
||||
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.util.string_util import is_not_empty
|
||||
import mojimoji
|
||||
|
||||
|
||||
class UltmarcDoctorRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT
|
||||
com_dr.dcf_pcf_dr_cd,
|
||||
com_dr.dr_name,
|
||||
com_inst.form_inst_name_kanji,
|
||||
com_inst.dcf_dsf_inst_cd,
|
||||
com_blng_sec.blng_sec_name,
|
||||
GROUP_CONCAT(com_trt_course.trt_course_name separator ' / ') AS trt_course_name,
|
||||
com_post.form_post_name,
|
||||
com_alma.alma,
|
||||
com_dr.grad_y,
|
||||
mst_prefc.prefc_name,
|
||||
com_dr_wrkplace.blng_sec_cd
|
||||
FROM
|
||||
src05.com_dr
|
||||
LEFT JOIN src05.mst_prefc ON com_dr.prefc_cd = mst_prefc.prefc_cd
|
||||
LEFT JOIN src05.com_dr_wrkplace ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_inst ON com_dr_wrkplace.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
||||
LEFT JOIN src05.com_blng_sec ON com_dr_wrkplace.blng_sec_cd = com_blng_sec.blng_sec_cd
|
||||
LEFT JOIN src05.com_dr_trt_course ON com_dr.dcf_pcf_dr_cd = com_dr_trt_course.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_trt_course ON com_dr_trt_course.trt_course_cd = com_trt_course.trt_course_cd
|
||||
LEFT JOIN src05.com_post ON com_dr_wrkplace.post_cd = com_post.post_cd
|
||||
LEFT JOIN src05.com_alma ON com_dr.alma_cd = com_alma.alma_cd
|
||||
WHERE
|
||||
{where_clause}
|
||||
GROUP BY com_dr.dcf_pcf_dr_cd, com_inst.dcf_dsf_inst_cd, com_blng_sec.blng_sec_cd
|
||||
ORDER BY
|
||||
com_dr.dcf_pcf_dr_cd,
|
||||
com_dr_wrkplace.dcf_dsf_inst_cd,
|
||||
com_dr_wrkplace.blng_sec_cd,
|
||||
com_dr_trt_course.trt_course_cd
|
||||
\
|
||||
"""
|
||||
|
||||
def fetch_many(self, parameter: UltmarcDoctorSearchModel) -> list[UltmarcDoctorDBModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
# 文字列の検索を部分一致にするため、モデルをコピー。以降はこのコピーを使用する。
|
||||
clone_parameter = UltmarcDoctorSearchModel(**parameter.dict())
|
||||
where_clause = self.__build_condition(clone_parameter)
|
||||
query = self.FETCH_SQL.format(where_clause=where_clause)
|
||||
result = self._database.execute_select(query, clone_parameter.dict())
|
||||
models = [UltmarcDoctorDBModel(**r) for r in result]
|
||||
|
||||
return models
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
|
||||
def __build_condition(self, parameter: UltmarcDoctorSearchModel):
|
||||
where_clauses: list[SQLCondition] = []
|
||||
|
||||
# 医師コード
|
||||
if is_not_empty(parameter.dcf_pcf_dr_cd):
|
||||
# 必ず部分一致で検索
|
||||
parameter.dcf_pcf_dr_cd = f'%{parameter.dcf_pcf_dr_cd}%'
|
||||
where_clauses.append(SQLCondition('com_dr.dcf_pcf_dr_cd', condition.LIKE, 'dcf_pcf_dr_cd'))
|
||||
# 氏名(漢字)
|
||||
if is_not_empty(parameter.dr_name):
|
||||
# 必ず部分一致で検索
|
||||
parameter.dr_name = f'%{parameter.dr_name}%'
|
||||
where_clauses.append(SQLCondition('dr_name', condition.LIKE, 'dr_name'))
|
||||
# 氏名(かな・カナ)
|
||||
if is_not_empty(parameter.dr_name_kana):
|
||||
# 必ず部分一致で検索
|
||||
# ひらがなを全角カタカナへ変換
|
||||
zenkaku_katakana = ''.join([chr(n+96) if (12352 < n and n < 12439) or n == 12445 or n == 12446 else chr(n)
|
||||
for n in [ord(c) for c in parameter.dr_name_kana]])
|
||||
# 全角カタカナを半角カタカナへ変換
|
||||
hankaku_katakana = mojimoji.zen_to_han(zenkaku_katakana)
|
||||
parameter.dr_name_kana = f'%{hankaku_katakana}%'
|
||||
where_clauses.append(SQLCondition('dr_name_kana', condition.LIKE, 'dr_name_kana'))
|
||||
# 勤務先コード
|
||||
if is_not_empty(parameter.dcf_dsf_inst_cd):
|
||||
# 必ず部分一致で検索
|
||||
parameter.dcf_dsf_inst_cd = f'%{parameter.dcf_dsf_inst_cd}%'
|
||||
where_clauses.append(SQLCondition(
|
||||
'com_inst.dcf_dsf_inst_cd', condition.LIKE, 'dcf_dsf_inst_cd'))
|
||||
# 勤務先名(漢字)
|
||||
if is_not_empty(parameter.form_inst_name_kanji):
|
||||
# 必ず部分一致で検索
|
||||
parameter.form_inst_name_kanji = f'%{parameter.form_inst_name_kanji}%'
|
||||
where_clauses.append(SQLCondition(
|
||||
'form_inst_name_kanji', condition.LIKE, 'form_inst_name_kanji'))
|
||||
# 勤務先名(かな・カナ)
|
||||
if is_not_empty(parameter.form_inst_name_kana):
|
||||
# 必ず部分一致で検索
|
||||
# ひらがなを全角カタカナへ変換
|
||||
zenkaku_katakana = ''.join([chr(n+96) if (12352 < n and n < 12439) or n == 12445 or n == 12446 else chr(n)
|
||||
for n in [ord(c) for c in parameter.form_inst_name_kana]])
|
||||
# 全角カタカナを半角カタカナへ変換
|
||||
hankaku_katakana = mojimoji.zen_to_han(zenkaku_katakana)
|
||||
parameter.form_inst_name_kana = f'%{hankaku_katakana}%'
|
||||
where_clauses.append(SQLCondition(
|
||||
'form_inst_name_kana', condition.LIKE, 'form_inst_name_kana'))
|
||||
|
||||
# 勤務先都道府県
|
||||
if is_not_empty(parameter.prefc_cd):
|
||||
where_clauses.append(SQLCondition('com_inst.prefc_cd', condition.EQ, 'prefc_cd'))
|
||||
|
||||
# 所属部科(漢字)
|
||||
if is_not_empty(parameter.blng_sec_name):
|
||||
# 必ず部分一致で検索
|
||||
parameter.blng_sec_name = f'%{parameter.blng_sec_name}%'
|
||||
where_clauses.append(SQLCondition(
|
||||
'com_blng_sec.blng_sec_name', condition.LIKE, 'blng_sec_name'))
|
||||
|
||||
# 診療科目(漢字)
|
||||
if is_not_empty(parameter.trt_course_name):
|
||||
# 必ず部分一致で検索
|
||||
parameter.trt_course_name = f'%{parameter.trt_course_name}%'
|
||||
where_clauses.append(SQLCondition('trt_course_name', condition.LIKE, 'trt_course_name'))
|
||||
|
||||
# 出身大学(漢字)
|
||||
if is_not_empty(parameter.alma):
|
||||
# 必ず部分一致で検索
|
||||
parameter.alma = f'%{parameter.alma}%'
|
||||
where_clauses.append(SQLCondition('alma', condition.LIKE, 'alma'))
|
||||
|
||||
# 卒年
|
||||
if is_not_empty(parameter.grad_y):
|
||||
# 必ず部分一致で検索
|
||||
parameter.grad_y = f'%{parameter.grad_y}%'
|
||||
where_clauses.append(SQLCondition('grad_y', condition.LIKE, 'grad_y'))
|
||||
|
||||
# 廃業除外
|
||||
if where_clauses:
|
||||
where_clauses.append(SQLCondition(
|
||||
'', '', '(length(com_inst.abolish_ymd) = 0 OR com_inst.abolish_ymd IS NULL)', literal=True))
|
||||
where_clauses.append(SQLCondition(
|
||||
'', '', '(length(com_dr.abolish_ymd) = 0 OR com_dr.abolish_ymd IS NULL)', literal=True))
|
||||
|
||||
where_clauses_str = ' AND '.join([condition.apply() for condition in where_clauses])
|
||||
|
||||
return where_clauses_str
|
||||
|
||||
FETCH_ONE_SQL = """\
|
||||
SELECT
|
||||
com_dr.dcf_pcf_dr_cd,
|
||||
com_dr.dr_name,
|
||||
com_dr.dr_name_kana,
|
||||
com_sex.sex,
|
||||
com_dr.birthday,
|
||||
com_alma.alma,
|
||||
com_hometown.hometown,
|
||||
com_dr.grad_y,
|
||||
com_dr.drday_y,
|
||||
com_dr.estab_y
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_sex ON com_dr.sex_cd = com_sex.sex_cd
|
||||
LEFT JOIN src05.com_alma ON com_dr.alma_cd = com_alma.alma_cd
|
||||
LEFT JOIN src05.com_hometown ON com_dr.hometown_cd = com_hometown.hometown_cd
|
||||
WHERE dcf_pcf_dr_cd = :id
|
||||
"""
|
||||
|
||||
def fetch_one(self, id) -> UltmarcDoctorInfoDBModel:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_ONE_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcDoctorInfoDBModel(**r) for r in result]
|
||||
if len(models) == 0:
|
||||
return None
|
||||
return models[0]
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
@ -0,0 +1,42 @@
|
||||
from src.model.db.ultmarc_doctor_wrkplace_his import \
|
||||
UltmarcDoctorWrkplaceHisDBModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class UltmarcDoctorWrkplaceHisRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT
|
||||
com_inst.dcf_dsf_inst_cd,
|
||||
com_inst.inst_name_kanji,
|
||||
com_blng_sec.blng_sec_name,
|
||||
univ_post.form_post_name as univ_post_name,
|
||||
post.form_post_name as post_name,
|
||||
com_dr_wrkplace_his.aply_start_ymd,
|
||||
com_dr_wrkplace_his.aply_end_ymd
|
||||
FROM com_dr
|
||||
LEFT JOIN com_dr_wrkplace_his ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace_his.dcf_pcf_dr_cd
|
||||
LEFT JOIN com_inst ON com_dr_wrkplace_his.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
||||
LEFT JOIN com_blng_sec ON com_dr_wrkplace_his.blng_sec_cd = com_blng_sec.blng_sec_cd
|
||||
LEFT JOIN com_post as univ_post ON com_dr_wrkplace_his.identity_cd = univ_post.post_cd
|
||||
LEFT JOIN com_post as post ON com_dr_wrkplace_his.post_cd = post.post_cd
|
||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||
ORDER BY com_dr_wrkplace_his.aply_end_ymd DESC,
|
||||
com_dr_wrkplace_his.aply_start_ymd DESC
|
||||
"""
|
||||
|
||||
def fetch_many(self, id) -> list[UltmarcDoctorWrkplaceHisDBModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcDoctorWrkplaceHisDBModel(**r) for r in result]
|
||||
if len(models) == 0:
|
||||
return None
|
||||
return models
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
@ -0,0 +1,63 @@
|
||||
from src.model.db.ultmarc_doctor_wrkplace import UltmarcDoctorWrkplaceDBModel
|
||||
from src.model.db.ultmarc_doctor_wrkplace_count import \
|
||||
UltmarcDoctorWrkplaceCountDBModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class UltmarcDoctorWrkplaceRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT
|
||||
com_inst.dcf_dsf_inst_cd,
|
||||
com_inst.inst_name_kanji,
|
||||
com_blng_sec.blng_sec_name,
|
||||
univ_post.form_post_name AS univ_post_name,
|
||||
post.form_post_name AS post_name,
|
||||
com_dr_wrkplace.aply_start_ymd
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_dr_wrkplace ON com_dr.dcf_pcf_dr_cd = com_dr_wrkplace.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_inst ON com_dr_wrkplace.dcf_dsf_inst_cd = com_inst.dcf_dsf_inst_cd
|
||||
LEFT JOIN src05.com_blng_sec ON com_dr_wrkplace.blng_sec_cd = com_blng_sec.blng_sec_cd
|
||||
LEFT JOIN src05.com_post as univ_post ON com_dr_wrkplace.identity_cd = univ_post.post_cd
|
||||
LEFT JOIN src05.com_post as post ON com_dr_wrkplace.post_cd = post.post_cd
|
||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||
ORDER BY com_dr_wrkplace.aply_start_ymd DESC
|
||||
"""
|
||||
|
||||
def fetch_many(self, id) -> list[UltmarcDoctorWrkplaceDBModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcDoctorWrkplaceDBModel(**r) for r in result]
|
||||
if len(models) == 0:
|
||||
return None
|
||||
return models
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
|
||||
FETCH_COUNT_SQL = """\
|
||||
SELECT COUNT(*) AS count
|
||||
FROM src05.com_dr_wrkplace
|
||||
WHERE dcf_dsf_inst_cd = :id
|
||||
"""
|
||||
|
||||
def fetch_count(self, id) -> UltmarcDoctorWrkplaceCountDBModel:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_COUNT_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcDoctorWrkplaceCountDBModel(**r) for r in result]
|
||||
if len(models) == 0:
|
||||
return 0
|
||||
return models[0].count
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
194
ecs/jskult-webapp/src/repositories/ultmarc_inst_repository.py
Normal file
194
ecs/jskult-webapp/src/repositories/ultmarc_inst_repository.py
Normal file
@ -0,0 +1,194 @@
|
||||
from src.db import sql_condition as condition
|
||||
from src.db.sql_condition import SQLCondition
|
||||
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.util.string_util import is_not_empty
|
||||
import mojimoji
|
||||
|
||||
|
||||
class UltmarcInstRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT
|
||||
dcf_dsf_inst_cd,
|
||||
abolish_ymd,
|
||||
delete_sche_reason_cd,
|
||||
form_inst_name_kanji,
|
||||
inst_addr,
|
||||
postal_number,
|
||||
inst_phone_number,
|
||||
inst_div_name,
|
||||
hp_assrt_name,
|
||||
prefc_name
|
||||
FROM src05.com_inst
|
||||
LEFT JOIN src05.mst_prefc ON com_inst.prefc_cd = mst_prefc.prefc_cd
|
||||
LEFT JOIN src05.com_inst_div ON com_inst.inst_div_cd = com_inst_div.inst_div_cd
|
||||
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
|
||||
\
|
||||
"""
|
||||
|
||||
def fetch_many(self, parameter: UltmarcInstSearchModel) -> list[UltmarcInstDBModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
# 文字列の検索を部分一致にするため、モデルをコピー。以降はこのコピーを使用する。
|
||||
clone_parameter = UltmarcInstSearchModel(**parameter.dict())
|
||||
where_clause = self.__build_condition(clone_parameter)
|
||||
query = self.FETCH_SQL.format(where_clause=where_clause)
|
||||
result = self._database.execute_select(query, clone_parameter.dict())
|
||||
models = [UltmarcInstDBModel(**r) for r in result]
|
||||
|
||||
return models
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
|
||||
def __build_condition(self, parameter: UltmarcInstSearchModel):
|
||||
where_clauses: list[SQLCondition] = []
|
||||
|
||||
# ULT施設コード
|
||||
if is_not_empty(parameter.dcf_dsf_inst_cd):
|
||||
# 部分一致検索
|
||||
parameter.dcf_dsf_inst_cd = f'%{parameter.dcf_dsf_inst_cd}%'
|
||||
where_clauses.append(SQLCondition('com_inst.dcf_dsf_inst_cd', condition.LIKE, 'dcf_dsf_inst_cd'))
|
||||
|
||||
# 施設区分
|
||||
if is_not_empty(parameter.inst_div_cd):
|
||||
where_clauses.append(SQLCondition('com_inst.inst_div_cd', condition.EQ, 'inst_div_cd'))
|
||||
|
||||
# ULT施設名(漢字)
|
||||
if is_not_empty(parameter.form_inst_name_kanji):
|
||||
# 部分一致検索
|
||||
parameter.form_inst_name_kanji = f'%{parameter.form_inst_name_kanji}%'
|
||||
where_clauses.append(SQLCondition('form_inst_name_kanji', condition.LIKE, 'form_inst_name_kanji'))
|
||||
|
||||
# ULT施設名(カナ)
|
||||
if is_not_empty(parameter.form_inst_name_kana):
|
||||
# 部分一致検索
|
||||
# ひらがなを全角カタカナへ変換
|
||||
zenkaku_katakana = ''.join([chr(n+96) if (12352 < n and n < 12439) or n == 12445 or n == 12446 else chr(n)
|
||||
for n in [ord(c) for c in parameter.form_inst_name_kana]])
|
||||
# 全角カタカナを半角カタカナへ変換
|
||||
hankaku_katakana = mojimoji.zen_to_han(zenkaku_katakana)
|
||||
parameter.form_inst_name_kana = f'%{hankaku_katakana}%'
|
||||
where_clauses.append(SQLCondition('form_inst_name_kana', condition.LIKE, 'form_inst_name_kana'))
|
||||
|
||||
# 郵便番号
|
||||
if is_not_empty(parameter.postal_number):
|
||||
# 前方一致検索
|
||||
parameter.postal_number = f'{parameter.postal_number}%'
|
||||
where_clauses.append(SQLCondition('postal_number', condition.LIKE, 'postal_number'))
|
||||
|
||||
# 電話番号
|
||||
if is_not_empty(parameter.inst_phone_number):
|
||||
# 前方一致検索
|
||||
parameter.inst_phone_number = f'{parameter.inst_phone_number}%'
|
||||
where_clauses.append(SQLCondition('inst_phone_number', condition.LIKE, 'inst_phone_number'))
|
||||
|
||||
# 勤務先都道府県
|
||||
if is_not_empty(parameter.prefc_cd):
|
||||
where_clauses.append(SQLCondition('com_inst.prefc_cd', condition.EQ, 'prefc_cd'))
|
||||
|
||||
# ULT施設住所
|
||||
if is_not_empty(parameter.inst_addr):
|
||||
# 部分一致検索
|
||||
parameter.inst_addr = f'%{parameter.inst_addr}%'
|
||||
where_clauses.append(SQLCondition('inst_addr', condition.LIKE, 'inst_addr'))
|
||||
|
||||
# 削除表示フラグ
|
||||
if is_not_empty(parameter.delFlg) is False:
|
||||
# 論理和での検索
|
||||
where_clauses.append(SQLCondition('', '', '(length(abolish_ymd) = 0 OR abolish_ymd IS NULL)', literal=True))
|
||||
|
||||
where_clauses_str = ' AND '.join([condition.apply() for condition in where_clauses])
|
||||
|
||||
return where_clauses_str
|
||||
|
||||
FETCH_ONE_SQL = """\
|
||||
SELECT
|
||||
com_inst.dcf_dsf_inst_cd,
|
||||
com_inst.unconf_flg,
|
||||
com_inst.dup_opp_cd,
|
||||
com_inst.close_start_ym,
|
||||
com_inst.close_flg,
|
||||
com_inst.delete_sche_reason_cd,
|
||||
com_inst.abolish_ymd,
|
||||
com_inst.estab_sche_ym,
|
||||
com_inst.estab_sche_flg,
|
||||
com_inst.form_inst_name_kana,
|
||||
com_inst.form_inst_name_kanji,
|
||||
com_inst.inst_name_kana,
|
||||
com_inst.inst_name_kanji,
|
||||
com_inst.manage_cd,
|
||||
com_inst.postal_number,
|
||||
com_inst.inst_phone_number,
|
||||
com_inst.addr_unknown_reason_cd,
|
||||
com_inst.phone_number_non_flg,
|
||||
com_inst.inst_addr_kana,
|
||||
com_inst.inst_addr,
|
||||
com_inst.re_exam_cd,
|
||||
com_inst.rltd_univ_prnt_cd,
|
||||
com_inst.insp_item_micrb,
|
||||
com_inst.insp_item_serum,
|
||||
com_inst.insp_item_blood,
|
||||
com_inst.insp_item_patho,
|
||||
com_inst.insp_item_paras,
|
||||
com_inst.insp_item_biochem,
|
||||
com_inst.insp_item_ri,
|
||||
com_inst.prmit_bed_num_gen,
|
||||
com_inst.prmit_bed_num_rcup,
|
||||
com_inst.prmit_bed_num_mental,
|
||||
com_inst.prmit_bed_num_infection,
|
||||
com_inst.prmit_bed_num_tuber,
|
||||
com_inst.prmit_bed_num_other,
|
||||
com_inst.prmit_bed_num_sum,
|
||||
com_inst.ward_abolish_flg,
|
||||
com_inst.bed_num,
|
||||
com_inst.prmit_bed_maint_ymd,
|
||||
com_inst.inst_repre_cd,
|
||||
com_inst.inst_repre_kana,
|
||||
com_inst.inst_repre,
|
||||
com_inst.sys_update_date,
|
||||
com_inst_delete_sche_reason.delete_sche_reason,
|
||||
com_inst_div.inst_div_name,
|
||||
com_manage.manage_name,
|
||||
com_hp_assrt.hp_assrt_name,
|
||||
parent_inst.form_inst_name_kanji as parent_name,
|
||||
com_spcare_med_office_dat.dcf_prnt_inst_cd
|
||||
FROM src05.com_inst
|
||||
LEFT JOIN src05.com_inst_div ON com_inst.inst_div_cd = com_inst_div.inst_div_cd
|
||||
LEFT JOIN src05.com_inst_delete_sche_reason ON
|
||||
com_inst.delete_sche_reason_cd = com_inst_delete_sche_reason.delete_sche_reason_cd
|
||||
LEFT JOIN src05.com_manage ON com_inst.manage_cd = com_manage.manage_cd
|
||||
LEFT JOIN src05.com_inst_addr_unknown_reason ON
|
||||
com_inst.addr_unknown_reason_cd = com_inst_addr_unknown_reason.addr_unknown_reason_cd
|
||||
LEFT JOIN src05.com_hp_assrt ON com_hp_assrt.hp_assrt_cd = com_inst.hp_assrt_cd
|
||||
LEFT JOIN src05.com_re_exam ON com_inst.re_exam_cd = com_re_exam.re_exam_cd
|
||||
LEFT JOIN src05.com_spcare_med_office_dat ON
|
||||
com_inst.dcf_dsf_inst_cd = com_spcare_med_office_dat.dcf_chld_inst_cd
|
||||
LEFT JOIN src05.com_inst as parent_inst ON com_inst.rltd_univ_prnt_cd = parent_inst.dcf_dsf_inst_cd
|
||||
WHERE com_inst.dcf_dsf_inst_cd = :id
|
||||
\
|
||||
"""
|
||||
|
||||
def fetch_one(self, id) -> UltmarcInstInfoDBModel:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_ONE_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcInstInfoDBModel(**r) for r in result]
|
||||
if len(models) == 0:
|
||||
return None
|
||||
return models[0]
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
@ -0,0 +1,31 @@
|
||||
from src.model.db.ultmarc_inst_trt_course import UltmarcInstTrtCourseDBModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class UltmarcInstTrtCourseRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT trt_course_name_abb
|
||||
FROM src05.com_inst
|
||||
JOIN src05.com_inst_trt_course ON com_inst.dcf_dsf_inst_cd = com_inst_trt_course.dcf_dsf_inst_cd
|
||||
LEFT JOIN src05.com_trt_course ON com_inst_trt_course.trt_course_cd = com_trt_course.trt_course_cd
|
||||
WHERE com_inst.dcf_dsf_inst_cd = :id
|
||||
ORDER BY com_trt_course.trt_course_cd
|
||||
"""
|
||||
|
||||
def fetch_many(self, id) -> list[UltmarcInstTrtCourseDBModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
|
||||
models = [UltmarcInstTrtCourseDBModel(**r) for r in result]
|
||||
if len(models) == 0:
|
||||
return None
|
||||
return models
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
@ -0,0 +1,30 @@
|
||||
from src.model.db.ultmarc_sosiety import UltmarcSosietyDBModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class UltmarcSosietyRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT com_sosiety.sosiety_cd, com_sosiety.sosiety_name
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_dr_sosiety ON com_dr.dcf_pcf_dr_cd = com_dr_sosiety.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_sosiety ON com_dr_sosiety.sosiety_cd = com_sosiety.sosiety_cd
|
||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||
ORDER BY com_sosiety.sosiety_cd
|
||||
"""
|
||||
|
||||
def fetch_many(self, id) -> list[UltmarcSosietyDBModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcSosietyDBModel(**r) for r in result]
|
||||
if len(models) == 0:
|
||||
return None
|
||||
return models
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
@ -0,0 +1,32 @@
|
||||
from src.model.db.ultmarc_specialist_license import \
|
||||
UltmarcSpecialistLicenseDBModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class UltmarcSpecialistLicenseRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT
|
||||
com_specialist_license.specialist_cd, com_specialist_license.specialist_license_name
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_sp_field ON com_dr.dcf_pcf_dr_cd = com_sp_field.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_specialist_license ON com_sp_field.specialist_cd = com_specialist_license.specialist_cd
|
||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||
ORDER BY com_specialist_license.specialist_cd
|
||||
"""
|
||||
|
||||
def fetch_many(self, id) -> UltmarcSpecialistLicenseDBModel:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
models = [UltmarcSpecialistLicenseDBModel(**r) for r in result]
|
||||
if len(models) == 0:
|
||||
return None
|
||||
return models
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
@ -0,0 +1,31 @@
|
||||
from src.model.db.ultmarc_trt_course import UltmarcTrtCourseDBModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
|
||||
|
||||
class UltmarcTrtCourseRepository(BaseRepository):
|
||||
|
||||
FETCH_SQL = """\
|
||||
SELECT trt_course_name
|
||||
FROM src05.com_dr
|
||||
LEFT JOIN src05.com_dr_trt_course ON com_dr.dcf_pcf_dr_cd = com_dr_trt_course.dcf_pcf_dr_cd
|
||||
LEFT JOIN src05.com_trt_course ON com_dr_trt_course.trt_course_cd = com_trt_course.trt_course_cd
|
||||
WHERE com_dr.dcf_pcf_dr_cd = :id
|
||||
ORDER BY com_trt_course.trt_course_cd
|
||||
"""
|
||||
|
||||
def fetch_many(self, id) -> list[UltmarcTrtCourseDBModel]:
|
||||
try:
|
||||
self._database.connect()
|
||||
query = self.FETCH_SQL
|
||||
result = self._database.execute_select(query, {'id': id})
|
||||
|
||||
models = [UltmarcTrtCourseDBModel(**r) for r in result]
|
||||
if len(models) == 0:
|
||||
return None
|
||||
return models
|
||||
except Exception as e:
|
||||
# TODO: ファイルへの書き出しはloggerでやる
|
||||
print(f"[ERROR] DB Error : Exception={e.args}")
|
||||
raise e
|
||||
finally:
|
||||
self._database.disconnect()
|
||||
@ -7,7 +7,7 @@ from starlette import status
|
||||
|
||||
from src.depends.auth import (check_session_expired, get_current_session,
|
||||
verify_session)
|
||||
from src.error.exceptions import UnexpectedException
|
||||
from src.error.exceptions import DBException, UnexpectedException
|
||||
from src.logging.get_logger import get_logger
|
||||
from src.system_var import constants, environment
|
||||
|
||||
@ -46,7 +46,10 @@ class MeDaCaRoute(APIRoute):
|
||||
raise e
|
||||
except Exception as e:
|
||||
logger.exception(e)
|
||||
raise UnexpectedException(detail=constants.LOGOUT_REASON_UNEXPECTED)
|
||||
if isinstance(e, DBException):
|
||||
raise UnexpectedException(detail=constants.LOGOUT_REASON_DB_ERROR)
|
||||
else:
|
||||
raise UnexpectedException(detail=constants.LOGOUT_REASON_UNEXPECTED)
|
||||
return custom_route_handler
|
||||
|
||||
async def pre_process_route(self, request: Request) -> Request:
|
||||
|
||||
@ -4,6 +4,7 @@ from src.model.db.hdke_tbl import HdkeTblModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
from src.repositories.hdke_tbl_repository import HdkeTblRepository
|
||||
from src.services.base_service import BaseService
|
||||
from src.system_var import constants
|
||||
|
||||
|
||||
class BatchStatusService(BaseService):
|
||||
@ -25,17 +26,30 @@ class BatchStatusService(BaseService):
|
||||
|
||||
@property
|
||||
def hdke_table_record(self) -> HdkeTblModel:
|
||||
"""日付テーブルを取得する"""
|
||||
|
||||
# 日付マスタのレコードがあることを確認
|
||||
self.__assert_record_exists()
|
||||
# 日付テーブルのレコードは必ず1件
|
||||
return self.__hdke_table_record[0]
|
||||
|
||||
def is_batch_processing(self):
|
||||
"""バッチ処理中かどうかを判定する"""
|
||||
|
||||
# 日付マスタのレコードがあることを確認
|
||||
self.__assert_record_exists()
|
||||
return self.hdke_table_record.bch_actf == '1' # TODO: 定数化する
|
||||
return self.hdke_table_record.bch_actf == constants.BATCH_STATUS_PROCESSING
|
||||
|
||||
def is_dump_processing(self):
|
||||
"""dump処理処理中かどうかを判定する"""
|
||||
|
||||
# 日付マスタのレコードがあることを確認
|
||||
self.__assert_record_exists()
|
||||
return self.hdke_table_record.dump_sts_kbn != constants.DUMP_STATUS_UNPROCESSED
|
||||
|
||||
def __assert_record_exists(self):
|
||||
"""日付テーブルが有ることを保証する"""
|
||||
|
||||
# 日付マスタのレコードがない場合は例外とする
|
||||
if len(self.__hdke_table_record) == 0:
|
||||
raise DBException('日付テーブルのレコードが存在しません')
|
||||
|
||||
156
ecs/jskult-webapp/src/services/ultmarc_view_service.py
Normal file
156
ecs/jskult-webapp/src/services/ultmarc_view_service.py
Normal file
@ -0,0 +1,156 @@
|
||||
from src.aws.aws_api_client import AWSAPIClient
|
||||
from src.model.request.ultmarc_doctor import UltmarcDoctorSearchModel
|
||||
from src.model.request.ultmarc_inst import UltmarcInstSearchModel
|
||||
from src.model.view.ultmarc_doctor_info_view_model import \
|
||||
UltmarcDoctorInfoViewModel
|
||||
from src.model.view.ultmarc_doctor_view_model import UltmarcDoctorViewModel
|
||||
from src.model.view.ultmarc_inst_info_view_model import \
|
||||
UltmarcInstInfoViewModel
|
||||
from src.model.view.ultmarc_inst_view_model import UltmarcInstViewModel
|
||||
from src.repositories.base_repository import BaseRepository
|
||||
from src.repositories.inst_master_repository import InstDivMasterRepository
|
||||
from src.repositories.prefc_master_repository import PrefcMasterRepository
|
||||
from src.repositories.ultmarc_doctor_repository import UltmarcDoctorRepository
|
||||
from src.repositories.ultmarc_dr_wrkplace_his_repository import \
|
||||
UltmarcDoctorWrkplaceHisRepository
|
||||
from src.repositories.ultmarc_dr_wrkplace_repository import \
|
||||
UltmarcDoctorWrkplaceRepository
|
||||
from src.repositories.ultmarc_inst_repository import UltmarcInstRepository
|
||||
from src.repositories.ultmarc_inst_trt_course_repository import \
|
||||
UltmarcInstTrtCourseRepository
|
||||
from src.repositories.ultmarc_sosiety_repository import \
|
||||
UltmarcSosietyRepository
|
||||
from src.repositories.ultmarc_specialist_license_repository import \
|
||||
UltmarcSpecialistLicenseRepository
|
||||
from src.repositories.ultmarc_trt_course_repository import \
|
||||
UltmarcTrtCourseRepository
|
||||
from src.services.base_service import BaseService
|
||||
|
||||
|
||||
class UltmarcViewService(BaseService):
|
||||
REPOSITORIES = {
|
||||
'ultmarc_doctor_repository': UltmarcDoctorRepository,
|
||||
'prefc_repository': PrefcMasterRepository,
|
||||
'inst_div_repository': InstDivMasterRepository,
|
||||
'ultmarc_inst_repository': UltmarcInstRepository,
|
||||
'ultmarc_trt_course_repository': UltmarcTrtCourseRepository,
|
||||
'ultmarc_inst_trt_course_repository': UltmarcInstTrtCourseRepository,
|
||||
'ultmarc_sosiety_repository': UltmarcSosietyRepository,
|
||||
'ultmarc_doctor_wrkplace_repository': UltmarcDoctorWrkplaceRepository,
|
||||
'ultmarc_doctor_wrkplace_his_repository': UltmarcDoctorWrkplaceHisRepository,
|
||||
'ultmarc_specialist_license_repository': UltmarcSpecialistLicenseRepository
|
||||
}
|
||||
|
||||
ultmarc_doctor_repository: UltmarcDoctorRepository
|
||||
prefc_repository: PrefcMasterRepository
|
||||
inst_div_repository: InstDivMasterRepository
|
||||
ultmarc_inst_repository: UltmarcInstRepository
|
||||
ultmarc_trt_course_repository: UltmarcTrtCourseRepository
|
||||
ultmarc_inst_trt_course_repository: UltmarcInstTrtCourseRepository
|
||||
ultmarc_sosiety_repository: UltmarcSosietyRepository
|
||||
ultmarc_doctor_wrkplace_repository: UltmarcDoctorWrkplaceRepository
|
||||
ultmarc_doctor_wrkplace_his_repository: UltmarcDoctorWrkplaceHisRepository
|
||||
ultmarc_specialist_license_repository: UltmarcSpecialistLicenseRepository
|
||||
|
||||
def __init__(self, repositories: dict[str, BaseRepository], clients: dict[str, AWSAPIClient]) -> None:
|
||||
super().__init__(repositories, clients)
|
||||
self.ultmarc_doctor_repository = repositories['ultmarc_doctor_repository']
|
||||
self.prefc_repository = repositories['prefc_repository']
|
||||
self.inst_div_repository = repositories['inst_div_repository']
|
||||
self.ultmarc_inst_repository = repositories['ultmarc_inst_repository']
|
||||
self.ultmarc_trt_course_repository = repositories['ultmarc_trt_course_repository']
|
||||
self.ultmarc_inst_trt_course_repository = repositories['ultmarc_inst_trt_course_repository']
|
||||
self.ultmarc_sosiety_repository = repositories['ultmarc_sosiety_repository']
|
||||
self.ultmarc_doctor_wrkplace_repository = repositories['ultmarc_doctor_wrkplace_repository']
|
||||
self.ultmarc_doctor_wrkplace_his_repository = repositories['ultmarc_doctor_wrkplace_his_repository']
|
||||
self.ultmarc_specialist_license_repository = repositories['ultmarc_specialist_license_repository']
|
||||
|
||||
#########################
|
||||
# アルトマーク医師 #
|
||||
#########################
|
||||
def prepare_ultmarc_doctor_search_view(
|
||||
self
|
||||
) -> UltmarcDoctorViewModel:
|
||||
# 医師一覧画面の表示データ取得
|
||||
# 都道府県リストを取得
|
||||
prefcs = self.prefc_repository.fetch_all()
|
||||
|
||||
ultmarc = UltmarcDoctorViewModel(
|
||||
prefc_models=prefcs
|
||||
)
|
||||
return ultmarc
|
||||
|
||||
def search_doctor_data(self, search_params: UltmarcDoctorSearchModel):
|
||||
# 医師データを検索
|
||||
ultmarc_doctor_data = self.ultmarc_doctor_repository.fetch_many(parameter=search_params)
|
||||
return ultmarc_doctor_data
|
||||
|
||||
def prepare_ultmarc_doctor_info_view(
|
||||
self,
|
||||
id
|
||||
) -> UltmarcDoctorInfoViewModel:
|
||||
# 医師情報画面の表示データ取得
|
||||
# 医師情報を取得
|
||||
doctor_info = self.ultmarc_doctor_repository.fetch_one(id)
|
||||
# 診療科目情報を取得
|
||||
trt_course = self.ultmarc_trt_course_repository.fetch_many(id)
|
||||
# 所属学会情報を取得
|
||||
sosiety = self.ultmarc_sosiety_repository.fetch_many(id)
|
||||
# 所属学会専門医情報を取得
|
||||
specialist_license = self.ultmarc_specialist_license_repository.fetch_many(id)
|
||||
# 勤務先情報を取得
|
||||
wrkplace = self.ultmarc_doctor_wrkplace_repository.fetch_many(id)
|
||||
# 勤務先履歴情報を取得
|
||||
wrkplace_his = self.ultmarc_doctor_wrkplace_his_repository.fetch_many(id)
|
||||
|
||||
ultmarc = UltmarcDoctorInfoViewModel(
|
||||
doctor_info_data=doctor_info,
|
||||
trt_coursed_data=trt_course,
|
||||
sosiety_data=sosiety,
|
||||
specialist_license_data=specialist_license,
|
||||
doctor_wrkplace_data=wrkplace,
|
||||
doctor_wrkplace_his_data=wrkplace_his
|
||||
)
|
||||
return ultmarc
|
||||
|
||||
#########################
|
||||
# アルトマーク施設 #
|
||||
#########################
|
||||
def prepare_ultmarc_inst_search_view(
|
||||
self
|
||||
) -> UltmarcInstViewModel:
|
||||
# 施設一覧画面の表示データ取得
|
||||
# 都道府県リストを取得
|
||||
prefcs = self.prefc_repository.fetch_all()
|
||||
# 施設区分リストを取得
|
||||
inst_div = self.inst_div_repository.fetch_all()
|
||||
|
||||
ultmarc = UltmarcInstViewModel(
|
||||
prefc_models=prefcs,
|
||||
inst_div_models=inst_div
|
||||
)
|
||||
return ultmarc
|
||||
|
||||
def search_inst_data(self, search_params: UltmarcInstSearchModel):
|
||||
# 施設データを検索
|
||||
ultmarc_inst_data = self.ultmarc_inst_repository.fetch_many(parameter=search_params)
|
||||
return ultmarc_inst_data
|
||||
|
||||
def prepare_ultmarc_inst_info_view(
|
||||
self,
|
||||
id
|
||||
) -> UltmarcInstInfoViewModel:
|
||||
# 施設情報画面の表示データ取得
|
||||
# 施設情報を取得
|
||||
inst_info = self.ultmarc_inst_repository.fetch_one(id)
|
||||
# 診療科目情報を取得
|
||||
inst_trt_course = self.ultmarc_inst_trt_course_repository.fetch_many(id)
|
||||
# 医師件数を取得
|
||||
doctor_count = self.ultmarc_doctor_wrkplace_repository.fetch_count(id)
|
||||
|
||||
ultmarc = UltmarcInstInfoViewModel(
|
||||
inst_info_data=inst_info,
|
||||
inst_trt_coursed_data=inst_trt_course,
|
||||
doctor_wrkplace_count=doctor_count
|
||||
)
|
||||
return ultmarc
|
||||
164
ecs/jskult-webapp/src/static/css/masterMainte.css
Normal file
164
ecs/jskult-webapp/src/static/css/masterMainte.css
Normal file
@ -0,0 +1,164 @@
|
||||
body{
|
||||
background-color: LightCyan;
|
||||
font-family : "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "MS Pゴシック", "MS PGothic", sans-serif;
|
||||
}
|
||||
|
||||
h1{
|
||||
margin-left : 1%;
|
||||
}
|
||||
|
||||
|
||||
/*ヘッダー*/
|
||||
.headerTable{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.headerTdLeft{
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.headerTdRight{
|
||||
text-align: right;
|
||||
padding-right: 2%;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.buttonSize{
|
||||
width: 85px;
|
||||
}
|
||||
|
||||
/*////////////////////////*/
|
||||
/*施設担当者データCSVダウンロード*/
|
||||
/*////////////////////////*/
|
||||
.searchColumnTd{
|
||||
width: 14%;
|
||||
}
|
||||
|
||||
.searchTextboxTd{
|
||||
width: 18%;
|
||||
}
|
||||
|
||||
.searchTable{
|
||||
margin-left: 3%;
|
||||
margin-right: 3%;
|
||||
margin-bottom: 1%;
|
||||
padding-bottom: 1%;
|
||||
border-bottom: solid 1px gray;
|
||||
width: 94%;
|
||||
}
|
||||
|
||||
.searchLabelTd{
|
||||
text-align: right;
|
||||
width: 10%;
|
||||
|
||||
}
|
||||
|
||||
.searchInputTd{
|
||||
width: 19%;
|
||||
}
|
||||
|
||||
.searchTextbox{
|
||||
width: 90%;
|
||||
margin-left: 2.5%;
|
||||
margin-right: 2.5%;
|
||||
margin-top: 0.8%;
|
||||
margin-bottom: 0.8%;
|
||||
}
|
||||
|
||||
.searchDateTextbox{
|
||||
width: 37%;
|
||||
margin-left: 2.5%;
|
||||
margin-right: 2.5%;
|
||||
margin-top: 0.8%;
|
||||
margin-bottom: 0.8%;
|
||||
}
|
||||
|
||||
.searchButtonTd{
|
||||
text-align: right;
|
||||
padding-top: 1%;
|
||||
}
|
||||
|
||||
|
||||
.csvOutputMessage{
|
||||
margin-left: 3%;
|
||||
}
|
||||
|
||||
.errorColor{
|
||||
color: red;
|
||||
}
|
||||
|
||||
/*//////////////////////////*/
|
||||
/*施設担当者データExcelアップロード*/
|
||||
/*//////////////////////////*/
|
||||
.inputTable{
|
||||
margin-left: 3%;
|
||||
margin-right: 3%;
|
||||
margin-bottom: 1%;
|
||||
padding-bottom: 1%;
|
||||
border-bottom: solid 1px gray;
|
||||
width: 94%;
|
||||
}
|
||||
|
||||
.inputLabelTd{
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.inputTd{
|
||||
width:20%;
|
||||
}
|
||||
|
||||
.inputButtonTd{
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataCntDisp{
|
||||
text-align: right;
|
||||
margin-right: 3%;
|
||||
}
|
||||
|
||||
table.inputData {
|
||||
font-family:arial;
|
||||
background-color: #CDCDCD;
|
||||
font-size: 12pt;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
border: 0.1px solid silver;
|
||||
padding: 4px;
|
||||
padding-right: 20px;
|
||||
border-collapse: collapse;
|
||||
margin-left: 3%;
|
||||
width: 94%;
|
||||
}
|
||||
table.inputData tbody th {
|
||||
color: #3D3D3D;
|
||||
padding: 4px;
|
||||
background-color: #e6EEEE;
|
||||
border: 0.1px solid silver;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.inputData tbody td {
|
||||
color: #3D3D3D;
|
||||
padding: 4px;
|
||||
background-color: #FFF;
|
||||
border: 0.1px solid silver;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.footerMsg{
|
||||
margin-left: 3%;
|
||||
}
|
||||
|
||||
|
||||
/*//////////////////////////*/
|
||||
/*データ上書きコピー */
|
||||
/*//////////////////////////*/
|
||||
.tableOverRide{
|
||||
margin-right: 3%;
|
||||
margin-left: 3%;
|
||||
margin-bottom: 2%;
|
||||
border-bottom: solid 1px gray;
|
||||
width: 94%;
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ body{
|
||||
font-size: 160%;
|
||||
}
|
||||
|
||||
.notUseBioMsg{
|
||||
.notUseBioMsg,.notUseMainteMsg{
|
||||
font-size: 143%;
|
||||
color: red;
|
||||
}
|
||||
|
||||
671
ecs/jskult-webapp/src/static/css/ultStyle.css
Normal file
671
ecs/jskult-webapp/src/static/css/ultStyle.css
Normal file
@ -0,0 +1,671 @@
|
||||
body {
|
||||
background-color: LightCyan;
|
||||
font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "MS Pゴシック", "MS PGothic", sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 150%;
|
||||
margin-left: 2%;
|
||||
margin-top: 0%;
|
||||
margin-bottom: 0%;
|
||||
}
|
||||
|
||||
table{
|
||||
border-collapse : collapse;
|
||||
}
|
||||
|
||||
.header_bt{
|
||||
width: 8%;
|
||||
margin-bottom: 0.8%;
|
||||
margin-left: 78.5%;
|
||||
}
|
||||
|
||||
.search_textbox{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search_dropdown{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search_longtextbox{
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.instSearchResult {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.scroll_table{
|
||||
overflow: auto;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 2%;
|
||||
/*スクロール時カラムが動く問題の修正 width: 100%;をコメントアウト*/
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
.scroll_table::-webkit-scrollbar {
|
||||
height: 5px;
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
.scroll_table::-webkit-scrollbar-track {
|
||||
border-radius: 5px;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.scroll_table::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
background: #666;
|
||||
}
|
||||
|
||||
.ult_bt {
|
||||
width: 20%;
|
||||
height: 80%;
|
||||
}
|
||||
|
||||
.info_bt{
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.search_bt{
|
||||
margin-left: 3%;
|
||||
margin-top: 0.8%;
|
||||
margin-bottom: 0.8%;
|
||||
}
|
||||
|
||||
.notFind{
|
||||
margin-top: 5%;
|
||||
text-align: center;
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
.search_table {
|
||||
margin-bottom: 1%;
|
||||
padding-bottom: 1%;
|
||||
border-bottom: solid 1px gray;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.search_tb {
|
||||
padding-right: 2%;
|
||||
padding-top: 0.2%;
|
||||
padding-bottom: 0.2%;
|
||||
}
|
||||
|
||||
.leftSearch_tb{
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.batchMsg{
|
||||
color: red;
|
||||
font-size: 120%;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
._form {
|
||||
width: 95%;
|
||||
margin-left: 3%;
|
||||
}
|
||||
|
||||
.result_info {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/*施設検索一覧ヘッダー*/
|
||||
.instSearchHeaderTable{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.instSearchHeaderTd{
|
||||
width: 24%;
|
||||
}
|
||||
|
||||
.instSearchHeaderTdCenter{
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.instSearchHeaderTdRight{
|
||||
text-align: right;
|
||||
padding-right: 2%;
|
||||
}
|
||||
|
||||
.instSearchButchMsg{
|
||||
/* font-size: 80%; */
|
||||
color: red;
|
||||
}
|
||||
|
||||
.instSearchHeader_bt{
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
|
||||
/*施設詳細*/
|
||||
.instInfoTable{
|
||||
margin-top: 1%;
|
||||
margin-left: 5%;
|
||||
margin-right: 2%;
|
||||
margin-bottom: 2%;
|
||||
width: 93%;
|
||||
}
|
||||
|
||||
.instInfoTableHalf1{
|
||||
margin-top: 1%;
|
||||
margin-left: 5%;
|
||||
margin-right: 2%;
|
||||
width: 93%;
|
||||
}
|
||||
|
||||
.instInfoTableHalf2{
|
||||
margin-top: -0.05%;
|
||||
margin-left: 5%;
|
||||
margin-right: 2%;
|
||||
margin-bottom: 2%;
|
||||
width: 93%;
|
||||
}
|
||||
|
||||
.instInfoColumn {
|
||||
width : 9%;
|
||||
height: 40px;
|
||||
background : rgb(225, 233, 250);
|
||||
border : solid 1px;
|
||||
}
|
||||
|
||||
.instData {
|
||||
background : rgb(244, 244, 244);
|
||||
border : solid 1px;
|
||||
padding-left : 0.5%;
|
||||
padding-right : 0.5%;
|
||||
padding-top: 0.25%;
|
||||
padding-bottom: 0.25%;
|
||||
}
|
||||
|
||||
.instDataMid{
|
||||
/*NO5修正前 width: 51%;*/
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
/*NO5にて追加 START*/
|
||||
.instDataLarge{
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
.instDataLeft{
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.instDataCenter{
|
||||
width: 7%;
|
||||
}
|
||||
|
||||
.instDataRight{
|
||||
width: 25%;
|
||||
}
|
||||
/*NO5にて追加 END*/
|
||||
|
||||
.instDataSmallTextbox{
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
/*NO5にて追加 START*/
|
||||
.instDataCenterTextbox{
|
||||
width: 80%;
|
||||
}
|
||||
/*NO5にて追加 END*/
|
||||
|
||||
.instInfoTextbox{
|
||||
width: 98%;
|
||||
padding-right: 1%;
|
||||
padding-left: 1%;
|
||||
}
|
||||
|
||||
.instCdTextbox{
|
||||
/*NO5修正前 width: 13%;*/
|
||||
width: 35%;
|
||||
margin-left: 0.5%;
|
||||
margin-right: 2%;
|
||||
}
|
||||
|
||||
.delReasonCdTextbox{
|
||||
/*NO5修正前 width: 2%;*/
|
||||
width: 5%;
|
||||
margin-left: 0.5%;
|
||||
margin-right: 1%;
|
||||
}
|
||||
|
||||
.delReasonTextbox{
|
||||
/*NO5修正前 width: 43%;*/
|
||||
width: 88%;
|
||||
margin-left: 0.5%;
|
||||
margin-right: 2%;
|
||||
}
|
||||
|
||||
.manageTextbox{
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.textboxMargin {
|
||||
margin-left : 0.1%;
|
||||
}
|
||||
|
||||
.transitionBt{
|
||||
width: 98%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.instHeaderTable{
|
||||
margin-left: 40%;
|
||||
}
|
||||
|
||||
.instHeaderTd{
|
||||
width: 10%;
|
||||
font-size: 140%;
|
||||
text-align: center;
|
||||
padding-right: 2%;
|
||||
}
|
||||
|
||||
.trtCourseTextbox{
|
||||
width: 6%;
|
||||
}
|
||||
|
||||
.bedTd{
|
||||
width: 46%;
|
||||
}
|
||||
|
||||
.bedTextbox{
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.xSmallTd{
|
||||
width: 9%;
|
||||
}
|
||||
|
||||
.xSmallTextbox{
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.reExamTd{
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.repreTd{
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.repreTextbox{
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.trtTextbox{
|
||||
width: 5%;
|
||||
margin-right: 1.2%;
|
||||
}
|
||||
|
||||
.parentCdTextBox{
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.parentNameTextBox{
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.hpInfoColumn{
|
||||
width : 12%;
|
||||
height: 40px;
|
||||
background : rgb(225, 233, 250);
|
||||
border : solid 1px;
|
||||
}
|
||||
|
||||
.hpAssrtTd{
|
||||
width: 12%;
|
||||
}
|
||||
|
||||
.hpAssrtTextbox{
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
.border_bottom_none {
|
||||
border-bottom-style:none;
|
||||
}
|
||||
|
||||
.numberBox{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/*医師検索*/
|
||||
/*ヘッダー*/
|
||||
.docHeaderTable{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.docHeaderTd{
|
||||
width: 24%;
|
||||
}
|
||||
|
||||
.docHeaderTdCenter{
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.docHeaderTdRight{
|
||||
text-align: right;
|
||||
padding-right: 2%;
|
||||
}
|
||||
|
||||
.docButchMsg{
|
||||
/* font-size: 80%; */
|
||||
color: red;
|
||||
}
|
||||
|
||||
.docHeader_bt{
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
/* アルトマーク課題管理表No.2の修正 8% → 10% */
|
||||
/* アルトマーク課題管理表No.8の修正 10% → 14% */
|
||||
.docSearchColumnTd{
|
||||
width: 14%;
|
||||
}
|
||||
|
||||
.docSearchTextboxTd{
|
||||
width: 18%;
|
||||
}
|
||||
|
||||
.docSearchTextbox_td{
|
||||
width: 94%;
|
||||
}
|
||||
|
||||
.docSearchTextbox{
|
||||
width: 90%;
|
||||
margin-right: 5%;
|
||||
margin-top: 0.8%;
|
||||
margin-bottom: 0.8%;
|
||||
}
|
||||
|
||||
.docSearchTableDivOne{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.docSearchTableDivTwo{
|
||||
margin-bottom: 1%;
|
||||
padding-bottom: 1%;
|
||||
border-bottom: solid 1px gray;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.docSearchScroll{
|
||||
overflow: auto;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 2%;
|
||||
width: 100%;
|
||||
height: 270px;
|
||||
}
|
||||
|
||||
.docSearchScroll::-webkit-scrollbar {
|
||||
height: 5px;
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
.docSearchScroll::-webkit-scrollbar-track {
|
||||
border-radius: 5px;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.docSearchScroll::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
background: #666;
|
||||
}
|
||||
|
||||
.allOnOffButton{
|
||||
width: 6%;
|
||||
}
|
||||
|
||||
/*医師情報*/
|
||||
.docInfoTable{
|
||||
margin-top: 1%;
|
||||
margin-left: 5%;
|
||||
margin-right: 2%;
|
||||
margin-bottom: 1%;
|
||||
width: 93%;
|
||||
border-bottom: solid 1px gray;
|
||||
}
|
||||
|
||||
.docInfoTd{
|
||||
padding-bottom: 0.5%;
|
||||
}
|
||||
|
||||
.docInfoTextBox{
|
||||
margin-left: 0.5%;
|
||||
margin-right: 2%;
|
||||
width: 8%;
|
||||
}
|
||||
|
||||
.docInfoTrtTextBox{
|
||||
margin-left: 0.5%;
|
||||
}
|
||||
|
||||
.docBelongTable{
|
||||
margin-left: 1%;
|
||||
width: 98%;
|
||||
border-bottom: solid 1px gray;
|
||||
}
|
||||
|
||||
.docBelongTd{
|
||||
width: 49%;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.docSocietyTable{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.scroll{
|
||||
overflow: auto;
|
||||
height: 120px;
|
||||
width: 90%;
|
||||
margin-left: 7%;
|
||||
margin-bottom: 4%;
|
||||
}
|
||||
|
||||
.scroll::-webkit-scrollbar {
|
||||
height: 5px;
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
.scroll::-webkit-scrollbar-track {
|
||||
border-radius: 5px;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.scroll::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
background: #666;
|
||||
}
|
||||
|
||||
.rightBoderLine{
|
||||
border-right: solid 1px gray;
|
||||
}
|
||||
|
||||
.wrkplaceH1{
|
||||
margin-top: 0.3%;
|
||||
}
|
||||
|
||||
.wrkplaceTable{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* 生物由来検索、施設検索共通*/
|
||||
|
||||
|
||||
|
||||
.clear_bt{
|
||||
margin-left: 120px;
|
||||
width: 60px
|
||||
}
|
||||
|
||||
.back_bt{
|
||||
margin-left: 1042px;
|
||||
width: 80px
|
||||
}
|
||||
|
||||
.noLine{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
/*アルトマーク施設検索*/
|
||||
|
||||
|
||||
/*共通:アルトマーク施設検索,医師検索,施設詳細*/
|
||||
.maxWidth_tb {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*アルトマーク施設検索,医師検索共通*/
|
||||
|
||||
.search_btTd {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.selection {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#page-1 {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
/*医師検索*/
|
||||
.search_middleTd {
|
||||
padding-right: 25px;
|
||||
width : 450px;
|
||||
}
|
||||
|
||||
.docSearchScroll_div {
|
||||
overflow: auto;
|
||||
height: 200px;
|
||||
width: 1132px;
|
||||
}
|
||||
|
||||
/*共通:施設詳細、医師詳細*/
|
||||
.transition{
|
||||
text-align: right;
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.data_width_middle {
|
||||
width : 300px;
|
||||
}
|
||||
|
||||
|
||||
.border_top_none {
|
||||
border-top-style:none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.textbox_margin_short {
|
||||
margin-left : 5px;
|
||||
}
|
||||
|
||||
.label_margin {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
/*医師詳細*/
|
||||
.docInfo_table{
|
||||
margin-bottom: 30px;
|
||||
border-bottom: solid 1px gray;
|
||||
width: 1132px;
|
||||
}
|
||||
|
||||
.small_tb{
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.docBelongScroll_div {
|
||||
overflow: auto;
|
||||
height: 100px;
|
||||
width: 500px;
|
||||
margin: 0px 30px 0px 30px;
|
||||
}
|
||||
|
||||
.rightPadding_table{
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
||||
|
||||
.docPlaceScroll_div {
|
||||
overflow: auto;
|
||||
height: 150px;
|
||||
width: 700px;
|
||||
margin: 0px 30px 0px 30px;
|
||||
}
|
||||
|
||||
.result_tr{
|
||||
overflow-y: scroll;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
.result_data{
|
||||
overflow-y: scroll;
|
||||
overflow-x: scroll;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
/* tablesoter */
|
||||
table.tablesorter {
|
||||
font-family:arial;
|
||||
background-color: #CDCDCD;
|
||||
font-size: 8pt;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
|
||||
background-color: #e6EEEE;
|
||||
border: 0.1px solid silver;
|
||||
font-size: 8pt;
|
||||
padding: 4px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
table.tablesorter thead tr .header {
|
||||
background-image: url(bg.gif);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right;
|
||||
cursor: pointer;
|
||||
}
|
||||
table.tablesorter tbody td {
|
||||
color: #3D3D3D;
|
||||
padding: 4px;
|
||||
background-color: #FFF;
|
||||
border: 0.1px solid silver;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.tablesorter tbody tr.odd td {
|
||||
background-color:#F0F0F6;
|
||||
}
|
||||
table.tablesorter thead tr .headerSortUp {
|
||||
background-image: url(asc.gif);
|
||||
}
|
||||
table.tablesorter thead tr .headerSortDown {
|
||||
background-image: url(desc.gif);
|
||||
}
|
||||
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
|
||||
background-color: #8dbdd8;
|
||||
}
|
||||
@ -135,26 +135,6 @@ $(function(){
|
||||
$(".send").prop('disabled',true);
|
||||
});
|
||||
|
||||
// チェックボックス全選択関数
|
||||
// 条件:チェックボックスのクラス名に"selectedページ数"というのがついていること
|
||||
// 条件:ボタンにクラス名 send がついていること
|
||||
function allOn(){
|
||||
var selected = ".selected" + tableCurrentPage + " input.checkbox";
|
||||
$(selected).prop("checked", true);
|
||||
$(".send").prop('disabled',false);
|
||||
}
|
||||
|
||||
// チェックボックス全解除関数
|
||||
// 条件:チェックボックスのクラス名に"selectedページ数"というのがついていること
|
||||
// 条件:ボタンにクラス名 send がついていること
|
||||
function allOff(pageCount){
|
||||
for (var i = 1; i <= pageCount; i++) {
|
||||
var selected = ".selected" + i + " input.checkbox";
|
||||
$(selected).prop("checked", false);
|
||||
}
|
||||
$(".send").prop('disabled',true);
|
||||
}
|
||||
|
||||
// 検索結果のところのボタンをチェックが1個でも付いたら押せるようにして、チェックがなければ押せないようにする関数
|
||||
// 条件:チェックボックスのクラス名に"selectedページ数"というのがついていること
|
||||
// 条件:ボタンにクラス名 send がついていること
|
||||
@ -211,3 +191,63 @@ function DisplayErrorDialog(strMesssage) {
|
||||
$("#errorTxt").html(strMesssage);
|
||||
$("#error").dialog("open");
|
||||
}
|
||||
|
||||
/* ult.jsから移植 */
|
||||
// チェックボックス全選択関数
|
||||
// 条件:チェックボックスのクラス名に"selected"というのがついていること
|
||||
// 条件:ボタンにクラス名 send がついていること
|
||||
function allOn(){
|
||||
$(".selected").prop("checked", true);
|
||||
$(".send").prop('disabled',false);
|
||||
}
|
||||
|
||||
// チェックボックス全解除関数
|
||||
// 条件:チェックボックスのクラス名に"selectedページ数"というのがついていること
|
||||
// 条件:ボタンにクラス名 send がついていること
|
||||
function allOff(){
|
||||
$(".selected").prop("checked", false);
|
||||
$(".send").prop('disabled',true);
|
||||
}
|
||||
|
||||
// 検索結果のところのボタンをチェックが1個でも付いたら押せるようにして、チェックがなければ押せないようにする関数
|
||||
// 条件:チェックボックスのクラス名に"selected"というのがついていること
|
||||
// 条件:ボタンにクラス名 send がついていること
|
||||
function resultBtDisablead(){
|
||||
var cnt1 = $('.checkNum input:checkbox:checked').length;
|
||||
console.log(cnt1);
|
||||
if(cnt1 == 0) {
|
||||
$(".send").prop('disabled',true);
|
||||
}
|
||||
else {
|
||||
$(".send").prop('disabled',false);
|
||||
}
|
||||
}
|
||||
|
||||
// Enter押下時にsubmitさせなくする
|
||||
$(function() {
|
||||
$(document).on("keypress", "input:not(.allow_submit)", function(event) {
|
||||
return event.which !== 13;
|
||||
});
|
||||
});
|
||||
|
||||
// 数字-以外を許さない入力チェック
|
||||
function checkNumberForm($this)
|
||||
{
|
||||
var str=$this.value;
|
||||
while(str.match(/[^\d\-]/))
|
||||
{
|
||||
str=str.replace(/[^\d\-]/,"");
|
||||
}
|
||||
$this.value=str;
|
||||
}
|
||||
|
||||
// 数字以外を許さない入力チェック
|
||||
function checkNumberOnlyForm($this)
|
||||
{
|
||||
var str=$this.value;
|
||||
while(str.match(/[^\d]/))
|
||||
{
|
||||
str=str.replace(/[^\d]/,"");
|
||||
}
|
||||
$this.value=str;
|
||||
}
|
||||
@ -1,5 +1,10 @@
|
||||
import os.path as path
|
||||
|
||||
# 日付テーブル.バッチ処理ステータス:未処理
|
||||
BATCH_STATUS_PROCESSING = '1'
|
||||
# 日付テーブル.dump取得状態区分:未処理
|
||||
DUMP_STATUS_UNPROCESSED = '0'
|
||||
|
||||
BIO_TEMPORARY_FILE_DIR_PATH = path.join(path.curdir, 'src', 'data')
|
||||
BIO_EXCEL_TEMPLATE_FILE_PATH = path.join(BIO_TEMPORARY_FILE_DIR_PATH, 'BioData_template.xlsx')
|
||||
|
||||
@ -112,18 +117,20 @@ LOGOUT_REASON_DO_LOGOUT = 'do_logout'
|
||||
LOGOUT_REASON_LOGIN_ERROR = 'login_error'
|
||||
LOGOUT_REASON_BATCH_PROCESSING = 'batch_processing'
|
||||
LOGOUT_REASON_BATCH_PROCESSING_FOR_MAINTE = 'batch_processing_ult'
|
||||
LOGOUT_REASON_BACKUP_PROCESSING = 'dump_processing'
|
||||
LOGOUT_REASON_NOT_LOGIN = 'not_login'
|
||||
LOGOUT_REASON_SESSION_EXPIRED = 'session_expired'
|
||||
LOGOUT_REASON_DB_ERROR = 'db_error'
|
||||
LOGOUT_REASON_UNEXPECTED = 'unexpected'
|
||||
|
||||
LOGOUT_REASON_MESSAGE_MAP = {
|
||||
LOGOUT_REASON_DO_LOGOUT: 'Logoutしました。',
|
||||
LOGOUT_REASON_LOGIN_ERROR: '存在しないユーザー、<br>またはパスワードが違います。',
|
||||
# 機能を利用できないとかでいいんじゃ
|
||||
LOGOUT_REASON_BATCH_PROCESSING: '日次バッチ処理中なので、<br>生物由来データ参照は使用出来ません。',
|
||||
LOGOUT_REASON_BATCH_PROCESSING_FOR_MAINTE: '日次バッチ処理中のため、<br>マスタ-メンテは使用出来ません。',
|
||||
# 使ってなさそう
|
||||
LOGOUT_REASON_BACKUP_PROCESSING: 'バックアップ取得を開始しました。<br>日次バッチ更新が終了するまでマスターメンテは使用できません',
|
||||
LOGOUT_REASON_NOT_LOGIN: 'Loginしてからページにアクセスしてください。',
|
||||
LOGOUT_REASON_SESSION_EXPIRED: 'セッションが切れています。<br>再度Loginしてください。',
|
||||
LOGOUT_REASON_DB_ERROR: 'DB接続に失敗しました。<br>再度Loginするか、<br>管理者にお問い合わせください。',
|
||||
LOGOUT_REASON_UNEXPECTED: '予期しないエラーが発生しました。<br>再度Loginするか、<br>管理者に問い合わせてください。'
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ DB_PASSWORD = os.environ['DB_PASSWORD']
|
||||
DB_SCHEMA = os.environ['DB_SCHEMA']
|
||||
|
||||
BIO_SEARCH_RESULT_MAX_COUNT = int(os.environ['BIO_SEARCH_RESULT_MAX_COUNT'])
|
||||
ULTMARC_SEARCH_RESULT_MAX_COUNT = int(os.environ['ULTMARC_SEARCH_RESULT_MAX_COUNT'])
|
||||
SESSION_EXPIRE_MINUTE = int(os.environ['SESSION_EXPIRE_MINUTE'])
|
||||
|
||||
LOG_LEVEL = os.environ.get('LOG_LEVEL', 'INFO')
|
||||
|
||||
@ -6,9 +6,12 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" integrity="sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
|
||||
<link rel="stylesheet" href="/static/css/pagenation.css">
|
||||
<link rel="stylesheet" href="/static/css/datepicker.css">
|
||||
<script src="https://code.jquery.com/jquery-3.6.3.min.js" integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
|
||||
<script src="https://pagination.js.org/dist/2.5.0/pagination.min.js" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr@4.6.13/dist/flatpickr.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr/dist/l10n/ja.min.js"></script>
|
||||
<script src="/static/function/businessLogicScript.js"></script>
|
||||
<script src="/static/lib/fixed_midashi.js"></script>
|
||||
|
||||
@ -5,10 +5,7 @@
|
||||
{% include '_header.html' %}
|
||||
{% endwith %}
|
||||
<link rel="stylesheet" href="/static/css/bioStyle.css">
|
||||
<link rel="stylesheet" href="/static/css/pagenation.css">
|
||||
<link rel="stylesheet" href="/static/css/datepicker.css">
|
||||
<script src="/static/lib/fixed_midashi.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {
|
||||
// 見出し固定初期化
|
||||
@ -184,7 +181,7 @@
|
||||
{% endif %}
|
||||
{% if bio.is_form_submitted() and bio.is_data_empty() %}
|
||||
<div class="resultAreaMsg">
|
||||
対象のデータが存在しません。
|
||||
対象のデータが存在しません
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
@ -290,6 +287,7 @@
|
||||
showNavigator: true,
|
||||
formatNavigator: '件数: <%= totalNumber %>件 ページ数: <%= totalPage %>',
|
||||
callback: function(data, pagination) {
|
||||
console.log(pagination.pageNumber)
|
||||
$('#result_data').html(pagination_content(data))
|
||||
}
|
||||
})
|
||||
@ -335,7 +333,6 @@
|
||||
'v_tran_cd',
|
||||
'iko_flg',
|
||||
];
|
||||
const tableRow = documen.sendt.createElement('tr')
|
||||
return datas.map(function (data) {
|
||||
return `
|
||||
<tr class="result_data">
|
||||
@ -343,7 +340,6 @@
|
||||
</tr>
|
||||
`
|
||||
})
|
||||
return tableRow
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
231
ecs/jskult-webapp/src/templates/docInfo.html
Normal file
231
ecs/jskult-webapp/src/templates/docInfo.html
Normal file
@ -0,0 +1,231 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
{% with subtitle = ultmarc.subtitle %}
|
||||
{% include '_header.html' %}
|
||||
{% endwith %}
|
||||
<title>医師情報</title>
|
||||
<link rel="stylesheet" href="/static/css/ultStyle.css">
|
||||
<script type="text/javascript">
|
||||
window.onload = function(){
|
||||
// 見出し固定初期化
|
||||
FixedMidashi.create();
|
||||
// ボタン、テキストボックス初期化
|
||||
formBtDisabled();
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(function(){
|
||||
// 前ページ遷移処理
|
||||
$('#prev').click(function(){
|
||||
$('#page_num').val(Number($('#page_num').val()) - 1);
|
||||
$('#instInfo').submit();
|
||||
});
|
||||
// 次ページ遷移処理
|
||||
$('#next').click(function(){
|
||||
$('#page_num').val(Number($('#page_num').val()) + 1);
|
||||
$('#instInfo').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table class="docHeaderTable">
|
||||
<tr>
|
||||
<td class="docHeaderTd"><h1>{{ultmarc.subtitle}}</h1></td>
|
||||
<td class="docHeaderTdCenter docHeaderTdCenter">
|
||||
{% if ultmarc.is_batch_processing %}
|
||||
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="docHeaderTd docHeaderTdRight"><button class="docHeader_bt" onclick="backToMenu()">メニューへ</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 上部のボタン -->
|
||||
<table class="instHeaderTable">
|
||||
<tr>
|
||||
<form id="instInfo" name="instInfo" method="post" action="/ultmarc/docInfo">
|
||||
<input type="hidden" name="doc_id" value="{{ultmarc.doc_id}}">
|
||||
<input type="hidden" name="page_num" id="page_num" value="{{ultmarc.page_num}}">
|
||||
<td class="instHeaderTd">
|
||||
<input type="button" name="prev" id="prev" value="前" class="transitionBt" {{ultmarc.is_disabled_prev()}}>
|
||||
</td>
|
||||
<td class="instHeaderTd">
|
||||
{{ultmarc.is_page_num_view()}}/{{ultmarc.post_cnt}}
|
||||
</td>
|
||||
<td class="instHeaderTd">
|
||||
<input type="button" name="next" id="next" value="次" class="transitionBt" {{ultmarc.is_disabled_next()}}>
|
||||
</td>
|
||||
</form>
|
||||
<form id="instSearch" name="instSearch" method="post" action="/ultmarc/docSearch">
|
||||
<script>
|
||||
var form = document.getElementById("instSearch");
|
||||
for (var i = 0, length = sessionStorage.length; i < length; ++i) {
|
||||
let key = sessionStorage.key(i);
|
||||
let value = sessionStorage.getItem(key);
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute('type', 'text');
|
||||
input.value = value;
|
||||
input.name = key;
|
||||
form.appendChild(input);
|
||||
}
|
||||
|
||||
</script>
|
||||
<td class="instHeaderTd">
|
||||
<input type="submit" name="ctrl_docBackBt" class="transitionBt" value="医師検索一覧へ">
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="docInfoTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="docInfoTd">医師コード:</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.doctor_info_data.dcf_pcf_dr_cd or ''}}"></td>
|
||||
<td>氏名(漢字):</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.doctor_info_data.dr_name or ''}}"></td>
|
||||
<td>氏名(カナ):</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.doctor_info_data.dr_name_kana or ''}}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="docInfoTd">性別:</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.doctor_info_data.sex or ''}}"></td>
|
||||
<td>生年月日:</td>
|
||||
<td><input type="text" readonly="readonly" value="{{ultmarc.is_input_birthday_format()}}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="docInfoTd">
|
||||
出身大学:
|
||||
<input class="docInfoTextBox" type="text" readonly="readonly" value="{{ultmarc.doctor_info_data.alma or ''}}">
|
||||
出身県:
|
||||
<input class="docInfoTextBox" type="text" readonly="readonly" value="{{ultmarc.doctor_info_data.hometown or ''}}">
|
||||
卒年:
|
||||
<input class="docInfoTextBox" type="text" readonly="readonly" value="{{ultmarc.doctor_info_data.grad_y or ''}}">
|
||||
登録年:
|
||||
<input class="docInfoTextBox" type="text" readonly="readonly" value="{{ultmarc.doctor_info_data.drday_y or ''}}">
|
||||
開業年:
|
||||
<input class="docInfoTextBox" type="text" readonly="readonly" value="{{ultmarc.doctor_info_data.estab_y or ''}}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="6" class="docInfoTd">
|
||||
診療科目:
|
||||
{% for trt_coursed_data in ultmarc.trt_coursed_data %}
|
||||
<input class="docInfoTrtTextBox" type="text" readonly="readonly" value="{{trt_coursed_data.trt_course_name or ''}}">
|
||||
{% endfor %}
|
||||
{% for i in range(5-ultmarc.is_input_trt_course_data_size())%}
|
||||
<input class="docInfoTrtTextBox" type="text" readonly="readonly" value="">
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 所属学会,所属学会専門医 -->
|
||||
<table class="docBelongTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="docBelongTd rightBoderLine">
|
||||
<h1>所属学会</h1>
|
||||
<div class="scroll">
|
||||
<table class="tablesorter docSocietyTable" _fixedhead='rows:1; cols:0;'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>コード</th>
|
||||
<th>所属学会</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for sosiety_data in ultmarc.sosiety_data %}
|
||||
<tr>
|
||||
<td>{{sosiety_data.sosiety_cd or ' '}}</td>
|
||||
<td>{{sosiety_data.sosiety_name or ' '}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td class="docBelongTd">
|
||||
<h1>所属学会専門医</h1>
|
||||
<div class="scroll">
|
||||
<table class="tablesorter docSocietyTable" _fixedhead='rows:1; cols:0; border-color:gray; border-width:2px;'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>コード</th>
|
||||
<th>専門医資格名</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for specialist_license_data in ultmarc.specialist_license_data %}
|
||||
<tr>
|
||||
<td>{{specialist_license_data.specialist_cd or ' '}}</td>
|
||||
<td>{{specialist_license_data.specialist_license_name or ' '}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 勤務先履歴 -->
|
||||
<h1 class="wrkplaceH1">勤務先履歴</h1>
|
||||
<div class="scroll">
|
||||
<table class="tablesorter wrkplaceTable" _fixedhead='rows:1; cols:0; border-color:gray; border-width:2px;'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ULT施設コード</th>
|
||||
<th>勤務先略名</th>
|
||||
<th>所属部科名</th>
|
||||
<th>役職名</th>
|
||||
<th>職位</th>
|
||||
<th>開始年月日</th>
|
||||
<th>終了年月日</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<script>
|
||||
function OnLinkClick(){
|
||||
sessionStorage.clear();
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<tbody>
|
||||
{% for doctor_wrkplace_data in ultmarc.doctor_wrkplace_data %}
|
||||
{% if doctor_wrkplace_data.dcf_dsf_inst_cd %}
|
||||
<tr>
|
||||
<td><a href="/ultmarc/instInfo?id={{doctor_wrkplace_data.dcf_dsf_inst_cd or ''}}" onclick="OnLinkClick();">
|
||||
{{doctor_wrkplace_data.dcf_dsf_inst_cd or ''}}</a></td>
|
||||
<td>{{doctor_wrkplace_data.inst_name_kanji or ''}}</td>
|
||||
<td>{{doctor_wrkplace_data.blng_sec_name or ''}}</td>
|
||||
<td>{{doctor_wrkplace_data.univ_post_name or ''}}</td>
|
||||
<td>{{doctor_wrkplace_data.post_name or ''}}</td>
|
||||
<td>{{ultmarc.is_input_aply_start_ymd_format(doctor_wrkplace_data.aply_start_ymd)}}</td>
|
||||
<td>9999/99/99</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for doctor_wrkplace_his_data in ultmarc.doctor_wrkplace_his_data %}
|
||||
{% if doctor_wrkplace_his_data.dcf_dsf_inst_cd %}
|
||||
<tr>
|
||||
<td><a href="/ultmarc/instInfo?id={{doctor_wrkplace_his_data.dcf_dsf_inst_cd or ''}}" onclick="OnLinkClick();">
|
||||
{{doctor_wrkplace_his_data.dcf_dsf_inst_cd or ''}}</a></td>
|
||||
<td>{{doctor_wrkplace_his_data.inst_name_kanji or ''}}</td>
|
||||
<td>{{doctor_wrkplace_his_data.blng_sec_name or ''}}</td>
|
||||
<td>{{doctor_wrkplace_his_data.univ_post_name or ''}}</td>
|
||||
<td>{{doctor_wrkplace_his_data.post_name or ''}}</td>
|
||||
<td>{{ultmarc.is_input_his_aply_start_ymd_format(doctor_wrkplace_his_data.aply_start_ymd)}}</td>
|
||||
<td>{{ultmarc.is_input_his_aply_end_ymd_format(doctor_wrkplace_his_data.aply_end_ymd)}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
266
ecs/jskult-webapp/src/templates/docSearch.html
Normal file
266
ecs/jskult-webapp/src/templates/docSearch.html
Normal file
@ -0,0 +1,266 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
{% with subtitle = ultmarc.subtitle %}
|
||||
{% include '_header.html' %}
|
||||
{% endwith %}
|
||||
<link rel="stylesheet" href="/static/css/ultStyle.css">
|
||||
|
||||
<script type="text/javascript">
|
||||
window.onload = function(){
|
||||
// 見出し固定初期化
|
||||
FixedMidashi.create();
|
||||
// ボタン、テキストボックス初期化
|
||||
formBtDisabled();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<!--検索フォーム-->
|
||||
<body>
|
||||
<table class="docHeaderTable">
|
||||
<tr>
|
||||
<td class="docHeaderTd"><h1>{{ultmarc.subtitle}}</h1></td>
|
||||
<td class="docHeaderTdCenter docHeaderTdCenter">
|
||||
{% if ultmarc.is_batch_processing %}
|
||||
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="docHeaderTd docHeaderTdRight"><button class="docHeader_bt" onclick="backToMenu()">メニューへ</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
<form id="doctor_search" class="_form" name="search" action="/ultmarc/docSearch" method="POST">
|
||||
<table class="docSearchTableDivTwo">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="docSearchColumnTd">医師コード:</td>
|
||||
<td class="docSearchTextboxTd">
|
||||
<input class="text docSearchTextbox" style="ime-mode:disabled;" type="text" name="ctrl_dcf_pcf_dr_cd"
|
||||
value="{{ultmarc.is_input_dcf_pcf_dr_cd()}}" maxlength='10' oninput="formBtDisabled()">
|
||||
</td>
|
||||
<td class="docSearchColumnTd">氏名(漢字):</td>
|
||||
<td class="docSearchTextboxTd">
|
||||
<input class="text docSearchTextbox" type="text" name="ctrl_dr_name"
|
||||
value="{{ultmarc.is_input_dr_name()}}" oninput="formBtDisabled()">
|
||||
</td>
|
||||
<td class="docSearchColumnTd">氏名(かな・カナ):</td>
|
||||
<td class="docSearchTextboxTd">
|
||||
<input class="text docSearchTextbox" type="text" name="ctrl_dr_name_kana"
|
||||
value="{{ultmarc.is_input_dr_name_kana()}}" oninput="formBtDisabled()">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="docSearchColumnTd">勤務先コード:</td>
|
||||
<td class="docSearchTextboxTd">
|
||||
<input class="text docSearchTextbox" style="ime-mode:disabled;" type="text" name="ctrl_dcf_dsf_inst_cd"
|
||||
value="{{ultmarc.is_input_dcf_dsf_inst_cd()}}" maxlength='11' oninput="formBtDisabled()">
|
||||
</td>
|
||||
<td class="docSearchColumnTd">勤務先名(漢字):</td>
|
||||
<td class="docSearchTextboxTd">
|
||||
<input class="text docSearchTextbox" type="text" name="ctrl_form_inst_name_kanji"
|
||||
value="{{ultmarc.is_input_form_inst_name_kanji()}}" oninput="formBtDisabled()">
|
||||
</td>
|
||||
<td class="docSearchColumnTd">勤務先名(かな・カナ):</td>
|
||||
<td class="docSearchTextboxTd">
|
||||
<input class="text docSearchTextbox" type="text" name="ctrl_form_inst_name_kana"
|
||||
value="{{ultmarc.is_input_form_inst_name_kana()}}" oninput="formBtDisabled()">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="docSearchColumnTd">勤務先都道府県:</td>
|
||||
<td class="search_tb">
|
||||
<!-- 都道府県のドロップダウン -->
|
||||
<select class="text search_dropdown" name="ctrl_prefc_cd" onchange="formBtDisabled()" onkeyup="formBtDisablead()">
|
||||
<!-- 都道府県ドロップダウンの中身を作成 -->
|
||||
<option value=""></option>
|
||||
{% for prefc in ultmarc.prefc_models %}
|
||||
<option
|
||||
value="{{prefc['prefc_cd']}}" {{ultmarc.is_selected_prefc_cd(prefc['prefc_cd'])}}>
|
||||
{{prefc['prefc_name']}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td class="docSearchColumnTd">所属部科(漢字):</td>
|
||||
<td class="docSearchTextboxTd">
|
||||
<input class="text docSearchTextbox" type="text" name="ctrl_blng_sec_name"
|
||||
value="{{ultmarc.is_input_blng_sec_name()}}" oninput="formBtDisabled()">
|
||||
</td>
|
||||
<td class="docSearchColumnTd">診療科目(漢字):</td>
|
||||
<td class="docSearchTextboxTd">
|
||||
<input class="text docSearchTextbox" type="text" name="ctrl_trt_course_name"
|
||||
value="{{ultmarc.is_input_trt_course_name()}}" oninput="formBtDisabled()">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="docSearchColumnTd">出身大学(漢字):</td>
|
||||
<td class="docSearchTextboxTd">
|
||||
<input class="text docSearchTextbox" type="text" name="ctrl_alma"
|
||||
value="{{ultmarc.is_input_alma()}}" oninput="formBtDisabled()">
|
||||
</td>
|
||||
<td class="docSearchColumnTd">卒年:</td>
|
||||
<td class="docSearchTextboxTd"><input class="text docSearchTextbox" style="ime-mode:disabled;" type="text" name="ctrl_grad_y"
|
||||
value="{{ultmarc.is_input_grad_y()}}" maxlength='4' oninput="formBtDisabled()"></td>
|
||||
<td class="search_btTd" colspan="2">
|
||||
<input class="text ult_bt search_bt" id="clear" type="button" name="clear_bt" value="クリア" onclick="clr();">
|
||||
<input class="ult_bt search_bt" id="search_bt" name="search_bt" value="検索" type="submit">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<!--検索結果-->
|
||||
<form id="doctor_info" class="_form" name="result" action="/ultmarc/docInfo" method="POST" onsubmit="CheckBoxListProcessing()">
|
||||
<input type="button" name="allon" onclick="allOn();resultBtDisablead()" value="全選択" class="ult_bt allOnOffButton" {{ultmarc.disabled_button()}}>
|
||||
<input type="button" name="alloff" onclick="allOff();resultBtDisablead()" value="全解除" class="ult_bt allOnOffButton" {{ultmarc.disabled_button()}}>
|
||||
<input type="hidden" name="doc_id" id="doc_id" value="">
|
||||
<input type="hidden" name="page_num" value="0">
|
||||
|
||||
<!--検索件数-->
|
||||
<!--ページネーション-->
|
||||
<div id="light-pagination" class="pagination"></div>
|
||||
<!--検索結果表示テーブル-->
|
||||
<div class="docSearchScroll">
|
||||
<table class="tablesorter instSearchResult" _fixedhead="rows:1; cols:1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>医師コード</th>
|
||||
<th>氏名</th>
|
||||
<th>勤務先名</th>
|
||||
<th>所属部科</th>
|
||||
<th>診療科目</th>
|
||||
<th>役職名</th>
|
||||
<th>出身大学</th>
|
||||
<th>卒年</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="result_data" class="result_data"></tbody>
|
||||
|
||||
</table>
|
||||
{% if ultmarc.is_form_submitted() and ultmarc.is_data_overflow_max_length() %}
|
||||
<div class="notFind">
|
||||
検索件数が500件を超えています 検索項目を見直してください
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if ultmarc.is_form_submitted() and ultmarc.is_data_empty() %}
|
||||
<div class="notFind">
|
||||
対象のデータが存在しません。
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<!--操作ボタン-->
|
||||
<input class="ult_bt info_bt" type="submit" name="detail" value="医師情報" disabled>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
// <! --ページネーションの作成-- >
|
||||
$(function() {
|
||||
let searchResultData = [];
|
||||
// {% if not ultmarc.is_data_overflow_max_length() and not ultmarc.is_data_empty() %}
|
||||
// スピナー出さない場合は以下、エスケープせず埋め込む
|
||||
// {% autoescape False%}
|
||||
const searchResultString = '{{ultmarc.ultmarc_data_json_str()}}';
|
||||
// {% endautoescape%}
|
||||
searchResultData = JSON.parse(searchResultString);
|
||||
// {% endif %}
|
||||
|
||||
// 検索条件をセッションに入れる
|
||||
sessionStorage.clear();
|
||||
sessionStorage.setItem('ctrl_dcf_pcf_dr_cd','{{ultmarc.is_input_dcf_pcf_dr_cd()}}');
|
||||
sessionStorage.setItem('ctrl_dr_name','{{ultmarc.is_input_dr_name()}}');
|
||||
sessionStorage.setItem('ctrl_dr_name_kana','{{ultmarc.is_input_dr_name_kana()}}');
|
||||
sessionStorage.setItem('ctrl_dcf_dsf_inst_cd','{{ultmarc.is_input_dcf_dsf_inst_cd()}}');
|
||||
sessionStorage.setItem('ctrl_form_inst_name_kanji','{{ultmarc.is_input_form_inst_name_kanji()}}');
|
||||
sessionStorage.setItem('ctrl_form_inst_name_kana','{{ultmarc.is_input_form_inst_name_kana()}}');
|
||||
sessionStorage.setItem('ctrl_prefc_cd','{{ultmarc.is_input_form_prefc_cd()}}');
|
||||
sessionStorage.setItem('ctrl_blng_sec_name','{{ultmarc.is_input_blng_sec_name()}}');
|
||||
sessionStorage.setItem('ctrl_trt_course_name','{{ultmarc.is_input_trt_course_name()}}');
|
||||
sessionStorage.setItem('ctrl_alma','{{ultmarc.is_input_alma()}}');
|
||||
sessionStorage.setItem('ctrl_grad_y','{{ultmarc.is_input_grad_y()}}');
|
||||
|
||||
// ページネーションのページ番号取得
|
||||
let pagination_page_number = Number('{{ultmarc.init_pagination_page_number()}}');
|
||||
|
||||
$(".pagination").pagination({
|
||||
dataSource: function(done) {
|
||||
done(searchResultData)
|
||||
},
|
||||
pageNumber: pagination_page_number, // 初期ページ番号
|
||||
pageSize: 50, //表示するコンテンツ数
|
||||
pageRange: 1, //選択されているページネーション番号の両隣に表示する個数
|
||||
ellipsisText: '...', //省略文字
|
||||
prevText: 'Prev', //「前へ」の文字。エスケープ文字
|
||||
nextText: 'Next', //「次へ」の文字。エスケープ文字
|
||||
showNavigator: true,
|
||||
formatNavigator: '件数: <%= totalNumber %>件 ページ数: <%= totalPage %>',
|
||||
callback: function(data, pagination) {
|
||||
sessionStorage.setItem('pagination_page_number',pagination.pageNumber);
|
||||
$('#result_data').html(pagination_content(data));
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function OnLinkClick(){
|
||||
sessionStorage.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
function pagination_content(datas) {
|
||||
const display_keys = [
|
||||
'dcf_pcf_dr_cd',
|
||||
'dr_name',
|
||||
'dcf_dsf_inst_cd',
|
||||
'blng_sec_name',
|
||||
'trt_course_name',
|
||||
'form_post_name',
|
||||
'alma',
|
||||
'grad_y'
|
||||
];
|
||||
return datas.map(function (data) {
|
||||
let td = display_keys.map((key) =>{
|
||||
let inner_content = data[key];
|
||||
if(key=='dcf_pcf_dr_cd')
|
||||
inner_content = `<a href="/ultmarc/docInfo?id=${data['dcf_pcf_dr_cd']}">${data['dcf_pcf_dr_cd'] || ''}</a>`;
|
||||
if(key=='dcf_dsf_inst_cd')
|
||||
inner_content = `<a href="/ultmarc/instInfo?id=${data['dcf_dsf_inst_cd']}" onclick="OnLinkClick()">${data['form_inst_name_kanji'] || ''}</a>`;
|
||||
return `<td>${inner_content || ''}</td>`
|
||||
});
|
||||
return `
|
||||
<tr class="result_data">
|
||||
<td><div class="checkNum">
|
||||
<input type="checkbox" class="checkbox selected" name="data" onclick="resultBtDisablead()"
|
||||
value=${data['dcf_pcf_dr_cd']}>
|
||||
</div></td>
|
||||
${td}
|
||||
</tr>
|
||||
`
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// チェックボックスのチェックされている場合、施設情報ボタンを活性化させる
|
||||
function resultBtDisablead(){
|
||||
var checkboxes = $('input[name="data"]:checked').length;
|
||||
if(checkboxes == 0) {
|
||||
$(".info_bt").prop('disabled',true);
|
||||
}
|
||||
else {
|
||||
$(".info_bt").prop('disabled',false);
|
||||
}
|
||||
}
|
||||
|
||||
// 検索結果のうち、チェックされている行のデータを非表示項目に詰め込む
|
||||
function CheckBoxListProcessing()
|
||||
{
|
||||
let vals = []; // 配列を定義
|
||||
$('input[name="data"]:checked').each(function() {
|
||||
vals.push( $(this).val() ); // 配列に値を追加
|
||||
});
|
||||
$("#doc_id").val(vals.join(','));
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
12
ecs/jskult-webapp/src/templates/instEmpCsvDL.html
Normal file
12
ecs/jskult-webapp/src/templates/instEmpCsvDL.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
{% with subtitle = view.subtitle %}
|
||||
{% include '_header.html' %}
|
||||
{% endwith %}
|
||||
<link href="/static/css/masterMainte.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>施設担当者データCSVダウンロード</h1>
|
||||
</body>
|
||||
</html>
|
||||
13
ecs/jskult-webapp/src/templates/instEmpCsvUL.html
Normal file
13
ecs/jskult-webapp/src/templates/instEmpCsvUL.html
Normal file
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
{% with subtitle = view.subtitle %}
|
||||
{% include '_header.html' %}
|
||||
{% endwith %}
|
||||
<!-- TODO: CSS変える -->
|
||||
<link href="/static/css/masterMainte.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>施設担当者データCSVアップロード</h1>
|
||||
</body>
|
||||
</html>
|
||||
287
ecs/jskult-webapp/src/templates/instInfo.html
Normal file
287
ecs/jskult-webapp/src/templates/instInfo.html
Normal file
@ -0,0 +1,287 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
{% with subtitle = ultmarc.subtitle %}
|
||||
{% include '_header.html' %}
|
||||
{% endwith %}
|
||||
<link rel="stylesheet" href="/static/css/ultStyle.css">
|
||||
|
||||
<script type="text/javascript">
|
||||
window.onload = function(){
|
||||
// 見出し固定初期化
|
||||
FixedMidashi.create();
|
||||
// ボタン、テキストボックス初期化
|
||||
formBtDisabled();
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(function(){
|
||||
// 前ページ遷移処理
|
||||
$('#prev').click(function(){
|
||||
$('#page_num').val(Number($('#page_num').val()) - 1);
|
||||
$('#instInfo').submit();
|
||||
});
|
||||
// 次ページ遷移処理
|
||||
$('#next').click(function(){
|
||||
$('#page_num').val(Number($('#page_num').val()) + 1);
|
||||
$('#instInfo').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>
|
||||
{{ultmarc.subtitle}}
|
||||
</h1>
|
||||
{% if ultmarc.is_batch_processing %}
|
||||
<div class="docButchMsg" style="text-align: center">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- 上部のボタン -->
|
||||
<table class="instHeaderTable">
|
||||
<tr>
|
||||
<form name="docSearch" method="post" action="/ultmarc/docSearch">
|
||||
<td class="instHeaderTd">
|
||||
<input type="hidden" name="ctrl_dcf_dsf_inst_cd" value="{{ultmarc.inst_info_data.dcf_dsf_inst_cd or ''}}">
|
||||
<input name="docSearchBt" class="transitionBt" type="submit" value="勤務医師" {{ultmarc.is_disabled_doctor_wrkplace()}}>
|
||||
</td>
|
||||
</form>
|
||||
<form id="instInfo" name="instInfo" method="post" action="/ultmarc/instInfo">
|
||||
<input type="hidden" name="inst_id" value="{{ultmarc.inst_id}}">
|
||||
<input type="hidden" name="page_num" id="page_num" value="{{ultmarc.page_num}}">
|
||||
<td class="instHeaderTd">
|
||||
<input type="button" name="prev" id="prev" value="前" class="transitionBt" {{ultmarc.is_disabled_prev()}}>
|
||||
</td>
|
||||
<td class="instHeaderTd">
|
||||
{{ultmarc.is_page_num_view()}}/{{ultmarc.post_cnt}}
|
||||
</td>
|
||||
<td class="instHeaderTd">
|
||||
<input type="button" name="next" id="next" value="次" class="transitionBt" {{ultmarc.is_disabled_next()}}>
|
||||
</td>
|
||||
</form>
|
||||
<form id="instSearch" name="instSearch" method="" action="/ultmarc/instSearch" onsubmit="chg_send_method()">
|
||||
<script>
|
||||
var form = document.getElementById("instSearch");
|
||||
for (var i = 0, length = sessionStorage.length; i < length; ++i) {
|
||||
let key = sessionStorage.key(i);
|
||||
let value = sessionStorage.getItem(key);
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute('type', 'text');
|
||||
input.value = value;
|
||||
input.name = key;
|
||||
form.appendChild(input);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<td class="instHeaderTd">
|
||||
<input type="submit" name="instSearchBt" class="transitionBt" value="施設検索一覧へ">
|
||||
</td>
|
||||
</form>
|
||||
<script>
|
||||
function chg_send_method(){
|
||||
if(sessionStorage.length == 0){
|
||||
$('#instSearch')('method', 'GET');
|
||||
}else{
|
||||
$('#instSearch').attr('method', 'POST');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- 施設情報 -->
|
||||
<table class="instInfoTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="instInfoColumn">施設コード</td>
|
||||
<td class="instData instDataLeft">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.dcf_dsf_inst_cd or ''}}" class="instCdTextbox">
|
||||
<input class="checkbox" type="checkbox" disabled="disabled" {{ultmarc.is_checked_unconf_flg()}}>未確認
|
||||
</td>
|
||||
<td class="instInfoColumn">施設コード変換先</td>
|
||||
<td class="instData instDataCenter">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.dup_opp_cd or ''}}" class="instDataCenterTextbox">
|
||||
</td>
|
||||
<td class="instInfoColumn">休院店開始年月</td>
|
||||
<td class="instData instDataRight">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.close_start_ym or ''}}" class="instDataSmallTextbox">
|
||||
<input type="checkbox" disabled="disabled" {{ultmarc.is_checked_close_flg()}}>休院店
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="instInfoColumn">削除予定理由</td>
|
||||
<td class="instData instDataLeft">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.delete_sche_reason_cd or ''}}" class="delReasonCdTextbox">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.delete_sche_reason or ''}}" class="delReasonTextbox"></td>
|
||||
<td class="instInfoColumn">削除日</td>
|
||||
<td class="instData instDataCenter">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.abolish_ymd or ''}}" class="instDataCenterTextbox">
|
||||
</td>
|
||||
<td class="instInfoColumn">開業予定年月</td>
|
||||
<td class="instData instDataRight">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.estab_sche_ym or ''}}" class="instDataSmallTextbox">
|
||||
<input type="checkbox" disabled="disabled" {{ultmarc.is_checked_estab_sche_flg()}}>開業
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="instInfoColumn">正式施設名(カナ)</td>
|
||||
<td class="instData" colspan="5"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.form_inst_name_kana or ''}}" class="instInfoTextbox"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="instInfoColumn">正式施設名(漢字)</td>
|
||||
<td class="instData" colspan="5"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.form_inst_name_kanji or ''}}" class="instInfoTextbox"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="instInfoColumn">略式施設名(カナ)</td>
|
||||
<td class="instData instDataMid" colspan="3"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.inst_name_kana or ''}}" class="instInfoTextbox"></td>
|
||||
<td class="instInfoColumn">施設区分名</td>
|
||||
<td class="instData instDataSmall"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.inst_div_name or ''}}" class="instInfoTextbox"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="instInfoColumn">略式施設名(漢字)</td>
|
||||
<td class="instData instDataMid" colspan="3"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.inst_name_kanji or ''}}" class="instInfoTextbox"></td>
|
||||
<td class="instInfoColumn">経営体</td>
|
||||
<td class="instData instDataSmall">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.manage_cd or ''}}" class="manageTextbox">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.manage_name or ''}}" class="textboxMargin manageTextbox">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="instInfoColumn">郵便番号</td>
|
||||
<td class="instData instDataMid" colspan="3">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.postal_number or ''}}">
|
||||
<input type="checkbox" class="checkboxMargin" disabled="disabled" {{ultmarc.is_checked_addr_unknown_reason_cd()}}>住所不明
|
||||
</td>
|
||||
<td class="instInfoColumn">施設電話番号</td>
|
||||
<td class="instData instDataRight">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.inst_phone_number or ''}}" class="instDataSmallTextbox">
|
||||
<input type="checkbox" class="checkboxMargin" disabled="disabled" {{ultmarc.is_checked_phone_number_non_flg()}}>電話なし
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="instInfoColumn">住所(カナ)</td>
|
||||
<td class="instData instDataLarge" colspan="5"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.inst_addr_kana or ''}}" class="instInfoTextbox"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="instInfoColumn">住所(漢字)</td>
|
||||
<td class="instData instDataLarge" colspan="5"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.inst_addr or ''}}" class="instInfoTextbox"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- 病院情報 -->
|
||||
<table class="instInfoTableHalf1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="hpInfoColumn">病院種別</td>
|
||||
<td class="instData hpAssrtTd"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.hp_assrt_name or ''}}" class="hpAssrtTextbox"></td>
|
||||
<td class="instData reExamTd"><input type="checkbox" disabled="disabled" {{ultmarc.is_checked_re_exam_cd()}}>再審査区分</input></td>
|
||||
<td class="hpInfoColumn">関連大学親名</td>
|
||||
<td class="instData">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.rltd_univ_prnt_cd or ''}}" class="parentCdTextBox">
|
||||
<input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.parent_name or ''}}" class="parentNameTextBox">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hpInfoColumn">診療科目</td>
|
||||
<td class="instData border_bottom_none" colspan="4">
|
||||
{% if ultmarc.inst_trt_coursed_data != None %}
|
||||
{% for inst_trt_course_data in ultmarc.inst_trt_coursed_data %}
|
||||
<input class="trtCourseTextbox" type="text" readonly="readonly" value="{{inst_trt_course_data.trt_course_name_abb or ''}}">
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% for i in range(60-ultmarc.is_input_inst_trt_course_data_size()) %}
|
||||
<input class="trtCourseTextbox" type="text" readonly="readonly">
|
||||
{% endfor %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hpInfoColumn">検査工程</td>
|
||||
<td class="instData" colspan="4">
|
||||
<label>微生物</label>
|
||||
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.insp_item_micrb or ''}}">
|
||||
<label>血清</label>
|
||||
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.insp_item_serum or ''}}">
|
||||
<label>血液</label>
|
||||
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.insp_item_blood or ''}}">
|
||||
<label>病理</label>
|
||||
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.insp_item_patho or ''}}">
|
||||
<label>寄生虫</label>
|
||||
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.insp_item_paras or ''}}">
|
||||
<label>生化</label>
|
||||
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.insp_item_biochem or ''}}">
|
||||
<label>RI</label>
|
||||
<input class="trtTextbox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.insp_item_ri or ''}}">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="instInfoTableHalf2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="hpInfoColumn">特務医務室</td>
|
||||
<td class="instData xSmallTd"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.dcf_prnt_inst_cd or ''}}" class="xSmallTextbox"></td>
|
||||
<td rowspan="2" class="hpInfoColumn">許可病床数</td>
|
||||
<td class="instData bedTd" rowspan="2">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>一般</td>
|
||||
<td>療養</td>
|
||||
<td>精神</td>
|
||||
<td>感染症</td>
|
||||
<td>結核</td>
|
||||
<td>その他</td>
|
||||
<td>合計</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.prmit_bed_num_gen or ''}}"></td>
|
||||
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.prmit_bed_num_rcup or ''}}"></td>
|
||||
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.prmit_bed_num_mental or ''}}"></td>
|
||||
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.prmit_bed_num_infection or ''}}"></td>
|
||||
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.prmit_bed_num_tuber or ''}}"></td>
|
||||
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.prmit_bed_num_other or ''}}"></td>
|
||||
<td><input class="bedTextbox numberBox" type="text" readonly="readonly" value="{{ultmarc.inst_info_data.prmit_bed_num_sum or ''}}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td class="instData" colspan="2"><input type="checkbox" disabled="disabled" {{ultmarc.is_checked_ward_abolish_flg()}}>病棟閉鎖 <input type="checkbox" disabled="disabled" {{ultmarc.is_checked_ward_abolish_flg_part()}}>一部病棟閉鎖</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hpInfoColumn">病床数(定員)</td>
|
||||
<td class="instData"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.bed_num or ''}}" class="xSmallTextbox numberBox"></td>
|
||||
<td class="hpInfoColumn">メンテ年月日</td>
|
||||
<td class="instData xSmallTd"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.prmit_bed_maint_ymd or ''}}" class="repreTextbox"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 施設代表者 -->
|
||||
<table class="instInfoTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="instInfoColumn">代表者個人コード</td>
|
||||
<td class="instData repreTd"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.inst_repre_cd or ''}}" class="repreTextbox"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="instInfoColumn">施設代表者(カナ)</td>
|
||||
<td class="instData repreTd"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.inst_repre_kana or ''}}" class="repreTextbox"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="instInfoColumn">施設代表者(漢字)</td>
|
||||
<td class="instData repreTd"><input type="text" readonly="readonly" value="{{ultmarc.inst_info_data.inst_repre or ''}}" class="repreTextbox"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="instInfoColumn">修正年月日</td>
|
||||
<td class="instData repreTd"><input type="text" readonly="readonly" value="{{ultmarc.is_input_sys_update_date()}}" class="repreTextbox"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
264
ecs/jskult-webapp/src/templates/instSearch.html
Normal file
264
ecs/jskult-webapp/src/templates/instSearch.html
Normal file
@ -0,0 +1,264 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
{% with subtitle = ultmarc.subtitle %}
|
||||
{% include '_header.html' %}
|
||||
{% endwith %}
|
||||
<link rel="stylesheet" href="/static/css/ultStyle.css">
|
||||
|
||||
<script type="text/javascript">
|
||||
window.onload = function(){
|
||||
// 見出し固定初期化
|
||||
FixedMidashi.create();
|
||||
// ボタン、テキストボックス初期化
|
||||
formBtDisabled();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<!--検索フォーム-->
|
||||
<body>
|
||||
<!-- タイトルと上部ボタン -->
|
||||
<table class="instSearchHeaderTable">
|
||||
<tr>
|
||||
<td class="instSearchHeaderTd"><h1>{{ultmarc.subtitle}}</h1></td>
|
||||
<td class="instSearchHeaderTdCenter instSearchHeaderTdCenter">
|
||||
{% if ultmarc.is_batch_processing %}
|
||||
<div class="docButchMsg">日次バッチ処理中のため、データが正しく表示されない可能性があります</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="instSearchHeaderTd instSearchHeaderTdRight"><button class="instSearchHeader_bt" onclick="backToMenu()">メニューへ</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- 入力フォーム -->
|
||||
<form id="inst_search" class="_form" name="search" action="/ultmarc/instSearch" method="POST">
|
||||
<table class="search_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>ULT施設コード:</td>
|
||||
<td class="search_tb leftSearch_tb">
|
||||
<input class="text search_textbox" style="ime-mode:disabled;" type="text" name="ctrl_dcf_dsf_inst_cd"
|
||||
value="{{ultmarc.is_input_dcf_dsf_inst_cd()}}" maxlength='11' oninput="formBtDisabled()">
|
||||
</td>
|
||||
<td>施設区分:</td>
|
||||
<td class="search_tb">
|
||||
<!-- 施設区分のドロップダウン -->
|
||||
<select class="text search_dropdown" name="ctrl_inst_div_cd" onchange="formBtDisabled()">
|
||||
<option value=""></option>
|
||||
{% for inst_div in ultmarc.inst_div_models %}
|
||||
<option value="{{inst_div['inst_div_cd']}}" {{ultmarc.is_selected_inst_div_cd(inst_div['inst_div_cd'])}}>
|
||||
{{inst_div['inst_div_cd']}}:{{inst_div['inst_div_name']}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ULT施設名(漢字):</td>
|
||||
<td class="search_tb">
|
||||
<input class="text search_textbox" type="text" name="ctrl_form_inst_name_kanji"
|
||||
value="{{ultmarc.is_input_form_inst_name_kanji()}}" oninput="formBtDisabled()">
|
||||
</td>
|
||||
<!-- アルトマーク課題管理表No.8の修正 (カナ)⇒(かな・カナ)-->
|
||||
<td>ULT施設名(かな・カナ):</td>
|
||||
<td class="search_tb">
|
||||
<input class="text search_textbox" type="text" name="ctrl_form_inst_name_kana"
|
||||
value="{{ultmarc.is_input_form_inst_name_kana()}}" oninput="formBtDisabled()">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>郵便番号:</td>
|
||||
<td class="search_tb"><input class="text search_textbox" style="ime-mode:disabled;" type="text" name="ctrl_postal_number"
|
||||
value="{{ultmarc.is_input_postal_number()}}" maxlength='8' oninput="formBtDisabled()">
|
||||
<td>電話番号:</td>
|
||||
<td class="search_tb"><input class="text search_textbox" style="ime-mode:disabled;" type="text" name="ctrl_inst_phone_number"
|
||||
value="{{ultmarc.is_input_inst_phone_number()}}" maxlength='15' oninput="formBtDisabled()">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>都道府県:</td>
|
||||
<td class="search_tb">
|
||||
<!-- 都道府県のドロップダウン -->
|
||||
<select class="text search_dropdown" name="ctrl_prefc_cd" onchange="formBtDisabled()" onkeyup="formBtDisablead()">
|
||||
<!-- 都道府県ドロップダウンの中身を作成 -->
|
||||
<option value=""></option>
|
||||
{% for prefc in ultmarc.prefc_models %}
|
||||
<option
|
||||
value="{{prefc['prefc_cd']}}" {{ultmarc.is_selected_prefc_cd(prefc['prefc_cd'])}}>
|
||||
{{prefc['prefc_name']}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<label><input type="checkbox" name="delFlg_ctrl" value="true"
|
||||
{{ultmarc.is_checked_delFlg()}}> 削除施設表示</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ULT施設住所:</td>
|
||||
<td class="search_tb">
|
||||
<input class="text search_textbox" type="text" name="ctrl_inst_addr"
|
||||
value="{{ultmarc.is_input_inst_addr()}}" oninput="formBtDisabled()">
|
||||
</td>
|
||||
<td class="search_btTd" colspan="2">
|
||||
<input class="text ult_bt search_bt" id="clear" type="button" name="clear_bt" value="クリア" onclick="clr()" >
|
||||
<input class="ult_bt search_bt" id="search_bt" name="search_bt" value="検索" type="submit" >
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<!--検索結果-->
|
||||
<form class="_form" name="result" action="/ultmarc/instInfo" method="POST" onsubmit="CheckBoxListProcessing()">
|
||||
<input type="button" name="allon" onclick="allOn(); resultBtDisablead()" value="全選択" class="ult_bt allOnOffButton" {{ultmarc.disabled_button()}}>
|
||||
<input type="button" name="alloff" onclick="allOff(); resultBtDisablead()" value="全解除" class="ult_bt allOnOffButton" {{ultmarc.disabled_button()}}>
|
||||
<input type="hidden" name="inst_id" id="inst_id" value="">
|
||||
<input type="hidden" name="page_num" value="0">
|
||||
|
||||
<!--検索件数-->
|
||||
<!--ページネーション-->
|
||||
<div id="light-pagination" class="pagination"></div>
|
||||
<!--検索結果表示テーブル-->
|
||||
<div class="scroll_table">
|
||||
<table class="tablesorter instSearchResult" _fixedhead="rows:1; cols:1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>ULT施設コード</th>
|
||||
<th>削除</th>
|
||||
<th>ULT施設名(漢字)</th>
|
||||
<th>ULT施設住所(漢字)</th>
|
||||
<th>郵便番号</th>
|
||||
<th>施設電話番号</th>
|
||||
<th>施設区分名</th>
|
||||
<th>病院種別</th>
|
||||
<th>都道府県</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="result_data" class="result_data"></tbody>
|
||||
</table>
|
||||
{% if ultmarc.is_form_submitted() and ultmarc.is_data_overflow_max_length() %}
|
||||
<div class="notFind">
|
||||
検索件数が500件を超えています 検索項目を見直してください
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if ultmarc.is_form_submitted() and ultmarc.is_data_empty() %}
|
||||
<div class="notFind">
|
||||
対象のデータが存在しません
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!--操作ボタン-->
|
||||
<input class="ult_bt info_bt" type="submit" name="detail" value="施設情報" disabled>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
// <! --ページネーションの作成-- >
|
||||
$(function() {
|
||||
|
||||
let searchResultData = [];
|
||||
// {% if not ultmarc.is_data_overflow_max_length() and not ultmarc.is_data_empty() %}
|
||||
// スピナー出さない場合は以下、エスケープせず埋め込む
|
||||
// {% autoescape False%}
|
||||
const searchResultString = '{{ultmarc.ultmarc_data_json_str()}}';
|
||||
// {% endautoescape%}
|
||||
searchResultData = JSON.parse(searchResultString);
|
||||
// {% endif %}
|
||||
|
||||
|
||||
// 検索条件をセッションに入れる
|
||||
sessionStorage.clear();
|
||||
sessionStorage.setItem('ctrl_dcf_dsf_inst_cd','{{ultmarc.is_input_dcf_dsf_inst_cd()}}');
|
||||
sessionStorage.setItem('ctrl_inst_div_cd','{{ultmarc.is_input_form_inst_div_cd()}}');
|
||||
sessionStorage.setItem('ctrl_form_inst_name_kanji','{{ultmarc.is_input_form_inst_name_kanji()}}');
|
||||
sessionStorage.setItem('ctrl_form_inst_name_kana','{{ultmarc.is_input_form_inst_name_kana()}}');
|
||||
sessionStorage.setItem('ctrl_postal_number','{{ultmarc.is_input_postal_number()}}');
|
||||
sessionStorage.setItem('ctrl_inst_phone_number','{{ultmarc.is_input_inst_phone_number()}}');
|
||||
sessionStorage.setItem('ctrl_prefc_cd','{{ultmarc.is_input_form_prefc_cd()}}');
|
||||
sessionStorage.setItem('delFlg_ctrl','{{ultmarc.is_input_delFlg()}}');
|
||||
sessionStorage.setItem('ctrl_inst_addr','{{ultmarc.is_input_inst_addr()}}');
|
||||
|
||||
// ページネーションのページ番号取得
|
||||
let pagination_page_number = Number('{{ultmarc.init_pagination_page_number()}}');
|
||||
|
||||
$(".pagination").pagination({
|
||||
dataSource: function(done) {
|
||||
done(searchResultData)
|
||||
},
|
||||
pageNumber: pagination_page_number, // 初期ページ番号
|
||||
pageSize: 50, //表示するコンテンツ数
|
||||
pageRange: 2, //選択されているページネーション番号の両隣に表示する個数
|
||||
ellipsisText: '...', //省略文字
|
||||
prevText: 'Prev', //「前へ」の文字。エスケープ文字
|
||||
nextText: 'Next', //「次へ」の文字。エスケープ文字
|
||||
showNavigator: true,
|
||||
formatNavigator: '件数: <%= totalNumber %>件 ページ数: <%= totalPage %>',
|
||||
callback: function(data, pagination) {
|
||||
sessionStorage.setItem('pagination_page_number',pagination.pageNumber);
|
||||
$('#result_data').html(pagination_content(data))
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function pagination_content(datas) {
|
||||
const display_keys = [
|
||||
'dcf_dsf_inst_cd',
|
||||
'abolish_ymd',
|
||||
'form_inst_name_kanji',
|
||||
'inst_addr',
|
||||
'postal_number',
|
||||
'inst_phone_number',
|
||||
'inst_div_name',
|
||||
'hp_assrt_name',
|
||||
'prefc_name'
|
||||
];
|
||||
|
||||
return datas.map(function (data) {
|
||||
let td = display_keys.map((key) =>{
|
||||
let inner_content = data[key];
|
||||
if(key=='dcf_dsf_inst_cd')
|
||||
inner_content = `<a href="/ultmarc/instInfo?id=${data['dcf_dsf_inst_cd']}">${data['dcf_dsf_inst_cd'] || ''}</a>`;
|
||||
if(key=='abolish_ymd' && data[key] != null)
|
||||
inner_content = '削除';
|
||||
return `<td>${inner_content || ''}</td>`
|
||||
});
|
||||
return `
|
||||
<tr class="result_data">
|
||||
<td><div class="checkNum">
|
||||
<input type="checkbox" class="checkbox selected" name="data" onclick="resultBtDisablead()"
|
||||
value=${data['dcf_dsf_inst_cd']}>
|
||||
</div></td>
|
||||
${td}
|
||||
</tr>
|
||||
`
|
||||
})
|
||||
}
|
||||
|
||||
// チェックボックスのチェックされている場合、施設情報ボタンを活性化させる
|
||||
function resultBtDisablead(){
|
||||
var checkboxes = $('input[name="data"]:checked').length;
|
||||
if(checkboxes == 0) {
|
||||
$(".info_bt").prop('disabled',true);
|
||||
}
|
||||
else {
|
||||
$(".info_bt").prop('disabled',false);
|
||||
}
|
||||
}
|
||||
|
||||
// // 検索結果のうち、チェックされている行のデータを非表示項目に詰め込む
|
||||
function CheckBoxListProcessing()
|
||||
{
|
||||
let vals = []; // 配列を定義
|
||||
$('input[name="data"]:checked').each(function() {
|
||||
vals.push( $(this).val() ); // 配列に値を追加
|
||||
});
|
||||
$("#inst_id").val(vals.join(','));
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
25
ecs/jskult-webapp/src/templates/masterMainteMenu.html
Normal file
25
ecs/jskult-webapp/src/templates/masterMainteMenu.html
Normal file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
{% with subtitle = menu.subtitle %}
|
||||
{% include '_header.html' %}
|
||||
{% endwith %}
|
||||
<link href="/static/css/menuStyle.css" rel="stylesheet">
|
||||
<body>
|
||||
<div class="container-fluid text-center background">
|
||||
<h1>MeDaCA<br/>マスターメンテメニュー</h1>
|
||||
<br><br>
|
||||
<!-- 施設担当者データExcelアップロード -->
|
||||
<a href="/masterMainte/instEmpCsvUL" class="btn btn-primary btn-lg btn_width">施設担当者データCSVアップロード</a><br><br>
|
||||
|
||||
<!-- 施設担当者データCSVダウンロード -->
|
||||
<a href="/masterMainte/instEmpCsvDL" class="btn btn-primary btn-lg btn_width">施設担当者データCSVダウンロード</a><br><br>
|
||||
|
||||
<!-- データ上書きコピー -->
|
||||
<a href="/masterMainte/tableOverride" class="btn btn-primary btn-lg btn_width">テーブル上書きコピー</a><br><br>
|
||||
|
||||
<!-- 機能メニューへ -->
|
||||
<br><br><a href="/menu/" class="btn btn-info btn-lg btn_width">メニューへ</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -11,10 +11,10 @@
|
||||
<h1>MeDaCA<br/>機能メニュー</h1>
|
||||
<br><br>
|
||||
{% if menu.is_available_ult_doctor_menu() %}
|
||||
<a href="{{docSearchPath}}" class="btn btn-primary btn-lg btn_width">Ultmarc照会(医師)</a><br><br>
|
||||
<a href="/ultmarc/docSearch" class="btn btn-primary btn-lg btn_width">Ultmarc照会(医師)</a><br><br>
|
||||
{% endif %}
|
||||
{% if menu.is_available_ult_inst_menu() %}
|
||||
<a href="{{instSearchPath}}" class="btn btn-primary btn-lg btn_width">Ultmarc照会(施設)</a><br><br>
|
||||
<a href="/ultmarc/instSearch" class="btn btn-primary btn-lg btn_width">Ultmarc照会(施設)</a><br><br>
|
||||
{% endif %}
|
||||
{% if menu.is_available_bio_menu() %}
|
||||
{% if not menu.is_batch_processing() %}
|
||||
@ -24,10 +24,12 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if menu.is_available_master_maintenance_menu() %}
|
||||
{% if not menu.is_batch_processing() %}
|
||||
<a href="{{masterMaintePath}}" class="btn btn-primary btn-lg btn_width">マスターメンテメニュー</a><br><br>
|
||||
{% if menu.is_batch_processing() %}
|
||||
<div class="notUseMainteMsg"> マスターメンテメニューは <br> 日次バッチ処理中のため利用出来ません </div>
|
||||
{% elif menu.is_backup_processing() %}
|
||||
<div class="notUseMainteMsg"> バックアップ取得を開始しました。 <br>日次バッチ更新が終了するまでマスターメンテメニューは利用できません</div>
|
||||
{% else %}
|
||||
<div class="notUseBioMsg"> マスターメンテメニューは <br> 日次バッチ処理中のため利用出来ません </div>
|
||||
<a href="/masterMainte/masterMainteMenu" class="btn btn-primary btn-lg btn_width">マスターメンテメニュー</a><br><br>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<br><br><a href="/logout/?reason=do_logout" class="btn btn-info btn-lg btn_width">Logout</a>
|
||||
|
||||
12
ecs/jskult-webapp/src/templates/tableOverride.html
Normal file
12
ecs/jskult-webapp/src/templates/tableOverride.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
{% with subtitle = view.subtitle %}
|
||||
{% include '_header.html' %}
|
||||
{% endwith %}
|
||||
<link href="/static/css/masterMainte.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>テーブル上書きコピー</h1>
|
||||
</body>
|
||||
</html>
|
||||
74
lambda/check-view-security-option/Pipfile.lock
generated
74
lambda/check-view-security-option/Pipfile.lock
generated
@ -43,19 +43,19 @@
|
||||
},
|
||||
"boto3": {
|
||||
"hashes": [
|
||||
"sha256:19762b6a1adbe1963e26b8280211ca148017c970a2e1386312a9fc8a0a17dbd5",
|
||||
"sha256:367a73c1ff04517849d8c4177fd775da2e258a3912ff6a497be258c30f509046"
|
||||
"sha256:3a60283676399ae94b49b7a170fb0f42ca2ddcde490988fb0af7fd5a64440ab8",
|
||||
"sha256:455b6e1f12768b21b5f3990cf1fadeed9bf1c6b36e5a7a303352b927f530c434"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.26.97"
|
||||
"version": "==1.26.156"
|
||||
},
|
||||
"botocore": {
|
||||
"hashes": [
|
||||
"sha256:0df677eb2bef3ba18ac69e007633559b4426df310eee99df9882437b5faf498a",
|
||||
"sha256:176740221714c0f031c2cd773879df096dbc0f977c63b3e2ed6a956205f02e82"
|
||||
"sha256:21d0c2cb1461f2676e41a896e6e551c7da09e923f416322182520851b179ebda",
|
||||
"sha256:44b26a5468402bb9e5028d8f9ef2eba973cde016979aa72f87db32ef9000dab4"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==1.29.97"
|
||||
"version": "==1.29.156"
|
||||
},
|
||||
"cffi": {
|
||||
"hashes": [
|
||||
@ -128,32 +128,28 @@
|
||||
},
|
||||
"cryptography": {
|
||||
"hashes": [
|
||||
"sha256:103e8f7155f3ce2ffa0049fe60169878d47a4364b277906386f8de21c9234aa1",
|
||||
"sha256:23df8ca3f24699167daf3e23e51f7ba7334d504af63a94af468f468b975b7dd7",
|
||||
"sha256:2725672bb53bb92dc7b4150d233cd4b8c59615cd8288d495eaa86db00d4e5c06",
|
||||
"sha256:30b1d1bfd00f6fc80d11300a29f1d8ab2b8d9febb6ed4a38a76880ec564fae84",
|
||||
"sha256:35d658536b0a4117c885728d1a7032bdc9a5974722ae298d6c533755a6ee3915",
|
||||
"sha256:50cadb9b2f961757e712a9737ef33d89b8190c3ea34d0fb6675e00edbe35d074",
|
||||
"sha256:5f8c682e736513db7d04349b4f6693690170f95aac449c56f97415c6980edef5",
|
||||
"sha256:6236a9610c912b129610eb1a274bdc1350b5df834d124fa84729ebeaf7da42c3",
|
||||
"sha256:788b3921d763ee35dfdb04248d0e3de11e3ca8eb22e2e48fef880c42e1f3c8f9",
|
||||
"sha256:8bc0008ef798231fac03fe7d26e82d601d15bd16f3afaad1c6113771566570f3",
|
||||
"sha256:8f35c17bd4faed2bc7797d2a66cbb4f986242ce2e30340ab832e5d99ae60e011",
|
||||
"sha256:b49a88ff802e1993b7f749b1eeb31134f03c8d5c956e3c125c75558955cda536",
|
||||
"sha256:bc0521cce2c1d541634b19f3ac661d7a64f9555135e9d8af3980965be717fd4a",
|
||||
"sha256:bc5b871e977c8ee5a1bbc42fa8d19bcc08baf0c51cbf1586b0e87a2694dde42f",
|
||||
"sha256:c43ac224aabcbf83a947eeb8b17eaf1547bce3767ee2d70093b461f31729a480",
|
||||
"sha256:d15809e0dbdad486f4ad0979753518f47980020b7a34e9fc56e8be4f60702fac",
|
||||
"sha256:d7d84a512a59f4412ca8549b01f94be4161c94efc598bf09d027d67826beddc0",
|
||||
"sha256:e029b844c21116564b8b61216befabca4b500e6816fa9f0ba49527653cae2108",
|
||||
"sha256:e8a0772016feeb106efd28d4a328e77dc2edae84dfbac06061319fdb669ff828",
|
||||
"sha256:e944fe07b6f229f4c1a06a7ef906a19652bdd9fd54c761b0ff87e83ae7a30354",
|
||||
"sha256:eb40fe69cfc6f5cdab9a5ebd022131ba21453cf7b8a7fd3631f45bbf52bed612",
|
||||
"sha256:fa507318e427169ade4e9eccef39e9011cdc19534f55ca2f36ec3f388c1f70f3",
|
||||
"sha256:ffd394c7896ed7821a6d13b24657c6a34b6e2650bd84ae063cf11ccffa4f1a97"
|
||||
"sha256:059e348f9a3c1950937e1b5d7ba1f8e968508ab181e75fc32b879452f08356db",
|
||||
"sha256:1a5472d40c8f8e91ff7a3d8ac6dfa363d8e3138b961529c996f3e2df0c7a411a",
|
||||
"sha256:1a8e6c2de6fbbcc5e14fd27fb24414507cb3333198ea9ab1258d916f00bc3039",
|
||||
"sha256:1fee5aacc7367487b4e22484d3c7e547992ed726d14864ee33c0176ae43b0d7c",
|
||||
"sha256:5d092fdfedaec4cbbffbf98cddc915ba145313a6fdaab83c6e67f4e6c218e6f3",
|
||||
"sha256:5f0ff6e18d13a3de56f609dd1fd11470918f770c6bd5d00d632076c727d35485",
|
||||
"sha256:7bfc55a5eae8b86a287747053140ba221afc65eb06207bedf6e019b8934b477c",
|
||||
"sha256:7fa01527046ca5facdf973eef2535a27fec4cb651e4daec4d043ef63f6ecd4ca",
|
||||
"sha256:8dde71c4169ec5ccc1087bb7521d54251c016f126f922ab2dfe6649170a3b8c5",
|
||||
"sha256:8f4ab7021127a9b4323537300a2acfb450124b2def3756f64dc3a3d2160ee4b5",
|
||||
"sha256:948224d76c4b6457349d47c0c98657557f429b4e93057cf5a2f71d603e2fc3a3",
|
||||
"sha256:9a6c7a3c87d595608a39980ebaa04d5a37f94024c9f24eb7d10262b92f739ddb",
|
||||
"sha256:b46e37db3cc267b4dea1f56da7346c9727e1209aa98487179ee8ebed09d21e43",
|
||||
"sha256:b4ceb5324b998ce2003bc17d519080b4ec8d5b7b70794cbd2836101406a9be31",
|
||||
"sha256:cb33ccf15e89f7ed89b235cff9d49e2e62c6c981a6061c9c8bb47ed7951190bc",
|
||||
"sha256:d198820aba55660b4d74f7b5fd1f17db3aa5eb3e6893b0a41b75e84e4f9e0e4b",
|
||||
"sha256:d34579085401d3f49762d2f7d6634d6b6c2ae1242202e860f4d26b046e3a1006",
|
||||
"sha256:eb8163f5e549a22888c18b0d53d6bb62a20510060a22fd5a995ec8a05268df8a",
|
||||
"sha256:f73bff05db2a3e5974a6fd248af2566134d8981fd7ab012e5dd4ddb1d9a70699"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==39.0.2"
|
||||
"version": "==41.0.1"
|
||||
},
|
||||
"jmespath": {
|
||||
"hashes": [
|
||||
@ -172,11 +168,11 @@
|
||||
},
|
||||
"pymysql": {
|
||||
"hashes": [
|
||||
"sha256:41fc3a0c5013d5f039639442321185532e3e2c8924687abe6537de157d403641",
|
||||
"sha256:816927a350f38d56072aeca5dfb10221fe1dc653745853d30a216637f5d7ad36"
|
||||
"sha256:3dda943ef3694068a75d69d071755dbecacee1adf9a1fc5b206830d2b67d25e8",
|
||||
"sha256:89fc6ae41c0aeb6e1f7710cdd623702ea2c54d040565767a78b00a5ebb12f4e5"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.0.2"
|
||||
"version": "==1.0.3"
|
||||
},
|
||||
"python-dateutil": {
|
||||
"hashes": [
|
||||
@ -188,11 +184,11 @@
|
||||
},
|
||||
"s3transfer": {
|
||||
"hashes": [
|
||||
"sha256:06176b74f3a15f61f1b4f25a1fc29a4429040b7647133a463da8fa5bd28d5ecd",
|
||||
"sha256:2ed07d3866f523cc561bf4a00fc5535827981b117dd7876f036b0c1aca42c947"
|
||||
"sha256:3c0da2d074bf35d6870ef157158641178a4204a6e689e82546083e31e0311346",
|
||||
"sha256:640bb492711f4c0c0905e1f62b6aaeb771881935ad27884852411f8e9cacbca9"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==0.6.0"
|
||||
"version": "==0.6.1"
|
||||
},
|
||||
"simplejson": {
|
||||
"hashes": [
|
||||
@ -255,11 +251,11 @@
|
||||
},
|
||||
"urllib3": {
|
||||
"hashes": [
|
||||
"sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305",
|
||||
"sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"
|
||||
"sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f",
|
||||
"sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14"
|
||||
],
|
||||
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",
|
||||
"version": "==1.26.15"
|
||||
"version": "==1.26.16"
|
||||
}
|
||||
},
|
||||
"develop": {
|
||||
|
||||
108
rds_mysql/stored_procedure/src05/hco_to_mdb_laundering.sql
Normal file
108
rds_mysql/stored_procedure/src05/hco_to_mdb_laundering.sql
Normal file
@ -0,0 +1,108 @@
|
||||
-- A5M2で実行時に[SQL] - [スラッシュ(/)のみの行でSQLを区切る]に変えてから実行する
|
||||
CREATE PROCEDURE src05.hco_to_mdb_laundering(target_table VARCHAR(255))
|
||||
SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
-- スキーマ名
|
||||
DECLARE schema_name VARCHAR(50) DEFAULT (SELECT DATABASE());
|
||||
-- プロシージャ名
|
||||
DECLARE procedure_name VARCHAR(100) DEFAULT 'hco_to_mdb_laundering';
|
||||
-- プロシージャの引数
|
||||
DECLARE procedure_args JSON DEFAULT JSON_OBJECT('target_table', target_table);
|
||||
|
||||
-- 例外処理
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
GET DIAGNOSTICS CONDITION 1
|
||||
@error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT;
|
||||
CALL medaca_common.put_error_log(schema_name, procedure_name, procedure_args,
|
||||
'hco_to_mdb_launderingでエラーが発生', @error_state, @error_msg);
|
||||
SET @error_msg = (
|
||||
CASE
|
||||
WHEN LENGTH(@error_msg) > 128 THEN CONCAT(SUBSTRING(@error_msg, 1, 125), '...')
|
||||
ELSE @error_msg
|
||||
END
|
||||
);
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg;
|
||||
END;
|
||||
|
||||
SET @error_state = NULL, @error_msg = NULL;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】4:メルク施設コードの洗替_A① 開始');
|
||||
|
||||
TRUNCATE TABLE internal05.hco_cnv_mdb_t;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】4:メルク施設コードの洗替_A① 終了');
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】4:メルク施設コードの洗替_A② 開始');
|
||||
|
||||
INSERT INTO
|
||||
internal05.hco_cnv_mdb_t (
|
||||
hco_vid_v,
|
||||
mdb_cd,
|
||||
form_inst_name_kana,
|
||||
form_inst_name_kanji,
|
||||
inst_addr,
|
||||
prefc_cd,
|
||||
delete_flg,
|
||||
abolish_ymd,
|
||||
start_date
|
||||
)
|
||||
SELECT
|
||||
mcmv.hco_vid_v,
|
||||
mcmv.mdb_cd,
|
||||
ci.form_inst_name_kana,
|
||||
ci.form_inst_name_kanji,
|
||||
ci.inst_addr,
|
||||
ci.prefc_cd,
|
||||
ci.delete_flg,
|
||||
ci.abolish_ymd,
|
||||
mcmv.start_date
|
||||
FROM
|
||||
src05.mdb_cnv_mst_v AS mcmv
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
hco_vid_v,MAX(sub_num) AS sno
|
||||
FROM
|
||||
src05.mdb_cnv_mst_v
|
||||
WHERE
|
||||
rec_sts_kbn != '9'
|
||||
AND src05.get_syor_date() >= START_DATE
|
||||
GROUP BY hco_vid_v
|
||||
) AS mcmv2
|
||||
ON mcmv.hco_vid_v = mcmv2.hco_vid_v
|
||||
AND mcmv.sub_num = mcmv2.sno
|
||||
LEFT OUTER JOIN src05.com_inst AS ci
|
||||
ON mcmv.mdb_cd = ci.dcf_dsf_inst_cd
|
||||
AND ci.delete_flg = '0'
|
||||
;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】4:メルク施設コードの洗替_A② 終了');
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】4:メルク施設コードの洗替_A③ 開始');
|
||||
|
||||
SET @update_institution = "
|
||||
UPDATE $$target_table$$ AS tt, internal05.hco_cnv_mdb_t AS hcmt
|
||||
SET
|
||||
tt.inst_cd = hcmt.mdb_cd,
|
||||
tt.inst_name_kana = hcmt.form_inst_name_kana,
|
||||
tt.inst_name = hcmt.form_inst_name_kanji,
|
||||
tt.address = hcmt.inst_addr,
|
||||
tt.pref_cd = hcmt.prefc_cd
|
||||
WHERE
|
||||
tt.v_inst_cd = hcmt.hco_vid_v
|
||||
AND tt.inst_clas_cd = '1'
|
||||
";
|
||||
SET @update_institution = REPLACE(@update_institution, "$$target_table$$", target_table);
|
||||
PREPARE update_institution_stmt from @update_institution;
|
||||
EXECUTE update_institution_stmt;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】4:メルク施設コードの洗替_A③ 終了');
|
||||
|
||||
END
|
||||
65
rds_mysql/stored_procedure/src05/inst_merge_laundering.sql
Normal file
65
rds_mysql/stored_procedure/src05/inst_merge_laundering.sql
Normal file
@ -0,0 +1,65 @@
|
||||
-- A5M2で実行時に[SQL] - [スラッシュ(/)のみの行でSQLを区切る]に変えてから実行する
|
||||
CREATE PROCEDURE src05.inst_merge_laundering(target_table VARCHAR(255))
|
||||
SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
-- スキーマ名
|
||||
DECLARE schema_name VARCHAR(50) DEFAULT (SELECT DATABASE());
|
||||
-- プロシージャ名
|
||||
DECLARE procedure_name VARCHAR(100) DEFAULT 'inst_merge_laundering';
|
||||
-- プロシージャの引数
|
||||
DECLARE procedure_args JSON DEFAULT JSON_OBJECT('target_table', target_table);
|
||||
|
||||
-- 例外処理
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
GET DIAGNOSTICS CONDITION 1
|
||||
@error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT;
|
||||
CALL medaca_common.put_error_log(schema_name, procedure_name, procedure_args,
|
||||
'inst_merge_launderingでエラーが発生', @error_state, @error_msg);
|
||||
SET @error_msg = (
|
||||
CASE
|
||||
WHEN LENGTH(@error_msg) > 128 THEN CONCAT(SUBSTRING(@error_msg, 1, 125), '...')
|
||||
ELSE @error_msg
|
||||
END
|
||||
);
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg;
|
||||
END;
|
||||
|
||||
SET @error_state = NULL, @error_msg = NULL;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】4:メルク施設コードの洗替_B① 開始');
|
||||
|
||||
SET @update_institution = "
|
||||
UPDATE (
|
||||
SELECT
|
||||
dcf_dsf_inst_cd,
|
||||
dup_opp_cd,
|
||||
form_inst_name_kanji,
|
||||
form_inst_name_kana,
|
||||
inst_addr,
|
||||
prefc_cd
|
||||
FROM
|
||||
internal05.inst_merge_t
|
||||
) AS imt,
|
||||
$$target_table$$ AS tt
|
||||
SET
|
||||
tt.inst_cd = imt.dup_opp_cd,
|
||||
tt.inst_name = imt.form_inst_name_kanji,
|
||||
tt.inst_name_kana = imt.form_inst_name_kana,
|
||||
tt.address = imt.inst_addr,
|
||||
tt.pref_cd = imt.prefc_cd,
|
||||
tt.dwh_upd_dt = SYSDATE()
|
||||
WHERE
|
||||
tt.inst_cd = imt.dcf_dsf_inst_cd
|
||||
AND tt.inst_clas_cd = '1'
|
||||
";
|
||||
SET @update_institution = REPLACE(@update_institution, "$$target_table$$", target_table);
|
||||
PREPARE update_institution_stmt from @update_institution;
|
||||
EXECUTE update_institution_stmt;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】4:メルク施設コードの洗替_B① 終了');
|
||||
|
||||
END
|
||||
@ -2,69 +2,75 @@
|
||||
CREATE PROCEDURE src05.inst_merge_t_create()
|
||||
SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
-- スキーマ名
|
||||
DECLARE schema_name VARCHAR(50) DEFAULT (SELECT DATABASE());
|
||||
-- プロシージャ名
|
||||
DECLARE procedure_name VARCHAR(100) DEFAULT 'inst_merge_t_create';
|
||||
-- プロシージャの引数
|
||||
DECLARE procedure_args JSON DEFAULT JSON_OBJECT();
|
||||
-- スキーマ名
|
||||
DECLARE schema_name VARCHAR(50) DEFAULT (SELECT DATABASE());
|
||||
-- プロシージャ名
|
||||
DECLARE procedure_name VARCHAR(100) DEFAULT 'inst_merge_t_create';
|
||||
-- プロシージャの引数
|
||||
DECLARE procedure_args JSON DEFAULT JSON_OBJECT();
|
||||
|
||||
-- 例外処理
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
GET DIAGNOSTICS CONDITION 1
|
||||
@error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT;
|
||||
call medaca_common.put_error_log(schema_name, procedure_name, procedure_args,
|
||||
'inst_merge_t_createでエラーが発生', @error_state, @error_msg);
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg;
|
||||
END;
|
||||
-- 例外処理
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
GET DIAGNOSTICS CONDITION 1
|
||||
@error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT;
|
||||
CALL medaca_common.put_error_log(schema_name, procedure_name, procedure_args,
|
||||
'inst_merge_t_createでエラーが発生', @error_state, @error_msg);
|
||||
SET @error_msg = (
|
||||
CASE
|
||||
WHEN LENGTH(@error_msg) > 128 THEN CONCAT(SUBSTRING(@error_msg, 1, 125), '...')
|
||||
ELSE @error_msg
|
||||
END
|
||||
);
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg;
|
||||
END;
|
||||
|
||||
SET @error_state = NULL, @error_msg = NULL;
|
||||
SET @error_state = NULL, @error_msg = NULL;
|
||||
|
||||
call medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'アルトマーク施設統合マスタ(洗替処理一時テーブル)作成① 開始'
|
||||
);
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'アルトマーク施設統合マスタ(洗替処理一時テーブル)作成① 開始'
|
||||
);
|
||||
|
||||
TRUNCATE TABLE internal05.inst_merge_t;
|
||||
TRUNCATE TABLE internal05.inst_merge_t;
|
||||
|
||||
call medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'アルトマーク施設統合マスタ(洗替処理一時テーブル)作成① 終了'
|
||||
);
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'アルトマーク施設統合マスタ(洗替処理一時テーブル)作成① 終了'
|
||||
);
|
||||
|
||||
call medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'アルトマーク施設統合マスタ(洗替処理一時テーブル)作成② 開始'
|
||||
);
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'アルトマーク施設統合マスタ(洗替処理一時テーブル)作成② 開始'
|
||||
);
|
||||
|
||||
INSERT INTO
|
||||
internal05.inst_merge_t (
|
||||
dcf_dsf_inst_cd,
|
||||
dup_opp_cd,
|
||||
form_inst_name_kanji,
|
||||
form_inst_name_kana,
|
||||
inst_addr,
|
||||
prefc_cd
|
||||
)
|
||||
SELECT
|
||||
dim.dcf_inst_cd,
|
||||
dim.dcf_inst_cd_new,
|
||||
ci.form_inst_name_kanji,
|
||||
ci.form_inst_name_kana,
|
||||
ci.inst_addr,
|
||||
ci.prefc_cd
|
||||
FROM
|
||||
src05.dcf_inst_merge dim
|
||||
LEFT OUTER JOIN src05.com_inst ci
|
||||
ON dim.dcf_inst_cd_new = ci.dcf_dsf_inst_cd
|
||||
AND ci.delete_flg = '0'
|
||||
WHERE
|
||||
dim.muko_flg = '0'
|
||||
AND dim.dcf_inst_cd_new IS NOT NULL
|
||||
AND dim.enabled_flg = 'Y'
|
||||
AND src05.to_date_yyyymm01(dim.tekiyo_month) <= src05.get_syor_date();
|
||||
INSERT INTO
|
||||
internal05.inst_merge_t (
|
||||
dcf_dsf_inst_cd,
|
||||
dup_opp_cd,
|
||||
form_inst_name_kanji,
|
||||
form_inst_name_kana,
|
||||
inst_addr,
|
||||
prefc_cd
|
||||
)
|
||||
SELECT
|
||||
dim.dcf_inst_cd,
|
||||
dim.dcf_inst_cd_new,
|
||||
ci.form_inst_name_kanji,
|
||||
ci.form_inst_name_kana,
|
||||
ci.inst_addr,
|
||||
ci.prefc_cd
|
||||
FROM
|
||||
src05.dcf_inst_merge AS dim
|
||||
LEFT OUTER JOIN src05.com_inst AS ci
|
||||
ON dim.dcf_inst_cd_new = ci.dcf_dsf_inst_cd
|
||||
AND ci.delete_flg = '0'
|
||||
WHERE
|
||||
dim.muko_flg = '0'
|
||||
AND dim.dcf_inst_cd_new IS NOT NULL
|
||||
AND dim.enabled_flg = 'Y'
|
||||
AND src05.to_date_yyyymm01(dim.tekiyo_month) <= src05.get_syor_date();
|
||||
|
||||
call medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'アルトマーク施設統合マスタ(洗替処理一時テーブル)作成② 終了'
|
||||
);
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'アルトマーク施設統合マスタ(洗替処理一時テーブル)作成② 終了'
|
||||
);
|
||||
|
||||
END
|
||||
|
||||
49
rds_mysql/stored_procedure/src05/sales_lau_delete.sql
Normal file
49
rds_mysql/stored_procedure/src05/sales_lau_delete.sql
Normal file
@ -0,0 +1,49 @@
|
||||
-- A5M2で実行時に[SQL] - [スラッシュ(/)のみの行でSQLを区切る]に変えてから実行する
|
||||
CREATE PROCEDURE src05.sales_lau_delete(target_table VARCHAR(255), laundering_period_year INT)
|
||||
SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
-- スキーマ名
|
||||
DECLARE schema_name VARCHAR(50) DEFAULT (SELECT DATABASE());
|
||||
-- プロシージャ名
|
||||
DECLARE procedure_name VARCHAR(100) DEFAULT 'sales_lau_delete';
|
||||
-- プロシージャの引数
|
||||
DECLARE procedure_args JSON DEFAULT JSON_OBJECT('target_table', target_table,
|
||||
'laundering_period_year', laundering_period_year);
|
||||
|
||||
-- 例外処理
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
GET DIAGNOSTICS CONDITION 1
|
||||
@error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT;
|
||||
CALL medaca_common.put_error_log(schema_name, procedure_name, procedure_args,
|
||||
'sales_lau_deleteでエラーが発生', @error_state, @error_msg);
|
||||
SET @error_msg = (
|
||||
CASE
|
||||
WHEN LENGTH(@error_msg) > 128 THEN CONCAT(SUBSTRING(@error_msg, 1, 125), '...')
|
||||
ELSE @error_msg
|
||||
END
|
||||
);
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg;
|
||||
END;
|
||||
|
||||
SET @error_state = NULL, @error_msg = NULL;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)過去5年以前のデータ削除① 開始');
|
||||
|
||||
SET @delete_data = "
|
||||
DELETE FROM
|
||||
$$target_table$$
|
||||
WHERE
|
||||
kjyo_ym < DATE_FORMAT((src05.get_syor_date() - INTERVAL ? YEAR), '%Y%m')
|
||||
";
|
||||
SET @delete_data = REPLACE(@delete_data, "$$target_table$$", target_table);
|
||||
PREPARE delete_data_stmt from @delete_data;
|
||||
SET @interval_year = laundering_period_year;
|
||||
EXECUTE delete_data_stmt USING @interval_year;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)過去5年以前のデータ削除① 終了');
|
||||
|
||||
END
|
||||
480
rds_mysql/stored_procedure/src05/sales_lau_upsert.sql
Normal file
480
rds_mysql/stored_procedure/src05/sales_lau_upsert.sql
Normal file
@ -0,0 +1,480 @@
|
||||
-- A5M2で実行時に[SQL] - [スラッシュ(/)のみの行でSQLを区切る]に変えてから実行する
|
||||
CREATE PROCEDURE src05.sales_lau_upsert(target_table VARCHAR(255), extract_from_date DATE,
|
||||
extract_to_date DATE)
|
||||
SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
-- スキーマ名
|
||||
DECLARE schema_name VARCHAR(50) DEFAULT (SELECT DATABASE());
|
||||
-- プロシージャ名
|
||||
DECLARE procedure_name VARCHAR(100) DEFAULT 'sales_lau_upsert';
|
||||
-- プロシージャの引数
|
||||
DECLARE procedure_args JSON DEFAULT JSON_OBJECT('target_table', target_table, 'extract_from_date',
|
||||
extract_from_date, 'extract_to_date', extract_to_date);
|
||||
|
||||
-- 例外処理
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
GET DIAGNOSTICS CONDITION 1
|
||||
@error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT;
|
||||
CALL medaca_common.put_error_log(schema_name, procedure_name, procedure_args,
|
||||
'sales_lau_upsertでエラーが発生', @error_state, @error_msg);
|
||||
SET @error_msg = (
|
||||
CASE
|
||||
WHEN LENGTH(@error_msg) > 128 THEN CONCAT(SUBSTRING(@error_msg, 1, 125), '...')
|
||||
ELSE @error_msg
|
||||
END
|
||||
);
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg;
|
||||
END;
|
||||
|
||||
SET @error_state = NULL, @error_msg = NULL;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成① 開始'
|
||||
);
|
||||
|
||||
TRUNCATE TABLE internal05.bu_prd_name_contrast_t;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成① 終了'
|
||||
);
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成② 開始'
|
||||
);
|
||||
|
||||
INSERT INTO
|
||||
internal05.bu_prd_name_contrast_t (
|
||||
prd_cd,
|
||||
bu_cd,
|
||||
phm_itm_cd,
|
||||
pp_start_date,
|
||||
pp_end_date,
|
||||
update_date,
|
||||
bp_start_date,
|
||||
bp_end_date
|
||||
)
|
||||
SELECT
|
||||
ppmv.prd_cd,
|
||||
bpnc.bu_cd,
|
||||
ppmv.phm_itm_cd,
|
||||
ppmv.start_date AS pp_start_date,
|
||||
ppmv.end_date AS pp_end_date,
|
||||
bpnc.update_date AS update_date,
|
||||
bpnc.start_date AS bp_start_date,
|
||||
bpnc.end_date AS bp_end_date
|
||||
FROM
|
||||
src05.phm_prd_mst_v AS ppmv
|
||||
LEFT OUTER JOIN src05.bu_prd_name_contrast AS bpnc
|
||||
ON ppmv.phm_itm_cd = bpnc.phm_itm_cd
|
||||
WHERE
|
||||
ppmv.rec_sts_kbn != '9'
|
||||
;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成② 終了'
|
||||
);
|
||||
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成③ 開始'
|
||||
);
|
||||
|
||||
TRUNCATE TABLE internal05.fcl_mst_v_t;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成③ 終了'
|
||||
);
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成④ 開始'
|
||||
);
|
||||
|
||||
INSERT INTO
|
||||
internal05.fcl_mst_v_t
|
||||
SELECT
|
||||
fmv1.v_inst_cd,
|
||||
fmv1.sub_num,
|
||||
fmv1.start_date,
|
||||
fmv1.end_date,
|
||||
fmv1.closed_dt,
|
||||
fmv1.fcl_name,
|
||||
fmv1.fcl_kn_name,
|
||||
fmv1.fcl_abb_name,
|
||||
fmv1.fcl_abb_kn_name,
|
||||
fmv1.mkr_cd,
|
||||
fmv1.jsk_proc_kbn,
|
||||
fmv1.fmt_addr,
|
||||
fmv1.fmt_kn_addr,
|
||||
fmv1.postal_cd,
|
||||
fmv1.prft_cd,
|
||||
fmv1.prft_name,
|
||||
fmv1.city_name,
|
||||
fmv1.addr_line_1,
|
||||
fmv1.tel_num,
|
||||
fmv1.admin_kbn,
|
||||
fmv1.fcl_type,
|
||||
fmv1.rec_sts_kbn,
|
||||
fmv1.ins_dt,
|
||||
fmv1.upd_dt,
|
||||
fmv1.dwh_upd_dt
|
||||
FROM
|
||||
src05.fcl_mst_v AS fmv1
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
fmv.v_inst_cd,
|
||||
MAX(fmv.sub_num) AS sno
|
||||
FROM
|
||||
src05.fcl_mst_v AS fmv
|
||||
GROUP BY
|
||||
fmv.v_inst_cd
|
||||
) AS fmv2
|
||||
ON fmv1.v_inst_cd = fmv2.v_inst_cd
|
||||
AND fmv1.sub_num = fmv2.sno
|
||||
WHERE
|
||||
fmv1.rec_sts_kbn != '9'
|
||||
;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成④ 終了'
|
||||
);
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成⑤ 開始'
|
||||
);
|
||||
|
||||
SET @extract_from_datetime = CAST(extract_from_date AS DATETIME);
|
||||
SET @extract_to_datetime = ADDTIME(CAST(extract_to_date AS DATETIME), '23:59:59');
|
||||
|
||||
SET @upsert_sales_launderning = "
|
||||
INSERT INTO
|
||||
$$target_table$$ (
|
||||
rec_whs_cd,
|
||||
rec_whs_sub_cd,
|
||||
rec_whs_org_cd,
|
||||
rec_cust_cd,
|
||||
rec_comm_cd,
|
||||
rec_tran_kbn,
|
||||
rev_hsdnymd_wrk,
|
||||
rev_hsdnymd_srk,
|
||||
rec_urag_num,
|
||||
rec_qty,
|
||||
rec_nonyu_price,
|
||||
rec_nonyu_amt,
|
||||
rec_comm_name,
|
||||
rec_nonyu_fcl_name,
|
||||
free_item,
|
||||
rec_nonyu_fcl_addr,
|
||||
rec_nonyu_fcl_post,
|
||||
rec_nonyu_fcl_tel,
|
||||
rec_bef_hsdn_ymd,
|
||||
rec_bef_slip_num,
|
||||
rec_ymd,
|
||||
sale_data_cat,
|
||||
slip_file_name,
|
||||
slip_mgt_num,
|
||||
row_num,
|
||||
hsdn_ymd,
|
||||
exec_dt,
|
||||
v_tran_cd,
|
||||
tran_kbn_name,
|
||||
whs_org_cd,
|
||||
v_whsorg_cd,
|
||||
whs_org_name,
|
||||
whs_org_kn,
|
||||
v_whs_cd,
|
||||
whs_name,
|
||||
nonyu_fcl_cd,
|
||||
inst_name,
|
||||
inst_name_kana,
|
||||
address,
|
||||
comm_cd,
|
||||
comm_name,
|
||||
nonyu_qty,
|
||||
nonyu_price,
|
||||
nonyu_amt,
|
||||
shikiri_price,
|
||||
shikiri_amt,
|
||||
nhi_price,
|
||||
nhi_amt,
|
||||
v_inst_cd,
|
||||
inst_clas_cd,
|
||||
bu_cd,
|
||||
item_cd,
|
||||
item_name,
|
||||
item_english_name,
|
||||
pref_cd,
|
||||
whspos_err_kbn,
|
||||
htdnymd_err_kbn,
|
||||
prd_exis_kbn,
|
||||
fcl_exis_kbn,
|
||||
bef_hsdn_ymd,
|
||||
bef_slip_num,
|
||||
slip_org_kbn,
|
||||
kjyo_ym,
|
||||
tksnbk_kbn,
|
||||
fcl_exec_kbn,
|
||||
rec_sts_kbn,
|
||||
ins_dt,
|
||||
ins_usr,
|
||||
dwh_upd_dt
|
||||
)
|
||||
SELECT
|
||||
s.rec_whs_cd,
|
||||
s.rec_whs_sub_cd,
|
||||
s.rec_whs_org_cd,
|
||||
s.rec_cust_cd,
|
||||
s.rec_comm_cd,
|
||||
s.rec_tran_kbn,
|
||||
s.rev_hsdnymd_wrk,
|
||||
s.rev_hsdnymd_srk,
|
||||
s.rec_urag_num,
|
||||
s.rec_qty,
|
||||
s.rec_nonyu_price,
|
||||
s.rec_nonyu_amt,
|
||||
s.rec_comm_name,
|
||||
s.rec_nonyu_fcl_name,
|
||||
s.free_item,
|
||||
s.rec_nonyu_fcl_addr,
|
||||
s.rec_nonyu_fcl_post,
|
||||
s.rec_nonyu_fcl_tel,
|
||||
s.rec_bef_hsdn_ymd,
|
||||
s.rec_bef_slip_num,
|
||||
s.rec_ymd,
|
||||
s.sale_data_cat,
|
||||
s.slip_file_name,
|
||||
s.slip_mgt_num,
|
||||
s.row_num,
|
||||
s.hsdn_ymd,
|
||||
s.exec_dt,
|
||||
s.v_tran_cd,
|
||||
s.tran_kbn_name,
|
||||
s.whs_org_cd,
|
||||
s.v_whsorg_cd,
|
||||
s.whs_org_name,
|
||||
s.whs_org_kn,
|
||||
s.v_whs_cd,
|
||||
s.whs_name,
|
||||
s.nonyu_fcl_cd,
|
||||
s.v_inst_name,
|
||||
s.v_inst_kn,
|
||||
s.v_inst_addr,
|
||||
s.comm_cd,
|
||||
s.comm_name,
|
||||
CASE
|
||||
WHEN
|
||||
(LEFT(s.v_tran_cd, 1) = 2 AND (s.err_flg20 IS NULL OR s.err_flg20 != 'M'))
|
||||
THEN
|
||||
-s.nonyu_qty
|
||||
ELSE
|
||||
s.nonyu_qty
|
||||
END AS nonyu_qty,
|
||||
s.nonyu_price,
|
||||
CASE
|
||||
WHEN
|
||||
(LEFT(s.v_tran_cd, 1) = 2 AND (s.err_flg20 IS NULL OR s.err_flg20 != 'M'))
|
||||
THEN
|
||||
-s.nonyu_amt
|
||||
ELSE
|
||||
s.nonyu_amt
|
||||
END AS nonyu_amt,
|
||||
s.shikiri_price,
|
||||
CASE
|
||||
WHEN
|
||||
(LEFT(s.v_tran_cd, 1) = 2 AND (s.err_flg20 IS NULL OR s.err_flg20 != 'M'))
|
||||
THEN
|
||||
-s.shikiri_amt
|
||||
ELSE
|
||||
s.shikiri_amt
|
||||
END AS shikiri_amt,
|
||||
s.nhi_price,
|
||||
CASE
|
||||
WHEN
|
||||
(LEFT(s.v_tran_cd,1) = 2 AND (s.err_flg20 IS NULL OR s.err_flg20 != 'M'))
|
||||
THEN
|
||||
-s.nhi_amt
|
||||
ELSE
|
||||
s.nhi_amt
|
||||
END AS nhi_amt,
|
||||
s.v_inst_cd,
|
||||
CASE
|
||||
WHEN
|
||||
(fmvt.fcl_type = 'A1' or fmvt.fcl_type = 'A0') THEN '3'
|
||||
WHEN
|
||||
fmvt.fcl_type BETWEEN '20' AND '29' THEN '2'
|
||||
ELSE
|
||||
'1'
|
||||
END AS inst_clas_cd,
|
||||
bpnct.bu_cd,
|
||||
ppmv.mkr_cd,
|
||||
ppmv.mkr_inf_1,
|
||||
ppmv.mkr_inf_2,
|
||||
CASE
|
||||
WHEN
|
||||
s.v_inst_cd LIKE '00%'
|
||||
THEN
|
||||
ci.prefc_cd
|
||||
ELSE
|
||||
fmvt.prft_cd
|
||||
END AS pref_cd,
|
||||
s.whspos_err_kbn,
|
||||
s.htdnymd_err_kbn,
|
||||
s.prd_exis_kbn,
|
||||
s.fcl_exis_kbn,
|
||||
s.bef_hsdn_ymd,
|
||||
s.bef_slip_num,
|
||||
s.slip_org_kbn,
|
||||
s.kjyo_ym,
|
||||
s.tksnbk_kbn,
|
||||
s.fcl_exec_kbn,
|
||||
s.rec_sts_kbn,
|
||||
s.ins_dt,
|
||||
s.ins_usr,
|
||||
SYSDATE()
|
||||
FROM (
|
||||
SELECT
|
||||
? AS extract_from_datetime,
|
||||
? AS extract_to_datetime
|
||||
) AS sub
|
||||
INNER JOIN src05.sales AS s
|
||||
ON s.dwh_upd_dt BETWEEN sub.extract_from_datetime AND sub.extract_to_datetime
|
||||
LEFT OUTER JOIN src05.phm_prd_mst_v AS ppmv
|
||||
ON s.comm_cd = ppmv.prd_cd
|
||||
AND STR_TO_DATE(s.hsdn_ymd,'%Y%m%d') BETWEEN ppmv.start_date AND ppmv.end_date
|
||||
AND ppmv.rec_sts_kbn != '9'
|
||||
LEFT OUTER JOIN internal05.fcl_mst_v_t AS fmvt
|
||||
ON s.v_inst_cd = fmvt.v_inst_cd
|
||||
LEFT OUTER JOIN internal05.bu_prd_name_contrast_t AS bpnct
|
||||
ON s.comm_cd = bpnct.prd_cd
|
||||
AND STR_TO_DATE(s.hsdn_ymd, '%Y%m%d') BETWEEN bpnct.pp_start_date AND bpnct.pp_end_date
|
||||
AND STR_TO_DATE(s.hsdn_ymd, '%Y%m%d') BETWEEN bpnct.bp_start_date AND bpnct.bp_end_date
|
||||
LEFT OUTER JOIN src05.com_inst AS ci
|
||||
ON s.v_inst_cd = ci.dcf_dsf_inst_cd
|
||||
WHERE
|
||||
(s.rec_sts_kbn = '0' AND s.err_flg20 = 'M')
|
||||
OR (
|
||||
s.rec_sts_kbn = '0'
|
||||
AND s.err_flg20 != 'M'
|
||||
AND s.v_tran_cd IN (110, 120, 210, 220)
|
||||
AND (
|
||||
(s.fcl_exec_kbn NOT IN ('2', '5') AND (s.fcl_exec_kbn != '6' OR ppmv.prd_sale_kbn != 1))
|
||||
OR s.fcl_exec_kbn IS NULL
|
||||
)
|
||||
)
|
||||
|
||||
ON DUPLICATE KEY UPDATE
|
||||
rec_whs_cd = s.rec_whs_cd,
|
||||
rec_whs_sub_cd = s.rec_whs_sub_cd,
|
||||
rec_whs_org_cd = s.rec_whs_org_cd,
|
||||
rec_cust_cd = s.rec_cust_cd,
|
||||
rec_comm_cd = s.rec_comm_cd,
|
||||
rec_tran_kbn = s.rec_tran_kbn,
|
||||
rev_hsdnymd_wrk = s.rev_hsdnymd_wrk,
|
||||
rev_hsdnymd_srk = s.rev_hsdnymd_srk,
|
||||
rec_urag_num = s.rec_urag_num,
|
||||
rec_qty = s.rec_qty,
|
||||
rec_nonyu_price = s.rec_nonyu_price,
|
||||
rec_nonyu_amt = s.rec_nonyu_amt,
|
||||
rec_comm_name = s.rec_comm_name,
|
||||
rec_nonyu_fcl_name = s.rec_nonyu_fcl_name,
|
||||
free_item = s.free_item,
|
||||
rec_nonyu_fcl_addr = s.rec_nonyu_fcl_addr,
|
||||
rec_nonyu_fcl_post = s.rec_nonyu_fcl_post,
|
||||
rec_nonyu_fcl_tel = s.rec_nonyu_fcl_tel,
|
||||
rec_bef_hsdn_ymd = s.rec_bef_hsdn_ymd,
|
||||
rec_bef_slip_num = s.rec_bef_slip_num,
|
||||
rec_ymd = s.rec_ymd,
|
||||
sale_data_cat = s.sale_data_cat,
|
||||
slip_file_name = s.slip_file_name,
|
||||
row_num = s.row_num,
|
||||
hsdn_ymd = s.hsdn_ymd,
|
||||
exec_dt = s.exec_dt,
|
||||
v_tran_cd = s.v_tran_cd,
|
||||
tran_kbn_name = s.tran_kbn_name,
|
||||
whs_org_cd = s.whs_org_cd,
|
||||
v_whsorg_cd = s.v_whsorg_cd,
|
||||
whs_org_name = s.whs_org_name,
|
||||
whs_org_kn = s.whs_org_kn,
|
||||
v_whs_cd = s.v_whs_cd,
|
||||
whs_name = s.whs_name,
|
||||
nonyu_fcl_cd = s.nonyu_fcl_cd,
|
||||
inst_name = s.v_inst_name,
|
||||
inst_name_kana = s.v_inst_kn,
|
||||
address = s.v_inst_addr,
|
||||
comm_cd = s.comm_cd,
|
||||
comm_name = s.comm_name,
|
||||
nonyu_qty = VALUES(nonyu_qty),
|
||||
nonyu_price = s.nonyu_price,
|
||||
nonyu_amt = VALUES(nonyu_amt),
|
||||
shikiri_price = s.shikiri_price,
|
||||
shikiri_amt = VALUES(shikiri_amt),
|
||||
nhi_price = s.nhi_price,
|
||||
nhi_amt = VALUES(nhi_amt),
|
||||
v_inst_cd = s.v_inst_cd,
|
||||
inst_clas_cd = VALUES(inst_clas_cd),
|
||||
bu_cd = bpnct.bu_cd,
|
||||
item_cd = ppmv.mkr_cd,
|
||||
item_name = ppmv.mkr_inf_1,
|
||||
item_english_name = ppmv.mkr_inf_2,
|
||||
pref_cd = VALUES(pref_cd),
|
||||
whspos_err_kbn = s.whspos_err_kbn,
|
||||
htdnymd_err_kbn = s.htdnymd_err_kbn,
|
||||
prd_exis_kbn = s.prd_exis_kbn,
|
||||
fcl_exis_kbn = s.fcl_exis_kbn,
|
||||
bef_hsdn_ymd = s.bef_hsdn_ymd,
|
||||
bef_slip_num = s.bef_slip_num,
|
||||
slip_org_kbn = s.slip_org_kbn,
|
||||
kjyo_ym = s.kjyo_ym,
|
||||
tksnbk_kbn = s.tksnbk_kbn,
|
||||
fcl_exec_kbn = s.fcl_exec_kbn,
|
||||
rec_sts_kbn = s.rec_sts_kbn,
|
||||
ins_dt = s.ins_dt,
|
||||
ins_usr = s.ins_usr,
|
||||
dwh_upd_dt = SYSDATE()
|
||||
";
|
||||
SET @upsert_sales_launderning = REPLACE(@upsert_sales_launderning, "$$target_table$$", target_table);
|
||||
PREPARE upsert_sales_launderning_stmt from @upsert_sales_launderning;
|
||||
EXECUTE upsert_sales_launderning_stmt USING @extract_from_datetime, @extract_to_datetime;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成⑤ 終了'
|
||||
);
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成⑥ 開始'
|
||||
);
|
||||
|
||||
SET @update_institution_code = "
|
||||
UPDATE (
|
||||
SELECT
|
||||
? AS extract_from_datetime,
|
||||
? AS extract_to_datetime
|
||||
) AS sub,
|
||||
$$target_table$$ AS tt,
|
||||
src05.sales AS s
|
||||
SET
|
||||
tt.inst_cd = (
|
||||
CASE
|
||||
WHEN
|
||||
(s.err_flg20 != 'M' AND tt.inst_clas_cd IN ('2', '3')) OR (s.err_flg20 = 'M')
|
||||
THEN
|
||||
s.v_inst_cd
|
||||
ELSE
|
||||
NULL
|
||||
END
|
||||
)
|
||||
WHERE
|
||||
s.dwh_upd_dt BETWEEN sub.extract_from_datetime AND sub.extract_to_datetime
|
||||
AND tt.slip_mgt_num = s.slip_mgt_num
|
||||
AND tt.row_num = s.row_num
|
||||
";
|
||||
SET @update_institution_code = REPLACE(@update_institution_code, "$$target_table$$", target_table);
|
||||
PREPARE update_institution_code_stmt from @update_institution_code;
|
||||
EXECUTE update_institution_code_stmt USING @extract_from_datetime, @extract_to_datetime;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'卸販売実績テーブル(洗替後)作成⑥ 終了'
|
||||
);
|
||||
|
||||
END
|
||||
79
rds_mysql/stored_procedure/src05/v_inst_merge_laundering.sql
Normal file
79
rds_mysql/stored_procedure/src05/v_inst_merge_laundering.sql
Normal file
@ -0,0 +1,79 @@
|
||||
-- A5M2で実行時に[SQL] - [スラッシュ(/)のみの行でSQLを区切る]に変えてから実行する
|
||||
CREATE PROCEDURE src05.v_inst_merge_laundering(target_table VARCHAR(255))
|
||||
SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
-- スキーマ名
|
||||
DECLARE schema_name VARCHAR(50) DEFAULT (SELECT DATABASE());
|
||||
-- プロシージャ名
|
||||
DECLARE procedure_name VARCHAR(100) DEFAULT 'v_inst_merge_laundering';
|
||||
-- プロシージャの引数
|
||||
DECLARE procedure_args JSON DEFAULT JSON_OBJECT('target_table', target_table);
|
||||
|
||||
-- 例外処理
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
GET DIAGNOSTICS CONDITION 1
|
||||
@error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT;
|
||||
CALL medaca_common.put_error_log(schema_name, procedure_name, procedure_args,
|
||||
'v_inst_merge_launderingでエラーが発生', @error_state, @error_msg);
|
||||
SET @error_msg = (
|
||||
CASE
|
||||
WHEN LENGTH(@error_msg) > 128 THEN CONCAT(SUBSTRING(@error_msg, 1, 125), '...')
|
||||
ELSE @error_msg
|
||||
END
|
||||
);
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg;
|
||||
END;
|
||||
|
||||
SET @error_state = NULL, @error_msg = NULL;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】3:HCO施設コードの洗替① 開始'
|
||||
);
|
||||
|
||||
SET @update_institution = "
|
||||
UPDATE (
|
||||
SELECT
|
||||
v_inst_cd,
|
||||
v_inst_cd_merge,
|
||||
fcl_name,
|
||||
fcl_kn_name,
|
||||
fmt_addr,
|
||||
prft_cd
|
||||
FROM
|
||||
internal05.v_inst_merge_t
|
||||
) AS vimt,
|
||||
$$target_table$$ AS tt
|
||||
SET
|
||||
tt.inst_cd = (
|
||||
CASE
|
||||
WHEN
|
||||
tt.inst_clas_cd = '1'
|
||||
THEN
|
||||
tt.inst_cd
|
||||
WHEN
|
||||
(tt.inst_clas_cd = '2' OR tt.inst_clas_cd = '3')
|
||||
THEN
|
||||
vimt.v_inst_cd_merge
|
||||
END
|
||||
),
|
||||
tt.v_inst_cd = vimt.v_inst_cd_merge,
|
||||
tt.inst_name = vimt.fcl_name,
|
||||
tt.inst_name_kana = vimt.fcl_kn_name,
|
||||
tt.address = vimt.fmt_addr,
|
||||
tt.pref_cd = vimt.prft_cd,
|
||||
tt.dwh_upd_dt = SYSDATE()
|
||||
WHERE
|
||||
tt.v_inst_cd = vimt.v_inst_cd
|
||||
AND (tt.inst_clas_cd IN ('1', '2', '3'))
|
||||
";
|
||||
SET @update_institution = REPLACE(@update_institution, "$$target_table$$", target_table);
|
||||
PREPARE update_institution_stmt from @update_institution;
|
||||
EXECUTE update_institution_stmt;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】3:HCO施設コードの洗替① 終了'
|
||||
);
|
||||
|
||||
END
|
||||
@ -2,75 +2,81 @@
|
||||
CREATE PROCEDURE src05.v_inst_merge_t_create()
|
||||
SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
-- スキーマ名
|
||||
DECLARE schema_name VARCHAR(50) DEFAULT (SELECT DATABASE());
|
||||
-- プロシージャ名
|
||||
DECLARE procedure_name VARCHAR(100) DEFAULT 'v_inst_merge_t_create';
|
||||
-- プロシージャの引数
|
||||
DECLARE procedure_args JSON DEFAULT JSON_OBJECT();
|
||||
-- スキーマ名
|
||||
DECLARE schema_name VARCHAR(50) DEFAULT (SELECT DATABASE());
|
||||
-- プロシージャ名
|
||||
DECLARE procedure_name VARCHAR(100) DEFAULT 'v_inst_merge_t_create';
|
||||
-- プロシージャの引数
|
||||
DECLARE procedure_args JSON DEFAULT JSON_OBJECT();
|
||||
|
||||
-- 例外処理
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
GET DIAGNOSTICS CONDITION 1
|
||||
@error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT;
|
||||
call medaca_common.put_error_log(schema_name, procedure_name, procedure_args,
|
||||
'v_inst_merge_t_createでエラーが発生', @error_state, @error_msg);
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg;
|
||||
END;
|
||||
-- 例外処理
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
GET DIAGNOSTICS CONDITION 1
|
||||
@error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT;
|
||||
CALL medaca_common.put_error_log(schema_name, procedure_name, procedure_args,
|
||||
'v_inst_merge_t_createでエラーが発生', @error_state, @error_msg);
|
||||
SET @error_msg = (
|
||||
CASE
|
||||
WHEN LENGTH(@error_msg) > 128 THEN CONCAT(SUBSTRING(@error_msg, 1, 125), '...')
|
||||
ELSE @error_msg
|
||||
END
|
||||
);
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg;
|
||||
END;
|
||||
|
||||
SET @error_state = NULL, @error_msg = NULL;
|
||||
SET @error_state = NULL, @error_msg = NULL;
|
||||
|
||||
call medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'V施設統合マスタ(洗替処理一時テーブル)作成① 開始');
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'V施設統合マスタ(洗替処理一時テーブル)作成① 開始');
|
||||
|
||||
TRUNCATE TABLE internal05.v_inst_merge_t;
|
||||
TRUNCATE TABLE internal05.v_inst_merge_t;
|
||||
|
||||
call medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'V施設統合マスタ(洗替処理一時テーブル)作成① 終了');
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'V施設統合マスタ(洗替処理一時テーブル)作成① 終了');
|
||||
|
||||
call medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'V施設統合マスタ(洗替処理一時テーブル)作成② 開始');
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'V施設統合マスタ(洗替処理一時テーブル)作成② 開始');
|
||||
|
||||
INSERT INTO
|
||||
internal05.v_inst_merge_t (
|
||||
v_inst_cd,
|
||||
v_inst_cd_merge,
|
||||
fcl_name,
|
||||
fcl_kn_name,
|
||||
fmt_addr,
|
||||
prft_cd,
|
||||
fcl_type
|
||||
)
|
||||
SELECT
|
||||
vhmv.v_inst_cd,
|
||||
vhmv.v_inst_cd_merg,
|
||||
fmv.fcl_name,
|
||||
fmv.fcl_kn_name,
|
||||
fmv.fmt_addr,
|
||||
fmv.prft_cd,
|
||||
fmv.fcl_type
|
||||
FROM
|
||||
src05.vop_hco_merge_v vhmv,
|
||||
src05.fcl_mst_v fmv
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
v_inst_cd,
|
||||
MAX(sub_num) AS sno
|
||||
FROM
|
||||
src05.fcl_mst_v
|
||||
GROUP BY
|
||||
v_inst_cd
|
||||
) max_sno_fmv
|
||||
ON fmv.v_inst_cd = max_sno_fmv.v_inst_cd
|
||||
AND fmv.sub_num = max_sno_fmv.sno
|
||||
WHERE
|
||||
vhmv.v_inst_cd_merg = fmv.v_inst_cd
|
||||
AND STR_TO_DATE(vhmv.apply_dt, '%Y-%m-%d') <= src05.get_syor_date()
|
||||
AND fmv.rec_sts_kbn != '9';
|
||||
INSERT INTO
|
||||
internal05.v_inst_merge_t (
|
||||
v_inst_cd,
|
||||
v_inst_cd_merge,
|
||||
fcl_name,
|
||||
fcl_kn_name,
|
||||
fmt_addr,
|
||||
prft_cd,
|
||||
fcl_type
|
||||
)
|
||||
SELECT
|
||||
vhmv.v_inst_cd,
|
||||
vhmv.v_inst_cd_merg,
|
||||
fmv.fcl_name,
|
||||
fmv.fcl_kn_name,
|
||||
fmv.fmt_addr,
|
||||
fmv.prft_cd,
|
||||
fmv.fcl_type
|
||||
FROM
|
||||
src05.vop_hco_merge_v AS vhmv,
|
||||
src05.fcl_mst_v AS fmv
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
v_inst_cd,
|
||||
MAX(sub_num) AS sno
|
||||
FROM
|
||||
src05.fcl_mst_v
|
||||
GROUP BY
|
||||
v_inst_cd
|
||||
) AS max_sno_fmv
|
||||
ON fmv.v_inst_cd = max_sno_fmv.v_inst_cd
|
||||
AND fmv.sub_num = max_sno_fmv.sno
|
||||
WHERE
|
||||
vhmv.v_inst_cd_merg = fmv.v_inst_cd
|
||||
AND STR_TO_DATE(vhmv.apply_dt, '%Y-%m-%d') <= src05.get_syor_date()
|
||||
AND fmv.rec_sts_kbn != '9';
|
||||
|
||||
call medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'V施設統合マスタ(洗替処理一時テーブル)作成② 終了' );
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'V施設統合マスタ(洗替処理一時テーブル)作成② 終了' );
|
||||
|
||||
END
|
||||
|
||||
128
rds_mysql/stored_procedure/src05/whs_org_laundering.sql
Normal file
128
rds_mysql/stored_procedure/src05/whs_org_laundering.sql
Normal file
@ -0,0 +1,128 @@
|
||||
-- A5M2で実行時に[SQL] - [スラッシュ(/)のみの行でSQLを区切る]に変えてから実行する
|
||||
CREATE PROCEDURE src05.whs_org_laundering(target_table VARCHAR(255))
|
||||
SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
-- スキーマ名
|
||||
DECLARE schema_name VARCHAR(50) DEFAULT (SELECT DATABASE());
|
||||
-- プロシージャ名
|
||||
DECLARE procedure_name VARCHAR(100) DEFAULT 'whs_org_laundering';
|
||||
-- プロシージャの引数
|
||||
DECLARE procedure_args JSON DEFAULT JSON_OBJECT('target_table', target_table);
|
||||
|
||||
-- 例外処理
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
GET DIAGNOSTICS CONDITION 1
|
||||
@error_state = RETURNED_SQLSTATE, @error_msg = MESSAGE_TEXT;
|
||||
CALL medaca_common.put_error_log(schema_name, procedure_name, procedure_args,
|
||||
'whs_org_launderingでエラーが発生', @error_state, @error_msg);
|
||||
SET @error_msg = (
|
||||
CASE
|
||||
WHEN LENGTH(@error_msg) > 128 THEN CONCAT(SUBSTRING(@error_msg, 1, 125), '...')
|
||||
ELSE @error_msg
|
||||
END
|
||||
);
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MYSQL_ERRNO = @error_state, MESSAGE_TEXT = @error_msg;
|
||||
END;
|
||||
|
||||
SET @error_state = NULL, @error_msg = NULL;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】1.卸組織洗替① 開始'
|
||||
);
|
||||
|
||||
TRUNCATE TABLE internal05.whs_customer_org_t;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】1.卸組織洗替① 終了'
|
||||
);
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】1.卸組織洗替② 開始'
|
||||
);
|
||||
|
||||
INSERT INTO
|
||||
internal05.whs_customer_org_t (
|
||||
whs_cd,
|
||||
whs_sub_cd,
|
||||
customer_cd,
|
||||
whs_org_cd,
|
||||
v_org_cd,
|
||||
name_2
|
||||
)
|
||||
SELECT
|
||||
wcmv.whs_cd,
|
||||
wcmv.whs_sub_cd,
|
||||
wcmv.customer_cd,
|
||||
wcmv.whs_org_cd,
|
||||
ocmv.v_org_cd,
|
||||
mohv2.name_2
|
||||
FROM
|
||||
src05.whs_customer_mst_v AS wcmv
|
||||
LEFT OUTER JOIN src05.org_cnv_mst_v AS ocmv
|
||||
ON wcmv.whs_cd = ocmv.whs_cd
|
||||
AND wcmv.whs_sub_cd = ocmv.whs_sub_cd
|
||||
AND wcmv.whs_org_cd = ocmv.org_cd
|
||||
AND src05.get_syor_date() BETWEEN ocmv.start_date AND ocmv.end_date
|
||||
AND ocmv.rec_sts_kbn != '9'
|
||||
LEFT OUTER JOIN (
|
||||
SELECT
|
||||
mohv.v_cd_2,
|
||||
mohv.name_2
|
||||
FROM src05.mkr_org_horizon_v AS mohv
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
v_cd_2,
|
||||
MAX(dwh_upd_dt) AS dwh_upd_dt_latest
|
||||
FROM
|
||||
src05.mkr_org_horizon_v
|
||||
WHERE
|
||||
rec_sts_kbn != '9'
|
||||
AND src05.get_syor_date() BETWEEN start_date AND end_date
|
||||
GROUP BY
|
||||
v_cd_2
|
||||
ORDER BY
|
||||
MAX(start_date) DESC
|
||||
) AS m_latest
|
||||
ON mohv.v_cd_2 = m_latest.v_cd_2
|
||||
AND mohv.dwh_upd_dt = m_latest.dwh_upd_dt_latest
|
||||
WHERE
|
||||
mohv.rec_sts_kbn != '9'
|
||||
AND src05.get_syor_date() BETWEEN mohv.start_date AND mohv.end_date
|
||||
) AS mohv2
|
||||
ON ocmv.v_org_cd = mohv2.v_cd_2
|
||||
WHERE
|
||||
wcmv.rec_sts_kbn != '9'
|
||||
AND src05.get_syor_date() BETWEEN wcmv.start_date AND wcmv.end_date
|
||||
;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】1.卸組織洗替② 終了'
|
||||
);
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】1.卸組織洗替③ 開始'
|
||||
);
|
||||
|
||||
SET @update_organization = "
|
||||
UPDATE
|
||||
$$target_table$$ AS tt, internal05.whs_customer_org_t AS wcot
|
||||
SET
|
||||
tt.whs_org_cd = wcot.whs_org_cd,
|
||||
tt.v_whsorg_cd = wcot.v_org_cd,
|
||||
tt.whs_org_name = wcot.name_2
|
||||
WHERE
|
||||
wcot.whs_cd = tt.rec_whs_cd
|
||||
AND wcot.whs_sub_cd = tt.rec_whs_sub_cd
|
||||
AND wcot.customer_cd = tt.rec_cust_cd
|
||||
";
|
||||
SET @update_organization = REPLACE(@update_organization, "$$target_table$$", target_table);
|
||||
PREPARE update_organization_stmt from @update_organization;
|
||||
EXECUTE update_organization_stmt;
|
||||
|
||||
CALL medaca_common.put_info_log(schema_name, procedure_name, procedure_args,
|
||||
'【洗替】1.卸組織洗替③ 終了'
|
||||
);
|
||||
|
||||
END
|
||||
4
s3/config/crm/last_fetch_datetime/Event.json
Normal file
4
s3/config/crm/last_fetch_datetime/Event.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"last_fetch_datetime_from": "1900-01-01T00:00:00.000Z",
|
||||
"last_fetch_datetime_to": ""
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
{
|
||||
"last_fetch_datetime_from": "1900-01-01T00:00:00.000Z",
|
||||
"last_fetch_datetime_to": ""
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
{
|
||||
"last_fetch_datetime_from": "1900-01-01T00:00:00.000Z",
|
||||
"last_fetch_datetime_to": ""
|
||||
}
|
||||
4
s3/config/crm/last_fetch_datetime/Suggestion_vod__c.json
Normal file
4
s3/config/crm/last_fetch_datetime/Suggestion_vod__c.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"last_fetch_datetime_from": "1900-01-01T00:00:00.000Z",
|
||||
"last_fetch_datetime_to": ""
|
||||
}
|
||||
4
s3/config/crm/last_fetch_datetime/Task.json
Normal file
4
s3/config/crm/last_fetch_datetime/Task.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"last_fetch_datetime_from": "1900-01-01T00:00:00.000Z",
|
||||
"last_fetch_datetime_to": ""
|
||||
}
|
||||
@ -2870,6 +2870,7 @@
|
||||
"zvod_Specialty_vod__c",
|
||||
"Score_vod__c",
|
||||
"User_vod__c",
|
||||
"Suggestion_vod__c",
|
||||
"Child_Account_vod__c",
|
||||
"Location_Entity_Reference_Id_vod__c",
|
||||
"Location_vod__c",
|
||||
@ -3002,6 +3003,239 @@
|
||||
],
|
||||
"is_skip": false,
|
||||
"is_update_last_fetch_datetime": true
|
||||
},
|
||||
{
|
||||
"object_name": "Suggestion_vod__c",
|
||||
"columns": [
|
||||
"Id",
|
||||
"OwnerId",
|
||||
"IsDeleted",
|
||||
"Name",
|
||||
"RecordTypeId",
|
||||
"CreatedDate",
|
||||
"CreatedById",
|
||||
"LastModifiedDate",
|
||||
"LastModifiedById",
|
||||
"SystemModstamp",
|
||||
"MayEdit",
|
||||
"IsLocked",
|
||||
"LastViewedDate",
|
||||
"LastReferencedDate",
|
||||
"Account_Priority_Score_vod__c",
|
||||
"Account_vod__c",
|
||||
"Action_Count_vod__c",
|
||||
"Actioned_vod__c",
|
||||
"Call_Objective_CLM_ID_vod__c",
|
||||
"Call_Objective_From_Date_vod__c",
|
||||
"Call_Objective_On_By_Default_vod__c",
|
||||
"Call_Objective_Record_Type_vod__c",
|
||||
"Call_Objective_To_Date_vod__c",
|
||||
"Dismiss_Count_vod__c",
|
||||
"Dismissed_vod__c",
|
||||
"Display_Dismiss_vod__c",
|
||||
"Display_Mark_As_Complete_vod__c",
|
||||
"Display_Score_vod__c",
|
||||
"Email_Template_ID_vod__c",
|
||||
"Email_Template_Vault_ID_vod__c",
|
||||
"Email_Template_vod__c",
|
||||
"Expiration_Date_vod__c",
|
||||
"Mark_Complete_Count_vod__c",
|
||||
"Marked_As_Complete_vod__c",
|
||||
"No_Homepage_vod__c",
|
||||
"Planned_Call_Date_vod__c",
|
||||
"Posted_Date_vod__c",
|
||||
"Priority_vod__c",
|
||||
"Reason_vod__c",
|
||||
"Record_Type_Name_vod__c",
|
||||
"Suggestion_External_Id_vod__c",
|
||||
"Suppress_Reason_vod__c",
|
||||
"Title_vod__c",
|
||||
"Suggestion_Survey_vod__c",
|
||||
"Category_vod__c",
|
||||
"MSJ_Reason_unformatted__c",
|
||||
"MSJ_Data_Id__c",
|
||||
"MSJ_reason_id__c"
|
||||
],
|
||||
"is_skip": false,
|
||||
"is_update_last_fetch_datetime": true
|
||||
},
|
||||
{
|
||||
"object_name": "Suggestion_Tag_vod__c",
|
||||
"columns": [
|
||||
"Id",
|
||||
"IsDeleted",
|
||||
"Name",
|
||||
"RecordTypeId",
|
||||
"CreatedDate",
|
||||
"CreatedById",
|
||||
"LastModifiedDate",
|
||||
"LastModifiedById",
|
||||
"SystemModstamp",
|
||||
"MayEdit",
|
||||
"IsLocked",
|
||||
"Suggestion_vod__c",
|
||||
"Detail_Group_vod__c",
|
||||
"Driver_vod__c",
|
||||
"Email_Fragment_order_vod__c",
|
||||
"Email_Fragment_vod__c",
|
||||
"External_ID_vod__c",
|
||||
"Product_vod__c",
|
||||
"Record_Type_Name_vod__c"
|
||||
],
|
||||
"is_skip": false,
|
||||
"is_update_last_fetch_datetime": true
|
||||
},
|
||||
{
|
||||
"object_name": "Suggestion_Feedback_vod__c",
|
||||
"columns": [
|
||||
"Id",
|
||||
"IsDeleted",
|
||||
"Name",
|
||||
"RecordTypeId",
|
||||
"CreatedDate",
|
||||
"CreatedById",
|
||||
"LastModifiedDate",
|
||||
"LastModifiedById",
|
||||
"SystemModstamp",
|
||||
"MayEdit",
|
||||
"IsLocked",
|
||||
"Suggestion_vod__c",
|
||||
"Account_vod__c",
|
||||
"Activity_Execution_Type_vod__c",
|
||||
"Call2_vod__c",
|
||||
"Call_Objective_vod__c",
|
||||
"DismissFeedback1_vod__c",
|
||||
"DismissFeedback2_vod__c",
|
||||
"DismissFeedback3_vod__c",
|
||||
"DismissFeedback4_vod__c",
|
||||
"Mobile_ID_vod__c",
|
||||
"Sent_Email_vod__c"
|
||||
],
|
||||
"is_skip": false,
|
||||
"is_update_last_fetch_datetime": true
|
||||
},
|
||||
{
|
||||
"object_name": "Event",
|
||||
"columns": [
|
||||
"Id",
|
||||
"RecordTypeId",
|
||||
"WhoId",
|
||||
"WhatId",
|
||||
"Subject",
|
||||
"Location",
|
||||
"IsAllDayEvent",
|
||||
"ActivityDateTime",
|
||||
"ActivityDate",
|
||||
"DurationInMinutes",
|
||||
"StartDateTime",
|
||||
"EndDateTime",
|
||||
"EndDate",
|
||||
"Description",
|
||||
"AccountId",
|
||||
"OwnerId",
|
||||
"IsPrivate",
|
||||
"ShowAs",
|
||||
"IsDeleted",
|
||||
"IsChild",
|
||||
"IsGroupEvent",
|
||||
"GroupEventType",
|
||||
"CreatedDate",
|
||||
"CreatedById",
|
||||
"LastModifiedDate",
|
||||
"LastModifiedById",
|
||||
"SystemModstamp",
|
||||
"IsArchived",
|
||||
"RecurrenceActivityId",
|
||||
"IsRecurrence",
|
||||
"RecurrenceStartDateTime",
|
||||
"RecurrenceEndDateOnly",
|
||||
"RecurrenceTimeZoneSidKey",
|
||||
"RecurrenceType",
|
||||
"RecurrenceInterval",
|
||||
"RecurrenceDayOfWeekMask",
|
||||
"RecurrenceDayOfMonth",
|
||||
"RecurrenceInstance",
|
||||
"RecurrenceMonthOfYear",
|
||||
"ReminderDateTime",
|
||||
"IsReminderSet",
|
||||
"EventSubtype",
|
||||
"IsRecurrence2Exclusion",
|
||||
"Recurrence2PatternText",
|
||||
"Recurrence2PatternVersion",
|
||||
"IsRecurrence2",
|
||||
"IsRecurrence2Exception",
|
||||
"Recurrence2PatternStartDate",
|
||||
"Recurrence2PatternTimeZone",
|
||||
"Override_Lock_vod__c",
|
||||
"Mobile_ID_vod__c",
|
||||
"Color_vod__c",
|
||||
"Event_Canceled_vod__c",
|
||||
"Followup_Activity_Type_vod__c",
|
||||
"MSJ_Data_ID__c",
|
||||
"MSJ_Reason_ID__c",
|
||||
"MSJ_Task_External_Id__c",
|
||||
"MSJ_Task_Source__c",
|
||||
"MSJ_Visit_Type__c"
|
||||
],
|
||||
"is_skip": false,
|
||||
"is_update_last_fetch_datetime": true
|
||||
},
|
||||
{
|
||||
"object_name": "Task",
|
||||
"columns": [
|
||||
"Id",
|
||||
"RecordTypeId",
|
||||
"WhoId",
|
||||
"WhatId",
|
||||
"Subject",
|
||||
"ActivityDate",
|
||||
"Status",
|
||||
"Priority",
|
||||
"IsHighPriority",
|
||||
"OwnerId",
|
||||
"Description",
|
||||
"IsDeleted",
|
||||
"AccountId",
|
||||
"IsClosed",
|
||||
"CreatedDate",
|
||||
"CreatedById",
|
||||
"LastModifiedDate",
|
||||
"LastModifiedById",
|
||||
"SystemModstamp",
|
||||
"IsArchived",
|
||||
"CallDurationInSeconds",
|
||||
"CallType",
|
||||
"CallDisposition",
|
||||
"CallObject",
|
||||
"ReminderDateTime",
|
||||
"IsReminderSet",
|
||||
"RecurrenceActivityId",
|
||||
"IsRecurrence",
|
||||
"RecurrenceStartDateOnly",
|
||||
"RecurrenceEndDateOnly",
|
||||
"RecurrenceTimeZoneSidKey",
|
||||
"RecurrenceType",
|
||||
"RecurrenceInterval",
|
||||
"RecurrenceDayOfWeekMask",
|
||||
"RecurrenceDayOfMonth",
|
||||
"RecurrenceInstance",
|
||||
"RecurrenceMonthOfYear",
|
||||
"RecurrenceRegeneratedType",
|
||||
"TaskSubtype",
|
||||
"CompletedDateTime",
|
||||
"Override_Lock_vod__c",
|
||||
"Mobile_ID_vod__c",
|
||||
"Color_vod__c",
|
||||
"Event_Canceled_vod__c",
|
||||
"Followup_Activity_Type_vod__c",
|
||||
"MSJ_Data_ID__c",
|
||||
"MSJ_Reason_ID__c",
|
||||
"MSJ_Task_External_Id__c",
|
||||
"MSJ_Task_Source__c",
|
||||
"MSJ_Visit_Type__c"
|
||||
],
|
||||
"is_skip": false,
|
||||
"is_update_last_fetch_datetime": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -4,3 +4,4 @@ AUTHORIZE_ENDPOINT=oauth2/authorize
|
||||
TOKEN_ENDPOINT=oauth2/token
|
||||
BIO_SEARCH_RESULT_MAX_COUNT=35000
|
||||
SESSION_EXPIRE_MINUTE=20
|
||||
ULTMARC_SEARCH_RESULT_MAX_COUNT=500
|
||||
|
||||
13
s3/data/crm/settings/CRM_Event.txt
Normal file
13
s3/data/crm/settings/CRM_Event.txt
Normal file
@ -0,0 +1,13 @@
|
||||
CRM
|
||||
,
|
||||
utf-8
|
||||
"
|
||||
CRLF
|
||||
1
|
||||
59
|
||||
Id,RecordTypeId,WhoId,WhatId,Subject,Location,IsAllDayEvent,ActivityDateTime,ActivityDate,DurationInMinutes,StartDateTime,EndDateTime,EndDate,Description,AccountId,OwnerId,IsPrivate,ShowAs,IsDeleted,IsChild,IsGroupEvent,GroupEventType,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,IsArchived,RecurrenceActivityId,IsRecurrence,RecurrenceStartDateTime,RecurrenceEndDateOnly,RecurrenceTimeZoneSidKey,RecurrenceType,RecurrenceInterval,RecurrenceDayOfWeekMask,RecurrenceDayOfMonth,RecurrenceInstance,RecurrenceMonthOfYear,ReminderDateTime,IsReminderSet,EventSubtype,IsRecurrence2Exclusion,Recurrence2PatternText,Recurrence2PatternVersion,IsRecurrence2,IsRecurrence2Exception,Recurrence2PatternStartDate,Recurrence2PatternTimeZone,Override_Lock_vod__c,Mobile_ID_vod__c,Color_vod__c,Event_Canceled_vod__c,Followup_Activity_Type_vod__c,MSJ_Data_ID__c,MSJ_Reason_ID__c,MSJ_Task_External_Id__c,MSJ_Task_Source__c,MSJ_Visit_Type__c
|
||||
Id,RecordTypeId,WhoId,WhatId,Subject,Location,IsAllDayEvent,ActivityDateTime,ActivityDate,DurationInMinutes,StartDateTime,EndDateTime,EndDate,Description,AccountId,OwnerId,IsPrivate,ShowAs,IsDeleted,IsChild,IsGroupEvent,GroupEventType,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,IsArchived,RecurrenceActivityId,IsRecurrence,RecurrenceStartDateTime,RecurrenceEndDateOnly,RecurrenceTimeZoneSidKey,RecurrenceType,RecurrenceInterval,RecurrenceDayOfWeekMask,RecurrenceDayOfMonth,RecurrenceInstance,RecurrenceMonthOfYear,ReminderDateTime,IsReminderSet,EventSubtype,IsRecurrence2Exclusion,Recurrence2PatternText,Recurrence2PatternVersion,IsRecurrence2,IsRecurrence2Exception,Recurrence2PatternStartDate,Recurrence2PatternTimeZone,Override_Lock_vod__c,Mobile_ID_vod__c,Color_vod__c,Event_Canceled_vod__c,Followup_Activity_Type_vod__c,MSJ_Data_ID__c,MSJ_Reason_ID__c,MSJ_Task_External_Id__c,MSJ_Task_Source__c,MSJ_Visit_Type__c
|
||||
src02.crm_Event
|
||||
org02.crm_Event
|
||||
|
||||
|
||||
13
s3/data/crm/settings/CRM_Suggestion_Feedback_vod__c.txt
Normal file
13
s3/data/crm/settings/CRM_Suggestion_Feedback_vod__c.txt
Normal file
@ -0,0 +1,13 @@
|
||||
CRM
|
||||
,
|
||||
utf-8
|
||||
"
|
||||
CRLF
|
||||
1
|
||||
22
|
||||
Id,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,Suggestion_vod__c,Account_vod__c,Activity_Execution_Type_vod__c,Call2_vod__c,Call_Objective_vod__c,DismissFeedback1_vod__c,DismissFeedback2_vod__c,DismissFeedback3_vod__c,DismissFeedback4_vod__c,Mobile_ID_vod__c,Sent_Email_vod__c
|
||||
Id,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,Suggestion_vod__c,Account_vod__c,Activity_Execution_Type_vod__c,Call2_vod__c,Call_Objective_vod__c,DismissFeedback1_vod__c,DismissFeedback2_vod__c,DismissFeedback3_vod__c,DismissFeedback4_vod__c,Mobile_ID_vod__c,Sent_Email_vod__c
|
||||
src02.crm_Suggestion_Feedback_vod__c
|
||||
org02.crm_Suggestion_Feedback_vod__c
|
||||
|
||||
|
||||
13
s3/data/crm/settings/CRM_Suggestion_Tag_vod__c.txt
Normal file
13
s3/data/crm/settings/CRM_Suggestion_Tag_vod__c.txt
Normal file
@ -0,0 +1,13 @@
|
||||
CRM
|
||||
,
|
||||
utf-8
|
||||
"
|
||||
CRLF
|
||||
1
|
||||
19
|
||||
Id,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,Suggestion_vod__c,Detail_Group_vod__c,Driver_vod__c,Email_Fragment_order_vod__c,Email_Fragment_vod__c,External_ID_vod__c,Product_vod__c,Record_Type_Name_vod__c
|
||||
Id,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,Suggestion_vod__c,Detail_Group_vod__c,Driver_vod__c,Email_Fragment_order_vod__c,Email_Fragment_vod__c,External_ID_vod__c,Product_vod__c,Record_Type_Name_vod__c
|
||||
src02.crm_Suggestion_Tag_vod__c
|
||||
org02.crm_Suggestion_Tag_vod__c
|
||||
|
||||
|
||||
13
s3/data/crm/settings/CRM_Suggestion_vod__c.txt
Normal file
13
s3/data/crm/settings/CRM_Suggestion_vod__c.txt
Normal file
@ -0,0 +1,13 @@
|
||||
CRM
|
||||
,
|
||||
utf-8
|
||||
"
|
||||
CRLF
|
||||
1
|
||||
48
|
||||
Id,OwnerId,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,LastViewedDate,LastReferencedDate,Account_Priority_Score_vod__c,Account_vod__c,Action_Count_vod__c,Actioned_vod__c,Call_Objective_CLM_ID_vod__c,Call_Objective_From_Date_vod__c,Call_Objective_On_By_Default_vod__c,Call_Objective_Record_Type_vod__c,Call_Objective_To_Date_vod__c,Dismiss_Count_vod__c,Dismissed_vod__c,Display_Dismiss_vod__c,Display_Mark_As_Complete_vod__c,Display_Score_vod__c,Email_Template_ID_vod__c,Email_Template_Vault_ID_vod__c,Email_Template_vod__c,Expiration_Date_vod__c,Mark_Complete_Count_vod__c,Marked_As_Complete_vod__c,No_Homepage_vod__c,Planned_Call_Date_vod__c,Posted_Date_vod__c,Priority_vod__c,Reason_vod__c,Record_Type_Name_vod__c,Suggestion_External_Id_vod__c,Suppress_Reason_vod__c,Title_vod__c,Suggestion_Survey_vod__c,Category_vod__c,MSJ_Reason_unformatted__c,MSJ_Data_Id__c,MSJ_reason_id__c
|
||||
Id,OwnerId,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,LastViewedDate,LastReferencedDate,Account_Priority_Score_vod__c,Account_vod__c,Action_Count_vod__c,Actioned_vod__c,Call_Objective_CLM_ID_vod__c,Call_Objective_From_Date_vod__c,Call_Objective_On_By_Default_vod__c,Call_Objective_Record_Type_vod__c,Call_Objective_To_Date_vod__c,Dismiss_Count_vod__c,Dismissed_vod__c,Display_Dismiss_vod__c,Display_Mark_As_Complete_vod__c,Display_Score_vod__c,Email_Template_ID_vod__c,Email_Template_Vault_ID_vod__c,Email_Template_vod__c,Expiration_Date_vod__c,Mark_Complete_Count_vod__c,Marked_As_Complete_vod__c,No_Homepage_vod__c,Planned_Call_Date_vod__c,Posted_Date_vod__c,Priority_vod__c,Reason_vod__c,Record_Type_Name_vod__c,Suggestion_External_Id_vod__c,Suppress_Reason_vod__c,Title_vod__c,Suggestion_Survey_vod__c,Category_vod__c,MSJ_Reason_unformatted__c,MSJ_Data_Id__c,MSJ_reason_id__c
|
||||
src02.crm_Suggestion_vod__c
|
||||
org02.crm_Suggestion_vod__c
|
||||
|
||||
|
||||
@ -4,9 +4,9 @@ utf-8
|
||||
"
|
||||
CRLF
|
||||
1
|
||||
39
|
||||
Id,OwnerId,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,LastViewedDate,LastReferencedDate,Account_Display_Name_vod__c,Account_vod__c,Channels_vod__c,End_Date_vod__c,Entity_Reference_Id_vod__c,External_ID_vod__c,Language_vod__c,Lock_vod__c,Mobile_ID_vod__c,No_Autoassign_vod__c,Not_Completed_vod__c,Region_vod__c,Segment_vod__c,Start_Date_vod__c,Status_vod__c,Survey_vod__c,Territory_vod__c,zvod_Address_vod__c,zvod_Specialty_vod__c,Score_vod__c,User_vod__c,Child_Account_vod__c,Location_Entity_Reference_Id_vod__c,Location_vod__c,Target_Type_vod__c
|
||||
Id,OwnerId,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,LastViewedDate,LastReferencedDate,Account_Display_Name_vod__c,Account_vod__c,Channels_vod__c,End_Date_vod__c,Entity_Reference_Id_vod__c,External_ID_vod__c,Language_vod__c,Lock_vod__c,Mobile_ID_vod__c,No_Autoassign_vod__c,Not_Completed_vod__c,Region_vod__c,Segment_vod__c,Start_Date_vod__c,Status_vod__c,Survey_vod__c,Territory_vod__c,zvod_Address_vod__c,zvod_Specialty_vod__c,Score_vod__c,User_vod__c,Child_Account_vod__c,Location_Entity_Reference_Id_vod__c,Location_vod__c,Target_Type_vod__c
|
||||
40
|
||||
Id,OwnerId,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,LastViewedDate,LastReferencedDate,Account_Display_Name_vod__c,Account_vod__c,Channels_vod__c,End_Date_vod__c,Entity_Reference_Id_vod__c,External_ID_vod__c,Language_vod__c,Lock_vod__c,Mobile_ID_vod__c,No_Autoassign_vod__c,Not_Completed_vod__c,Region_vod__c,Segment_vod__c,Start_Date_vod__c,Status_vod__c,Survey_vod__c,Territory_vod__c,zvod_Address_vod__c,zvod_Specialty_vod__c,Score_vod__c,User_vod__c,Suggestion_vod__c,Child_Account_vod__c,Location_Entity_Reference_Id_vod__c,Location_vod__c,Target_Type_vod__c
|
||||
Id,OwnerId,IsDeleted,Name,RecordTypeId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,MayEdit,IsLocked,LastViewedDate,LastReferencedDate,Account_Display_Name_vod__c,Account_vod__c,Channels_vod__c,End_Date_vod__c,Entity_Reference_Id_vod__c,External_ID_vod__c,Language_vod__c,Lock_vod__c,Mobile_ID_vod__c,No_Autoassign_vod__c,Not_Completed_vod__c,Region_vod__c,Segment_vod__c,Start_Date_vod__c,Status_vod__c,Survey_vod__c,Territory_vod__c,zvod_Address_vod__c,zvod_Specialty_vod__c,Score_vod__c,User_vod__c,Suggestion_vod__c,Child_Account_vod__c,Location_Entity_Reference_Id_vod__c,Location_vod__c,Target_Type_vod__c
|
||||
src02.crm_Survey_Target_vod__c
|
||||
org02.crm_Survey_Target_vod__c
|
||||
|
||||
|
||||
13
s3/data/crm/settings/CRM_Task.txt
Normal file
13
s3/data/crm/settings/CRM_Task.txt
Normal file
@ -0,0 +1,13 @@
|
||||
CRM
|
||||
,
|
||||
utf-8
|
||||
"
|
||||
CRLF
|
||||
1
|
||||
50
|
||||
Id,RecordTypeId,WhoId,WhatId,Subject,ActivityDate,Status,Priority,IsHighPriority,OwnerId,Description,IsDeleted,AccountId,IsClosed,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,IsArchived,CallDurationInSeconds,CallType,CallDisposition,CallObject,ReminderDateTime,IsReminderSet,RecurrenceActivityId,IsRecurrence,RecurrenceStartDateOnly,RecurrenceEndDateOnly,RecurrenceTimeZoneSidKey,RecurrenceType,RecurrenceInterval,RecurrenceDayOfWeekMask,RecurrenceDayOfMonth,RecurrenceInstance,RecurrenceMonthOfYear,RecurrenceRegeneratedType,TaskSubtype,CompletedDateTime,Override_Lock_vod__c,Mobile_ID_vod__c,Color_vod__c,Event_Canceled_vod__c,Followup_Activity_Type_vod__c,MSJ_Data_ID__c,MSJ_Reason_ID__c,MSJ_Task_External_Id__c,MSJ_Task_Source__c,MSJ_Visit_Type__c
|
||||
Id,RecordTypeId,WhoId,WhatId,Subject,ActivityDate,Status,Priority,IsHighPriority,OwnerId,Description,IsDeleted,AccountId,IsClosed,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,IsArchived,CallDurationInSeconds,CallType,CallDisposition,CallObject,ReminderDateTime,IsReminderSet,RecurrenceActivityId,IsRecurrence,RecurrenceStartDateOnly,RecurrenceEndDateOnly,RecurrenceTimeZoneSidKey,RecurrenceType,RecurrenceInterval,RecurrenceDayOfWeekMask,RecurrenceDayOfMonth,RecurrenceInstance,RecurrenceMonthOfYear,RecurrenceRegeneratedType,TaskSubtype,CompletedDateTime,Override_Lock_vod__c,Mobile_ID_vod__c,Color_vod__c,Event_Canceled_vod__c,Followup_Activity_Type_vod__c,MSJ_Data_ID__c,MSJ_Reason_ID__c,MSJ_Task_External_Id__c,MSJ_Task_Source__c,MSJ_Visit_Type__c
|
||||
src02.crm_Task
|
||||
org02.crm_Task
|
||||
|
||||
|
||||
@ -53,6 +53,11 @@ CRM_Survey_Question_vod__c_[0-9]{14}\.(CSV|csv) CRM_Survey_Question_vod__c.txt
|
||||
CRM_Question_Response_vod__c_[0-9]{14}\.(CSV|csv) CRM_Question_Response_vod__c.txt
|
||||
CRM_Sent_Fragment_vod__c_[0-9]{14}\.(CSV|csv) CRM_Sent_Fragment_vod__c.txt
|
||||
CRM_Sent_Email_vod__c_[0-9]{14}\.(CSV|csv) CRM_Sent_Email_vod__c.txt
|
||||
CRM_Suggestion_vod__c_[0-9]{14}\.(CSV|csv) CRM_Suggestion_vod__c.txt
|
||||
CRM_Suggestion_Tag_vod__c_[0-9]{14}\.(CSV|csv) CRM_Suggestion_Tag_vod__c.txt
|
||||
CRM_Suggestion_Feedback_vod__c_[0-9]{14}\.(CSV|csv) CRM_Suggestion_Feedback_vod__c.txt
|
||||
CRM_Event_[0-9]{14}\.(CSV|csv) CRM_Event.txt
|
||||
CRM_Task_[0-9]{14}\.(CSV|csv) CRM_Task.txt
|
||||
/* 【CRMデータ 全件連携】 */
|
||||
CRM_Territory2_ALL_[0-9]{14}\.(CSV|csv) CRM_Territory2_ALL.txt
|
||||
CRM_UserTerritory2Association_ALL_[0-9]{14}\.(CSV|csv) CRM_UserTerritory2Association_ALL.txt
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user