| | |
| | | projectRoleUserMap.put("statuses", Lists.newArrayList("02")); // 관리자 조회 |
| | | // 관리자 정보 셋팅 |
| | | List<Map<String, Object>> projectRoleUsers = this.projectRoleUserService.findProjectRoleUser(projectRoleUserMap); |
| | | |
| | | if (projectRoleUsers != null && !projectRoleUsers.isEmpty()) { |
| | | for (Map<String, Object> projectRoleUser : projectRoleUsers) { |
| | | UserVo userVo = ConvertUtil.convertMapToClass(projectRoleUser, UserVo.class); |
| | | |
| | | // 이슈 생성 알림 메일 전송 |
| | | this.systemEmailService.reservationEmail(new String[]{userVo.getAccount()}, emailType, issueMap); |
| | | } |
| | |
| | | departsBuilder.append(issueDepartment.getDepartment().getDepartmentName()); |
| | | departsBuilder.append("\n"); |
| | | } |
| | | issueMap.put("departsBuilder", departsBuilder.toString()); |
| | | issueMap.put("departments", departsBuilder.toString()); |
| | | |
| | | // 기간 |
| | | if (!StringUtils.isEmpty(issue.getStartDate())) { |
| | |
| | | // Map 에 있는 데이터를 IssueVo 데이터로 변환한다. |
| | | this.setMapToIssueVo(results, issueVos, issueCondition); |
| | | |
| | | this.setCountDownIssues(results, issueVos); |
| | | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, issueVos); |
| | | resJsonData.put(Constants.REQ_KEY_PAGE_VO, new ResPage(pageable.getPageNumber(), pageable.getPageSize(), |
| | | totalPage, totalCount)); |
| | |
| | | // 사용자 시스템 기능 사용 정보 수집 |
| | | log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(this.webAppUtil.getLoginUser(), ElasticSearchConstants.ISSUE_FIND)); |
| | | return issueVos; |
| | | } |
| | | |
| | | private void setCountDownIssues(List<Map<String, Object>> results, List<IssueVo> issueVos) { |
| | | for (Map<String, Object> result : results){ |
| | | List<Issue> downIssues = this.issueRepository.findByParentIssueId((Long) result.get("id")); //하위이슈 가져오기 |
| | | if(downIssues != null && downIssues.size() > 0){ //상위이슈 가지고 있는 애들이 있으면 |
| | | for(Issue downIssue : downIssues){ |
| | | Long parentIssueId = downIssue.getParentIssue().getId(); |
| | | int downIssueCount = 1; |
| | | Issue parentIssue = this.getIssue(parentIssueId); |
| | | IssueVo parentIssueVo = ConvertUtil.copyProperties(parentIssue, IssueVo.class); |
| | | parentIssueVo.setDownIssueCount(downIssueCount); |
| | | |
| | | for(IssueVo issueVo : issueVos){ |
| | | if(issueVo.getId().equals(parentIssueVo.getId())){ |
| | | issueVo.setDownIssueCount(parentIssueVo.getDownIssueCount()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 이슈 목록을 조회한다(차트용 - 연관일감포함) |
| | |
| | | private void setMapToIssueVo(List<Map<String, Object>> results, List<IssueVo> issueVos, IssueCondition issueCondition) { |
| | | for (Map<String, Object> result : results) { |
| | | IssueVo issueVo = ConvertUtil.convertMapToClass(result, IssueVo.class); |
| | | /*Issue downIssue = this.getIssue((Long) result.get("id")); |
| | | if(downIssue.getParentIssue() != null){ //상위 이슈가 있으면 |
| | | Long parentIssueId = downIssue.getParentIssue().getId(); |
| | | |
| | | int downIssueCount = 1; |
| | | Issue parentIssue = this.getIssue(parentIssueId); |
| | | IssueVo parentIssueVo = ConvertUtil.copyProperties(parentIssue, IssueVo.class); |
| | | parentIssueVo.setDownIssueCount(downIssueCount); |
| | | |
| | | issueVos.add(parentIssueVo); |
| | | }*/ |
| | | issueVos.add(issueVo); |
| | | issueCondition.addIssueIds(String.valueOf(issueVo.getId())); |
| | | } |
| | |
| | | for(IssueIsp issueIsp : issue.getIssueIspFields()){ |
| | | IssueIspVo issueIspVo = ConvertUtil.copyProperties(issueIsp, IssueIspVo.class); |
| | | issueIspVo.setId(issueIsp.getId()); |
| | | IspField ispField = issueIsp.getIspField(); |
| | | if (ispField != null) { |
| | | issueIspVo.setIspId(ispField.getId()); |
| | | } |
| | | issueIspVos.add(issueIspVo); |
| | | } |
| | | issueVo.setIssueIspVos(issueIspVos); |
| | |
| | | for(IssueHosting issueHosting : issue.getIssueHostingFields()){ |
| | | IssueHostingVo issueHostingVo = ConvertUtil.copyProperties(issueHosting, IssueHostingVo.class); |
| | | issueHostingVo.setId(issueHosting.getId()); |
| | | HostingField hostingField = issueHosting.getHostingField(); |
| | | if (hostingField != null) { |
| | | issueHostingVo.setHostingId(hostingField.getId()); |
| | | } |
| | | |
| | | issueHostingVos.add(issueHostingVo); |
| | | } |
| | | issueVo.setIssueHostingVos(issueHostingVos); |
| | |
| | | result.put("customField_" + issueCustomFieldValueVo.getCustomFieldVo().getId().toString(), useValue + ", " + issueCustomFieldValueVo.getUseValue()); |
| | | } |
| | | } |
| | | |
| | | //업체, ISP, 호스팅 추가 |
| | | |
| | | results.add(result); |
| | | } catch (Exception e) { |
| | | log.error("엑셀 다운로드 오류 발생"); |
| | | } |
| | | } |
| | | |
| | | return results; |
| | | } |
| | | |
| | |
| | | // 사용자 시스템 기능 사용 정보 수집 |
| | | log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(this.webAppUtil.getLoginUser(), ElasticSearchConstants.ISSUE_ANOTHER_USER_SEND_EMAIL)); |
| | | this.systemEmailService.directEmail(issueForm.getSendEmails().toArray(new String[issueForm.getSendEmails().size()]), EmailType.ISSUE_SEND, issueMap, null); |
| | | |
| | | if(issueForm.getTemplate().equals(EmailType.ISSUE_SEND_1.toString())){ |
| | | this.systemEmailService.directEmail(ConvertUtil.ToArray(issueForm.getSendEmails()), EmailType.ISSUE_SEND_1, issueMap, null); |
| | | }else if(issueForm.getTemplate().equals(EmailType.ISSUE_SEND_2.toString())){ |
| | | this.systemEmailService.directEmail(ConvertUtil.ToArray(issueForm.getSendEmails()), EmailType.ISSUE_SEND_2, issueMap, null); |
| | | }else if(issueForm.getTemplate().equals(EmailType.ISSUE_SEND_3.toString())){ |
| | | this.systemEmailService.directEmail(ConvertUtil.ToArray(issueForm.getSendEmails()), EmailType.ISSUE_SEND_3, issueMap, null); |
| | | } |
| | | } |
| | | |
| | | // 이슈를 템플릿에 따라 파트너 담당자에게 메일로 발송한다. |
| | |
| | | |
| | | // 사용자 시스템 기능 사용 정보 수집 |
| | | log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(this.webAppUtil.getLoginUser(), ElasticSearchConstants.ISSUE_ANOTHER_USER_SEND_EMAIL)); |
| | | StringBuilder sb = new StringBuilder(); |
| | | |
| | | if(issueForm.getTemplate().equals(EmailType.ISSUE_SEND_1.toString())){ |
| | | this.systemEmailService.directEmail(ConvertUtil.ToArray(issueForm.getSendEmails()), EmailType.ISSUE_SEND_1, issueMap, null); |
| | |
| | | }else if(issueForm.getTemplate().equals(EmailType.ISSUE_SEND_3.toString())){ |
| | | this.systemEmailService.directEmail(ConvertUtil.ToArray(issueForm.getSendEmails()), EmailType.ISSUE_SEND_3, issueMap, null); |
| | | } |
| | | //메일 전송 이력 남기기 |
| | | this.issueHistoryService.detectSendIssueMail(IssueHistoryType.SEND, issueForm, sb); |
| | | this.issueHistoryService.addIssueHistory(issue, IssueHistoryType.SEND, sb.toString()); |
| | | } |
| | | |
| | | // 예약 발생 이슈를 실행한다 |
| | |
| | | @Override |
| | | public void modifyParentIssue(IssueForm issueDownForm) { |
| | | Issue issue = this.getIssue(issueDownForm.getId()); //하위 이슈 |
| | | Issue parentIssue = issue.getParentIssue(); //변경 전 하위이슈의 상위이슈 |
| | | |
| | | Long newParentIssueId = issueDownForm.getParentIssueId(); //변경할 하위이슈의 상위이슈 |
| | | |
| | | StringBuilder sb = new StringBuilder(); |
| | | |
| | | Issue parentIssue = issue.getParentIssue(); //변경 전 하위이슈의 상위이슈 |
| | | if(parentIssue != null){ //변경 전 하위이슈의 상위이슈가 존재 할 경우 |
| | | this.issueHistoryService.detectDownIssues(IssueHistoryType.DELETE, issue, sb); |
| | | this.issueHistoryService.addIssueHistory(parentIssue, IssueHistoryType.MODIFY, sb.toString()); |
| | | } |
| | | |
| | | if (newParentIssueId != null) { // 추가 할 경우 |
| | | parentIssue = this.getIssue(newParentIssueId); //상위이슈(myIssue) |
| | | issue.setParentIssue(parentIssue); //myIssue를 하위이슈의 상위이슈로 set |