中途プッシュ

This commit is contained in:
nik.n 2024-04-15 08:56:26 +09:00
parent 80ddf8302b
commit a7bc502f36
3 changed files with 23 additions and 6 deletions

View File

@ -57,6 +57,8 @@ class MasterMainteCSVItem(metaclass=ABCMeta):
error_list.extend(self.check_require()) error_list.extend(self.check_require())
# 施設コード存在チェック # 施設コード存在チェック
error_list.extend(self.check_inst_cd_exists()) error_list.extend(self.check_inst_cd_exists())
# 担当者種別コード存在チェック
error_list.extend(self.check_emp_chg_type_cd_exists())
# MUID存在チェック # MUID存在チェック
error_list.extend(self.check_emp_cd_exists()) error_list.extend(self.check_emp_cd_exists())
# BuCd存在チェック # BuCd存在チェック
@ -160,6 +162,12 @@ class MasterMainteCSVItem(metaclass=ABCMeta):
pass pass
... ...
@abstractmethod
def check_emp_chg_type_cd_exists(self) -> list[str]:
"""担当者種別コード存在チェック"""
pass
...
@abstractmethod @abstractmethod
def check_emp_cd_exists(self) -> list[str]: def check_emp_cd_exists(self) -> list[str]:
"""MUID存在チェック""" """MUID存在チェック"""
@ -219,6 +227,7 @@ class MasterMainteNewInstEmpCSVItem(MasterMainteCSVItem):
self.inst_cd = super().get_csv_value(constants.CSV_NEW_INST_CD_COL_NO) 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.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.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_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_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) 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: if len(self.emp_cd) == 0:
error_list.append(self.make_require_error_message( 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])) 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: if len(self.bu_cd) == 0:
error_list.append(self.make_require_error_message( 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])) self.line_num, constants.NEW_INST_EMP_CSV_LOGICAL_NAMES[constants.CSV_NEW_BU_CD_COL_NO]))

View File

@ -28,6 +28,7 @@ class EmpChgInstRepository(BaseRepository):
( (
inst_cd, inst_cd,
ta_cd, ta_cd,
emp_chg_type_cd,
emp_cd, emp_cd,
bu_cd, bu_cd,
start_date, start_date,
@ -42,6 +43,7 @@ class EmpChgInstRepository(BaseRepository):
VALUES ( VALUES (
:inst_cd, :inst_cd,
:ta_cd, :ta_cd,
:emp_chg_type_cd,
:emp_cd, :emp_cd,
:bu_cd, :bu_cd,
:start_date, :start_date,

View File

@ -80,6 +80,7 @@ NEW_INST_EMP_CSV_LOGICAL_NAMES = [
'施設コード', '施設コード',
'施設名', '施設名',
'領域コード', '領域コード',
'担当者種別コード',
'MUID', 'MUID',
'担当者名(姓)', '担当者名(姓)',
'担当者名(名)', '担当者名(名)',
@ -93,18 +94,20 @@ CSV_NEW_INST_CD_COL_NO = 0
CSV_NEW_INST_NAME_COL_NO = 1 CSV_NEW_INST_NAME_COL_NO = 1
# 領域コードの列No # 領域コードの列No
CSV_NEW_TA_CD_COL_NO = 2 CSV_NEW_TA_CD_COL_NO = 2
# 担当者種別コードの列No
CSV_NEW_EMP_CHG_TYPE_CD_COL_NO = 3
# MUIDの列No # MUIDの列No
CSV_NEW_EMP_CD_COL_NO = 3 CSV_NEW_EMP_CD_COL_NO = 4
# 担当者名の列No # 担当者名の列No
CSV_NEW_EMP_NAME_FAMILY_COL_NO = 4 CSV_NEW_EMP_NAME_FAMILY_COL_NO = 5
# 担当者名の列No # 担当者名の列No
CSV_NEW_EMP_NAME_FIRST_COL_NO = 5 CSV_NEW_EMP_NAME_FIRST_COL_NO = 6
# ビジネスユニットコードの列No # ビジネスユニットコードの列No
CSV_NEW_BU_CD_COL_NO = 6 CSV_NEW_BU_CD_COL_NO = 7
# 適用開始日の列No # 適用開始日の列No
CSV_NEW_START_DATE = 7 CSV_NEW_START_DATE = 8
# 適用終了日の列No # 適用終了日の列No
CSV_NEW_END_DATE = 8 CSV_NEW_END_DATE = 9
# 施設担当者変更登録CSV(マスターメンテ) # 施設担当者変更登録CSV(マスターメンテ)
CHANGE_INST_CSV_LOGICAL_NAMES = [ CHANGE_INST_CSV_LOGICAL_NAMES = [