Browse Source

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

SBK 1 year ago
parent
commit
c6e101e0d2

+ 1 - 1
src/main/java/sgc/portal/co/co0102/dto/CO01020001USearch.java

@@ -24,5 +24,5 @@ public class CO01020001USearch extends BaseSearchDto {
 	private String gubun;     /*금액구분*/
 	private String unit;     /*조회기준*/
 	private String resnYn;   /*사유 미 등록 건*/
-	private String processGap;   /*공정율 GAP 기준*/
+	private int processGap;   /*공정율 GAP 기준*/
 }

+ 14 - 13
src/main/resources/sqlmap/mappers/co/co0102/CO01020001UMapper.xml

@@ -28,6 +28,7 @@
 		     , PROG_ACT_PLAN_O_RT
 		     , PROG_ACT_O_RT
 		     , PROG_ACT_O_RT_DIFF
+		     , PROG_ACT_RT_RSN_YN
 		     , EMP_PM_NM
 		     , EMP_PE_NM
 		     , EMP_PS_NM
@@ -65,7 +66,7 @@
 					     , DECODE(NVL(E.PROG_ACT_RT_RSN,''),'','N','Y') PROG_ACT_RT_RSN_YN		 
 					     , ROUND(NVL(A.PROG_ACT_PLAN_O_RT,0),2) PROG_ACT_PLAN_O_RT --공정율계획
 					     , ROUND(NVL(A.PROG_ACT_O_RT,0),2) PROG_ACT_O_RT --공정율  
-					     , RTRIM(TO_CHAR(ROUND(NVL(A.PROG_ACT_O_RT - A.PROG_ACT_PLAN_O_RT,0),2), 'FM990.99'),'.') PROG_ACT_O_RT_DIFF --공정율 GAP  
+					     , RTRIM(TO_CHAR(ROUND(NVL(A.PROG_ACT_PLAN_O_RT - A.PROG_ACT_O_RT,0),2), 'FM990.99'),'.') PROG_ACT_O_RT_DIFF --공정율 GAP  
 					     , E.MDFT_PR 
 					     , TO_CHAR(TO_TIMESTAMP(E.MDFT_DT,'YYYY-MM-DD-HH24:MI:SS'),'YYYY-MM-DD-HH24:MI:SS') MDFT_DT -- 최종 수정일자
 					  FROM CON_PJT_MST A
@@ -124,23 +125,23 @@
 					<if test="complCd != 'all'">
 					   AND E.COMPL_CD = #{complCd}
 					</if>
