Browse Source

리스크점검사유등록 쿼리수정

SBK 1 year ago
parent
commit
8ae830d38c
1 changed files with 19 additions and 4 deletions
  1. 19 4
      src/main/resources/sqlmap/mappers/co/co0102/CO01020001UMapper.xml

+ 19 - 4
src/main/resources/sqlmap/mappers/co/co0102/CO01020001UMapper.xml

@@ -146,19 +146,34 @@
 			</if>
 		</if>
 		<if test="gubun == 'CTMN'">
-		   AND NON_CTMN <![CDATA[>]]> #{unit}
+			<if test="unit == 0">
+			   AND NON_CTMN <![CDATA[>]]> #{unit}
+			</if>
+			<if test="unit != 0">
+			   AND NON_CTMN <![CDATA[>=]]> #{unit}
+			</if>			
 			<if test="resnYn != '' and resnYn != null">
 			   AND NVL(RCAMT_RSN,'Y') = (CASE WHEN NON_CTMN != 0 THEN 'Y' ELSE 'N' END)
 			</if>
 		</if>
-		<if test="gubun == 'PYRQ'">					
-		   AND NON_PYRQ <![CDATA[>]]> #{unit}
+		<if test="gubun == 'PYRQ'">	
+			<if test="unit == 0">
+			   AND NON_PYRQ <![CDATA[>]]> #{unit}
+			</if>
+			<if test="unit != 0">
+			   AND NON_PYRQ <![CDATA[>=]]> #{unit}
+			</if>
 			<if test="resnYn != '' and resnYn != null">
 			   AND NVL(NPYRQ_RSN,'Y') = (CASE WHEN NON_PYRQ != 0 THEN 'Y' ELSE 'N' END)
 			</if>
 		</if>
 		<if test="gubun == 'PAOR'">
-			AND PROG_ACT_O_RT_DIFF <![CDATA[>]]> #{processGap}
+			<if test="processGap == 0">
+			   AND PROG_ACT_O_RT_DIFF <![CDATA[>]]> #{processGap}
+			</if>
+			<if test="processGap != 0">
+			   AND PROG_ACT_O_RT_DIFF <![CDATA[>=]]> #{processGap}
+			</if>		
 			<if test="resnYn != '' and resnYn != null">
 			   AND NVL(PROG_ACT_RT_RSN,'Y') = (CASE WHEN PROG_ACT_O_RT_DIFF > 0 THEN 'Y' ELSE 'N' END)
 			</if>