| | |
| | | private CompanyFieldService companyFieldService; |
| | | |
| | | @Autowired |
| | | private CompanyFieldCategoryService companyFieldCategoryService; |
| | | |
| | | @Autowired |
| | | private IspFieldService ispFieldService; |
| | | |
| | | @Autowired |
| | |
| | | @Autowired |
| | | private IssueRelationMapper issueRelationMapper; |
| | | |
| | | @Autowired |
| | | private WorkflowTransitionService workflowTransitionService; |
| | | |
| | | @Override |
| | | protected JpaRepository<Issue, Long> getRepository() { |
| | | return this.issueRepository; |
| | |
| | | } |
| | | } else if (issueApiForm.getIssueStatusId() == null){ |
| | | throw new ApiParameterException(this.messageAccessor.getMessage(MsgConstants.API_ISSUE_STATUS_NOT_EXIST)); |
| | | } else if (!this.workflowTransitionService.contains(issueApiForm.getIssueStatusId(), workflow.getId())) { |
| | | //이슈 상태 유효성 확인 |
| | | throw new ApiParameterException(this.messageAccessor.getMessage(MsgConstants.API_ISSUE_STATUS_NOT_EXIST_IN_WORKFLOW)); |
| | | } |
| | | |
| | | // 프로젝트 입력 |
| | |
| | | |
| | | case "02": // 프로젝트, 이슈 유형, 이슈 상태, 우선순위, 중요도, 담당자, 첨부파일, 사용자 정의 필드 정보, 댓글, 기록을 셋팅한다. |
| | | this.setIssueDetail(issueVo, issue, user); // 이슈 상세 정보를 셋팅한다. |
| | | this.setIssueTableConfigs(issue, issueVo); |
| | | this.setIssueTableConfigs(issue, issueVo, issueCondition); |
| | | issueVo.setProjectVo(ConvertUtil.copyProperties(issue.getProject(), ProjectVo.class)); |
| | | break; |
| | | } |
| | |
| | | } |
| | | |
| | | // 테이블 설정 셋팅 |
| | | private void setIssueTableConfigs(Issue issue, IssueVo issueVo) { |
| | | Long IssueTypeId = issue.getIssueType().getId(); |
| | | private void setIssueTableConfigs(Issue issue, IssueVo issueVo, IssueCondition issueCondition) { |
| | | //Long IssueTypeId = issue.getIssueType().getId(); |
| | | Long IssueTypeId = issueCondition.getIssueTypeId(); |
| | | |
| | | for (int tableConfigType : IssueTableConfig.IssueTableTypes) { |
| | | if (tableConfigType != IssueTableConfig.ISSUE_TABLE_TYPE_MAIN) { |
| | |
| | | |
| | | List<Issue> downIssueList = this.issueRepository.findByParentIssueId(issue.getId()); |
| | | if(downIssueList != null && downIssueList.size() > 0) { |
| | | int startPage = (int) Math.floor(issueVo.getDownPage()/issueVo.getDownPageSize()); |
| | | int startPage = 0; |
| | | if (issueVo.getDownPage() != 0) { |
| | | startPage = (int) Math.floor(issueVo.getDownPage()/issueVo.getDownPageSize()); |
| | | } |
| | | Pageable pageable = PageRequest.of(startPage, issueVo.getDownPageSize()); |
| | | downIssues = this.issueRepository.findByParentIssueId(issue.getId(), pageable); |
| | | } |
| | |
| | | issueVo.setRelTotalCount(totalCount); |
| | | for (Map<String, Object> result : results) { |
| | | IssueRelationVo issueRelationVo = ConvertUtil.convertMapToClass(result, IssueRelationVo.class); |
| | | Issue relationIssue = this.findOne(issueRelationVo.getId()); |
| | | Issue relationIssue = this.findOne(MapUtil.getLong(result, "relationIssueId")); |
| | | IssueVo relIssueVo = ConvertUtil.copyProperties(relationIssue, IssueVo.class); |
| | | Project project = this.projectService.getProject(relationIssue.getProject().getId()); |
| | | relIssueVo.setProjectId(project.getId()); |
| | |
| | | CompanyField companyField = issueCompany.getCompanyField(); |
| | | if (companyField != null) { |
| | | issueCompanyVo.setCompanyId(issueCompany.getCompanyField().getId()); |
| | | if (issueCompany.getCompanyTypeId() != null) { |
| | | CompanyFieldCategory companyType = this.companyFieldCategoryService.find(issueCompany.getCompanyTypeId()); |
| | | issueCompanyVo.setCompanyTypeName(companyType.getUseValue()); |
| | | } |
| | | if (issueCompany.getParentSectorId() != null) { |
| | | CompanyFieldCategory parentSector = this.companyFieldCategoryService.find(issueCompany.getParentSectorId()); |
| | | issueCompanyVo.setParentSectorName(parentSector.getUseValue()); |
| | | } |
| | | if (issueCompany.getChildSectorId() != null) { |
| | | CompanyFieldCategory childSector = this.companyFieldCategoryService.find(issueCompany.getChildSectorId()); |
| | | issueCompanyVo.setChildSectorName(childSector.getUseValue()); |
| | | } |
| | | if (issueCompany.getRegionId() != null) { |
| | | CompanyFieldCategory region = this.companyFieldCategoryService.find(issueCompany.getRegionId()); |
| | | issueCompanyVo.setRegionName(region.getUseValue()); |
| | | } |
| | | if (issueCompany.getStatusId() != null) { |
| | | CompanyFieldCategory status = this.companyFieldCategoryService.find(issueCompany.getStatusId()); |
| | | issueCompanyVo.setStatusName(status.getUseValue()); |
| | | } |
| | | } |
| | | issueCompanyVos.add(issueCompanyVo); |
| | | } |