From 85343ff457681e2b340e95c02a178c63837aed0f Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 화, 30 11월 2021 20:33:48 +0900
Subject: [PATCH] 이전 하위 일감에 대한 히스토리 기록 남기기 완료

---
 src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java b/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java
index 84fdbff..4133115 100644
--- a/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java
+++ b/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java
@@ -2502,7 +2502,7 @@
         //  �궗�슜�옄 �떆�뒪�뀥 湲곕뒫 �궗�슜 �젙蹂� �닔吏�
         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);
+        this.systemEmailService.directEmail(issueForm.getSendEmails().toArray(new String[issueForm.getSendEmails().size()]), EmailType.ISSUE_SEND, issueMap, null); //mailType.ISSUE_SEND - �뀥�뵆由� �꽕�젙
     }
 
     //  �삁�빟 諛쒖깮 �씠�뒋瑜� �떎�뻾�븳�떎
@@ -2510,6 +2510,7 @@
     @Transactional
     public void reservationIssue() {
         List<IssueReservation> issueReservations = this.issueReservationService.findByIssueReservationTypeNotNull();
+
 
         Calendar calendar = Calendar.getInstance();
         int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
@@ -2674,10 +2675,15 @@
     @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) { // 異붽� �븷 寃쎌슦
            // todo �씠�쟾 �븯�쐞 �씪媛� �엳�뒪�넗由ш린濡� �븘�슂
@@ -2710,7 +2716,7 @@
         }
     }
 
-    /*@Override
+    @Override
     @Transactional
     public void findMailTargetAll(Map<String, Object> resJsonData, IssueCondition condition, Pageable pageable) {
         IssueVo issueVo = new IssueVo();
@@ -2746,7 +2752,7 @@
         resJsonData.put(Constants.RES_KEY_CONTENTS, emailList);
         resJsonData.put(Constants.REQ_KEY_PAGE_VO, new ResPage(pageable.getPageNumber(), pageable.getPageSize(),
                 totalPage, totalCount));
-    }*/
+    }
 
     /*@Override
     @Transactional

--
Gitblit v1.8.0