Browse Source

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

SBK 1 year ago
parent
commit
2f279eec68

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

@@ -129,23 +129,32 @@
 		<where>
 		<if test="gubun == 'all'">										
 		   AND (NON_CTMN <![CDATA[>=]]> #{unit}
-		      OR NON_PYRQ <![CDATA[>=]]> #{unit} ) 
+		      OR NON_PYRQ <![CDATA[>=]]> #{unit} )
+			<if test="resnYn != '' and resnYn != null">
+			   AND (NVL(NPYRQ_RSN,'Y') = (CASE WHEN NON_PYRQ != 0 THEN 'Y' ELSE 'N' END) OR NVL(RCAMT_RSN,'Y') = (CASE WHEN NON_CTMN != 0 THEN 'Y' ELSE 'N' END) OR NVL(PROG_ACT_RT_RSN,'Y') = (CASE WHEN PROG_ACT_O_RT_DIFF > 0 THEN 'Y' ELSE 'N' END))
+			</if>
 		</if>
 		<if test="gubun == 'CTMN'">				
-		   AND NON_CTMN <![CDATA[>=]]> #{unit}
+		   AND NON_CTMN <![CDATA[>]]> #{unit}
+			<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}
+		   AND NON_PYRQ <![CDATA[>]]> #{unit}
+			<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'">
 			<if test="processGap != 0">
 				AND PROG_ACT_O_RT_DIFF <![CDATA[>=]]> #{processGap}
 			</if>
-		</if>	 
-		<if test="resnYn != '' and resnYn != null">
-		   AND (NVL(NPYRQ_RSN,'Y') = (CASE WHEN NON_PYRQ != 0 THEN 'Y' ELSE 'N' END) OR NVL(RCAMT_RSN,'Y') = (CASE WHEN NON_CTMN != 0 THEN 'Y' ELSE 'N' END))
+			<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>
 		</if>
-		</where>	
+		</where>
 		 ORDER BY CCGRP_CD, CC_CD
 	</select>
     

+ 1 - 1
src/main/webapp/ux/co/co0102/CO01020001U.xml

@@ -242,7 +242,7 @@
 	    	txtRcamtMeasr.setDisabled( true );
     	}
     	
-    	if(dcdataList1.getCellData( info.newRowIndex , "progActORtDiff" ) >= 0){
+    	if(dcdataList1.getCellData( info.newRowIndex , "progActORtDiff" ) > 0){
     		txtProgActRtRsn.setDisabled( false );
     		txtProgActRtMeasr.setDisabled( false );
     	} else {