열람 ,대출등 조건 함수 jsp적용
This commit is contained in:
parent
44b50c772a
commit
6a28c8db70
@ -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,7 +196,14 @@ public class CollectionVO extends PagingVO {
|
||||
* 대출 가능여부를 리턴한다.
|
||||
* @return
|
||||
*/
|
||||
public boolean canRent() {
|
||||
public boolean isAbleRent() {
|
||||
|
||||
// 기본공개
|
||||
if(!isPub()) return false;
|
||||
|
||||
// 대출구분
|
||||
if(StringUtil.getString(operOutRangeCd, "02").equals("02")) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -187,7 +211,17 @@ public class CollectionVO extends PagingVO {
|
||||
* 온라인열람 가능여부를 리턴한다.
|
||||
* @return
|
||||
*/
|
||||
public boolean canOnline() {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -195,7 +229,17 @@ public class CollectionVO extends PagingVO {
|
||||
* 기타 가능여부를 리턴한다.
|
||||
* @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;
|
||||
}
|
||||
|
||||
@ -952,5 +1024,12 @@ public class CollectionVO extends PagingVO {
|
||||
this.domainHostNm = domainHostNm;
|
||||
}
|
||||
|
||||
public String getDigitalReadYn() {
|
||||
return digitalReadYn;
|
||||
}
|
||||
|
||||
public void setDigitalReadYn(String digitalReadYn) {
|
||||
this.digitalReadYn = digitalReadYn;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -170,19 +170,19 @@
|
||||
t_data += "<div class=\"img\"><a><img src=\"" + obj.rprsThumbUrlWithDefaultSmall + "\" alt=\"썸네일\"></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 += "<div class=\"type\">"
|
||||
if(!fn_isEmpty(obj.openDivCd) && obj.openDivCd != "3" && obj.operReadRangeCd == "01" && obj.digitalReadYn == 'Y')
|
||||
if(obj.ableOnline)
|
||||
{
|
||||
t_data += "<span class=\"online\">온라인열람</span>"
|
||||
}
|
||||
if(!fn_isEmpty(obj.openDivCd) && obj.openDivCd != "3" && !fn_isEmpty(obj.operOutRangeCd) && obj.operOutRangeCd != "02")
|
||||
if(obj.ableRent)
|
||||
{
|
||||
t_data += "<span class=\"loan\">대출</span>"
|
||||
}
|
||||
if(!fn_isEmpty(obj.openDivCd) && obj.openDivCd != "3" && !fn_isEmpty(obj.operReadRangeCd) && obj.operReadRangeCd != "03")
|
||||
if(obj.ableRead)
|
||||
{
|
||||
t_data += "<span class=\"visit\">방문열람</span>"
|
||||
}
|
||||
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 += "<span class=\"etc\">기타</span>"
|
||||
}
|
||||
@ -257,7 +257,7 @@
|
||||
{
|
||||
t_btn +="<p>" + obj.operOutRangeNm + obj.operReadRangeNm + "</p>";
|
||||
}
|
||||
if(!fn_isEmpty(obj.interfaceId) && !fn_isEmpty(obj.openDivCd) && obj.openDivCd != '3' && obj.digitalReadYn == 'Y')
|
||||
if(obj.ableOnline)
|
||||
{
|
||||
t_btn+= "<button type=\"button\" class=\"btn-color\" onclick=\"gfn_showDocPdf('" + obj.interfaceId + "','" + obj.masterId + "','" + obj.typeDivCd + "','" + obj.dtlsTypeDivCd + "');\">원문보기</button>";
|
||||
}
|
||||
|
||||
@ -94,16 +94,16 @@ function goList(){
|
||||
<div class="left">
|
||||
<div class="cla">
|
||||
<div class="con-1">
|
||||
<c:if test="${!empty result.openDivCd && result.openDivCd ne '3' && result.operReadRangeCd eq '01' && result.digitalReadYn eq 'Y'}">
|
||||
<c:if test="${result.ableOnline eq true}">
|
||||
<span class="online">온라인열람</span>
|
||||
</c:if>
|
||||
<c:if test="${!empty result.openDivCd && result.openDivCd ne '3' && !empty result.operOutRangeCd && result.operOutRangeCd ne '02'}">
|
||||
<c:if test="${result.ableRent eq true}">
|
||||
<span class="loan">대출</span>
|
||||
</c:if>
|
||||
<c:if test="${!empty result.openDivCd && result.openDivCd ne '3' && !empty result.operReadRangeCd && result.operReadRangeCd ne '03'}">
|
||||
<c:if test="${result.ableRead eq true}">
|
||||
<span class="visit">방문열람</span>
|
||||
</c:if>
|
||||
<c:if test="${!(!empty result.openDivCd && result.openDivCd ne '3') && !(result.operReadRangeCd eq '01' && result.digitalReadYn eq 'Y') && !(!empty result.operOutRangeCd && result.operOutRangeCd ne '02') && !(!empty result.operReadRangeCd && result.operReadRangeCd ne '03') }">
|
||||
<c:if test="${result.ableOther eq true}">
|
||||
<span class="etc">기타</span>
|
||||
</c:if>
|
||||
</div>
|
||||
@ -116,7 +116,7 @@ function goList(){
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="con-1">
|
||||
<c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId) && result.digitalReadYn eq 'Y'}">
|
||||
<c:if test="${result.ableOnline eq true}">
|
||||
<!-- 모바일에서만 노출되는 버튼(class='original') -->
|
||||
<button type="button" class="original" onclick="gfn_showDocPdf('<c:out value="${result.interfaceId}"/>','<c:out value="${result.masterId}"/>','<c:out value="${result.typeDivCd}"/>','<c:out value="${result.dtlsTypeDivCd}"/>')";>원문보기</button>
|
||||
<button type="button" class="view" onclick="gfn_showDocPdf('<c:out value="${result.interfaceId}"/>','<c:out value="${result.masterId}"/>','<c:out value="${result.typeDivCd}"/>','<c:out value="${result.dtlsTypeDivCd}"/>')";>원문보기</button>
|
||||
@ -128,9 +128,7 @@ function goList(){
|
||||
<c:if test='${result.MUseYn != "Y"}'>
|
||||
<button type="button" class="favorit" onclick="fn_changeInterestBtn('${result.masterId }', 'on');">즐겨찾기</button>
|
||||
</c:if>
|
||||
<c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId) && result.digitalReadYn eq 'Y'}">
|
||||
<button type="button" class="share" data-curl="${pdfUri}<c:out value="${result.interfaceId}"/>">공유</button>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="con-2">
|
||||
<div class="de-data">
|
||||
@ -220,9 +218,9 @@ function goList(){
|
||||
</ul>
|
||||
</div>
|
||||
<div class="b-btn">
|
||||
<button type="button" class="btn btn-color" onclick="gfn_rentItem('${result.mngOrgCd}', '${result.masterId}')">대출예약</button>
|
||||
<button type="button" class="btn btn-green" onclick="gfn_reserveReadItem('${result.mngOrgCd}', '${result.masterId}')">방문열람신청</button>
|
||||
<button type="button" class="btn btn-orange" onclick="fn_addRentCart('${result.masterId}', '${result.useStatus}')">카트담기</button>
|
||||
<c:if test="${result.ableRentNow eq true }"><button type="button" class="btn btn-color" onclick="gfn_rentItem('${result.mngOrgCd}', '${result.masterId}')">대출예약</button></c:if>
|
||||
<c:if test="${result.ableReadNow eq true }"><button type="button" class="btn btn-green" onclick="gfn_reserveReadItem('${result.mngOrgCd}', '${result.masterId}')">방문열람신청</button></c:if>
|
||||
<c:if test="${result.ableRentNow eq true or result.ableReadNow eq true}"><button type="button" class="btn btn-orange" onclick="fn_addRentCart('${result.masterId}', '${result.useStatus}')">카트담기</button></c:if>
|
||||
</div>
|
||||
<c:if test="${fn:length(keywordList) > 0 }">
|
||||
<div class="keyword">
|
||||
|
||||
@ -448,16 +448,16 @@ function fn_search_article(pageIndex) {
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="type">
|
||||
<c:if test="${!empty result.openDivCd && result.openDivCd ne '3' && result.operReadRangeCd eq '01' && result.digitalReadYn eq 'Y'}">
|
||||
<c:if test="${result.ableOnline eq true}">
|
||||
<span class="online">온라인열람</span>
|
||||
</c:if>
|
||||
<c:if test="${!empty result.openDivCd && result.openDivCd ne '3' && !empty result.operOutRangeCd && result.operOutRangeCd ne '02'}">
|
||||
<c:if test="${result.ableRent eq true}">
|
||||
<span class="loan">대출</span>
|
||||
</c:if>
|
||||
<c:if test="${!empty result.openDivCd && result.openDivCd ne '3' && !empty result.operReadRangeCd && result.operReadRangeCd ne '03'}">
|
||||
<c:if test="${result.ableOnline eq true}">
|
||||
<span class="visit">방문열람</span>
|
||||
</c:if>
|
||||
<c:if test="${!(!empty result.openDivCd && result.openDivCd ne '3') && !(result.operReadRangeCd eq '01' && result.digitalReadYn eq 'Y') && !(!empty result.operOutRangeCd && result.operOutRangeCd ne '02') && !(!empty result.operReadRangeCd && result.operReadRangeCd ne '03') }">
|
||||
<c:if test="${result.ableOther eq true}">
|
||||
<span class="etc">기타</span>
|
||||
</c:if>
|
||||
</div>
|
||||
@ -481,7 +481,7 @@ function fn_search_article(pageIndex) {
|
||||
</c:if>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId) && result.digitalReadYn eq 'Y'}">
|
||||
<c:if test="${result.ableOnline eq true}">
|
||||
<button type="button" class="btn-color" onclick="gfn_showDocPdf('${result.interfaceId}','${result.masterId}','${result.typeDivCd}','${result.dtlsTypeDivCd}')";>원문보기</button>
|
||||
</c:if>
|
||||
<button type="button" class="btn-gray" onclick="risShow('${result.masterId}');">RIS</button>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user