이준호 전자조정시스템고도화 커밋
- 조정종결목록 > 검색조건 추가 중
This commit is contained in:
parent
6a4e4c38e6
commit
76c1bccf6e
@ -2,6 +2,7 @@ package kcc.let.solr.search.impl;
|
||||
|
||||
import java.net.URLDecoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@ -12,8 +13,10 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.persistence.criteria.CriteriaBuilder.Case;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
@ -46,6 +49,11 @@ public class SearchServiceImpl implements InitializingBean, SearchService {
|
||||
|
||||
@Value("${Globals.Solr.url}")
|
||||
private String SERVER_URL;
|
||||
|
||||
@Value("${Globals.prod.islocal}")
|
||||
private String islocal;
|
||||
|
||||
|
||||
|
||||
//암복호화 유틸
|
||||
@Resource(name = "egovCryptoUtil")
|
||||
@ -336,11 +344,45 @@ public class SearchServiceImpl implements InitializingBean, SearchService {
|
||||
_q.append(q);
|
||||
}
|
||||
}
|
||||
|
||||
if( !"*:*".equals(_q.toString()) ){
|
||||
|
||||
String searchCondition = (String)commandMap.get("searchCondition");
|
||||
String searchCondition2 = (String)commandMap.get("searchCondition2");
|
||||
|
||||
//검색조건 추가
|
||||
if( !"*:*".equals(_q.toString()) && StringUtils.isEmpty(searchCondition)){
|
||||
_q.insert(0, "*");
|
||||
_q.append("*");
|
||||
}else if( !"*:*".equals(_q.toString()) && !StringUtils.isEmpty(searchCondition)) {
|
||||
|
||||
_q.insert(0, searchCondition + ":*");
|
||||
|
||||
if("adrNo".equals(searchCondition)) {
|
||||
_q.append("*");
|
||||
}else if("appliCantNm".equals(searchCondition)) {
|
||||
if("real".equals(islocal)) {
|
||||
_q = new StringBuilder(searchCondition + ":*" + egovCryptoUtil.encrypt(_q.toString()) + "* OR " + searchCondition + ":*" +MagicDBAPIUtil.encryptOnlyOneString(_q.toString()));
|
||||
}else {
|
||||
_q = new StringBuilder(searchCondition + ":*" + egovCryptoUtil.encrypt(_q.toString()));
|
||||
}
|
||||
_q.append("*");
|
||||
}
|
||||
|
||||
}
|
||||
//종결상태 체크박스
|
||||
if(StringUtils.isNotEmpty(searchCondition2)) {
|
||||
String[] finalCd = searchCondition2.split(",");
|
||||
int index=0;
|
||||
_q.append(" AND (");
|
||||
for(String tmp : finalCd) {
|
||||
if(index != 0) _q.append(" OR ");
|
||||
_q.append("finalStatCd:" + tmp);
|
||||
index++;
|
||||
}
|
||||
_q.append(")");
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (StringUtils.isNotBlank(sdate) && StringUtils.isNotBlank(edate)) {
|
||||
query.addFilterQuery("registDt:["+sdate+" TO "+edate+"]");
|
||||
}
|
||||
|
||||
@ -6,6 +6,8 @@
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
|
||||
<%@ taglib prefix="un" uri="http://jakarta.apache.org/taglibs/unstandard-1.0" %>
|
||||
<un:useConstants var="KccadrConstants" className="kcc.kccadr.cmm.KccadrConstants" />
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
@ -15,6 +17,11 @@
|
||||
$(document).ready(function() {
|
||||
//해당 페이지에 대한 권한 체크
|
||||
_admin_fn_check_authority("adjCloseMangeList", "div.cont", "ALL");
|
||||
|
||||
//종결상태 체크박스 제어
|
||||
<c:forEach var="val" items="${commandMap.searchCondition2}">
|
||||
fncCheckValue('searchCondition2', '${val}')
|
||||
</c:forEach>
|
||||
});
|
||||
|
||||
//권한 체크 결과값으로 후속처리
|
||||
@ -32,6 +39,8 @@
|
||||
var q1 = form.q1.value;
|
||||
if(q1 == "") q1 = ":"
|
||||
listForm.q.value = q1 ;
|
||||
listForm.searchCondition.value = form.searchCondition.value;
|
||||
listForm.searchCondition2.value = getCheckboxValue();
|
||||
listForm.action = "<c:url value='/kccadr/adjclsmgr/adjCloseMangeList.do'/>";
|
||||
listForm.submit();
|
||||
}
|
||||
@ -52,6 +61,24 @@
|
||||
listForm.submit();
|
||||
}
|
||||
|
||||
function fncCheckValue(name, value) {
|
||||
$("input[name=" + name + "]").each(function(index, item) {
|
||||
if (item.value == value) {
|
||||
item.checked = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getCheckboxValue() {
|
||||
const query = 'input[name="searchCondition2"]:checked';
|
||||
const selectedEls =
|
||||
document.querySelectorAll(query);
|
||||
let result = '';
|
||||
selectedEls.forEach((el) => {
|
||||
result += el.value + ',';
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
@ -61,7 +88,8 @@
|
||||
<input type="hidden" name="pageIndex" value="<c:out value='${paginationInfo.currentPageNo}' default='1' />"/>
|
||||
<input type="hidden" name="rangeView" value="kcc_adr_advc" />
|
||||
<input type="hidden" name="q" id="q" value="" />
|
||||
<%-- <input type="hidden" name="searchSortCnd" value="<c:out value="${adjClsMgrVO.searchSortCnd}" />" /> --%>
|
||||
<input type="hidden" name="searchCondition" value="<c:out value="${commandMap.searchCondition}" />" />
|
||||
<input type="hidden" name="searchCondition2" value="<c:out value="${commandMap.searchCondition2}" />" />
|
||||
<%-- <input type="hidden" name="searchSortOrd" value="<c:out value="${adjClsMgrVO.searchSortOrd}" />" /> --%>
|
||||
<%-- <input type="hidden" name="searchStatus" value="<c:out value="${adjClsMgrVO.searchStatus}" />" /> --%>
|
||||
<input type="hidden" name="adrSeq" value="" />
|
||||
@ -87,50 +115,50 @@
|
||||
<div class="list_top">
|
||||
<div class="list_util">
|
||||
<div class="detail_search">
|
||||
<ul>
|
||||
<%--
|
||||
<p>name="q" 검색어 : <input type="text" id="q1" name="q1" value=":"/></p>
|
||||
<p>name="rangeView" 카테고리 : <input type="text" name="rangeView" value="kcc_adr_advc"/></p>
|
||||
<li>
|
||||
<p class="tit_text">구분${adjClsMgrVO.searchCondition}</p>
|
||||
<select name="searchCondition" id="searchCondition">
|
||||
<option value="1" ${adjClsMgrVO.searchCondition eq '1' ? 'selected' : '' }>조정번호</option>
|
||||
<option value="2" ${adjClsMgrVO.searchCondition eq '2' ? 'selected' : '' }>조정조사관</option>
|
||||
<option value="3" ${adjClsMgrVO.searchCondition eq '3' ? 'selected' : '' }>조정부</option>
|
||||
</select>
|
||||
<input type="text" id=searchKeyword name="searchKeyword" class="search_input" placeholder="검색어를 입력하세요" value="<c:out value='${adjClsMgrVO.searchKeyword}'/>">
|
||||
</li>
|
||||
<li>
|
||||
<p class="tit_text">종결일자</p>
|
||||
<div id="sel_date" class="sel_date">
|
||||
<div class="calendar_wrap">
|
||||
<input type="text" class="startDate inp" title="검색시작일" id="startDate01" name="searchStartDt" value="${adjClsMgrVO.searchStartDt}" data-datecontrol="true" readonly>
|
||||
<div class="calendar_in" id="calendarName_startDate" style="z-index: 9;">
|
||||
<button type="button" value="달력 팝업 열기" onclick="return calendarOpen('startDate01-lry','',this)" class="btn_cal"></button>
|
||||
<div id="startDate01-lry" class="calendarPop" style="display: none;">
|
||||
<iframe id="startDate01-ifrm" name="startDate01-ifrm" class="calendar-frame" src="/kccadrPb/adm/calendar.html" title=" 달력 팝업" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
~
|
||||
<div class="calendar_wrap">
|
||||
<input type="text" class="endDate inp" title="검색종료일" id="endDate" name="searchEndDt" value="${adjClsMgrVO.searchEndDt}" data-datecontrol="true" readonly>
|
||||
<div class="calendar_in" id="calendarName_endDate" style="z-index: 9;">
|
||||
<button type="button" value="달력 팝업 열기" onclick="return calendarOpen('endDate-lry','',this)" class="btn_cal" ></button>
|
||||
<div id="endDate-lry" class="calendarPop" style="display: none;">
|
||||
<iframe id="endDate-ifrm" name="endDate-ifrm" class="calendar-frame" src="/kccadrPb/adm/calendar.html"title=" 달력 팝업" frameborder="0" scrolling="no"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn_search" onclick="fncGoList(); return false;">검색</button>
|
||||
</li>
|
||||
--%>
|
||||
<%-- <ul>
|
||||
<li>
|
||||
<p class="tit_text">검색어</p><input type="text" id="q1" name="q1" value="<c:out value="${commandMap.q }" />" onkeyup="if(window.event.keyCode==13){fncGoList()}"/>
|
||||
<button class="btn_search" onclick="fncGoList(); return false;">검색</button>
|
||||
</li>
|
||||
</ul>
|
||||
</ul> --%>
|
||||
<ul>
|
||||
<li>
|
||||
<p class="tit_text">구분</p>
|
||||
<select name="searchCondition" id="searchCondition" onchange="fnSearchClear();">
|
||||
<option value="" <c:if test="${empty commandMap.searchCondition}">selected="selected"</c:if>>전체</option>
|
||||
<option value="adrNo" <c:if test="${commandMap.searchCondition eq 'adrNo'}">selected="selected"</c:if>>조정번호</option>
|
||||
<option value="appliCantNm" <c:if test="${commandMap.searchCondition eq 'appliCantNm'}">selected="selected"</c:if>>신청인</option>
|
||||
</select>
|
||||
<input type="text" id="q1" name="q1" value="<c:out value="${commandMap.q }" />" onkeyup="if(window.event.keyCode==13){fncGoList()}"/>
|
||||
<button class="btn_search" onclick="fncGoList(); return false;">검색</button>
|
||||
</li>
|
||||
<li>
|
||||
<p class="tit_text">종결상태</p>
|
||||
<div class="check_wrap">
|
||||
<span>
|
||||
<input type="checkbox" id="ckStsList1" name="searchCondition2" value="30000*">
|
||||
<label for="ckStsList1">배당 전 취하종결</label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" id="ckStsList2" name="searchCondition2" value="<c:out value="${KccadrConstants.ADR_JJOSU_APPR_COMP}"/>">
|
||||
<label for="ckStsList2">조정조서종결</label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" id="ckStsList3" name="searchCondition2" value="<c:out value="${KccadrConstants.ADR_CNCLTBS_APPR_COMP}"/>">
|
||||
<label for="ckStsList3">취하종결</label>
|
||||
</span>
|
||||
<span>
|
||||
<input type="checkbox" id="ckStsList4" name="searchCondition2" value="<c:out value="${KccadrConstants.ADR_BSRTBS_APPR_COMP}"/>">
|
||||
<label for="ckStsList4">불성립종결</label>
|
||||
</span>
|
||||
|
||||
<span>
|
||||
<input type="checkbox" id="ckStsList5" name="searchCondition2" value="<c:out value="${KccadrConstants.ADR_JKKJS_APPR_COMP}"/>">
|
||||
<label for="ckStsList5">직권조정 성립</label>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user