From bcf1555957d606938b4e5e72aaeba8a2ab555947 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 화, 30 11월 2021 16:22:16 +0900
Subject: [PATCH] 대시보드 - 내 프로젝트 + 하위 프로젝트 같이 보여주는 기능

---
 src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java                                 |    4 
 src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java                                |   78 +++++++
 src/main/webapp/custom_components/widget/register-issue-widget/register-issue-widget.html         |    6 
 src/main/webapp/custom_components/widget/member-progress-widget/member-progress-widget.html       |   15 
 src/main/webapp/custom_components/widget/register-issue-widget/register-issue-widget.directive.js |    1 
 src/main/webapp/custom_components/widget/delay-issue-widget/delay-issue-widget.html               |    6 
 src/main/webapp/custom_components/widget/risk-issue-widget/risk-issue-widget.html                 |    6 
 src/main/java/kr/wisestone/owl/web/condition/WidgetCondition.java                                 |   27 ++
 src/main/java/kr/wisestone/owl/service/IssueService.java                                          |    2 
 src/main/webapp/custom_components/widget/my-assignee-issue-widget/my-assignee-issue-widget.html   |    6 
 src/main/webapp/i18n/ko/global.json                                                               |    1 
 src/main/resources/mybatis/query-template/widget-template.xml                                     |  434 +++++++++++++++++++++++++++++++++++++-----
 src/main/webapp/custom_components/widget/severity-issue-widget/severity-issue-widget.html         |    6 
 13 files changed, 526 insertions(+), 66 deletions(-)

diff --git a/src/main/java/kr/wisestone/owl/service/IssueService.java b/src/main/java/kr/wisestone/owl/service/IssueService.java
index 0458655..671e472 100644
--- a/src/main/java/kr/wisestone/owl/service/IssueService.java
+++ b/src/main/java/kr/wisestone/owl/service/IssueService.java
@@ -73,7 +73,7 @@
 
     void findPartner(Map<String, Object> resJsonData, Map<String, Object> params);
 
