diff --git a/ecs/jskult-webapp/src/model/internal/master_mainte_csv.py b/ecs/jskult-webapp/src/model/internal/master_mainte_csv.py index e288ce3a..619e736e 100644 --- a/ecs/jskult-webapp/src/model/internal/master_mainte_csv.py +++ b/ecs/jskult-webapp/src/model/internal/master_mainte_csv.py @@ -57,6 +57,8 @@ class MasterMainteCSVItem(metaclass=ABCMeta): error_list.extend(self.check_require()) # 施設コード存在チェック error_list.extend(self.check_inst_cd_exists()) + # 担当者種別コード存在チェック + error_list.extend(self.check_emp_chg_type_cd_exists()) # MUID存在チェック error_list.extend(self.check_emp_cd_exists()) # BuCd存在チェック @@ -160,6 +162,12 @@ class MasterMainteCSVItem(metaclass=ABCMeta): pass ... + @abstractmethod + def check_emp_chg_type_cd_exists(self) -> list[str]: + """担当者種別コード存在チェック""" + pass + ... + @abstractmethod def check_emp_cd_exists(self) -> list[str]: """MUID存在チェック""" @@ -219,6 +227,7 @@ class MasterMainteNewInstEmpCSVItem(MasterMainteCSVItem): self.inst_cd = super().get_csv_value(constants.CSV_NEW_INST_CD_COL_NO) self.inst_name = super().get_csv_value(constants.CSV_NEW_INST_NAME_COL_NO) self.ta_cd = super().get_csv_value(constants.CSV_NEW_TA_CD_COL_NO) + self.emp_chg_type_cd = super().get_csv_value(constants.CSV_NEW_EMP_CHG_TYPE_CD_COL_NO) self.emp_cd = super().get_csv_value(constants.CSV_NEW_EMP_CD_COL_NO) self.emp_name_family = super().get_csv_value(constants.CSV_NEW_EMP_NAME_FAMILY_COL_NO) self.emp_name_first = super().get_csv_value(constants.CSV_NEW_EMP_NAME_FIRST_COL_NO) @@ -240,6 +249,9 @@ class MasterMainteNewInstEmpCSVItem(MasterMainteCSVItem): if len(self.emp_cd) == 0: error_list.append(self.make_require_error_message( self.line_num, constants.NEW_INST_EMP_CSV_LOGICAL_NAMES[constants.CSV_NEW_EMP_CD_COL_NO])) + if len(self.emp_chg_type_cd) == 0: + error_list.append(self.make_require_error_message( + self.line_num, constants.NEW_INST_EMP_CSV_LOGICAL_NAMES[constants.CSV_NEW_EMP_CHG_TYPE_CD_COL_NO])) if len(self.bu_cd) == 0: error_list.append(self.make_require_error_message( self.line_num, constants.NEW_INST_EMP_CSV_LOGICAL_NAMES[constants.CSV_NEW_BU_CD_COL_NO])) diff --git a/ecs/jskult-webapp/src/repositories/emp_chg_inst_repository.py b/ecs/jskult-webapp/src/repositories/emp_chg_inst_repository.py index d91be694..07dcf34c 100644 --- a/ecs/jskult-webapp/src/repositories/emp_chg_inst_repository.py +++ b/ecs/jskult-webapp/src/repositories/emp_chg_inst_repository.py @@ -28,6 +28,7 @@ class EmpChgInstRepository(BaseRepository): ( inst_cd, ta_cd, + emp_chg_type_cd, emp_cd, bu_cd, start_date, @@ -42,6 +43,7 @@ class EmpChgInstRepository(BaseRepository): VALUES ( :inst_cd, :ta_cd, + :emp_chg_type_cd, :emp_cd, :bu_cd, :start_date, diff --git a/ecs/jskult-webapp/src/system_var/constants.py b/ecs/jskult-webapp/src/system_var/constants.py index 3756facb..f592f370 100644 --- a/ecs/jskult-webapp/src/system_var/constants.py +++ b/ecs/jskult-webapp/src/system_var/constants.py @@ -80,6 +80,7 @@ NEW_INST_EMP_CSV_LOGICAL_NAMES = [ '施設コード', '施設名', '領域コード', + '担当者種別コード', 'MUID', '担当者名(姓)', '担当者名(名)', @@ -93,18 +94,20 @@ CSV_NEW_INST_CD_COL_NO = 0 CSV_NEW_INST_NAME_COL_NO = 1 # 領域コードの列No CSV_NEW_TA_CD_COL_NO = 2 +# 担当者種別コードの列No +CSV_NEW_EMP_CHG_TYPE_CD_COL_NO = 3 # MUIDの列No -CSV_NEW_EMP_CD_COL_NO = 3 +CSV_NEW_EMP_CD_COL_NO = 4 # 担当者名(姓)の列No -CSV_NEW_EMP_NAME_FAMILY_COL_NO = 4 +CSV_NEW_EMP_NAME_FAMILY_COL_NO = 5 # 担当者名(名)の列No -CSV_NEW_EMP_NAME_FIRST_COL_NO = 5 +CSV_NEW_EMP_NAME_FIRST_COL_NO = 6 # ビジネスユニットコードの列No -CSV_NEW_BU_CD_COL_NO = 6 +CSV_NEW_BU_CD_COL_NO = 7 # 適用開始日の列No -CSV_NEW_START_DATE = 7 +CSV_NEW_START_DATE = 8 # 適用終了日の列No -CSV_NEW_END_DATE = 8 +CSV_NEW_END_DATE = 9 # 施設担当者変更登録CSV(マスターメンテ) CHANGE_INST_CSV_LOGICAL_NAMES = [