| | |
| | | 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; |
| | |
| | | private String endStartDate; |
| | | private String beginCompleteDate; |
| | | private String endCompleteDate; |
| | | private String beginDateRange; |
| | | private String endDateRange; |
| | | private Integer page; |
| | | private Integer pageSize; |
| | | private Long loginUserId; |
| | |
| | | private Boolean isTree; // 트리구조 모드 일때 |
| | | private Pageable relPageable; |
| | | private Pageable downPageable; |
| | | private Boolean allIssue; // 완료된 이슈까지 보여줄지 여부 |
| | | private Long issueTypeId; |
| | | private Boolean parentYN; //상위이슈만 조회 여부 |
| | | |
| | | public IssueCondition(){} |
| | | |
| | |
| | | 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")); |
| | | } |
| | |
| | | |
| | | 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) { |
| | |
| | | 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); |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | 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() { |
| | |
| | | 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; |
| | | } |
| | | } |