자료항목, 썸네일 등 정리
This commit is contained in:
parent
6a7622c1b4
commit
60433d6d90
@ -36,16 +36,6 @@ public interface CollectionService {
|
|||||||
*/
|
*/
|
||||||
public CollectionVO getItemInfo(CollectionVO searchVO) throws Exception;
|
public CollectionVO getItemInfo(CollectionVO searchVO) throws Exception;
|
||||||
|
|
||||||
/**
|
|
||||||
* 자료 상세정보를 조회한다.
|
|
||||||
* 썸네일이 정보가 없는 경우, defaultThumnailUrl로 설정한다.
|
|
||||||
* @param searchVO
|
|
||||||
* @param defaultThumnailUrl
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public CollectionVO getItemInfo(CollectionVO searchVO, String defaultThumnailUrl) throws Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 목록의 자료정보에 상세정보를 조회하여 설정한 후 리턴한다.
|
* 목록의 자료정보에 상세정보를 조회하여 설정한 후 리턴한다.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -42,14 +42,17 @@ public class CollectionVO extends PagingVO {
|
|||||||
protected String regDd; /* 등록일자 */
|
protected String regDd; /* 등록일자 */
|
||||||
protected String mngOrgNm; /* 관리처리과명 */
|
protected String mngOrgNm; /* 관리처리과명 */
|
||||||
protected String mngOrgCd; /* 관리처리과코드 */
|
protected String mngOrgCd; /* 관리처리과코드 */
|
||||||
|
|
||||||
protected String typeDivCd; /* 상위자료유형코드 */
|
protected String typeDivCd; /* 상위자료유형코드 */
|
||||||
protected String typeDivNm; /* 상위자료유형명 (도서간행물/문서/도면 등) : API 이름이 변경됨 typeCodeNm -> typeDivNm */
|
protected String typeDivNm; /* 상위자료유형명 (도서간행물/문서/도면 등) : API 이름이 변경됨 typeCodeNm -> typeDivNm */
|
||||||
protected String dtlsTypeDivCd; /* 세부유형코드 */
|
protected String dtlsTypeDivCd; /* 세부유형코드 */
|
||||||
protected String dtlsTypeDivNm; /* 세부유형명 */
|
protected String dtlsTypeDivNm; /* 세부유형명 */
|
||||||
protected String subjectNmUp; /* 상위주제분야명*/
|
|
||||||
protected String subjectCodeUp ; /* 상위주제분야코드*/
|
protected String subjectNmUp; /* 상위주제분야명(대) */
|
||||||
protected String subjectNm; /* 주제분야명 */
|
protected String subjectCdUp ; /* 상위주제분야코드(대) */
|
||||||
protected String subjectCode; /* 주제분야코드 */
|
protected String subjectNm; /* 주제분야명(소) */
|
||||||
|
protected String subjectCd; /* 주제분야코드(소) */
|
||||||
|
|
||||||
protected String orgNm; /* 생산기관명 */
|
protected String orgNm; /* 생산기관명 */
|
||||||
protected String creatYyyy; /* 생산년도 */
|
protected String creatYyyy; /* 생산년도 */
|
||||||
protected String interfaceId; /* 지역N문화서비스ID */
|
protected String interfaceId; /* 지역N문화서비스ID */
|
||||||
@ -210,23 +213,34 @@ public class CollectionVO extends PagingVO {
|
|||||||
this.title = title;
|
this.title = title;
|
||||||
}
|
}
|
||||||
public String getRprsThumbUrl() {
|
public String getRprsThumbUrl() {
|
||||||
return rprsThumbUrl;
|
return StringUtil.isNotEmpty(rprsThumbUrl) ? NlibProperty.getString("thumbnail.image.url.prefix", "") + rprsThumbUrl : "";
|
||||||
}
|
}
|
||||||
public String getRprsThumbUrlWithDefault() {
|
|
||||||
return StringUtil.isEmpty(rprsThumbUrl) ? NlibProperty.getString("thumbnail.image.url.middle") : rprsThumbUrl;
|
public String getRprsThumbUrlWithDefaultSmall() {
|
||||||
|
return getRprsThumbUrlWithDefaultId("thumbnail.image.url.small");
|
||||||
}
|
}
|
||||||
|
public String getRprsThumbUrlWithDefaultMiddle() {
|
||||||
|
return getRprsThumbUrlWithDefaultId("thumbnail.image.url.middle");
|
||||||
|
}
|
||||||
|
public String getRprsThumbUrlWithDefaultBig() {
|
||||||
|
return getRprsThumbUrlWithDefaultId("thumbnail.image.url.big");
|
||||||
|
}
|
||||||
|
public String getRprsThumbUrlWithDefaultId(String propName) {
|
||||||
|
|
||||||
|
if(StringUtil.isEmpty(rprsThumbUrl)) return NlibProperty.getString(propName);
|
||||||
|
if(rprsThumbUrl.startsWith("http")) return rprsThumbUrl;
|
||||||
|
|
||||||
|
return NlibProperty.getString("thumbnail.image.url.prefix", "") + rprsThumbUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public void setRprsThumbUrl(String rprsThumbUrl) {
|
public void setRprsThumbUrl(String rprsThumbUrl) {
|
||||||
setRprsThumbUrl(rprsThumbUrl, null);
|
|
||||||
}
|
|
||||||
public void setRprsThumbUrl(String rprsThumbUrl, String defaultImgUrl) {
|
|
||||||
|
|
||||||
if(StringUtil.isEmpty(rprsThumbUrl) || !(rprsThumbUrl.startsWith("/") || rprsThumbUrl.startsWith("http"))) {
|
if(StringUtil.isEmpty(rprsThumbUrl) || !(rprsThumbUrl.startsWith("/") || rprsThumbUrl.startsWith("http"))) {
|
||||||
// 썸네일이 비어있거나, 유효하지 않은 문자로 시작되는 경우, defaultImgUrl로 입력
|
// 썸네일이 비어있거나, 유효하지 않은 문자로 시작되는 경우
|
||||||
this.rprsThumbUrl = defaultImgUrl;
|
this.rprsThumbUrl = null;
|
||||||
} else {
|
} else {
|
||||||
// 그렇지 않은 경우, 입력된 썸네일로 설정
|
// 그렇지 않은 경우, 입력된 썸네일로 설정
|
||||||
if(rprsThumbUrl.startsWith("http")) this.rprsThumbUrl = rprsThumbUrl;
|
this.rprsThumbUrl = rprsThumbUrl;
|
||||||
else this.rprsThumbUrl = NlibProperty.getString("thumbnail.image.url.prefix", "") + rprsThumbUrl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public String getUseYn() {
|
public String getUseYn() {
|
||||||
@ -755,20 +769,20 @@ public class CollectionVO extends PagingVO {
|
|||||||
this.subjectNmUp = subjectNmUp;
|
this.subjectNmUp = subjectNmUp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSubjectCodeUp() {
|
public String getSubjectCdUp() {
|
||||||
return subjectCodeUp;
|
return subjectCdUp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSubjectCodeUp(String subjectCodeUp) {
|
public void setSubjectCdUp(String subjectCdUp) {
|
||||||
this.subjectCodeUp = subjectCodeUp;
|
this.subjectCdUp = subjectCdUp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSubjectCode() {
|
public String getSubjectCd() {
|
||||||
return subjectCode;
|
return subjectCd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSubjectCode(String subjectCode) {
|
public void setSubjectCd(String subjectCd) {
|
||||||
this.subjectCode = subjectCode;
|
this.subjectCd = subjectCd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRsrvDivCd() {
|
public String getRsrvDivCd() {
|
||||||
|
|||||||
@ -63,20 +63,6 @@ public class CollectionServiceImpl implements CollectionService {
|
|||||||
*/
|
*/
|
||||||
public CollectionVO getItemInfo(CollectionVO searchVO) throws Exception {
|
public CollectionVO getItemInfo(CollectionVO searchVO) throws Exception {
|
||||||
|
|
||||||
return getItemInfo(searchVO, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 자료 상세정보를 조회한다.
|
|
||||||
* 썸네일이 정보가 없는 경우, defaultThumnailUrl로 설정한다.
|
|
||||||
*
|
|
||||||
* @param searchVO
|
|
||||||
* @param defaultThumnailUrl
|
|
||||||
* @return
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public CollectionVO getItemInfo(CollectionVO searchVO, String defaultThumnailUrl) throws Exception {
|
|
||||||
|
|
||||||
String message = null;
|
String message = null;
|
||||||
|
|
||||||
// 입력값 확인
|
// 입력값 확인
|
||||||
@ -103,7 +89,6 @@ public class CollectionServiceImpl implements CollectionService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtil.isEmpty(retVO.getRprsThumbUrl())) retVO.setRprsThumbUrl(defaultThumnailUrl);
|
|
||||||
retVO.setResultCode(resVO.getResultCode());
|
retVO.setResultCode(resVO.getResultCode());
|
||||||
retVO.setResultMessage(resVO.getResultMessage());
|
retVO.setResultMessage(resVO.getResultMessage());
|
||||||
|
|
||||||
@ -185,26 +170,35 @@ public class CollectionServiceImpl implements CollectionService {
|
|||||||
if(cVO == null) continue;
|
if(cVO == null) continue;
|
||||||
|
|
||||||
vo.setTitle (cVO.getTitle());
|
vo.setTitle (cVO.getTitle());
|
||||||
vo.setTypeDivCd (cVO.getTypeDivCd());
|
|
||||||
vo.setTypeCodeNm (cVO.getTypeCodeNm());
|
vo.setTypeDivCd (StringUtil.getString(cVO.getTypeDivCd() , vo.getTypeDivCd()));
|
||||||
vo.setSubjectNm (cVO.getSubjectNm());
|
vo.setTypeCodeNm (StringUtil.getString(cVO.getTypeCodeNm() , vo.getTypeCodeNm()));
|
||||||
vo.setOrgNm (cVO.getOrgNm());
|
vo.setDtlsTypeDivCd (StringUtil.getString(cVO.getDtlsTypeDivCd() , vo.getDtlsTypeDivCd()));
|
||||||
vo.setCreatYyyy (cVO.getCreatYyyy());
|
vo.setDtlsTypeDivNm (StringUtil.getString(cVO.getDtlsTypeDivNm() , vo.getDtlsTypeDivNm()));
|
||||||
vo.setRprsThumbUrl (cVO.getRprsThumbUrl(), defaultThumbnailUrl);
|
|
||||||
vo.setInterfaceId (cVO.getInterfaceId());
|
vo.setSubjectCdUp (StringUtil.getString(cVO.getSubjectCdUp() , vo.getSubjectCdUp()));
|
||||||
vo.setOpenDivCd (cVO.getOpenDivCd());
|
vo.setSubjectNmUp (StringUtil.getString(cVO.getSubjectNmUp() , vo.getSubjectNmUp()));
|
||||||
vo.setOperReadRangeCd(cVO.getOperReadRangeCd());
|
vo.setSubjectCd (StringUtil.getString(cVO.getSubjectCd() , vo.getSubjectCd()));
|
||||||
vo.setOperOutRangeCd (cVO.getOperOutRangeCd());
|
vo.setSubjectNm (StringUtil.getString(cVO.getSubjectNm() , vo.getSubjectNm()));
|
||||||
vo.setUseStatus (cVO.getUseStatus());
|
|
||||||
vo.setRtnExpctDd (StringUtil.formatDateStr(cVO.getRtnExpctDd(), "-"));
|
vo.setOrgNm (StringUtil.getString(cVO.getOrgNm() , vo.getOrgNm()));
|
||||||
vo.setAwaiterCnt (cVO.getAwaiterCnt());
|
vo.setCreatYyyy (StringUtil.getString(cVO.getCreatYyyy() , vo.getCreatYyyy()));
|
||||||
vo.setBookLentPsblYn (cVO.getBookLentPsblYn());
|
vo.setRprsThumbUrl (StringUtil.getString(cVO.getRprsThumbUrl() , vo.getRprsThumbUrl()));
|
||||||
vo.setRsrvPsblYn (cVO.getRsrvPsblYn());
|
vo.setInterfaceId (StringUtil.getString(cVO.getInterfaceId() , vo.getInterfaceId()));
|
||||||
vo.setReqPsblYn (cVO.getReqPsblYn());
|
vo.setOpenDivCd (StringUtil.getString(cVO.getOpenDivCd() , vo.getOpenDivCd()));
|
||||||
vo.setInterestYn (cVO.getInterestYn());
|
vo.setOperReadRangeCd(StringUtil.getString(cVO.getOperReadRangeCd(), vo.getOperReadRangeCd()));
|
||||||
vo.setMUseYn (cVO.getMUseYn());
|
vo.setOperOutRangeCd (StringUtil.getString(cVO.getOperOutRangeCd() , vo.getOperOutRangeCd()));
|
||||||
vo.setMngOrgCd (cVO.getMngOrgCd());
|
vo.setUseStatus (StringUtil.getString(cVO.getUseStatus() , vo.getUseStatus()));
|
||||||
vo.setMngOrgNm (cVO.getMngOrgNm());
|
vo.setRtnExpctDd (StringUtil.formatDateStr(cVO.getRtnExpctDd() , "-"));
|
||||||
|
vo.setAwaiterCnt (StringUtil.getInt (cVO.getAwaiterCnt() , vo.getAwaiterCnt()));
|
||||||
|
vo.setBookLentPsblYn (StringUtil.getString(cVO.getBookLentPsblYn() , vo.getBookLentPsblYn()));
|
||||||
|
vo.setRsrvPsblYn (StringUtil.getString(cVO.getRsrvPsblYn() , vo.getRsrvPsblYn()));
|
||||||
|
vo.setReqPsblYn (StringUtil.getString(cVO.getReqPsblYn() , vo.getReqPsblYn()));
|
||||||
|
vo.setInterestYn (StringUtil.getString(cVO.getInterestYn() , vo.getInterestYn()));
|
||||||
|
vo.setMUseYn (StringUtil.getString(cVO.getMUseYn() , vo.getMUseYn()));
|
||||||
|
|
||||||
|
vo.setMngOrgCd (StringUtil.getString(cVO.getMngOrgCd() , vo.getMngOrgCd()));
|
||||||
|
vo.setMngOrgNm (StringUtil.getString(cVO.getMngOrgNm() , vo.getMngOrgNm()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
@ -1,33 +0,0 @@
|
|||||||
package nlib.sample.service;
|
|
||||||
|
|
||||||
import nlib.restful.service.DataApiReqVO;
|
|
||||||
import nlib.restful.service.DataApiResVO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <pre>
|
|
||||||
* @Class Name : SampleDataApiService.java
|
|
||||||
*
|
|
||||||
* @Description : RESTful API 호출 샘플
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
|
||||||
*
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @ ------------ -------- ---------------------------
|
|
||||||
* @ 수정일 수정자 수정내용
|
|
||||||
* @ ------------ -------- ---------------------------
|
|
||||||
* @ 2021. 6. 22. KNKIM 최초 생성
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
|
||||||
* @since 2021. 6. 22.
|
|
||||||
* @version 1.0
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface SampleDataApiService {
|
|
||||||
|
|
||||||
public DataApiResVO getSampleInfo(DataApiReqVO reqVO) throws Exception;
|
|
||||||
|
|
||||||
public DataApiResVO getItemInfo(DataApiReqVO reqVO) throws Exception;
|
|
||||||
}
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
package nlib.sample.service.impl;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import nlib.restful.DataApi;
|
|
||||||
import nlib.restful.service.DataApiReqVO;
|
|
||||||
import nlib.restful.service.DataApiResVO;
|
|
||||||
import nlib.sample.service.SampleDataApiService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <pre>
|
|
||||||
* @Class Name : SampleDataApiServiceImpl.java
|
|
||||||
*
|
|
||||||
* @Description : RESTful API 호출 샘플
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
|
||||||
*
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @ ------------ -------- ---------------------------
|
|
||||||
* @ 수정일 수정자 수정내용
|
|
||||||
* @ ------------ -------- ---------------------------
|
|
||||||
* @ 2021. 6. 22. KNKIM 최초 생성
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
|
||||||
* @since 2021. 6. 22.
|
|
||||||
* @version 1.0
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Service("sampleDataApiService")
|
|
||||||
public class SampleDataApiServiceImpl implements SampleDataApiService {
|
|
||||||
|
|
||||||
/** RESTFul API 송수신 모듈 */
|
|
||||||
@Resource(name = "dataApi")
|
|
||||||
private DataApi dataApi;
|
|
||||||
|
|
||||||
public DataApiResVO getSampleInfo(DataApiReqVO reqVO) throws Exception {
|
|
||||||
return dataApi.request(reqVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DataApiResVO getItemInfo(DataApiReqVO reqVO) throws Exception {
|
|
||||||
return dataApi.request(reqVO);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,176 +0,0 @@
|
|||||||
package nlib.sample.web;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.http.HttpMethod;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.ui.ModelMap;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
|
|
||||||
import nlib.cmm.NlibCommonController;
|
|
||||||
import nlib.restful.service.DataApiReqVO;
|
|
||||||
import nlib.restful.service.DataApiResVO;
|
|
||||||
import nlib.restful.service.DataApiVO;
|
|
||||||
import nlib.sample.service.SampleDataApiService;
|
|
||||||
import nlib.user.service.NlibLoginVO;
|
|
||||||
import nlib.util.StringUtil;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <pre>
|
|
||||||
* @Class Name : SampleDataApiController.java
|
|
||||||
*
|
|
||||||
* @Description : RESTful API 호출 샘플
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
|
|
||||||
*
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @ ------------ -------- ---------------------------
|
|
||||||
* @ 수정일 수정자 수정내용
|
|
||||||
* @ ------------ -------- ---------------------------
|
|
||||||
* @ 2021. 6. 22. KNKIM 최초 생성
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author 이씨플라자 * DIGITALSHIP KNKIM
|
|
||||||
* @since 2021. 6. 22.
|
|
||||||
* @version 1.0
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
public class SampleDataApiController extends NlibCommonController {
|
|
||||||
|
|
||||||
/** SampleDataApiService */
|
|
||||||
@Resource(name = "sampleDataApiService")
|
|
||||||
private SampleDataApiService sampleDataApiService;
|
|
||||||
|
|
||||||
|
|
||||||
/* DataApi 접속 서버 정보 */
|
|
||||||
@Value("#{properties['dataapi.server.ip']}")
|
|
||||||
private String dataapiServerIp;
|
|
||||||
|
|
||||||
@Value("#{properties['dataapi.server.port']}")
|
|
||||||
private String dataapiServerPort;
|
|
||||||
|
|
||||||
@Value("#{properties['dataapi.server.protocol']}")
|
|
||||||
private String dataapiServerProtocol;
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping("/sample/getSampleInfoForm.do")
|
|
||||||
public String getSampleInfoForm(ModelMap model) throws Exception {
|
|
||||||
|
|
||||||
model.addAttribute("serverProtocol", dataapiServerIp);
|
|
||||||
model.addAttribute("serverIp", dataapiServerPort);
|
|
||||||
model.addAttribute("serverPort", dataapiServerProtocol);
|
|
||||||
return "nlib/sample/getSampleInfoForm";
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping("/sample/getSampleInfo.do")
|
|
||||||
public String getSampleInfo(@RequestParam Map<String, Object> commandMap, ModelMap model) throws Exception {
|
|
||||||
|
|
||||||
String page = (String) commandMap.get("page");
|
|
||||||
String rows = (String) commandMap.get("rows");
|
|
||||||
|
|
||||||
DataApiReqVO reqVO = new DataApiReqVO();
|
|
||||||
reqVO.setPageIndex(page);
|
|
||||||
reqVO.setPageSize(rows);
|
|
||||||
|
|
||||||
DataApiResVO resVO = sampleDataApiService.getSampleInfo(reqVO);
|
|
||||||
model.addAttribute("result", resVO);
|
|
||||||
|
|
||||||
return "nlib/sample/getSampleInfo";
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping("/sample/getItemInfo.do")
|
|
||||||
public String getItemInfo(HttpServletRequest request, @RequestParam Map<String, String> commandMap, ModelMap model) throws Exception {
|
|
||||||
|
|
||||||
String message = null;
|
|
||||||
|
|
||||||
DataApiReqVO reqVO = new DataApiReqVO("/uac/service/nlib/col/getItemInfo", HttpMethod.GET);
|
|
||||||
|
|
||||||
String mngOrgCd = commandMap.get("mngOrgCd");
|
|
||||||
String masterId = commandMap.get("masterId");
|
|
||||||
String typeDivCd = commandMap.get("typeDivCd");
|
|
||||||
|
|
||||||
if(StringUtil.isEmpty(mngOrgCd) || StringUtil.isEmpty(masterId) || StringUtil.isEmpty(typeDivCd)) {
|
|
||||||
message = "필수정보값이 입력되지 않았습니다.";
|
|
||||||
model.addAttribute("message", message);
|
|
||||||
return "nlib/sample/getItemInfo";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 변수 설정
|
|
||||||
reqVO.putInfoItem("mngOrgCd", mngOrgCd);
|
|
||||||
reqVO.putInfoItem("masterId", masterId);
|
|
||||||
reqVO.putInfoItem("typeDivCd", typeDivCd);
|
|
||||||
|
|
||||||
// 사용자ID 설정
|
|
||||||
NlibLoginVO nlibLoginVO = getNlibLoginVO(request);
|
|
||||||
if(nlibLoginVO != null && !StringUtil.isEmpty(nlibLoginVO.getMbInfoId())) {
|
|
||||||
reqVO.setMbInfoId(nlibLoginVO.getMbInfoId());
|
|
||||||
}
|
|
||||||
|
|
||||||
// API 호출
|
|
||||||
DataApiResVO resVO = sampleDataApiService.getItemInfo(reqVO);
|
|
||||||
|
|
||||||
// 결과값 전달
|
|
||||||
model.addAttribute("resultCode", resVO.getResultCode());
|
|
||||||
model.addAttribute("resultMessage", resVO.getResultMessage());
|
|
||||||
model.addAttribute("info", resVO.getInfo());
|
|
||||||
|
|
||||||
// 참고 정보 : API 접속 서버 정보
|
|
||||||
model.addAttribute("serverProtocol", dataapiServerIp);
|
|
||||||
model.addAttribute("serverIp", dataapiServerPort);
|
|
||||||
model.addAttribute("serverPort", dataapiServerProtocol);
|
|
||||||
|
|
||||||
return "nlib/sample/getItemInfo";
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping("/sample/listRentItem.do")
|
|
||||||
public String listRentItem(HttpServletRequest request, @RequestParam Map<String, String> commandMap, ModelMap model) throws Exception {
|
|
||||||
|
|
||||||
String message = null;
|
|
||||||
|
|
||||||
DataApiReqVO reqVO = new DataApiReqVO("/uac/service/nlib/rent/listRentItem", HttpMethod.GET);
|
|
||||||
|
|
||||||
// 변수 설정
|
|
||||||
reqVO.putInfoItem("rows", getParamStr(commandMap, "rows", "10"));
|
|
||||||
reqVO.putInfoItem("page", getParamStr(commandMap, "rows", "1"));
|
|
||||||
reqVO.putInfoItem("mngOrgCd", getParamStr(commandMap, "mngOrgCd", "KCCF"));
|
|
||||||
reqVO.setMbInfoId("M1000000001"); //putInfoItem("mbInfoId", getParamStr(commandMap, "mbInfoId", "BDCCAF34CF8AA365C660ADB121CE6741"));
|
|
||||||
|
|
||||||
// 사용자ID 설정
|
|
||||||
// NlibLoginVO nlibLoginVO = getNlibLoginVO(request);
|
|
||||||
// if(nlibLoginVO != null && !StringUtil.isEmpty(nlibLoginVO.getMbInfoId())) {
|
|
||||||
// reqVO.setMbInfoId(nlibLoginVO.getMbInfoId());
|
|
||||||
// }
|
|
||||||
|
|
||||||
// API 호출
|
|
||||||
DataApiResVO resVO = sampleDataApiService.getItemInfo(reqVO);
|
|
||||||
|
|
||||||
// 입력 매개변수 전달
|
|
||||||
model.addAttribute("rows", resVO.getRecordTotCount());
|
|
||||||
model.addAttribute("page", resVO.getPageIndex());
|
|
||||||
model.addAttribute("mngOrgCd", resVO.getInfoItem("mngOrgCd"));
|
|
||||||
model.addAttribute("mbInfoId", resVO.getInfoItem("mbInfoId"));
|
|
||||||
|
|
||||||
// 결과값 전달
|
|
||||||
model.addAttribute("resultCode", resVO.getResultCode());
|
|
||||||
model.addAttribute("resultMessage", resVO.getResultMessage());
|
|
||||||
model.addAttribute("info", resVO.getInfo());
|
|
||||||
model.addAttribute("list", resVO.getList(DataApiVO.XML_EL_NAME_RECORD));
|
|
||||||
|
|
||||||
// 참고 정보 : API 접속 서버 정보
|
|
||||||
model.addAttribute("serverProtocol", dataapiServerIp);
|
|
||||||
model.addAttribute("serverIp", dataapiServerPort);
|
|
||||||
model.addAttribute("serverPort", dataapiServerProtocol);
|
|
||||||
|
|
||||||
return "nlib/sample/listRentItem";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -273,7 +273,7 @@ public class NlibSearchController extends NlibCommonController {
|
|||||||
CollectionVO vo = new CollectionVO();
|
CollectionVO vo = new CollectionVO();
|
||||||
vo.setMasterId(masterId);
|
vo.setMasterId(masterId);
|
||||||
vo.setMbInfoId(mbInfoId);
|
vo.setMbInfoId(mbInfoId);
|
||||||
vo = collectionService.getItemInfo(vo,NlibProperty.getString("thumbnail.image.url.big"));
|
vo = collectionService.getItemInfo(vo);
|
||||||
|
|
||||||
|
|
||||||
String councilCd = (String)session.getAttribute("councilCd");
|
String councilCd = (String)session.getAttribute("councilCd");
|
||||||
|
|||||||
@ -73,7 +73,7 @@ public class StringUtil extends StringUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Null 이거나, 빈문자열(공백 포함)인 경우, true를 리턴한다.
|
* Null 이거나, 빈문자열(공백 포함)인 경우, replaceStr를 리턴한다.
|
||||||
*
|
*
|
||||||
* @param str
|
* @param str
|
||||||
* @return
|
* @return
|
||||||
@ -83,6 +83,17 @@ public class StringUtil extends StringUtils {
|
|||||||
else return str;
|
else return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0 이거나, 음수인 경우, replaceInt를 리턴한다.
|
||||||
|
*
|
||||||
|
* @param str
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static int getInt(int val, int replaceInt) {
|
||||||
|
if(val <= 0) return replaceInt;
|
||||||
|
else return val;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Null이 아니고 빈문자열(공백 포함)이 아닌 일반 문자가 존재하는 , true를 리턴한다.
|
* Null이 아니고 빈문자열(공백 포함)이 아닌 일반 문자가 존재하는 , true를 리턴한다.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -86,6 +86,21 @@
|
|||||||
AND IFNULL(M2.PE_STATUS, '') = '' /* 보존상태 */
|
AND IFNULL(M2.PE_STATUS, '') = '' /* 보존상태 */
|
||||||
ORDER BY M2.MOD_DD DESC, M2.REG_DD DESC
|
ORDER BY M2.MOD_DD DESC, M2.REG_DD DESC
|
||||||
LIMIT 10 )
|
LIMIT 10 )
|
||||||
|
UNION
|
||||||
|
(/* DDDDDDDDDDDDDDDDDDDDDDDDDDDD 테스트 확인용 */
|
||||||
|
SELECT
|
||||||
|
2 AS RNK
|
||||||
|
, M2.MASTER_ID
|
||||||
|
, M2.TITLE
|
||||||
|
, M2.TYPE_DIV_CD
|
||||||
|
, TDC.S_CODE_NM AS TYPE_DIV_NM
|
||||||
|
, M2.RPRS_THUMB_URL
|
||||||
|
, M2.REG_DD
|
||||||
|
, M2.MOD_DD
|
||||||
|
FROM RG_MASTER M2
|
||||||
|
JOIN SM_CODE_S TDC ON M2.TYPE_DIV_CD = TDC.S_CODE_ID AND TDC.L_CODE_ID = 'MASTER_TYPE_DIV_CD'
|
||||||
|
ORDER BY M2.MOD_DD DESC, M2.REG_DD DESC
|
||||||
|
LIMIT 2 )
|
||||||
) T
|
) T
|
||||||
ORDER BY RNK, T.MOD_DD DESC, T.REG_DD DESC
|
ORDER BY RNK, T.MOD_DD DESC, T.REG_DD DESC
|
||||||
LIMIT 10
|
LIMIT 10
|
||||||
@ -141,7 +156,7 @@
|
|||||||
<!-- 온라인자료관 -->
|
<!-- 온라인자료관 -->
|
||||||
<select id="listOnline" parameterType="String" resultType="CollectionVO">
|
<select id="listOnline" parameterType="String" resultType="CollectionVO">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
SELECT
|
(SELECT
|
||||||
M.MASTER_ID
|
M.MASTER_ID
|
||||||
, M.TITLE
|
, M.TITLE
|
||||||
, M.TYPE_DIV_CD
|
, M.TYPE_DIV_CD
|
||||||
@ -173,7 +188,34 @@
|
|||||||
AND IFNULL(M.M_INTERFACE_ID, '') != '' /* IF존재하는 건 */
|
AND IFNULL(M.M_INTERFACE_ID, '') != '' /* IF존재하는 건 */
|
||||||
AND IFNULL(M.RPRS_THUMB_URL, '') != '' /* 썸네일 존재하는 자료에 한정 : 2021.11.15 엑티버 김혜준대리 내부근무 과장님통해 요청 */
|
AND IFNULL(M.RPRS_THUMB_URL, '') != '' /* 썸네일 존재하는 자료에 한정 : 2021.11.15 엑티버 김혜준대리 내부근무 과장님통해 요청 */
|
||||||
ORDER BY M.MOD_DD DESC, M.REG_DD DESC
|
ORDER BY M.MOD_DD DESC, M.REG_DD DESC
|
||||||
LIMIT 10
|
LIMIT 10)
|
||||||
|
UNION
|
||||||
|
(/* DDDDDDDDDDDDDDDDDDDDDDDDDDDD 테스트 확인용 */
|
||||||
|
SELECT
|
||||||
|
M.MASTER_ID
|
||||||
|
, M.TITLE
|
||||||
|
, M.TYPE_DIV_CD
|
||||||
|
, C1.S_CODE_NM AS TYPE_DIV_NM
|
||||||
|
, M.DTLS_TYPE_DIV_CD
|
||||||
|
, C2.S_CODE_NM DTLS_TYPE_DIV_NM
|
||||||
|
, M.SUBJECT_CODE
|
||||||
|
, ( SELECT CLSF_NM
|
||||||
|
FROM CT_CLSF
|
||||||
|
WHERE CLSF_ID = (
|
||||||
|
SELECT UP_CLSF_ID FROM CT_CLSF
|
||||||
|
WHERE CLSF_ID = CAST(M.SUBJECT_CODE AS CHAR(35)) )
|
||||||
|
AND UP_CLSF_ID = '2') AS SUBJECT_NM_UP
|
||||||
|
, (SELECT CLSF_NM FROM CT_CLSF WHERE CLSF_ID = CAST(M.SUBJECT_CODE AS CHAR(35))) AS SUBJECT_NM
|
||||||
|
, M.MOD_DD
|
||||||
|
, M.ORG_NM
|
||||||
|
, M.CREAT_YYYY
|
||||||
|
, M.RPRS_THUMB_URL
|
||||||
|
, IFNULL(M.M_INTERFACE_ID, '') AS INTERFACE_ID
|
||||||
|
FROM RG_MASTER M
|
||||||
|
LEFT OUTER JOIN SM_CODE_S C1 ON M.TYPE_DIV_CD = C1.S_CODE_ID AND C1.L_CODE_ID = 'MASTER_TYPE_DIV_CD'
|
||||||
|
LEFT OUTER JOIN SM_CODE_S C2 ON M.DTLS_TYPE_DIV_CD = C2.S_CODE_ID AND C2.L_CODE_ID = 'DTLS_TYPE_DIV_CD'
|
||||||
|
ORDER BY M.MOD_DD DESC, M.REG_DD DESC
|
||||||
|
LIMIT 3)
|
||||||
]]>
|
]]>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -301,7 +301,7 @@ $(document).ready(function() {
|
|||||||
<div class="t-chk"><input type="checkbox" name="chk_item_${cart.mngOrgCd }" id="chk_item_${cart.mngOrgCd }" value="${cart.masterId }" ><label for="chk_item_${cart.mngOrgCd }" style="display:none">문화원선택</label></div>
|
<div class="t-chk"><input type="checkbox" name="chk_item_${cart.mngOrgCd }" id="chk_item_${cart.mngOrgCd }" value="${cart.masterId }" ><label for="chk_item_${cart.mngOrgCd }" style="display:none">문화원선택</label></div>
|
||||||
<div class="t-data">
|
<div class="t-data">
|
||||||
<div class="img">${cart.interestYn }
|
<div class="img">${cart.interestYn }
|
||||||
<a href="javascript:void(0)"><img src="${cart.rprsThumbUrl }" alt="썸네일" width="60" height="91" title="상세보기" onclick="gfn_getDetail('${cart.masterId }')"></a>
|
<a href="javascript:void(0)"><img src="${cart.rprsThumbUrlWithDefaultSmall }" alt="썸네일" width="60" height="91" title="상세보기" onclick="gfn_getDetail('${cart.masterId }')"></a>
|
||||||
<sec:authorize access="isAuthenticated()">
|
<sec:authorize access="isAuthenticated()">
|
||||||
|
|
||||||
<c:if test='${cart.MUseYn == "Y"}'>
|
<c:if test='${cart.MUseYn == "Y"}'>
|
||||||
|
|||||||
@ -158,7 +158,7 @@ function fn_listPops(typeDivCd) {
|
|||||||
|
|
||||||
<div class="swiper-slide">
|
<div class="swiper-slide">
|
||||||
<div class="list-box">
|
<div class="list-box">
|
||||||
<div class="images"><a href="javascript:void(0)" onclick="gfn_getDetail('${itemPick.masterId }')" title="상세조회"><img src="${itemPick.rprsThumbUrlWithDefault }" alt="상세조회"></a></div>
|
<div class="images"><a href="javascript:void(0)" onclick="gfn_getDetail('${itemPick.masterId }')" title="상세조회"><img src="${itemPick.rprsThumbUrlWithDefaultMiddle }" alt="상세조회"></a></div>
|
||||||
<div class="subject">
|
<div class="subject">
|
||||||
<a href="javascript:void(0)" onclick="gfn_getDetail('${itemPick.masterId }')" title="상세조회">
|
<a href="javascript:void(0)" onclick="gfn_getDetail('${itemPick.masterId }')" title="상세조회">
|
||||||
<span class="block"><span class="cla">${itemPick.typeDivNm }</span></span>
|
<span class="block"><span class="cla">${itemPick.typeDivNm }</span></span>
|
||||||
@ -255,7 +255,7 @@ function fn_listPops(typeDivCd) {
|
|||||||
<div class="List">
|
<div class="List">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<span class="image-frame"><img src="${itemOnline.rprsThumbUrlWithDefault }" alt="썸네일" /></span>
|
<span class="image-frame"><img src="${itemOnline.rprsThumbUrlWithDefaultMiddle }" alt="썸네일" /></span>
|
||||||
<div class="detail-cover">
|
<div class="detail-cover">
|
||||||
<strong>${itemOnline.title }</strong>
|
<strong>${itemOnline.title }</strong>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@ -167,7 +167,7 @@
|
|||||||
// 출력
|
// 출력
|
||||||
$.each(jsonObj.data,function(key,obj) {
|
$.each(jsonObj.data,function(key,obj) {
|
||||||
var t_data = "";
|
var t_data = "";
|
||||||
t_data += "<div class=\"img\"><a><img src=\"" + obj.rprsThumbUrlWithDefault + "\"</a>";
|
t_data += "<div class=\"img\"><a><img src=\"" + obj.rprsThumbUrlWithDefaultSmall + "\"</a>";
|
||||||
t_data += "<span id=\"favorites_" + obj.masterId + "\" class=\"favorites\" onclick=\"deleteInterests('single','" + obj.masterId + "');\"><img src=\"/images/icon/icon-cart-Favorites-on.png\" class=\"off\" alt=\"즐겨찾기 아이콘\"><img src=\"/images/icon/icon-cart-Favorites.png\" class=\"on\" alt=\"즐겨찾기 아이콘\"></span></div>";
|
t_data += "<span id=\"favorites_" + obj.masterId + "\" class=\"favorites\" onclick=\"deleteInterests('single','" + obj.masterId + "');\"><img src=\"/images/icon/icon-cart-Favorites-on.png\" class=\"off\" alt=\"즐겨찾기 아이콘\"><img src=\"/images/icon/icon-cart-Favorites.png\" class=\"on\" alt=\"즐겨찾기 아이콘\"></span></div>";
|
||||||
t_data += "<div class=\"type\">"
|
t_data += "<div class=\"type\">"
|
||||||
if(!fn_isEmpty(obj.openDivCd) && obj.openDivCd != "3" && obj.operReadRangeCd == "01" && obj.digitalReadYn == 'Y')
|
if(!fn_isEmpty(obj.openDivCd) && obj.openDivCd != "3" && obj.operReadRangeCd == "01" && obj.digitalReadYn == 'Y')
|
||||||
|
|||||||
@ -123,7 +123,7 @@ function goList(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tit"><c:out value="${result.title}"/></div>
|
<div class="tit"><c:out value="${result.title}"/></div>
|
||||||
<div class="img"><img src="<c:out value="${result.rprsThumbUrlWithDefault}"/>" alt="썸네일"></div>
|
<div class="img"><img src="<c:out value="${result.rprsThumbUrlWithDefaultBig}"/>" alt="썸네일"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="con-1">
|
<div class="con-1">
|
||||||
@ -343,7 +343,7 @@ function goList(){
|
|||||||
<div class="List" onclick="gfn_getDetail('${result.masterId}','${result.domainHostNm }');">
|
<div class="List" onclick="gfn_getDetail('${result.masterId}','${result.domainHostNm }');">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<span class="image-frame"><img src="${result.rprsThumbUrlWithDefault }" alt=""/></span>
|
<span class="image-frame"><img src="${result.rprsThumbUrlWithDefaultMiddle }" alt=""/></span>
|
||||||
<div class="detail-cover">
|
<div class="detail-cover">
|
||||||
<strong>${result.title }</strong>
|
<strong>${result.title }</strong>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@ -144,7 +144,7 @@
|
|||||||
|
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="thum">
|
<div class="thum">
|
||||||
<a href="javascript:void(0);" onclick="gfn_getDetail('${item.masterId }')"><img src="${item.rprsThumbUrl }" width="130" height="196" alt="썸네일"></a>
|
<a href="javascript:void(0);" onclick="gfn_getDetail('${item.masterId }')"><img src="${item.rprsThumbUrlWithDefaultSmall }" width="130" height="196" alt="썸네일"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<div class="ti">${item.title }</div>
|
<div class="ti">${item.title }</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user