| | |
| | | import kr.wisestone.owl.repository.IssueTypeRepository; |
| | | import kr.wisestone.owl.service.*; |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | import kr.wisestone.owl.util.MapUtil; |
| | | import kr.wisestone.owl.vo.*; |
| | | import kr.wisestone.owl.web.condition.IssueTypeCondition; |
| | | import kr.wisestone.owl.web.form.IssueTypeForm; |
| | |
| | | condition.setWorkspaceId(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); |
| | | |
| | | List<Map<String, Object>> results = this.issueTypeMapper.find(condition); |
| | | for (Map<String, Object> result : results) { |
| | | Long projectId = MapUtil.getLong(result, "projectId"); |
| | | if (projectId != null) { |
| | | Project project = this.projectService.getProject(projectId); |
| | | ProjectVo projectVo = ConvertUtil.copyProperties(project, ProjectVo.class); |
| | | result.put("projectVo", projectVo); |
| | | } |
| | | } |
| | | |
| | | Long totalCount = this.issueTypeMapper.count(condition); |
| | | int totalPage = (int) Math.ceil((totalCount - 1) / pageable.getPageSize()) + 1; |
| | | List<IssueTypeVo> issueTypeVos = ConvertUtil.convertListToListClass(results, IssueTypeVo.class); |