Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLAP-327 팀 현황 필터링 조회 정렬 위치 수정 #410

Closed
wants to merge 94 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
5155ff7
CLAP-110 Feature : 담당자별 작업 처리량 조회 API 구현
hyoseong-Choi Jan 23, 2025
b7f2c2a
CLAP-111 Refactor : 통계 조회 API 리팩토링 및 기능 수정
hyoseong-Choi Jan 23, 2025
87d0fdb
내 작업한 내용에 대한 설명
nano-mm Jan 23, 2025
534aa24
담당자 조회 API 구현
nano-mm Jan 24, 2025
2b7f448
CLAP-111 Refactor : 통계 조회 API 주소 통합, 리팩토링, 예외처리
hyoseong-Choi Jan 24, 2025
72a66e4
Bug : 프로퍼티파일 수정
hyoseong-Choi Jan 24, 2025
8458cbd
CLAP-104 CI/CD : CI에서 s3.yml 파일 생성하도록 수정
hyoseong-Choi Jan 26, 2025
eb34ee8
CLAP-146 Feature : 카테고리 목록 조회 API 구현
hyoseong-Choi Jan 26, 2025
8146776
CLAP-147 Feature : 카테고리 수정 API 구현
hyoseong-Choi Jan 26, 2025
d24fdf8
CLAP-147 Feature : 카테고리 추가, 수정 API 리뷰반영 수정
hyoseong-Choi Jan 28, 2025
a0ebd44
CLAP-148 Feature : 카테고리 삭제 API 구현
hyoseong-Choi Jan 28, 2025
5fcc496
Merge branch 'develop' into CLAP-148
hyoseong-Choi Jan 28, 2025
0ff4b3b
CLAP-148 Feature : 카테고리 삭제 API 수정
hyoseong-Choi Jan 28, 2025
eefe6ee
CLAP-148 Docs : 카테고리 API 스웨거 수정
hyoseong-Choi Jan 28, 2025
b30cdde
CLAP-107 Bug : CI test yml파일 key 중복 수정
hyoseong-Choi Jan 29, 2025
c3292fe
CLAP-148 Feature : 카테고리 CUD 리뷰 반영 수정, 조회 반환 양식 수정
hyoseong-Choi Jan 30, 2025
2d63e7e
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Jan 30, 2025
5085370
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 2, 2025
915e6f9
CLAP-214 Cleanup : 통계, 카테고리 미흡한부분 리팩토링
hyoseong-Choi Feb 2, 2025
27e09cc
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 2, 2025
68c9f08
CLAP-214 Fix : 통계조회 API 파라미터 바인딩 오류 수정
hyoseong-Choi Feb 2, 2025
4f338ad
CLAP-214 Fix : addConverter 수정
hyoseong-Choi Feb 2, 2025
51ab7a5
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 2, 2025
67fc667
CLAP-214 Hotfix : 추가한 파일들 제거
hyoseong-Choi Feb 2, 2025
e4dc477
CLAP-214 Hotfix : FindStatisticsController 스위치문 수정
hyoseong-Choi Feb 2, 2025
4875e32
CLAP-214 Hotfix : AddCategoryService 지연로딩 오류 수정
hyoseong-Choi Feb 2, 2025
ebd4bcd
CLAP-214 Hotfix : DeleteCategoryService 카테고리 삭제 로직 수정
hyoseong-Choi Feb 3, 2025
3e2f5ed
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 3, 2025
4a5e4f0
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 3, 2025
a2292c8
CLAP-249 Refactor : 통계 조회 서비스 리팩토링
hyoseong-Choi Feb 3, 2025
520f47f
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 3, 2025
93531b5
CLAP-250 Test : 통계 조회 테스트코드 작성
hyoseong-Choi Feb 3, 2025
280d930
CLAP-214 Hotifx : 카테고리 수정 로직 수정
hyoseong-Choi Feb 4, 2025
7be324a
CLAP-214 Hotifx : 카테고리 수정 로직 수정
hyoseong-Choi Feb 4, 2025
2381888
CLAP-256 fix: 스웨거 명세 추가
nano-mm Feb 4, 2025
e291921
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 5, 2025
efaaee3
CLAP-214 Hotifx : 카테고리 저장 트랜잭션 추가
hyoseong-Choi Feb 5, 2025
0e10e86
CLAP-214 Hotifx : 카테고리 저장 시간 수정
hyoseong-Choi Feb 5, 2025
40bc614
CLAP-285 Hotifx : 모든 카테고리 조회
hyoseong-Choi Feb 5, 2025
876c3ef
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 5, 2025
6ec2bd9
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 5, 2025
14db203
CLAP-214 Hotifx : 카테고리 조회 Secured 설정
hyoseong-Choi Feb 5, 2025
d87498c
CLAP-256 fix: convert 동작 mapper 추가
nano-mm Feb 5, 2025
bad0cef
CLAP-256 fix: conflict 해결
nano-mm Feb 5, 2025
844b838
CLAP-256 fix: 충돌해결
nano-mm Feb 6, 2025
893715e
CLAP-256 fix: 불필요한 테스트 파일 제거
nano-mm Feb 6, 2025
5b0b58e
CLAP-256 fix: 충돌 재해결
nano-mm Feb 6, 2025
0e4b6d7
CLAP-256 fix: mapper statuslabel 수정
nano-mm Feb 6, 2025
06b3279
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 6, 2025
d5c2a68
Merge branch 'CLAP-256-팀-작업-현황-에러-재수정' of https://github.com/TaskFlow…
hyoseong-Choi Feb 6, 2025
edca909
CLAP-256 Fix : 팀 작업 현황 필터링 조회 수정
hyoseong-Choi Feb 6, 2025
5626fd3
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 6, 2025
b6929d6
CLAP-299 Feature : 사용자 작업 취소
hyoseong-Choi Feb 6, 2025
95b1c26
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 6, 2025
3beb7c6
CLAP-299 Fix: 사용자 작업 취소 api 주소 수정
hyoseong-Choi Feb 6, 2025
06e152f
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 6, 2025
2bcb8f0
CLAP-256 전체 작업수 계산 로직 개선
nano-mm Feb 6, 2025
016b7cb
fix: env 파일 제거
nano-mm Feb 6, 2025
e857375
Merge branch 'CLAP-256-팀-작업-현황-에러-재수정' of https://github.com/TaskFlow…
hyoseong-Choi Feb 6, 2025
0ddbf8e
fix: 어노테이션 수정
nano-mm Feb 6, 2025
0a35db0
fix: @RestController 제거
nano-mm Feb 6, 2025
9605488
fix: @ApplicationService로 수정
nano-mm Feb 6, 2025
fd10e3e
Merge branch 'CLAP-256-팀-작업-현황-에러-재수정' of https://github.com/TaskFlow…
nano-mm Feb 6, 2025
244f408
Merge branch 'develop' into CLAP-256-팀-작업-현황-에러-재수정
hyoseong-Choi Feb 6, 2025
8c780cb
Merge branch 'CLAP-256-팀-작업-현황-에러-재수정' of https://github.com/TaskFlow…
hyoseong-Choi Feb 6, 2025
9a88797
CLAP-256 Fix : TeamStatusService 누락된 import 수정
hyoseong-Choi Feb 6, 2025
0613040
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 6, 2025
8aa18d2
CLAP-256 Fix : TeamStatusService Secured 추가
hyoseong-Choi Feb 6, 2025
97ea235
fix: 팀 작업 현황 필터링 조회 수정 및 정렬 기능 개선
nano-mm Feb 6, 2025
62fde13
충돌 해결: develop 브랜치와 병합
nano-mm Feb 6, 2025
21635ed
Delete src/main/resources/env.properties
nano-mm Feb 6, 2025
a1e9beb
Delete src/test/resources/application.yml
nano-mm Feb 6, 2025
ee8ffd5
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 6, 2025
4ae0752
충돌 해결: develop 브랜치와 병합
nano-mm Feb 6, 2025
21a1a26
Update application.yml
nano-mm Feb 6, 2025
2be6e45
Revert application.yml files to match develop branch
nano-mm Feb 6, 2025
ceea328
Resolve merge conflicts
nano-mm Feb 6, 2025
e72b634
CLAP-256 fix: Update application.yml
nano-mm Feb 6, 2025
b8bd148
CLAP-256 fix: Update application.yml
nano-mm Feb 6, 2025
fbfb2a7
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 6, 2025
614c1f2
Merge branch 'CLAP-256-팀-작업-현황-에러-재수정' of https://github.com/TaskFlow…
hyoseong-Choi Feb 6, 2025
473387a
CLAP-256 Fix : 팀 현황 필터조회 기여도순 정렬 수정
hyoseong-Choi Feb 6, 2025
7f4649b
CLAP-309 Fix : 엘라스틱서치에 저장할 작업 정보 수정
hyoseong-Choi Feb 6, 2025
5aa1bec
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 6, 2025
173aa9b
CLAP-309 Fix : 엘라스틱서치에 저장 누락되는것 수정
hyoseong-Choi Feb 6, 2025
d009316
CLAP-test
parkjaehak Feb 7, 2025
e6158cc
Merge branch 'test' of https://github.com/TaskFlow-CLAP/TaskFlow-Serv…
hyoseong-Choi Feb 7, 2025
1ea4568
CLAP-318 Fix : 2차카테고리 입력 양식(설명 예시) 추가
hyoseong-Choi Feb 7, 2025
ca85227
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 7, 2025
cdbdb49
CLAP-318 Test : 2차카테고리 입력 양식(설명 예시) 추가한 테스트코드 수정
hyoseong-Choi Feb 7, 2025
af05e86
CLAP-318 Feature : 2차카테고리 단일조회 API
hyoseong-Choi Feb 7, 2025
c10e314
CLAP-318 Feature : 2차카테고리 경로 수정 원복
hyoseong-Choi Feb 7, 2025
2858533
Merge branch 'develop' of https://github.com/TaskFlow-CLAP/TaskFlow-S…
hyoseong-Choi Feb 7, 2025
921bfa3
CLAP-327 Fix: 팀 현황 필터링 조회 정렬 위치 수정
hyoseong-Choi Feb 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import clap.server.adapter.outbound.persistense.entity.task.constant.TaskStatus;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.OrderSpecifier;
import com.querydsl.core.types.dsl.CaseBuilder;
import com.querydsl.core.types.dsl.DateTimePath;
import com.querydsl.jpa.impl.JPAQueryFactory;
import lombok.RequiredArgsConstructor;
Expand All @@ -20,10 +19,12 @@
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.stream.Collectors;

