feat: デットロジックの削除

This commit is contained in:
高木要 2023-06-15 15:55:16 +09:00
parent 0421aa8ccd
commit a808e03ea8

View File

@ -107,14 +107,8 @@ def _add_ult_ident_presc(db: Database, enabled_dst_inst_merge_records: list[dict
logger.info('納入先処方元マスタの重複予定データなし')
_insert_ult_ident_presc(db, set_start_date, enabled_merge_record['dup_opp_cd'], ult_ident_presc_row)
# 適用終了日 < 適用開始日の場合
if _str_to_date_time(ult_ident_presc_row['end_date']) < start_date:
# 対象レコードを物理削除する
_delete_ult_ident_presc(db, ult_ident_presc_row['start_date'], ult_ident_presc_row,
'開始月>適用開始日のため物理削除')
continue
# 重複予定データが存在しない、且つ、適用終了日 ≧ 適用開始日の場合
if not is_exists_duplicate_key:
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)