Browse Source

본부권한은 전제본부 다 나오도록, 팀 조회시 본인 부서코드 앞2자리와 같은 코드검색

SH 9 months ago
parent
commit
bb335a73d0
1 changed files with 2 additions and 6 deletions
  1. 2 6
      src/main/resources/sqlmap/mappers/cw/cw0623/CW06230001UMapper.xml

+ 2 - 6
src/main/resources/sqlmap/mappers/cw/cw0623/CW06230001UMapper.xml

@@ -24,12 +24,8 @@
 		  AND YEAR_HALF = #{half}
 		  AND GOAL_GBN = #{goalGbn}
 		  
-		<if test='goalGbn != null and goalGbn == "D"'>
-		  AND DETAIL_CD = #{pdeptCd}
-		</if>
-		  
 		<if test='goalGbn != null and goalGbn == "T"'>
-		  AND DETAIL_CD like #{pdeptCd} || '%'
+		  AND DETAIL_CD like SUBSTR(#{pdeptCd}, 1, 2) || '%'
 		</if>
 		
         ORDER BY YEAR_YY
@@ -180,7 +176,7 @@
 		</if>
 		
 		<if test='searchData4 != null and searchData4 == "T"'>
-		  AND GOAL_GBN = 'D' AND #{searchData3} LIKE DETAIL_CD || '%'
+		  AND GOAL_GBN = 'D' AND #{searchData3} LIKE SUBSTR(DETAIL_CD, 1, 2) || '%'
 		</if>
 		
         ORDER BY YEAR_YY