From a4f0a7a28b75e6e1c3dad3c20fac7632fa07360c Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 22 Jun 2023 19:09:53 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8F=99=EC=A0=81=20=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=EC=A1=B0=EA=B1=B4=20=EA=B4=80=EB=A0=A8=20=EA=B7=B8=EB=A6=AC?= =?UTF-8?q?=EB=93=9C=20=EC=84=A4=EC=A0=95=20=EA=B8=B0=EB=8A=A5=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fims/crdn/service/bean/Crdn06Bean.java | 12 ++++++++ .../sql/mapper/fims/crdn/crdn06-mapper.xml | 11 +++++++- .../WEB-INF/jsp/fims/crdn/crdn06030-main.jsp | 9 ++---- src/main/webapp/WEB-INF/jsp/include/top.jsp | 6 ++-- .../js/fims/framework/cmm/initGrid.js | 28 +++++++++++++++---- 5 files changed, 51 insertions(+), 15 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06Bean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06Bean.java index 0ef2a6ff..025da276 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06Bean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn06Bean.java @@ -4,6 +4,7 @@ import java.util.List; import javax.annotation.Resource; +import org.egovframe.rte.fdl.string.EgovStringUtil; import org.springframework.stereotype.Component; import cokr.xit.fims.crdn.Crdn; @@ -27,6 +28,17 @@ public class Crdn06Bean extends AbstractComponent { * @return 단속자료 목록 */ public List getCrackdownList(CrdnQuery req) { + + if(!isEmpty(req.getBy())) { + if(!req.getBy().startsWith("advancedOption")) { + switch (ifEmpty(req.getBy(), () -> "")) { + default: + req.setBy(EgovStringUtil.convertToUnderScore(req.getBy()).toUpperCase()); + break; + } + } + } + return crdn06Mapper.selectCrackdownList(req.setOrderBy("CRDN_ID")); } diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml index fae1815d..7fe4f797 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn06-mapper.xml @@ -84,7 +84,16 @@ , A.DEL_RSN FROM TB_CRDN A WHERE DEL_YN = 'N' - AND A.${by} LIKE CONCAT('%', #{term}, '%') + + + + AND FN_GET_CODE_NM('FIM003', A.CRDN_INPT_SE_CD) LIKE CONCAT('%', #{term}, '%') + + + AND A.${by} LIKE CONCAT('%', #{term}, '%') + + + AND A.CRDN_ID = #{crdnId} AND A.TASK_SE_CD = #{taskSeCd} AND A.VHRNO LIKE CONCAT('%', #{vhrno}, '%') diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp index b8d5248a..ac39b0b9 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-main.jsp @@ -77,10 +77,10 @@
+ 개별 확인 자료로 수정
전체 ㅣ
선택 | n건 - 개별 확인 자료로 수정
@@ -237,7 +237,7 @@ $(document).ready(function(){ * Grid ******************************* */ thisPO.gridColumns = [ - { header: '자료출처', name: 'CRDN_INPT_SE_CD', width: 100, className: 'text-center' }, + { header: '자료출처', name: 'CRDN_INPT_SE_CD', width: 100, className: 'text-center', advancedOptionIndex : 1 }, { header: '위반일시', name: 'CRDN_YMD_TM', width: 120, className: 'text-center' }, { header: '차량번호', name: 'VHRNO', width: 80, className: 'text-center' }, { header: '법정동', name: 'CRDN_STDG_NM', width: 80, className: 'text-center' }, @@ -292,13 +292,10 @@ $(document).ready(function(){ $('#btnSearch--${pageName}').on('click', () => thisPO.searchCrdnList()); - $('#btnMenualRegist--${pageName}').on('click', () => { + $('#btnUpdateToConfirmData--${pageName}').on('click', () => { }); - $('#btnExtrRegist--${pageName}').on('click', () => { - - }); //보안모드 if($("#securityMode--top").is(":checked")){ diff --git a/src/main/webapp/WEB-INF/jsp/include/top.jsp b/src/main/webapp/WEB-INF/jsp/include/top.jsp index f869ef6d..af6f81fa 100644 --- a/src/main/webapp/WEB-INF/jsp/include/top.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/top.jsp @@ -21,13 +21,13 @@
- - + - + diff --git a/src/main/webapp/resources/js/fims/framework/cmm/initGrid.js b/src/main/webapp/resources/js/fims/framework/cmm/initGrid.js index 9079545a..ee9c4e0a 100644 --- a/src/main/webapp/resources/js/fims/framework/cmm/initGrid.js +++ b/src/main/webapp/resources/js/fims/framework/cmm/initGrid.js @@ -45,8 +45,8 @@ var initGrid = (gridOptions) => { var by = gridOptions.by; var byOutput = gridOptions.byOutput; - if(by && byOutput){ - titleClickEvent += `searchFromGridTitle('${by}','${byOutput}','${gName}','${gHeader}');`; + if(by && byOutput){ + titleClickEvent += `searchFromGridTitle('${by}','${byOutput}','${gName}','${gHeader}','${item.advancedOptionIndex}');`; } var gHidden = item.hidden; @@ -90,7 +90,25 @@ var initGrid = (gridOptions) => { return tableBodyTemplate; }; -function searchFromGridTitle(byElement, byOutputElement, byValue, byOutputValue){ - document.getElementById(byElement).value = byValue; +function searchFromGridTitle(byElement, byOutputElement, byValue, byOutputValue, advancedOptionIndex){ + + if(advancedOptionIndex > 0){ + document.getElementById(byElement).value = "advancedOption" + advancedOptionIndex; + } else { + document.getElementById(byElement).value = snakeToCamel(byValue); + } + document.getElementById(byOutputElement).value = byOutputValue + " 검색"; -} \ No newline at end of file +} + + +function snakeToCamel(text){ + text = text.toLowerCase(); + var arrUnderbar = text.match(/\_[a-zA-Z]/g); + if(arrUnderbar){ + for(var j = 0; j < arrUnderbar.length; j++) { + text = text.replace(arrUnderbar[j], arrUnderbar[j].toUpperCase().replace("_", "")); + } + } + return text; +}