- 이슈 상세페이지 연관,하위 이슈 페이징 처리 완료
| | |
| | | List<IssueVo> findIssue(Map<String, Object> resJsonData, |
| | | ProjectCondition projectCondition, Pageable pageable); |
| | | |
| | | void detailIssue(Map<String, Object> resJsonData, IssueCondition issueCondition, Pageable relPageable, Pageable downPageable); |
| | | void detailIssue(Map<String, Object> resJsonData, IssueCondition issueCondition); |
| | | |
| | | Issue modifyIssue(IssueForm issueForm, List<MultipartFile> files); |
| | | |
| | |
| | | List<IssueVo> findChartIssue(Map<String, Object> resJsonData, |
| | | ProjectCondition condition, Pageable pageable); |
| | | |
| | | void detailIssue(Map<String, Object> resJsonData, IssueCondition issueCondition, Pageable relPageable, Pageable downPageable); |
| | | void detailIssue(Map<String, Object> resJsonData, IssueCondition issueCondition); |
| | | |
| | | Issue modifyIssue(IssueForm issueForm, List<MultipartFile> files); |
| | | |
| | |
| | | // 이슈 상세 정보를 조회한다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public void detailIssue(Map<String, Object> resJsonData, IssueCondition issueCondition, Pageable relPageable, Pageable downPageable) { |
| | | issueService.detailIssue(resJsonData, issueCondition, relPageable, downPageable); |
| | | public void detailIssue(Map<String, Object> resJsonData, IssueCondition issueCondition) { |
| | | issueService.detailIssue(resJsonData, issueCondition); |
| | | } |
| | | |
| | | // 이슈를 수정한다. |
| | |
| | | // 이슈 상세 정보를 조회한다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public void detailIssue(Map<String, Object> resJsonData, IssueCondition issueCondition, Pageable relPageable, Pageable downPageable) { |
| | | public void detailIssue(Map<String, Object> resJsonData, IssueCondition issueCondition) { |
| | | IssueVo issueVo = new IssueVo(); |
| | | Pageable relPageable = issueCondition.getRelPageable(); |
| | | Pageable downPageable = issueCondition.getDownPageable(); |
| | | |
| | | if (issueCondition.getId() != null) { |
| | | Issue issue = this.getIssue(issueCondition.getId()); |
| | | issueVo = ConvertUtil.copyProperties(issue, IssueVo.class); |
| | | User user = this.webAppUtil.getLoginUserObject(); |
| | | |
| | | issueVo.setRelPage(relPageable.getPageNumber() * relPageable.getPageSize()); |
| | | issueVo.setRelPageSize(relPageable.getPageSize()); |
| | | |
| | | issueVo.setRelPageNumber(relPageable.getPageNumber()); |
| | | issueVo.setRelPageSize(relPageable.getPageSize()); |
| | | issueVo.setRelPage(relPageable.getPageNumber() * relPageable.getPageSize()); |
| | | |
| | | issueVo.setDownPageNumber(downPageable.getPageNumber()); |
| | | issueVo.setDownPage(downPageable.getPageNumber() * downPageable.getPageSize()); |
| | | issueVo.setDownPageSize(downPageable.getPageSize()); |
| | | |
| | |
| | | break; |
| | | } |
| | | } |
| | | Long relTotalCount = issueVo.getRelTotalCount(); |
| | | int relTotalPage = issueVo.getRelTotalPage(); |
| | | |
| | | Long downTotalCount = issueVo.getDownTotalCount(); |
| | | int downTotalPage = issueVo.getDownTotalPage(); |
| | | // 사용자 시스템 기능 사용 정보 수집 |
| | | log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(this.webAppUtil.getLoginUser(), ElasticSearchConstants.ISSUE_DETAIL)); |
| | | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, issueVo); |
| | | resJsonData.put(Constants.REQ_KEY_RELATION_ISSUE_PAGE_VO, new ResPage(relPageable.getPageNumber(), relPageable.getPageSize(), |
| | | relTotalPage, relTotalCount)); |
| | | resJsonData.put(Constants.REQ_KEY_DOWN_ISSUE_PAGE_VO, new ResPage(downPageable.getPageNumber(), downPageable.getPageSize(), |
| | | downTotalPage, downTotalCount)); |
| | | } |
| | | |
| | | // 테이블 설정 셋팅 |
| | |
| | | return PageRequest.of(pageVo.getPage(), pageVo.getPageSize()); |
| | | } |
| | | |
| | | public Pageable convertRelPageable(PageVo pageVo) { |
| | | return PageRequest.of(pageVo.getRelPage(), pageVo.getRelPageSize()); |
| | | } |
| | | |
| | | public Pageable convertDownPageable(PageVo pageVo) { |
| | | return PageRequest.of(pageVo.getDownPage(), pageVo.getDownPageSize()); |
| | | } |
| | | |
| | | public Pageable getDefaultPageable() { |
| | | return PageRequest.of(0, 300); |
| | | } |
| | |
| | | } |
| | | |
| | | public PageVo getDefaultPageVo() { |
| | | return new PageVo(0, 300,0, 300, 0, 300); |
| | | return new PageVo(0, 300); |
| | | } |
| | | |
| | | public static Pageable applySort(Pageable page, String field, Sort.Direction direction) { |
| | |
| | | private String hostingName; |
| | | |
| | | private int relPage; |
| | | private int relPageNumber; |
| | | private int relPageSize; |
| | | private int relTotalPage; |
| | | private Long relTotalCount; |
| | | |
| | | private int downPage; |
| | | private int downPageNumber; |
| | | private int downPageSize; |
| | | private int downTotalPage; |
| | | private Long downTotalCount; |
| | |
| | | public void setDownTotalCount(Long downTotalCount) { |
| | | this.downTotalCount = downTotalCount; |
| | | } |
| | | |
| | | public int getRelPageNumber() { |
| | | return relPageNumber; |
| | | } |
| | | |
| | | public void setRelPageNumber(int relPageNumber) { |
| | | this.relPageNumber = relPageNumber; |
| | | } |
| | | |
| | | public int getDownPageNumber() { |
| | | return downPageNumber; |
| | | } |
| | | |
| | | public void setDownPageNumber(int downPageNumber) { |
| | | this.downPageNumber = downPageNumber; |
| | | } |
| | | } |
| | |
| | | public PageVo() { |
| | | } |
| | | |
| | | public PageVo(int page, int pageSize, int relPage, int relPageSize, int downPage, int downPageSize) { |
| | | public PageVo(int page, int pageSize) { |
| | | this.page = page; |
| | | this.pageSize = pageSize; |
| | | this.relPage = relPage; |
| | | this.relPageSize = relPageSize; |
| | | this.downPage = downPage; |
| | | this.downPageSize = downPageSize; |
| | | } |
| | | |
| | | public Integer getPage() { |
| | |
| | | package kr.wisestone.owl.web.condition; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import kr.wisestone.owl.util.CommonUtil; |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | import kr.wisestone.owl.util.DateUtil; |
| | | import kr.wisestone.owl.util.MapUtil; |
| | | import kr.wisestone.owl.util.*; |
| | | import kr.wisestone.owl.vo.PageVo; |
| | | import org.springframework.data.domain.Pageable; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.Date; |
| | |
| | | private Boolean hideDownIssue; |
| | | private Boolean hideCompleteIssue; |
| | | private Boolean isTree; // 트리구조 모드 일때 |
| | | private Pageable relPageable; |
| | | private Pageable downPageable; |
| | | |
| | | public IssueCondition(){} |
| | | |
| | |
| | | |
| | | public static IssueCondition make(Map<String, Object> conditions) { |
| | | IssueCondition condition = ConvertUtil.convertMapToClass(conditions, IssueCondition.class); |
| | | Map<String, Object> pageContents = (Map<String, Object>) conditions.get("pageContent"); |
| | | if (pageContents != null) { |
| | | PageVo downPageVo = new PageVo(); |
| | | downPageVo.setPage(MapUtil.getInteger(pageContents, "downPage")); |
| | | downPageVo.setPageSize(MapUtil.getInteger(pageContents, "downPageSize")); |
| | | |
| | | PageVo relPageVo = new PageVo(); |
| | | relPageVo.setPage(MapUtil.getInteger(pageContents, "relPage")); |
| | | relPageVo.setPageSize(MapUtil.getInteger(pageContents, "relPageSize")); |
| | | |
| | | PageUtil pageUtil = new PageUtil(); |
| | | condition.setRelPageable(pageUtil.convertPageable(relPageVo)); |
| | | condition.setDownPageable(pageUtil.convertPageable(downPageVo)); |
| | | } |
| | | |
| | | if (!StringUtils.isEmpty(condition.getCombinationIssueNumber())) { |
| | | if (condition.getCombinationIssueNumber().contains("-")) { |
| | |
| | | public void setTree(Boolean tree) { |
| | | isTree = tree; |
| | | } |
| | | |
| | | public Pageable getRelPageable() { |
| | | return relPageable; |
| | | } |
| | | |
| | | public void setRelPageable(Pageable relPageable) { |
| | | this.relPageable = relPageable; |
| | | } |
| | | |
| | | public Pageable getDownPageable() { |
| | | return downPageable; |
| | | } |
| | | |
| | | public void setDownPageable(Pageable downPageable) { |
| | | this.downPageable = downPageable; |
| | | } |
| | | } |
| | |
| | | @ResponseBody |
| | | Map<String, Object> detail(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Pageable relPageable = this.pageUtil.convertRelPageable(this.getPageVo(params)); |
| | | Pageable downPageable = this.pageUtil.convertDownPageable(this.getPageVo(params)); |
| | | |
| | | this.ganttServiceService.detailIssue(resJsonData, IssueCondition.make(params.get(Constants.REQ_KEY_CONTENT)), relPageable, downPageable); |
| | | this.ganttServiceService.detailIssue(resJsonData, IssueCondition.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | |
| | | @ResponseBody |
| | | Map<String, Object> detail(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Pageable relPageable = this.pageUtil.convertRelPageable(this.getPageVo(params)); |
| | | Pageable downPageable = this.pageUtil.convertDownPageable(this.getPageVo(params)); |
| | | |
| | | this.issueService.detailIssue(resJsonData, IssueCondition.make(params.get(Constants.REQ_KEY_CONTENT)), relPageable, downPageable); |
| | | this.issueService.detailIssue(resJsonData, IssueCondition.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | |
| | | $scope.fn.removeDownIssue = removeDownIssue; |
| | | $scope.fn.changeDetailPageRowCount = changeDetailPageRowCount; // 페이지 변경 |
| | | $scope.fn.sendCommonMail = sendCommonMail; |
| | | $scope.fn.getSubPageContent = getSubPageContent; |
| | | |
| | | // 이슈 목록 컨트롤러 vm, fn 상속 중 |
| | | $scope.vm.viewer = {}; // 현재 이슈 |
| | |
| | | data : [] |
| | | }; |
| | | |
| | | $scope.vm.page = { |
| | | selectedPage : 0, |
| | | selectedPageRowCount : String(10), |
| | | $scope.vm.subPage = { |
| | | selectedRelPage : 0, |
| | | selectedRelPageRowCount : String(10), |
| | | selectedDownPage : 0, |
| | |
| | | angular.extend(this, $controller('autoCompleteController', {$scope : $scope, $injector : $injector})); |
| | | |
| | | // 이슈 목록 데이터 갱신 |
| | | $scope.$on("getIssueList", function () { |
| | | /*$scope.$on("getIssueList", function () { |
| | | $scope.fn.getIssueDetail(0,0); |
| | | }); |
| | | });*/ |
| | | |
| | | // 하위 이슈 삭제 |
| | | function removeDownIssue() { |
| | |
| | | return result; |
| | | |
| | | } |
| | | function getSubPageContent(relPage, relPageSize, downPage, downPageSize) { |
| | | return { |
| | | relPage: relPage, |
| | | relPageSize: relPageSize, |
| | | downPage: downPage, |
| | | downPageSize: downPageSize |
| | | }; |
| | | } |
| | | |
| | | // 이슈 상세 정보 조회 |
| | | function getIssueDetail(selectedRelPage, selectedDownPage) { |
| | |
| | | $scope.fn.initReload(); |
| | | // $scope.fn.getRelTableConfigs(); |
| | | // $scope.fn.getDownTableConfigs(); |
| | | Issue.detail($resourceProvider.getContent( |
| | | {id : $scope.vm.viewer.id, deep : "02"}, |
| | | $resourceProvider.getSubPageContent(currentRelPage, $scope.vm.page.selectedRelPageRowCount |
| | | , currentDownPage, $scope.vm.page.selectedDownPageRowCount)) |
| | | ).then(function (result) { |
| | | |
| | | var pageContent = $scope.fn.getSubPageContent(currentRelPage, $scope.vm.subPage.selectedRelPageRowCount |
| | | , currentDownPage, $scope.vm.subPage.selectedDownPageRowCount); |
| | | |
| | | var content = $resourceProvider.getContent( |
| | | {id : $scope.vm.viewer.id, deep : "02", pageContent}, null); |
| | | |
| | | Issue.detail(content).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | if (angular.isDefined(result.data.data)) { |
| | | |
| | | $scope.vm.page.selectedRelPage = currentRelPage + 1; |
| | | $scope.vm.page.selectedDownPage = currentDownPage + 1; |
| | | $scope.vm.responseData = result.data; |
| | | $scope.vm.subPage.selectedRelPage = currentRelPage + 1; |
| | | $scope.vm.subPage.selectedDownPage = currentDownPage + 1; |
| | | $scope.vm.responseData = result.data.data; |
| | | |
| | | $scope.vm.viewer = angular.copy(result.data.data); |
| | | // 이슈 이미지 미리 보기 만들기 |
| | |
| | | page: page, |
| | | pageSize: pageSize |
| | | }; |
| | | }, |
| | | getSubPageContent: function (relPage, relPageSize, downPage, downPageSize) { |
| | | return { |
| | | relPage: relPage, |
| | | relPageSize: relPageSize, |
| | | downPage: downPage, |
| | | downPageSize: downPageSize |
| | | }; |
| | | } |
| | | } |
| | | } |
| | |
| | | tabindex="-1" |
| | | class="form-control form-control-sm" |
| | | ng-change="fn.changeDetailPageRowCount()" |
| | | ng-model="vm.page.selectedRelPageRowCount"> |
| | | ng-model="vm.subPage.selectedRelPageRowCount"> |
| | | <option value="10">10</option> |
| | | <option value="50">50</option> |
| | | <option value="100">100</option> |
| | | </select> {{vm.page.selectedRelPage}}-{{vm.responseData.relPage.totalPage}} / |
| | | {{vm.responseData.relPage.totalCount | number}}<span translate="common.few">건</span> |
| | | </select> {{vm.subPage.selectedRelPage}}-{{vm.responseData.relTotalPage}} / |
| | | {{vm.responseData.relTotalCount | number}}<span translate="common.few">건</span> |
| | | </label> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="controls-below-table text-center"> |
| | | <ul uib-pagination |
| | | boundary-links-numbes="true" |
| | | items-per-page="vm.page.selectedRelPageRowCount" |
| | | total-items="vm.responseData.relPage.totalCount" |
| | | ng-model="vm.page.selectedRelPage" |
| | | items-per-page="vm.subPage.selectedRelPageRowCount" |
| | | total-items="vm.responseData.relTotalCount" |
| | | ng-model="vm.subPage.selectedRelPage" |
| | | max-size="10" |
| | | ng-click="fn.getIssueDetail(vm.page.selectedRelPage - 1, vm.page.selectedDownPage - 1)" |
| | | ng-click="fn.getIssueDetail(vm.subPage.selectedRelPage - 1, vm.subPage.selectedDownPage - 1)" |
| | | class="pagination pagination-sm" |
| | | previous-text="<" |
| | | next-text=">" |
| | |
| | | tabindex="-1" |
| | | class="form-control form-control-sm" |
| | | ng-change="fn.changeDetailPageRowCount()" |
| | | ng-model="vm.page.selectedDownPageRowCount"> |
| | | ng-model="vm.subPage.selectedDownPageRowCount"> |
| | | <option value="10">10</option> |
| | | <option value="50">50</option> |
| | | <option value="100">100</option> |
| | | </select> {{vm.page.selectedDownPage}}-{{vm.responseData.downPage.totalPage}} / |
| | | {{vm.responseData.downPage.totalCount | number}}<span translate="common.few">건</span> |
| | | </select> {{vm.subPage.selectedDownPage}}-{{vm.responseData.downTotalPage}} / |
| | | {{vm.responseData.downTotalCount | number}}<span translate="common.few">건</span> |
| | | </label> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="controls-below-table text-center"> |
| | | <ul uib-pagination |
| | | boundary-links-numbes="true" |
| | | items-per-page="vm.page.selectedDownPageRowCount" |
| | | total-items="vm.responseData.downPage.totalCount" |
| | | ng-model="vm.page.selectedDownPage" |
| | | items-per-page="vm.subPage.selectedDownPageRowCount" |
| | | total-items="vm.responseData.downTotalCount" |
| | | ng-model="vm.subPage.selectedDownPage" |
| | | max-size="10" |
| | | ng-click="fn.getIssueDetail(vm.page.selectedRelPage - 1, vm.page.selectedDownPage - 1)" |
| | | ng-click="fn.getIssueDetail(vm.subPage.selectedRelPage - 1, vm.subPage.selectedDownPage - 1)" |
| | | class="pagination pagination-sm" |
| | | previous-text="<" |
| | | next-text=">" |