Skip to content

[ATT] #194 #195 #196 - 반복 근무 일정 특정 날짜 휴무 처리 - #197

Merged
jyt6640 merged 7 commits into
devfrom
feat/attendance
May 12, 2026
Merged

[ATT] #194 #195 #196 - 반복 근무 일정 특정 날짜 휴무 처리#197
jyt6640 merged 7 commits into
devfrom
feat/attendance

Conversation

@jyt6640

@jyt6640 jyt6640 commented May 12, 2026

Copy link
Copy Markdown
Member

관련 이슈

closes #194
closes #196
closes #195

작업 내용

  • WorkScheduleEvent를 날짜별 근무 override로 확장
    • WorkScheduleEventType.WORKING / DAY_OFF 추가
    • 기존 날짜별 근무 일정은 WORKING으로 하위 호환 유지
    • DAY_OFF는 시작/종료 시간 없이 생성 가능
  • Flyway V23__add_work_schedule_event_type.sql 추가
    • event_type 컬럼 추가 (DEFAULT WORKING)
    • start_time, end_time nullable 변경
    • reason 컬럼 추가
  • WorkScheduleEventRequest / WorkScheduleEventResponseeventType 반영
  • AttendanceExceptionService에서 DAY_OFF를 반복 일정보다 우선하는 명시적 휴무로 처리
    • DAY_OFF + 미출근: MISSED_CHECK_IN 미생성
    • DAY_OFF + 출근 기록: NO_SCHEDULE 생성
    • DAY_OFF 삭제 후 반복 일정 복구
  • AttendanceSettlementService에서 DAY_OFF를 정산 대상에서 제외
    • 해당 날짜 item은 NO_SCHEDULE
    • scheduledDays / 지각비 집계에서 제외
  • 트러블슈팅 문서 기록 추가

정책 결정

  • 명시적 휴무일에 실제 출근 기록이 있으면 옵션 A로 처리: NO_SCHEDULE 예외 생성
  • DAY_OFF 이벤트 삭제 시 별도 복구 로직 없이 기존 반복 일정이 다시 조회되도록 유지
  • 기존 API 호환을 위해 eventType 미지정 요청은 WORKING으로 처리

체크리스트

  • 테스트 작성 (Red)
  • 기능 구현 (Green)
  • DB 마이그레이션 추가
  • 트러블슈팅 문서 기록
  • 대상 테스트 통과
  • 전체 테스트 통과 — AttendanceApplicationTests.contextLoads()에서 Testcontainers/Docker 클라이언트 초기화 실패로 1건 실패

검증

  • ./gradlew test --tests "com.yanus.attendance.attendance.application.WorkScheduleEventServiceTest"
  • ./gradlew test --tests "com.yanus.attendance.attendance.application.AttendanceExceptionServiceTest"
  • ./gradlew test --tests "com.yanus.attendance.attendance.application.AttendanceSettlementServiceTest"
  • ./gradlew test --tests "com.yanus.attendance.attendance.application.WorkScheduleEventServiceTest" --tests "com.yanus.attendance.attendance.application.AttendanceExceptionServiceTest" --tests "com.yanus.attendance.attendance.application.AttendanceSettlementServiceTest"
  • ./gradlew test — 245 tests 중 244 passed, 1 failed (AttendanceApplicationTests.contextLoads, Docker/Testcontainers 환경 문제)

프론트 영향

  • 날짜별 근무 일정 생성/수정 요청에 eventType을 보낼 수 있음
    • 명시적 휴무: eventType: "DAY_OFF", startTime/endTime 생략 가능
    • 근무 override: eventType: "WORKING", startTime/endTime 필수
  • 응답에 eventType이 포함됨
  • eventType을 보내지 않는 기존 WORKING 요청은 계속 동작함

@jyt6640
jyt6640 marked this pull request as ready for review May 12, 2026 01:45
@jyt6640
jyt6640 merged commit 85267bc into dev May 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant