fix: 新規施設登録の重複エラー発生時に表示されるメッセージに担当者種別コードが含まれていない不具合を修正

This commit is contained in:
shimoda.m@nds-tyo.co.jp 2024-04-23 17:17:47 +09:00
parent 5b47804c3f
commit f830c55160

View File

@ -98,7 +98,7 @@ class MasterMainteCSVItem(metaclass=ABCMeta):
def is_exist_inst_cd(self) -> bool:
return True if self.mst_inst_repository.fetch_count(self.inst_cd) > 0 else False
def is_exist_emp_chg_type_cd(self, start_date: str) -> bool:
if start_date is None or len(start_date) == 0:
return False
@ -325,7 +325,7 @@ class MasterMainteNewInstEmpCSVItem(MasterMainteCSVItem):
error_list = []
if not self.start_date or not self.ta_cd:
return error_list
if is_not_empty(self.ta_cd) and super().is_exist_ta_cd(self.start_date) is False:
error_list.append(f'{self.line_num}行目の{constants.NEW_INST_EMP_CSV_LOGICAL_NAMES[constants.CSV_NEW_TA_CD_COL_NO]}\
は汎用区分マスタに存在しない もしくは 適用期間外のコードです')
@ -363,7 +363,7 @@ class MasterMainteNewInstEmpCSVItem(MasterMainteCSVItem):
def check_data_exists(self) -> list[str]:
error_list = []
if super().emp_chg_inst_count(self.start_date) > 0:
error_list.append(f'{self.line_num}行目の施設コード、領域コード、適用開始日がすべて同一のデータが既に登録されています。')
error_list.append(f'{self.line_num}行目の施設コード、領域コード、担当者種別コード、適用開始日がすべて同一のデータが既に登録されています。')
return error_list
@ -507,7 +507,7 @@ class MasterMainteChangeInstEmpCSVItem(MasterMainteCSVItem):
error_list.append(f'{self.line_num}行目の{constants.CHANGE_INST_CSV_LOGICAL_NAMES[constants.CSV_CHANGE_EMP_CD_COL_NO]}\
は従業員マスタに存在しない もしくは 適用期間外のIDです')
return error_list
def check_emp_chg_type_cd_exists(self) -> list[str]:
error_list = []
@ -518,7 +518,7 @@ class MasterMainteChangeInstEmpCSVItem(MasterMainteCSVItem):
error_list.append(f'{self.line_num}行目の{constants.CHANGE_INST_CSV_LOGICAL_NAMES[constants.CSV_CHANGE_EMP_CHG_TYPE_CD_COL_NO]}\
は汎用区分マスタに存在しない もしくは 適用期間外のコードです')
return error_list
def check_ta_cd_exists(self) -> list[str]:
error_list = []