From d473a9148ebde2f2b5bf817b70b401e57e4f5a65 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 12 Dec 2023 15:47:38 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8B=A8=EC=86=8D=EC=9E=90=EB=A3=8C=EA=B2=80?= =?UTF-8?q?=EC=82=AC=20=ED=99=94=EB=A9=B4=20=EB=AA=A8=EC=9E=90=EC=9D=B4?= =?UTF-8?q?=ED=81=AC=20=ED=91=9C=EC=8B=9C=20=EA=B8=B0=EB=8A=A5=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cokr/xit/fims/base/FileController.java | 35 ++++++++++-- .../cokr/xit/fims/cmmn/dao/MosaicMapper.java | 19 +++++++ .../fims/cmmn/service/bean/MosaicBean.java | 26 +++++++++ .../sql/mapper/fims/cmmn/mosaic-mapper.xml | 18 ++++++ .../WEB-INF/jsp/fims/crdn/crdn02010-main.jsp | 6 +- src/main/webapp/WEB-INF/jsp/include/top.jsp | 57 ++++++++++++++++++- .../resources/js/fims/crdn/inspection.js | 10 +++- 7 files changed, 158 insertions(+), 13 deletions(-) create mode 100644 src/main/java/cokr/xit/fims/cmmn/dao/MosaicMapper.java create mode 100644 src/main/java/cokr/xit/fims/cmmn/service/bean/MosaicBean.java create mode 100644 src/main/resources/sql/mapper/fims/cmmn/mosaic-mapper.xml diff --git a/src/main/java/cokr/xit/fims/base/FileController.java b/src/main/java/cokr/xit/fims/base/FileController.java index 5531a2c3..d99906b1 100644 --- a/src/main/java/cokr/xit/fims/base/FileController.java +++ b/src/main/java/cokr/xit/fims/base/FileController.java @@ -7,6 +7,7 @@ import java.io.OutputStream; import java.io.StringWriter; import java.net.URISyntaxException; import java.net.URLDecoder; +import java.util.List; import java.util.regex.Matcher; import javax.annotation.Resource; @@ -36,6 +37,8 @@ import org.xml.sax.SAXException; import cokr.xit.base.file.dao.FileMapper; import cokr.xit.base.file.service.FileQuery; import cokr.xit.base.file.service.bean.FileBean; +import cokr.xit.fims.cmmn.service.bean.MosaicBean; +import cokr.xit.foundation.data.DataObject; @Controller public class FileController extends cokr.xit.base.file.web.FileController { @@ -45,13 +48,35 @@ public class FileController extends cokr.xit.base.file.web.FileController { @Resource(name="fileBean") private FileBean fileBean; + @Resource(name="mosaicBean") + private MosaicBean mosaicBean; + @Override public ModelAndView getFileList(FileQuery req) { - return setCollectionInfo( - new ModelAndView("jsonView"), - fileService().getFileList(req), - "file" - ); + ModelAndView mav = new ModelAndView("jsonView"); + List fileInfoList = fileService().getFileList(req); + for(DataObject fileInfo : fileInfoList) { + List mosaicInfos = mosaicBean.getMosaicList(fileInfo.string("FILE_ID")); + if(mosaicInfos != null) { + String mosaic = ""; + for(int i=0; i < mosaicInfos.size(); i++) { + DataObject mosaicInfo = mosaicInfos.get(i); + if(i != 0) { + mosaic += "|"; + } + mosaic += mosaicInfo.string("X_AXS") + + "," + mosaicInfo.string("Y_AXS") + + "," + mosaicInfo.string("MOSC_LT") + + "," + mosaicInfo.string("MOSC_HG"); + } + fileInfo.set("MOSAIC", mosaic); + } else { + fileInfo.set("MOSAIC", ""); + } + + } + mav = setCollectionInfo(mav,fileInfoList,"file"); + return mav; } /** 메뉴얼을 다운로드한다. diff --git a/src/main/java/cokr/xit/fims/cmmn/dao/MosaicMapper.java b/src/main/java/cokr/xit/fims/cmmn/dao/MosaicMapper.java new file mode 100644 index 00000000..f9c3f09f --- /dev/null +++ b/src/main/java/cokr/xit/fims/cmmn/dao/MosaicMapper.java @@ -0,0 +1,19 @@ +package cokr.xit.fims.cmmn.dao; + +import java.util.List; + +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; + +import cokr.xit.foundation.component.AbstractMapper; +import cokr.xit.foundation.data.DataObject; + +@Mapper("mosaicMapper") +public interface MosaicMapper extends AbstractMapper { + + /**파일의 모자이크 정보를 조회한다.
+ * @param fileId 파일ID + * @return 모자이크 정보 + */ + List selectMosaicList(String fileId); + +} diff --git a/src/main/java/cokr/xit/fims/cmmn/service/bean/MosaicBean.java b/src/main/java/cokr/xit/fims/cmmn/service/bean/MosaicBean.java new file mode 100644 index 00000000..20e17a4a --- /dev/null +++ b/src/main/java/cokr/xit/fims/cmmn/service/bean/MosaicBean.java @@ -0,0 +1,26 @@ +package cokr.xit.fims.cmmn.service.bean; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Component; + +import cokr.xit.fims.cmmn.dao.MosaicMapper; +import cokr.xit.foundation.AbstractComponent; +import cokr.xit.foundation.data.DataObject; + +@Component("mosaicBean") +public class MosaicBean extends AbstractComponent { + + @Resource(name = "mosaicMapper") + private MosaicMapper mosaicMapper; + + /**파일의 모자이크 정보를 조회한다.
+ * @param fileId 파일ID + * @return 모자이크 정보 + */ + public List getMosaicList(String fileId){ + return mosaicMapper.selectMosaicList(fileId); + } +} diff --git a/src/main/resources/sql/mapper/fims/cmmn/mosaic-mapper.xml b/src/main/resources/sql/mapper/fims/cmmn/mosaic-mapper.xml new file mode 100644 index 00000000..e768b98c --- /dev/null +++ b/src/main/resources/sql/mapper/fims/cmmn/mosaic-mapper.xml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp index f40ba449..76e09288 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp @@ -701,14 +701,14 @@ $(document).ready(function(){ $("#nextDataFiles--${pageName}").html(""); currentDataFileList.forEach(function(item, index, array){ - var output = fnMakeImgTag(item.URL, item.FILE_NM); + var output = fnMakeImgTag(item.URL, item.FILE_NM,"cur"+item.FILE_ID+'${pageName}',item.MOSAIC); $("#curDataFiles--${pageName}").append(output); }); nextDataFileList.forEach(function(item, index, array){ - var output = fnMakeImgTag(item.URL, item.FILE_NM); + var output = fnMakeImgTag(item.URL, item.FILE_NM,"next"+item.FILE_ID+'${pageName}',item.MOSAIC); $("#nextDataFiles--${pageName}").append(output); }); - + } }); diff --git a/src/main/webapp/WEB-INF/jsp/include/top.jsp b/src/main/webapp/WEB-INF/jsp/include/top.jsp index ba7d6da5..76745c8e 100644 --- a/src/main/webapp/WEB-INF/jsp/include/top.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/top.jsp @@ -33,13 +33,13 @@
-
+
-
+