From 398a4927e195755bd6a46be99337efd8dacc3dc2 Mon Sep 17 00:00:00 2001
From: 박지현 <jhpark@maprex.co.kr>
Date: 월, 07 3월 2022 18:08:13 +0900
Subject: [PATCH] Merge branch 'master' of http://maprex.iptime.org:9001/r/owl-kisa

---
 src/main/java/kr/wisestone/owl/service/impl/IssueHistoryServiceImpl.java |  265 ++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 191 insertions(+), 74 deletions(-)

diff --git a/src/main/java/kr/wisestone/owl/service/impl/IssueHistoryServiceImpl.java b/src/main/java/kr/wisestone/owl/service/impl/IssueHistoryServiceImpl.java
index 80b12e2..24a2655 100644
--- a/src/main/java/kr/wisestone/owl/service/impl/IssueHistoryServiceImpl.java
+++ b/src/main/java/kr/wisestone/owl/service/impl/IssueHistoryServiceImpl.java
@@ -16,8 +16,7 @@
 import kr.wisestone.owl.vo.IssueHistoryVo;
 import kr.wisestone.owl.vo.IssueVo;
 import kr.wisestone.owl.web.condition.IssueHistoryCondition;
-import kr.wisestone.owl.web.form.EmailTemplateForm;
-import kr.wisestone.owl.web.form.IssueForm;
+import kr.wisestone.owl.web.form.*;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -349,8 +348,11 @@
         this.detectIssuePeriod(issue, issueForm, description);
         //  �떞�떦�옄 蹂�寃� �젙蹂대�� 湲곕줉�븳�떎.
         this.detectIssueManager(issue, issueForm, description);
-        //  �떞�떦遺��꽌 蹂�寃� �젙蹂대�� 湲곕줉�븳�떎.
-        this.detectIssueDepartment(issue, issueForm, description);
+
+        if (issueForm.getIsApi().equals(Issue.IS_API_NO)) { //api濡� 蹂�寃� �떆 �떞�떦遺��꽌 蹂�寃� 遺덇�
+            //  �떞�떦遺��꽌 蹂�寃� �젙蹂대�� 湲곕줉�븳�떎.
+            this.detectIssueDepartment(issue, issueForm, description);
+        }
         //  �궗�슜�옄 �젙�쓽 �븘�뱶 蹂�寃� �젙蹂대�� 湲곕줉�븳�떎.
         this.detectCustomField(issue, issueForm, description);
 
@@ -554,39 +556,111 @@
 
     // �뾽泥� �젙蹂� 蹂�寃� �젙蹂대�� 湲곕줉�븳�떎.
     @Override
