From 9c237ff6f08cb7a4121cac6c642660ced1045030 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 화, 21 12월 2021 11:16:02 +0900
Subject: [PATCH] - 트리구조 데이터 없을때 데이터 없음 표시 - 이슈 추가 시 담당부서가 워크플로우 '생성' 상태의 담당부서가 선택되는 기능

---
 src/main/resources/mybatis/query-template/project-template.xml |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mybatis/query-template/project-template.xml b/src/main/resources/mybatis/query-template/project-template.xml
index f5054ef..ed1a5fd 100644
--- a/src/main/resources/mybatis/query-template/project-template.xml
+++ b/src/main/resources/mybatis/query-template/project-template.xml
@@ -82,7 +82,7 @@
             AND p.name like CONCAT('%',#{name},'%')
         </if>
         <choose>
-            <when test="myDepartmentIds.size != 0">
+            <when test="myDepartmentIds != null and myDepartmentIds.size != 0">
                 AND prd.department_id IN
                 <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
@@ -187,7 +187,7 @@
         </if>
 
         <choose>
-            <when test="myDepartmentIds.size != 0">
+            <when test="myDepartmentIds != null and myDepartmentIds.size != 0">
                 AND prd.department_id IN
                 <foreach collection="myDepartmentIds" item="item" index="index" separator="," open="(" close=")">
                     #{item}
@@ -486,6 +486,17 @@
             AND p.name like CONCAT('%',#{name},'%')
         </if>
         <choose>
+            <when test="myDepartmentIds != null and myDepartmentIds.size != 0">
+                AND prd.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="statuses.size != 0">
                 AND p.status IN
                 <foreach collection="statuses" item="item" index="index" separator="," open="(" close=")">

--
Gitblit v1.8.0