[ Feature ] - 건당정산(PER_TASK) 잡 방어모드 예상 손실소득 계산 - #181
Merged
Conversation
added 2 commits
August 19, 2026 14:00
- SettlementMapper에 잡별 벌크 조회(findByJobIdInAndDepositDateRangeAndStatus) 추가 - LocalExpectedIncomeLossQueryClient: PER_TASK 잡은 조회 시점 기준 최근 3개월 (이번 달 제외) MATCHED 정산 평균으로 방어모드 예상 손실소득 계산 - 데이터 있는 달만으로 평균, 3개월 이력이 전혀 없으면 기존과 동일하게 null - JOB.monthly_expected_income 컬럼 자체는 변경 없음 (조회 시점 동적 계산)
- LocalExpectedIncomeLossQueryClient: monthly_expected_income이 없는 잡
(PER_TASK, 비정기 HOURLY 등)은 조회 시점 기준 최근 3개월(이번 달 제외)
MATCHED 정산 평균으로 방어모드 예상 손실소득 계산
- 분기 조건을 SettlementType이 아니라 job.getMonthlyExpectedIncome() == null로
일반화 (등록 시점에 계산 근거가 있는지가 진짜 기준)
- 데이터 있는 달만으로 평균, 3개월 이력이 전혀 없으면 기존과 동일하게 null
- JOB.monthly_expected_income 컬럼 자체는 변경 없음 (조회 시점 동적 계산)
hanjyoon01
requested review from
KSBoscoKim,
Kimd0ng,
SOOsuhyuncho,
bigwaveBigwave and
shinh09
August 19, 2026 05:17
KSBoscoKim
approved these changes
Aug 19, 2026
shinh09
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 이슈
작업 사항
SettlementMapper: 잡별 벌크 조회(findByJobIdInAndDepositDateRangeAndStatus) 추가LocalExpectedIncomeLossQueryClient:monthly_expected_income이 없는 잡(PER_TASK,비정기 HOURLY 등)은 조회 시점 기준 최근 3개월(이번 달 제외, 완료된 달만) MATCHED
정산 평균으로 방어모드 예상 손실소득을 계산하도록 변경
SettlementType이 아니라job.getMonthlyExpectedIncome() == null로일반화함 — "등록 시점에 계산 근거가 있는가"가 실제 기준이라 PER_TASK뿐 아니라
비정기 HOURLY 잡도 함께 커버됨
JOB.monthly_expected_income컬럼 자체는 변경 없음 — 등록/수정 로직 그대로,조회 시점에만 동적으로 계산 (PER_TASK 실적은 매달 바뀌는데 등록 시점 스냅샷으로
저장하면 잡을 안 건드리는 한 값이 stale해지기 때문)
LocalExpectedIncomeLossQueryClientTest: PER_TASK / 비정기 HOURLY / 혼합 정산방식 /스냅샷 우선순위 케이스 테스트 추가
참고 사항