-    void findMailTargetAll(Map<String, Object> resJsonData, IssueCondition condition, Pageable pageable);
+    //void findMailTargetAll(Map<String, Object> resJsonData, IssueCondition condition, Pageable pageable);
 
     /*void findMailTargetCompany(Map<String, Object> resJsonData, Map<String, Object> params);
 
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 59a159b..84fdbff 100644
--- a/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java
+++ b/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java
@@ -2710,7 +2710,7 @@
         }
     }
 
-    @Override
+    /*@Override
     @Transactional
     public void findMailTargetAll(Map<String, Object> resJsonData, IssueCondition condition, Pageable pageable) {
         IssueVo issueVo = new IssueVo();
@@ -2746,7 +2746,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
diff --git a/src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java b/src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java
index 6e82dd0..4a8a84d 100644
--- a/src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java
+++ b/src/main/java/kr/wisestone/owl/service/impl/WidgetServiceImpl.java
@@ -7,15 +7,18 @@
 import kr.wisestone.owl.constant.MsgConstants;
 import kr.wisestone.owl.domain.IssueStatus;
 import kr.wisestone.owl.domain.Project;
+import kr.wisestone.owl.domain.ProjectClosure;
+import kr.wisestone.owl.domain.UserDepartment;
 import kr.wisestone.owl.domain.enumType.ProjectType;
 import kr.wisestone.owl.exception.OwlRuntimeException;
 import kr.wisestone.owl.mapper.IssueMapper;
 import kr.wisestone.owl.mapper.WidgetMapper;
+import kr.wisestone.owl.repository.ProjectClosureRepository;
+import kr.wisestone.owl.repository.UserDepartmentRepository;
 import kr.wisestone.owl.service.*;
 import kr.wisestone.owl.util.*;
 import kr.wisestone.owl.vo.*;
 import kr.wisestone.owl.web.condition.IssueCondition;
-import kr.wisestone.owl.web.condition.ProjectCondition;
 import kr.wisestone.owl.web.condition.WidgetCondition;
 import kr.wisestone.owl.web.view.ExcelView;
 import org.apache.commons.lang3.StringUtils;
@@ -53,10 +56,19 @@
     private ProjectService projectService;
 
     @Autowired
+    private ProjectClosureService projectClosureService;
+
+    @Autowired
     private IssueStatusService issueStatusService;
 
     @Autowired
     private UserService userService;
+
+    @Autowired
+    private UserDepartmentService userDepartmentService;
+
+    @Autowired
+    private UserDepartmentRepository userDepartmentRepository;
 
     @Autowired
     protected MessageAccessor messageAccessor;
@@ -72,6 +84,9 @@
 
     @Autowired
     private UserWorkspaceService userWorkspaceService;
+
+    @Autowired
+    private ProjectClosureRepository projectClosureRepository;
 
 
     //  �쟾泥� �쐞�젽�쓣 議고쉶�븳�떎.
@@ -173,10 +188,50 @@
         widgetCondition.setProjectIds(projectIds);
         widgetCondition.setProjects(projects);
         widgetCondition.setLoginUserId(this.webAppUtil.getLoginId());
+        this.SetMyDepartmentId(widgetCondition); // 濡쒓렇�씤 �븳 �쑀��媛� �냽�빐�엳�뒗 遺��꽌
         widgetCondition.setCompleteDate(DateUtil.convertDateToStr(new Date()));
         widgetCondition.setWorkspaceId(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId());
 
         return widgetCondition;
+    }
+
+    void SetMyDepartmentId(WidgetCondition widgetCondition){
+        Long loginId = widgetCondition.getLoginUserId();
+        List<Long> myDepartmentIds = Lists.newArrayList();
+        List<UserDepartment> myDepartments = this.userDepartmentRepository.findByUserId(loginId);
+
+        if(myDepartments != null && myDepartments.size() > 0){
+            for(UserDepartment myDepartment : myDepartments){
+                myDepartmentIds.add(myDepartment.getDepartmentId());
+            }
+        }
+        widgetCondition.setMyDepartmentIds(myDepartmentIds);
+    }
+
+    void SetMeAndDownProjectIds(List<Long> parentProjectIds, WidgetCondition widgetCondition) {
+        List<Long> downProjectIds = Lists.newArrayList();
+        if(parentProjectIds != null && parentProjectIds.size() > 0){
+            for(Long parentProjectId : parentProjectIds){
+                List<ProjectClosure> projectClosures = this.projectClosureRepository.findByParentProjectId(parentProjectId); //�궡 �봽濡쒖젥�듃ID媛� �긽�쐞�봽濡쒖젥�듃�씤寃� �엳�뒗吏�
+                if(projectClosures != null && projectClosures.size() > 0){
+                    for(ProjectClosure projectClosure : projectClosures){
+                        if(projectClosure.getParentProject().getId().equals(parentProjectId)){
+                            downProjectIds.add(projectClosure.getProject().getId());
+                            //widgetCondition.setDownProjectIds(downProjectIds);
+                        }else{
+                            downProjectIds.clear();
+                        }
+                    }
+                }else{
+                    downProjectIds.clear();
+                }
+                widgetCondition.setDownProjectIds(downProjectIds);
+                List<Long> meAndDownProjectIds = Lists.newArrayList();
+                meAndDownProjectIds.addAll(widgetCondition.getProjectIds());
+                meAndDownProjectIds.addAll(widgetCondition.getDownProjectIds());
+                widgetCondition.setMeAndDownProjectIds(meAndDownProjectIds);
+            }
+        }
     }
 
     //  �쟾泥� �씠�뒋 �젙蹂대�� 議고쉶�븳�떎.
@@ -191,6 +246,8 @@
         Long completeIssue = 0L; // �셿猷뚮맂 �씠�뒋
 
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
+
             remainIssue = this.widgetMapper.countRemainIssue(widgetCondition);   //  �옍�뿬 �씠�뒋
             delayIssue = this.widgetMapper.countTodayDelayIssue(widgetCondition); //  吏��뿰�맂 �씠�뒋
             assigneeIssue = this.widgetMapper.countAssigneeIssue(widgetCondition);   //  �븷�떦�맂 �씠�뒋
@@ -221,6 +278,7 @@
         List<Map<String, Object>> progressingProjectDetails = Lists.newArrayList();
 
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
             if (this.userWorkspaceService.checkWorkspaceManager()) {
                 progressingProjectDetails = this.widgetMapper.findProjectProgressAll(widgetCondition);
             } else {
@@ -320,6 +378,7 @@
         Long totalCount = 0L;
 
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
             todayCount = this.widgetMapper.countTodayMyAssigneeIssue(widgetCondition);
             assigneeIssues = this.widgetMapper.findMyAssigneeIssue(widgetCondition);
             totalCount = this.widgetMapper.countMyAssigneeIssue(widgetCondition);
@@ -350,6 +409,8 @@
         Long totalCount = 0L;
 
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
+
             delayIssues = this.widgetMapper.findDelayIssue(widgetCondition);
             totalCount = this.widgetMapper.countDelayIssue(widgetCondition);
         }
@@ -396,6 +457,7 @@
         Long totalCount = 0L;
 
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
             todayCount = this.widgetMapper.countTodayRegisterIssue(widgetCondition);
             registerIssues = this.widgetMapper.findRegisterIssue(widgetCondition);
             totalCount = this.widgetMapper.countRegisterIssue(widgetCondition);
@@ -420,12 +482,13 @@
         Map<String, Object> results = this.makeWidgetConditionAllProject(widgetCondition, getWidgetCondition);
 
         if (widgetCondition.getProjectId() != null) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
             List<Map<String, Object>> projectMemberIssues = this.widgetMapper.findProjectMemberIssue(widgetCondition);
 
             for (Map<String, Object> projectMemberIssue : projectMemberIssues) {
                 Long completeCount = MapUtil.getLong(projectMemberIssue, "completeCount");
                 Long remainCount = MapUtil.getLong(projectMemberIssue, "remainCount");
-                projectMemberIssue.put("account", CommonUtil.decryptAES128(MapUtil.getString(projectMemberIssue, "account")));
+                //projectMemberIssue.put("account", CommonUtil.decryptAES128(MapUtil.getString(projectMemberIssue, "account")));
 
                 //  �봽濡쒖젥�듃 吏꾪뻾瑜� �젙蹂대�� 援ы븳�떎.
                 this.statisticsProject(completeCount, remainCount, projectMemberIssue, "projectProgressPercent");
@@ -449,6 +512,8 @@
         List<Map<String, Object>> assigneeRemainIssueMaps = Lists.newArrayList();
 
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
+
             registerCompleteIssueMaps = this.widgetMapper.findMyRegisterCompleteIssue(widgetCondition);
             registerRemainIssueMaps = this.widgetMapper.findMyRegisterRemainIssue(widgetCondition);
             assigneeCompleteIssueMaps = this.widgetMapper.findMyAssigneeCompleteIssue(widgetCondition);
@@ -524,6 +589,7 @@
         Long totalCount = 0L;
 
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
             //countChangeStatusAndAssigneeIssue = this.widgetMapper.countChangeStatusAndAssigneeIssue(widgetCondition);
             countChangeStatusAndDepartmentIssue = this.widgetMapper.countChangeStatusAndDepartmentIssue(widgetCondition);
             riskIssues = this.widgetMapper.findRiskIssue(widgetCondition);
@@ -614,6 +680,8 @@
         Long totalIssueCount = 0L;
 
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
+
             dateCounts = this.widgetMapper.findIssueComplete(widgetCondition);
             totalIssueCount = this.widgetMapper.countTotalIssue(widgetCondition);
         }
@@ -694,6 +762,7 @@
         List<Map<String, Object>> results = Lists.newArrayList();
 
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
             results = this.widgetMapper.findByStandIssueStatus(widgetCondition);
         }
 
@@ -720,6 +789,7 @@
         Map<String, Object> results = this.makeWidgetConditionAllProject(widgetCondition, getWidgetCondition);
 
         if (widgetCondition.getProjectId() != null) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
             List<Map<String, Object>> issueTypeIssues = this.widgetMapper.findByStandIssueType(widgetCondition);
             //  �씠�뒋 �젙蹂�
             results.put("issues", issueTypeIssues);
@@ -794,6 +864,8 @@
         Long totalCount = 0L;
 
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
+
             severityCounts = this.widgetMapper.countSeverityIssue(widgetCondition);
             severityIssues = this.widgetMapper.findSeverityIssues(widgetCondition);
             totalCount = this.widgetMapper.countSearchIssue(widgetCondition);
@@ -1053,6 +1125,7 @@
 
         //  �궡媛� �벑濡앺븳 �씠�뒋
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
             registerIssues = this.widgetMapper.findRegisterIssue(widgetCondition);
         }
 
@@ -1094,6 +1167,7 @@
         widgetCondition.setPageSize(totalCount.intValue());
 
         if (widgetCondition.getProjectIds().size() > 0) {
+            SetMeAndDownProjectIds(widgetCondition.getProjectIds(), widgetCondition);
             delayIssues = this.widgetMapper.findDelayIssue(widgetCondition);
         }
 
diff --git a/src/main/java/kr/wisestone/owl/web/condition/WidgetCondition.java b/src/main/java/kr/wisestone/owl/web/condition/WidgetCondition.java
index 1b0facc..f1eb706 100644
--- a/src/main/java/kr/wisestone/owl/web/condition/WidgetCondition.java
+++ b/src/main/java/kr/wisestone/owl/web/condition/WidgetCondition.java
@@ -13,9 +13,12 @@
  */
 public class WidgetCondition {
     private Long loginUserId;
+    private List<Long> myDepartmentIds; // �궡媛� �냽�빐�엳�뒗 遺��꽌 ID
     private Long workspaceId;
     private Long workflowId;
     private List<Long> projectIds;
+    private List<Long> downProjectIds;
+    private List<Long> meAndDownProjectIds;
     private String completeDate;
     private Integer page;
     private Integer pageSize;
@@ -43,6 +46,14 @@
         this.loginUserId = loginUserId;
     }
 
