From 71a5ce92795fb1a4fbff5fceab8135ec98a691e5 Mon Sep 17 00:00:00 2001 From: 박지현 <jhpark@maprex.co.kr> Date: 월, 07 3월 2022 18:07:52 +0900 Subject: [PATCH] 이슈 목록 조회 방식 - 전체이슈 보기 / 상위 이슈만 보기 / 하위 이슈만 보기로 수정 --- src/main/java/kr/wisestone/owl/web/condition/IssueCondition.java | 85 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 83 insertions(+), 2 deletions(-) diff --git a/src/main/java/kr/wisestone/owl/web/condition/IssueCondition.java b/src/main/java/kr/wisestone/owl/web/condition/IssueCondition.java index 74c96ee..5f9c6f5 100644 --- a/src/main/java/kr/wisestone/owl/web/condition/IssueCondition.java +++ b/src/main/java/kr/wisestone/owl/web/condition/IssueCondition.java @@ -6,6 +6,7 @@ import org.springframework.data.domain.Pageable; import org.springframework.util.StringUtils; +import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.Map; @@ -27,6 +28,8 @@ private String endStartDate; private String beginCompleteDate; private String endCompleteDate; + private String beginDateRange; + private String endDateRange; private Integer page; private Integer pageSize; private Long loginUserId; @@ -57,6 +60,9 @@ private Boolean isTree; // �듃由ш뎄議� 紐⑤뱶 �씪�븣 private Pageable relPageable; private Pageable downPageable; + private Boolean allIssue; // �셿猷뚮맂 �씠�뒋源뚯� 蹂댁뿬以꾩� �뿬遺� + private Long issueTypeId; + private Boolean parentYN; //�긽�쐞�씠�뒋留� 議고쉶 �뿬遺� public IssueCondition(){} @@ -157,6 +163,18 @@ condition.setEndCompleteDate(DateUtil.convertDateToStr(endCompleteDate, "yyyy-MM-dd")); } + if (StringUtils.hasText(MapUtil.getString(conditions, "dateRange"))) { + String dateRange = MapUtil.getString(conditions, "dateRange"); + if (!StringUtils.isEmpty(dateRange)) { + List<String> date = Arrays.asList(dateRange.split("~")); + + Date beginDateRange = DateUtil.convertStrToDate(date.get(0).trim(), "yy-MM-dd"); + condition.setBeginDateRange(DateUtil.convertDateToStr(beginDateRange, "yyyy-MM-dd")); + Date endDateRange = DateUtil.convertStrToDate(date.get(1).trim(), "yy-MM-dd"); + condition.setEndDateRange(DateUtil.convertDateToStr(endDateRange, "yyyy-MM-dd")); + } + } + if (MapUtil.getLongs(conditions, "projectIds") != null) { condition.setProjectIds(MapUtil.getLongs(conditions, "projectIds")); } @@ -167,6 +185,10 @@ if (MapUtil.getLongs(conditions, "issueTypeIds") != null) { condition.setIssueTypeIds(MapUtil.getLongs(conditions, "issueTypeIds")); + } + + if (MapUtil.getLong(conditions, "issueTypeId") != null) { + condition.setIssueTypeId(MapUtil.getLong(conditions, "issueTypeId")); } if (MapUtil.getLongs(conditions, "priorityIds") != null) { @@ -197,9 +219,24 @@ condition.setId(MapUtil.getLong(conditions, "issueId")); } - if (MapUtil.getBoolean(conditions, "hideDownIssue") != null) { + + if (MapUtil.getInteger(conditions, "hideDownIssue") != null) { + int hideDownIssue = MapUtil.getInteger(conditions, "hideDownIssue"); if(MapUtil.getBoolean(conditions, "isTree") != null && !MapUtil.getBoolean(conditions, "isTree")){ - condition.setHideDownIssue(MapUtil.getBoolean(conditions, "hideDownIssue")); + switch (hideDownIssue){ + case 0 : // �씠�뒋 紐⑤몢 蹂댁뿬二쇨린 + condition.setHideDownIssue(false); + condition.setParentYN(true); + break; + case 1 : // �긽�쐞�씠�뒋留� 蹂댁뿬二쇨린 + condition.setHideDownIssue(true); + condition.setParentYN(true); + break; + case 2 : // �븯�쐞�씠�뒋留� 蹂댁뿬二쇨린 + condition.setHideDownIssue(false); + condition.setParentYN(false); + break; + } }else if(MapUtil.getBoolean(conditions, "isTree")) { condition.setHideDownIssue(false); } @@ -213,6 +250,10 @@ condition.setTree(MapUtil.getBoolean(conditions, "isTree")); } else { condition.setTree(false); + } + + if (MapUtil.getBoolean(conditions, "parentYN") != null && MapUtil.getBoolean(conditions, "parentYN")) { + condition.setParentYN(true); } return condition; @@ -304,6 +345,22 @@ public void setEndCompleteDate(String endCompleteDate) { this.endCompleteDate = endCompleteDate; + } + + public String getBeginDateRange() { + return beginDateRange; + } + + public void setBeginDateRange(String beginDateRange) { + this.beginDateRange = beginDateRange; + } + + public String getEndDateRange() { + return endDateRange; + } + + public void setEndDateRange(String endDateRange) { + this.endDateRange = endDateRange; } public Integer getPage() { @@ -573,4 +630,28 @@ public void setDownPageable(Pageable downPageable) { this.downPageable = downPageable; } + + public Boolean getAllIssue() { + return allIssue; + } + + public void setAllIssue(Boolean allIssue) { + this.allIssue = allIssue; + } + + public Long getIssueTypeId() { + return issueTypeId; + } + + public void setIssueTypeId(Long issueTypeId) { + this.issueTypeId = issueTypeId; + } + + public Boolean getParentYN() { + return parentYN; + } + + public void setParentYN(Boolean parentYN) { + this.parentYN = parentYN; + } } -- Gitblit v1.8.0