feat: 従業員担当施設マスタ処理を現行MINEの処理にロールバック

This commit is contained in:
高木要 2023-06-06 17:55:47 +09:00
parent b9e4a73b94
commit 607784bc50

View File

@ -115,15 +115,14 @@ def _add_emp_chg_inst(db: Database, enabled_dst_inst_merge_records: list[dict]):
_insert_emp_chg_inst(db, enabled_merge_record['dup_opp_cd'], _date_time_to_str(set_start_date),
emp_chg_inst_row)
# 適用終了日 ≧ 適用開始日の場合
if _str_to_date_time(emp_chg_inst_row['end_date']) >= start_date:
# 適用開始日 < 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)
if last_end_date >= start_date:
continue
# DCF施設統合マスタの適用月度の前月末日 < 適用開始日、または適用終了日 < 適用開始日の場合、N(論理削除レコード)に設定する
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'])