Browse Source

리스크점검사유등록
- 사용자별 프로젝트 권한 추가

SBK 1 year ago
parent
commit
3584c857b3
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/main/resources/sqlmap/mappers/co/co0102/CO01020001UMapper.xml

+ 7 - 0
src/main/resources/sqlmap/mappers/co/co0102/CO01020001UMapper.xml

@@ -109,6 +109,13 @@
 									 GROUP BY CMPN_CD, STD_YM, CC_CD, ADVENT
 								) D ON D.CMPN_CD = A.CMPN_CD AND D.STD_YM = A.STD_YM AND D.CC_CD = A.CC_CD
 					  LEFT JOIN CON_PJT_RESN E ON E.CMPN_CD = A.CMPN_CD AND E.STD_YM = A.STD_YM AND E.CC_CD = A.CC_CD
+					  JOIN 	(
+					  			SELECT DISTINCT B.CMPN_CD, A.CD_SITE 
+								  FROM WC_S_SITEAUTH@ERPSQL A 
+								  JOIN SM_COM_CMPN B ON B.MAP_CMPN_CD = A.CD_COMPANY
+								 WHERE B.CMPN_CD = #{cmpnCd}
+								   AND A.ID_USER LIKE CASE WHEN #{empNo} IN (SELECT SPEC_CD FROM SM_COM_COMMCD_D A, SM_COM_COMMCD B WHERE A.COMM_CD_ID = B.COMM_CD_ID AND B.COMM_CD = 'CO003' AND A.USE_YN = 'Y') THEN '%' ELSE #{empNo} END
+					  		) Z ON Z.CMPN_CD = A.CMPN_CD AND Z.CD_SITE = A.CC_CD 
 					 WHERE A.CMPN_CD = #{cmpnCd}
 					   AND A.STD_YM = #{stdYm}
 					   AND A.CC_CD NOT IN (SELECT SPEC_CD FROM SM_COM_COMMCD_D A, SM_COM_COMMCD B WHERE A.COMM_CD_ID = B.COMM_CD_ID AND B.COMM_CD = 'CO004' AND A.USE_YN = 'Y')