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 d8606bda..fe5329f2 100644 --- a/ecs/jskult-webapp/src/repositories/emp_chg_inst_repository.py +++ b/ecs/jskult-webapp/src/repositories/emp_chg_inst_repository.py @@ -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