Browse Source

공통코드 sql 수정

dev001 9 months ago
parent
commit
cd3b8f76c2

+ 1 - 6
src/main/resources/sqlmap/mappers/ei/ei0401/EI04010001UMapper.xml

@@ -42,12 +42,7 @@
                    , USE_YN 
                    , USE_YN 
                 FROM SM_COM_COMMCD_D  /* 공통)공통코드상세 */
                 FROM SM_COM_COMMCD_D  /* 공통)공통코드상세 */
                WHERE 1 = 1
                WHERE 1 = 1
-               	 <if test="cmpnCd == 'S0001'">
-                 AND COMM_CD_ID = '31' /* 공통코드 H005 직위(이테크) */
-                 </if>
-                 <if test="cmpnCd == 'S0002'">
-                 AND COMM_CD_ID = '965' /* 공통코드 H005 직위(에너지) */
-                 </if>
+                 AND COMM_CD_ID = (SELECT COMM_CD_ID FROM SM_COM_COMMCD WHERE CMPN_CD = #{cmpnCd} AND SYS_CD = 'CW' AND COMM_CD = 'H005') /* 공통코드 H005 직위(이테크 31, 에너지 965) */
                  AND USE_YN = 'Y'
                  AND USE_YN = 'Y'
             ) B
             ) B
              ON A.JOB_GRADE_CD = B.SPEC_CD
              ON A.JOB_GRADE_CD = B.SPEC_CD