| | |
| | | @Override |
| | | @Transactional |
| | | public void addIssueHistory(Issue issue, IssueHistoryType issueHistoryType, String issueChangeDescription) { |
| | | User user = this.webAppUtil.getLoginUserObject(); |
| | | addIssueHistory(issue, user, issueHistoryType, issueChangeDescription); |
| | | } |
| | | |
| | | // 이력 생성 |
| | | @Override |
| | | @Transactional |
| | | public void addIssueHistory(Issue issue, User user, IssueHistoryType issueHistoryType, String issueChangeDescription) { |
| | | IssueHistory issueHistory = new IssueHistory(); |
| | | issueHistory.setIssue(issue); |
| | | issueHistory.setProject(issue.getProject()); |
| | | issueHistory.setIssueHistoryType(issueHistoryType); |
| | | StringBuilder description = new StringBuilder(); |
| | | // 이력 정보를 만들어 낸다. |
| | | this.makeDescription(description, issueHistoryType, issueChangeDescription); |
| | | |
| | | this.makeDescription(user, description, issueHistoryType, issueChangeDescription); |
| | | issueHistory.setDescription(description.toString()); |
| | | |
| | | this.issueHistoryRepository.saveAndFlush(issueHistory); |
| | |
| | | // 이력 정보를 만들어 낸다. |
| | | @Override |
| | | public void makeDescription(StringBuilder description, IssueHistoryType issueHistoryType, String issueChangeDescription) { |
| | | User user = this.webAppUtil.getLoginUserObject(); |
| | | makeDescription(user, description, issueHistoryType, issueChangeDescription); |
| | | } |
| | | |
| | | // 이력 정보를 만들어 낸다. |
| | | @Override |
| | | public void makeDescription(User user, StringBuilder description, IssueHistoryType issueHistoryType, String issueChangeDescription) { |
| | | description.append("<div class=\"activity-text\">"); |
| | | |
| | | // 생성, 수정, 삭제에 대해 기록을 남긴다. |
| | |
| | | description.append("<span class='activity-timestamp'>"); |
| | | description.append(DateUtil.convertDateToStr(new Date())); |
| | | description.append(" ("); |
| | | description.append(this.webAppUtil.getLoginUser().getName()); |
| | | description.append(user.getName()); |
| | | description.append(" - "); |
| | | description.append(CommonUtil.decryptAES128(this.webAppUtil.getLoginUser().getAccount())); |
| | | description.append(CommonUtil.decryptAES128(user.getAccount())); |
| | | description.append(")"); |
| | | description.append("</span></h6>"); |
| | | break; |
| | |
| | | description.append(DateUtil.convertDateToStr(new Date())); |
| | | description.append(" ("); |
| | | |
| | | if (this.webAppUtil.getLoginUser() != null) { |
| | | description.append(this.webAppUtil.getLoginUser().getName()); |
| | | if (user != null) { |
| | | description.append(user.getName()); |
| | | description.append(" - "); |
| | | description.append(CommonUtil.decryptAES128(this.webAppUtil.getLoginUser().getAccount())); |
| | | description.append(CommonUtil.decryptAES128(user.getAccount())); |
| | | } |
| | | else { |
| | | description.append("OWL-ITS-SYSTEM"); |
| | |
| | | description.append("<span class=\"activity-timestamp\">"); |
| | | description.append(DateUtil.convertDateToStr(new Date())); |
| | | description.append(" ("); |
| | | description.append(this.webAppUtil.getLoginUser().getName()); |
| | | description.append(user.getName()); |
| | | description.append(" - "); |
| | | description.append(CommonUtil.decryptAES128(this.webAppUtil.getLoginUser().getAccount())); |
| | | description.append(CommonUtil.decryptAES128(user.getAccount())); |
| | | description.append(")"); |
| | | description.append("</span></h6>"); |
| | | break; |
| | | |
| | | case SEND: |
| | | description.append("<h6 class=\"creat\"><span class=\"dot\"></span><span translate=\"common.sendMailIssue\">이슈 메일 전송</span>"); |
| | | description.append("<span class=\"activity-timestamp\">"); |
| | | description.append(DateUtil.convertDateToStr(new Date())); |
| | | description.append(" ("); |
| | | |
| | | if (user != null) { |
| | | description.append(user.getName()); |
| | | description.append(" - "); |
| | | description.append(CommonUtil.decryptAES128(user.getAccount())); |
| | | } |
| | | else { |
| | | description.append("OWL-ITS-SYSTEM"); |
| | | description.append(" - "); |
| | | description.append(this.systemEmail); |
| | | } |
| | | |
| | | description.append(")"); |
| | | description.append("</span></h6>"); |
| | | description.append(issueChangeDescription); |
| | | break; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // 이슈 메일 전송 정보를 기록한다. |
| | | @Override |
| | | public void detectSendIssueMail(IssueHistoryType type, IssueForm issueForm, StringBuilder description) { |
| | | if (type == IssueHistoryType.SEND) { |
| | | description.append("<span translate=\"issue.sendIssueMailHistory\">이슈 메일 전송을 완료했습니다. </span>"); |
| | | if(issueForm.getSendEmails() != null && issueForm.getSendEmails().size() > 0){ |
| | | for (String sendEmail : issueForm.getSendEmails()){ |
| | | description.append("<span class=\"text-primary bold\"> > " + CommonUtil.decryptAES128(sendEmail) + "</span>"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 업체 정보 변경 정보를 기록한다. |
| | | @Override |
| | | public void detectIssueCompany(IssueHistoryType type, Map<String, Object> param, IssueCompany issueCompany, StringBuilder description) { |