diff --git a/src/main/java/nlib/col/service/CollectionVO.java b/src/main/java/nlib/col/service/CollectionVO.java index 81500502..c5f253c3 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; + */ + } /** @@ -514,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); @@ -523,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;