Skip to content

Commit f01e1bc

Browse files
hyoseong-Choinano-mmparkjaehak
authored
CLAP-342 담당자별 처리량 완료인것만 가져오도록 쿼리수정
* CLAP-110 Feature : 담당자별 작업 처리량 조회 API 구현 <footer> - 관련: #73 * CLAP-111 Refactor : 통계 조회 API 리팩토링 및 기능 수정 <footer> - 관련: #74 * 내 작업한 내용에 대한 설명 * 담당자 조회 API 구현 * CLAP-111 Refactor : 통계 조회 API 주소 통합, 리팩토링, 예외처리 <footer> - 관련: #74 * Bug : 프로퍼티파일 수정 * CLAP-104 CI/CD : CI에서 s3.yml 파일 생성하도록 수정 * CLAP-146 Feature : 카테고리 목록 조회 API 구현 <footer> - 관련: #118 * CLAP-147 Feature : 카테고리 수정 API 구현 <footer> - 관련: #119 * CLAP-147 Feature : 카테고리 추가, 수정 API 리뷰반영 수정 <footer> - 관련: #119 * CLAP-148 Feature : 카테고리 삭제 API 구현 <footer> - 관련: #120 * CLAP-148 Feature : 카테고리 삭제 API 수정 <footer> - 관련: #120 * CLAP-148 Docs : 카테고리 API 스웨거 수정 <footer> - 관련: #120 * CLAP-107 Bug : CI test yml파일 key 중복 수정 <footer> - 관련: #60 * CLAP-148 Feature : 카테고리 CUD 리뷰 반영 수정, 조회 반환 양식 수정 <footer> - 관련: #120 * CLAP-214 Cleanup : 통계, 카테고리 미흡한부분 리팩토링 <footer> - 관련: #216 * CLAP-214 Fix : 통계조회 API 파라미터 바인딩 오류 수정 <footer> - 관련: #216 * CLAP-214 Fix : addConverter 수정 <footer> - 관련: #216 * CLAP-214 Hotfix : 추가한 파일들 제거 <footer> - 관련: #216 * CLAP-214 Hotfix : FindStatisticsController 스위치문 수정 <footer> - 관련: #216 * CLAP-214 Hotfix : AddCategoryService 지연로딩 오류 수정 <footer> - 관련: #216 * CLAP-214 Hotfix : DeleteCategoryService 카테고리 삭제 로직 수정 <footer> - 관련: #216 * CLAP-249 Refactor : 통계 조회 서비스 리팩토링 <footer> - 관련: #265 * CLAP-250 Test : 통계 조회 테스트코드 작성 <footer> - 관련: #266 * CLAP-214 Hotifx : 카테고리 수정 로직 수정 <footer> - 관련: #216 * CLAP-214 Hotifx : 카테고리 수정 로직 수정 <footer> - 관련: #216 * CLAP-256 fix: 스웨거 명세 추가 * CLAP-214 Hotifx : 카테고리 저장 트랜잭션 추가 <footer> - 관련: #216 * CLAP-214 Hotifx : 카테고리 저장 시간 수정 <footer> - 관련: #216 * CLAP-285 Hotifx : 모든 카테고리 조회 <footer> - 관련: #331 * CLAP-214 Hotifx : 카테고리 조회 Secured 설정 <footer> - 관련: #216 * CLAP-256 fix: convert 동작 mapper 추가 * CLAP-256 fix: 충돌해결 * CLAP-256 fix: 불필요한 테스트 파일 제거 * CLAP-256 fix: mapper statuslabel 수정 * CLAP-256 Fix : 팀 작업 현황 필터링 조회 수정 <footer> - 관련: #281 * CLAP-299 Feature : 사용자 작업 취소 <footer> - 관련: #352 * CLAP-299 Fix: 사용자 작업 취소 api 주소 수정 <footer> - 관련: #352 * CLAP-256 전체 작업수 계산 로직 개선 * fix: env 파일 제거 * fix: 어노테이션 수정 * fix: @RestController 제거 * fix: @ApplicationService로 수정 * CLAP-256 Fix : TeamStatusService 누락된 import 수정 <footer> - 관련: #281 * CLAP-256 Fix : TeamStatusService Secured 추가 <footer> - 관련: #281 * fix: 팀 작업 현황 필터링 조회 수정 및 정렬 기능 개선 * Delete src/main/resources/env.properties * Delete src/test/resources/application.yml * 충돌 해결: develop 브랜치와 병합 * Update application.yml * Revert application.yml files to match develop branch * CLAP-256 fix: Update application.yml * CLAP-256 fix: Update application.yml * CLAP-256 Fix : 팀 현황 필터조회 기여도순 정렬 수정 <footer> - 관련: #281 * CLAP-309 Fix : 엘라스틱서치에 저장할 작업 정보 수정 <footer> - 관련: #378 * CLAP-309 Fix : 엘라스틱서치에 저장 누락되는것 수정 <footer> - 관련: #378 * CLAP-test * CLAP-318 Fix : 2차카테고리 입력 양식(설명 예시) 추가 <footer> - 관련: #392 * CLAP-318 Test : 2차카테고리 입력 양식(설명 예시) 추가한 테스트코드 수정 <footer> - 관련: #392 * CLAP-318 Feature : 2차카테고리 단일조회 API <footer> - 관련: #392 * CLAP-318 Feature : 2차카테고리 경로 수정 원복 <footer> - 관련: #392 * CLAP-327 Fix: 팀 현황 필터링 조회 정렬 위치 수정 <footer> - 관련: #409 * CLAP-328 Fix : 통계 엘라스틱서치에 저장, 시간대 설정 오류, 응답 양식 수정 <footer> - 관련: #411 * CLAP-328 Fix : 통계 기간별 요청, 처리량 응답 양식 수정 <footer> - 관련: #411 * CLAP-324 Fix : 통계 서비스 매퍼 수정으로 인한 버그 수정 <footer> - 관련: #405 * CLAP-342 Fix : 담당자별 처리량 완료인것만 가져오도록 쿼리수정 <footer> - 관련: #441 --------- Co-authored-by: nano-mm <nano123@gachon.ac.kr> Co-authored-by: parkjaehak <atom8426@gmail.com>
1 parent a8b47d1 commit f01e1bc

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/main/java/clap/server/adapter/outbound/infrastructure/elastic/TaskDocumentAdapter.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ private NativeQuery buildSubCategoryTaskRequestQuery(PeriodConfig config, String
149149
.withQuery(q -> q
150150
.term(v -> v
151151
.field("main_category")
152-
.value(mainCategory))).build();
152+
.value(mainCategory)))
153+
.build();
153154

