-
Notifications
You must be signed in to change notification settings - Fork 5
CLAP-92 기간별 작업 처리량 조회 #50
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
26e7ea7
CLAP-92 Docs: 작업더미데이터 수정
hyoseong-Choi b38c32c
CLAP-92 Feature: 기간별 작업 처리량 조회
hyoseong-Choi 036dbf1
CLAP-94 Feature: 1차 카테고리별 작업 요청량 조회 API 조회
hyoseong-Choi e914a2a
CLAP-95 Feature: 2차 카테고리별 작업 요청량 조회 API 조회
hyoseong-Choi cb244ee
Merge pull request #54 from TaskFlow-CLAP/CLAP-95
hyoseong-Choi a76ec0f
Merge pull request #49 from TaskFlow-CLAP/CLAP-94
hyoseong-Choi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
18 changes: 18 additions & 0 deletions
18
src/main/java/clap/server/adapter/outbound/infrastructure/elastic/PeriodConfig.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| package clap.server.adapter.outbound.infrastructure.elastic; | ||
|
|
||
| import co.elastic.clients.elasticsearch._types.aggregations.CalendarInterval; | ||
| import lombok.Getter; | ||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| @Getter | ||
| @RequiredArgsConstructor | ||
| public enum PeriodConfig { | ||
| DAY(1, CalendarInterval.Hour, 11, 19), | ||
| WEEK(14, CalendarInterval.Day, 0, 10); | ||
|
|
||
| private final long daysToSubtract; | ||
| private final CalendarInterval calendarInterval; | ||
| private final int substringStart; | ||
| private final int substringEnd; | ||
|
|
||
| } |
10 changes: 0 additions & 10 deletions
10
src/main/java/clap/server/adapter/outbound/infrastructure/elastic/dto/PeriodConfig.java
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ public ElasticTask(TaskEntity taskEntity) { | |
| this.taskCode = taskEntity.getTaskCode(); | ||
| this.mainCategory = taskEntity.getCategory().getMainCategory().getName(); | ||
| this.subCategory = taskEntity.getCategory().getName(); | ||
| this.status = taskEntity.getStatus().getName(); | ||
| this.status = taskEntity.getStatus().getStatusName().name().toLowerCase(); | ||
| this.processor = taskEntity.getProcessor().getNickname(); | ||
| this.createdAt = taskEntity.getCreatedAt().toLocalDate(); | ||
| } | ||
|
Comment on lines
33
to
39
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 현재 status 엔티티는 삭제되었고 taskEntity.getTaskStatus() 를 통해 상태를 가져올 수 있을 것 같습니다. |
||
|
|
||
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
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
7 changes: 7 additions & 0 deletions
7
...main/java/clap/server/application/port/inbound/statistics/CategoryTaskRequestUsecase.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package clap.server.application.port.inbound.statistics; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| public interface CategoryTaskRequestUsecase { | ||
| Map<String, Long> categoryTaskRequestAggregate(String period); | ||
| } |
7 changes: 7 additions & 0 deletions
7
src/main/java/clap/server/application/port/inbound/statistics/PeriodTaskProcessUsecase.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package clap.server.application.port.inbound.statistics; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| public interface PeriodTaskProcessUsecase { | ||
| Map<String, Long> periodTaskProcessAggregate(String period); | ||
| } |
7 changes: 7 additions & 0 deletions
7
...n/java/clap/server/application/port/inbound/statistics/SubCategoryTaskRequestUsecase.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package clap.server.application.port.inbound.statistics; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| public interface SubCategoryTaskRequestUsecase { | ||
| Map<String, Long> subCategoryTaskRequestAggregate(String period, String mainCategory); | ||
| } |
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
19 changes: 19 additions & 0 deletions
19
src/main/java/clap/server/application/statistics/CategoryTaskRequestService.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package clap.server.application.statistics; | ||
|
|
||
| import clap.server.application.port.inbound.statistics.CategoryTaskRequestUsecase; | ||
| import clap.server.application.port.outbound.task.ElasticTaskPort; | ||
| import clap.server.common.annotation.architecture.ApplicationService; | ||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| @ApplicationService | ||
| @RequiredArgsConstructor | ||
| public class CategoryTaskRequestService implements CategoryTaskRequestUsecase { | ||
| private final ElasticTaskPort elasticTaskPort; | ||
|
|
||
| @Override | ||
| public Map<String, Long> categoryTaskRequestAggregate(String period) { | ||
| return elasticTaskPort.findCategoryTaskRequestByPeriod(period); | ||
| } | ||
| } |
19 changes: 19 additions & 0 deletions
19
src/main/java/clap/server/application/statistics/PeriodTaskProcessService.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package clap.server.application.statistics; | ||
|
|
||
| import clap.server.application.port.inbound.statistics.PeriodTaskProcessUsecase; | ||
| import clap.server.application.port.outbound.task.ElasticTaskPort; | ||
| import clap.server.common.annotation.architecture.ApplicationService; | ||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| @ApplicationService | ||
| @RequiredArgsConstructor | ||
| public class PeriodTaskProcessService implements PeriodTaskProcessUsecase { | ||
| private final ElasticTaskPort elasticTaskPort; | ||
|
|
||
| @Override | ||
| public Map<String, Long> periodTaskProcessAggregate(String period) { | ||
| return elasticTaskPort.findPeriodTaskProcessByPeriod(period); | ||
| } | ||
| } |
19 changes: 19 additions & 0 deletions
19
src/main/java/clap/server/application/statistics/SubCategoryTaskRequestService.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package clap.server.application.statistics; | ||
|
|
||
| import clap.server.application.port.inbound.statistics.SubCategoryTaskRequestUsecase; | ||
| import clap.server.application.port.outbound.task.ElasticTaskPort; | ||
| import clap.server.common.annotation.architecture.ApplicationService; | ||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| @ApplicationService | ||
| @RequiredArgsConstructor | ||
| public class SubCategoryTaskRequestService implements SubCategoryTaskRequestUsecase { | ||
| private final ElasticTaskPort elasticTaskPort; | ||
|
|
||
| @Override | ||
| public Map<String, Long> subCategoryTaskRequestAggregate(String period, String mainCategory) { | ||
| return elasticTaskPort.findSubCategoryTaskRequestByPeriod(period, mainCategory); | ||
| } | ||
| } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
응답시 따로 상태코드는 안보내는 것으로 보이는데 Http 상태 코드가 리턴되어야 하지 않을까 싶습네요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저희 공통 응답 양식 클래스 올라오면 한번에 바꾸려고 했는데 혹시 그거 사용 안하기로 했었나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네넵 성공의 경우에는 http 상태코드와 응답결과만 보내주면 될 것 같습니다.
오류처리에 대한 부분만 처리하기로 했습니다.