diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp index ef7dda4..9f6ee35 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtRslt-info.jsp @@ -140,6 +140,7 @@ // pageObject let $P = pageObject["${pageName}"]; + $P.fileInfos = ${fileInfos}; $P.fileArr = []; // FormFields @@ -233,10 +234,23 @@ } let create = (info.dscdmngId == ""); + //파일정보 변경 여부 체크 + let fileChangeYn = "N"; + if(fileArr.length != $P.fileInfos.length){ + fileChangeYn = "Y"; + } else if(fileArr.length > 0){ + for(let i=0; i < fileArr.length; i++){ + if(fileArr[i].id != $P.fileInfos[i].FILE_ID){ + fileChangeYn = "Y"; + break; + } + } + } + upload({ url: '' , data: { - fileChangeYn: "Y", + fileChangeYn: fileChangeYn, dsuseMgtRsltJsonStr: JSON.stringify(saveData), dsuseDsuseImgFiles: fileArr } @@ -446,7 +460,7 @@ }); - + console.log("#${usrRptIdNo}"); @@ -477,11 +491,11 @@ // 3. Dataset 설정 $P.control.setData([${dsuseRsltInfo}]); - let fileInfos = ${fileInfos}; - if(fileInfos.length > 0){ + + if($P.fileInfos.length > 0){ let promiseArr = []; - fileInfos.forEach(f => promiseArr.push(fnCreateFileFromFileInfo(f))); + $P.fileInfos.forEach(f => promiseArr.push(fnCreateFileFromFileInfo(f))); Promise.all(promiseArr).then((values) => { $P.fileArr = $P.fileArr.concat(values);