diff --git a/src/main/java/nlib/col/service/CollectionVO.java b/src/main/java/nlib/col/service/CollectionVO.java index 1ea714be..c4a5d6ff 100644 --- a/src/main/java/nlib/col/service/CollectionVO.java +++ b/src/main/java/nlib/col/service/CollectionVO.java @@ -107,7 +107,6 @@ public class CollectionVO extends PagingVO { protected String regId; /* 등록자ID */ protected String modId; /* 변경자ID */ protected String mUseYn; /* 관심여부 */ - protected String digitalReadYn; /* 디지털열람여부 */ //-------------------------------------------- @@ -156,7 +155,16 @@ public class CollectionVO extends PagingVO { protected String deptNm; /* 관리부서이름 */ protected String domainHostNm; /* 관리부서 호스트주소 */ - + //--------------------------------------------- + // 자료 자체에 대한 서비스 가능 여부 (2021.11.24 추가, 2021.11.23 관계자 협의에 따라 최종 자료에 대한 서비스 가능 여부 API통해 전달받는 걸로 변경됨) + //--------------------------------------------- + protected String digitalReadYn; /* 디지털열람여부 */ + protected String onReqYn; /* 온라인열람 */ + protected String lentYn; /* 대출가능여부 */ + protected String offReqYn; /* 방문열람가능여부 */ + protected String etcYn; /* 기타 여부 */ + + //--------------------------------------------- // 각종 상태 제공 서비스 //--------------------------------------------- @@ -183,13 +191,18 @@ public class CollectionVO extends PagingVO { */ public boolean isAbleRead() { + return "Y".equalsIgnoreCase(StringUtil.getString(getOnReqYn(), "N")); + + /* 각 서비스 가능 여부가 API에 별도 항목으로 추가됨에 따라 이하 주석 처리 2021.11.24) + // 기본공개 if(!isPub()) return false; // 열람여부 if(StringUtil.getString(operReadRangeCd, "03").equals("03")) return false; - return true; + + */ } /** @@ -198,13 +211,18 @@ public class CollectionVO extends PagingVO { */ public boolean isAbleRent() { + return "Y".equalsIgnoreCase(StringUtil.getString(getLentYn(), "N")); + + /* 각 서비스 가능 여부가 API에 별도 항목으로 추가됨에 따라 이하 주석 처리 2021.11.24) + // 기본공개 if(!isPub()) return false; // 대출구분 if(StringUtil.getString(operOutRangeCd, "02").equals("02")) return false; - return true; + return true; + */ } /** @@ -213,6 +231,9 @@ public class CollectionVO extends PagingVO { */ public boolean isAbleOnline() { + return "Y".equalsIgnoreCase(StringUtil.getString(getDigitalReadYn(), "N")); + + /* 각 서비스 가능 여부가 API에 별도 항목으로 추가됨에 따라 이하 주석 처리 2021.11.24) // 기본공개 if(!isPub()) return false; @@ -223,6 +244,7 @@ public class CollectionVO extends PagingVO { if(StringUtil.isEmpty(interfaceId)) return false; return true; + */ } /** @@ -230,7 +252,10 @@ public class CollectionVO extends PagingVO { * @return */ public boolean isAbleOther() { + + return "Y".equalsIgnoreCase(StringUtil.getString(getEtcYn(), "N")); + /* 각 서비스 가능 여부가 API에 별도 항목으로 추가됨에 따라 이하 주석 처리 2021.11.24) // 방문열람여부 if(isAbleRead()) return false; @@ -241,6 +266,8 @@ public class CollectionVO extends PagingVO { if(isAbleOnline()) return false; return true; + */ + } /** @@ -474,8 +501,12 @@ public class CollectionVO extends PagingVO { this.operReadRangeCd = operReadRangeCd; } public String getOperReadRangeNm() { - if(isAbleReadNow()) return "01"; //방문열람신청 가능 - else return "02"; //방문열람신청 불가 + /* 01:전체열람 02: 목록열람 03:열람불가 */ + if("01".equals(operReadRangeCd)) return "전체열람"; + else if("02".equals(operReadRangeCd)) return "목록열람"; + else if("03".equals(operReadRangeCd)) return "열람불가"; + + return operReadRangeNm; } public void setOperReadRangeNm(String operReadRangeNm) { this.operReadRangeNm = operReadRangeNm; @@ -487,9 +518,11 @@ public class CollectionVO extends PagingVO { this.operOutRangeCd = operOutRangeCd; } public String getOperOutRangeNm() { - if(isAbleRentAppNow()) return "01"; //대출신청 가능 - else if(isAbleRentResNow()) return "02"; //대출예약 가능 - else return "03"; //대출신청/예약 불가 + /* 01:대출가능 02: 대출불가 */ + if("01".equals(operOutRangeCd)) return "대출가능"; + else if("02".equals(operOutRangeCd)) return "대출불가"; + + return operOutRangeNm; } public void setOperOutRangeNm(String operOutRangeNm) { this.operOutRangeNm = operOutRangeNm; @@ -508,7 +541,8 @@ public class CollectionVO extends PagingVO { 04 : 열람대기(대출가능) 05 : 이용가능 06 : 열람대기(대출불가능) - 07 : 온라인열람만" + 07 : 온라인열람만 + 99 : 서비스 불가 */ if("01".equals(useStatus)) return "이용가능"; else if("02".equals(useStatus)) return String.format("대출중 (대기자 %s명)", awaiterCnt); @@ -517,8 +551,9 @@ public class CollectionVO extends PagingVO { else if("05".equals(useStatus)) return "이용가능"; else if("06".equals(useStatus)) return "열람대기(대출불가능)"; else if("07".equals(useStatus)) return "온라인열람만"; + else if("99".equals(useStatus)) return "서비스 불가"; - return useStatusNm; + return useStatusNm; // 이외인 경우, 별도 설정 처리된 문구 반환 } public void setUseStatusNm(String useStatusNm) { this.useStatusNm = useStatusNm; @@ -1033,5 +1068,39 @@ public class CollectionVO extends PagingVO { public void setDigitalReadYn(String digitalReadYn) { this.digitalReadYn = digitalReadYn; } + + public String getOnReqYn() { + return onReqYn; + } + + public void setOnReqYn(String onReqYn) { + this.onReqYn = onReqYn; + } + + public String getLentYn() { + return lentYn; + } + + public void setLentYn(String lentYn) { + this.lentYn = lentYn; + } + + public String getOffReqYn() { + return offReqYn; + } + + public void setOffReqYn(String offReqYn) { + this.offReqYn = offReqYn; + } + + public String getEtcYn() { + return etcYn; + } + + public void setEtcYn(String etcYn) { + this.etcYn = etcYn; + } + + } diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp index b469bbfc..f0b024c6 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp @@ -117,8 +117,6 @@ function goList(){
-
-