-    public void detectIssueCompany(IssueHistoryType type, Map<String, Object> param, CompanyField companyField, IssueCompany issueCompany, StringBuilder description) {
+    @Transactional
+    public void detectIssueCompany(IssueHistoryType type, Map<String, Object> param, CompanyFieldForm companyFieldForm, IssueCompany issueCompany, StringBuilder description) {
+        Long companyFieldId = 0L;
         Long id = 0L;
+        String name = "";
+        String manager = "";
+        String tel = "";
+        String email = "";
+        String memo = "";
+        Long companyTypeId = 0L;
+        Long parentSectorId = 0L;
+        Long childSectorId = 0L;
+        Long regionId = 0L;
+        Long statusId = 0L;
+        String companyTypeName = "";
+        String parentSectorName = "";
+        String childSectorName = "";
+        String regionName = "";
+        String statusName = "";
+
         if (param != null) {
             id = MapUtil.getLong(param, "companyId");
-        }else if(companyField != null) {
-            id = companyField.getId();
+            name = MapUtil.getString(param, "name");
+            manager = MapUtil.getString(param, "manager");
+            tel = MapUtil.getString(param, "tel");
+            email = MapUtil.getString(param, "email");
+            memo = MapUtil.getString(param, "memo");
+            companyTypeId = MapUtil.getLong(param, "companyTypeId");
+            parentSectorId = MapUtil.getLong(param, "parentSectorId");
+            childSectorId = MapUtil.getLong(param, "childSectorId");
+            regionId = MapUtil.getLong(param, "regionId");
+            statusId = MapUtil.getLong(param, "statusId");
+            companyTypeName = MapUtil.getString(param, "companyTypeName");
+            parentSectorName = MapUtil.getString(param, "parentSectorName");
+            childSectorName = MapUtil.getString(param, "childSectorName");
+            regionName = MapUtil.getString(param, "regionName");
+            statusName = MapUtil.getString(param, "statusName");
+        }else if(companyFieldForm != null) {
+            id = companyFieldForm.getId();
+            name = companyFieldForm.getName();
+            manager = companyFieldForm.getManager();
+            tel = companyFieldForm.getTel();
+            email = companyFieldForm.getEmail();
+            memo = companyFieldForm.getMemo();
+            companyTypeId = companyFieldForm.getCompanyTypeId();
+            parentSectorId = companyFieldForm.getParentSectorId();
+            childSectorId = companyFieldForm.getChildSectorId();
+            regionId = companyFieldForm.getRegionId();
+            statusId = companyFieldForm.getStatusId();
+            companyTypeName = companyFieldForm.getCompanyTypeName();
+            parentSectorName = companyFieldForm.getParentSectorName();
+            childSectorName = companyFieldForm.getChildSectorName();
+            regionName = companyFieldForm.getRegionName();
+            statusName = companyFieldForm.getStatusName();
         }
-        Long companyFieldId = issueCompany.getCompanyField().getId();
+        if (issueCompany.getCompanyField() != null && issueCompany.getCompanyField().getId() != null) {
+            companyFieldId = issueCompany.getCompanyField().getId();
+        }
 
-        if (type == IssueHistoryType.ADD) { //異붽� �븷 寃쎌슦
+        if (type == IssueHistoryType.ADD && issueCompany.getCompanyField() != null) { //異붽� �븷 寃쎌슦
             description.append("<span translate=\"issue.issueCompanyAddHistory\">�뾽泥� �젙蹂닿� 異붽��릺�뿀�뒿�땲�떎. </span>");
             description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + issueCompany.getCompanyField().getName() + "</span>");
         } else if (type == IssueHistoryType.MODIFY) { //�닔�젙 �븷 寃쎌슦
             if (id != null && !companyFieldId.equals(id)) {
                 description.append("<span translate=\"issue.issueCompanyModifyHistory\">�뾽泥� �젙蹂닿� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("name") + "</span>");
+                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + name + "</span>");
+            } else {
+                if (companyFieldId.equals(id) && manager != null && (issueCompany.getManager() == null || !issueCompany.getManager().equals(manager))) {
+                    description.append("<span translate=\"issue.issueCompanyModifyManagerHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 �떞�떦�옄媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + manager + "</span>");
+                }
+                if (companyFieldId.equals(id) && tel != null && (issueCompany.getTel() == null || !issueCompany.getTel().equals(tel))) {
+                    description.append("<span translate=\"issue.issueCompanyModifyTelHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 �쟾�솕踰덊샇媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + tel + "</span>");
+                }
+                if (companyFieldId.equals(id) && email != null && (issueCompany.getEmail() == null || !issueCompany.getEmail().equals(email))) {
+                    description.append("<span translate=\"issue.issueCompanyModifyEmailHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 �씠硫붿씪�씠 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + email + "</span>");
+                }
+                if (companyFieldId.equals(id) && memo != null && (issueCompany.getMemo() == null || !issueCompany.getMemo().equals(memo))) {
+                    description.append("<span translate=\"issue.issueCompanyModifyMemoHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 鍮꾧퀬媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + memo + "</span>");
+                }
+                if (companyFieldId.equals(id) && companyTypeName != null && (issueCompany.getCompanyTypeId() == null || !issueCompany.getCompanyTypeId().equals(companyTypeId))) {
+                    description.append("<span translate=\"issue.issueCompanyModifyCompanyTypeHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 湲곗뾽援щ텇�씠 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + companyTypeName + "</span>");
+                }
+                if (companyFieldId.equals(id) && parentSectorName != null && (issueCompany.getParentSectorId() == null || !issueCompany.getParentSectorId().equals(parentSectorId))) {
+                    description.append("<span translate=\"issue.issueCompanyModifyParentSectorHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 �뾽醫�(��遺꾨쪟)�씠 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + parentSectorName + "</span>");
+                }
+                if (companyFieldId.equals(id) && childSectorName != null && (issueCompany.getChildSectorId() == null || !issueCompany.getChildSectorId().equals(childSectorId))) {
+                    description.append("<span translate=\"issue.issueCompanyModifyChildSectorHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 �뾽醫�(以묐텇瑜�)�씠 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + childSectorName + "</span>");
+                }
+                if (companyFieldId.equals(id) && statusName != null && (issueCompany.getStatusId() == null || !issueCompany.getStatusId().equals(statusId))) {
+                    description.append("<span translate=\"issue.issueCompanyModifyStatusHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 �긽�깭媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + statusName + "</span>");
+                }
+                if (companyFieldId.equals(id) && regionName != null && (issueCompany.getRegionId() == null || !issueCompany.getRegionId().equals(regionId))) {
+                    description.append("<span translate=\"issue.issueCompanyModifyRegionHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 吏��뿭�씠 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + regionName + "</span>");
+                }
             }
-            if (companyFieldId.equals(id) && param.get("manager") != null && (issueCompany.getManager() == null || !issueCompany.getManager().equals(param.get("manager")))) {
-                description.append("<span translate=\"issue.issueCompanyModifyManagerHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 �떞�떦�옄媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("manager") + "</span>");
-            }
-            if (companyFieldId.equals(id) && param.get("tel") != null && (issueCompany.getTel() == null || !issueCompany.getTel().equals(param.get("tel")))) {
-                description.append("<span translate=\"issue.issueCompanyModifyTelHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 �쟾�솕踰덊샇媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("tel") + "</span>");
-            }
-            if (companyFieldId.equals(id) && param.get("email") != null && (issueCompany.getEmail() == null || !issueCompany.getEmail().equals(param.get("email")))) {
-                description.append("<span translate=\"issue.issueCompanyModifyEmailHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 �씠硫붿씪�씠 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("email") + "</span>");
-            }
-            if (companyFieldId.equals(id) && param.get("memo") != null && (issueCompany.getMemo() == null || !issueCompany.getMemo().equals(param.get("memo")))) {
-                description.append("<span translate=\"issue.issueCompanyModifyMemoHistory\">&nbsp;>&nbsp;�뾽泥� �젙蹂댁쓽 鍮꾧퀬媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("memo") + "</span>");
-            }
+
         } else {
             description.append("<span translate=\"issue.issueCompanyRemoveHistory\">�뾽泥� �젙蹂닿� �궘�젣�릺�뿀�뒿�땲�떎. " + issueCompany.getCompanyField().getName() + "</span>");
             description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + issueCompany.getCompanyField().getName() + "</span>");
@@ -595,14 +669,33 @@
 
     // ISP �젙蹂� 蹂�寃� �젙蹂대�� 湲곕줉�븳�떎.
     @Override
-    public void detectIssueIsp(IssueHistoryType type, Map<String, Object> param, IspField ispField, IssueIsp issueIsp, StringBuilder description) {
+    public void detectIssueIsp(IssueHistoryType type, Map<String, Object> param, IspFieldForm ispFieldForm, IssueIsp issueIsp, StringBuilder description) {
+        Long ispFieldId = 0L;
         Long id = 0L;
+        String name = "";
+        String manager = "";
+        String tel = "";
+        String email = "";
+        String memo = "";
         if (param != null) {
-            id = MapUtil.getLong(param, "companyId");
-        } else if(ispField != null) {
-            id = ispField.getId();
+            id = MapUtil.getLong(param, "ispId");
+            name = MapUtil.getString(param, "name");
+            manager = MapUtil.getString(param, "manager");
+            tel = MapUtil.getString(param, "tel");
+            email = MapUtil.getString(param, "email");
+            memo = MapUtil.getString(param, "memo");
+        }else if(ispFieldForm != null) {
+            id = ispFieldForm.getId();
+            name = ispFieldForm.getName();
+            manager = ispFieldForm.getManager();
+            tel = ispFieldForm.getTel();
+            email = ispFieldForm.getEmail();
+            memo = ispFieldForm.getMemo();
         }
-        Long ispFieldId = issueIsp.getIspField().getId();
+
+        if (issueIsp.getIspField() != null && issueIsp.getIspField().getId() != null) {
+            ispFieldId = issueIsp.getIspField().getId();
+        }
 
         if (type == IssueHistoryType.ADD) {
             description.append("<span translate=\"issue.issueIspAddHistory\">ISP �젙蹂닿� 異붽��릺�뿀�뒿�땲�떎. </span>");
@@ -610,23 +703,24 @@
         } else if (type == IssueHistoryType.MODIFY) {
             if (id != null && !ispFieldId.equals(id)) { //�닔�젙 �븷 寃쎌슦
                 description.append("<span translate=\"issue.issueIspModifyHistory\">ISP �젙蹂닿� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("name") + "</span>");
-            }
-            if (ispFieldId.equals(id) && param.get("manager") != null && (issueIsp.getManager() == null || !issueIsp.getManager().equals(param.get("manager")))) {
-                description.append("<span translate=\"issue.issueIspModifyManagerHistory\">ISP �젙蹂댁쓽 �떞�떦�옄媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("manager") + "</span>");
-            }
-            if (ispFieldId.equals(id) && param.get("tel") != null && (issueIsp.getTel() == null || !issueIsp.getTel().equals(param.get("tel")))) {
-                description.append("<span translate=\"issue.issueIspModifyTelHistory\">ISP �젙蹂댁쓽 �쟾�솕踰덊샇媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("tel") + "</span>");
-            }
-            if (ispFieldId.equals(id) && param.get("email") != null && (issueIsp.getEmail() == null || !issueIsp.getEmail().equals(param.get("email")))) {
-                description.append("<span translate=\"issue.issueIspModifyEmailHistory\">ISP �젙蹂댁쓽 �씠硫붿씪�씠 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("email") + "</span>");
-            }
-            if (ispFieldId.equals(id) && param.get("memo") != null && (issueIsp.getMemo() == null || !issueIsp.getMemo().equals(param.get("memo")))) {
-                description.append("<span translate=\"issue.issueIspModifyMemoHistory\">ISP �젙蹂댁쓽 鍮꾧퀬媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("memo") + "</span>");
+                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + name + "</span>");
+            } else {
+                if (ispFieldId.equals(id) && manager != null && (issueIsp.getManager() == null || !issueIsp.getManager().equals(manager))) {
+                    description.append("<span translate=\"issue.issueIspModifyManagerHistory\">ISP �젙蹂댁쓽 �떞�떦�옄媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + manager + "</span>");
+                }
+                if (ispFieldId.equals(id) && tel != null && (issueIsp.getTel() == null || !issueIsp.getTel().equals(tel))) {
+                    description.append("<span translate=\"issue.issueIspModifyTelHistory\">ISP �젙蹂댁쓽 �쟾�솕踰덊샇媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + tel + "</span>");
+                }
+                if (ispFieldId.equals(id) && email != null && (issueIsp.getEmail() == null || !issueIsp.getEmail().equals(email))) {
+                    description.append("<span translate=\"issue.issueIspModifyEmailHistory\">ISP �젙蹂댁쓽 �씠硫붿씪�씠 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + email + "</span>");
+                }
+                if (ispFieldId.equals(id) && memo != null && (issueIsp.getMemo() == null || !issueIsp.getMemo().equals(memo))) {
+                    description.append("<span translate=\"issue.issueIspModifyMemoHistory\">ISP �젙蹂댁쓽 鍮꾧퀬媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + memo + "</span>");
+                }
             }
         } else {
             description.append("<span translate=\"issue.issueIspRemoveHistory\">ISP �젙蹂닿� �궘�젣�릺�뿀�뒿�땲�떎. " + issueIsp.getIspField().getName() + "</span>");
@@ -636,14 +730,33 @@
 
     // �샇�뒪�똿 �젙蹂� 蹂�寃� �젙蹂대�� 湲곕줉�븳�떎.
     @Override
-    public void detectIssueHosting(IssueHistoryType type, Map<String, Object> param, HostingField hostingField, IssueHosting issueHosting, StringBuilder description) {
+    public void detectIssueHosting(IssueHistoryType type, Map<String, Object> param, HostingFieldForm hostingFieldForm, IssueHosting issueHosting, StringBuilder description) {
+        Long hostingFieldId = 0L;
         Long id = 0L;
+        String name = "";
+        String manager = "";
+        String tel = "";
+        String email = "";
+        String memo = "";
         if (param != null) {
-            id = MapUtil.getLong(param, "companyId");
-        }else if(hostingField != null) {
-            id = hostingField.getId();
+            id = MapUtil.getLong(param, "hostingId");
+            name = MapUtil.getString(param, "name");
+            manager = MapUtil.getString(param, "manager");
+            tel = MapUtil.getString(param, "tel");
+            email = MapUtil.getString(param, "email");
+            memo = MapUtil.getString(param, "memo");
+        }else if(hostingFieldForm != null) {
+            id = hostingFieldForm.getId();
+            name = hostingFieldForm.getName();
+            manager = hostingFieldForm.getManager();
+            tel = hostingFieldForm.getTel();
+            email = hostingFieldForm.getEmail();
+            memo = hostingFieldForm.getMemo();
         }
-        Long hostingFieldId = issueHosting.getHostingField().getId();
+
+        if (issueHosting.getHostingField() != null && issueHosting.getHostingField().getId() != null) {
+            hostingFieldId = issueHosting.getHostingField().getId();
+        }
 
         if (type == IssueHistoryType.ADD) {
             description.append("<span translate=\"issue.issueHostingAddHistory\">�샇�뒪�똿 �젙蹂닿� 異붽��릺�뿀�뒿�땲�떎. </span>");
@@ -651,23 +764,24 @@
         }else if(type == IssueHistoryType.MODIFY){
             if(id != null && !hostingFieldId.equals(id)){ //�닔�젙 �븷 寃쎌슦
                 description.append("<span translate=\"issue.issueHostingModifyHistory\">�샇�뒪�똿 �젙蹂닿� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("name") + "</span>");
-            }
-            if(hostingFieldId.equals(id) && param.get("manager") != null && (issueHosting.getManager() == null || !issueHosting.getManager().equals(param.get("manager")))){
-                description.append("<span translate=\"issue.issueHostingModifyManagerHistory\">�샇�뒪�똿 �젙蹂댁쓽 �떞�떦�옄媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("manager") + "</span>");
-            }
-            if(hostingFieldId.equals(id) && param.get("tel") != null && (issueHosting.getTel() == null || !issueHosting.getTel().equals(param.get("tel")))){
-                description.append("<span translate=\"issue.issueHostingModifyTelHistory\">�샇�뒪�똿 �젙蹂댁쓽 �쟾�솕踰덊샇媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("tel") + "</span>");
-            }
-            if(hostingFieldId.equals(id) && param.get("email") != null && (issueHosting.getEmail() == null || !issueHosting.getEmail().equals(param.get("email")))){
-                description.append("<span translate=\"issue.issueHostingModifyEmailHistory\">�샇�뒪�똿 �젙蹂댁쓽 �씠硫붿씪�씠 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("email") + "</span>");
-            }
-            if(hostingFieldId.equals(id) && param.get("memo") != null && (issueHosting.getMemo() == null || !issueHosting.getMemo().equals(param.get("memo")))){
-                description.append("<span translate=\"issue.issueHostingModifyMemoHistory\">�샇�뒪�똿 �젙蹂댁쓽 鍮꾧퀬媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
-                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + param.get("memo") + "</span>");
+                description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + name + "</span>");
+            } else {
+                if(hostingFieldId.equals(id) && manager != null && (issueHosting.getManager() == null || !issueHosting.getManager().equals(manager))){
+                    description.append("<span translate=\"issue.issueHostingModifyManagerHistory\">�샇�뒪�똿 �젙蹂댁쓽 �떞�떦�옄媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + manager + "</span>");
+                }
+                if(hostingFieldId.equals(id) && tel != null && (issueHosting.getTel() == null || !issueHosting.getTel().equals(tel))){
+                    description.append("<span translate=\"issue.issueHostingModifyTelHistory\">�샇�뒪�똿 �젙蹂댁쓽 �쟾�솕踰덊샇媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + tel + "</span>");
+                }
+                if(hostingFieldId.equals(id) && email != null && (issueHosting.getEmail() == null || !issueHosting.getEmail().equals(email))){
+                    description.append("<span translate=\"issue.issueHostingModifyEmailHistory\">�샇�뒪�똿 �젙蹂댁쓽 �씠硫붿씪�씠 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + email + "</span>");
+                }
+                if(hostingFieldId.equals(id) && memo != null && (issueHosting.getMemo() == null || !issueHosting.getMemo().equals(memo))){
+                    description.append("<span translate=\"issue.issueHostingModifyMemoHistory\">�샇�뒪�똿 �젙蹂댁쓽 鍮꾧퀬媛� 蹂�寃쎈릺�뿀�뒿�땲�떎. </span>");
+                    description.append("<span class=\"text-primary bold\">&nbsp;>&nbsp;" + memo + "</span>");
+                }
             }
         } else {
             description.append("<span translate=\"issue.issueHostingRemoveHistory\">�샇�뒪�똿 �젙蹂닿� �궘�젣�릺�뿀�뒿�땲�떎. " + issueHosting.getHostingField().getName() + "</span>");
@@ -759,10 +873,7 @@
             // �씠�뒋 �쐞�뿕 愿�由ъ뿉 �떞�떦遺��꽌 蹂�寃� �젙蹂대�� �뾽�뜲�씠�듃 �븳�떎. - �떞�떦遺��꽌 蹂�寃�
             this.issueRiskService.modifyIssueRisk(issue, false, true, null);
             saveIssueRisk = true;
-        }
-
-        //  �떞�떦遺��꽌 �닔�뒗 媛숈쑝�굹 �떞�떦遺��꽌媛� �떖�씪議뚯쓣 寃쎌슦
-        if (issue.getIssueDepartments().size() > 0 && issueForm.getDepartmentIds().size() > 0) {
+        }else if (issue.getIssueDepartments().size() > 0 && issueForm.getDepartmentIds().size() > 0) {//  �떞�떦遺��꽌 �닔�뒗 媛숈쑝�굹 �떞�떦遺��꽌媛� �떖�씪議뚯쓣 寃쎌슦
             //  �씠�쟾 �떞�떦�옄 �몴�떆
             for (IssueDepartment issueDepartment : issue.getIssueDepartments()) {
                 boolean change = true;
@@ -852,6 +963,12 @@
             switch (customField.getCustomFieldType()) {
                 case INPUT :
                 case SINGLE_SELECT :
+                case NUMBER :
+                case DATETIME :
+                case IP_ADDRESS :
+                case EMAIL :
+                case SITE :
+                case TEL :
                     boolean existIssueCustomFieldValue = false;
 
                     for (IssueCustomFieldValue savedIssueCustomFieldValue : issue.getIssueCustomFieldValues()) {

--
Gitblit v1.8.0