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

Seoyoung #151

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Changes from all commits
Commits
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
8 changes: 1 addition & 7 deletions src/main/java/team1/be/seamless/service/TaskService.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public Page<TaskWithOwnerDetail> getTaskList(Long projectId, String status, Stri
taskEntities.getPageable(),
taskEntities.getTotalElements()
);

}

public ProjectProgress getProjectProgress(Long projectId, getList param) {
Expand All @@ -83,11 +82,7 @@ public ProjectProgress getProjectProgress(Long projectId, getList param) {
int sum = taskEntities.getContent().stream().mapToInt(TaskEntity::getProgress).sum();
int count = taskEntities.getContent().size();

if (count == 0) {
throw new BaseHandler(HttpStatus.NOT_FOUND, "해당 프로젝트에 할당된 태스크가 존재하지 않습니다.");
}

int average = sum / count;
int average = (count == 0) ? 0 : sum / count;
String growthLevel;
String description;

Expand Down Expand Up @@ -135,7 +130,6 @@ public Page<MemberProgress> getMemberProgress(Long projectId, getList param) {

if (param.getPage() * param.getSize() >= memberEntities.size()) {
start = 0;

} else {
start = param.getPage() * param.getSize();
}
Expand Down