feat:都道府県マスタに関する変更の取り消し

This commit is contained in:
yono 2025-05-28 13:14:15 +09:00
parent d6d0d2ff0d
commit 23f5093b32
3 changed files with 7 additions and 7 deletions

View File

@ -10,12 +10,12 @@ class PrefcMasterRepository(BaseRepository):
FETCH_SQL = """\
SELECT DISTINCT
com_inst.prefc_cd AS prefc_cd,
mst_jis_pref.jis_pref_nm_kj AS prefc_name
mst_prefc.prefc_name AS prefc_name
FROM
src05.com_inst
JOIN src07.mst_jis_pref ON com_inst.prefc_cd = mst_jis_pref.jis_pref_cd and (select str_to_date(syor_date,'%Y%m%d') from src07.hdke_tbl) between STR_TO_DATE(CONCAT(eff_start_ym, '01'), '%Y%m%d') and LAST_DAY(STR_TO_DATE(CONCAT(eff_end_ym, '01'), '%Y%m%d'))
JOIN src05.mst_prefc ON com_inst.prefc_cd = mst_prefc.prefc_cd
ORDER BY
prefc_cd
mst_prefc.prefc_cd
"""
def fetch_all(self) -> list[PrefcMasterModel]:

View File

@ -27,11 +27,11 @@ class UltmarcDoctorRepository(BaseRepository):
com_alma.alma,
com_dr.grad_y,
com_dr.use_stop_div,
mst_jis_pref.jis_pref_nm_kj AS prefc_name,
mst_prefc.prefc_name,
com_dr_wrkplace.blng_sec_cd
FROM
src05.com_dr
LEFT JOIN src07.mst_jis_pref ON com_dr.prefc_cd = mst_jis_pref.jis_pref_cd and (select str_to_date(syor_date,'%Y%m%d') from src07.hdke_tbl) between STR_TO_DATE(CONCAT(eff_start_ym, '01'), '%Y%m%d') and LAST_DAY(STR_TO_DATE(CONCAT(eff_end_ym, '01'), '%Y%m%d'))
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

View File

@ -26,9 +26,9 @@ class UltmarcInstRepository(BaseRepository):
inst_phone_number,
inst_div_name,
hp_assrt_name,
jis_pref_nm_kj AS prefc_name
prefc_name
FROM src05.com_inst
LEFT JOIN src07.mst_jis_pref ON com_inst.prefc_cd = mst_jis_pref.jis_pref_cd and (select str_to_date(syor_date,'%Y%m%d') from src07.hdke_tbl) between STR_TO_DATE(CONCAT(eff_start_ym, '01'), '%Y%m%d') and LAST_DAY(STR_TO_DATE(CONCAT(eff_end_ym, '01'), '%Y%m%d'))
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}