백업파일 삭제
This commit is contained in:
parent
1275cc3854
commit
950cb3eaaf
@ -1,27 +0,0 @@
|
|||||||
|
|
||||||
package nlib.col.service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import nlib.restful.service.DataApiReqVO;
|
|
||||||
import nlib.restful.service.DataApiResVO;
|
|
||||||
|
|
||||||
public interface CollectionService_BK
|
|
||||||
{
|
|
||||||
public DataApiResVO listItems(DataApiReqVO reqVO);
|
|
||||||
|
|
||||||
public DataApiResVO insertInterest(DataApiReqVO reqVO);
|
|
||||||
|
|
||||||
public DataApiResVO reserveItem(DataApiReqVO reqVO);
|
|
||||||
|
|
||||||
public DataApiResVO viewOriginalCopy(DataApiReqVO reqVO);
|
|
||||||
|
|
||||||
public DataApiResVO requestViewingItem(DataApiReqVO reqVO);
|
|
||||||
|
|
||||||
public DataApiResVO selectItemInfo(DataApiReqVO reqVO);
|
|
||||||
|
|
||||||
public RisVO selectRisInfo(RisVO vo);
|
|
||||||
|
|
||||||
public List<DeptVO> selectOrgList(CollectionVO vo);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,89 +0,0 @@
|
|||||||
|
|
||||||
package nlib.col.service.impl;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import nlib.col.service.CollectionVO;
|
|
||||||
import nlib.col.service.DeptVO;
|
|
||||||
import nlib.col.service.RisVO;
|
|
||||||
import nlib.restful.DataApi;
|
|
||||||
import nlib.restful.service.DataApiReqVO;
|
|
||||||
import nlib.restful.service.DataApiResVO;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Repository;
|
|
||||||
|
|
||||||
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
|
||||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
|
||||||
import nlib.cmm.service.NotificationVO;
|
|
||||||
import nlib.cmm.service.NlibProperty;
|
|
||||||
import nlib.user.service.NlibLoginVO;
|
|
||||||
import nlib.util.StringUtil;
|
|
||||||
@Repository("collectionDAO_BK")
|
|
||||||
public class CollectionDAO_BK extends EgovComAbstractDAO
|
|
||||||
{
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(CollectionDAO_BK.class);
|
|
||||||
|
|
||||||
/*
|
|
||||||
*//**
|
|
||||||
* 소장 자료 목록을 조회한다.
|
|
||||||
*
|
|
||||||
* @param reqVO
|
|
||||||
* @return
|
|
||||||
*//*
|
|
||||||
public DataApiResVO listItems(DataApiReqVO reqVO) {
|
|
||||||
reqVO.setReqUrl(RESOURCE_URI + "/listItems/list");
|
|
||||||
return get(reqVO);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
public DataApiResVO insertInterest(DataApiReqVO reqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO reserveItem(DataApiReqVO reqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO viewOriginalCopy(DataApiReqVO reqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO requestViewingItem(DataApiReqVO reqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 소장자료를 상세 조회한다.
|
|
||||||
*
|
|
||||||
* @param reqVO
|
|
||||||
* @return
|
|
||||||
*//*
|
|
||||||
public DataApiResVO selectItemInfo(DataApiReqVO reqVO) {
|
|
||||||
}*/
|
|
||||||
|
|
||||||
public DataApiResVO deleteInterest(DataApiReqVO reqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* RIS파일 다운로드 데이터를 조회한다.
|
|
||||||
* @param vo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public RisVO selectRisInfo(RisVO vo) {
|
|
||||||
return selectOne("CollectionDAO.selectRisInfo", vo);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 문화원 목록 조회
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<DeptVO> selectOrgList(CollectionVO vo) {
|
|
||||||
return selectList("CollectionDAO.selectOrgList",vo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,79 +0,0 @@
|
|||||||
|
|
||||||
package nlib.col.service.impl;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import nlib.col.service.CollectionService_BK;
|
|
||||||
import nlib.col.service.CollectionVO;
|
|
||||||
import nlib.col.service.DeptVO;
|
|
||||||
import nlib.col.service.RisVO;
|
|
||||||
import nlib.restful.service.DataApiReqVO;
|
|
||||||
import nlib.restful.service.DataApiResVO;
|
|
||||||
|
|
||||||
@Service("collectionService_BK")
|
|
||||||
public class CollectionServiceImpl_BK implements CollectionService_BK
|
|
||||||
{
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(CollectionServiceImpl_BK.class);
|
|
||||||
|
|
||||||
@Resource(name = "collectionDAO_BK")
|
|
||||||
private CollectionDAO_BK collectionDAO_BK;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 소장자료 목록을 조회한다.
|
|
||||||
*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see nlib.col.service.CollectionService#listItems(nlib.restful.service.DataApiReqVO)
|
|
||||||
*/
|
|
||||||
public DataApiResVO listItems(DataApiReqVO reqVO) {
|
|
||||||
return ((CollectionService_BK) collectionDAO_BK).listItems(reqVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO insertInterest(DataApiReqVO reqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO reserveItem(DataApiReqVO reqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO viewOriginalCopy(DataApiReqVO reqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO requestViewingItem(DataApiReqVO reqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* 소장자료를 상세 조회한다.
|
|
||||||
*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see nlib.col.service.CollectionService#selectItemInfo(nlib.restful.service.DataApiReqVO)
|
|
||||||
*/
|
|
||||||
public DataApiResVO selectItemInfo(DataApiReqVO reqVO) {
|
|
||||||
return ((CollectionService_BK) collectionDAO_BK).selectItemInfo(reqVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* RIS파일 다운로드 데이터를 조회한다.
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see nlib.col.service.CollectionService#selectRisInfo(nlib.col.service.CollectionVO)
|
|
||||||
*/
|
|
||||||
public RisVO selectRisInfo(RisVO vo) {
|
|
||||||
return collectionDAO_BK.selectRisInfo(vo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 문화원 목록 조회
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see nlib.col.service.CollectionService#selectOrgList()
|
|
||||||
*/
|
|
||||||
public List<DeptVO> selectOrgList(CollectionVO vo) {
|
|
||||||
return collectionDAO_BK.selectOrgList(vo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,234 +0,0 @@
|
|||||||
|
|
||||||
package nlib.col.web;
|
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.security.core.Authentication;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.ui.ModelMap;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import nlib.bbs.service.ArticleVO;
|
|
||||||
import nlib.cmm.NlibCommonController;
|
|
||||||
import nlib.cmm.service.CodeService;
|
|
||||||
import nlib.cmm.service.NlibProperty;
|
|
||||||
import nlib.col.service.CollectionService_BK;
|
|
||||||
import nlib.col.service.CollectionVO;
|
|
||||||
import nlib.col.service.DeptVO;
|
|
||||||
import nlib.col.service.RisVO;
|
|
||||||
import nlib.restful.service.DataApiReqVO;
|
|
||||||
import nlib.restful.service.DataApiResVO;
|
|
||||||
import nlib.restful.service.DataApiVO;
|
|
||||||
import nlib.user.service.NlibLoginVO;
|
|
||||||
import nlib.util.StringUtil;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author JSYOO
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
public class CollectionController_BK1006 extends NlibCommonController
|
|
||||||
{
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(CollectionController_BK1006.class);
|
|
||||||
static final String DEFUALT_PAGE_SIZE = NlibProperty.getProperty("list.paging.page.size");
|
|
||||||
|
|
||||||
@Resource(name = "codeService")
|
|
||||||
private CodeService codeService;
|
|
||||||
|
|
||||||
@Resource(name="collectionService_BK")
|
|
||||||
private CollectionService_BK collectionService_BK;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 소장자료 화면을 호출한다.
|
|
||||||
*
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping("/collection/listItems.do")
|
|
||||||
public String listItems(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) throws Exception {
|
|
||||||
String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
|
||||||
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
|
||||||
|
|
||||||
// 페이징 사이즈 코드 목록 조회 (DB방식으로 변경 2021.08.06 KNKIM)
|
|
||||||
List<HashMap<String,String>> pageSizeCodes = codeService.listCodes("PAGE_SIZE_OPTION");
|
|
||||||
|
|
||||||
// 반환 정보
|
|
||||||
model.addAttribute("pageIndex" , pageIndex);
|
|
||||||
model.addAttribute("pageSize" , pageSize);
|
|
||||||
model.addAttribute("searchKeyword", searchKeyword);
|
|
||||||
model.addAttribute("pageSizeCodes", pageSizeCodes);
|
|
||||||
return "nlib/collection/listItems";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 소장자료를 조회한다.
|
|
||||||
*
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping(value="/collection/listItemsAjax.do")
|
|
||||||
public ResponseEntity<String> listItemsAjax(HttpServletRequest req,
|
|
||||||
Authentication authentication, @RequestBody Map<String, String> paramMap) {
|
|
||||||
|
|
||||||
String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
String pageIndex = StringUtil.getString(paramMap.get("pageIndex"), "1");
|
|
||||||
String pageSize = StringUtil.getString(paramMap.get("pageSize") , DEFUALT_PAGE_SIZE);
|
|
||||||
|
|
||||||
//-------------------------------
|
|
||||||
// REQ VO 구성
|
|
||||||
//-------------------------------
|
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
reqVO.setPageIndex(pageIndex);
|
|
||||||
reqVO.setPageSize(pageSize);
|
|
||||||
reqVO.putInfoItem("searchKeyword", searchKeyword);
|
|
||||||
|
|
||||||
// 요청
|
|
||||||
DataApiResVO resVO = collectionService_BK.listItems(reqVO);
|
|
||||||
|
|
||||||
//-------------------------------
|
|
||||||
// JSON변환 응답 처리
|
|
||||||
//-------------------------------
|
|
||||||
// JS-GRID 페이징 처리를 포함한 응답값 처리
|
|
||||||
// {data: [{...}],
|
|
||||||
// itemsCount: 255
|
|
||||||
// }
|
|
||||||
HashMap<String, Object> retMap = new HashMap<String, Object>();
|
|
||||||
retMap.put("data", resVO.getList(DataApiVO.XML_EL_NAME_RECORD));
|
|
||||||
retMap.put("itemsCount", resVO.getRecordTotCount());
|
|
||||||
|
|
||||||
return makeResponseEntityJson(retMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* RIS파일 다운로드
|
|
||||||
* @param vo
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
|
||||||
@RequestMapping(value="/collection/risDownload.do")
|
|
||||||
public void risDownload(HttpServletRequest request,HttpServletResponse response) throws IOException {
|
|
||||||
RisVO vo = new RisVO();
|
|
||||||
vo.setMasterId(request.getParameter("masterId"));
|
|
||||||
|
|
||||||
vo = collectionService_BK.selectRisInfo(vo);
|
|
||||||
|
|
||||||
response.setContentType("text/plain");
|
|
||||||
|
|
||||||
String fileName = vo.getTt();
|
|
||||||
String Ty="";
|
|
||||||
// 브라우저 별 한글 인코딩
|
|
||||||
String header = request.getHeader("User-Agent");
|
|
||||||
if (header.contains("Edge")){
|
|
||||||
fileName = URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20");
|
|
||||||
response.setHeader("Content-Disposition", "attachment;filename=\"" + fileName + ".ris;\"");
|
|
||||||
} else if (header.contains("MSIE") || header.contains("Trident")) { // IE 11버전부터 Trident로 변경되었기때문에 추가해준다.
|
|
||||||
fileName = URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20");
|
|
||||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".ris;");
|
|
||||||
} else if (header.contains("Chrome")) {
|
|
||||||
fileName = URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20");
|
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + ".ris\"");
|
|
||||||
} else if (header.contains("Opera")) {
|
|
||||||
fileName = new String(fileName.getBytes("UTF-8"), "ISO-8859-1");
|
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + ".ris\"");
|
|
||||||
} else if (header.contains("Firefox")) {
|
|
||||||
fileName = new String(fileName.getBytes("UTF-8"), "ISO-8859-1");
|
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=" + fileName + ".ris");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Ty = StringUtil.getString(vo.getTy(), "");
|
|
||||||
|
|
||||||
if(Ty.length() > 3)
|
|
||||||
{
|
|
||||||
Ty.replace("IT_", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
String s = "TY - " + Ty;
|
|
||||||
s+= "\nTI - " + StringUtil.getString(vo.getTt(), "");
|
|
||||||
s+= "\nPY - " + StringUtil.getString(vo.getPy(), "");
|
|
||||||
s+= "\nKW - " + StringUtil.getString(vo.getKw(), "");
|
|
||||||
s+= "\nT2 - " + StringUtil.getString(vo.getT2(), "");
|
|
||||||
s+= "\nA1 - " + StringUtil.getString(vo.getA1(), "");
|
|
||||||
s+= "\nPP - " + StringUtil.getString(vo.getPp(), "");
|
|
||||||
s+= "\nM1 - " + StringUtil.getString(vo.getM1(), "");
|
|
||||||
s+= "\nL4 - " + StringUtil.getString(vo.getL4(), "");
|
|
||||||
s+= "\nER - ";
|
|
||||||
|
|
||||||
InputStream input = new ByteArrayInputStream(s.getBytes("UTF8"));
|
|
||||||
|
|
||||||
int read = 0;
|
|
||||||
byte[] bytes = new byte[1024];
|
|
||||||
OutputStream os = response.getOutputStream();
|
|
||||||
|
|
||||||
while ((read = input.read(bytes)) != -1) {
|
|
||||||
os.write(bytes, 0, read);
|
|
||||||
}
|
|
||||||
os.flush();
|
|
||||||
os.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 소장자료 상세 내용 조회한다.
|
|
||||||
*
|
|
||||||
* @param req
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping("/collection/selectItemInfo.do")
|
|
||||||
public String selectItemInfo(HttpServletRequest req, Authentication authentication, @RequestParam Map<String, String> paramMap, ModelMap model) {
|
|
||||||
// 목록 이동시 전달할 매개변수
|
|
||||||
String searchKeyword = paramMap.get("searchKeyword");
|
|
||||||
String pageIndex = paramMap.get("pageIndex");
|
|
||||||
String pageSize = paramMap.get("pageSize");
|
|
||||||
String message = paramMap.get("message");
|
|
||||||
|
|
||||||
// 게시물 번호
|
|
||||||
String articleNo = paramMap.get("articleNo");
|
|
||||||
|
|
||||||
log.debug("selectQnA > pageIndex = " + pageIndex);
|
|
||||||
log.debug("selectQnA > pageSize = " + pageSize);
|
|
||||||
log.debug("selectQnA > searchKeyword = " + searchKeyword);
|
|
||||||
log.debug("selectQnA > articleNo = " + articleNo);
|
|
||||||
log.debug("selectQnA > message = " + message);
|
|
||||||
|
|
||||||
//-------------------------------
|
|
||||||
// REQ VO 구성
|
|
||||||
//-------------------------------
|
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
reqVO.setPageIndex(pageIndex);
|
|
||||||
reqVO.setPageSize(pageSize);
|
|
||||||
reqVO.putInfoItem("boardNo", "QNA"); // 게시판ID
|
|
||||||
reqVO.putInfoItem("articleNo", articleNo); // 게시물번호
|
|
||||||
|
|
||||||
// 요청
|
|
||||||
DataApiResVO resVO = collectionService_BK.selectItemInfo(reqVO);
|
|
||||||
|
|
||||||
// 반환 정보
|
|
||||||
model.addAttribute("articleNo" , articleNo);
|
|
||||||
model.addAttribute("article" , resVO.getInfo()); // 게시물 상세
|
|
||||||
model.addAttribute("message" , message);
|
|
||||||
model.addAttribute("pageIndex" , pageIndex);
|
|
||||||
model.addAttribute("pageSize" , pageSize);
|
|
||||||
model.addAttribute("searchKeyword", searchKeyword);
|
|
||||||
|
|
||||||
return "nlib/collection/selectItemInfo";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user