From fd569a1654c1aacc1228d0650cd4b0dd90748328 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 금, 19 11월 2021 16:53:40 +0900
Subject: [PATCH] 이슈 - 담당부서 리스트 프로젝트에서 설정한 부서들만 보여지도록 수정

---
 src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 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 3b7419e..9f20fd4 100644
--- a/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java
+++ b/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java
@@ -114,6 +114,9 @@
     private UserService userService;
 
     @Autowired
+    private DepartmentService departmentService;
+
+    @Autowired
     private IssueCommentService issueCommentService;
 
     @Autowired
@@ -1806,13 +1809,14 @@
             Map<String, Priority> priorityMaps = new HashMap<>();   //  �슦�꽑 �닚�쐞 紐⑥쓬
             Map<String, Severity> severityMaps = new HashMap<>();   //  以묒슂�룄 紐⑥쓬
             Map<String, Object> userMaps = new HashMap<>(); //  �궗�슜�옄 紐⑥쓬
+            Map<String, Object> departmentMaps = new HashMap<>(); //  遺��꽌 紐⑥쓬
             Map<String, CustomField> customFieldMaps = new HashMap<>();
             Map<String, IssueStatus> issueStatusReadyMaps = new HashMap<>();   //  �긽�깭 �냽�꽦 '��湲�'�씤 �씠�뒋 �긽�깭
             Map<Long, Long> issueNumberMaps = new HashMap<>();  //  �씠�뒋 踰덊샇 紐⑥쓬
             Map<String, Long> issueTypeCustomFieldMaps = new HashMap<>(); //  �씠�뒋 ���엯 + �궗�슜�옄 �젙�쓽 �븘�뱶 �뿰寃� �젙蹂�
             Workspace workspace = this.workspaceService.getWorkspace(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId());  //  �씠�뒋瑜� �꽔�쑝�젮�뒗 �뾽臾� 怨듦컙
             //  �씠�뒋�쓽 二쇱슂 �냽�꽦�쓣 map �뿉 ���옣�븯�뿬 �뿊�� import �뿉�꽌 吏��젙�븳 ���긽(�씠�뒋 �냽�꽦)�쓣 鍮좊Ⅴ寃� 李얠쓣 �닔 �엳寃� �븳�떎.
-            this.IssueAttributeMapToList(projectMaps, issueTypeMaps, priorityMaps, severityMaps, userMaps, customFieldMaps, issueNumberMaps, issueTypeCustomFieldMaps, issueStatusReadyMaps);
+            this.IssueAttributeMapToList(projectMaps, issueTypeMaps, priorityMaps, severityMaps, userMaps, departmentMaps, customFieldMaps, issueNumberMaps, issueTypeCustomFieldMaps, issueStatusReadyMaps);
             //  0.237 - 0.230
 
             List<IssueForm> issueForms = Lists.newArrayList();
@@ -2005,7 +2009,7 @@
 
     //  �씠�뒋�쓽 二쇱슂 �냽�꽦�쓣 map �뿉 ���옣�븯�뿬 �뿊�� import �뿉�꽌 吏��젙�븳 ���긽(�씠�뒋 �냽�꽦)�쓣 鍮좊Ⅴ寃� 李얠쓣 �닔 �엳寃� �븳�떎.
     private void IssueAttributeMapToList(Map<String, Project> projectMaps, Map<String, IssueType> issueTypeMaps, Map<String, Priority> priorityMaps, Map<String, Severity> severityMaps,
-                                         Map<String, Object> userMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, Map<String, Long> issueTypeCustomFieldMaps, Map<String, IssueStatus> issueStatusReadyMaps) {
+                                         Map<String, Object> userMaps, Map<String, Object> departmentMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, Map<String, Long> issueTypeCustomFieldMaps, Map<String, IssueStatus> issueStatusReadyMaps) {
         //  �봽濡쒖젥�듃 �궎濡� 諛붾줈 李얠쓣 �닔 �엳寃� 以�鍮�
         List<Project> projects = this.projectService.findByWorkspaceId();
         List<Long> projectIds = Lists.newArrayList();
@@ -2031,6 +2035,14 @@
             }
 
             userMaps.put(project.getProjectKey(), userMap);
+
+            //  �봽濡쒖젥�듃�뿉 李몄뿬�븯�뒗 遺��꽌 �젙蹂�
+            List<Map<String, Object>> departments = this.departmentService.findProjectDepartment(project);
+            List<Long> departmentList = Lists.newArrayList();
+            //  遺��꽌 �젙蹂대�� ���옣
+            for (Map<String, Object> department : departments) {
+                departmentList.add(MapUtil.getLong(department, "departmentId"));
+            }
         }
 
         //  �씠�뒋 �쑀�삎�쓣 諛붾줈 李얠쓣 �닔 �엳寃� 以�鍮�

--
Gitblit v1.8.0