+    public List<Long> getMyDepartmentIds() {
+        return myDepartmentIds;
+    }
+
+    public void setMyDepartmentIds(List<Long> myDepartmentIds) {
+        this.myDepartmentIds = myDepartmentIds;
+    }
+
     public Long getWorkspaceId() {
         return workspaceId;
     }
@@ -68,6 +79,22 @@
         this.projectIds.add(projectId);
     }
 
+    public List<Long> getDownProjectIds() {
+        return downProjectIds;
+    }
+
+    public void setDownProjectIds(List<Long> downProjectIds) {
+        this.downProjectIds = downProjectIds;
+    }
+
+    public List<Long> getMeAndDownProjectIds() {
+        return meAndDownProjectIds;
+    }
+
+    public void setMeAndDownProjectIds(List<Long> meAndDownProjectIds) {
+        this.meAndDownProjectIds = meAndDownProjectIds;
+    }
+
     public String getCompleteDate() {
         return completeDate;
     }
diff --git a/src/main/resources/mybatis/query-template/widget-template.xml b/src/main/resources/mybatis/query-template/widget-template.xml
index a460ac6..37ab4d1 100644
--- a/src/main/resources/mybatis/query-template/widget-template.xml
+++ b/src/main/resources/mybatis/query-template/widget-template.xml
@@ -15,9 +15,9 @@
         WHERE EXISTS(SELECT 1 FROM issue_status iss WHERE iss.issue_status_type != 'CLOSE' AND i.issue_status_id =
         iss.id)
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -31,9 +31,9 @@
         COUNT(i.id) FROM issue i where
         exists(select 1 from issue_status iss where iss.id = i.issue_status_id and iss.issue_status_type != 'CLOSE')
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -42,8 +42,8 @@
         AND i.complete_date <![CDATA[ < ]]> #{completeDate}
     </select>
 
-    <!--    �븷�떦 �씠�뒋 媛쒖닔   -->
-    <select id="countAssigneeIssue" resultType="java.lang.Long"
+    <!--    �븷�떦 �씠�뒋 媛쒖닔 - �떞�떦�옄 踰꾩쟾  -->
+    <!--<select id="countAssigneeIssue" resultType="java.lang.Long"
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
         SELECT
         COUNT(i.id) FROM issue i
@@ -57,6 +57,42 @@
                 </foreach>
             </when>
         </choose>
+        <choose>
+            <when test="downProjectIds.size != 0">
+                OR i.project_id IN
+                <foreach collection="downProjectIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+        </choose>
+    </select>-->
+
+    <!--    �븷�떦 �씠�뒋 媛쒖닔 - �떞�떦遺��꽌 踰꾩쟾  -->
+    <select id="countAssigneeIssue" resultType="java.lang.Long"
+            parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
+        SELECT
+        COUNT(i.id) FROM issue i
+        WHERE EXISTS(SELECT 1 FROM issue_department id WHERE id.issue_id = i.id
+        <choose>
+            <when test="myDepartmentIds.size != 0">
+                AND id.department_id IN
+                <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+            <otherwise>
+                AND 1 != 1
+            </otherwise>
+        </choose>
+        ) AND EXISTS(SELECT 1 FROM issue_status iss WHERE iss.id = i.issue_status_id and iss.issue_status_type != 'CLOSE')
+        <choose>
+            <when test="meAndDownProjectIds.size != 0">
+                AND i.project_id IN
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+        </choose>
     </select>
 
     <!--    �궡媛� �삤�뒛 �벑濡앺븳 �씠�뒋 媛쒖닔 -->