-					<if test="gubun == 'CTMN'">				
-					   AND D.NON_CTMN <![CDATA[>]]> #{unit}
-					</if>
-					<if test="gubun == 'PYRQ'">					
-					   AND NVL(A.SALE_AMT,0) - NVL(B.PYRQ_NAS_AMT,0) <![CDATA[>]]> #{unit}
-					</if>
-					<if test="gubun == 'PAOR'">
-						<if test="processGap != 0">
-						   <![CDATA[AND ROUND(NVL(A.PROG_ACT_O_RT - A.PROG_ACT_PLAN_O_RT,0),2) <= '-'||#{processGap}]]>
-						</if>
-					</if>
 				)
 		<where>
 		<if test="gubun == 'all'">										
 		   AND (NON_CTMN <![CDATA[>=]]> #{unit}
 		      OR NON_PYRQ <![CDATA[>=]]> #{unit} ) 
-		</if>		 
+		</if>
+		<if test="gubun == 'CTMN'">				
+		   AND NON_CTMN <![CDATA[>=]]> #{unit}
+		</if>
+		<if test="gubun == 'PYRQ'">					
+		   AND NON_PYRQ <![CDATA[>=]]> #{unit}
+		</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>

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

@@ -45,7 +45,7 @@
 						<w2:column id="rcamtRsn" name="미수금 사유" dataType="text"></w2:column>
 						<w2:column id="rcamtMeasr" name="미수금 대책" dataType="text"></w2:column>
 						<w2:column id="rcamtRsnYn" name="미수금 사유 유무 YN" dataType="text"></w2:column>
-						<w2:column id="progActRtRsn" name="공정율 사유" dataType="text"></w2:column>
+						<w2:column id="progActRtRsn" name="공정율 사유" dataType="text"></w2:column> 
 						<w2:column id="progActRtMeasr" name="공정율 대책" dataType="text"></w2:column>
 						<w2:column id="progActRtRsnYn" name="공정율 사유 유무 YN" dataType="text"></w2:column>
 						<w2:column id="progActPlanORt" name="공정율 계획" dataType="text"></w2:column>
@@ -79,7 +79,7 @@
 						<w2:key id="unit" name="조회기준" dataType="text"></w2:key>
 						<w2:key id="ccgrpCd1" name="본부" dataType="text"></w2:key>
 						<w2:key id="resnYn" name="사유미등록건" dataType="text"></w2:key>
-						<w2:key id="processGap" name="공정율 GAP 기준" dataType="text"></w2:key>
+						<w2:key id="processGap" name="공정율 GAP 기준" dataType="number"></w2:key>
 					</w2:keyInfo>
 				</w2:dataMap>
 			</w2:dataCollection>
@@ -242,7 +242,7 @@
 	    	txtRcamtMeasr.setDisabled( true );
     	}
     	
-    	if(dcdataList1.getCellData( info.newRowIndex , "progActORtDiff" ).split("%")[0] < 0){
+    	if(dcdataList1.getCellData( info.newRowIndex , "progActORtDiff" ) >= 0){
     		txtProgActRtRsn.setDisabled( false );
     		txtProgActRtMeasr.setDisabled( false );
     	} else {
@@ -258,22 +258,85 @@
      * param: 선택 행,열 정보
      ***************************************************************************/
     scwin.dcdataList1_updateDataList = function(info) {
-		switch(info.colID){
-			case 'rcamtRsn':
-				if(info.newValue == ""){
+    	if(info.colID == "rcamtRsn" || info.colID == "rcamtMeasr") {
+    		if(info.newValue == ""){
+    			if(info.colID == "rcamtRsn" && dcdataList1.getCellData( info.rowIndex , "rcamtMeasr" ) == ""){
+					dcdataList1.setCellData( info.rowIndex , "rcamtRsnYn" , "N" );    			
+    			} else if(info.colID == "rcamtMeasr" && dcdataList1.getCellData( info.rowIndex , "rcamtRsn" ) == ""){
 					dcdataList1.setCellData( info.rowIndex , "rcamtRsnYn" , "N" );
-				} else if(info.newValue != ""){
-					dcdataList1.setCellData( info.rowIndex , "rcamtRsnYn" , "Y" );
-				}
-				break;
-			case 'npyrqRsn':
-				if(info.newValue == ""){
+    			}
+    		}else {
+				dcdataList1.setCellData( info.rowIndex , "rcamtRsnYn" , "Y" );
+    		} 	
+    	}
+
+    	if(info.colID == "npyrqMeasr" || info.colID == "npyrqRsn") {
+    		if(info.newValue == ""){
+    			if(info.colID == "npyrqMeasr" && dcdataList1.getCellData( info.rowIndex , "npyrqRsn" ) == ""){
+					dcdataList1.setCellData( info.rowIndex , "npyrqRsnYn" , "N" );    			
+    			} else if(info.colID == "npyrqRsn" && dcdataList1.getCellData( info.rowIndex , "npyrqMeasr" ) == ""){
 					dcdataList1.setCellData( info.rowIndex , "npyrqRsnYn" , "N" );
-				} else if(info.newValue != ""){
-					dcdataList1.setCellData( info.rowIndex , "npyrqRsnYn" , "Y" );
-				}
-				break;
-		}
+    			}
+    		}else {
+				dcdataList1.setCellData( info.rowIndex , "npyrqRsnYn" , "Y" );
+    		} 	  		
+    	}
+
+    	if(info.colID == "progActRtMeasr" || info.colID == "progActRtRsn") {
+    		if(info.newValue == ""){
+    			if(info.colID == "progActRtRsn" && dcdataList1.getCellData( info.rowIndex , "progActRtMeasr" ) == ""){
+					dcdataList1.setCellData( info.rowIndex , "progActRtRsnYn" , "N" );    			
+    			} else if(info.colID == "progActRtMeasr" && dcdataList1.getCellData( info.rowIndex , "progActRtRsn" ) == ""){
+					dcdataList1.setCellData( info.rowIndex , "progActRtRsnYn" , "N" );
+    			}
+    		}else {
+				dcdataList1.setCellData( info.rowIndex , "progActRtRsnYn" , "Y" );
+    		} 		
+    	}    
+//		switch(info.colID){
+//			case "rcamtRsn":
+//				if(info.newValue == ""){
+//					dcdataList1.setCellData( info.rowIndex , "rcamtRsnYn" , "N" );
+//				} else if(info.newValue != ""){
+//					dcdataList1.setCellData( info.rowIndex , "rcamtRsnYn" , "Y" );
+//				}
+//				break;
+//			case "rcamtMeasr":
+//				if(info.newValue == ""){
+//					dcdataList1.setCellData( info.rowIndex , "rcamtRsnYn" , "N" );
+//				} else if(info.newValue != ""){
+//					dcdataList1.setCellData( info.rowIndex , "rcamtRsnYn" , "Y" );
+//				}
+//				break; 
+//			case "npyrqMeasr":
+//				if(info.newValue == ""){
+//					dcdataList1.setCellData( info.rowIndex , "npyrqRsnYn" , "N" );
+//				} else if(info.newValue != ""){
+//					dcdataList1.setCellData( info.rowIndex , "npyrqRsnYn" , "Y" );
+//				}
+//				break;		
+//			case "npyrqRsn":
+//				if(info.newValue == ""){
+//					dcdataList1.setCellData( info.rowIndex , "npyrqRsnYn" , "N" );
+//				} else if(info.newValue != ""){
+//					dcdataList1.setCellData( info.rowIndex , "npyrqRsnYn" , "Y" );
+//				}
+//				break;
+//			case "progActRtRsn": 
+//				if(info.newValue == ""){
+//					dcdataList1.setCellData( info.rowIndex , "progActRtRsnYn" , "N" );
+//				} else if(info.newValue != ""){
+//					dcdataList1.setCellData( info.rowIndex , "progActRtRsnYn" , "Y" );
+//				}
+//				break;		
+//			case "progActRtMeasr":
+//				if(info.newValue == ""){
+//					dcdataList1.setCellData( info.rowIndex , "progActRtRsnYn" , "N" );
+//				} else if(info.newValue != ""){
+//					dcdataList1.setCellData( info.rowIndex , "progActRtRsnYn" , "Y" );
+//				}
+//				break;
+//		}
 	};
 	
 	/***************************************************************************