이용안내 : 문화원별 개폐시간 및 휴일사항 별도 적용 처리
This commit is contained in:
parent
2257db82b4
commit
e305f9377e
@ -51,7 +51,7 @@ public interface InformService
|
|||||||
/*
|
/*
|
||||||
* 이용안내를 조회한다.
|
* 이용안내를 조회한다.
|
||||||
*/
|
*/
|
||||||
public HashMap<String, HashMap<String, String>> selectNCultureOperationInfo(String councilCd) throws Exception ;
|
public HashMap<String, String> selectNCultureOperationInfo(String councilCd) throws Exception ;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 찾아오는길 조회한다.
|
* 찾아오는길 조회한다.
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
@ -37,11 +38,13 @@ public interface InformDAO
|
|||||||
* @param reqVO
|
* @param reqVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public HashMap<String, String> selectInfoContent(String conDivAndCounCd) throws Exception;
|
public HashMap<String, String> selectInfoContent(@Param("mngOrgCd") String mngOrgCd, @Param("contentType") String contentType) throws Exception;
|
||||||
|
|
||||||
public HashMap<String, String> selectOperationEnv(String councilCd) throws Exception;
|
public HashMap<String, String> selectOperationEnv(String orgCd) throws Exception;
|
||||||
|
|
||||||
public HashMap<String, String> selectNCultureAddr(String councilCd) throws Exception;
|
public HashMap<String, String> selectNCultureAddr(String orgCd) throws Exception;
|
||||||
|
|
||||||
|
public HashMap<String, String> selectNCultureOpenTime(String orgCd) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,14 +47,12 @@ public class InformServiceImpl implements InformService
|
|||||||
/*
|
/*
|
||||||
* 이용약관을 조회한다.
|
* 이용약관을 조회한다.
|
||||||
*
|
*
|
||||||
* (non-Javadoc)
|
|
||||||
* @see nlib.info.service.InformService#selectTermsInfo(nlib.restful.service.DataApiReqVO)
|
|
||||||
*/
|
*/
|
||||||
public HashMap<String, String> selectInfoContent(String councilCd, String contentType) throws Exception {
|
public HashMap<String, String> selectInfoContent(String orgCd, String contentType) throws Exception {
|
||||||
|
|
||||||
if(StringUtil.isEmpty(councilCd)) councilCd = NlibProperty.getString("nlib.council.cd");
|
if(StringUtil.isEmpty(orgCd)) orgCd = NlibProperty.getString("nlib.council.cd");
|
||||||
|
|
||||||
HashMap<String, String> ret = informDAO.selectInfoContent(contentType + "@" + councilCd); // conDivAndCounCd
|
HashMap<String, String> ret = informDAO.selectInfoContent(orgCd, contentType);
|
||||||
if(ret == null) {
|
if(ret == null) {
|
||||||
ret = new HashMap<String, String>();
|
ret = new HashMap<String, String>();
|
||||||
ret.put("TITLE", "(없음)");
|
ret.put("TITLE", "(없음)");
|
||||||
@ -70,9 +68,9 @@ public class InformServiceImpl implements InformService
|
|||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see nlib.info.service.InformService#selectTermsInfo(nlib.restful.service.DataApiReqVO)
|
* @see nlib.info.service.InformService#selectTermsInfo(nlib.restful.service.DataApiReqVO)
|
||||||
*/
|
*/
|
||||||
public HashMap<String, String> selectTermsInfo(String councilCd) throws Exception {
|
public HashMap<String, String> selectTermsInfo(String orgCd) throws Exception {
|
||||||
|
|
||||||
return selectInfoContent(councilCd, "TERMS");
|
return selectInfoContent(orgCd, "TERMS");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -81,9 +79,9 @@ public class InformServiceImpl implements InformService
|
|||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see nlib.info.service.InformService#selectPrivacyInfo(nlib.restful.service.DataApiReqVO)
|
* @see nlib.info.service.InformService#selectPrivacyInfo(nlib.restful.service.DataApiReqVO)
|
||||||
*/
|
*/
|
||||||
public HashMap<String, String> selectPrivacyInfo(String councilCd) throws Exception {
|
public HashMap<String, String> selectPrivacyInfo(String orgCd) throws Exception {
|
||||||
|
|
||||||
return selectInfoContent(councilCd, "PRIVACY");
|
return selectInfoContent(orgCd, "PRIVACY");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -92,37 +90,40 @@ public class InformServiceImpl implements InformService
|
|||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see nlib.info.service.InformService#selectGreeting(nlib.restful.service.DataApiReqVO)
|
* @see nlib.info.service.InformService#selectGreeting(nlib.restful.service.DataApiReqVO)
|
||||||
*/
|
*/
|
||||||
public HashMap<String, String> selectGreeting(String councilCd) throws Exception {
|
public HashMap<String, String> selectGreeting(String orgCd) throws Exception {
|
||||||
|
|
||||||
return selectInfoContent(councilCd, "GREETING");
|
return selectInfoContent(orgCd, "GREETING");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 이용안내를 조회한다.
|
* 이용안내를 조회한다.
|
||||||
*
|
*
|
||||||
* (non-Javadoc)
|
|
||||||
* @see nlib.info.service.InformService#selectNCultureOperationInfo(nlib.restful.service.DataApiReqVO)
|
|
||||||
*/
|
*/
|
||||||
public HashMap<String, HashMap<String, String>> selectNCultureOperationInfo(String councilCd) throws Exception {
|
public HashMap<String, String> selectNCultureOperationInfo(String orgCd) throws Exception {
|
||||||
|
|
||||||
HashMap<String, HashMap<String, String>> operationInfo = new HashMap<String, HashMap<String, String>>();
|
HashMap<String, String> operationInfo = new HashMap<String, String>();
|
||||||
|
|
||||||
HashMap<String, String> envValues = informDAO.selectOperationEnv(councilCd);
|
HashMap<String, String> envValues = informDAO.selectOperationEnv(orgCd);
|
||||||
|
|
||||||
//-----------------------------
|
// 대출안내 : 전체 문화원 공통 사항
|
||||||
// 전체 문화원 공통 사항
|
|
||||||
//-----------------------------
|
|
||||||
// 대출안내
|
|
||||||
HashMap<String, String> operation = selectInfoContent(NlibProperty.getString("nlib.council.cd"), "OPERATION");
|
HashMap<String, String> operation = selectInfoContent(NlibProperty.getString("nlib.council.cd"), "OPERATION");
|
||||||
if(envValues != null && operation != null && operation.get("CONTENT") != null) {
|
String content = (operation != null ? operation.get("CONTENT") : "");
|
||||||
String content = operation.get("CONTENT");
|
|
||||||
|
if(envValues != null && StringUtil.isNotEmpty(content)) {
|
||||||
|
|
||||||
for(String key : envValues.keySet()) {
|
for(String key : envValues.keySet()) {
|
||||||
content = content.replaceAll("%" + key + "%", StringUtil.getString(envValues.get(key), ""));
|
content = content.replaceAll("%" + key + "%", StringUtil.getString(envValues.get(key), ""));
|
||||||
}
|
}
|
||||||
operation.put("CONTENT", content);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
operationInfo.put("OPERATION", operation);
|
// 문화원별 개폐시간 및 휴관일
|
||||||
|
HashMap<String, String> openTime = informDAO.selectNCultureOpenTime(orgCd);
|
||||||
|
|
||||||
|
operationInfo.put("informTitle" , (operation != null ? operation.get("TITLE") : ""));
|
||||||
|
operationInfo.put("informContent" , content);
|
||||||
|
operationInfo.put("openTime" , (openTime != null ? openTime.get("OPEN_TIME") : ""));
|
||||||
|
operationInfo.put("closeTime" , (openTime != null ? openTime.get("CLOSED_TIME") : ""));
|
||||||
|
operationInfo.put("closingInfo" , (openTime != null ? openTime.get("CLOSING_INFO") : ""));
|
||||||
|
|
||||||
return operationInfo;
|
return operationInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,10 +123,13 @@ public class InformController extends NlibCommonController {
|
|||||||
@RequestMapping("/inform/selectNCultureOperationInfo.do")
|
@RequestMapping("/inform/selectNCultureOperationInfo.do")
|
||||||
public String selectNCultureOperationInfo(HttpServletRequest request, Authentication authentication, ModelMap model) throws Exception {
|
public String selectNCultureOperationInfo(HttpServletRequest request, Authentication authentication, ModelMap model) throws Exception {
|
||||||
|
|
||||||
HashMap<String, HashMap<String, String>> ret = informService.selectNCultureOperationInfo(getCurCouncilCd(request));
|
// 이용안내 내용
|
||||||
|
HashMap<String, String> ret = informService.selectNCultureOperationInfo(getCurCouncilCd(request));
|
||||||
model.addAttribute("informTitle", ret.get("TITLE"));
|
model.addAttribute("informTitle", ret.get("informTitle"));
|
||||||
if(ret.get("OPERATION") != null) model.addAttribute("informContent", ((HashMap<String, String>)ret.get("OPERATION")).get("CONTENT"));
|
model.addAttribute("informContent", ret.get("informContent"));
|
||||||
|
model.addAttribute("openTime", ret.get("openTime"));
|
||||||
|
model.addAttribute("closeTime", ret.get("closeTime"));
|
||||||
|
model.addAttribute("closingInfo", ret.get("closingInfo"));
|
||||||
|
|
||||||
return "nlib/inform/selectNCultureOperationInfo";
|
return "nlib/inform/selectNCultureOperationInfo";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,12 +12,21 @@
|
|||||||
, CONTENT
|
, CONTENT
|
||||||
, BD_ATTACH_FILE_ATTACH_FILE_ID
|
, BD_ATTACH_FILE_ATTACH_FILE_ID
|
||||||
FROM BD_NLIB_CONTENT_PAGE A
|
FROM BD_NLIB_CONTENT_PAGE A
|
||||||
WHERE A.CONTENT_TYPE = SUBSTRING(#{conDivAndCounCd}, 1, INSTR(#{conDivAndCounCd}, '@') - 1)
|
WHERE A.CONTENT_TYPE = #{contentType}
|
||||||
AND A.MNG_ORG_CD = SUBSTRING(#{conDivAndCounCd}, INSTR(#{conDivAndCounCd}, '@') + 1)
|
AND A.MNG_ORG_CD = #{mngOrgCd}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectNCultureOpenTime" parameterType="String" resultType="HashMap">
|
||||||
|
SELECT
|
||||||
|
OPEN_TIME
|
||||||
|
, CLOSED_TIME
|
||||||
|
, CLOSING_INFO
|
||||||
|
FROM SM_DEPT A
|
||||||
|
WHERE A.ORG_CD = #{orgCd}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectOperationEnv" parameterType="String" resultType="HashMap">
|
<select id="selectOperationEnv" parameterType="String" resultType="HashMap">
|
||||||
<!-- Param : councilCd -->
|
<!-- Param : orgCd -->
|
||||||
SELECT
|
SELECT
|
||||||
MAX(CASE WHEN GUBUN = 'MAX_LEND_DAYS' THEN ENV_VAL ELSE NULL END) AS MAX_LEND_DAYS
|
MAX(CASE WHEN GUBUN = 'MAX_LEND_DAYS' THEN ENV_VAL ELSE NULL END) AS MAX_LEND_DAYS
|
||||||
, MAX(CASE WHEN GUBUN = 'MAX_LEND_COUNT' THEN ENV_VAL ELSE NULL END) AS MAX_LEND_COUNT
|
, MAX(CASE WHEN GUBUN = 'MAX_LEND_COUNT' THEN ENV_VAL ELSE NULL END) AS MAX_LEND_COUNT
|
||||||
@ -43,7 +52,7 @@
|
|||||||
, LATITUDE
|
, LATITUDE
|
||||||
, LONGITUDE
|
, LONGITUDE
|
||||||
FROM SM_DEPT A
|
FROM SM_DEPT A
|
||||||
WHERE ORG_CD = #{councilCd}
|
WHERE ORG_CD = #{orgCd}
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -70,13 +70,13 @@ $( document ).ready(function() {
|
|||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<p>운영시간</p>
|
<p>운영시간</p>
|
||||||
<p><span>오전</span>9:00 - <span>오후</span>6:00</p>
|
<p><span>오전</span>${openTime } - <span>오후</span>${closeTime }</p>
|
||||||
<p>평일 (월요일 ~ 금요일) 운영</p>
|
<p>평일 (월요일 ~ 금요일) 운영</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<p>휴관일</p>
|
<p>휴관일</p>
|
||||||
<p>매주 토, 일요일 <span>휴관</span></p>
|
<p>매주 토, 일요일 <span>휴관</span></p>
|
||||||
<p>관공서의 휴관일 및 국가가 정한 임시 공휴일 휴관</p>
|
<p>${closingInfo }</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user