From 61267d8e2d424c9db85bcc80ba8fe3f884e7ff93 Mon Sep 17 00:00:00 2001 From: seoyoung-dev Date: Fri, 15 Nov 2024 01:36:45 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=83=9C=EC=8A=A4=ED=81=AC=EA=B0=80=20?= =?UTF-8?q?=EC=A1=B4=EC=9E=AC=ED=95=98=EC=A7=80=20=EC=95=8A=EC=9D=84=20?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=20=ED=8C=80=20=EC=A7=84=ED=96=89=EB=8F=84=20?= =?UTF-8?q?0=EC=9C=BC=EB=A1=9C=20=EC=82=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/team1/be/seamless/service/TaskService.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/team1/be/seamless/service/TaskService.java b/src/main/java/team1/be/seamless/service/TaskService.java index bc3c39dd..76177580 100644 --- a/src/main/java/team1/be/seamless/service/TaskService.java +++ b/src/main/java/team1/be/seamless/service/TaskService.java @@ -72,7 +72,6 @@ public Page getTaskList(Long projectId, String status, Stri taskEntities.getPageable(), taskEntities.getTotalElements() ); - } public ProjectProgress getProjectProgress(Long projectId, getList param) { @@ -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; @@ -135,7 +130,6 @@ public Page getMemberProgress(Long projectId, getList param) { if (param.getPage() * param.getSize() >= memberEntities.size()) { start = 0; - } else { start = param.getPage() * param.getSize(); }