| | |
| | | import com.google.common.collect.Lists; |
| | | import kr.wisestone.owl.common.ExcelConditionCheck; |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.constant.MngPermission; |
| | | import kr.wisestone.owl.constant.MsgConstants; |
| | | import kr.wisestone.owl.constant.UseCompany; |
| | | import kr.wisestone.owl.constant.UsePartner; |
| | | import kr.wisestone.owl.domain.*; |
| | | import kr.wisestone.owl.domain.enumType.ProjectType; |
| | | import kr.wisestone.owl.exception.OwlRuntimeException; |
| | |
| | | Project project = this.projectService.getProject(issueTypeForm.getProjectId()); |
| | | issueType.setProject(project); |
| | | |
| | | issueType.setUseCompany(issueTypeForm.getUseCompany()); |
| | | issueType.setUsePartner(issueTypeForm.getUsePartner()); |
| | | |
| | | return this.issueTypeRepository.saveAndFlush(issueType); |
| | | } |
| | |
| | | return issueTypeVos; |
| | | } |
| | | |
| | | // 이슈 유형 목록을 조회한다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public List<IssueTypeVo> findIssueType(IssueTypeCondition condition) { |
| | | condition.setWorkspaceId(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); |
| | | List<Map<String, Object>> results = this.issueTypeMapper.find(condition); |
| | | return ConvertUtil.convertListToListClass(results, IssueTypeVo.class); |
| | | } |
| | | |
| | | // 이슈 유형에 연결된 워크플로우 정보를 셋팅한다. |
| | | private void setUseIssueTypeByWorkflow(List<IssueTypeVo> issueTypeVos) { |
| | | for (IssueTypeVo issueTypeVo : issueTypeVos) { |
| | |
| | | } |
| | | } |
| | | } |
| | | // 이슈 유형에 연결된 ISP 정보를 셋팅한다. |
| | | private void setUseIssueTypeByIspField(List<IssueTypeVo> issueTypeVos) { |
| | | for (IssueTypeVo issueTypeVo : issueTypeVos){ |
| | | IssueType issueType = this.getIssueType(issueTypeVo.getId()); |
| | | IspField ispField = issueType.getIspField(); |
| | | if(ispField != null){ |
| | | issueTypeVo.setIspFieldVo(ConvertUtil.copyProperties(issueType.getIspField(), IspFieldVo.class)); |
| | | } |
| | | } |
| | | } |
| | | // 이슈 유형에 연결된 호스팅 정보를 셋팅한다. |
| | | private void setUseIssueTypeByHostingField(List<IssueTypeVo> issueTypeVos) { |
| | | for (IssueTypeVo issueTypeVo : issueTypeVos){ |
| | | IssueType issueType = this.getIssueType(issueTypeVo.getId()); |
| | | HostingField hostingField = issueType.getHostingField(); |
| | | if(hostingField != null){ |
| | | issueTypeVo.setHostingFieldVo(ConvertUtil.copyProperties(issueType.getHostingField(), HostingFieldVo.class)); |
| | | } |
| | | } |
| | | }*/ |
| | | */ |
| | | |
| | | // 이슈 유형 상세 정보를 조회한다. |
| | | @Override |
| | |
| | | if (project != null) { |
| | | issueTypeVo.setProjectVo(ConvertUtil.copyProperties(issueType.getProject(), ProjectVo.class)); |
| | | } |
| | | Integer use = issueType.getUseCompany() != null ? issueType.getUseCompany().intValue() : 0; |
| | | Integer using = issueType.getUsePartner() != null ? issueType.getUsePartner().intValue() : 0; |
| | | |
| | | List<UseCompanyVo> useCompanyVos = Lists.newArrayList(); |
| | | for (Integer useCompany : UseCompany.useCompanies) { |
| | | UseCompanyVo useCompanyVo = UseCompany.checkUseCompany(use, useCompany); |
| | | List<UsePartnerVo> usePartnerVos = Lists.newArrayList(); |
| | | for (Integer usePartner : UsePartner.partners) {// 1 // 2 // 4 |
| | | UsePartnerVo usePartnerVo = UsePartner.checkUsePartner(using, usePartner);//3, 1 / 3, 2 / 3, 4 |
| | | |
| | | if (useCompanyVo != null) { |
| | | useCompanyVos.add(useCompanyVo); |
| | | if (usePartnerVo != null) { |
| | | usePartnerVos.add(usePartnerVo); |
| | | } |
| | | } |
| | | |
| | | issueTypeVo.setUseCompanyVos(useCompanyVos); |
| | | |
| | | /*CompanyField companyField = issueType.getCompanyField(); |
| | | if(companyField != null){ |
| | | issueTypeVo.setCompanyFieldVo(ConvertUtil.copyProperties(issueType.getCompanyField(), CompanyFieldVo.class)); |
| | | } |
| | | IspField ispField = issueType.getIspField(); |
| | | if (ispField != null){ |
| | | issueTypeVo.setIspFieldVo(ConvertUtil.copyProperties(issueType.getIspField(), IspFieldVo.class)); |
| | | } |
| | | HostingField hostingField = issueType.getHostingField(); |
| | | if (hostingField != null){ |
| | | issueTypeVo.setHostingFieldVo(ConvertUtil.copyProperties(issueType.getHostingField(), HostingFieldVo.class)); |
| | | }*/ |
| | | issueTypeVo.setUsePartnerVos(usePartnerVos); |
| | | } |
| | | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, issueTypeVo); |
| | |
| | | Project project = this.projectService.getProject(issueTypeForm.getProjectId()); |
| | | issueType.setProject(project); |
| | | |
| | | issueType.setUseCompany(issueTypeForm.getUseCompany()); |
| | | issueType.setUsePartner(issueTypeForm.getUsePartner()); |
| | | |
| | | /*if(issueTypeForm.getCompanyId() != null){ |
| | | CompanyField companyField = this.companyFieldService.getCompany(issueTypeForm.getCompanyId()); |
| | | issueType.setCompanyField(companyField); |
| | | } |
| | | if(issueTypeForm.getIspId() != null) { |
| | | IspField ispField = this.ispFieldService.getIsp(issueTypeForm.getIspId()); |
| | | issueType.setIspField(ispField); |
| | | } |
| | | if(issueTypeForm.getHostingId() != null) { |
| | | HostingField hostingField = this.hostingFieldService.getHosting(issueTypeForm.getHostingId()); |
| | | issueType.setHostingField(hostingField); |
| | | }*/ |
| | | // issueType.setCompanyYn(issueTypeForm.getCompanyYn()); |
| | | // issueType.setIspYn(issueTypeForm.getIspYn()); |
| | | // issueType.setHostingYn(issueTypeForm.getHostingYn()); |
| | | |
| | | this.issueTypeRepository.saveAndFlush(issueType); |
| | | |