Skip to content

Commit

Permalink
Merge pull request #151 from kakao-tech-campus-2nd-step3/seoyoung
Browse files Browse the repository at this point in the history
Seoyoung
  • Loading branch information
sunandrabbit authored Nov 14, 2024
2 parents baa339e + 3d17604 commit 2b4105d
Showing 1 changed file with 1 addition and 7 deletions.
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

0 comments on commit 2b4105d

Please sign in to comment.