import static clap.server.adapter.inbound.web.dto.task.request.SortBy.CONTRIBUTE;
import static clap.server.adapter.outbound.persistense.entity.task.QTaskEntity.taskEntity;
import static com.querydsl.core.types.Order.ASC;
import static com.querydsl.core.types.Order.DESC;
Expand Down Expand Up @@ -91,33 +92,18 @@ public List<TeamTaskResponse> findTeamStatus(Long memberId, FilterTeamStatusRequ
SortBy sortBy = (filter != null && filter.sortBy() != null) ? filter.sortBy() : SortBy.DEFAULT;

assert filter != null;
OrderSpecifier<?> orderBy;
if (sortBy == SortBy.CONTRIBUTE) {
// 기여도순 (진행 중 + 검토 중 작업 개수 합 기준 내림차순)
orderBy = new CaseBuilder()
.when(taskEntity.taskStatus.eq(TaskStatus.IN_PROGRESS)
.or(taskEntity.taskStatus.eq(TaskStatus.IN_REVIEWING)))
.then(1)
.otherwise(0)
.desc();
} else {
// 기본순 (닉네임 오름차순)
orderBy = taskEntity.processor.nickname.asc();
}

// 쿼리 실행
List<TaskEntity> taskEntities = queryFactory
.selectFrom(taskEntity)
.where(builder)
.orderBy(orderBy)
.fetch();

// null 또는 빈 리스트 처리
if (taskEntities == null || taskEntities.isEmpty()) {
return List.of(); // 빈 리스트 반환
}

return taskEntities.stream()
List<TeamTaskResponse> members = taskEntities.stream()
.collect(Collectors.groupingBy(t -> t.getProcessor().getMemberId(), LinkedHashMap::new, Collectors.toList()))
.entrySet().stream()
.map(entry -> {
Expand Down Expand Up @@ -157,6 +143,12 @@ public List<TeamTaskResponse> findTeamStatus(Long memberId, FilterTeamStatusRequ
);
}).collect(Collectors.toList());

// 기여도순 (진행 중 + 검토 중 작업 개수 합 기준 내림차순)
if (sortBy.equals(CONTRIBUTE)) members.sort((a, b) -> b.totalTaskCount() - a.totalTaskCount());
// 기본순 (닉네임 오름차순)
else members.sort(Comparator.comparing(TeamTaskResponse::nickname));

return members;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

import java.util.List;

import static clap.server.adapter.inbound.web.dto.task.request.SortBy.CONTRIBUTE;

@ApplicationService
public class TeamStatusService implements LoadTeamStatusUsecase, FilterTeamStatusUsecase {

Expand Down Expand Up @@ -43,7 +41,6 @@ public TeamStatusResponse filterTeamStatus(FilterTeamStatusRequest filter) {
// 전체 팀의 진행 중 & 검토 중 작업 수 계산
int totalInProgressTaskCount = members.stream().mapToInt(TeamTaskResponse::inProgressTaskCount).sum();
int totalInReviewingTaskCount = members.stream().mapToInt(TeamTaskResponse::inReviewingTaskCount).sum();
if (filter.sortBy().equals(CONTRIBUTE)) members.sort((a, b) -> b.totalTaskCount() - a.totalTaskCount());

return new TeamStatusResponse(members, totalInProgressTaskCount, totalInReviewingTaskCount);
}
Expand Down