From 6a28c8db70daf93e7acdff9a16761d5ae2200f2d Mon Sep 17 00:00:00 2001 From: JSYOO Date: Fri, 19 Nov 2021 17:03:04 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=B4=EB=9E=8C=20,=EB=8C=80=EC=B6=9C?= =?UTF-8?q?=EB=93=B1=20=EC=A1=B0=EA=B1=B4=20=ED=95=A8=EC=88=98=20jsp?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/nlib/col/service/CollectionVO.java | 125 ++++++++++++++---- .../jsp/nlib/collection/listInterests.jsp | 10 +- .../jsp/nlib/collection/searchItemDetail.jsp | 18 ++- .../jsp/nlib/collection/searchList.jsp | 10 +- 4 files changed, 120 insertions(+), 43 deletions(-) diff --git a/src/main/java/nlib/col/service/CollectionVO.java b/src/main/java/nlib/col/service/CollectionVO.java index d383477a..2839695f 100644 --- a/src/main/java/nlib/col/service/CollectionVO.java +++ b/src/main/java/nlib/col/service/CollectionVO.java @@ -107,20 +107,14 @@ public class CollectionVO extends PagingVO { protected String regId; /* 등록자ID */ protected String modId; /* 변경자ID */ protected String mUseYn; /* 관심여부 */ - protected String digitalReadYn; /**/ - public String getDigitalReadYn() { - return digitalReadYn; - } + protected String digitalReadYn; /* 디지털열람여부 */ - public void setDigitalReadYn(String digitalReadYn) { - this.digitalReadYn = digitalReadYn; - } //-------------------------------------------- // 카트/관심 항목 //-------------------------------------------- - protected int mbInterestId; /* 관심 id */ - protected String mbInfoId; /* 회원 id */ + protected int mbInterestId; /* 관심 id */ + protected String mbInfoId; /* 회원 id */ protected String mbCartId; /* 카트ID */ protected String cartTypeCd; /* 카트유형코드 */ protected String cartProcDivCd; /* 카트처리구분코드 */ @@ -134,8 +128,8 @@ public class CollectionVO extends PagingVO { protected String bookLtRvStatusNm; /* 대출상태구분코드명 */ protected String rsrvExpctDd; /* 대출예약만료일자 */ protected String rtnDd; /* 반납일자 */ - protected String rsrvDivCd; /* 대출/예약 신청구분코드 */ - protected String rsrvDivNm; /* 대출/예약 신청구분코드명 */ + protected String rsrvDivCd; /* 대출/예약 신청구분코드 */ + protected String rsrvDivNm; /* 대출/예약 신청구분코드명 */ //-------------------------------------------- // 열람관련 @@ -167,11 +161,34 @@ public class CollectionVO extends PagingVO { // 각종 상태 제공 서비스 //--------------------------------------------- + /** + * 기본 공개 여부를 리턴한다. + * + * @return + */ + public boolean isPub() { + + // 사용여부 + if(StringUtil.getString(useYn, "Y").equalsIgnoreCase("N")) return false; + + // 공개여부 (공개, 부분공개 포함) + if(StringUtil.getString(openDivCd, "3").equals("3")) return false; + + return true; + } + /** * 방문열람 가능여부를 리턴한다. * @return */ - public boolean canRead() { + public boolean isAbleRead() { + + // 기본공개 + if(!isPub()) return false; + + // 열람여부 + if(StringUtil.getString(operReadRangeCd, "03").equals("03")) return false; + return true; } @@ -179,23 +196,50 @@ public class CollectionVO extends PagingVO { * 대출 가능여부를 리턴한다. * @return */ - public boolean canRent() { - return true; + public boolean isAbleRent() { + + // 기본공개 + if(!isPub()) return false; + + // 대출구분 + if(StringUtil.getString(operOutRangeCd, "02").equals("02")) return false; + + return true; } /** * 온라인열람 가능여부를 리턴한다. * @return */ - public boolean canOnline() { - return true; + public boolean isAbleOnline() { + + // 기본공개 + if(!isPub()) return false; + + // 디지털열람여부 + if(!StringUtil.getString(digitalReadYn, "N").equalsIgnoreCase("Y")) return false; + + // 인터페이스ID 존재 + if(StringUtil.isEmpty(interfaceId)) return false; + + return true; } /** * 기타 가능여부를 리턴한다. * @return */ - public boolean canOther() { + public boolean isAbleOther() { + + // 기본공개 + if(!isPub()) return false; + + // 방문열람여부 + if(isAbleRead()) return false; + + // 대출여부 + if(isAbleRent()) return false; + return true; } @@ -203,7 +247,14 @@ public class CollectionVO extends PagingVO { * 현재 방문열람 가능여부를 리턴한다. * @return */ - public boolean canReadNow() { + public boolean isAbleReadNow() { + + // 방문열람 가능 자료 + if(!isAbleRead()) return false; + + // 이용상태코드 확인 + if(!":01:04:05:06:".contains(":" + StringUtil.getString(useStatus, "00") + ":")) return false; + return true; } @@ -211,15 +262,22 @@ public class CollectionVO extends PagingVO { * 현재 대출(신청 또는 예약) 가능여부를 리턴한다. * @return */ - public boolean canRentNow() { - return canRentAppNow() || canRentResNow(); + public boolean isAbleRentNow() { + return isAbleRentAppNow() || isAbleRentResNow(); } /** * 현재 대출 [신청] 가능여부를 리턴한다. * @return */ - public boolean canRentAppNow() { + public boolean isAbleRentAppNow() { + + // 대출 가능 자료 + if(!isAbleRent()) return false; + + // 이용상태코드 확인 + if(!":01:".contains(":" + StringUtil.getString(useStatus, "00") + ":")) return false; + return true; } @@ -227,7 +285,14 @@ public class CollectionVO extends PagingVO { * 현재 대출 [예약] 가능여부를 리턴한다. * @return */ - public boolean canRentResNow() { + public boolean isAbleRentResNow() { + + // 대출 가능 자료 + if(!isAbleRent()) return false; + + // 이용상태코드 확인 + if(!":02:".contains(":" + StringUtil.getString(useStatus, "00") + ":")) return false; + return true; } @@ -235,7 +300,14 @@ public class CollectionVO extends PagingVO { * 현재 온라인열람 가능여부를 리턴한다. * @return */ - public boolean canOnlineNow() { + public boolean isAbleOnlineNow() { + + // 대출 가능 자료 + if(!isAbleOnline()) return false; + + // 이용상태코드 확인 + if(!":07:".contains(":" + StringUtil.getString(useStatus, "00") + ":")) return false; + return true; } @@ -951,6 +1023,13 @@ public class CollectionVO extends PagingVO { public void setDomainHostNm(String domainHostNm) { this.domainHostNm = domainHostNm; } + + public String getDigitalReadYn() { + return digitalReadYn; + } + public void setDigitalReadYn(String digitalReadYn) { + this.digitalReadYn = digitalReadYn; + } } diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp index 05c05703..a2feace0 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp @@ -170,19 +170,19 @@ t_data += "
\"썸네일\""; t_data += "\"즐겨찾기\"즐겨찾기
"; t_data += "
" - if(!fn_isEmpty(obj.openDivCd) && obj.openDivCd != "3" && obj.operReadRangeCd == "01" && obj.digitalReadYn == 'Y') + if(obj.ableOnline) { t_data += "온라인열람" } - if(!fn_isEmpty(obj.openDivCd) && obj.openDivCd != "3" && !fn_isEmpty(obj.operOutRangeCd) && obj.operOutRangeCd != "02") + if(obj.ableRent) { t_data += "대출" } - if(!fn_isEmpty(obj.openDivCd) && obj.openDivCd != "3" && !fn_isEmpty(obj.operReadRangeCd) && obj.operReadRangeCd != "03") + if(obj.ableRead) { t_data += "방문열람" } - if(!(!fn_isEmpty(obj.openDivCd) && obj.openDivCd != "3") && !(obj.operReadRangeCd == "01" && obj.digitalReadYn == 'Y') && !(!fn_isEmpty(obj.operOutRangeCd) && obj.operOutRangeCd != "02") && !(!fn_isEmpty(obj.operReadRangeCd) && obj.operReadRangeCd != "03")) + if(obj.ableOther) { t_data += "기타" } @@ -257,7 +257,7 @@ { t_btn +="

" + obj.operOutRangeNm + obj.operReadRangeNm + "

"; } - if(!fn_isEmpty(obj.interfaceId) && !fn_isEmpty(obj.openDivCd) && obj.openDivCd != '3' && obj.digitalReadYn == 'Y') + if(obj.ableOnline) { t_btn+= ""; } 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 b401a8a9..e1c5ccc5 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp @@ -94,16 +94,16 @@ function goList(){
- + 온라인열람 - + 대출 - + 방문열람 - + 기타
@@ -116,7 +116,7 @@ function goList(){
- + @@ -128,9 +128,7 @@ function goList(){ - -
@@ -220,9 +218,9 @@ function goList(){
- - - + + +
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp index 99cf2d79..9cda2eae 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp @@ -448,16 +448,16 @@ function fn_search_article(pageIndex) {
- + 온라인열람 - + 대출 - + 방문열람 - + 기타
@@ -481,7 +481,7 @@ function fn_search_article(pageIndex) {
- +