Merge branch 'hylee' into advc
This commit is contained in:
commit
3d5f81e76f
@ -367,8 +367,8 @@ public class CheckLoginUtil {
|
||||
|
||||
}
|
||||
HttpSession session = request.getSession();
|
||||
session.setAttribute("beforeSiteUrl", request.getRequestURI());
|
||||
//return "redirect:/web/user/login/ssoLogin.do";
|
||||
// session.setAttribute("beforeSiteUrl", request.getRequestURI());
|
||||
session.setAttribute("beforeSiteUrl", request.getRequestURI().replace(request.getContextPath() , ""));
|
||||
return "redirect:/web/user/login/ssoLogin.do";
|
||||
}
|
||||
|
||||
|
||||
@ -939,6 +939,9 @@ public class EgovLoginController {
|
||||
System.out.println("==15==");
|
||||
}
|
||||
|
||||
// session.setAttribute("beforeSiteUrl", request.getRequestURI());
|
||||
System.out.println("session.getAttributesession.getAttributesession.getAttributesession.getAttribute");
|
||||
loginVO.setBeforeUrl((String) request.getSession().getAttribute("beforeSiteUrl"));
|
||||
// 로그인 전 URL 호출 시
|
||||
if (loginVO.getBeforeUrl() != null && !("").equals(loginVO.getBeforeUrl())) {
|
||||
request.getSession().setAttribute("usrBeforeUrl", loginVO.getBeforeUrl());
|
||||
@ -1509,7 +1512,7 @@ public class EgovLoginController {
|
||||
|
||||
if (session.getAttribute("beforeSiteUrl") != null) { // 사용자 메인
|
||||
String tempSessionUrl = (String) session.getAttribute("beforeSiteUrl");
|
||||
tempSessionUrl = tempSessionUrl.replace("/offedu", "");
|
||||
// tempSessionUrl = tempSessionUrl.replace("/offedu", "");
|
||||
session.setAttribute("pageType", null);
|
||||
session.setAttribute("beforeSiteUrl", null);
|
||||
|
||||
|
||||
@ -1256,6 +1256,8 @@ public class EduRsltMngTngrController {
|
||||
}
|
||||
});
|
||||
|
||||
System.out.println("atchFileIdList.size() :: "+ atchFileIdList.size());
|
||||
|
||||
FileVO fileVO = new FileVO();
|
||||
fileVO.setDownloadType(downloadType);
|
||||
|
||||
@ -1297,12 +1299,13 @@ public class EduRsltMngTngrController {
|
||||
int size = 1024;
|
||||
byte[] buf = new byte[size];
|
||||
|
||||
// String outZipNm = fvoList.get(0).getFileStreCours()+File.separator + orgnZipNm;
|
||||
String outZipNm = "/usr/local/tomcat/file/sht/"+File.separator + orgnZipNm;
|
||||
String outZipNm = fvoList.get(0).getFileStreCours()+File.separator + orgnZipNm;
|
||||
// String outZipNm = "/usr/local/tomcat/file/sht/"+File.separator + orgnZipNm;
|
||||
FileInputStream fis = null;
|
||||
ZipArchiveOutputStream zos = null;
|
||||
BufferedInputStream bis = null;
|
||||
|
||||
int fileCnt = 0;
|
||||
try {
|
||||
System.out.println("outZipNm : "+ outZipNm);
|
||||
// Zip 파일생성
|
||||
@ -1318,6 +1321,7 @@ public class EduRsltMngTngrController {
|
||||
if(isExists) {
|
||||
System.out.println("getStreFileNm() " + vo.getStreFileNm());
|
||||
System.out.println("I find the existFile.txt");
|
||||
fileCnt++;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
@ -1349,6 +1353,7 @@ public class EduRsltMngTngrController {
|
||||
if( bis != null ) bis.close();
|
||||
}
|
||||
|
||||
System.out.println("fileCnt :: "+ fileCnt);
|
||||
File uFile = new File(fvoList.get(0).getFileStreCours(), orgnZipNm);
|
||||
long fSize = uFile.length();
|
||||
|
||||
@ -1403,6 +1408,102 @@ public class EduRsltMngTngrController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "eduRsltFileChk.do")
|
||||
public ModelAndView eduRsltFileChk(@ModelAttribute("vEEduAplctVO") VEEduAplctVO vEEduAplctVO
|
||||
, HttpServletRequest request
|
||||
, HttpServletResponse response
|
||||
, ModelMap model) throws Exception {
|
||||
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
// 요청, 반려건
|
||||
vEEduAplctVO.setSearchNotStatusArr(new String[]{"60"});
|
||||
// 청소년
|
||||
vEEduAplctVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_10);
|
||||
vEEduAplctVO.setMode(VeConstants.MODE_EXCEL);
|
||||
List<VEEduExcelVO> list = vEEduMIXService.selectExcelList(vEEduAplctVO);
|
||||
|
||||
System.out.println("=============");
|
||||
List<String> atchFileIdList = new ArrayList<String>();
|
||||
|
||||
/*
|
||||
* 게시글 리스트에 첨부파일이 있는지 확인
|
||||
* */
|
||||
list.forEach( vo -> {
|
||||
if(vo.getAtchFileId() != null) {
|
||||
atchFileIdList.add(vo.getAtchFileId());
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* 게시글 리스트에 첨부파일이 없으면 없음 리턴
|
||||
* */
|
||||
System.out.println("chk atchFileIdList.size() :: "+ atchFileIdList.size());
|
||||
if(atchFileIdList.size() < 1)
|
||||
{
|
||||
/*
|
||||
* 파일 없음 리턴
|
||||
* */
|
||||
modelAndView.addObject("result", "fail");
|
||||
modelAndView.addObject("msg", "첨부 파일이 없습니다.");
|
||||
return modelAndView;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* */
|
||||
FileVO fileVO = new FileVO();
|
||||
String downloadType = "A";
|
||||
fileVO.setDownloadType(downloadType);
|
||||
fileVO.setAtchFileIdList(atchFileIdList);
|
||||
List<FileVO> fvoList = fileService.selectZipFileList(fileVO); // 해당 기능에 맞게 파일 조회
|
||||
|
||||
System.out.println("==========================");
|
||||
|
||||
|
||||
int fileCnt = 0;
|
||||
for ( FileVO vo : fvoList ){
|
||||
|
||||
// Create a file object
|
||||
File file = new File(vo.getFileStreCours() + "/" + vo.getStreFileNm());
|
||||
// 1. check if the file exists or not
|
||||
boolean isExists = file.exists();
|
||||
if(isExists) {
|
||||
fileCnt++;
|
||||
System.out.println("getStreFileNm() " + vo.getStreFileNm());
|
||||
System.out.println("I find the existFile.txt");
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 실재 존재하는 파일이 있는지 확인
|
||||
* */
|
||||
System.out.println("chk fileCnt :: "+ fileCnt);
|
||||
if(fileCnt == 0){
|
||||
|
||||
/*
|
||||
* 파일 없음 리턴
|
||||
* */
|
||||
modelAndView.addObject("result", "fail");
|
||||
modelAndView.addObject("msg", "첨부 파일이 없습니다.");
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
/*
|
||||
* 파일 없음 리턴
|
||||
* */
|
||||
modelAndView.addObject("result", "susess");
|
||||
return modelAndView;
|
||||
|
||||
}
|
||||
|
||||
//강사만족도 excel download
|
||||
@SuppressWarnings("rawtypes")
|
||||
@RequestMapping(value = "eduRsltSatisfactionExcelDownLoad.do")
|
||||
|
||||
@ -232,12 +232,40 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function fncExcelDownLoad(){
|
||||
var listForm = document.listForm ;
|
||||
listForm.action = "<c:url value='/kccadr/oprtn/tngrVisitEdu/eduRsltExcelDownLoad.do'/>";
|
||||
listForm.submit();
|
||||
}
|
||||
|
||||
function eduRsltFileChk(){
|
||||
|
||||
var data1 = new FormData(document.getElementById("listForm"));
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url: "<c:url value='/kccadr/oprtn/tngrVisitEdu/eduRsltFileChk.do'/>",
|
||||
data: data1,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
cache: false,
|
||||
success:function(returnData){
|
||||
console.log('returnData : ', returnData);
|
||||
if(returnData.result == 'fail'){
|
||||
alert(returnData.msg);
|
||||
}else{
|
||||
fncFileDown();
|
||||
}
|
||||
|
||||
},
|
||||
error:function(request , status, error){
|
||||
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function fncFileDown(){
|
||||
var listForm = document.listForm ;
|
||||
listForm.action = "<c:url value='/kccadr/oprtn/tngrVisitEdu/eduRsltFileDownLoad.do'/>";
|
||||
@ -423,7 +451,7 @@
|
||||
<div class="btn_wrap btn_layout01">
|
||||
<div class="btn_left">
|
||||
<button type="button" class="btn_type06" onclick="fncExcelDownLoad();return false;">결과보고다운로드</button>
|
||||
<button type="button" class="btn_type06" onclick="fncFileDown();return false;">첨부파일다운</button>
|
||||
<button type="button" class="btn_type06" onclick="eduRsltFileChk();return false;">첨부파일다운</button>
|
||||
</div>
|
||||
<div class="btn_center">
|
||||
<button type="button" class="btn_type04" onclick="fncSndSms();return false;">결과보고제출요청</button>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user