@@ -66,9 +102,9 @@
         count(i.id) as todayCount from issue i where
         i.register_id = #{loginUserId}
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -77,7 +113,7 @@
     </select>
 
     <!--    誘명븷�떦 �씠�뒋 媛쒖닔   -->
-    <select id="countNoAssigneeIssue" resultType="java.lang.Long"
+    <!--<select id="countNoAssigneeIssue" resultType="java.lang.Long"
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
         SELECT
         COUNT(DISTINCT i.id) FROM issue i
@@ -85,15 +121,35 @@
         WHERE
         EXISTS(select 1 from issue_status iss where iss.id = i.issue_status_id and iss.issue_status_type != 'CLOSE')
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
         </choose>
         AND iu.id IS NULL
+    </select>-->
+
+    <!--    誘명븷�떦 �씠�뒋 媛쒖닔 (�떞�떦遺��꽌 踰꾩쟾)  -->
+    <select id="countNoAssigneeIssue" resultType="java.lang.Long"
+            parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
+        SELECT
+        COUNT(DISTINCT i.id) FROM issue i
+        LEFT OUTER JOIN issue_department id ON id.issue_id = i.id
+        WHERE
+        EXISTS(select 1 from issue_status iss where iss.id = i.issue_status_id and iss.issue_status_type != 'CLOSE')
+        <choose>
+            <when test="meAndDownProjectIds.size != 0">
+                AND i.project_id IN
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+        </choose>
+        AND id.id IS NULL
     </select>
+
     <!--    �셿猷뚮맂 �씠�뒋 媛쒖닔   -->
     <select id="countCompleteIssue" resultType="java.lang.Long"
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
@@ -102,9 +158,9 @@
         inner join issue_status iss on iss.id = i.issue_status_id
         where iss.issue_status_type = 'CLOSE'
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -124,9 +180,9 @@
         where iss.issue_status_type = 'CLOSE'
         and i.modify_date between #{searchStartDate} and #{searchEndDate}
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -141,9 +197,9 @@
         inner join issue_status iss on iss.id = i.issue_status_id
         where 1=1
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -155,8 +211,8 @@
 
     <!--    3踰� �쐞�젽 �떆�옉 -->
 
-    <!--    吏꾪뻾以묒씤 �봽濡쒖젥�듃 �쁽�솴    -->
-    <select id="findProjectProgress" resultType="java.util.HashMap"
+    <!--    吏꾪뻾以묒씤 �봽濡쒖젥�듃 �쁽�솴 (�떞�떦�옄 踰꾩쟾)   -->
+    <!--<select id="findProjectProgress" resultType="java.util.HashMap"
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
         select
         p.id as id,
@@ -191,10 +247,48 @@
             </when>
         </choose>
         GROUP by p.id
+    </select>-->
+
+    <!--    吏꾪뻾以묒씤 �봽濡쒖젥�듃 �쁽�솴 (�떞�떦遺��꽌 踰꾩쟾)   -->
+    <select id="findProjectProgress" resultType="java.util.HashMap"
+            parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
+        select
+        p.id as id,
+        p.name as name,
+        replace(p.start_date, "-", ".") as startDate,
+        replace(p.end_date, "-", ".") as endDate,
+        count(case when iss.issue_status_type = 'CLOSE' THEN 1 END) as 'close',
+        count(case when iss.issue_status_type != 'CLOSE' THEN 1 END) as 'remain',
+        (select concat(u.name, "%", u.account, "%", u.profile) from user u
+        inner join project_role_user pru on pru.user_id = u.id
+        inner join project_role pr on pr.id = pru.project_role_id
+        where pr.project_id = p.id and pr.role_type = '02'
+        ) as managerInfo
+        ,
+        (
+        select count(distinct(d.id)) from department d
+        inner join project_role_department prd on prd.department_id = d.id
+        inner join project_role pr on pr.id = prd.project_role_id
+        where pr.project_id = p.id and pr.role_type = '01'
+        ) as teamCount
+        from
+        project p
+        left outer join issue i on p.id = i.project_id
+        left outer join issue_status iss on iss.id = i.issue_status_id
+        WHERE 1=1
+        <choose>
+            <when test="meAndDownProjectIds.size != 0">
+                AND p.id IN
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+        </choose>
+        GROUP by p.id
     </select>
 
-    <!--    吏꾪뻾以묒씤 �봽濡쒖젥�듃 �쁽�솴(�쟾泥�)    -->
-    <select id="findProjectProgressAll" resultType="java.util.HashMap"
+    <!--    吏꾪뻾以묒씤 �봽濡쒖젥�듃 �쁽�솴(�쟾泥�) (�떞�떦�옄 踰꾩쟾)   -->
+    <!--<select id="findProjectProgressAll" resultType="java.util.HashMap"
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
         select
         p.id as id,
@@ -221,6 +315,36 @@
         left outer join issue_status iss on iss.id = i.issue_status_id
         WHERE 1=1
         GROUP by p.id
+    </select>-->
+
+    <!--    吏꾪뻾以묒씤 �봽濡쒖젥�듃 �쁽�솴(�쟾泥�) (�떞�떦遺��꽌 踰꾩쟾)   -->
+    <select id="findProjectProgressAll" resultType="java.util.HashMap"
+            parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
+        select
+        p.id as id,
+        p.name as name,
+        replace(p.start_date, "-", ".") as startDate,
+        replace(p.end_date, "-", ".") as endDate,
+        count(case when iss.issue_status_type = 'CLOSE' THEN 1 END) as 'close',
+        count(case when iss.issue_status_type != 'CLOSE' THEN 1 END) as 'remain',
+        (select concat(u.name, "%", u.account, "%", u.profile) from user u
+        inner join project_role_user pru on pru.user_id = u.id
+        inner join project_role pr on pr.id = pru.project_role_id
+        where pr.project_id = p.id and pr.role_type = '02'
+        ) as managerInfo
+        ,
+        (
+        select count(distinct(d.id)) from department d
+          inner join project_role_department prd on prd.department_id = d.id
+          inner join project_role pr on pr.id = prd.project_role_id
+        where pr.project_id = p.id and pr.role_type = '01'
+        ) as teamCount
+        from
+        project p
+        left outer join issue i on p.id = i.project_id
+        left outer join issue_status iss on iss.id = i.issue_status_id
+        WHERE 1=1
+        GROUP by p.id
     </select>
 
     <!--    3踰� �쐞�젽 �걹 -->
