From 8557d7d6892b1731dba8fc85cabd417251b422d5 Mon Sep 17 00:00:00 2001 From: leebj Date: Wed, 19 Jun 2024 10:49:06 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EC=BF=BC=EB=A6=AC=20=EC=88=98=EC=A0=95(URL=20=EC=BB=AC?= =?UTF-8?q?=EB=9F=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/adds/AddsMapperSupport.java | 16 ++++++++++++++++ .../resources/sql/mapper/base/file-mapper.xml | 6 ++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/main/java/cokr/xit/adds/AddsMapperSupport.java b/src/main/java/cokr/xit/adds/AddsMapperSupport.java index 3c665de..40e300b 100644 --- a/src/main/java/cokr/xit/adds/AddsMapperSupport.java +++ b/src/main/java/cokr/xit/adds/AddsMapperSupport.java @@ -7,16 +7,32 @@ import org.apache.ibatis.executor.Executor; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.plugin.Intercepts; import org.apache.ibatis.plugin.Signature; +import org.apache.ibatis.session.ResultHandler; +import org.apache.ibatis.session.RowBounds; import cokr.xit.applib.ApplicationContextProvider; import cokr.xit.base.FileController; +import cokr.xit.base.file.service.FileQuery; import cokr.xit.foundation.data.paging.MapperSupport; @Intercepts({ + @Signature(type = Executor.class, method = "query", args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class}), @Signature(type = Executor.class, method = "update", args = {MappedStatement.class, Object.class}) }) public class AddsMapperSupport extends MapperSupport { + @Override + protected Object query(Executor executor, MappedStatement mappedStatement, Object obj, RowBounds rowBounds, ResultHandler resultHandler) throws SQLException { + String id = mappedStatement.getId(); + + if(id.equals("cokr.xit.base.file.dao.FileMapper.getFileList") + || id.equals("cokr.xit.base.file.dao.FileMapper.getFilesOf")) { + FileController addsFileController = (FileController) ApplicationContextProvider.getApplicationContext().getBean("fileController"); + ((FileQuery)obj).setType(addsFileController.getFileRootPath()); + } + return super.query(executor, mappedStatement, obj, rowBounds, resultHandler); + } + @Override protected Object update(Executor executor, MappedStatement mappedStatement, Object obj) throws SQLException { String id = mappedStatement.getId(); diff --git a/src/main/resources/sql/mapper/base/file-mapper.xml b/src/main/resources/sql/mapper/base/file-mapper.xml index dbaafde..9a571ab 100644 --- a/src/main/resources/sql/mapper/base/file-mapper.xml +++ b/src/main/resources/sql/mapper/base/file-mapper.xml @@ -33,12 +33,14 @@ -SELECT A.*, FILE_PATH URL +SELECT A.* + , REPLACE(FILE_PATH,#{type},'/files/') AS URL FROM TB_FILE A WHERE FILE_ID IN (#{fileID}) ORDER BY FILE_ID -SELECT A.*, FILE_PATH URL +SELECT A.* + , REPLACE(FILE_PATH,#{type},'/files/') AS URL FROM TB_FILE A AND A.INF_TYPE = #{infoType} From 1aa3d6219ddb9bd5cfdf1ee154d246b60b0fa12f Mon Sep 17 00:00:00 2001 From: leebj Date: Wed, 19 Jun 2024 11:04:21 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=EC=A1=B0=ED=9A=8C=EC=A1=B0=EA=B1=B4?= =?UTF-8?q?=EC=97=90=20=EC=82=AC=EC=9A=A9=EB=90=A0=20=EB=B6=80=EC=84=9C=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EA=B0=80=EC=A0=B8=EC=98=A4=EA=B8=B0=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/adds/nims/web/AddsNimsController.java | 10 ++++++++++ .../WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java index 1dc87da..b80e7bd 100644 --- a/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java +++ b/src/main/java/cokr/xit/adds/nims/web/AddsNimsController.java @@ -15,8 +15,11 @@ import cokr.xit.adds.nims.DsuseMgtDocQuery; import cokr.xit.adds.nims.DsuseMgtReceiptQuery; import cokr.xit.adds.nims.service.DsuseMgtDocService; import cokr.xit.adds.nims.service.DsuseMgtReceiptService; +import cokr.xit.applib.ogdp.OgdpQuery; +import cokr.xit.applib.ogdp.service.bean.DefaultOgdpBean; import cokr.xit.base.code.CommonCode; import cokr.xit.base.web.ApplicationController; +import cokr.xit.foundation.data.DataObject; @Controller @RequestMapping( @@ -27,6 +30,9 @@ public class AddsNimsController extends ApplicationController { @Value("${app.api.host:}") private String apiHost; + @Resource(name="defaultOgdpBean") + DefaultOgdpBean defaultOgdpBean; + @Resource(name="dsuseMgtReceiptService") private DsuseMgtReceiptService dsuseMgtReceiptService; @@ -123,9 +129,13 @@ public class AddsNimsController extends ApplicationController { //------------------------------------------------------------------------------------------------- @RequestMapping(value = "/dsuseMgtReceipt.do", name="신청서 접수 메인") public ModelAndView dsuseMgtReceiptMain() { + ModelAndView mav = new ModelAndView("adds/nims/dsuseMgtReceipt-main"); setCmmCodeAdds11(mav); + List deptList = defaultOgdpBean.getDeptList(new OgdpQuery()); + mav.addObject("DEPTList", deptList); + return mav .addObject("pageName", "dsuseMgtReceipt") // View(jsp)에서 사용할 id 뒤에 붙일 suffix // .addObject("infoPrefix", "dsuseMgtReceipt") // prefix diff --git a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp index 96960f9..ae3c988 100644 --- a/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/adds/nims/dsuseMgtReceipt-main.jsp @@ -16,9 +16,9 @@ From e309c72c145f18d9b86ce9335893695ba2411803 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Wed, 19 Jun 2024 13:37:39 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EA=B3=B5=ED=86=B5=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=EC=A1=B0=EA=B1=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/sql/mapper/base/code-mapper.xml | 16 ++++++++-------- .../webapp/WEB-INF/jsp/base/code/code-main.jsp | 14 ++++++++++---- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/main/resources/sql/mapper/base/code-mapper.xml b/src/main/resources/sql/mapper/base/code-mapper.xml index be27d2b..3934e28 100644 --- a/src/main/resources/sql/mapper/base/code-mapper.xml +++ b/src/main/resources/sql/mapper/base/code-mapper.xml @@ -44,8 +44,8 @@ SELECT * FROM TB_CODE_CTGR - WHERE USE_YN = 'Y' - AND CTGR_ID IN (#{categoryID}) + AND USE_YN = 'Y' + AND CTGR_ID IN (#{categoryID}) @@ -94,9 +94,9 @@ UPDATE TB_CODE_CTGR SET SELECT * FROM TB_CODE_GRP - WHERE USE_YN = 'Y' -AND CTGR_ID IN (#{categoryID}) -AND GRP_ID IN (#{groupID}) + AND USE_YN = 'Y' + AND CTGR_ID IN (#{categoryID}) + AND GRP_ID IN (#{groupID}) @@ -151,9 +151,9 @@ UPDATE TB_CODE_GRP SET SELECT * FROM TB_CMN_CODE - WHERE USE_YN = 'Y' - AND GRP_ID IN (#{groupID}) - AND CODE IN (#{code}) + AND USE_YN = 'Y' + AND GRP_ID IN (#{groupID}) + AND CODE IN (#{code}) diff --git a/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp b/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp index 8284c77..6ac3389 100644 --- a/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp @@ -35,7 +35,7 @@