Skip to content

[ Refactor ] - 대시보드 근무시간/소득을 목표·확정·계획 기준으로 분리 - #190

Merged
hanjyoon01 merged 1 commit into
developfrom
feature/#187
Aug 19, 2026
Merged

[ Refactor ] - 대시보드 근무시간/소득을 목표·확정·계획 기준으로 분리#190
hanjyoon01 merged 1 commit into
developfrom
feature/#187

Conversation

@hanjyoon01

Copy link
Copy Markdown
Contributor

관련 이슈

작업 사항

  • WorkLog.status("PLANNED"/"CONFIRMED") 문자열을 WorkLogStatus 공유 상수로 추출
    (WorkLogService, WorkLogReminderService, CalendarService에서 참조)
  • CalendarMonthlyHours: plannedHours/actualHoursgoalHours(추천 근무시간)/
    confirmedHours/scheduledHours(WorkLog.status 기준)로 분리
  • CalendarMonthlyHours: WORK_LOG_PLATFORM_INCOME 기준 expectedSettlementIncome
    (예상 정산 소득 - PLANNED 전체 + CONFIRMED인데 아직 COMPLETED 안 된 플랫폼 몫) 추가.
    플랫폼별 income 행 단위로 계산해서 PARTIAL(일부 플랫폼만 정산완료) 근무도 정확히 반영됨
  • DashboardHoursResponse: {confirmedHours, scheduledHours, goalHours} 3필드로 변경
  • DashboardIncomeResponse: {actualIncome, expectedSettlementIncome, goalIncome} 3필드로 변경
    • actualIncomeIncomeAnalysisQueryClient(SETTLEMENT 테이블, 실제 입금액) 기준
    • expectedSettlementIncomeCalendarQueryClient(WORK_LOG 기준 예상치) 기준 — 데이터 소스가
      달라 한 DTO에 섞지 않음
  • 미사용 DashboardSettlementResponse 삭제, DashboardResponse.settlement 필드 제거
  • CalendarServiceTest에 근무시간/소득 분리 집계 검증 테스트 추가 (PARTIAL 케이스 포함)

참고 사항

  • DashboardHoursResponse/DashboardIncomeResponse/DashboardResponse의 필드 구성이
    바뀌었어서 프론트(Vue) 쪽 대시보드 화면 연동 확인이 필요합니다 — settlement 필드가
    없어졌고, goalHours/goalIncome 하위 필드명도 달라졌습니다.
  • WorkLog.status를 아직 공유 상수(문자열)로만 통일했고, IncomeAnalysisService에는
    같은 값을 가리키는 별도 private 상수가 남아있습니다. enum 전환 여부와 함께 통일은
    별도 이슈로 분리했습니다.

- WorkLog.status 문자열을 WorkLogStatus 공유 상수로 추출 (WorkLogService, WorkLogReminderService, CalendarService)
- CalendarMonthlyHours: plannedHours/actualHours → goalHours/confirmedHours/scheduledHours로 분리
- CalendarMonthlyHours: WORK_LOG_PLATFORM_INCOME 기준 expectedSettlementIncome(예상 정산 소득) 추가
- DashboardHoursResponse: confirmedHours/scheduledHours/goalHours 3필드로 변경
- DashboardIncomeResponse: actualIncome(SETTLEMENT 기반 실입금액)/expectedSettlementIncome/goalIncome 3필드로 변경
- 미사용 DashboardSettlementResponse 삭제, DashboardResponse.settlement 필드 제거
- DashboardController: getDashboard()에서 실입금액은 IncomeAnalysisQueryClient로 별도 조회
@hanjyoon01 hanjyoon01 self-assigned this Aug 19, 2026
@hanjyoon01 hanjyoon01 added the 🔨 Refactor 코드 리팩토링 label Aug 19, 2026
@hanjyoon01
hanjyoon01 merged commit 5c55730 into develop Aug 19, 2026
2 checks passed
@hanjyoon01
hanjyoon01 deleted the feature/#187 branch August 20, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ Refactor ] - 대시보드 goalHours 응답에서 근무시간을 계획/확정으로 분리

3 participants