@@ -228,8 +352,8 @@
 
     <!--    4踰� �쐞�젽 �떆�옉 -->
 
-    <!--    �궡媛� �삤�뒛 �븷�떦諛쏆� �씠�뒋 媛쒖닔 -->
-    <select id="countTodayMyAssigneeIssue" resultType="java.lang.Long"
+    <!--�궡媛� �삤�뒛 �븷�떦諛쏆� �씠�뒋 媛쒖닔 - �떞�떦�옄 踰꾩쟾-->
+    <!--<select id="countTodayMyAssigneeIssue" resultType="java.lang.Long"
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
         select
         count(i.id) as todayCount from issue i where
@@ -243,10 +367,39 @@
                 </foreach>
             </when>
         </choose>
+    </select>-->
+
+    <!--    �궡媛� �삤�뒛 �븷�떦諛쏆� �씠�뒋 媛쒖닔 - �떞�떦遺��꽌 踰꾩쟾 -->
+    <select id="countTodayMyAssigneeIssue" resultType="java.lang.Long"
+            parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
+        select
+        count(i.id) as todayCount from issue i where
+        exists(select 1 from issue_department id where id.issue_id = i.id
+        <choose>
+            <when test="myDepartmentIds.size != 0">
+                AND id.department_id IN
+                <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+            <otherwise>
+                AND 1 != 1
+            </otherwise>
+        </choose>
+        and id.register_date
+        BETWEEN (CURDATE()) AND (CURDATE() + INTERVAL 1 DAY))
+        <choose>
+            <when test="meAndDownProjectIds.size != 0">
+                AND i.project_id IN
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+        </choose>
     </select>
 
-    <!--    �궡媛� �떞�떦�븯�뒗 �씠�뒋 媛쒖닔  -->
-    <select id="countMyAssigneeIssue" resultType="java.lang.Long"
+    <!--    �궡媛� �떞�떦�븯�뒗 �씠�뒋 媛쒖닔 - �떞�떦�옄  -->
+    <!--<select id="countMyAssigneeIssue" resultType="java.lang.Long"
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
         select
         count(distinct i.id)
@@ -264,10 +417,41 @@
         </choose>
         and iu.user_id = #{loginUserId}
         and iss.issue_status_type != 'CLOSE'
+    </select>-->
+
+    <!--    �궡媛� �떞�떦�븯�뒗 �씠�뒋 媛쒖닔 - �떞�떦遺��꽌  -->
+    <select id="countMyAssigneeIssue" resultType="java.lang.Long"
+            parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
+        select
+        count(distinct i.id)
+        from issue i
+        inner join issue_department id on id.issue_id = i.id
+        inner join issue_status iss on iss.id = i.issue_status_id
+        WHERE 1=1
+        <choose>
+            <when test="meAndDownProjectIds.size != 0">
+                AND i.project_id IN
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+        </choose>
+        <choose>
+            <when test="myDepartmentIds.size != 0">
+                AND id.department_id IN
+                <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+            <otherwise>
+                AND 1 != 1
+            </otherwise>
+        </choose>
+        And iss.issue_status_type != 'CLOSE'
     </select>
 
     <!--    �궡媛� �떞�떦�븯�뒗 �씠�뒋  -->
-    <select id="findMyAssigneeIssue" resultType="java.util.HashMap"
+    <!--<select id="findMyAssigneeIssue" resultType="java.util.HashMap"
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
         select
         distinct i.id as id,
@@ -292,6 +476,50 @@
             </when>
         </choose>
         and iu.user_id = #{loginUserId}
+        and iss.issue_status_type != 'CLOSE'
+        GROUP by i.id
+        <if test="page != null and !page.equals('')">
+            limit #{pageSize} offset #{page};
+        </if>
+    </select>-->
+
+    <!--    �궡媛� �떞�떦�븯�뒗 �씠�뒋 - �떞�떦遺��꽌  -->
+    <select id="findMyAssigneeIssue" resultType="java.util.HashMap"
+            parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
+        select
+        distinct i.id as id,
+        i.title as title,
+        p.name as projectName,
+        CONCAT(p.project_key, '-', i.issue_number) AS issueKey,
+        p.project_key as projectKey,
+        i.issue_number as issueNumber,
+        iss.name as issueStatusName,
+        replace(i.complete_date, "-", ".") as completeDate,
+        replace(SUBSTRING(i.register_date, 1, 10), "-", ".") as registerDate
+        from issue i
+        inner join issue_department id on id.issue_id = i.id
+        inner join issue_status iss on iss.id = i.issue_status_id
+        inner join project p on p.id = i.project_id
+        WHERE 1=1
+        <choose>
+            <when test="meAndDownProjectIds.size != 0">
+                AND p.id IN
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+        </choose>
+        <choose>
+            <when test="myDepartmentIds.size != 0">
+                AND id.department_id IN
+                <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+            <otherwise>
+                AND 1 != 1
+            </otherwise>
+        </choose>
         and iss.issue_status_type != 'CLOSE'
         GROUP by i.id
         <if test="page != null and !page.equals('')">
