Repository navigation
feat: 자격 판별에 지역(시·도/시군구) 조건 추가 - #126
Merged
Merged
Conversation
특정 시·도 대상 제도(welfare_program.region_code != null)는 거주 시·도가 같아야 적격이고, 같으면 matchedCriteria에 region을 남긴다. 전국·중앙부처 제도(region_code == null)는 지역을 보지 않는다. 유저 region_code는 환경마다 형식이 달라(시드=법정동 코드, 온보딩="시도-시군구" 문자열) 신뢰할 수 없어, region_name을 RegionCodeResolver로 시도 2자리로 다시 풀어 비교한다. 거주지 미등록이면 지역 한정 제도는 부적격. 프론트 CRITERIA_LABEL에 이미 region 라벨이 있어 별도 변경 없음. Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
RegionCodeResolver에 SIGUNGU 표를 추가해 서울 용산구·서대문구는 법정동 10자리로 푼다 (프론트 stores/onboarding.ts HARDCODED_REGION_CODES와 동일). 나머지는 기존대로 시도 2자리. QualityReportTasklet이 매 수집마다 refreshRegionCode를 전 행에 호출하므로 이미 저장된 sgg_nm=용산구/서대문구 행도 다음 수집에 10자리로 바뀐다. EligibilityEvaluator는 유저 region_code(형식이 들쭉날쭉)를 안 쓰고 region_name+district_name을 RegionCodeResolver로 다시 푼 뒤, 제도 코드가 유저 코드의 접두인지로 포함 여부를 판정한다: 제도 "11"(서울) ⊃ 유저 "1117000000"(용산) → 매칭 제도 "1141000000"(서대문) vs 유저 "1117000000" → 불일치 시도만 아는 거주자는 시군구 한정 제도를 확정할 수 없어 부적격. Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
관련 이슈
작업 내용
현재
EligibilityEvaluator는protectionPhase+ 보호종료일만 보고, 지역은 전혀 안 봄 (user.region_code도welfare_program.region_code도 조회 안 함). 프론트CRITERIA_LABEL의region라벨은 죽은 코드.이 PR은 지역을 판별 조건에 넣는다.
RegionCodeResolver— 시군구 표SIGUNGU맵 추가:서울특별시|용산구 → 1117000000,서울특별시|서대문구 → 1141000000(프론트stores/onboarding.ts의HARDCODED_REGION_CODES와 동일)QualityReportTasklet이 매 수집마다refreshRegionCode()를 전 행에 호출하므로, 이미 저장된sgg_nm=용산구/서대문구행도 다음 수집에 10자리로 바뀜EligibilityEvaluator— 접두 비교user.region_code(형식 들쭉날쭉: 시드=코드, 온보딩=이름 문자열)를 안 쓰고,region_name+district_name을RegionCodeResolver로 다시 푼다region_code != null)는 유저 코드가 제도 코드로 시작해야 적격:11(서울) ⊃ 유저1117000000(용산) → 매칭 +region근거1141000000(서대문) vs 유저1117000000(용산) → 불일치region_code == null)는 지역 안 봄evaluateIfStale가 재판별)프론트 변경 없음 —
CRITERIA_LABEL.region이 이미 있어 이제 실제로 표시됨.확인한 것
./gradlew build통과EligibilityEvaluatorTest/RegionCodeResolverTest에 케이스 추가 (시도 일치·불일치·미등록, 시군구 한정 제도, 시도 제도 ⊃ 시군구 거주자)리뷰어에게
DEMO-0005(서울시 자립준비청년 주거지원,region_code='11')만 이 게이트를 탐. user1(서울)은 계속 적격 +region근거 추가.POST /internal/welfare/collect재실행 (또는welfare_program행region_code수동 UPDATE) 필요 — 기존 수집 행이 아직11이라.🤖 Generated with Claude Code