이지우 - 저작권체험교실 작업중
This commit is contained in:
parent
a7f8cbd561
commit
db2a329644
@ -127,5 +127,7 @@ public interface EgovUserManageService {
|
|||||||
|
|
||||||
public UserManageVO selectOffeduUser(UserManageVO userManageVO) throws Exception;
|
public UserManageVO selectOffeduUser(UserManageVO userManageVO) throws Exception;
|
||||||
|
|
||||||
|
public List<UserManageVO> selectOffeduUserList(UserManageVO userManageVO) throws Exception;
|
||||||
|
|
||||||
public void insertOffeduUser(UserManageVO userManageVO) throws Exception;
|
public void insertOffeduUser(UserManageVO userManageVO) throws Exception;
|
||||||
}
|
}
|
||||||
@ -176,6 +176,8 @@ public class UserManageVO extends UserDefaultVO{
|
|||||||
|
|
||||||
private String mberId; //회원 Id
|
private String mberId; //회원 Id
|
||||||
|
|
||||||
|
private int totCnt = 0; //회원 Id
|
||||||
|
|
||||||
public String getAuthorCode() {
|
public String getAuthorCode() {
|
||||||
return authorCode;
|
return authorCode;
|
||||||
}
|
}
|
||||||
@ -707,6 +709,12 @@ public class UserManageVO extends UserDefaultVO{
|
|||||||
public void setMberId(String mberId) {
|
public void setMberId(String mberId) {
|
||||||
this.mberId = mberId;
|
this.mberId = mberId;
|
||||||
}
|
}
|
||||||
|
public int getTotCnt() {
|
||||||
|
return totCnt;
|
||||||
|
}
|
||||||
|
public void setTotCnt(int totCnt) {
|
||||||
|
this.totCnt = totCnt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -312,6 +312,11 @@ public class EgovUserManageServiceImpl extends EgovAbstractServiceImpl implement
|
|||||||
return userManageVO;
|
return userManageVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserManageVO> selectOffeduUserList(UserManageVO userManageVO) throws Exception{
|
||||||
|
return userManageDAO.selectOffeduUserList(userManageVO);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// @Transactional(rollbackFor = Exception.class)
|
// @Transactional(rollbackFor = Exception.class)
|
||||||
public void insertOffeduUser(UserManageVO userManageVO) throws Exception {
|
public void insertOffeduUser(UserManageVO userManageVO) throws Exception {
|
||||||
|
|||||||
@ -189,6 +189,9 @@ public class UserManageDAO extends EgovAbstractDAO{
|
|||||||
return (UserManageVO)select("userManageDAO.selectOffeduUser", userManageVO);
|
return (UserManageVO)select("userManageDAO.selectOffeduUser", userManageVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<UserManageVO> selectOffeduUserList(UserManageVO userManageVO) throws Exception{
|
||||||
|
return (List<UserManageVO>)list("userManageDAO.selectOffeduUserList", userManageVO);
|
||||||
|
}
|
||||||
public void insertOffeudUser(UserManageVO userManageVO){
|
public void insertOffeudUser(UserManageVO userManageVO){
|
||||||
insert("userManageDAO.insertOffeduUser", userManageVO);
|
insert("userManageDAO.insertOffeduUser", userManageVO);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,8 +14,9 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||||
import kcc.com.cmm.LoginVO;
|
import kcc.com.cmm.LoginVO;
|
||||||
import kcc.com.cmm.util.StringUtil;
|
|
||||||
import kcc.com.utl.user.service.CheckLoginUtil;
|
import kcc.com.utl.user.service.CheckLoginUtil;
|
||||||
|
import kcc.let.uss.umt.service.EgovUserManageService;
|
||||||
|
import kcc.let.uss.umt.service.UserManageVO;
|
||||||
import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoMIXService;
|
import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoMIXService;
|
||||||
import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoService;
|
import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoService;
|
||||||
import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoVO;
|
import kcc.ve.aplct.cpyrgExprnClsrm.exprnClsrmAplct.service.ScholInfoVO;
|
||||||
@ -53,6 +54,11 @@ public class CommonManageWebController {
|
|||||||
// 교육신청발송이력
|
// 교육신청발송이력
|
||||||
@Resource(name = "vEEduAplctSndHstryService")
|
@Resource(name = "vEEduAplctSndHstryService")
|
||||||
private VEEduAplctSndHstryService vEEduAplctSndHstryService;
|
private VEEduAplctSndHstryService vEEduAplctSndHstryService;
|
||||||
|
|
||||||
|
|
||||||
|
//회원조회
|
||||||
|
@Resource(name = "userManageService")
|
||||||
|
private EgovUserManageService userManageService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 학교정보 검색 팝업 리스트
|
* 학교정보 검색 팝업 리스트
|
||||||
@ -78,13 +84,26 @@ public class CommonManageWebController {
|
|||||||
//검색 조건
|
//검색 조건
|
||||||
String selectCondition = new String();
|
String selectCondition = new String();
|
||||||
if (!"".equals(scholInfoVO.getSearchKeyword())) {
|
if (!"".equals(scholInfoVO.getSearchKeyword())) {
|
||||||
selectCondition += "AND a.SCHOL_NM LIKE CONCAT ('%', '" +scholInfoVO.getSearchKeyword() + "', '%')";
|
selectCondition += " AND A.SCHOL_NM LIKE '%"+scholInfoVO.getSearchKeyword()+"%' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
//2.2 학교종류
|
//2.2 학교종류
|
||||||
if(StringUtil.isNotEmpty(scholInfoVO.getSearchCondition())){
|
/*if(StringUtil.isNotEmpty(scholInfoVO.getSearchCondition())){
|
||||||
selectCondition += "AND DECODE(schol_grade_nm, '초등학교','10', '중학교','20', '고등학교','30',IF (INSTR(schol_grade_nm,'각종학교')>0,'40','50')) IN ('"+scholInfoVO.getSearchCondition()+"')";
|
selectCondition += "AND DECODE(schol_grade_nm, '초등학교','10', '중학교','20', '고등학교','30',IF (INSTR(schol_grade_nm,'각종학교')>0,'40','50')) IN ('"+scholInfoVO.getSearchCondition()+"')";
|
||||||
}
|
}*/
|
||||||
|
if (!"".equals(scholInfoVO.getSearchCondition())) {
|
||||||
|
if(scholInfoVO.getSearchCondition().equals("10")) {
|
||||||
|
selectCondition += " AND A.SCHOL_GRADE_NM LIKE '%초등%' ";
|
||||||
|
}else if(scholInfoVO.getSearchCondition().equals("20")) {
|
||||||
|
selectCondition += " AND A.SCHOL_GRADE_NM LIKE '%중학%' ";
|
||||||
|
}else if(scholInfoVO.getSearchCondition().equals("30")) {
|
||||||
|
selectCondition += " AND A.SCHOL_GRADE_NM LIKE '%고등%' ";
|
||||||
|
}else if(scholInfoVO.getSearchCondition().equals("40")) {
|
||||||
|
selectCondition += " AND A.SCHOL_GRADE_NM LIKE '%특수%' ";
|
||||||
|
}else if(scholInfoVO.getSearchCondition().equals("50")) {
|
||||||
|
selectCondition += " AND A.SCHOL_GRADE_NM LIKE '%각종%' ";
|
||||||
|
}
|
||||||
|
}
|
||||||
scholInfoVO.setSelectPagingListQuery(selectCondition);
|
scholInfoVO.setSelectPagingListQuery(selectCondition);
|
||||||
|
|
||||||
|
|
||||||
@ -198,5 +217,35 @@ public class CommonManageWebController {
|
|||||||
return "/web/ve/comm/selectPrcsDetailList";
|
return "/web/ve/comm/selectPrcsDetailList";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 회원 검색 팝업 리스트
|
||||||
|
*/
|
||||||
|
@RequestMapping("popup/userPopList.do")
|
||||||
|
public String userPopList(@ModelAttribute("searchVO") UserManageVO userManageVO , ModelMap model , HttpServletRequest request ) throws Exception {
|
||||||
|
PaginationInfo paginationInfo = new PaginationInfo();
|
||||||
|
paginationInfo.setCurrentPageNo(userManageVO.getPageIndex());
|
||||||
|
paginationInfo.setRecordCountPerPage(userManageVO.getPageUnit());
|
||||||
|
paginationInfo.setPageSize(10);
|
||||||
|
|
||||||
|
// paging step2
|
||||||
|
userManageVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||||
|
userManageVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||||
|
userManageVO.setRecordCountPerPage(10);
|
||||||
|
|
||||||
|
if("".equals(userManageVO.getSearchSortCnd())){ //최초조회시 최신것 조회List
|
||||||
|
userManageVO.setSearchSortCnd("mber_id");
|
||||||
|
userManageVO.setSearchSortOrd("asc");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<UserManageVO> userList = userManageService.selectOffeduUserList(userManageVO);
|
||||||
|
//3.paging step3
|
||||||
|
int totCnt = 0;
|
||||||
|
if(userList.size() > 0) totCnt = userList.get(0).getTotCnt();
|
||||||
|
paginationInfo.setTotalRecordCount(totCnt);
|
||||||
|
|
||||||
|
model.addAttribute("paginationInfo", paginationInfo);
|
||||||
|
//학교정보 리스트, 페이징 정보 전달
|
||||||
|
model.addAttribute("userList", userList);
|
||||||
|
return "oprtn/cmm/userPopListBower";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,8 +24,10 @@ import kcc.com.cmm.service.FileVO;
|
|||||||
import kcc.com.cmm.util.DateUtil;
|
import kcc.com.cmm.util.DateUtil;
|
||||||
import kcc.com.utl.user.service.CheckFileUtil;
|
import kcc.com.utl.user.service.CheckFileUtil;
|
||||||
import kcc.com.utl.user.service.CheckLoginUtil;
|
import kcc.com.utl.user.service.CheckLoginUtil;
|
||||||
|
import kcc.ve.cmm.VeConstants;
|
||||||
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsAplctPrdService;
|
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsAplctPrdService;
|
||||||
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsDetailVO;
|
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsDetailVO;
|
||||||
|
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsMIXService;
|
||||||
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsOnlnCntntService;
|
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsOnlnCntntService;
|
||||||
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsService;
|
import kcc.ve.instr.tngrVisitEdu.prcsInfo.service.VEPrcsService;
|
||||||
|
|
||||||
@ -91,6 +93,9 @@ public class OprtnAplctAnncmMngController {
|
|||||||
@Resource(name = "checkFileUtil")
|
@Resource(name = "checkFileUtil")
|
||||||
private CheckFileUtil checkFileUtil;
|
private CheckFileUtil checkFileUtil;
|
||||||
|
|
||||||
|
//교육과정신청
|
||||||
|
@Resource(name = "vEPrcsMIXService")
|
||||||
|
private VEPrcsMIXService vEPrcsMIXService;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
@ -174,7 +179,22 @@ public class OprtnAplctAnncmMngController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 저작권체험교실 등록 화면
|
||||||
|
*/
|
||||||
|
@RequestMapping("oprtnAplctAnncmMngReg.do")
|
||||||
|
public String oprtnAplctMgrReg( @ModelAttribute("modelVO") VEPrcsDetailVO vEPrcsDetailVO , ModelMap model) throws Exception {
|
||||||
|
vEPrcsDetailVO.setMode(VeConstants.MODE_CRT);
|
||||||
|
//온라인차시 리스트
|
||||||
|
vEPrcsDetailVO.setUseYn("Y");
|
||||||
|
vEPrcsDetailVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_30);
|
||||||
|
List<VEPrcsDetailVO> vEPrcsDetailVOList = vEPrcsMIXService.selectPrcsList(vEPrcsDetailVO);
|
||||||
|
//대상 리스트, 페이징 정보 전달
|
||||||
|
model.addAttribute("list", vEPrcsDetailVOList);
|
||||||
|
return "oprtn/cpyrgExprnClsrm/oprtnAplctAnncmMngReg";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 교육과정관리 상세 화면
|
* 교육과정관리 상세 화면
|
||||||
*/
|
*/
|
||||||
@ -402,29 +422,7 @@ public class OprtnAplctAnncmMngController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 교육과정관리 등록 화면
|
|
||||||
*/
|
|
||||||
@RequestMapping("oprtnAplctAnncmMngReg.do")
|
|
||||||
public String OprtnAplctAnncmMngReg(
|
|
||||||
@ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO
|
|
||||||
, ModelMap model
|
|
||||||
) throws Exception {
|
|
||||||
|
|
||||||
//로그인 처리====================================
|
|
||||||
//로그인 정보 가져오기
|
|
||||||
|
|
||||||
String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model);
|
|
||||||
if (!"".equals(s_oprtnLoginCheckNInfo)) return s_oprtnLoginCheckNInfo;
|
|
||||||
|
|
||||||
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
|
|
||||||
model.addAttribute("loginVO", loginVO);
|
|
||||||
|
|
||||||
//로그인 처리====================================
|
|
||||||
|
|
||||||
|
|
||||||
return "oprtn/cpyrgExprnClsrm/oprtnAplctAnncmMngReg";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 교육과정관리 등록
|
* 교육과정관리 등록
|
||||||
|
|||||||
@ -1,21 +1,36 @@
|
|||||||
package kcc.ve.oprtn.cpyrgExprnClsrm.oprtnAplctMng.web;
|
package kcc.ve.oprtn.cpyrgExprnClsrm.oprtnAplctMng.web;
|
||||||
|
|
||||||
|
import java.io.BufferedInputStream;
|
||||||
|
import java.io.BufferedOutputStream;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.net.URLEncoder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
|
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
|
||||||
|
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
|
||||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.util.FileCopyUtils;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
@ -153,20 +168,28 @@ public class OprtnAplctMngController {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 저작권체험교실 등록 화면
|
* 교육과정관리 등록 화면
|
||||||
*/
|
*/
|
||||||
@RequestMapping("oprtnAplctMngReg.do")
|
@RequestMapping("oprtnAplctMngReg.do")
|
||||||
public String oprtnAplctMgrReg( @ModelAttribute("modelVO") VEPrcsDetailVO vEPrcsDetailVO , ModelMap model) throws Exception {
|
public String OprtnAplctAnncmMngReg(
|
||||||
vEPrcsDetailVO.setMode(VeConstants.MODE_CRT);
|
@ModelAttribute("vEPrcsDetailVO") VEPrcsDetailVO vEPrcsDetailVO
|
||||||
//온라인차시 리스트
|
, ModelMap model
|
||||||
vEPrcsDetailVO.setUseYn("Y");
|
) throws Exception {
|
||||||
vEPrcsDetailVO.setLctrDivCd(VeConstants.LCTR_DIV_CD_30);
|
|
||||||
List<VEPrcsDetailVO> vEPrcsDetailVOList = vEPrcsMIXService.selectPrcsList(vEPrcsDetailVO);
|
//로그인 처리====================================
|
||||||
//대상 리스트, 페이징 정보 전달
|
//로그인 정보 가져오기
|
||||||
model.addAttribute("list", vEPrcsDetailVOList);
|
|
||||||
return "oprtn/cpyrgExprnClsrm/oprtnAplctMngReg";
|
|
||||||
|
|
||||||
}
|
String s_oprtnLoginCheckNInfo = checkLoginUtil.oprtnCheckNInfo(model);
|
||||||
|
if (!"".equals(s_oprtnLoginCheckNInfo)) return s_oprtnLoginCheckNInfo;
|
||||||
|
|
||||||
|
LoginVO loginVO = checkLoginUtil.getAuthLoginVO(); //권한에 따른 로그인 정보 가져오기
|
||||||
|
model.addAttribute("loginVO", loginVO);
|
||||||
|
|
||||||
|
//로그인 처리====================================
|
||||||
|
|
||||||
|
|
||||||
|
return "oprtn/cpyrgExprnClsrm/oprtnAplctMngReg";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 저작권체험교실 운영신청서 등록
|
* 저작권체험교실 운영신청서 등록
|
||||||
@ -459,7 +482,222 @@ String[] order = {
|
|||||||
return modelAndView;
|
return modelAndView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 저작권 체험교실 운영신청 목록 업로드 파일 일괄 다운로드
|
||||||
|
* @param model
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "oprtnAplctFileAllDownLoad.do")
|
||||||
|
public void oprtnAplctFileAllDownLoad(@RequestParam Map<String, Object> commandMap
|
||||||
|
, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
|
|
||||||
|
//파일 SN을 리스트에 담기
|
||||||
|
List<String> atchFileIdList = new ArrayList<String>();
|
||||||
|
//파일 SN을 리스트에 담기
|
||||||
|
List<String> atchFileSnList = new ArrayList<String>();
|
||||||
|
|
||||||
|
//split을 이용해 아이디를 각자 배열에 담기
|
||||||
|
String[] splitIdStr = commandMap.get("atchFileId").toString().split(",");
|
||||||
|
String[] splitSnStr = commandMap.get("fileSn").toString().split(",");
|
||||||
|
//zip파일 이름
|
||||||
|
String orgnZipNm = commandMap.get("orgnZipNm").toString();
|
||||||
|
//downloadType (A:ID가 여러개고 fileSn이 1개인 경우 || B:ID는 하나이고 fileSn이 여러개인 경우)
|
||||||
|
String downloadType = commandMap.get("downloadType").toString();
|
||||||
|
|
||||||
|
String atchFileId = new String();
|
||||||
|
String fileSn = new String();
|
||||||
|
|
||||||
|
|
||||||
|
//ID가 여러개고 fileSn이 1개인 경우
|
||||||
|
if("A".equals(downloadType)) {
|
||||||
|
fileSn = "0";
|
||||||
|
for(int i=0; i<splitIdStr.length; i++) {
|
||||||
|
atchFileIdList.add(splitIdStr[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//ID는 하나이고 fileSn이 여러개인 경우
|
||||||
|
if("B".equals(downloadType)) {
|
||||||
|
atchFileId = splitIdStr[0];
|
||||||
|
for(int i=0; i<splitSnStr.length; i++) {
|
||||||
|
atchFileSnList.add(splitSnStr[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FileVO fileVO = new FileVO();
|
||||||
|
fileVO.setDownloadType(downloadType);
|
||||||
|
|
||||||
|
if("A".equals(downloadType)) {
|
||||||
|
fileVO.setAtchFileIdList(atchFileIdList);
|
||||||
|
fileVO.setFileSn(fileSn);
|
||||||
|
} else if("B".equals(downloadType)) {
|
||||||
|
fileVO.setAtchFileId(atchFileId);
|
||||||
|
fileVO.setAtchFileSnList(atchFileSnList);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<FileVO> fvoList = fileService.selectZipFileList(fileVO); // 해당 기능에 맞게 파일 조회
|
||||||
|
|
||||||
|
if(fvoList.size() == 0){
|
||||||
|
response.setContentType("application/x-msdownload");
|
||||||
|
PrintWriter printwriter = response.getWriter();
|
||||||
|
printwriter.println("<html>");
|
||||||
|
printwriter.println("<br><br><br><h2>Could not get file name:<br></h2>");
|
||||||
|
printwriter.println("<br><br><br><center><h3><a href='javascript: history.go(-1)'>Back</a></h3></center>");
|
||||||
|
printwriter.println("<br><br><br>© webAccess");
|
||||||
|
printwriter.println("</html>");
|
||||||
|
printwriter.flush();
|
||||||
|
printwriter.close();
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// buffer size
|
||||||
|
int size = 1024;
|
||||||
|
byte[] buf = new byte[size];
|
||||||
|
|
||||||
|
String outZipNm = fvoList.get(0).getFileStreCours()+File.separator + orgnZipNm;
|
||||||
|
FileInputStream fis = null;
|
||||||
|
ZipArchiveOutputStream zos = null;
|
||||||
|
BufferedInputStream bis = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Zip 파일생성
|
||||||
|
zos = new ZipArchiveOutputStream(new BufferedOutputStream(new FileOutputStream(outZipNm)));
|
||||||
|
|
||||||
|
for ( FileVO vo : fvoList ){
|
||||||
|
zos.setEncoding("UTF-8");
|
||||||
|
|
||||||
|
//buffer에 해당파일의 stream을 입력한다.
|
||||||
|
fis = new FileInputStream(vo.getFileStreCours() + "/" + vo.getStreFileNm());
|
||||||
|
bis = new BufferedInputStream(fis,size);
|
||||||
|
|
||||||
|
//zip에 넣을 다음 entry 를 가져온다.
|
||||||
|
zos.putArchiveEntry(new ZipArchiveEntry(vo.getOrignlFileNm()));
|
||||||
|
|
||||||
|
//준비된 버퍼에서 집출력스트림으로 write 한다.
|
||||||
|
int len;
|
||||||
|
while((len = bis.read(buf,0,size)) != -1) zos.write(buf,0,len);
|
||||||
|
|
||||||
|
bis.close();
|
||||||
|
fis.close();
|
||||||
|
zos.closeArchiveEntry();
|
||||||
|
}
|
||||||
|
|
||||||
|
zos.close();
|
||||||
|
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally{
|
||||||
|
if( zos != null ) zos.close();
|
||||||
|
if( fis != null ) fis.close();
|
||||||
|
if( bis != null ) bis.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
File uFile = new File(fvoList.get(0).getFileStreCours(), orgnZipNm);
|
||||||
|
long fSize = uFile.length();
|
||||||
|
|
||||||
|
if (fSize > 0) {
|
||||||
|
String mimetype = "application/x-msdownload";
|
||||||
|
|
||||||
|
response.setContentType(mimetype);
|
||||||
|
setDisposition(orgnZipNm, request, response);
|
||||||
|
//response.setContentLength(fSize);
|
||||||
|
|
||||||
|
BufferedInputStream in = null;
|
||||||
|
BufferedOutputStream out = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
in = new BufferedInputStream(new FileInputStream(uFile));
|
||||||
|
out = new BufferedOutputStream(response.getOutputStream());
|
||||||
|
|
||||||
|
FileCopyUtils.copy(in, out);
|
||||||
|
out.flush();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
LOGGER.debug("IGNORED: {}", ex.getMessage());
|
||||||
|
} finally {
|
||||||
|
if (in != null) {
|
||||||
|
try {
|
||||||
|
in.close();
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
LOGGER.debug("IGNORED: {}", ignore.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (out != null) {
|
||||||
|
try {
|
||||||
|
out.close();
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
LOGGER.debug("IGNORED: {}", ignore.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//파일 다운로드 후 파일 삭제
|
||||||
|
File delFile = new File(outZipNm);
|
||||||
|
delFile.delete();
|
||||||
|
} else {
|
||||||
|
response.setContentType("application/x-msdownload");
|
||||||
|
PrintWriter printwriter = response.getWriter();
|
||||||
|
printwriter.println("<html>");
|
||||||
|
printwriter.println("<br><br><br><h2>Could not get file name:<br>" + orgnZipNm + "</h2>");
|
||||||
|
printwriter.println("<br><br><br><center><h3><a href='javascript: history.go(-1)'>Back</a></h3></center>");
|
||||||
|
printwriter.println("<br><br><br>© webAccess");
|
||||||
|
printwriter.println("</html>");
|
||||||
|
printwriter.flush();
|
||||||
|
printwriter.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setDisposition(String filename, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
|
String browser = getBrowser(request);
|
||||||
|
|
||||||
|
String dispositionPrefix = "attachment; filename=";
|
||||||
|
String encodedFilename = null;
|
||||||
|
|
||||||
|
if (browser.equals("MSIE")) {
|
||||||
|
encodedFilename = URLEncoder.encode(filename, "UTF-8").replaceAll("\\+", "%20");
|
||||||
|
} else if (browser.equals("Trident")) { // IE11 문자열 깨짐 방지
|
||||||
|
encodedFilename = URLEncoder.encode(filename, "UTF-8").replaceAll("\\+", "%20");
|
||||||
|
} else if (browser.equals("Firefox")) {
|
||||||
|
encodedFilename = "\"" + new String(filename.getBytes("UTF-8"), "8859_1") + "\"";
|
||||||
|
} else if (browser.equals("Opera")) {
|
||||||
|
encodedFilename = "\"" + new String(filename.getBytes("UTF-8"), "8859_1") + "\"";
|
||||||
|
} else if (browser.equals("Chrome")) {
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
for (int i = 0; i < filename.length(); i++) {
|
||||||
|
char c = filename.charAt(i);
|
||||||
|
if (c > '~') {
|
||||||
|
sb.append(URLEncoder.encode("" + c, "UTF-8"));
|
||||||
|
} else {
|
||||||
|
sb.append(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
encodedFilename = sb.toString();
|
||||||
|
} else {
|
||||||
|
//throw new RuntimeException("Not supported browser");
|
||||||
|
throw new IOException("Not supported browser");
|
||||||
|
}
|
||||||
|
|
||||||
|
// response.setHeader("Content-Disposition", dispositionPrefix + encodedFilename); // 파일명에 콤마 포함시 오류
|
||||||
|
response.setHeader("Content-Disposition", dispositionPrefix + "\"" + encodedFilename + "\"");
|
||||||
|
|
||||||
|
if ("Opera".equals(browser)) {
|
||||||
|
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getBrowser(HttpServletRequest request) {
|
||||||
|
String header = request.getHeader("User-Agent");
|
||||||
|
if (header.indexOf("MSIE") > -1) {
|
||||||
|
return "MSIE";
|
||||||
|
} else if (header.indexOf("Trident") > -1) { // IE11 문자열 깨짐 방지
|
||||||
|
return "Trident";
|
||||||
|
} else if (header.indexOf("Chrome") > -1) {
|
||||||
|
return "Chrome";
|
||||||
|
} else if (header.indexOf("Opera") > -1) {
|
||||||
|
return "Opera";
|
||||||
|
}
|
||||||
|
return "Firefox";
|
||||||
|
}
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|||||||
@ -927,4 +927,16 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="userManageDAO.selectOffeduUserList" parameterClass="userVO" resultClass="userVO">
|
||||||
|
/* 임시.*NOT_SQL_LOG.* userManageDAO.selectOffeduUser */
|
||||||
|
SELECT COUNT(mber_id) OVER() AS totCnt,
|
||||||
|
a.mber_id AS mberId
|
||||||
|
FROM lettngnrlmber a
|
||||||
|
WHERE 1=1
|
||||||
|
<isNotEmpty property="searchWord" prepend="AND">
|
||||||
|
a.mber_id LIKE '%'||#searchWord#||'%'
|
||||||
|
</isNotEmpty>
|
||||||
|
OFFSET #firstIndex# ROWS FETCH NEXT #recordCountPerPage# ROWS ONLY;
|
||||||
|
</select>
|
||||||
</sqlMap>
|
</sqlMap>
|
||||||
|
|||||||
@ -53,6 +53,7 @@
|
|||||||
|
|
||||||
<!-- 강사 정보 L page -->
|
<!-- 강사 정보 L page -->
|
||||||
<select id="ScholInfoMIXDAO.selectPagingList" parameterClass="ScholInfoVO" resultClass="ScholInfoVO">
|
<select id="ScholInfoMIXDAO.selectPagingList" parameterClass="ScholInfoVO" resultClass="ScholInfoVO">
|
||||||
|
/* 임시.*NOT_SQL_LOG.* ScholInfoDAO.selectPagingList*/
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(1) OVER() AS totCnt ,
|
COUNT(1) OVER() AS totCnt ,
|
||||||
a.SCHOL_ID AS scholId
|
a.SCHOL_ID AS scholId
|
||||||
@ -81,25 +82,27 @@
|
|||||||
,a.ESTBS_DT AS estbsDt
|
,a.ESTBS_DT AS estbsDt
|
||||||
,a.SCHOL_ANVSRY AS scholAnvsry
|
,a.SCHOL_ANVSRY AS scholAnvsry
|
||||||
,a.LAST_UPDT_PNTTM AS lastUpdtPnttm
|
,a.LAST_UPDT_PNTTM AS lastUpdtPnttm
|
||||||
, IF(b.stndrd_schol_cd IS null,'N','Y') AS isltnScholYn
|
/* , IF(b.stndrd_schol_cd IS null,'N','Y') AS isltnScholYn */
|
||||||
, DECODE(schol_grade_nm, '초등학교','10', '중학교','20', '고등학교','30',if (INSTR(schol_grade_nm,'각종학교')>0,'40','50')) AS scholDivCd
|
, CASE WHEN b.schol_isltn_ord is null THEN 'N' ELSE 'Y' END isltnScholYn
|
||||||
|
/* , DECODE(schol_grade_nm, '초등학교','10', '중학교','20', '고등학교','30',if (INSTR(schol_grade_nm,'각종학교')>0,'40','50')) AS scholDivCd */
|
||||||
|
, DECODE(schol_grade_nm, '초등학교','10', '중학교','20', '고등학교','30',CASE WHEN INSTR(schol_grade_nm, '각종학교') > 0 THEN '40' ELSE '50' END) AS scholDivCd
|
||||||
|
|
||||||
FROM <include refid="ScholInfoMIXDAO.table_name"/> a
|
FROM <include refid="ScholInfoMIXDAO.table_name"/> a
|
||||||
|
|
||||||
LEFT OUTER JOIN ve_schol_isltn b
|
LEFT OUTER JOIN ve_schol_isltn b
|
||||||
ON(a.schol_id=b.schol_id)
|
ON(a.schol_id=b.schol_isltn_ord)
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
<isNotEmpty property="selectPagingListQuery">
|
<isNotEmpty property="selectPagingListQuery">
|
||||||
$selectPagingListQuery$
|
$selectPagingListQuery$
|
||||||
</isNotEmpty>
|
</isNotEmpty>
|
||||||
ORDER BY 1=1
|
ORDER BY 1
|
||||||
<isEmpty property="orderByQuery">
|
<isEmpty property="orderByQuery">
|
||||||
, a.schol_nm asc
|
, a.schol_nm asc
|
||||||
</isEmpty>
|
</isEmpty>
|
||||||
<isNotEmpty property="orderByQuery">
|
<isNotEmpty property="orderByQuery">
|
||||||
, $orderByQuery$
|
, $orderByQuery$
|
||||||
</isNotEmpty>
|
</isNotEmpty>
|
||||||
LIMIT #recordCountPerPage# OFFSET #firstIndex#
|
OFFSET #firstIndex# ROWS FETCH NEXT #recordCountPerPage# ROWS ONLY;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</sqlMap>
|
</sqlMap>
|
||||||
|
|||||||
84
src/main/webapp/WEB-INF/jsp/oprtn/cmm/userPopListBower.jsp
Normal file
84
src/main/webapp/WEB-INF/jsp/oprtn/cmm/userPopListBower.jsp
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<%@ page contentType="text/html; charset=utf-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||||
|
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
<head>
|
||||||
|
<title>학교명 검색</title>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
|
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="${pageContext.request.contextPath}/kccadrPb/usr/script/popup.js"></script>
|
||||||
|
<script type="text/javaScript" language="javascript">
|
||||||
|
$(document).ready(function(){
|
||||||
|
});
|
||||||
|
|
||||||
|
function fncGoList(){
|
||||||
|
linkPage(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function linkPage(pageNo){
|
||||||
|
var popList = document.popList ;
|
||||||
|
popList.pageIndex.value = pageNo ;
|
||||||
|
popList.action = "<c:url value='/kccadr/oprtn/comm/popup/userPopList.do'/>";
|
||||||
|
popList.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function fncUserDataSlct(obj){
|
||||||
|
opener.$("#userId").val(obj.getAttribute('data-value'));
|
||||||
|
self.close();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- 일정 상세 -->
|
||||||
|
<form:form commandName="userManageVO" id="popList" name="popList" method="post" onsubmit="return false;">
|
||||||
|
<input type="hidden" name="pageIndex" value="<c:out value='${searchVO.pageIndex}' default='1' />"/>
|
||||||
|
<input type="hidden" name="pageUnit" value="<c:out value='${searchVO.pageUnit}' default='1' />"/>
|
||||||
|
<input type="hidden" name="searchSortCnd" value="<c:out value="${searchVO.searchSortCnd}" />" />
|
||||||
|
<input type="hidden" name="searchSortOrd" value="<c:out value="${searchVO.searchSortOrd}" />" />
|
||||||
|
|
||||||
|
<div class="area_popup">
|
||||||
|
<div class="cont_popup">
|
||||||
|
<div class="pop_list_top">
|
||||||
|
<input type="text" name="searchWord" id="searchWord" style="width: 450px;" value="<c:out value='${searchVO.searchWord}' />" placeholder="아이디 입력" size="20">
|
||||||
|
<button type="button" class="btn_type08" onclick="fncGoList(); return false;">검색</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pop_tb_type01 list2">
|
||||||
|
<table>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: auto;">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">아이디</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<c:forEach var="row" items="${userList}" varStatus="status">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="#" onclick="fncUserDataSlct(this); return false;" data-value="${row.mberId}"><c:out value="${row.mberId}" /></a>
|
||||||
|
<input type="hidden" name="userId" value="${row.mberId}"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<ui:pagination paginationInfo = "${paginationInfo}" type="image" jsFunction="linkPage" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form:form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -139,6 +139,20 @@ input:read-only {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fileDownLoad() {
|
||||||
|
alert("개발전");
|
||||||
|
return;
|
||||||
|
var listForm = document.listForm;
|
||||||
|
listForm.action = "<c:url value='/kccadr/oprtn/cpyrgExprnClsrm/oprtnAplctFileAllDownLoad.do'/>";
|
||||||
|
listForm.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function fncCreate() {
|
||||||
|
var listForm = document.listForm ;
|
||||||
|
listForm.action = "<c:url value='/kccadr/oprtn/cpyrgExprnClsrm/oprtnAplctMngReg.do'/>";
|
||||||
|
listForm.submit();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<title>신청관리</title>
|
<title>신청관리</title>
|
||||||
</head>
|
</head>
|
||||||
@ -279,7 +293,7 @@ input:read-only {
|
|||||||
<c:if test="${vEEduAplctVO.pageUnit == '100'}">selected</c:if>>100줄</option>
|
<c:if test="${vEEduAplctVO.pageUnit == '100'}">selected</c:if>>100줄</option>
|
||||||
</select>
|
</select>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
onclick="excelDownLoad();">첨부파일 다운로드</button>
|
onclick="fileDownLoad();">첨부파일 다운로드</button>
|
||||||
<button type="button" class="btn_down_excel"
|
<button type="button" class="btn_down_excel"
|
||||||
onclick="excelDownLoad();">엑셀 다운로드</button>
|
onclick="excelDownLoad();">엑셀 다운로드</button>
|
||||||
</div>
|
</div>
|
||||||
@ -385,10 +399,6 @@ input:read-only {
|
|||||||
<!-- //list -->
|
<!-- //list -->
|
||||||
<div class="btn_wrap btn_layout01">
|
<div class="btn_wrap btn_layout01">
|
||||||
<div class="btn_left">
|
<div class="btn_left">
|
||||||
</div>
|
|
||||||
<div class="btn_center">
|
|
||||||
</div>
|
|
||||||
<div class="btn_right">
|
|
||||||
<select name="aprvlCdSelect" id="aprvlCdSelect"class="sel_type1">
|
<select name="aprvlCdSelect" id="aprvlCdSelect"class="sel_type1">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<option value="10">운영신청</option>
|
<option value="10">운영신청</option>
|
||||||
@ -397,7 +407,13 @@ input:read-only {
|
|||||||
<option value="60">운영확정</option>
|
<option value="60">운영확정</option>
|
||||||
<option value="90">운영미확정</option>
|
<option value="90">운영미확정</option>
|
||||||
</select>
|
</select>
|
||||||
<button class="btn_type06" onclick="fncStatusChangeAll(); return false;" >일괄변경</button>
|
<button class="btn_type04" onclick="fncStatusChangeAll(); return false;" >일괄변경</button>
|
||||||
|
</div>
|
||||||
|
<div class="btn_center">
|
||||||
|
</div>
|
||||||
|
<div class="btn_right">
|
||||||
|
|
||||||
|
<button class="btn_type06" onclick="fncCreate(); return false;" >등록</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- page -->
|
<!-- page -->
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user