@@ -334,9 +562,9 @@
         inner join issue_status iss on iss.id = i.issue_status_id
         where iss.issue_status_type != 'CLOSE'
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -386,9 +614,9 @@
         inner join project p on p.id = i.project_id
         where iss.issue_status_type != 'CLOSE'
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND p.id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -409,9 +637,9 @@
         inner join issue_status iss on iss.id = i.issue_status_id
         where iss.issue_status_type != 'CLOSE'
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -433,6 +661,7 @@
             , replace(i.start_date, "-", ".") as startDate
             , replace(i.complete_date, "-", ".") as completeDate
             , i.title as title
+            , p.name as projectName
             , iss.name as issueStatusName
             , i.issue_number as issueNumber
             , p.project_key as projectKey
@@ -446,9 +675,9 @@
         WHERE 1=1
         AND i.register_id = #{loginUserId}
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -477,9 +706,9 @@
             AND EXISTS (SELECT 1 FROM issue_status iss WHERE iss.id = i.issue_status_id AND iss.issue_status_type != 'CLOSE')
         </if>
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -502,6 +731,7 @@
             , replace(i.start_date, "-", ".") as startDate
             , replace(i.complete_date, "-", ".") as completeDate
             , i.title as title
+            , p.name as projectName
             , iss.name as issueStatusName
             , i.issue_number as issueNumber
             , p.project_key as projectKey
@@ -514,9 +744,9 @@
         </if>
         WHERE 1=1
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -540,9 +770,9 @@
         </if>
         WHERE 1=1
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -577,9 +807,9 @@
         inner join issue_status iss on iss.id = i.issue_status_id
         where 1=1
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -592,7 +822,7 @@
     <!--    11踰� �쐞�젽 �떆�옉 -->
 
     <!--    硫ㅻ쾭蹂� 吏꾪뻾瑜� -->
-    <select id="findProjectMemberIssue" resultType="java.util.HashMap"
+    <!--<select id="findProjectMemberIssue" resultType="java.util.HashMap"
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
         select
         u.name, u.profile, u.account,
@@ -614,7 +844,42 @@
         inner join project_role pr on pr.id = pru.project_role_id
         inner join project p on p.id = pr.project_id
         where p.id = #{projectId} and p.status = '02'
+    </select>-->
+
+    <!--  �떞�떦遺��꽌蹂� 吏꾪뻾瑜� -->
+    <select id="findProjectMemberIssue" resultType="java.util.HashMap"
+            parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
+        select
+        d.department_name as departmentName,
+        (select count(*) from issue i
+        inner join issue_department id on id.issue_id = i.id
+        inner join issue_status iss on iss.id = i.issue_status_id
+        where id.department_id = d.id and i.project_id = p.id and iss.issue_status_type = 'CLOSE') as completeCount,
+        (select count(*) from issue i
+        inner join issue_department id on id.issue_id = i.id
+        inner join issue_status iss on iss.id = i.issue_status_id
+        where id.department_id = d.id and i.project_id = p.id and iss.issue_status_type != 'CLOSE') as remainCount,
+        (select count(*) from issue i
+        inner join issue_department id on id.issue_id = i.id
+        inner join issue_status iss on iss.id = i.issue_status_id
+        where id.department_id = d.id and i.project_id = p.id and iss.issue_status_type != 'CLOSE' and i.complete_date is not null and i.complete_date <![CDATA[ < ]]> now()) as delayCount
+        from
+        department d
+        inner join project_role_department prd on prd.department_id = d.id
+        inner join project_role pr on pr.id = prd.project_role_id
+        inner join project p on p.id = pr.project_id
+        WHERE
+        <choose>
+            <when test="meAndDownProjectIds.size != 0">
+                p.id IN
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+        </choose>
+        and p.status = '02';
     </select>
+
 
     <!--    11踰� �쐞�젽 �걹 -->
 
@@ -629,9 +894,9 @@
         'CLOSE') AND
         i.register_id = #{loginUserId}
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -647,9 +912,9 @@
         'CLOSE')
         AND i.register_id = #{loginUserId}
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -658,7 +923,7 @@
     </select>
 
     <!--    �떞�떦�븳 �씠�뒋 以� �셿猷� 媛��닔  -->
-    <select id="findMyAssigneeCompleteIssue" resultType="java.util.HashMap"
+    <!--<select id="findMyAssigneeCompleteIssue" resultType="java.util.HashMap"
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
         select i.project_id as projectId, count(distinct i.id) as issueCount from issue i
         inner join issue_user iu on iu.issue_id = i.id
@@ -673,10 +938,39 @@
             </when>
         </choose>
         group by i.project_id
+    </select>-->
+
+    <!--    �떞�떦�븳 �씠�뒋 以� �셿猷� 媛��닔  - �떞�떦遺��꽌 -->
+    <select id="findMyAssigneeCompleteIssue" resultType="java.util.HashMap"
+            parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
+        select i.project_id as projectId, count(distinct i.id) as issueCount from issue i
+        inner join issue_department id on id.issue_id = i.id
+        inner join issue_status iss on iss.id = i.issue_status_id
+        <choose>
+            <when test="myDepartmentIds.size != 0">
+                AND id.department_id IN
+                <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+            <otherwise>
+                AND 1 != 1
+            </otherwise>
+        </choose>
+        and iss.issue_status_type = 'CLOSE'
+        <choose>
+            <when test="meAndDownProjectIds.size != 0">
+                AND i.project_id IN
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+        </choose>
+        group by i.project_id
     </select>
 
     <!--    �떞�떦�븳 �씠�뒋 以� 吏꾪뻾 媛��닔  -->
-    <select id="findMyAssigneeRemainIssue" resultType="java.util.HashMap"
+    <!--<select id="findMyAssigneeRemainIssue" resultType="java.util.HashMap"
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
         select i.project_id as projectId, count(distinct i.id) as issueCount from issue i
         inner join issue_user iu on iu.issue_id = i.id
@@ -686,6 +980,35 @@
             <when test="projectIds.size != 0">
                 AND i.project_id IN
                 <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+        </choose>