154155
return NativeQuery.builder()
155156
.withQuery(q -> q
@@ -164,14 +165,27 @@ private NativeQuery buildSubCategoryTaskRequestQuery(PeriodConfig config, String
164165
}
165166

166167
private NativeQuery buildManagerTaskProcessQuery(PeriodConfig config) {
167-
return NativeQuery.builder()
168+
NativeQuery rangeQuery = NativeQuery.builder()
168169
.withQuery(q -> q
169170
.range(r -> r
170171
.date(d -> d
171172
.field("created_at")
172173
.timeZone(TIME_ZONE)
173174
.gte(String.valueOf(LocalDate.now().minusDays(config.getDaysToSubtract())))
174175
.lt(String.valueOf(LocalDate.now())))))
176+
.build();
177+
NativeQuery statusQuery = NativeQuery.builder()
178+
.withQuery(q -> q
179+
.term(v -> v
180+
.field("status")
181+
.value("completed")))
182+
.build();
183+
184+
return NativeQuery.builder()
185+
.withQuery(q -> q
186+
.bool(b -> b
187+
.must(rangeQuery.getQuery(), statusQuery.getQuery()))
188+
)
175189
.withAggregation("manager_task", AggregationBuilders.terms()
176190
.field("processor")
177191
.build()._toAggregation())

0 commit comments

Comments
 (0)