| | |
| | | private WorkspaceService workspaceService; |
| | | |
| | | @Autowired |
| | | private CompanyFieldService companyFieldService; |
| | | |
| | | @Autowired |
| | | private IspFieldService ispFieldService; |
| | | |
| | | @Autowired |
| | | private HostingFieldService hostingFieldService; |
| | | private IssueStatusService issueStatusService; |
| | | |
| | | @Autowired |
| | | private IssueTypeMapper issueTypeMapper; |
| | |
| | | Project project = this.projectService.getProject(projectId); |
| | | ProjectVo projectVo = ConvertUtil.copyProperties(project, ProjectVo.class); |
| | | result.put("projectVo", projectVo); |
| | | |
| | | } |
| | | Long issueStatusId = MapUtil.getLong(result, "completeIssueStatusId"); |
| | | if (issueStatusId != null) { |
| | | IssueStatus issueStatus = this.issueStatusService.getIssueStatus(issueStatusId); |
| | | IssueStatusVo issueStatusVo = ConvertUtil.copyProperties(issueStatus, IssueStatusVo.class); |
| | | result.put("completeIssueStatusVo", issueStatusVo); |
| | | } |
| | | } |
| | | |
| | | Long totalCount = this.issueTypeMapper.count(condition); |
| | | int totalPage = (int) Math.ceil((totalCount - 1) / pageable.getPageSize()) + 1; |
| | | List<IssueTypeVo> issueTypeVos = ConvertUtil.convertListToListClass(results, IssueTypeVo.class); |
| | | // for (IssueTypeVo issueTypeVo : issueTypeVos) { |
| | | // |
| | | // } |
| | | |
| | | // 이슈 유형에 연결된 워크플로우 정보를 셋팅한다. |
| | | if (condition.getDeep() != null) { |
| | |
| | | } |
| | | |
| | | this.setUseIssueTypeByProject(issueTypeVos); |
| | | this.setUseIssueTypeByIssueStatus(issueTypeVos); |
| | | /*this.setUseIssueTypeByCompanyField(issueTypeVos); |
| | | this.setUseIssueTypeByIspField(issueTypeVos); |
| | | this.setUseIssueTypeByHostingField(issueTypeVos);*/ |
| | |
| | | Project project = issueType.getProject(); |
| | | if (project != null) { |
| | | issueTypeVo.setProjectVo(ConvertUtil.copyProperties(issueType.getProject(), ProjectVo.class)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void setUseIssueTypeByIssueStatus(List<IssueTypeVo> issueTypeVos) { |
| | | for (IssueTypeVo issueTypeVo : issueTypeVos) { |
| | | IssueType issueType = this.getIssueType(issueTypeVo.getId()); |
| | | |
| | | IssueStatus issueStatus = issueType.getIssueStatus(); |
| | | if (issueStatus != null) { |
| | | issueTypeVo.setCompleteIssueStatusVo(ConvertUtil.copyProperties(issueType.getIssueStatus(), IssueStatusVo.class)); |
| | | } |
| | | } |
| | | } |
| | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, issueTypeVo); |
| | | } |
| | | |
| | | // 이슈 유형을 수정한다. 자동 종료 설정만 수정 |
| | | @Override |
| | | @Transactional |
| | | public IssueType modifyIssueTypeCompleteIssueStatus(IssueTypeForm issueTypeForm) { |
| | | // 사용하고 있는 업무 공간이 활성 상태인지 확인한다. 사용 공간에서 로그인한 사용자가 비활성인지 확인한다. |
| | | this.workspaceService.checkUseWorkspace(); |
| | | |
| | | IssueType issueType = this.getIssueType(issueTypeForm.getId()); |
| | | if (issueTypeForm.getCompleteIssueStatusId() != null) { |
| | | // api에서 사용하는 자동 종료 이슈 상태 |
| | | IssueStatus issueStatus = this.issueStatusService.getIssueStatus(issueTypeForm.getCompleteIssueStatusId()); |
| | | issueType.setIssueStatus(issueStatus); |
| | | }else { |
| | | issueType.setIssueStatus(null); |
| | | } |
| | | |
| | | this.issueTypeRepository.saveAndFlush(issueType); |
| | | return issueType; |
| | | } |
| | | |
| | | // 이슈 유형을 수정한다. |
| | | @Override |
| | | @Transactional |