+        group by i.project_id
+    </select>-->
+
+    <!--    �떞�떦�븳 �씠�뒋 以� 吏꾪뻾 媛��닔  - �떞�떦遺��꽌 -->
+    <select id="findMyAssigneeRemainIssue" resultType="java.util.HashMap"
+            parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
+        select i.project_id as projectId, count(distinct i.id) as issueCount from issue i
+        inner join issue_department id on id.issue_id = i.id
+        inner join issue_status iss on iss.id = i.issue_status_id
+        where iss.issue_status_type != 'CLOSE'
+        <choose>
+            <when test="myDepartmentIds.size != 0">
+                id.department_id IN
+                <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")">
+                    #{item}
+                </foreach>
+            </when>
+            <otherwise>
+                AND 1 != 1
+            </otherwise>
+        </choose>
+        <choose>
+            <when test="meAndDownProjectIds.size != 0">
+                AND i.project_id IN
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -723,9 +1046,9 @@
         WHERE w.id = #{workspaceId}
         AND iss.issue_status_type != 'CLOSE'
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -737,6 +1060,7 @@
             parameterType="kr.wisestone.owl.web.condition.WidgetCondition">
         SELECT i.title AS title,
         s.name AS severityName,
+        p.name AS projectName,
         s.color AS severityColor,
         replace(i.start_date, "-", ".") AS startDate,
         replace(i.complete_date, "-", ".")  AS completeDate,
@@ -753,9 +1077,9 @@
         AND s.id = #{severityId}
         AND iss.issue_status_type != 'CLOSE'
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
@@ -778,9 +1102,9 @@
         AND s.id = #{severityId}
         AND iss.issue_status_type != 'CLOSE'
         <choose>
-            <when test="projectIds.size != 0">
+            <when test="meAndDownProjectIds.size != 0">
                 AND i.project_id IN
-                <foreach collection="projectIds" item="item" index="index" separator="," open="(" close=")">
+                <foreach collection="meAndDownProjectIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
                 </foreach>
             </when>
diff --git a/src/main/webapp/custom_components/widget/delay-issue-widget/delay-issue-widget.html b/src/main/webapp/custom_components/widget/delay-issue-widget/delay-issue-widget.html
index a5667bc..ea6a6a0 100644
--- a/src/main/webapp/custom_components/widget/delay-issue-widget/delay-issue-widget.html
+++ b/src/main/webapp/custom_components/widget/delay-issue-widget/delay-issue-widget.html
@@ -40,6 +40,9 @@
                         <th class="text-center width-80-p" translate="dashboard.delayDate">
                             吏��뿰�씪
                         </th>
+                        <th class="text-center" translate="common.projectName">
+                            �봽濡쒖젥�듃
+                        </th>
                         <th class="text-center" translate="issue.issueTitle">
                             �씠�뒋 �젣紐�
                         </th>
@@ -56,6 +59,9 @@
                         <td class="text-center">
                             <span class="text-danger">+{{issue.delayDay}}</span>
                         </td>
+                        <td class="text-center">
+                            {{issue.projectName}}
+                        </td>
                         <td class="text-left titlename cursor">
                             <span ng-click="fn.moveIssue(issue)">{{issue.title}}</span>
                         </td>
diff --git a/src/main/webapp/custom_components/widget/member-progress-widget/member-progress-widget.html b/src/main/webapp/custom_components/widget/member-progress-widget/member-progress-widget.html
index 0bade0a..8ea0dd9 100644
--- a/src/main/webapp/custom_components/widget/member-progress-widget/member-progress-widget.html
+++ b/src/main/webapp/custom_components/widget/member-progress-widget/member-progress-widget.html
@@ -42,8 +42,11 @@
                             <table class="table table-dash table-bordered width600 table-layout-fixed">
                                 <thead>
                                 <tr>
-                                    <th class="text-center" translate="dashboard.teamMember">
+                                    <!--<th class="text-center" translate="dashboard.teamMember">
                                         ���썝
+                                    </th>-->
+                                    <th class="text-center" translate="dashboard.teamDepartment">
+                                        �떞�떦遺��꽌
                                     </th>
                                     <th class="text-center" translate="dashboard.progressPercent">
                                         吏꾪뻾瑜�
@@ -62,23 +65,23 @@
                                         <div class="os-dropdown-trigger os-dropdown-position-left user-with-avatar"
                                              owl-profile-over>
                                                     <span class="avatar">
-                                                        <img alt="" ng-src="{{member.profile}}">&nbsp;{{member.name}}
+                                                        {{member.departmentName}}
                                                     </span>
                                             <div class="os-dropdown light message-list">
-                                                <ul>
+                                                <!--<ul>
                                                     <li>
                                                         <a>
                                                             <div class="message-content">
                                                                 <h6 class="message-from">
-                                                                    {{member.name}}
+                                                                    {{member.departmentName}}
                                                                 </h6>
                                                                 <h6 class="message-title">
                                                                     {{member.account}}
-                                                                </h6>
+                                                                </h6>&ndash;&gt;
                                                             </div>
                                                         </a>
                                                     </li>
-                                                </ul>
+                                                </ul>-->
                                             </div>
                                         </div>
                                     </td>
diff --git a/src/main/webapp/custom_components/widget/my-assignee-issue-widget/my-assignee-issue-widget.html b/src/main/webapp/custom_components/widget/my-assignee-issue-widget/my-assignee-issue-widget.html
index be644ed..1f66bb1 100644
--- a/src/main/webapp/custom_components/widget/my-assignee-issue-widget/my-assignee-issue-widget.html
+++ b/src/main/webapp/custom_components/widget/my-assignee-issue-widget/my-assignee-issue-widget.html
@@ -52,6 +52,9 @@
                         <th class="text-center width-80-p" translate="common.registrationDate">
                             �벑濡앹씪
                         </th>
