Merge branch 'tolag'
This commit is contained in:
commit
ad2d63f579
@ -1,5 +1,6 @@
|
||||
package kcc.com.cmm.web;
|
||||
|
||||
import java.io.File;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -191,7 +192,16 @@ public class StreamDocsController {
|
||||
//return new ResponseEntity<RestResponse>("success", HttpStatus.OK);
|
||||
|
||||
//return ResponseEntity.ok(new RestResponse(HttpStatus.OK, "등록 되었습니다."));
|
||||
|
||||
try {
|
||||
String path = pdfMakepathOut + pdfConversionVO.getAdrSeq() + "/";
|
||||
File chkFolder = new File(path);
|
||||
|
||||
if(chkFolder.exists()) {
|
||||
this.deleteFolder(path);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
//HttpResponse<String> responseInfo = StreamDocsUtil.regPdfDoc(filePath, streamdocsURL);
|
||||
//return new ResponseEntity.ok(new RestResponse(HttpStatus.OK, "등록 되었습니다.", responseInfo.getBody(), LocalDateTime.now()));
|
||||
return ResponseEntity.ok(new RestResponse(HttpStatus.OK, "등록 되었습니다.", LocalDateTime.now()));
|
||||
@ -324,4 +334,29 @@ public class StreamDocsController {
|
||||
return ResponseEntity.ok(new RestResponse(HttpStatus.BAD_REQUEST, "조정신청서 생성시 오류가 발생되었습니다.", LocalDateTime.now()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void deleteFolder(String path) {
|
||||
|
||||
File folder = new File(path);
|
||||
try {
|
||||
if(folder.exists()){
|
||||
File[] folder_list = folder.listFiles(); //파일리스트 얻어오기
|
||||
|
||||
for (int i = 0; i < folder_list.length; i++) {
|
||||
if(folder_list[i].isFile()) {
|
||||
folder_list[i].delete();
|
||||
System.out.println("파일이 삭제되었습니다.");
|
||||
}else {
|
||||
deleteFolder(folder_list[i].getPath()); //재귀함수호출
|
||||
System.out.println("폴더가 삭제되었습니다.");
|
||||
}
|
||||
folder_list[i].delete();
|
||||
}
|
||||
folder.delete(); //폴더 삭제
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6,6 +6,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
@ -186,7 +186,7 @@ Globals.oz.devServerIp=192.168.0.176:8091
|
||||
Globals.oz.devSchedulerIp=192.168.0.200
|
||||
#scheduler \uc11c\ubc84\uc5d0 \uc0dd\uc131\ub418\ub294 \uacbd\ub85c \uc785\ub2c8\ub2e4.
|
||||
#Globals.oz.devPdfSavePath=/usr/local/tomcat/webapps/data/out
|
||||
Globals.oz.devPdfSavePath=\\192.168.0.176\\shared_folder_176\\out\\
|
||||
Globals.oz.devPdfSavePath=\\192.168.0.176\\shared_folder_176\\out
|
||||
Globals.oz.devServerCheckString=localhost||119.193.215.98||iten.co.kr
|
||||
Globals.oz.realServerIp=192.168.39.145:8080
|
||||
Globals.oz.realSchedulerIp=192.168.39.147
|
||||
|
||||
Loading…
Reference in New Issue
Block a user