feat: pms-#3265 " 메뉴를 통한 로그인 시 화면 오류 수정 요청" 완료
This commit is contained in:
parent
91e91ec14d
commit
691c9bb5fb
@ -367,8 +367,8 @@ public class CheckLoginUtil {
|
|||||||
|
|
||||||
}
|
}
|
||||||
HttpSession session = request.getSession();
|
HttpSession session = request.getSession();
|
||||||
session.setAttribute("beforeSiteUrl", request.getRequestURI());
|
// session.setAttribute("beforeSiteUrl", request.getRequestURI());
|
||||||
//return "redirect:/web/user/login/ssoLogin.do";
|
session.setAttribute("beforeSiteUrl", request.getRequestURI().replace(request.getContextPath() , ""));
|
||||||
return "redirect:/web/user/login/ssoLogin.do";
|
return "redirect:/web/user/login/ssoLogin.do";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -939,6 +939,9 @@ public class EgovLoginController {
|
|||||||
System.out.println("==15==");
|
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 호출 시
|
// 로그인 전 URL 호출 시
|
||||||
if (loginVO.getBeforeUrl() != null && !("").equals(loginVO.getBeforeUrl())) {
|
if (loginVO.getBeforeUrl() != null && !("").equals(loginVO.getBeforeUrl())) {
|
||||||
request.getSession().setAttribute("usrBeforeUrl", loginVO.getBeforeUrl());
|
request.getSession().setAttribute("usrBeforeUrl", loginVO.getBeforeUrl());
|
||||||
@ -1509,7 +1512,7 @@ public class EgovLoginController {
|
|||||||
|
|
||||||
if (session.getAttribute("beforeSiteUrl") != null) { // 사용자 메인
|
if (session.getAttribute("beforeSiteUrl") != null) { // 사용자 메인
|
||||||
String tempSessionUrl = (String) session.getAttribute("beforeSiteUrl");
|
String tempSessionUrl = (String) session.getAttribute("beforeSiteUrl");
|
||||||
tempSessionUrl = tempSessionUrl.replace("/offedu", "");
|
// tempSessionUrl = tempSessionUrl.replace("/offedu", "");
|
||||||
session.setAttribute("pageType", null);
|
session.setAttribute("pageType", null);
|
||||||
session.setAttribute("beforeSiteUrl", null);
|
session.setAttribute("beforeSiteUrl", null);
|
||||||
|
|
||||||
|
|||||||
@ -1256,6 +1256,8 @@ public class EduRsltMngTngrController {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
System.out.println("atchFileIdList.size() :: "+ atchFileIdList.size());
|
||||||
|
|
||||||
FileVO fileVO = new FileVO();
|
FileVO fileVO = new FileVO();
|
||||||
fileVO.setDownloadType(downloadType);
|
fileVO.setDownloadType(downloadType);
|
||||||
|
|
||||||
@ -1297,12 +1299,13 @@ public class EduRsltMngTngrController {
|
|||||||
int size = 1024;
|
int size = 1024;
|
||||||
byte[] buf = new byte[size];
|
byte[] buf = new byte[size];
|
||||||
|
|
||||||
// String outZipNm = fvoList.get(0).getFileStreCours()+File.separator + orgnZipNm;
|
String outZipNm = fvoList.get(0).getFileStreCours()+File.separator + orgnZipNm;
|
||||||
String outZipNm = "/usr/local/tomcat/file/sht/"+File.separator + orgnZipNm;
|
// String outZipNm = "/usr/local/tomcat/file/sht/"+File.separator + orgnZipNm;
|
||||||
FileInputStream fis = null;
|
FileInputStream fis = null;
|
||||||
ZipArchiveOutputStream zos = null;
|
ZipArchiveOutputStream zos = null;
|
||||||
BufferedInputStream bis = null;
|
BufferedInputStream bis = null;
|
||||||
|
|
||||||
|
int fileCnt = 0;
|
||||||
try {
|
try {
|
||||||
System.out.println("outZipNm : "+ outZipNm);
|
System.out.println("outZipNm : "+ outZipNm);
|
||||||
// Zip 파일생성
|
// Zip 파일생성
|
||||||
@ -1317,7 +1320,8 @@ public class EduRsltMngTngrController {
|
|||||||
boolean isExists = file.exists();
|
boolean isExists = file.exists();
|
||||||
if(isExists) {
|
if(isExists) {
|
||||||
System.out.println("getStreFileNm() " + vo.getStreFileNm());
|
System.out.println("getStreFileNm() " + vo.getStreFileNm());
|
||||||
System.out.println("I find the existFile.txt");
|
System.out.println("I find the existFile.txt");
|
||||||
|
fileCnt++;
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1348,7 +1352,8 @@ public class EduRsltMngTngrController {
|
|||||||
if( fis != null ) fis.close();
|
if( fis != null ) fis.close();
|
||||||
if( bis != null ) bis.close();
|
if( bis != null ) bis.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.out.println("fileCnt :: "+ fileCnt);
|
||||||
File uFile = new File(fvoList.get(0).getFileStreCours(), orgnZipNm);
|
File uFile = new File(fvoList.get(0).getFileStreCours(), orgnZipNm);
|
||||||
long fSize = uFile.length();
|
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
|
//강사만족도 excel download
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
@RequestMapping(value = "eduRsltSatisfactionExcelDownLoad.do")
|
@RequestMapping(value = "eduRsltSatisfactionExcelDownLoad.do")
|
||||||
|
|||||||
@ -231,6 +231,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function fncExcelDownLoad(){
|
function fncExcelDownLoad(){
|
||||||
var listForm = document.listForm ;
|
var listForm = document.listForm ;
|
||||||
@ -238,6 +239,33 @@
|
|||||||
listForm.submit();
|
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(){
|
function fncFileDown(){
|
||||||
var listForm = document.listForm ;
|
var listForm = document.listForm ;
|
||||||
listForm.action = "<c:url value='/kccadr/oprtn/tngrVisitEdu/eduRsltFileDownLoad.do'/>";
|
listForm.action = "<c:url value='/kccadr/oprtn/tngrVisitEdu/eduRsltFileDownLoad.do'/>";
|
||||||
@ -423,7 +451,7 @@
|
|||||||
<div class="btn_wrap btn_layout01">
|
<div class="btn_wrap btn_layout01">
|
||||||
<div class="btn_left">
|
<div class="btn_left">
|
||||||
<button type="button" class="btn_type06" onclick="fncExcelDownLoad();return false;">결과보고다운로드</button>
|
<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>
|
||||||
<div class="btn_center">
|
<div class="btn_center">
|
||||||
<button type="button" class="btn_type04" onclick="fncSndSms();return false;">결과보고제출요청</button>
|
<button type="button" class="btn_type04" onclick="fncSndSms();return false;">결과보고제출요청</button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user