+                        <th class="text-center" translate="common.projectName">
+                            �봽濡쒖젥�듃
+                        </th>
                         <th class="text-center" translate="issue.issueTitle">
                             �씠�뒋 �젣紐�
                         </th>
@@ -68,6 +71,9 @@
                         <td>
                             {{issue.registerDate}}
                         </td>
+                        <td class="text-center">
+                            {{issue.projectName}}
+                        </td>
                         <td class="text-left titlename cursor">
                             <span ng-click="fn.moveIssue(issue)">{{issue.title}}</span>
                         </td>
diff --git a/src/main/webapp/custom_components/widget/register-issue-widget/register-issue-widget.directive.js b/src/main/webapp/custom_components/widget/register-issue-widget/register-issue-widget.directive.js
index 01b0b09..a8bed13 100644
--- a/src/main/webapp/custom_components/widget/register-issue-widget/register-issue-widget.directive.js
+++ b/src/main/webapp/custom_components/widget/register-issue-widget/register-issue-widget.directive.js
@@ -69,6 +69,7 @@
                                 if (result.data.message.status === "success") {
                                     $scope.vm.page.selectedPage = currentPage + 1;
                                     $scope.vm.registerIssueWidget.issues = result.data.registerIssueWidget.issues;
+                                    $scope.vm.registerIssueWidget.issues.myProjectName = $rootScope.workProject.name;
                                 }
                                 else {
                                     SweetAlert.error($filter("translate")("dashboard.failedToListOfIssueRegisteredLookup"), result.data.message.message); // �궡媛� �벑濡앺븳 �씠�뒋 紐⑸줉 議고쉶 �떎�뙣
diff --git a/src/main/webapp/custom_components/widget/register-issue-widget/register-issue-widget.html b/src/main/webapp/custom_components/widget/register-issue-widget/register-issue-widget.html
index 67c1042..3705388 100644
--- a/src/main/webapp/custom_components/widget/register-issue-widget/register-issue-widget.html
+++ b/src/main/webapp/custom_components/widget/register-issue-widget/register-issue-widget.html
@@ -52,6 +52,9 @@
                         <th class="text-center width-120-p" translate="common.status">
                             �긽�깭
                         </th>
+                        <th class="text-center" translate="common.projectName">
+                            �봽濡쒖젥�듃
+                        </th>
                         <th class="text-center" translate="issue.issueTitle">
                             �씠�뒋 �젣紐�
                         </th>
@@ -65,6 +68,9 @@
                         <td class="text-center">
                             {{issue.issueStatusName}}
                         </td>
+                        <td class="text-center">
+                            {{issue.projectName}}
+                        </td>
                         <td class="text-left titlename cursor">
                             <span ng-click="fn.moveIssue(issue)">{{issue.title}}</span>
                         </td>
diff --git a/src/main/webapp/custom_components/widget/risk-issue-widget/risk-issue-widget.html b/src/main/webapp/custom_components/widget/risk-issue-widget/risk-issue-widget.html
index 60c51cc..7bd7777 100644
--- a/src/main/webapp/custom_components/widget/risk-issue-widget/risk-issue-widget.html
+++ b/src/main/webapp/custom_components/widget/risk-issue-widget/risk-issue-widget.html
@@ -54,6 +54,9 @@
                         <th class="text-center width-80-p" translate="dashboard.division">
                             援щ텇
                         </th>
+                        <th class="text-center" translate="common.projectName">
+                            �봽濡쒖젥�듃
+                        </th>
                         <th class="text-center" translate="issue.issueTitle">
                             �씠�뒋 �젣紐�
                         </th>
@@ -75,6 +78,9 @@
                                            ng-if="issue.changeIssueStatusType"></i>
                                     </span>
                         </td>
+                        <td class="text-center">
+                            {{issue.projectName}}
+                        </td>
                         <td class="text-left titlename cursor">
                             <span ng-click="fn.moveIssue(issue)">{{issue.title}}</span>
                         </td>
diff --git a/src/main/webapp/custom_components/widget/severity-issue-widget/severity-issue-widget.html b/src/main/webapp/custom_components/widget/severity-issue-widget/severity-issue-widget.html
index 47d3177..5929aa0 100644
--- a/src/main/webapp/custom_components/widget/severity-issue-widget/severity-issue-widget.html
+++ b/src/main/webapp/custom_components/widget/severity-issue-widget/severity-issue-widget.html
@@ -88,6 +88,9 @@
                         <th class="text-center width-120-p" translate="common.importance">
                             以묒슂�룄
                         </th>
+                        <th class="text-center width-120-p" translate="common.projectName">
+                            以묒슂�룄
+                        </th>
                         <th class="text-center" translate="issue.issueTitle">
                             �씠�뒋 �젣紐�
                         </th>
@@ -107,6 +110,9 @@
                                  {{issue.severityName}}
                             </span>
                         </td>
+                        <td class="text-center">
+                            {{issue.projectName}}
+                        </td>
                         <td class="text-left titlename cursor">
                             <span ng-click="fn.moveIssue(issue)">{{issue.title}}</span>
                         </td>
diff --git a/src/main/webapp/i18n/ko/global.json b/src/main/webapp/i18n/ko/global.json
index 6b4bf7a..302c2c5 100644
--- a/src/main/webapp/i18n/ko/global.json
+++ b/src/main/webapp/i18n/ko/global.json
@@ -19,6 +19,7 @@
         "admin": "愿�由ъ옄",
         "progressPercent": "吏꾪뻾瑜�",
         "teamMember": "���썝",
+        "teamDepartment": "�떞�떦遺��꽌",
         "assignedToMeIssue": "�굹�뿉寃� �븷�떦�맂 �씠�뒋",
         "assignedTodayIssue": "�삤�뒛 �븷�떦�맂 �씠�뒋",
         "progressingIssue": "吏꾪뻾以묒씤 �씠�뒋 紐⑸줉",

--
Gitblit v1.8.0