fix: 結合テストM-1-2ケース不具合。終了・担当者変更のSQLの条件指定漏れ

This commit is contained in:
shimoda.m@nds-tyo.co.jp 2024-04-25 16:40:23 +09:00
parent fa23ae3964
commit 93c4613456

View File

@ -85,8 +85,9 @@ class EmpChgInstRepository(BaseRepository):
update_date = NOW()
WHERE
inst_cd = :inst_cd
and ta_cd = :ta_cd
and start_date = :start_date
AND ta_cd = :ta_cd
AND emp_chg_type_cd = :emp_chg_type_cd
AND start_date = :start_date
"""
def end_emp_chg_inst(self, inst_cd, ta_cd, emp_chg_type_cd, start_date,
@ -114,8 +115,9 @@ class EmpChgInstRepository(BaseRepository):
update_date = NOW()
where
inst_cd = :inst_cd
and ta_cd = :ta_cd
and start_date = :start_date
AND ta_cd = :ta_cd
AND emp_chg_type_cd = :emp_chg_type_cd
AND start_date = :start_date
"""
def modify_emp_chg_inst(self, inst_cd, ta_cd, start_date, emp_chg_type_cd, emp_cd, update_user_name, table_name):
@ -149,7 +151,7 @@ class EmpChgInstRepository(BaseRepository):
try:
query = self.FETCH_COUNT_SQL.format(table_name=table_name)
result = self._database.execute_select(query, {'inst_cd': inst_cd, 'ta_cd': ta_cd,
'emp_chg_type_cd': emp_chg_type_cd,'start_date': start_date})
'emp_chg_type_cd': emp_chg_type_cd, 'start_date': start_date})
models = [MasterMenteCountModel(**r) for r in result]
if len(models) == 0:
return 0