법정동명 목록 조회 쿼리 추가

main
이범준 1 year ago
parent 5b6ab6cbb5
commit a1f321bb70

@ -1,5 +1,7 @@
package cokr.xit.fims.crdn.dao; package cokr.xit.fims.crdn.dao;
import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
@ -25,4 +27,14 @@ public interface GlobalStngMapper extends AbstractMapper {
return selectSggCd(currentUser().getInstitute()); return selectSggCd(currentUser().getInstitute());
}; };
/** .<br />
* @param sggCd
* @return
*/
List<String> selectStdgNmList(String sggCd);
default List<String> selectStdgNmListForCurrentUser() {
String sggCd = selectSggCd(currentUser().getInstitute());
return selectStdgNmList(sggCd);
};
} }

@ -102,6 +102,9 @@ public class Crdn05Controller extends ApplicationController {
String urlTaskSeCd = hReq.getServletPath().split("/")[1]; String urlTaskSeCd = hReq.getServletPath().split("/")[1];
mav.addObject("taskSeCd", urlTaskSeCd); mav.addObject("taskSeCd", urlTaskSeCd);
mav.addObject("sggCd", globalStngMapper.selectSggCdForCurrentUser()); mav.addObject("sggCd", globalStngMapper.selectSggCdForCurrentUser());
mav.addObject("stdgNmList", globalStngMapper.selectStdgNmListForCurrentUser());
String vltnByTask = ""; String vltnByTask = "";
switch(urlTaskSeCd) { switch(urlTaskSeCd) {

@ -19,6 +19,7 @@ import cokr.xit.base.file.web.FileInfoFactory;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.Crdn; import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.GlobalStngMapper;
import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.fims.cvlc.service.CrdnCvlcptService; import cokr.xit.fims.cvlc.service.CrdnCvlcptService;
@ -46,6 +47,9 @@ public class Cvlc01Controller extends ApplicationController {
; ;
} }
@Resource(name="globalStngMapper")
protected GlobalStngMapper globalStngMapper;
@Resource(name="crdnService") @Resource(name="crdnService")
private CrdnService crdnService; private CrdnService crdnService;
@ -152,6 +156,7 @@ public class Cvlc01Controller extends ApplicationController {
mav.addObject("openerPageName", hReq.getParameter("openerPageName")); mav.addObject("openerPageName", hReq.getParameter("openerPageName"));
mav.addObject("stdgNmList", globalStngMapper.selectStdgNmListForCurrentUser());
String vltnByTask = ""; String vltnByTask = "";
switch(urlTaskSeCd) { switch(urlTaskSeCd) {

@ -27,4 +27,17 @@ SELECT SGG_CD
WHERE INST_CD = #{institute} WHERE INST_CD = #{institute}
</select> </select>
<select id="selectStdgNmList" parameterType="string" resultType="string">
/* 법정동코드 목록 조회(globalStngMapper.selectStdgNmList) */
SELECT CONCAT(A.EMD_NM,
CASE WHEN A.LI_NM = ''
THEN ''
ELSE CONCAT(' ', A.LI_NM)
END) AS STDG_NM
FROM TB_STDG_INFO A
WHERE A.STDG_CD LIKE CONCAT(#{sggCd},'%')
AND A.STDG_CD != CONCAT(#{sggCd},'00000')
ORDER BY A.EMD_NM, A.LI_NM
</select>
</mapper> </mapper>

@ -57,8 +57,12 @@
<div class="col-md-4 select2-primary"> <div class="col-md-4 select2-primary">
<label for="crdnStdgNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">법정동</label> <label for="crdnStdgNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">법정동</label>
<input type="text" id="crdnStdgNm--${pageName}" name="crdnStdgNm" data-map="CRDN_STDG_NM" <input type="text" id="crdnStdgNm--${pageName}" name="crdnStdgNm" data-map="CRDN_STDG_NM"
class="form-control w-px-150" readonly/> class="form-control w-px-150" list="stdgNmList--${pageName}" />
<button type="button" class="btn btn-sm btn-outline-dark" onclick="">검색</button> <datalist id="stdgNmList--${pageName}">
<c:forEach items="${stdgNmList}" var="item">
<option value="${item}"></option>
</c:forEach>
</datalist>
</div> </div>
<div class="col-md-4 select2-primary"> <div class="col-md-4 select2-primary">
<label for="crdnRoadNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">도로명</label> <label for="crdnRoadNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">도로명</label>

@ -72,8 +72,13 @@
</div> </div>
<div class="col-md-6 select2-primary"> <div class="col-md-6 select2-primary">
<label for="crdnStdgNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">법정동</label> <label for="crdnStdgNm--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">법정동</label>
<input type="text" id="crdnStdgNm--${pageName}" name="crdnStdgNm" data-map="CRDN_STDG_NM" class="form-control" readonly/> <input type="text" id="crdnStdgNm--${pageName}" name="crdnStdgNm" data-map="CRDN_STDG_NM"
<button type="button" class="btn btn-sm btn-outline-dark" onclick="">검색</button> class="form-control" list="stdgNmList--${pageName}" />
<datalist id="stdgNmList--${pageName}">
<c:forEach items="${stdgNmList}" var="item">
<option value="${item}"></option>
</c:forEach>
</datalist>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label for="crdnPlc--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">위반장소</label> <label for="crdnPlc--${pageName}" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end">위반장소</label>

Loading…
Cancel
Save