build: 2024-02-26 최신 소스코드
commit
149dcc2694
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="D:/app_geoinfo/app/eclipse/workspace/geoinfo_admin/src/main/webapp/WEB-INF/lib/ClipReport4.0-1.0.0.301.jar"/>
|
||||
<classpathentry kind="lib" path="D:/app_geoinfo/app/eclipse/workspace/geoinfo_admin/src/main/webapp/WEB-INF/lib/ClipReport4.0-Common.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.5"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
.idea/
|
||||
/target
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
.recommenders
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# PyDev specific (Python IDE for Eclipse)
|
||||
*.pydevproject
|
||||
|
||||
# CDT-specific (C/C++ Development Tooling)
|
||||
.cproject
|
||||
|
||||
# CDT- autotools
|
||||
.autotools
|
||||
|
||||
# Java annotation processor (APT)
|
||||
.factorypath
|
||||
|
||||
# PDT-specific (PHP Development Tools)
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# Tern plugin
|
||||
.tern-project
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
# STS (Spring Tool Suite)
|
||||
.springBeans
|
||||
|
||||
# Code Recommenders
|
||||
.recommenders/
|
||||
|
||||
# Annotation Processing
|
||||
.apt_generated/
|
||||
.apt_generated_test/
|
||||
|
||||
# Scala IDE specific (Scala & Java development for Eclipse)
|
||||
.cache-main
|
||||
.scala_dependencies
|
||||
.worksheet
|
||||
|
||||
# Uncomment this line if you wish to ignore the project description file.
|
||||
# Typically, this file would be tracked if it contains build/dependency configurations:
|
||||
#.project
|
||||
|
||||
.svn
|
||||
=======
|
||||
# ---> Java
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
|
||||
logs/
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>geoinfo_admin</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>LaunchConfigHandle</key>
|
||||
<value><project>/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.core.springbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.springframework.ide.eclipse.core.springnature</nature>
|
||||
<nature>egovframework.dev.imp.ide.natures.egovnature</nature>
|
||||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -0,0 +1,519 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>ictway.com.git.geoinfo</groupId>
|
||||
<artifactId>geoinfo</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0.0</version>
|
||||
<name>geoinfo</name>
|
||||
<url>http://www.egovframe.go.kr</url>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<properties>
|
||||
<java-version>1.7</java-version>
|
||||
<org.springframework-version>3.2.4.RELEASE</org.springframework-version>
|
||||
<org.aspectj-version>1.7.3</org.aspectj-version>
|
||||
<org.slf4j-version>1.6.6</org.slf4j-version>
|
||||
<org.apache.tiles.version>3.0.3</org.apache.tiles.version>
|
||||
|
||||
<spring.maven.artifact.version>4.0.9.RELEASE</spring.maven.artifact.version>
|
||||
<egovframework.rte.version>3.5.0</egovframework.rte.version>
|
||||
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>mesir-repo</id>
|
||||
<url>http://mesir.googlecode.com/svn/trunk/mavenrepo</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>mvn2</id>
|
||||
<url>http://repo1.maven.org/maven2/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>egovframe</id>
|
||||
<url>http://www.egovframe.go.kr/maven/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>oracle</id>
|
||||
<name>ORACLE JDBC Repository</name>
|
||||
<url>http://mesir.googlecode.com/svn/trunk/mavenrepo</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<!-- Spring -->
|
||||
|
||||
<!-- SMS -->
|
||||
<dependency>
|
||||
<groupId>org.apache.ws.xmlrpc</groupId>
|
||||
<artifactId>xmlrpc</artifactId>
|
||||
<version>2.0.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 표준프레임워크 실행환경 -->
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.ptl.mvc</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.psl.dataaccess</artifactId>
|
||||
<version>2.7.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.fdl.idgnr</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.fdl.property</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
<exclusions>
|
||||
<!-- Exclude Commons Logging in favor of SLF4j -->
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
<version>${org.springframework-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- AOP Alliance -->
|
||||
<dependency>
|
||||
<groupId>aopalliance</groupId>
|
||||
<artifactId>aopalliance</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- MyBatis -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>3.2.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis-spring</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- DBCP -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>tomcat-dbcp</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>7.0.53</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- MySql -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.31</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Oracle -->
|
||||
<!-- <dependency>
|
||||
<groupId>ojdbc</groupId>
|
||||
<artifactId>ojdbc14</artifactId>
|
||||
<version>14</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/ojdbc14-10.2.0.4.0.jar</systemPath>
|
||||
</dependency> -->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc6</artifactId>
|
||||
<version>11.2.0.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- PostgreSQL 9.1-901 -->
|
||||
<dependency>
|
||||
<groupId>postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>9.1-901.jdbc4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- AspectJ -->
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjrt</artifactId>
|
||||
<version>${org.aspectj-version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
<version>${org.aspectj-version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjtools</artifactId>
|
||||
<version>${org.aspectj-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Web -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>2.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet.jsp</groupId>
|
||||
<artifactId>jsp-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>2.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>jstl</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>jsr250-api</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Logging -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${org.slf4j-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>${org.slf4j-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${org.slf4j-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.3alpha-8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.lazyluke</groupId>
|
||||
<artifactId>log4jdbc-remix</artifactId>
|
||||
<version>0.2.7</version>
|
||||
</dependency>
|
||||
|
||||
<!-- MappingJacksonJsonView -->
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-mapper-asl</artifactId>
|
||||
<version>1.9.13</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-core-asl</artifactId>
|
||||
<version>1.9.13</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-oxm</artifactId>
|
||||
<version>${spring.maven.artifact.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- MultipartHttpServletRequset -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.0.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.2.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Apache Codec -->
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.10</version>
|
||||
</dependency>
|
||||
|
||||
<!-- EgovProperty -->
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.fdl.property</artifactId>
|
||||
<version>2.7.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Log4j -->
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.jms</groupId>
|
||||
<artifactId>jms</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.sun.jdmk</groupId>
|
||||
<artifactId>jmxtools</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.sun.jmx</groupId>
|
||||
<artifactId>jmxri</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- @Inject -->
|
||||
<dependency>
|
||||
<groupId>javax.inject</groupId>
|
||||
<artifactId>javax.inject</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Tiles -->
|
||||
<dependency>
|
||||
<groupId>org.apache.tiles</groupId>
|
||||
<artifactId>tiles-jsp</artifactId>
|
||||
<version>${org.apache.tiles.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tiles</groupId>
|
||||
<artifactId>tiles-core</artifactId>
|
||||
<version>${org.apache.tiles.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/net.sf.jasperreports/jasperreports -->
|
||||
<dependency>
|
||||
<groupId>net.sf.jasperreports</groupId>
|
||||
<artifactId>jasperreports</artifactId>
|
||||
<version>5.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.jfinal</groupId>
|
||||
<artifactId>cos</artifactId>
|
||||
<version>26Dec2008</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.jdom/jdom -->
|
||||
<dependency>
|
||||
<groupId>org.jdom</groupId>
|
||||
<artifactId>jdom</artifactId>
|
||||
<version>2.0.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Excel poi -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>3.16</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-excelant</artifactId>
|
||||
<version>3.16</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<version>3.16</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>3.16</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-scratchpad</artifactId>
|
||||
<version>3.16</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Excel poi -->
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<directory>${basedir}/target</directory>
|
||||
<finalName>geoinfo_eGov</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
<version>2.9</version>
|
||||
<configuration>
|
||||
<additionalProjectnatures>
|
||||
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
|
||||
</additionalProjectnatures>
|
||||
<additionalBuildcommands>
|
||||
<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
|
||||
</additionalBuildcommands>
|
||||
<downloadSources>true</downloadSources>
|
||||
<downloadJavadocs>true</downloadJavadocs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<configuration>
|
||||
<source>${java-version}</source>
|
||||
<target>${java-version}</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
<compilerArgument>-Xlint:all</compilerArgument>
|
||||
<showWarnings>true</showWarnings>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<configuration>
|
||||
<mainClass>org.test.int1.Main</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- JavaDoc -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,185 @@
|
|||
package egovframework.com.cmm;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
/**
|
||||
* 클래스
|
||||
* @author 공통서비스개발팀 이삼섭
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.3.11 이삼섭 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ComDefaultCodeVO implements Serializable {
|
||||
/** 코드 ID */
|
||||
private String codeId = "";
|
||||
|
||||
/** 상세코드 */
|
||||
private String code = "";
|
||||
|
||||
/** 코드명 */
|
||||
private String codeNm = "";
|
||||
|
||||
/** 코드설명 */
|
||||
private String codeDc = "";
|
||||
|
||||
/** 특정테이블명 */
|
||||
private String tableNm = ""; //특정테이블에서 코드정보를추출시 사용
|
||||
|
||||
/** 상세 조건 여부 */
|
||||
private String haveDetailCondition = "N";
|
||||
|
||||
/** 상세 조건 */
|
||||
private String detailCondition = "";
|
||||
|
||||
/**
|
||||
* codeId attribute를 리턴한다.
|
||||
*
|
||||
* @return the codeId
|
||||
*/
|
||||
public String getCodeId() {
|
||||
return codeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeId attribute 값을 설정한다.
|
||||
*
|
||||
* @param codeId
|
||||
* the codeId to set
|
||||
*/
|
||||
public void setCodeId(String codeId) {
|
||||
this.codeId = codeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* code attribute를 리턴한다.
|
||||
*
|
||||
* @return the code
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* code attribute 값을 설정한다.
|
||||
*
|
||||
* @param code
|
||||
* the code to set
|
||||
*/
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeNm attribute를 리턴한다.
|
||||
*
|
||||
* @return the codeNm
|
||||
*/
|
||||
public String getCodeNm() {
|
||||
return codeNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeNm attribute 값을 설정한다.
|
||||
*
|
||||
* @param codeNm
|
||||
* the codeNm to set
|
||||
*/
|
||||
public void setCodeNm(String codeNm) {
|
||||
this.codeNm = codeNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeDc attribute를 리턴한다.
|
||||
*
|
||||
* @return the codeDc
|
||||
*/
|
||||
public String getCodeDc() {
|
||||
return codeDc;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeDc attribute 값을 설정한다.
|
||||
*
|
||||
* @param codeDc
|
||||
* the codeDc to set
|
||||
*/
|
||||
public void setCodeDc(String codeDc) {
|
||||
this.codeDc = codeDc;
|
||||
}
|
||||
|
||||
/**
|
||||
* tableNm attribute를 리턴한다.
|
||||
*
|
||||
* @return the tableNm
|
||||
*/
|
||||
public String getTableNm() {
|
||||
return tableNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* tableNm attribute 값을 설정한다.
|
||||
*
|
||||
* @param tableNm
|
||||
* the tableNm to set
|
||||
*/
|
||||
public void setTableNm(String tableNm) {
|
||||
this.tableNm = tableNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* haveDetailCondition attribute를 리턴한다.
|
||||
*
|
||||
* @return the haveDetailCondition
|
||||
*/
|
||||
public String getHaveDetailCondition() {
|
||||
return haveDetailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* haveDetailCondition attribute 값을 설정한다.
|
||||
*
|
||||
* @param haveDetailCondition
|
||||
* the haveDetailCondition to set
|
||||
*/
|
||||
public void setHaveDetailCondition(String haveDetailCondition) {
|
||||
this.haveDetailCondition = haveDetailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* detailCondition attribute를 리턴한다.
|
||||
*
|
||||
* @return the detailCondition
|
||||
*/
|
||||
public String getDetailCondition() {
|
||||
return detailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* detailCondition attribute 값을 설정한다.
|
||||
*
|
||||
* @param detailCondition
|
||||
* the detailCondition to set
|
||||
*/
|
||||
public void setDetailCondition(String detailCondition) {
|
||||
this.detailCondition = detailCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* toString 메소드를 대치한다.
|
||||
*/
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package egovframework.com.cmm;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.exception.handler.ExceptionHandler;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovComExcepHndlr.java
|
||||
* @Description : 공통서비스의 exception 처리 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 13. 이삼섭
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 13.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
public class EgovComExcepHndlr implements ExceptionHandler {
|
||||
|
||||
protected Log log = LogFactory.getLog(this.getClass());
|
||||
|
||||
/*
|
||||
@Resource(name = "otherSSLMailSender")
|
||||
private SimpleSSLMail mailSender;
|
||||
*/
|
||||
/**
|
||||
* 발생된 Exception을 처리한다.
|
||||
*/
|
||||
public void occur(Exception ex, String packageName) {
|
||||
//log.debug(" EgovServiceExceptionHandler run...............");
|
||||
try {
|
||||
//mailSender. send(ex, packageName);
|
||||
//log.debug(" sending a alert mail is completed ");
|
||||
log.error(packageName, ex);
|
||||
} catch (Exception e) {
|
||||
//e.printStackTrace();
|
||||
log.fatal(packageName, ex);// 2011.10.10 보안점검 후속조치
|
||||
//throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package egovframework.com.cmm;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.exception.handler.ExceptionHandler;
|
||||
|
||||
public class EgovComOthersExcepHndlr implements ExceptionHandler {
|
||||
|
||||
protected Log log = LogFactory.getLog(this.getClass());
|
||||
|
||||
public void occur(Exception exception, String packageName) {
|
||||
//log.debug(" EgovServiceExceptionHandler run...............");
|
||||
log.error(packageName, exception);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package egovframework.com.cmm;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.trace.handler.TraceHandler;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovComTraceHandler.java
|
||||
* @Description : 공통서비스의 trace 처리 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2011. 09. 30. JJY
|
||||
*
|
||||
* @author JJY
|
||||
* @since 2011. 9. 30.
|
||||
*
|
||||
*/
|
||||
public class EgovComTraceHandler implements TraceHandler {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(EgovComTraceHandler.class);
|
||||
|
||||
/**
|
||||
* 발생된 메시지를 출력한다.
|
||||
*/
|
||||
@Override
|
||||
public void todo(Class<?> clazz, String message) {
|
||||
LOGGER.debug("[TRACE]CLASS::: {}", clazz.getName());
|
||||
LOGGER.debug("[TRACE]MESSAGE::: {}", message);
|
||||
//이곳에서 후속처리로 필요한 액션을 취할 수 있다.
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package egovframework.com.cmm;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
* EgovComUtil 클래스
|
||||
*
|
||||
* @author 서준식
|
||||
* @since 2011.09.15
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2011.09.15 서준식 최초 생성
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Service("egovUtil")
|
||||
public class EgovComponentChecker implements ApplicationContextAware{
|
||||
|
||||
|
||||
public static ApplicationContext context;
|
||||
|
||||
public void setApplicationContext(ApplicationContext context)
|
||||
throws BeansException {
|
||||
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Spring MVC에서 설정한 빈이 아닌 서비스 빈(컴포넌트)만을 검색할 수 있음
|
||||
*
|
||||
*/
|
||||
public static boolean hasComponent(String componentName){
|
||||
|
||||
try{
|
||||
Object component = context.getBean(componentName);
|
||||
|
||||
if(component == null){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
|
||||
}catch(NoSuchBeanDefinitionException ex){// 해당 컴포넌트를 찾을 수없을 경우 false반환
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package egovframework.com.cmm;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
|
||||
|
||||
/**
|
||||
* 메시지 리소스 사용을 위한 MessageSource 인터페이스 및 ReloadableResourceBundleMessageSource 클래스의 구현체
|
||||
* @author 공통서비스 개발팀 이문준
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.11 이문준 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovMessageSource extends ReloadableResourceBundleMessageSource implements MessageSource {
|
||||
|
||||
private ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource;
|
||||
|
||||
/**
|
||||
* getReloadableResourceBundleMessageSource()
|
||||
* @param reloadableResourceBundleMessageSource - resource MessageSource
|
||||
* @return ReloadableResourceBundleMessageSource
|
||||
*/
|
||||
public void setReloadableResourceBundleMessageSource(ReloadableResourceBundleMessageSource reloadableResourceBundleMessageSource) {
|
||||
this.reloadableResourceBundleMessageSource = reloadableResourceBundleMessageSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* getReloadableResourceBundleMessageSource()
|
||||
* @return ReloadableResourceBundleMessageSource
|
||||
*/
|
||||
public ReloadableResourceBundleMessageSource getReloadableResourceBundleMessageSource() {
|
||||
return reloadableResourceBundleMessageSource;
|
||||
}
|
||||
|
||||
/**
|
||||
* 정의된 메세지 조회
|
||||
* @param code - 메세지 코드
|
||||
* @return String
|
||||
*/
|
||||
public String getMessage(String code) {
|
||||
return getReloadableResourceBundleMessageSource().getMessage(code, null, Locale.getDefault());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
package egovframework.com.cmm;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 교차접속 스크립트 공격 취약성 방지(파라미터 문자열 교체)
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011.10.10 한성곤 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovWebUtil {
|
||||
public static String clearXSSMinimum(String value) {
|
||||
if (value == null || value.trim().equals("")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String returnValue = value;
|
||||
|
||||
returnValue = returnValue.replaceAll("&", "&");
|
||||
returnValue = returnValue.replaceAll("<", "<");
|
||||
returnValue = returnValue.replaceAll(">", ">");
|
||||
returnValue = returnValue.replaceAll("\"", """);
|
||||
returnValue = returnValue.replaceAll("\'", "'");
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
public static String clearXSSMaximum(String value) {
|
||||
String returnValue = value;
|
||||
returnValue = clearXSSMinimum(returnValue);
|
||||
|
||||
returnValue = returnValue.replaceAll("%00", null);
|
||||
|
||||
returnValue = returnValue.replaceAll("%", "%");
|
||||
|
||||
// \\. => .
|
||||
|
||||
returnValue = returnValue.replaceAll("\\.\\./", ""); // ../
|
||||
returnValue = returnValue.replaceAll("\\.\\.\\\\", ""); // ..\
|
||||
returnValue = returnValue.replaceAll("\\./", ""); // ./
|
||||
returnValue = returnValue.replaceAll("%2F", "");
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
public static String filePathBlackList(String value) {
|
||||
String returnValue = value;
|
||||
if (returnValue == null || returnValue.trim().equals("")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
returnValue = returnValue.replaceAll("\\.\\./", ""); // ../
|
||||
returnValue = returnValue.replaceAll("\\.\\.\\\\", ""); // ..\
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 행안부 보안취약점 점검 조치 방안.
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
public static String filePathReplaceAll(String value) {
|
||||
String returnValue = value;
|
||||
if (returnValue == null || returnValue.trim().equals("")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
returnValue = returnValue.replaceAll("/", "");
|
||||
returnValue = returnValue.replaceAll("\\", "");
|
||||
returnValue = returnValue.replaceAll("\\.\\.", ""); // ..
|
||||
returnValue = returnValue.replaceAll("&", "");
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
public static String filePathWhiteList(String value) {
|
||||
return value; // TODO
|
||||
}
|
||||
|
||||
public static boolean isIPAddress(String str) {
|
||||
Pattern ipPattern = Pattern.compile("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
|
||||
|
||||
return ipPattern.matcher(str).matches();
|
||||
}
|
||||
|
||||
public static String removeCRLF(String parameter) {
|
||||
return parameter.replaceAll("\r", "").replaceAll("\n", "");
|
||||
}
|
||||
|
||||
public static String removeSQLInjectionRisk(String parameter) {
|
||||
return parameter.replaceAll("\\p{Space}", "").replaceAll("\\*", "").replaceAll("%", "").replaceAll(";", "").replaceAll("-", "").replaceAll("\\+", "").replaceAll(",", "");
|
||||
}
|
||||
|
||||
public static String removeOSCmdRisk(String parameter) {
|
||||
return parameter.replaceAll("\\p{Space}", "").replaceAll("\\*", "").replaceAll("|", "").replaceAll(";", "");
|
||||
}
|
||||
|
||||
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// String test = null;
|
||||
//
|
||||
// test = "<script language='javascript' encoding=\"utf-8\">q&a</script>";
|
||||
// System.out.println("clearXSSMinimum() Test");
|
||||
// System.out.println(test);
|
||||
// System.out.println("=>");
|
||||
// System.out.println(clearXSSMinimum(test));
|
||||
// System.out.println();
|
||||
//
|
||||
// test = "/a/b/c../..\\";
|
||||
// System.out.println("clearXSSMaximum() Test");
|
||||
// System.out.println(test);
|
||||
// System.out.println(" =>");
|
||||
// System.out.println(clearXSSMaximum(test));
|
||||
// System.out.println();
|
||||
//
|
||||
// test = "/a/b/c/../../../..\\..\\";
|
||||
// System.out.println("filePathBlackList() Test");
|
||||
// System.out.println(test);
|
||||
// System.out.println("=>");
|
||||
// System.out.println(filePathBlackList(test));
|
||||
// System.out.println();
|
||||
//
|
||||
// test = "192.168.0.1";
|
||||
// System.out.println("isIPAddress() test");
|
||||
// System.out.println("IP : " + test + " => " + isIPAddress(test));
|
||||
//
|
||||
// test = "abc def*%;-+,ghi";
|
||||
// System.out.println("removeSQLInjectionRisk() test");
|
||||
// System.out.println(test + " => " + removeSQLInjectionRisk(test));
|
||||
// }
|
||||
//
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package egovframework.com.cmm;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.springframework.web.context.ServletContextAware;
|
||||
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.AbstractPaginationRenderer;
|
||||
/**
|
||||
* ImagePaginationRenderer.java 클래스
|
||||
*
|
||||
* @author 서준식
|
||||
* @since 2011. 9. 16.
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2011. 9. 16. 서준식 이미지 경로에 ContextPath추가
|
||||
* </pre>
|
||||
*/
|
||||
public class ImagePaginationRenderer extends AbstractPaginationRenderer implements ServletContextAware{
|
||||
|
||||
private ServletContext servletContext;
|
||||
|
||||
public ImagePaginationRenderer() {
|
||||
|
||||
}
|
||||
|
||||
public void initVariables(){
|
||||
firstPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/admins/first.gif\" alt=\"처음\" border=\"0\"/></a> ";
|
||||
previousPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/admins/prev.gif\" alt=\"이전\" border=\"0\"/></a> ";
|
||||
currentPageLabel = "<strong style='color:#FF0000;'>{0}</strong> ";
|
||||
otherPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \">{2}</a> ";
|
||||
nextPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/admins/next.gif\" alt=\"다음\" border=\"0\"/></a> ";
|
||||
lastPageLabel = "<a href=\"?pageIndex={1}\" onclick=\"{0}({1});return false; \"><img src=\"" + servletContext.getContextPath() + "/images/admins/last.gif\" alt=\"마지막\" border=\"0\"/></a> ";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setServletContext(ServletContext servletContext) {
|
||||
this.servletContext = servletContext;
|
||||
initVariables();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package egovframework.com.cmm;
|
||||
|
||||
/**
|
||||
* IncludedInfo annotation을 바탕으로 화면에 표시할 정보를 구성하기 위한 VO 클래스
|
||||
* @author 공통컴포넌트 정진오
|
||||
* @since 2011.08.26
|
||||
* @version 2.0.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011.08.26 정진오 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class IncludedCompInfoVO {
|
||||
|
||||
private String name;
|
||||
private String listUrl;
|
||||
private int order;
|
||||
private int gid;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getListUrl() {
|
||||
return listUrl;
|
||||
}
|
||||
public void setListUrl(String listUrl) {
|
||||
this.listUrl = listUrl;
|
||||
}
|
||||
public int getOrder() {
|
||||
return order;
|
||||
}
|
||||
public void setOrder(int order) {
|
||||
this.order = order;
|
||||
}
|
||||
public int getGid() {
|
||||
return gid;
|
||||
}
|
||||
public void setGid(int gid) {
|
||||
this.gid = gid;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,250 @@
|
|||
package egovframework.com.cmm;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Class Name : LoginVO.java
|
||||
* @Description : Login VO class
|
||||
* @Modification Information
|
||||
* @
|
||||
* @ 수정일 수정자 수정내용
|
||||
* @ ------- -------- ---------------------------
|
||||
* @ 2009.03.03 박지욱 최초 생성
|
||||
*
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.03
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
public class LoginVO implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -8274004534207618049L;
|
||||
|
||||
/** 아이디 */
|
||||
private String id;
|
||||
/** 이름 */
|
||||
private String name;
|
||||
/** 주민등록번호 */
|
||||
private String ihidNum;
|
||||
/** 이메일주소 */
|
||||
private String email;
|
||||
/** 비밀번호 */
|
||||
private String password;
|
||||
/** 비밀번호 힌트 */
|
||||
private String passwordHint;
|
||||
/** 비밀번호 정답 */
|
||||
private String passwordCnsr;
|
||||
/** 사용자구분 */
|
||||
private String userSe;
|
||||
/** 조직(부서)ID */
|
||||
private String orgnztId;
|
||||
/** 조직(부서)명 */
|
||||
private String orgnztNm;
|
||||
/** 고유아이디 */
|
||||
private String uniqId;
|
||||
/** 로그인 후 이동할 페이지 */
|
||||
private String url;
|
||||
/** 사용자 IP정보 */
|
||||
private String ip;
|
||||
/** GPKI인증 DN */
|
||||
private String dn;
|
||||
/**
|
||||
* id attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* id attribute 값을 설정한다.
|
||||
* @param id String
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* name attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* name attribute 값을 설정한다.
|
||||
* @param name String
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* ihidNum attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getIhidNum() {
|
||||
return ihidNum;
|
||||
}
|
||||
/**
|
||||
* ihidNum attribute 값을 설정한다.
|
||||
* @param ihidNum String
|
||||
*/
|
||||
public void setIhidNum(String ihidNum) {
|
||||
this.ihidNum = ihidNum;
|
||||
}
|
||||
/**
|
||||
* email attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
/**
|
||||
* email attribute 값을 설정한다.
|
||||
* @param email String
|
||||
*/
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
/**
|
||||
* password attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
/**
|
||||
* password attribute 값을 설정한다.
|
||||
* @param password String
|
||||
*/
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
/**
|
||||
* passwordHint attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getPasswordHint() {
|
||||
return passwordHint;
|
||||
}
|
||||
/**
|
||||
* passwordHint attribute 값을 설정한다.
|
||||
* @param passwordHint String
|
||||
*/
|
||||
public void setPasswordHint(String passwordHint) {
|
||||
this.passwordHint = passwordHint;
|
||||
}
|
||||
/**
|
||||
* passwordCnsr attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getPasswordCnsr() {
|
||||
return passwordCnsr;
|
||||
}
|
||||
/**
|
||||
* passwordCnsr attribute 값을 설정한다.
|
||||
* @param passwordCnsr String
|
||||
*/
|
||||
public void setPasswordCnsr(String passwordCnsr) {
|
||||
this.passwordCnsr = passwordCnsr;
|
||||
}
|
||||
/**
|
||||
* userSe attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUserSe() {
|
||||
return userSe;
|
||||
}
|
||||
/**
|
||||
* userSe attribute 값을 설정한다.
|
||||
* @param userSe String
|
||||
*/
|
||||
public void setUserSe(String userSe) {
|
||||
this.userSe = userSe;
|
||||
}
|
||||
/**
|
||||
* orgnztId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getOrgnztId() {
|
||||
return orgnztId;
|
||||
}
|
||||
/**
|
||||
* orgnztId attribute 값을 설정한다.
|
||||
* @param orgnztId String
|
||||
*/
|
||||
public void setOrgnztId(String orgnztId) {
|
||||
this.orgnztId = orgnztId;
|
||||
}
|
||||
/**
|
||||
* uniqId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUniqId() {
|
||||
return uniqId;
|
||||
}
|
||||
/**
|
||||
* uniqId attribute 값을 설정한다.
|
||||
* @param uniqId String
|
||||
*/
|
||||
public void setUniqId(String uniqId) {
|
||||
this.uniqId = uniqId;
|
||||
}
|
||||
/**
|
||||
* url attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
/**
|
||||
* url attribute 값을 설정한다.
|
||||
* @param url String
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
/**
|
||||
* ip attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
/**
|
||||
* ip attribute 값을 설정한다.
|
||||
* @param ip String
|
||||
*/
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
/**
|
||||
* dn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getDn() {
|
||||
return dn;
|
||||
}
|
||||
/**
|
||||
* dn attribute 값을 설정한다.
|
||||
* @param dn String
|
||||
*/
|
||||
public void setDn(String dn) {
|
||||
this.dn = dn;
|
||||
}
|
||||
/**
|
||||
* @return the orgnztNm
|
||||
*/
|
||||
public String getOrgnztNm() {
|
||||
return orgnztNm;
|
||||
}
|
||||
/**
|
||||
* @param orgnztNm the orgnztNm to set
|
||||
*/
|
||||
public void setOrgnztNm(String orgnztNm) {
|
||||
this.orgnztNm = orgnztNm;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,119 @@
|
|||
package egovframework.com.cmm;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 세션 VO 클래스
|
||||
* @author 공통서비스 개발팀 박지욱
|
||||
* @since 2009.03.06
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.03.06 박지욱 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class SessionVO implements Serializable {
|
||||
|
||||
/** 아이디 */
|
||||
private String sUserId;
|
||||
/** 이름 */
|
||||
private String sUserNm;
|
||||
/** 이메일 */
|
||||
private String sEmail;
|
||||
/** 사용자구분 */
|
||||
private String sUserSe;
|
||||
/** 조직(부서)ID */
|
||||
private String orgnztId;
|
||||
/** 고유아이디 */
|
||||
private String uniqId;
|
||||
/**
|
||||
* sUserId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSUserId() {
|
||||
return sUserId;
|
||||
}
|
||||
/**
|
||||
* sUserId attribute 값을 설정한다.
|
||||
* @param sUserId String
|
||||
*/
|
||||
public void setSUserId(String userId) {
|
||||
sUserId = userId;
|
||||
}
|
||||
/**
|
||||
* sUserNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSUserNm() {
|
||||
return sUserNm;
|
||||
}
|
||||
/**
|
||||
* sUserNm attribute 값을 설정한다.
|
||||
* @param sUserNm String
|
||||
*/
|
||||
public void setSUserNm(String userNm) {
|
||||
sUserNm = userNm;
|
||||
}
|
||||
/**
|
||||
* sEmail attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSEmail() {
|
||||
return sEmail;
|
||||
}
|
||||
/**
|
||||
* sEmail attribute 값을 설정한다.
|
||||
* @param sEmail String
|
||||
*/
|
||||
public void setSEmail(String email) {
|
||||
sEmail = email;
|
||||
}
|
||||
/**
|
||||
* sUserSe attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSUserSe() {
|
||||
return sUserSe;
|
||||
}
|
||||
/**
|
||||
* sUserSe attribute 값을 설정한다.
|
||||
* @param sUserSe String
|
||||
*/
|
||||
public void setSUserSe(String userSe) {
|
||||
sUserSe = userSe;
|
||||
}
|
||||
/**
|
||||
* orgnztId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getOrgnztId() {
|
||||
return orgnztId;
|
||||
}
|
||||
/**
|
||||
* orgnztId attribute 값을 설정한다.
|
||||
* @param orgnztId String
|
||||
*/
|
||||
public void setOrgnztId(String orgnztId) {
|
||||
this.orgnztId = orgnztId;
|
||||
}
|
||||
/**
|
||||
* uniqId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUniqId() {
|
||||
return uniqId;
|
||||
}
|
||||
/**
|
||||
* uniqId attribute 값을 설정한다.
|
||||
* @param uniqId String
|
||||
*/
|
||||
public void setUniqId(String uniqId) {
|
||||
this.uniqId = uniqId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package egovframework.com.cmm.annotation;
|
||||
|
||||
/**
|
||||
* 컴포넌트의 포함 정보 표현을 위한 annotation 클래스
|
||||
* 기본적으로 Controller 클래스에 annotation을 부여하되,
|
||||
* 하나의 Controller에 여러 개의 목록성 url mapping이 제공되는 경우에는
|
||||
* 메소드에 annotation을 부여한다.
|
||||
* @author 공통컴포넌트 정진오
|
||||
* @since 2011.08.26
|
||||
* @version 2.0.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011.08.26 정진오 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface IncludedInfo {
|
||||
String name() default ""; // 컴포넌트의 한글 이름
|
||||
String listUrl() default ""; // 컴포넌트의 목록정보조회를 위한 URL
|
||||
int order() default 0; // 자동 생성되는 메뉴 목록에 표시되는 순서
|
||||
int gid() default 0; // 컴포넌트의 Group ID(대분류 구분)
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright 2008-2009 MOPAS(MINISTRY OF SECURITY AND PUBLIC ADMINISTRATION).
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package egovframework.com.cmm.filter;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class HTMLTagFilter implements Filter{
|
||||
|
||||
private FilterConfig config;
|
||||
|
||||
public void doFilter(ServletRequest request, ServletResponse response,
|
||||
FilterChain chain) throws IOException, ServletException {
|
||||
|
||||
chain.doFilter(new HTMLTagFilterRequestWrapper((HttpServletRequest)request), response);
|
||||
}
|
||||
|
||||
public void init(FilterConfig config) throws ServletException {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* Copyright 2008-2009 MOPAS(MINISTRY OF SECURITY AND PUBLIC ADMINISTRATION).
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package egovframework.com.cmm.filter;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletRequestWrapper;
|
||||
|
||||
public class HTMLTagFilterRequestWrapper extends HttpServletRequestWrapper {
|
||||
|
||||
public HTMLTagFilterRequestWrapper(HttpServletRequest request) {
|
||||
super(request);
|
||||
}
|
||||
|
||||
public String[] getParameterValues(String parameter) {
|
||||
|
||||
String[] values = super.getParameterValues(parameter);
|
||||
|
||||
if(values==null){
|
||||
return null;
|
||||
}
|
||||
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
if (values[i] != null) {
|
||||
StringBuffer strBuff = new StringBuffer();
|
||||
for (int j = 0; j < values[i].length(); j++) {
|
||||
char c = values[i].charAt(j);
|
||||
switch (c) {
|
||||
case '<':
|
||||
strBuff.append("<");
|
||||
break;
|
||||
case '>':
|
||||
strBuff.append(">");
|
||||
break;
|
||||
//case '&':
|
||||
//strBuff.append("&");
|
||||
//break;
|
||||
case '"':
|
||||
strBuff.append(""");
|
||||
break;
|
||||
case '\'':
|
||||
strBuff.append("'");
|
||||
break;
|
||||
default:
|
||||
strBuff.append(c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
values[i] = strBuff.toString();
|
||||
} else {
|
||||
values[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
public String getParameter(String parameter) {
|
||||
|
||||
String value = super.getParameter(parameter);
|
||||
|
||||
if(value==null){
|
||||
return null;
|
||||
}
|
||||
|
||||
StringBuffer strBuff = new StringBuffer();
|
||||
|
||||
for (int i = 0; i < value.length(); i++) {
|
||||
char c = value.charAt(i);
|
||||
switch (c) {
|
||||
case '<':
|
||||
strBuff.append("<");
|
||||
break;
|
||||
case '>':
|
||||
strBuff.append(">");
|
||||
break;
|
||||
case '&':
|
||||
strBuff.append("&");
|
||||
break;
|
||||
case '"':
|
||||
strBuff.append(""");
|
||||
break;
|
||||
case '\'':
|
||||
strBuff.append("'");
|
||||
break;
|
||||
default:
|
||||
strBuff.append(c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
value = strBuff.toString();
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package egovframework.com.cmm.interceptor;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.ModelAndViewDefiningException;
|
||||
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
|
||||
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
|
||||
/**
|
||||
* 인증여부 체크 인터셉터
|
||||
* @author 공통서비스 개발팀 서준식
|
||||
* @since 2011.07.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011.07.01 서준식 최초 생성
|
||||
* 2011.09.07 서준식 인증이 필요없는 URL을 패스하는 로직 추가
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
|
||||
public class AuthenticInterceptor extends HandlerInterceptorAdapter {
|
||||
|
||||
private Set<String> permittedURL;
|
||||
|
||||
public void setPermittedURL(Set<String> permittedURL) {
|
||||
this.permittedURL = permittedURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* 세션에 계정정보(LoginVO)가 있는지 여부로 인증 여부를 체크한다.
|
||||
* 계정정보(LoginVO)가 없다면, 로그인 페이지로 이동한다.
|
||||
*/
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request,
|
||||
HttpServletResponse response, Object handler) throws Exception {
|
||||
|
||||
String requestURI = request.getRequestURI(); //요청 URI
|
||||
boolean isPermittedURL = false;
|
||||
|
||||
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
|
||||
if(loginVO != null){
|
||||
return true;
|
||||
}else{
|
||||
|
||||
|
||||
for(Iterator<String> it = this.permittedURL.iterator(); it.hasNext();){
|
||||
String urlPattern = request.getContextPath() + (String) it.next();
|
||||
|
||||
if(Pattern.matches(urlPattern, requestURI)){// 정규표현식을 이용해서 요청 URI가 허용된 URL에 맞는지 점검함.
|
||||
isPermittedURL = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(!isPermittedURL){
|
||||
ModelAndView modelAndView = new ModelAndView("redirect:/uat/uia/egovLoginUsr.do");
|
||||
throw new ModelAndViewDefiningException(modelAndView);
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package egovframework.com.cmm.interceptor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
|
||||
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
|
||||
/**
|
||||
* 사용자IP 체크 인터셉터
|
||||
* @author 유지보수팀 이기하
|
||||
* @since 2013.03.28
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2013.03.28 이기하 최초 생성
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class IpObtainInterceptor extends HandlerInterceptorAdapter {
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
|
||||
String clientIp = request.getRemoteAddr();
|
||||
|
||||
LoginVO loginVO = (LoginVO) EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
|
||||
if (loginVO != null) {
|
||||
loginVO.setIp(clientIp);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 공통상세코드 모델 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class CmmnDetailCode implements Serializable {
|
||||
|
||||
/*
|
||||
* 코드ID
|
||||
*/
|
||||
private String codeId = "";
|
||||
|
||||
/*
|
||||
* 코드ID명
|
||||
*/
|
||||
private String codeIdNm = "";
|
||||
|
||||
/*
|
||||
* 코드
|
||||
*/
|
||||
private String code = "";
|
||||
|
||||
/*
|
||||
* 코드명
|
||||
*/
|
||||
private String codeNm = "";
|
||||
|
||||
/*
|
||||
* 코드설명
|
||||
*/
|
||||
private String codeDc = "";
|
||||
|
||||
/*
|
||||
* 사용여부
|
||||
*/
|
||||
private String useAt = "";
|
||||
|
||||
/*
|
||||
* 최초등록자ID
|
||||
*/
|
||||
private String frstRegisterId = "";
|
||||
|
||||
/*
|
||||
* 최종수정자ID
|
||||
*/
|
||||
private String lastUpdusrId = "";
|
||||
|
||||
/**
|
||||
* codeId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCodeId() {
|
||||
return codeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeId attribute 값을 설정한다.
|
||||
* @param codeId String
|
||||
*/
|
||||
public void setCodeId(String codeId) {
|
||||
this.codeId = codeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeIdNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCodeIdNm() {
|
||||
return codeIdNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeIdNm attribute 값을 설정한다.
|
||||
* @param codeIdNm String
|
||||
*/
|
||||
public void setCodeIdNm(String codeIdNm) {
|
||||
this.codeIdNm = codeIdNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* code attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* code attribute 값을 설정한다.
|
||||
* @param code String
|
||||
*/
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCodeNm() {
|
||||
return codeNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeNm attribute 값을 설정한다.
|
||||
* @param codeNm String
|
||||
*/
|
||||
public void setCodeNm(String codeNm) {
|
||||
this.codeNm = codeNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeDc attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCodeDc() {
|
||||
return codeDc;
|
||||
}
|
||||
|
||||
/**
|
||||
* codeDc attribute 값을 설정한다.
|
||||
* @param codeDc String
|
||||
*/
|
||||
public void setCodeDc(String codeDc) {
|
||||
this.codeDc = codeDc;
|
||||
}
|
||||
|
||||
/**
|
||||
* useAt attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUseAt() {
|
||||
return useAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* useAt attribute 값을 설정한다.
|
||||
* @param useAt String
|
||||
*/
|
||||
public void setUseAt(String useAt) {
|
||||
this.useAt = useAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getFrstRegisterId() {
|
||||
return frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 값을 설정한다.
|
||||
* @param frstRegisterId String
|
||||
*/
|
||||
public void setFrstRegisterId(String frstRegisterId) {
|
||||
this.frstRegisterId = frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getLastUpdusrId() {
|
||||
return lastUpdusrId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 값을 설정한다.
|
||||
* @param lastUpdusrId String
|
||||
*/
|
||||
public void setLastUpdusrId(String lastUpdusrId) {
|
||||
this.lastUpdusrId = lastUpdusrId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovFileMngService.java
|
||||
* @Description : 파일정보의 관리를 위한 서비스 인터페이스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 25. 이삼섭 최초생성
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 25.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
public interface EgovFileMngService {
|
||||
|
||||
/**
|
||||
* 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<FileVO> selectFileInfs(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 하나의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @throws Exception
|
||||
*/
|
||||
public String insertFileInf(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @param fvoList
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public String insertFileInfs(List fvoList) throws Exception;
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 수정한다.
|
||||
*
|
||||
* @param fvoList
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void updateFileInfs(List fvoList) throws Exception;
|
||||
|
||||
/**
|
||||
* 여러 개의 파일을 삭제한다.
|
||||
*
|
||||
* @param fvoList
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void deleteFileInfs(List fvoList) throws Exception;
|
||||
|
||||
/**
|
||||
* 하나의 파일을 삭제한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteFileInf(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 파일에 대한 상세정보를 조회한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public FileVO selectFileInf(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 파일 구분자에 대한 최대값을 구한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public int getMaxFileSN(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 전체 파일을 삭제한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAllFileInf(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 파일명 검색에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Map<String, Object> selectFileListByFileNm(FileVO fvo) throws Exception;
|
||||
|
||||
/**
|
||||
* 이미지 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<FileVO> selectImageFileList(FileVO vo) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,494 @@
|
|||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import egovframework.com.cmm.EgovWebUtil;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
|
||||
|
||||
/**
|
||||
* @Class Name : EgovFileMngUtil.java
|
||||
* @Description : 메시지 처리 관련 유틸리티
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.02.13 이삼섭 최초 생성
|
||||
* 2011.08.09 서준식 utl.fcc패키지와 Dependency제거를 위해 getTimeStamp()메서드 추가
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 02. 13
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@Component("EgovFileMngUtil")
|
||||
public class EgovFileMngUtil {
|
||||
|
||||
public static final int BUFF_SIZE = 2048;
|
||||
|
||||
|
||||
@Resource(name = "egovFileIdGnrService")
|
||||
private EgovIdGnrService idgenService;
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(EgovFileMngUtil.class.getName());
|
||||
|
||||
/**
|
||||
* 첨부파일에 대한 목록 정보를 취득한다.
|
||||
*
|
||||
* @param files
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public List<FileVO> parseFileInf(Map<String, MultipartFile> files, String KeyStr, int fileKeyParam, String atchFileId, String storePath) throws Exception {
|
||||
int fileKey = fileKeyParam;
|
||||
|
||||
String storePathString = "";
|
||||
String atchFileIdString = "";
|
||||
|
||||
if ("".equals(storePath) || storePath == null) {
|
||||
storePathString = EgovProperties.getProperty("Globals.fileStorePath");
|
||||
} else {
|
||||
storePathString = EgovProperties.getProperty(storePath);
|
||||
}
|
||||
|
||||
if ("".equals(atchFileId) || atchFileId == null) {
|
||||
atchFileIdString = idgenService.getNextStringId();
|
||||
} else {
|
||||
atchFileIdString = atchFileId;
|
||||
}
|
||||
|
||||
File saveFolder = new File(EgovWebUtil.filePathBlackList(storePathString));
|
||||
|
||||
if (!saveFolder.exists() || saveFolder.isFile()) {
|
||||
saveFolder.mkdirs();
|
||||
}
|
||||
|
||||
Iterator<Entry<String, MultipartFile>> itr = files.entrySet().iterator();
|
||||
MultipartFile file;
|
||||
String filePath = "";
|
||||
List<FileVO> result = new ArrayList<FileVO>();
|
||||
FileVO fvo;
|
||||
|
||||
while (itr.hasNext()) {
|
||||
Entry<String, MultipartFile> entry = itr.next();
|
||||
|
||||
file = entry.getValue();
|
||||
String orginFileName = file.getOriginalFilename();
|
||||
|
||||
//--------------------------------------
|
||||
// 원 파일명이 없는 경우 처리
|
||||
// (첨부가 되지 않은 input file type)
|
||||
//--------------------------------------
|
||||
if ("".equals(orginFileName)) {
|
||||
continue;
|
||||
}
|
||||
////------------------------------------
|
||||
|
||||
int index = orginFileName.lastIndexOf(".");
|
||||
//String fileName = orginFileName.substring(0, index);
|
||||
String fileExt = orginFileName.substring(index + 1);
|
||||
String newName = KeyStr + getTimeStamp() + fileKey;
|
||||
long _size = file.getSize();
|
||||
|
||||
if (!"".equals(orginFileName)) {
|
||||
filePath = storePathString + File.separator + newName;
|
||||
file.transferTo(new File(EgovWebUtil.filePathBlackList(filePath)));
|
||||
}
|
||||
fvo = new FileVO();
|
||||
fvo.setFileExtsn(fileExt);
|
||||
fvo.setFileStreCours(storePathString);
|
||||
fvo.setFileMg(Long.toString(_size));
|
||||
fvo.setOrignlFileNm(orginFileName);
|
||||
fvo.setStreFileNm(newName);
|
||||
fvo.setAtchFileId(atchFileIdString);
|
||||
fvo.setFileSn(String.valueOf(fileKey));
|
||||
|
||||
//writeFile(file, newName, storePathString);
|
||||
result.add(fvo);
|
||||
|
||||
fileKey++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부파일을 서버에 저장한다.
|
||||
*
|
||||
* @param file
|
||||
* @param newName
|
||||
* @param stordFilePath
|
||||
* @throws Exception
|
||||
*/
|
||||
protected void writeUploadedFile(MultipartFile file, String newName, String stordFilePath) throws Exception {
|
||||
InputStream stream = null;
|
||||
OutputStream bos = null;
|
||||
|
||||
try {
|
||||
stream = file.getInputStream();
|
||||
File cFile = new File(stordFilePath);
|
||||
|
||||
if (!cFile.isDirectory()) {
|
||||
boolean _flag = cFile.mkdir();
|
||||
if (!_flag) {
|
||||
throw new IOException("Directory creation Failed ");
|
||||
}
|
||||
}
|
||||
|
||||
bos = new FileOutputStream(stordFilePath + File.separator + newName);
|
||||
|
||||
int bytesRead = 0;
|
||||
byte[] buffer = new byte[BUFF_SIZE];
|
||||
|
||||
while ((bytesRead = stream.read(buffer, 0, BUFF_SIZE)) != -1) {
|
||||
bos.write(buffer, 0, bytesRead);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//e.printStackTrace();
|
||||
LOG.error("IGNORE:", e); // 2011.10.10 보안점검 후속조치
|
||||
} finally {
|
||||
if (bos != null) {
|
||||
try {
|
||||
bos.close();
|
||||
} catch (Exception ignore) {
|
||||
LOG.debug("IGNORED: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
if (stream != null) {
|
||||
try {
|
||||
stream.close();
|
||||
} catch (Exception ignore) {
|
||||
LOG.debug("IGNORED: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 서버의 파일을 다운로드한다.
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void downFile(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
String downFileName = "";
|
||||
String orgFileName = "";
|
||||
|
||||
if ((String)request.getAttribute("downFile") == null) {
|
||||
downFileName = "";
|
||||
} else {
|
||||
downFileName = (String)request.getAttribute("downFile");
|
||||
}
|
||||
|
||||
if ((String)request.getAttribute("orgFileName") == null) {
|
||||
orgFileName = "";
|
||||
} else {
|
||||
orgFileName = (String)request.getAttribute("orginFile");
|
||||
}
|
||||
|
||||
orgFileName = orgFileName.replaceAll("\r", "").replaceAll("\n", "");
|
||||
|
||||
File file = new File(EgovWebUtil.filePathBlackList(downFileName));
|
||||
|
||||
if (!file.exists()) {
|
||||
throw new FileNotFoundException(downFileName);
|
||||
}
|
||||
|
||||
if (!file.isFile()) {
|
||||
throw new FileNotFoundException(downFileName);
|
||||
}
|
||||
|
||||
byte[] b = new byte[BUFF_SIZE]; //buffer size 2K.
|
||||
|
||||
response.setContentType("application/x-msdownload");
|
||||
response.setHeader("Content-Disposition:", "attachment; filename=" + new String(orgFileName.getBytes(), "UTF-8"));
|
||||
response.setHeader("Content-Transfer-Encoding", "binary");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Expires", "0");
|
||||
|
||||
BufferedInputStream fin = null;
|
||||
BufferedOutputStream outs = null;
|
||||
|
||||
try {
|
||||
fin = new BufferedInputStream(new FileInputStream(file));
|
||||
outs = new BufferedOutputStream(response.getOutputStream());
|
||||
int read = 0;
|
||||
|
||||
while ((read = fin.read(b)) != -1) {
|
||||
outs.write(b, 0, read);
|
||||
}
|
||||
} finally {
|
||||
if (outs != null) {
|
||||
try {
|
||||
outs.close();
|
||||
} catch (Exception ignore) {
|
||||
//System.out.println("IGNORED: " + ignore.getMessage());
|
||||
LOG.debug("IGNORED: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
if (fin != null) {
|
||||
try {
|
||||
fin.close();
|
||||
} catch (Exception ignore) {
|
||||
//System.out.println("IGNORED: " + ignore.getMessage());
|
||||
LOG.debug("IGNORED: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부로 등록된 파일을 서버에 업로드한다.
|
||||
*
|
||||
* @param file
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static HashMap<String, String> uploadFile(MultipartFile file) throws Exception {
|
||||
|
||||
HashMap<String, String> map = new HashMap<String, String>();
|
||||
//Write File 이후 Move File????
|
||||
String newName = "";
|
||||
String stordFilePath = EgovProperties.getProperty("Globals.fileStorePath");
|
||||
String orginFileName = file.getOriginalFilename();
|
||||
|
||||
int index = orginFileName.lastIndexOf(".");
|
||||
//String fileName = orginFileName.substring(0, _index);
|
||||
String fileExt = orginFileName.substring(index + 1);
|
||||
long size = file.getSize();
|
||||
|
||||
//newName 은 Naming Convention에 의해서 생성
|
||||
newName = getTimeStamp(); // 2012.11 KISA 보안조치
|
||||
writeFile(file, newName, stordFilePath);
|
||||
//storedFilePath는 지정
|
||||
map.put(Globals.ORIGIN_FILE_NM, orginFileName);
|
||||
map.put(Globals.UPLOAD_FILE_NM, newName);
|
||||
map.put(Globals.FILE_EXT, fileExt);
|
||||
map.put(Globals.FILE_PATH, stordFilePath);
|
||||
map.put(Globals.FILE_SIZE, String.valueOf(size));
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일을 실제 물리적인 경로에 생성한다.
|
||||
*
|
||||
* @param file
|
||||
* @param newName
|
||||
* @param stordFilePath
|
||||
* @throws Exception
|
||||
*/
|
||||
protected static void writeFile(MultipartFile file, String newName, String stordFilePath) throws Exception {
|
||||
InputStream stream = null;
|
||||
OutputStream bos = null;
|
||||
|
||||
try {
|
||||
stream = file.getInputStream();
|
||||
File cFile = new File(EgovWebUtil.filePathBlackList(stordFilePath));
|
||||
|
||||
if (!cFile.isDirectory())
|
||||
cFile.mkdir();
|
||||
|
||||
bos = new FileOutputStream(EgovWebUtil.filePathBlackList(stordFilePath + File.separator + newName));
|
||||
|
||||
int bytesRead = 0;
|
||||
byte[] buffer = new byte[BUFF_SIZE];
|
||||
|
||||
while ((bytesRead = stream.read(buffer, 0, BUFF_SIZE)) != -1) {
|
||||
bos.write(buffer, 0, bytesRead);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//e.printStackTrace();
|
||||
//throw new RuntimeException(e); // 보안점검 후속조치
|
||||
Logger.getLogger(EgovFileMngUtil.class).debug("IGNORED: " + e.getMessage());
|
||||
} finally {
|
||||
if (bos != null) {
|
||||
try {
|
||||
bos.close();
|
||||
} catch (Exception ignore) {
|
||||
Logger.getLogger(EgovFileMngUtil.class).debug("IGNORED: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
if (stream != null) {
|
||||
try {
|
||||
stream.close();
|
||||
} catch (Exception ignore) {
|
||||
Logger.getLogger(EgovFileMngUtil.class).debug("IGNORED: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 서버 파일에 대하여 다운로드를 처리한다.
|
||||
*
|
||||
* @param response
|
||||
* @param streFileNm
|
||||
* : 파일저장 경로가 포함된 형태
|
||||
* @param orignFileNm
|
||||
* @throws Exception
|
||||
*/
|
||||
public void downFile(HttpServletResponse response, String streFileNm, String orignFileNm) throws Exception {
|
||||
String downFileName = streFileNm;
|
||||
String orgFileName = orignFileNm;
|
||||
|
||||
File file = new File(downFileName);
|
||||
//log.debug(this.getClass().getName()+" downFile downFileName "+downFileName);
|
||||
//log.debug(this.getClass().getName()+" downFile orgFileName "+orgFileName);
|
||||
|
||||
if (!file.exists()) {
|
||||
throw new FileNotFoundException(downFileName);
|
||||
}
|
||||
|
||||
if (!file.isFile()) {
|
||||
throw new FileNotFoundException(downFileName);
|
||||
}
|
||||
|
||||
//byte[] b = new byte[BUFF_SIZE]; //buffer size 2K.
|
||||
int fSize = (int)file.length();
|
||||
if (fSize > 0) {
|
||||
BufferedInputStream in = null;
|
||||
|
||||
try {
|
||||
in = new BufferedInputStream(new FileInputStream(file));
|
||||
|
||||
String mimetype = "text/html"; //"application/x-msdownload"
|
||||
|
||||
response.setBufferSize(fSize);
|
||||
response.setContentType(mimetype);
|
||||
response.setHeader("Content-Disposition:", "attachment; filename=" + orgFileName);
|
||||
response.setContentLength(fSize);
|
||||
//response.setHeader("Content-Transfer-Encoding","binary");
|
||||
//response.setHeader("Pragma","no-cache");
|
||||
//response.setHeader("Expires","0");
|
||||
FileCopyUtils.copy(in, response.getOutputStream());
|
||||
} finally {
|
||||
if (in != null) {
|
||||
try {
|
||||
in.close();
|
||||
} catch (Exception ignore) {
|
||||
|
||||
Logger.getLogger(EgovFileMngUtil.class).debug("IGNORED: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
response.getOutputStream().flush();
|
||||
response.getOutputStream().close();
|
||||
}
|
||||
|
||||
/*
|
||||
String uploadPath = propertiesService.getString("fileDir");
|
||||
|
||||
File uFile = new File(uploadPath, requestedFile);
|
||||
int fSize = (int) uFile.length();
|
||||
|
||||
if (fSize > 0) {
|
||||
BufferedInputStream in = new BufferedInputStream(new FileInputStream(uFile));
|
||||
|
||||
String mimetype = "text/html";
|
||||
|
||||
response.setBufferSize(fSize);
|
||||
response.setContentType(mimetype);
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\""
|
||||
+ requestedFile + "\"");
|
||||
response.setContentLength(fSize);
|
||||
|
||||
FileCopyUtils.copy(in, response.getOutputStream());
|
||||
in.close();
|
||||
response.getOutputStream().flush();
|
||||
response.getOutputStream().close();
|
||||
} else {
|
||||
response.setContentType("text/html");
|
||||
PrintWriter printwriter = response.getWriter();
|
||||
printwriter.println("<html>");
|
||||
printwriter.println("<br><br><br><h2>Could not get file name:<br>" + requestedFile + "</h2>");
|
||||
printwriter.println("<br><br><br><center><h3><a href='javascript: history.go(-1)'>Back</a></h3></center>");
|
||||
printwriter.println("<br><br><br>© webAccess");
|
||||
printwriter.println("</html>");
|
||||
printwriter.flush();
|
||||
printwriter.close();
|
||||
}
|
||||
//*/
|
||||
|
||||
|
||||
/*
|
||||
response.setContentType("application/x-msdownload");
|
||||
response.setHeader("Content-Disposition:", "attachment; filename=" + new String(orgFileName.getBytes(),"UTF-8" ));
|
||||
response.setHeader("Content-Transfer-Encoding","binary");
|
||||
response.setHeader("Pragma","no-cache");
|
||||
response.setHeader("Expires","0");
|
||||
|
||||
BufferedInputStream fin = new BufferedInputStream(new FileInputStream(file));
|
||||
BufferedOutputStream outs = new BufferedOutputStream(response.getOutputStream());
|
||||
int read = 0;
|
||||
|
||||
while ((read = fin.read(b)) != -1) {
|
||||
outs.write(b,0,read);
|
||||
}
|
||||
log.debug(this.getClass().getName()+" BufferedOutputStream Write Complete!!! ");
|
||||
|
||||
outs.close();
|
||||
fin.close();
|
||||
//*/
|
||||
}
|
||||
|
||||
/**
|
||||
* 2011.08.09
|
||||
* 공통 컴포넌트 utl.fcc 패키지와 Dependency제거를 위해 내부 메서드로 추가 정의함
|
||||
* 응용어플리케이션에서 고유값을 사용하기 위해 시스템에서17자리의TIMESTAMP값을 구하는 기능
|
||||
*
|
||||
* @param
|
||||
* @return Timestamp 값
|
||||
* @exception MyException
|
||||
* @see
|
||||
*/
|
||||
private static String getTimeStamp() {
|
||||
|
||||
String rtnStr = null;
|
||||
|
||||
// 문자열로 변환하기 위한 패턴 설정(년도-월-일 시:분:초:초(자정이후 초))
|
||||
String pattern = "yyyyMMddhhmmssSSS";
|
||||
|
||||
try {
|
||||
SimpleDateFormat sdfCurrent = new SimpleDateFormat(pattern, Locale.KOREA);
|
||||
Timestamp ts = new Timestamp(System.currentTimeMillis());
|
||||
|
||||
rtnStr = sdfCurrent.format(ts.getTime());
|
||||
} catch (Exception e) {
|
||||
//e.printStackTrace();
|
||||
|
||||
//throw new RuntimeException(e); // 보안점검 후속조치
|
||||
LOG.debug("IGNORED: " + e.getMessage());
|
||||
}
|
||||
|
||||
return rtnStr;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,328 @@
|
|||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import egovframework.com.cmm.EgovWebUtil;
|
||||
|
||||
/**
|
||||
* Class Name : EgovProperties.java
|
||||
* Description : properties값들을 파일로부터 읽어와 Globals클래스의 정적변수로 로드시켜주는 클래스로
|
||||
* 문자열 정보 기준으로 사용할 전역변수를 시스템 재시작으로 반영할 수 있도록 한다.
|
||||
* Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.01.19 박지욱 최초 생성
|
||||
* 2011.07.20 서준식 Globals파일의 상대경로를 읽은 메서드 추가
|
||||
* @author 공통 서비스 개발팀 박지욱
|
||||
* @since 2009. 01. 19
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
|
||||
public class EgovProperties{
|
||||
|
||||
//프로퍼티값 로드시 에러발생하면 반환되는 에러문자열
|
||||
public static final String ERR_CODE =" EXCEPTION OCCURRED";
|
||||
public static final String ERR_CODE_FNFE =" EXCEPTION(FNFE) OCCURRED";
|
||||
public static final String ERR_CODE_IOE =" EXCEPTION(IOE) OCCURRED";
|
||||
|
||||
//파일구분자
|
||||
static final char FILE_SEPARATOR = File.separatorChar;
|
||||
|
||||
//프로퍼티 파일의 물리적 위치
|
||||
/*public static final String GLOBALS_PROPERTIES_FILE
|
||||
= System.getProperty("user.home") + System.getProperty("file.separator") + "egovProps"
|
||||
+ System.getProperty("file.separator") + "globals.properties";*/
|
||||
|
||||
|
||||
// public static final String RELATIVE_PATH_PREFIX = EgovProperties.class.getResource("").getPath()
|
||||
// + System.getProperty("file.separator") + ".." + System.getProperty("file.separator")
|
||||
// + ".." + System.getProperty("file.separator") + ".." + System.getProperty("file.separator");
|
||||
|
||||
|
||||
public static final String RELATIVE_PATH_PREFIX = EgovProperties.class.getResource("").getPath().substring(0, EgovProperties.class.getResource("").getPath().lastIndexOf("com"));
|
||||
|
||||
public static final String GLOBALS_PROPERTIES_FILE = RELATIVE_PATH_PREFIX + "egovProps" + System.getProperty("file.separator") + "globals.properties";
|
||||
public static final String GEOINFO_PROPERTIES_FILE = RELATIVE_PATH_PREFIX + "egovProps" + System.getProperty("file.separator") + "geoinfo.properties";
|
||||
public static final String GEOINFOWEB_PROPERTIES_FILE = RELATIVE_PATH_PREFIX + "egovProps" + System.getProperty("file.separator") + "geoinfoWeb.properties";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 인자로 주어진 문자열을 Key값으로 하는 상대경로 프로퍼티 값을 절대경로로 반환한다(Globals.java 전용)
|
||||
* @param keyName String
|
||||
* @return String
|
||||
*/
|
||||
public static String getPathProperty(String keyName){
|
||||
String value = ERR_CODE;
|
||||
value="99";
|
||||
// debug(GLOBALS_PROPERTIES_FILE + " : " + keyName);
|
||||
FileInputStream fis = null;
|
||||
try{
|
||||
Properties props = new Properties();
|
||||
fis = new FileInputStream(EgovWebUtil.filePathBlackList(GLOBALS_PROPERTIES_FILE));
|
||||
props.load(new java.io.BufferedInputStream(fis));
|
||||
value = props.getProperty(keyName).trim();
|
||||
value = RELATIVE_PATH_PREFIX + "egovProps" + System.getProperty("file.separator") + value;
|
||||
}catch(FileNotFoundException fne){
|
||||
debug(fne);
|
||||
}catch(IOException ioe){
|
||||
debug(ioe);
|
||||
}catch(Exception e){
|
||||
debug(e);
|
||||
}finally{
|
||||
try {
|
||||
if (fis != null) fis.close();
|
||||
} catch (Exception ex) {
|
||||
//ex.printStackTrace();
|
||||
//System.out.println("IGNORE: " + ex); // 2011.10.10 보안점검 후속조치
|
||||
Logger.getLogger(EgovProperties.class).debug("IGNORED: " + ex.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 인자로 주어진 문자열을 Key값으로 하는 프로퍼티 값을 반환한다(Globals.properties 전용)
|
||||
* @param keyName String
|
||||
* @return String
|
||||
*/
|
||||
public static String getProperty(String keyName){
|
||||
String value = ERR_CODE;
|
||||
value="99";
|
||||
debug(GLOBALS_PROPERTIES_FILE + " : " + keyName);
|
||||
FileInputStream fis = null;
|
||||
try{
|
||||
Properties props = new Properties();
|
||||
fis = new FileInputStream(EgovWebUtil.filePathBlackList(GLOBALS_PROPERTIES_FILE));
|
||||
props.load(new java.io.BufferedInputStream(fis));
|
||||
value = props.getProperty(keyName).trim();
|
||||
}catch(FileNotFoundException fne){
|
||||
debug(fne);
|
||||
}catch(IOException ioe){
|
||||
debug(ioe);
|
||||
}catch(Exception e){
|
||||
debug(e);
|
||||
}finally{
|
||||
try {
|
||||
if (fis != null) fis.close();
|
||||
} catch (Exception ex) {
|
||||
//ex.printStackTrace();
|
||||
//System.out.println("IGNORE: " + ex); // 2011.10.10 보안점검 후속조치
|
||||
Logger.getLogger(EgovProperties.class).debug("IGNORED: " + ex.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인자로 주어진 문자열을 Key값으로 하는 프로퍼티 값을 반환한다(geoinfo.properties 전용)
|
||||
* @param keyName String
|
||||
* @return String
|
||||
*/
|
||||
public static String getGeoinfoProperty(String keyName){
|
||||
String value = ERR_CODE;
|
||||
value="99";
|
||||
debug(GLOBALS_PROPERTIES_FILE + " : " + keyName);
|
||||
FileInputStream fis = null;
|
||||
try{
|
||||
Properties props = new Properties();
|
||||
fis = new FileInputStream(EgovWebUtil.filePathBlackList(GLOBALS_PROPERTIES_FILE));
|
||||
props.load(new java.io.BufferedInputStream(fis));
|
||||
value = props.getProperty(keyName).trim();
|
||||
}catch(FileNotFoundException fne){
|
||||
debug(fne);
|
||||
}catch(IOException ioe){
|
||||
debug(ioe);
|
||||
}catch(Exception e){
|
||||
debug(e);
|
||||
}finally{
|
||||
try {
|
||||
if (fis != null) fis.close();
|
||||
} catch (Exception ex) {
|
||||
//ex.printStackTrace();
|
||||
//System.out.println("IGNORE: " + ex); // 2011.10.10 보안점검 후속조치
|
||||
Logger.getLogger(EgovProperties.class).debug("IGNORED: " + ex.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 인자로 주어진 문자열을 Key값으로 하는 프로퍼티 값을 반환한다(geoinfoWeb.properties 전용)
|
||||
* @param keyName String
|
||||
* @return String
|
||||
*/
|
||||
public static String getGeoinfoWebProperty(String keyName){
|
||||
String value = ERR_CODE;
|
||||
value="99";
|
||||
debug(GLOBALS_PROPERTIES_FILE + " : " + keyName);
|
||||
FileInputStream fis = null;
|
||||
try{
|
||||
Properties props = new Properties();
|
||||
fis = new FileInputStream(EgovWebUtil.filePathBlackList(GLOBALS_PROPERTIES_FILE));
|
||||
props.load(new java.io.BufferedInputStream(fis));
|
||||
value = props.getProperty(keyName).trim();
|
||||
}catch(FileNotFoundException fne){
|
||||
debug(fne);
|
||||
}catch(IOException ioe){
|
||||
debug(ioe);
|
||||
}catch(Exception e){
|
||||
debug(e);
|
||||
}finally{
|
||||
try {
|
||||
if (fis != null) fis.close();
|
||||
} catch (Exception ex) {
|
||||
//ex.printStackTrace();
|
||||
//System.out.println("IGNORE: " + ex); // 2011.10.10 보안점검 후속조치
|
||||
Logger.getLogger(EgovProperties.class).debug("IGNORED: " + ex.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 주어진 파일에서 인자로 주어진 문자열을 Key값으로 하는 프로퍼티 상대 경로값을 절대 경로값으로 반환한다
|
||||
* @param fileName String
|
||||
* @param key String
|
||||
* @return String
|
||||
*/
|
||||
public static String getPathProperty(String fileName, String key){
|
||||
FileInputStream fis = null;
|
||||
try{
|
||||
java.util.Properties props = new java.util.Properties();
|
||||
fis = new FileInputStream(EgovWebUtil.filePathBlackList(fileName));
|
||||
props.load(new java.io.BufferedInputStream(fis));
|
||||
fis.close();
|
||||
|
||||
String value = props.getProperty(key);
|
||||
value = RELATIVE_PATH_PREFIX + "egovProps" + System.getProperty("file.separator") + value;
|
||||
return value;
|
||||
}catch(java.io.FileNotFoundException fne){
|
||||
return ERR_CODE_FNFE;
|
||||
}catch(java.io.IOException ioe){
|
||||
return ERR_CODE_IOE;
|
||||
}finally{
|
||||
try {
|
||||
if (fis != null) fis.close();
|
||||
} catch (Exception ex) {
|
||||
//ex.printStackTrace();
|
||||
debug(ex); // 2011.10.10 보안점검 후속조치
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 주어진 파일에서 인자로 주어진 문자열을 Key값으로 하는 프로퍼티 값을 반환한다
|
||||
* @param fileName String
|
||||
* @param key String
|
||||
* @return String
|
||||
*/
|
||||
public static String getProperty(String fileName, String key){
|
||||
FileInputStream fis = null;
|
||||
try{
|
||||
java.util.Properties props = new java.util.Properties();
|
||||
fis = new FileInputStream(EgovWebUtil.filePathBlackList(fileName));
|
||||
props.load(new java.io.BufferedInputStream(fis));
|
||||
fis.close();
|
||||
|
||||
String value = props.getProperty(key);
|
||||
return value;
|
||||
}catch(java.io.FileNotFoundException fne){
|
||||
return ERR_CODE_FNFE;
|
||||
}catch(java.io.IOException ioe){
|
||||
return ERR_CODE_IOE;
|
||||
}finally{
|
||||
try {
|
||||
if (fis != null) fis.close();
|
||||
} catch (Exception ex) {
|
||||
//ex.printStackTrace();
|
||||
//System.out.println("IGNORE: " + ex); // 2011.10.10 보안점검 후속조치
|
||||
Logger.getLogger(EgovProperties.class).debug("IGNORED: " + ex.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 주어진 프로파일의 내용을 파싱하여 (key-value) 형태의 구조체 배열을 반환한다.
|
||||
* @param property String
|
||||
* @return ArrayList
|
||||
*/
|
||||
public static ArrayList loadPropertyFile(String property){
|
||||
|
||||
// key - value 형태로 된 배열 결과
|
||||
ArrayList keyList = new ArrayList();
|
||||
|
||||
String src = property.replace('\\', FILE_SEPARATOR).replace('/', FILE_SEPARATOR);
|
||||
FileInputStream fis = null;
|
||||
try
|
||||
{
|
||||
|
||||
File srcFile = new File(EgovWebUtil.filePathBlackList(src));
|
||||
if (srcFile.exists()) {
|
||||
|
||||
java.util.Properties props = new java.util.Properties();
|
||||
fis = new FileInputStream(src);
|
||||
props.load(new java.io.BufferedInputStream(fis));
|
||||
fis.close();
|
||||
|
||||
int i = 0;
|
||||
Enumeration plist = props.propertyNames();
|
||||
if (plist != null) {
|
||||
while (plist.hasMoreElements()) {
|
||||
Map map = new HashMap();
|
||||
String key = (String)plist.nextElement();
|
||||
map.put(key, props.getProperty(key));
|
||||
keyList.add(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ex){
|
||||
//ex.printStackTrace();
|
||||
debug(ex); // 2011.10.10 보안점검 후속조치
|
||||
} finally {
|
||||
try {
|
||||
if (fis != null) fis.close();
|
||||
} catch (Exception ex) {
|
||||
//ex.printStackTrace();
|
||||
//System.out.println("IGNORE: " + ex); // 2011.10.10 보안점검 후속조치
|
||||
Logger.getLogger(EgovProperties.class).debug("IGNORED: " + ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
return keyList;
|
||||
}
|
||||
/**
|
||||
* 시스템 로그를 출력한다.
|
||||
* @param obj Object
|
||||
*/
|
||||
private static void debug(Object obj) {
|
||||
if (obj instanceof java.lang.Exception) {
|
||||
//((Exception)obj).printStackTrace();
|
||||
//System.out.println("DEBUG: " + obj); // 2011.10.10 보안점검 후속조치
|
||||
Logger.getLogger(EgovProperties.class).debug("IGNORED: " + ((Exception)obj).getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface EgovUserDetailsService {
|
||||
|
||||
/**
|
||||
* 인증된 사용자객체를 VO형식으로 가져온다.
|
||||
* @return Object - 사용자 ValueObject
|
||||
*/
|
||||
public Object getAuthenticatedUser();
|
||||
|
||||
/**
|
||||
* 인증된 사용자의 권한 정보를 가져온다.
|
||||
* 예) [ROLE_ADMIN, ROLE_USER, ROLE_A, ROLE_B, ROLE_RESTRICTED, IS_AUTHENTICATED_FULLY, IS_AUTHENTICATED_REMEMBERED, IS_AUTHENTICATED_ANONYMOUSLY]
|
||||
* @return List - 사용자 권한정보 목록
|
||||
*/
|
||||
public List<String> getAuthorities();
|
||||
|
||||
/**
|
||||
* 인증된 사용자 여부를 체크한다.
|
||||
* @return Boolean - 인증된 사용자 여부(TRUE / FALSE)
|
||||
*/
|
||||
public Boolean isAuthenticated();
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,240 @@
|
|||
package egovframework.com.cmm.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
/**
|
||||
* @Class Name : FileVO.java
|
||||
* @Description : 파일정보 처리를 위한 VO 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 25. 이삼섭
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 25.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class FileVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 첨부파일 아이디
|
||||
*/
|
||||
public String atchFileId = "";
|
||||
/**
|
||||
* 생성일자
|
||||
*/
|
||||
public String creatDt = "";
|
||||
/**
|
||||
* 파일내용
|
||||
*/
|
||||
public String fileCn = "";
|
||||
/**
|
||||
* 파일확장자
|
||||
*/
|
||||
public String fileExtsn = "";
|
||||
/**
|
||||
* 파일크기
|
||||
*/
|
||||
public String fileMg = "";
|
||||
/**
|
||||
* 파일연번
|
||||
*/
|
||||
public String fileSn = "";
|
||||
/**
|
||||
* 파일저장경로
|
||||
*/
|
||||
public String fileStreCours = "";
|
||||
/**
|
||||
* 원파일명
|
||||
*/
|
||||
public String orignlFileNm = "";
|
||||
/**
|
||||
* 저장파일명
|
||||
*/
|
||||
public String streFileNm = "";
|
||||
|
||||
/**
|
||||
* atchFileId attribute를 리턴한다.
|
||||
*
|
||||
* @return the atchFileId
|
||||
*/
|
||||
public String getAtchFileId() {
|
||||
return atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* atchFileId attribute 값을 설정한다.
|
||||
*
|
||||
* @param atchFileId
|
||||
* the atchFileId to set
|
||||
*/
|
||||
public void setAtchFileId(String atchFileId) {
|
||||
this.atchFileId = atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* creatDt attribute를 리턴한다.
|
||||
*
|
||||
* @return the creatDt
|
||||
*/
|
||||
public String getCreatDt() {
|
||||
return creatDt;
|
||||
}
|
||||
|
||||
/**
|
||||
* creatDt attribute 값을 설정한다.
|
||||
*
|
||||
* @param creatDt
|
||||
* the creatDt to set
|
||||
*/
|
||||
public void setCreatDt(String creatDt) {
|
||||
this.creatDt = creatDt;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileCn attribute를 리턴한다.
|
||||
*
|
||||
* @return the fileCn
|
||||
*/
|
||||
public String getFileCn() {
|
||||
return fileCn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileCn attribute 값을 설정한다.
|
||||
*
|
||||
* @param fileCn
|
||||
* the fileCn to set
|
||||
*/
|
||||
public void setFileCn(String fileCn) {
|
||||
this.fileCn = fileCn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileExtsn attribute를 리턴한다.
|
||||
*
|
||||
* @return the fileExtsn
|
||||
*/
|
||||
public String getFileExtsn() {
|
||||
return fileExtsn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileExtsn attribute 값을 설정한다.
|
||||
*
|
||||
* @param fileExtsn
|
||||
* the fileExtsn to set
|
||||
*/
|
||||
public void setFileExtsn(String fileExtsn) {
|
||||
this.fileExtsn = fileExtsn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileMg attribute를 리턴한다.
|
||||
*
|
||||
* @return the fileMg
|
||||
*/
|
||||
public String getFileMg() {
|
||||
return fileMg;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileMg attribute 값을 설정한다.
|
||||
*
|
||||
* @param fileMg
|
||||
* the fileMg to set
|
||||
*/
|
||||
public void setFileMg(String fileMg) {
|
||||
this.fileMg = fileMg;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileSn attribute를 리턴한다.
|
||||
*
|
||||
* @return the fileSn
|
||||
*/
|
||||
public String getFileSn() {
|
||||
return fileSn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileSn attribute 값을 설정한다.
|
||||
*
|
||||
* @param fileSn
|
||||
* the fileSn to set
|
||||
*/
|
||||
public void setFileSn(String fileSn) {
|
||||
this.fileSn = fileSn;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileStreCours attribute를 리턴한다.
|
||||
*
|
||||
* @return the fileStreCours
|
||||
*/
|
||||
public String getFileStreCours() {
|
||||
return fileStreCours;
|
||||
}
|
||||
|
||||
/**
|
||||
* fileStreCours attribute 값을 설정한다.
|
||||
*
|
||||
* @param fileStreCours
|
||||
* the fileStreCours to set
|
||||
*/
|
||||
public void setFileStreCours(String fileStreCours) {
|
||||
this.fileStreCours = fileStreCours;
|
||||
}
|
||||
|
||||
/**
|
||||
* orignlFileNm attribute를 리턴한다.
|
||||
*
|
||||
* @return the orignlFileNm
|
||||
*/
|
||||
public String getOrignlFileNm() {
|
||||
return orignlFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* orignlFileNm attribute 값을 설정한다.
|
||||
*
|
||||
* @param orignlFileNm
|
||||
* the orignlFileNm to set
|
||||
*/
|
||||
public void setOrignlFileNm(String orignlFileNm) {
|
||||
this.orignlFileNm = orignlFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* streFileNm attribute를 리턴한다.
|
||||
*
|
||||
* @return the streFileNm
|
||||
*/
|
||||
public String getStreFileNm() {
|
||||
return streFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* streFileNm attribute 값을 설정한다.
|
||||
*
|
||||
* @param streFileNm
|
||||
* the streFileNm to set
|
||||
*/
|
||||
public void setStreFileNm(String streFileNm) {
|
||||
this.streFileNm = streFileNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* toString 메소드를 대치한다.
|
||||
*/
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package egovframework.com.cmm.service;
|
||||
|
||||
/**
|
||||
* Class Name : Globals.java
|
||||
* Description : 시스템 구동 시 프로퍼티를 통해 사용될 전역변수를 정의한다.
|
||||
* Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.01.19 박지욱 최초 생성
|
||||
*
|
||||
* @author 공통 서비스 개발팀 박지욱
|
||||
* @since 2009. 01. 19
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
|
||||
public class Globals {
|
||||
//OS 유형
|
||||
public static final String OS_TYPE = EgovProperties.getProperty("Globals.OsType");
|
||||
//DB 유형
|
||||
public static final String DB_TYPE = EgovProperties.getProperty("Globals.DbType");
|
||||
//메인 페이지
|
||||
public static final String MAIN_PAGE = EgovProperties.getProperty("Globals.MainPage");
|
||||
//ShellFile 경로
|
||||
public static final String SHELL_FILE_PATH = EgovProperties.getPathProperty("Globals.ShellFilePath");
|
||||
//퍼로퍼티 파일 위치
|
||||
public static final String CONF_PATH = EgovProperties.getPathProperty("Globals.ConfPath");
|
||||
//Server정보 프로퍼티 위치
|
||||
public static final String SERVER_CONF_PATH = EgovProperties.getPathProperty("Globals.ServerConfPath");
|
||||
//Client정보 프로퍼티 위치
|
||||
public static final String CLIENT_CONF_PATH = EgovProperties.getPathProperty("Globals.ClientConfPath");
|
||||
//파일포맷 정보 프로퍼티 위치
|
||||
public static final String FILE_FORMAT_PATH = EgovProperties.getPathProperty("Globals.FileFormatPath");
|
||||
|
||||
//파일 업로드 원 파일명
|
||||
public static final String ORIGIN_FILE_NM = "originalFileName";
|
||||
//파일 확장자
|
||||
public static final String FILE_EXT = "fileExtension";
|
||||
//파일크기
|
||||
public static final String FILE_SIZE = "fileSize";
|
||||
//업로드된 파일명
|
||||
public static final String UPLOAD_FILE_NM = "uploadFileName";
|
||||
//파일경로
|
||||
public static final String FILE_PATH = "filePath";
|
||||
|
||||
//메일발송요청 XML파일경로
|
||||
public static final String MAIL_REQUEST_PATH = EgovProperties.getPathProperty("Globals.MailRequestPath");
|
||||
//메일발송응답 XML파일경로
|
||||
public static final String MAIL_RESPONSE_PATH = EgovProperties.getPathProperty("Globals.MailRResponsePath");
|
||||
|
||||
// G4C 연결용 IP (localhost)
|
||||
public static final String LOCAL_IP = EgovProperties.getProperty("Globals.LocalIp");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.ibatis.sqlmap.client.SqlMapClient;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
||||
|
||||
/**
|
||||
* EgovComAbstractDAO.java 클래스
|
||||
*
|
||||
* @author 서준식
|
||||
* @since 2011. 9. 23.
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2011. 9. 23. 서준식 최초 생성
|
||||
* </pre>
|
||||
*/
|
||||
public abstract class EgovComAbstractDAO extends EgovAbstractDAO{
|
||||
|
||||
|
||||
@Resource(name="egov.sqlMapClient")
|
||||
public void setSuperSqlMapClient(SqlMapClient sqlMapClient) {
|
||||
super.setSuperSqlMapClient(sqlMapClient);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.com.cmm.service.EgovFileMngService;
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
import egovframework.rte.fdl.cmmn.AbstractServiceImpl;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovFileMngServiceImpl.java
|
||||
* @Description : 파일정보의 관리를 위한 구현 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 25. 이삼섭 최초생성
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 25.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@Service("EgovFileMngService")
|
||||
public class EgovFileMngServiceImpl extends AbstractServiceImpl implements EgovFileMngService {
|
||||
|
||||
@Resource(name = "FileManageDAO")
|
||||
private FileManageDAO fileMngDAO;
|
||||
|
||||
public static final Logger LOGGER = Logger.getLogger(EgovFileMngServiceImpl.class.getName());
|
||||
|
||||
/**
|
||||
* 여러 개의 파일을 삭제한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#deleteFileInfs(java.util.List)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void deleteFileInfs(List fvoList) throws Exception {
|
||||
fileMngDAO.deleteFileInfs(fvoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 하나의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#insertFileInf(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public String insertFileInf(FileVO fvo) throws Exception {
|
||||
String atchFileId = fvo.getAtchFileId();
|
||||
|
||||
fileMngDAO.insertFileInf(fvo);
|
||||
|
||||
return atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#insertFileInfs(java.util.List)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public String insertFileInfs(List fvoList) throws Exception {
|
||||
String atchFileId = "";
|
||||
|
||||
if (fvoList.size() != 0) {
|
||||
atchFileId = fileMngDAO.insertFileInfs(fvoList);
|
||||
}
|
||||
if(atchFileId == ""){
|
||||
atchFileId = null;
|
||||
}
|
||||
return atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#selectFileInfs(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public List<FileVO> selectFileInfs(FileVO fvo) throws Exception {
|
||||
return fileMngDAO.selectFileInfs(fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 수정한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#updateFileInfs(java.util.List)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void updateFileInfs(List fvoList) throws Exception {
|
||||
//Delete & Insert
|
||||
fileMngDAO.updateFileInfs(fvoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 하나의 파일을 삭제한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#deleteFileInf(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public void deleteFileInf(FileVO fvo) throws Exception {
|
||||
fileMngDAO.deleteFileInf(fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일에 대한 상세정보를 조회한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#selectFileInf(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public FileVO selectFileInf(FileVO fvo) throws Exception {
|
||||
return fileMngDAO.selectFileInf(fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일 구분자에 대한 최대값을 구한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#getMaxFileSN(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public int getMaxFileSN(FileVO fvo) throws Exception {
|
||||
return fileMngDAO.getMaxFileSN(fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 전체 파일을 삭제한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#deleteAllFileInf(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public void deleteAllFileInf(FileVO fvo) throws Exception {
|
||||
fileMngDAO.deleteAllFileInf(fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일명 검색에 대한 목록을 조회한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#selectFileListByFileNm(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public Map<String, Object> selectFileListByFileNm(FileVO fvo) throws Exception {
|
||||
List<FileVO> result = fileMngDAO.selectFileListByFileNm(fvo);
|
||||
int cnt = fileMngDAO.selectFileListCntByFileNm(fvo);
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
map.put("resultList", result);
|
||||
map.put("resultCnt", Integer.toString(cnt));
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 이미지 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @see egovframework.com.cmm.service.EgovFileMngService#selectImageFileList(egovframework.com.cmm.service.FileVO)
|
||||
*/
|
||||
public List<FileVO> selectImageFileList(FileVO vo) throws Exception {
|
||||
return fileMngDAO.selectImageFileList(vo);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.service.EgovUserDetailsService;
|
||||
import egovframework.rte.fdl.cmmn.AbstractServiceImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 공통서비스 개발팀 서준식
|
||||
* @since 2011. 8. 12.
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* 개정이력(Modification Information)
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011. 8. 12. 서준식 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovTestUserDetailsServiceImpl extends AbstractServiceImpl implements
|
||||
EgovUserDetailsService {
|
||||
|
||||
public Object getAuthenticatedUser() {
|
||||
|
||||
LoginVO loginVO = new LoginVO();
|
||||
loginVO.setId("TEST1");
|
||||
loginVO.setPassword("a4ayc/80/OGda4BO/1o/V0etpOqiLx1JwB5S3beHW0s=");
|
||||
loginVO.setUserSe("USR");
|
||||
loginVO.setEmail("a3@aa.aa");
|
||||
loginVO.setIhidNum("1111111111118");
|
||||
loginVO.setName("더미사용자");
|
||||
loginVO.setOrgnztId("ORGNZT_0000000000000");
|
||||
loginVO.setUniqId("USRCNFRM_00000000000");
|
||||
return loginVO;
|
||||
|
||||
// return
|
||||
// RequestContextHolder.getRequestAttributes().getAttribute("loginVO",
|
||||
// RequestAttributes.SCOPE_SESSION);
|
||||
|
||||
}
|
||||
|
||||
public List<String> getAuthorities() {
|
||||
|
||||
// 권한 설정을 리턴한다.
|
||||
|
||||
List<String> listAuth = new ArrayList<String>();
|
||||
listAuth.add("IS_AUTHENTICATED_ANONYMOUSLY");
|
||||
listAuth.add("IS_AUTHENTICATED_FULLY");
|
||||
listAuth.add("IS_AUTHENTICATED_REMEMBERED");
|
||||
listAuth.add("ROLE_ADMIN");
|
||||
listAuth.add("ROLE_ANONYMOUS");
|
||||
listAuth.add("ROLE_RESTRICTED");
|
||||
listAuth.add("ROLE_USER");
|
||||
|
||||
return listAuth;
|
||||
}
|
||||
|
||||
public Boolean isAuthenticated() {
|
||||
// 인증된 유저인지 확인한다.
|
||||
|
||||
/*if (RequestContextHolder.getRequestAttributes() == null) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
if (RequestContextHolder.getRequestAttributes().getAttribute(
|
||||
"loginVO", RequestAttributes.SCOPE_SESSION) == null) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.web.context.request.RequestAttributes;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
|
||||
import egovframework.com.cmm.service.EgovUserDetailsService;
|
||||
import egovframework.rte.fdl.cmmn.AbstractServiceImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 공통서비스 개발팀 서준식
|
||||
* @since 2011. 6. 25.
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* 개정이력(Modification Information)
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011. 8. 12. 서준식 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovUserDetailsSessionServiceImpl extends AbstractServiceImpl implements
|
||||
EgovUserDetailsService {
|
||||
|
||||
public Object getAuthenticatedUser() {
|
||||
|
||||
|
||||
|
||||
return RequestContextHolder.getRequestAttributes().getAttribute("loginVO", RequestAttributes.SCOPE_SESSION);
|
||||
|
||||
}
|
||||
|
||||
public List<String> getAuthorities() {
|
||||
|
||||
// 권한 설정을 리턴한다.
|
||||
List<String> listAuth = new ArrayList<String>();
|
||||
|
||||
return listAuth;
|
||||
}
|
||||
|
||||
public Boolean isAuthenticated() {
|
||||
// 인증된 유저인지 확인한다.
|
||||
|
||||
if (RequestContextHolder.getRequestAttributes() == null) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
if (RequestContextHolder.getRequestAttributes().getAttribute(
|
||||
"loginVO", RequestAttributes.SCOPE_SESSION) == null) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
package egovframework.com.cmm.service.impl;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovFileMngDAO.java
|
||||
* @Description : 파일정보 관리를 위한 데이터 처리 클래스
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 3. 25. 이삼섭 최초생성
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 3. 25.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@Repository("FileManageDAO")
|
||||
public class FileManageDAO extends EgovComAbstractDAO {
|
||||
|
||||
//private static final Logger LOG = Logger.getLogger(this.getClass());
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @param fileList
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public String insertFileInfs(List fileList) throws Exception {
|
||||
FileVO vo = (FileVO)fileList.get(0);
|
||||
String atchFileId = vo.getAtchFileId();
|
||||
|
||||
insert("FileManageDAO.insertFileMaster", vo);
|
||||
|
||||
Iterator iter = fileList.iterator();
|
||||
while (iter.hasNext()) {
|
||||
vo = (FileVO)iter.next();
|
||||
|
||||
insert("FileManageDAO.insertFileDetail", vo);
|
||||
}
|
||||
|
||||
return atchFileId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 하나의 파일에 대한 정보(속성 및 상세)를 등록한다.
|
||||
*
|
||||
* @param vo
|
||||
* @throws Exception
|
||||
*/
|
||||
public void insertFileInf(FileVO vo) throws Exception {
|
||||
insert("FileManageDAO.insertFileMaster", vo);
|
||||
insert("FileManageDAO.insertFileDetail", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 여러 개의 파일에 대한 정보(속성 및 상세)를 수정한다.
|
||||
*
|
||||
* @param fileList
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void updateFileInfs(List fileList) throws Exception {
|
||||
FileVO vo;
|
||||
Iterator iter = fileList.iterator();
|
||||
while (iter.hasNext()) {
|
||||
vo = (FileVO)iter.next();
|
||||
|
||||
insert("FileManageDAO.insertFileDetail", vo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 여러 개의 파일을 삭제한다.
|
||||
*
|
||||
* @param fileList
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void deleteFileInfs(List fileList) throws Exception {
|
||||
Iterator iter = fileList.iterator();
|
||||
FileVO vo;
|
||||
while (iter.hasNext()) {
|
||||
vo = (FileVO)iter.next();
|
||||
|
||||
delete("FileManageDAO.deleteFileDetail", vo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 하나의 파일을 삭제한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteFileInf(FileVO fvo) throws Exception {
|
||||
delete("FileManageDAO.deleteFileDetail", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<FileVO> selectFileInfs(FileVO vo) throws Exception {
|
||||
return list("FileManageDAO.selectFileList", vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일 구분자에 대한 최대값을 구한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public int getMaxFileSN(FileVO fvo) throws Exception {
|
||||
return (Integer)getSqlMapClientTemplate().queryForObject("FileManageDAO.getMaxFileSN", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일에 대한 상세정보를 조회한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public FileVO selectFileInf(FileVO fvo) throws Exception {
|
||||
return (FileVO)selectByPk("FileManageDAO.selectFileInf", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 전체 파일을 삭제한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAllFileInf(FileVO fvo) throws Exception {
|
||||
update("FileManageDAO.deleteCOMTNFILE", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일명 검색에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<FileVO> selectFileListByFileNm(FileVO fvo) throws Exception {
|
||||
return list("FileManageDAO.selectFileListByFileNm", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 파일명 검색에 대한 목록 전체 건수를 조회한다.
|
||||
*
|
||||
* @param fvo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public int selectFileListCntByFileNm(FileVO fvo) throws Exception {
|
||||
return (Integer)getSqlMapClientTemplate().queryForObject("FileManageDAO.selectFileListCntByFileNm", fvo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 이미지 파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<FileVO> selectImageFileList(FileVO vo) throws Exception {
|
||||
return list("FileManageDAO.selectImageFileList", vo);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package egovframework.com.cmm.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.com.cmm.service.EgovUserDetailsService;
|
||||
|
||||
/**
|
||||
* EgovUserDetails Helper 클래스
|
||||
*
|
||||
* @author sjyoon
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------------- ----------------------
|
||||
* 2009.03.10 sjyoon 최초 생성
|
||||
* 2011.07.01 서준식 interface 생성후 상세 로직의 분리
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
public class EgovUserDetailsHelper {
|
||||
|
||||
static EgovUserDetailsService egovUserDetailsService;
|
||||
|
||||
|
||||
|
||||
|
||||
public EgovUserDetailsService getEgovUserDetailsService() {
|
||||
return egovUserDetailsService;
|
||||
}
|
||||
|
||||
public void setEgovUserDetailsService(
|
||||
EgovUserDetailsService egovUserDetailsService) {
|
||||
this.egovUserDetailsService = egovUserDetailsService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 인증된 사용자객체를 VO형식으로 가져온다.
|
||||
* @return Object - 사용자 ValueObject
|
||||
*/
|
||||
public static Object getAuthenticatedUser() {
|
||||
return egovUserDetailsService.getAuthenticatedUser();
|
||||
}
|
||||
|
||||
/**
|
||||
* 인증된 사용자의 권한 정보를 가져온다.
|
||||
*
|
||||
* @return List - 사용자 권한정보 목록
|
||||
*/
|
||||
public static List<String> getAuthorities() {
|
||||
|
||||
|
||||
return egovUserDetailsService.getAuthorities();
|
||||
}
|
||||
|
||||
/**
|
||||
* 인증된 사용자 여부를 체크한다.
|
||||
* @return Boolean - 인증된 사용자 여부(TRUE / FALSE)
|
||||
*/
|
||||
public static Boolean isAuthenticated() {
|
||||
|
||||
return egovUserDetailsService.isAuthenticated();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package egovframework.com.cmm.web;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.beans.propertyeditors.CustomDateEditor;
|
||||
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.support.WebBindingInitializer;
|
||||
import org.springframework.web.context.request.WebRequest;
|
||||
|
||||
public class EgovBindingInitializer implements WebBindingInitializer {
|
||||
|
||||
|
||||
public void initBinder(WebDataBinder binder, WebRequest request) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
dateFormat.setLenient(false);
|
||||
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false));
|
||||
binder.registerCustomEditor(String.class, new StringTrimmerEditor(false));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,177 @@
|
|||
package egovframework.com.cmm.web;
|
||||
|
||||
/**
|
||||
* 컴포넌트 설치 후 설치된 컴포넌트들을 IncludedInfo annotation을 통해 찾아낸 후
|
||||
* 화면에 표시할 정보를 처리하는 Controller 클래스
|
||||
* <Notice>
|
||||
* 개발시 메뉴 구조가 잡히기 전에 배포파일들에 포함된 공통 컴포넌트들의 목록성 화면에
|
||||
* URL을 제공하여 개발자가 편하게 활용하도록 하기 위해 작성된 것으로,
|
||||
* 실제 운영되는 시스템에서는 적용해서는 안 됨
|
||||
* 실 운영 시에는 삭제해서 배포해도 좋음
|
||||
* <Disclaimer>
|
||||
* 운영시에 본 컨트롤을 사용하여 메뉴를 구성하는 경우 성능 문제를 일으키거나
|
||||
* 사용자별 메뉴 구성에 오류를 발생할 수 있음
|
||||
* @author 공통컴포넌트 정진오
|
||||
* @since 2011.08.26
|
||||
* @version 2.0.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2011.08.26 정진오 최초 생성
|
||||
* 2011.09.16 서준식 컨텐츠 페이지 생성
|
||||
* 2011.09.26 이기하 header, footer 페이지 생성
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import egovframework.com.cmm.IncludedCompInfoVO;
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.annotation.IncludedInfo;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
|
||||
|
||||
@Controller
|
||||
public class EgovComIndexController implements ApplicationContextAware ,InitializingBean {
|
||||
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
protected static final Log LOG = LogFactory.getLog(EgovComIndexController.class);
|
||||
|
||||
private Map map;
|
||||
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
public void setApplicationContext(ApplicationContext applicationContext)
|
||||
throws BeansException {
|
||||
// TODO Auto-generated method stub
|
||||
this.applicationContext = applicationContext;
|
||||
LOG.info("EgovComIndexController setApplicationContext method has called!");
|
||||
}
|
||||
|
||||
@RequestMapping("/index.do")
|
||||
public String index(ModelMap model){
|
||||
return "egovframework/com/cmm/EgovUnitMain";
|
||||
}
|
||||
|
||||
@RequestMapping("/EgovTop.do")
|
||||
public String top(){
|
||||
return "egovframework/com/cmm/EgovUnitTop";
|
||||
}
|
||||
|
||||
@RequestMapping("/EgovBottom.do")
|
||||
public String bottom(){
|
||||
return "egovframework/com/cmm/EgovUnitBottom";
|
||||
}
|
||||
|
||||
@RequestMapping("/EgovContent.do")
|
||||
public String setContent(ModelMap model){
|
||||
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
model.addAttribute("loginVO", loginVO);
|
||||
|
||||
return "egovframework/com/cmm/EgovUnitContent";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/EgovLeft.do")
|
||||
public String setLeftMenu(ModelMap model){
|
||||
|
||||
/*최초 한 번만 실행하여 map에 저장해 놓는다.*/
|
||||
if(map == null){
|
||||
map = new TreeMap();
|
||||
RequestMapping rmAnnotation;
|
||||
IncludedInfo annotation;
|
||||
IncludedCompInfoVO zooVO;
|
||||
|
||||
/*
|
||||
* EgovLoginController가 AOP Proxy되는 바람에 클래스를 reflection으로 가져올 수 없음
|
||||
* 방법을 찾을때까지 임시로 아래 코드 유지
|
||||
*/
|
||||
try{
|
||||
Class loginController = Class.forName("egovframework.com.uat.uia.web.EgovLoginController");
|
||||
Method[] methods = loginController.getMethods();
|
||||
for(int i = 0; i< methods.length ;i++){
|
||||
annotation = methods[i].getAnnotation(IncludedInfo.class);
|
||||
|
||||
if(annotation != null){
|
||||
LOG.debug("Found @IncludedInfo Method : " + methods[i] );
|
||||
zooVO = new IncludedCompInfoVO();
|
||||
zooVO.setName(annotation.name());
|
||||
zooVO.setOrder(annotation.order());
|
||||
zooVO.setGid(annotation.gid());
|
||||
|
||||
rmAnnotation = methods[i].getAnnotation(RequestMapping.class);
|
||||
if("".equals(annotation.listUrl()) && rmAnnotation != null){
|
||||
zooVO.setListUrl(rmAnnotation.value()[0]);
|
||||
}
|
||||
else{
|
||||
zooVO.setListUrl(annotation.listUrl());
|
||||
}
|
||||
map.put(zooVO.getOrder(),zooVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e){
|
||||
LOG.error("No egovframework.com.uat.uia.web.EgovLoginController!!");
|
||||
}
|
||||
/* 여기까지 AOP Proxy로 인한 임시 코드 */
|
||||
|
||||
/*@Controller Annotation 처리된 클래스를 모두 찾는다.*/
|
||||
Map<String, Object> myZoos = applicationContext.getBeansWithAnnotation(Controller.class);
|
||||
LOG.debug("How many Controllers : " + myZoos.size());
|
||||
for (final Object myZoo : myZoos.values()) {
|
||||
Class<? extends Object> zooClass = myZoo.getClass();
|
||||
|
||||
Method[] methods = zooClass.getMethods();
|
||||
LOG.debug("Controller Detected " + zooClass);
|
||||
for(int i = 0; i< methods.length ;i++){
|
||||
annotation = methods[i].getAnnotation(IncludedInfo.class);
|
||||
|
||||
if(annotation != null){
|
||||
//LOG.debug("Found @IncludedInfo Method : " + methods[i] );
|
||||
zooVO = new IncludedCompInfoVO();
|
||||
zooVO.setName(annotation.name());
|
||||
zooVO.setOrder(annotation.order());
|
||||
zooVO.setGid(annotation.gid());
|
||||
/*
|
||||
* 목록형 조회를 위한 url 매핑은 @IncludedInfo나 @RequestMapping에서 가져온다
|
||||
*/
|
||||
rmAnnotation = methods[i].getAnnotation(RequestMapping.class);
|
||||
if("".equals(annotation.listUrl())){
|
||||
zooVO.setListUrl(rmAnnotation.value()[0]);
|
||||
}
|
||||
else{
|
||||
zooVO.setListUrl(annotation.listUrl());
|
||||
}
|
||||
|
||||
map.put(zooVO.getOrder(),zooVO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
model.addAttribute("resultList", map.values());
|
||||
LOG.debug("EgovComIndexController index is called " );
|
||||
return "egovframework/com/cmm/EgovUnitLeft";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package egovframework.com.cmm.web;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||
|
||||
/**
|
||||
* @Class Name : EgovComUtlController.java
|
||||
* @Description : 공통유틸리티성 작업을 위한 Controller
|
||||
* @Modification Information
|
||||
* @
|
||||
* @ 수정일 수정자 수정내용
|
||||
* @ ------- -------- ---------------------------
|
||||
* @ 2009.03.02 조재영 최초 생성
|
||||
* @ 2011.10.07 이기하 .action -> .do로 변경하면서 동일 매핑이 되어 삭제처리
|
||||
*
|
||||
* @author 공통서비스 개발팀 조재영
|
||||
* @since 2009.03.02
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
public class EgovComUtlController {
|
||||
|
||||
//@Resource(name = "egovUserManageService")
|
||||
//private EgovUserManageService egovUserManageService;
|
||||
|
||||
/** EgovPropertyService */
|
||||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
/**
|
||||
* JSP 호출작업만 처리하는 공통 함수
|
||||
*/
|
||||
@RequestMapping(value="/EgovPageLink.do")
|
||||
public String moveToPage(@RequestParam("link") String linkPage){
|
||||
String link = linkPage;
|
||||
// service 사용하여 리턴할 결과값 처리하는 부분은 생략하고 단순 페이지 링크만 처리함
|
||||
if (linkPage==null || linkPage.equals("")){
|
||||
link="egovframework/com/cmm/egovError";
|
||||
}
|
||||
return link;
|
||||
}
|
||||
|
||||
/**
|
||||
* validato rule dynamic Javascript
|
||||
*/
|
||||
@RequestMapping("/validator.do")
|
||||
public String validate(){
|
||||
return "egovframework/com/cmm/validator";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
package egovframework.com.cmm.web;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import egovframework.com.cmm.service.EgovFileMngService;
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
|
||||
|
||||
/**
|
||||
* 파일 다운로드를 위한 컨트롤러 클래스
|
||||
* @author 공통서비스개발팀 이삼섭
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.3.25 이삼섭 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class EgovFileDownloadController {
|
||||
|
||||
|
||||
|
||||
|
||||
@Resource(name = "EgovFileMngService")
|
||||
private EgovFileMngService fileService;
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(EgovFileDownloadController.class.getName());
|
||||
|
||||
/**
|
||||
* 브라우저 구분 얻기.
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
private String getBrowser(HttpServletRequest request) {
|
||||
String header = request.getHeader("User-Agent");
|
||||
if (header.indexOf("MSIE") > -1) {
|
||||
return "MSIE";
|
||||
} else if (header.indexOf("Chrome") > -1) {
|
||||
return "Chrome";
|
||||
} else if (header.indexOf("Opera") > -1) {
|
||||
return "Opera";
|
||||
}
|
||||
return "Firefox";
|
||||
}
|
||||
|
||||
/**
|
||||
* Disposition 지정하기.
|
||||
*
|
||||
* @param filename
|
||||
* @param request
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
private void setDisposition(String filename, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
String browser = getBrowser(request);
|
||||
|
||||
String dispositionPrefix = "attachment; filename=";
|
||||
String encodedFilename = null;
|
||||
|
||||
if (browser.equals("MSIE")) {
|
||||
encodedFilename = URLEncoder.encode(filename, "UTF-8").replaceAll("\\+", "%20");
|
||||
} else if (browser.equals("Firefox")) {
|
||||
encodedFilename = "\"" + new String(filename.getBytes("UTF-8"), "8859_1") + "\"";
|
||||
} else if (browser.equals("Opera")) {
|
||||
encodedFilename = "\"" + new String(filename.getBytes("UTF-8"), "8859_1") + "\"";
|
||||
} else if (browser.equals("Chrome")) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (int i = 0; i < filename.length(); i++) {
|
||||
char c = filename.charAt(i);
|
||||
if (c > '~') {
|
||||
sb.append(URLEncoder.encode("" + c, "UTF-8"));
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
encodedFilename = sb.toString();
|
||||
} else {
|
||||
//throw new RuntimeException("Not supported browser");
|
||||
throw new IOException("Not supported browser");
|
||||
}
|
||||
|
||||
response.setHeader("Content-Disposition", dispositionPrefix + encodedFilename);
|
||||
|
||||
if ("Opera".equals(browser)){
|
||||
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부파일로 등록된 파일에 대하여 다운로드를 제공한다.
|
||||
*
|
||||
* @param commandMap
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/cmm/fms/FileDown.do")
|
||||
public void cvplFileDownload(Map<String, Object> commandMap, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
String atchFileId = (String)commandMap.get("atchFileId");
|
||||
String fileSn = (String)commandMap.get("fileSn");
|
||||
|
||||
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
|
||||
|
||||
if (isAuthenticated) {
|
||||
|
||||
FileVO fileVO = new FileVO();
|
||||
fileVO.setAtchFileId(atchFileId);
|
||||
fileVO.setFileSn(fileSn);
|
||||
FileVO fvo = fileService.selectFileInf(fileVO);
|
||||
|
||||
File uFile = new File(fvo.getFileStreCours(), fvo.getStreFileNm());
|
||||
int fSize = (int)uFile.length();
|
||||
|
||||
if (fSize > 0) {
|
||||
String mimetype = "application/x-msdownload";
|
||||
|
||||
//response.setBufferSize(fSize); // OutOfMemeory 발생
|
||||
response.setContentType(mimetype);
|
||||
//response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(fvo.getOrignlFileNm(), "utf-8") + "\"");
|
||||
setDisposition(fvo.getOrignlFileNm(), request, response);
|
||||
response.setContentLength(fSize);
|
||||
|
||||
/*
|
||||
* FileCopyUtils.copy(in, response.getOutputStream());
|
||||
* in.close();
|
||||
* response.getOutputStream().flush();
|
||||
* response.getOutputStream().close();
|
||||
*/
|
||||
BufferedInputStream in = null;
|
||||
BufferedOutputStream out = null;
|
||||
|
||||
try {
|
||||
in = new BufferedInputStream(new FileInputStream(uFile));
|
||||
out = new BufferedOutputStream(response.getOutputStream());
|
||||
|
||||
FileCopyUtils.copy(in, out);
|
||||
out.flush();
|
||||
} catch (Exception ex) {
|
||||
//ex.printStackTrace();
|
||||
// 다음 Exception 무시 처리
|
||||
// Connection reset by peer: socket write error
|
||||
LOG.debug("IGNORED: " + ex.getMessage());
|
||||
} finally {
|
||||
if (in != null) {
|
||||
try {
|
||||
in.close();
|
||||
} catch (Exception ignore) {
|
||||
// no-op
|
||||
LOG.debug("IGNORED: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
if (out != null) {
|
||||
try {
|
||||
out.close();
|
||||
} catch (Exception ignore) {
|
||||
// no-op
|
||||
LOG.debug("IGNORED: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
response.setContentType("application/x-msdownload");
|
||||
|
||||
PrintWriter printwriter = response.getWriter();
|
||||
printwriter.println("<html>");
|
||||
printwriter.println("<br><br><br><h2>Could not get file name:<br>" + fvo.getOrignlFileNm() + "</h2>");
|
||||
printwriter.println("<br><br><br><center><h3><a href='javascript: history.go(-1)'>Back</a></h3></center>");
|
||||
printwriter.println("<br><br><br>© webAccess");
|
||||
printwriter.println("</html>");
|
||||
printwriter.flush();
|
||||
printwriter.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
package egovframework.com.cmm.web;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import egovframework.com.cmm.service.EgovFileMngService;
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
|
||||
/**
|
||||
* 파일 조회, 삭제, 다운로드 처리를 위한 컨트롤러 클래스
|
||||
* @author 공통서비스개발팀 이삼섭
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.3.25 이삼섭 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class EgovFileMngController {
|
||||
|
||||
|
||||
|
||||
|
||||
@Resource(name = "EgovFileMngService")
|
||||
private EgovFileMngService fileService;
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(EgovFileMngController.class.getName());
|
||||
|
||||
/**
|
||||
* 첨부파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param fileVO
|
||||
* @param atchFileId
|
||||
* @param sessionVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/cmm/fms/selectFileInfs.do")
|
||||
public String selectFileInfs(@ModelAttribute("searchVO") FileVO fileVO, Map<String, Object> commandMap, ModelMap model) throws Exception {
|
||||
String atchFileId = (String)commandMap.get("param_atchFileId");
|
||||
|
||||
fileVO.setAtchFileId(atchFileId);
|
||||
List<FileVO> result = fileService.selectFileInfs(fileVO);
|
||||
|
||||
model.addAttribute("fileList", result);
|
||||
model.addAttribute("updateFlag", "N");
|
||||
model.addAttribute("fileListCnt", result.size());
|
||||
model.addAttribute("atchFileId", atchFileId);
|
||||
|
||||
return "egovframework/com/cmm/fms/EgovFileList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부파일 변경을 위한 수정페이지로 이동한다.
|
||||
*
|
||||
* @param fileVO
|
||||
* @param atchFileId
|
||||
* @param sessionVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/cmm/fms/selectFileInfsForUpdate.do")
|
||||
public String selectFileInfsForUpdate(@ModelAttribute("searchVO") FileVO fileVO, Map<String, Object> commandMap,
|
||||
//SessionVO sessionVO,
|
||||
ModelMap model) throws Exception {
|
||||
|
||||
String atchFileId = (String)commandMap.get("param_atchFileId");
|
||||
|
||||
fileVO.setAtchFileId(atchFileId);
|
||||
|
||||
List<FileVO> result = fileService.selectFileInfs(fileVO);
|
||||
|
||||
model.addAttribute("fileList", result);
|
||||
model.addAttribute("updateFlag", "Y");
|
||||
model.addAttribute("fileListCnt", result.size());
|
||||
model.addAttribute("atchFileId", atchFileId);
|
||||
|
||||
return "egovframework/com/cmm/fms/EgovFileList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 첨부파일에 대한 삭제를 처리한다.
|
||||
*
|
||||
* @param fileVO
|
||||
* @param returnUrl
|
||||
* @param sessionVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/cmm/fms/deleteFileInfs.do")
|
||||
public String deleteFileInf(@ModelAttribute("searchVO") FileVO fileVO, @RequestParam("returnUrl") String returnUrl,
|
||||
//SessionVO sessionVO,
|
||||
HttpServletRequest request,
|
||||
ModelMap model) throws Exception {
|
||||
|
||||
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
|
||||
|
||||
if (isAuthenticated) {
|
||||
fileService.deleteFileInf(fileVO);
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
// contextRoot가 있는 경우 제외 시켜야 함
|
||||
//--------------------------------------------
|
||||
////return "forward:/cmm/fms/selectFileInfs.do";
|
||||
//return "forward:" + returnUrl;
|
||||
|
||||
if ("".equals(request.getContextPath()) || "/".equals(request.getContextPath())) {
|
||||
return "forward:" + returnUrl;
|
||||
}
|
||||
|
||||
if (returnUrl.startsWith(request.getContextPath())) {
|
||||
return "forward:" + returnUrl.substring(returnUrl.indexOf("/", 1));
|
||||
} else {
|
||||
return "forward:" + returnUrl;
|
||||
}
|
||||
////------------------------------------------
|
||||
}
|
||||
|
||||
/**
|
||||
* 이미지 첨부파일에 대한 목록을 조회한다.
|
||||
*
|
||||
* @param fileVO
|
||||
* @param atchFileId
|
||||
* @param sessionVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/cmm/fms/selectImageFileInfs.do")
|
||||
public String selectImageFileInfs(@ModelAttribute("searchVO") FileVO fileVO, Map<String, Object> commandMap,
|
||||
//SessionVO sessionVO,
|
||||
ModelMap model) throws Exception {
|
||||
|
||||
String atchFileId = (String)commandMap.get("atchFileId");
|
||||
|
||||
fileVO.setAtchFileId(atchFileId);
|
||||
List<FileVO> result = fileService.selectImageFileList(fileVO);
|
||||
|
||||
model.addAttribute("fileList", result);
|
||||
|
||||
return "egovframework/com/cmm/fms/EgovImgFileList";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
package egovframework.com.cmm.web;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import egovframework.com.cmm.SessionVO;
|
||||
import egovframework.com.cmm.service.EgovFileMngService;
|
||||
import egovframework.com.cmm.service.FileVO;
|
||||
|
||||
|
||||
/**
|
||||
* @Class Name : EgovImageProcessController.java
|
||||
* @Description :
|
||||
* @Modification Information
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- ------- -------------------
|
||||
* 2009. 4. 2. 이삼섭
|
||||
*
|
||||
* @author 공통 서비스 개발팀 이삼섭
|
||||
* @since 2009. 4. 2.
|
||||
* @version
|
||||
* @see
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
@Controller
|
||||
public class EgovImageProcessController extends HttpServlet {
|
||||
|
||||
@Resource(name = "EgovFileMngService")
|
||||
private EgovFileMngService fileService;
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(EgovImageProcessController.class.getName());
|
||||
|
||||
/**
|
||||
* 첨부된 이미지에 대한 미리보기 기능을 제공한다.
|
||||
*
|
||||
* @param atchFileId
|
||||
* @param fileSn
|
||||
* @param sessionVO
|
||||
* @param model
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/cmm/fms/getImage.do")
|
||||
public void getImageInf(SessionVO sessionVO, ModelMap model, Map<String, Object> commandMap, HttpServletResponse response) throws Exception {
|
||||
|
||||
//@RequestParam("atchFileId") String atchFileId,
|
||||
//@RequestParam("fileSn") String fileSn,
|
||||
String atchFileId = (String)commandMap.get("atchFileId");
|
||||
String fileSn = (String)commandMap.get("fileSn");
|
||||
|
||||
FileVO vo = new FileVO();
|
||||
|
||||
vo.setAtchFileId(atchFileId);
|
||||
vo.setFileSn(fileSn);
|
||||
|
||||
FileVO fvo = fileService.selectFileInf(vo);
|
||||
|
||||
//String fileLoaction = fvo.getFileStreCours() + fvo.getStreFileNm();
|
||||
|
||||
// 2011.10.10 보안점검 후속조치
|
||||
File file = null;
|
||||
FileInputStream fis = null;
|
||||
|
||||
BufferedInputStream in = null;
|
||||
ByteArrayOutputStream bStream = null;
|
||||
|
||||
try {
|
||||
file = new File(fvo.getFileStreCours(), fvo.getStreFileNm());
|
||||
fis = new FileInputStream(file);
|
||||
|
||||
in = new BufferedInputStream(fis);
|
||||
bStream = new ByteArrayOutputStream();
|
||||
|
||||
int imgByte;
|
||||
while ((imgByte = in.read()) != -1) {
|
||||
bStream.write(imgByte);
|
||||
}
|
||||
|
||||
String type = "";
|
||||
|
||||
if (fvo.getFileExtsn() != null && !"".equals(fvo.getFileExtsn())) {
|
||||
if ("jpg".equals(fvo.getFileExtsn().toLowerCase())) {
|
||||
type = "image/jpeg";
|
||||
} else {
|
||||
type = "image/" + fvo.getFileExtsn().toLowerCase();
|
||||
}
|
||||
type = "image/" + fvo.getFileExtsn().toLowerCase();
|
||||
|
||||
} else {
|
||||
LOG.debug("Image fileType is null.");
|
||||
}
|
||||
|
||||
response.setHeader("Content-Type", type);
|
||||
response.setContentLength(bStream.size());
|
||||
|
||||
bStream.writeTo(response.getOutputStream());
|
||||
|
||||
response.getOutputStream().flush();
|
||||
response.getOutputStream().close();
|
||||
|
||||
// 2011.10.10 보안점검 후속조치 끝
|
||||
} finally {
|
||||
if (bStream != null) {
|
||||
try {
|
||||
bStream.close();
|
||||
} catch (Exception ignore) {
|
||||
//System.out.println("IGNORE: " + ignore);
|
||||
LOG.debug("IGNORE: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
if (in != null) {
|
||||
try {
|
||||
in.close();
|
||||
} catch (Exception ignore) {
|
||||
//System.out.println("IGNORE: " + ignore);
|
||||
LOG.debug("IGNORE: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
if (fis != null) {
|
||||
try {
|
||||
fis.close();
|
||||
} catch (Exception ignore) {
|
||||
//System.out.println("IGNORE: " + ignore);
|
||||
LOG.debug("IGNORE: " + ignore.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
package egovframework.com.cmm.web;
|
||||
|
||||
/*
|
||||
* Copyright 2001-2006 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ";License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS"; BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.apache.commons.fileupload.FileItem;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.multipart.MultipartException;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
||||
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
|
||||
|
||||
/**
|
||||
* 실행환경의 파일업로드 처리를 위한 기능 클래스
|
||||
* @author 공통서비스개발팀 이삼섭
|
||||
* @since 2009.06.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.3.25 이삼섭 최초 생성
|
||||
* 2011.06.11 서준식 스프링 3.0 업그레이드 API변경으로인한 수정
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
public class EgovMultipartResolver extends CommonsMultipartResolver {
|
||||
public EgovMultipartResolver() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 첨부파일 처리를 위한 multipart resolver를 생성한다.
|
||||
*
|
||||
* @param servletContext
|
||||
*/
|
||||
public EgovMultipartResolver(ServletContext servletContext) {
|
||||
super(servletContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* multipart에 대한 parsing을 처리한다.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected MultipartParsingResult parseFileItems(List fileItems, String encoding) {
|
||||
|
||||
//스프링 3.0변경으로 수정한 부분
|
||||
MultiValueMap<String, MultipartFile> multipartFiles = new LinkedMultiValueMap<String, MultipartFile>();
|
||||
Map<String, String[]> multipartParameters = new HashMap<String, String[]>();
|
||||
|
||||
// Extract multipart files and multipart parameters.
|
||||
for (Iterator it = fileItems.iterator(); it.hasNext();) {
|
||||
FileItem fileItem = (FileItem)it.next();
|
||||
|
||||
if (fileItem.isFormField()) {
|
||||
|
||||
String value = null;
|
||||
if (encoding != null) {
|
||||
try {
|
||||
value = fileItem.getString(encoding);
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
if (logger.isWarnEnabled()) {
|
||||
logger.warn("Could not decode multipart item '" + fileItem.getFieldName() + "' with encoding '" + encoding
|
||||
+ "': using platform default");
|
||||
}
|
||||
value = fileItem.getString();
|
||||
}
|
||||
} else {
|
||||
value = fileItem.getString();
|
||||
}
|
||||
String[] curParam = (String[])multipartParameters.get(fileItem.getFieldName());
|
||||
if (curParam == null) {
|
||||
// simple form field
|
||||
multipartParameters.put(fileItem.getFieldName(), new String[] { value });
|
||||
} else {
|
||||
// array of simple form fields
|
||||
String[] newParam = StringUtils.addStringToArray(curParam, value);
|
||||
multipartParameters.put(fileItem.getFieldName(), newParam);
|
||||
}
|
||||
} else {
|
||||
|
||||
if (fileItem.getSize() > 0) {
|
||||
// multipart file field
|
||||
CommonsMultipartFile file = new CommonsMultipartFile(fileItem);
|
||||
|
||||
|
||||
//스프링 3.0 업그레이드 API변경으로인한 수정
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
fileList.add(file);
|
||||
|
||||
|
||||
if (multipartFiles.put(fileItem.getName(), fileList) != null) { // CHANGED!!
|
||||
throw new MultipartException("Multiple files for field name [" + file.getName()
|
||||
+ "] found - not supported by MultipartResolver");
|
||||
}
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Found multipart file [" + file.getName() + "] of size " + file.getSize() + " bytes with original filename ["
|
||||
+ file.getOriginalFilename() + "], stored " + file.getStorageDescription());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return new MultipartParsingResult(multipartFiles, multipartParameters, null);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,960 @@
|
|||
package egovframework.com.json;
|
||||
|
||||
/*
|
||||
Copyright (c) 2002 JSON.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
The Software shall be used for Good, not Evil.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A JSONArray is an ordered sequence of values. Its external text form is a
|
||||
* string wrapped in square brackets with commas separating the values. The
|
||||
* internal form is an object having <code>get</code> and <code>opt</code>
|
||||
* methods for accessing the values by index, and <code>put</code> methods for
|
||||
* adding or replacing values. The values can be any of these types:
|
||||
* <code>Boolean</code>, <code>JSONArray</code>, <code>JSONObject</code>,
|
||||
* <code>Number</code>, <code>String</code>, or the
|
||||
* <code>JSONObject.NULL object</code>.
|
||||
* <p>
|
||||
* The constructor can convert a JSON text into a Java object. The
|
||||
* <code>toString</code> method converts to JSON text.
|
||||
* <p>
|
||||
* A <code>get</code> method returns a value if one can be found, and throws an
|
||||
* exception if one cannot be found. An <code>opt</code> method returns a
|
||||
* default value instead of throwing an exception, and so is useful for
|
||||
* obtaining optional values.
|
||||
* <p>
|
||||
* The generic <code>get()</code> and <code>opt()</code> methods return an
|
||||
* object which you can cast or query for type. There are also typed
|
||||
* <code>get</code> and <code>opt</code> methods that do type checking and type
|
||||
* coercion for you.
|
||||
* <p>
|
||||
* The texts produced by the <code>toString</code> methods strictly conform to
|
||||
* JSON syntax rules. The constructors are more forgiving in the texts they will
|
||||
* accept:
|
||||
* <ul>
|
||||
* <li>An extra <code>,</code> <small>(comma)</small> may appear just
|
||||
* before the closing bracket.</li>
|
||||
* <li>The <code>null</code> value will be inserted when there
|
||||
* is <code>,</code> <small>(comma)</small> elision.</li>
|
||||
* <li>Strings may be quoted with <code>'</code> <small>(single
|
||||
* quote)</small>.</li>
|
||||
* <li>Strings do not need to be quoted at all if they do not begin with a quote
|
||||
* or single quote, and if they do not contain leading or trailing spaces,
|
||||
* and if they do not contain any of these characters:
|
||||
* <code>{ } [ ] / \ : , = ; #</code> and if they do not look like numbers
|
||||
* and if they are not the reserved words <code>true</code>,
|
||||
* <code>false</code>, or <code>null</code>.</li>
|
||||
* <li>Values can be separated by <code>;</code> <small>(semicolon)</small> as
|
||||
* well as by <code>,</code> <small>(comma)</small>.</li>
|
||||
* <li>Numbers may have the <code>0-</code> <small>(octal)</small> or
|
||||
* <code>0x-</code> <small>(hex)</small> prefix.</li>
|
||||
* </ul>
|
||||
|
||||
* @author JSON.org
|
||||
* @version 2009-04-13
|
||||
*/
|
||||
public class JSONArray {
|
||||
|
||||
|
||||
/**
|
||||
* The arrayList where the JSONArray's properties are kept.
|
||||
*/
|
||||
private ArrayList myArrayList;
|
||||
|
||||
|
||||
/**
|
||||
* Construct an empty JSONArray.
|
||||
*/
|
||||
public JSONArray() {
|
||||
this.myArrayList = new ArrayList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a JSONArray from a JSONTokener.
|
||||
* @param x A JSONTokener
|
||||
* @throws JSONException If there is a syntax error.
|
||||
*/
|
||||
public JSONArray(JSONTokener x) throws JSONException {
|
||||
this();
|
||||
char c = x.nextClean();
|
||||
char q;
|
||||
if (c == '[') {
|
||||
q = ']';
|
||||
} else if (c == '(') {
|
||||
q = ')';
|
||||
} else {
|
||||
throw x.syntaxError("A JSONArray text must start with '['");
|
||||
}
|
||||
if (x.nextClean() == ']') {
|
||||
return;
|
||||
}
|
||||
x.back();
|
||||
for (;;) {
|
||||
if (x.nextClean() == ',') {
|
||||
x.back();
|
||||
this.myArrayList.add(null);
|
||||
} else {
|
||||
x.back();
|
||||
this.myArrayList.add(x.nextValue());
|
||||
}
|
||||
c = x.nextClean();
|
||||
switch (c) {
|
||||
case ';':
|
||||
case ',':
|
||||
if (x.nextClean() == ']') {
|
||||
return;
|
||||
}
|
||||
x.back();
|
||||
break;
|
||||
case ']':
|
||||
case ')':
|
||||
if (q != c) {
|
||||
throw x.syntaxError("Expected a '" + new Character(q) + "'");
|
||||
}
|
||||
return;
|
||||
default:
|
||||
throw x.syntaxError("Expected a ',' or ']'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Construct a JSONArray from a source JSON text.
|
||||
* @param source A string that begins with
|
||||
* <code>[</code> <small>(left bracket)</small>
|
||||
* and ends with <code>]</code> <small>(right bracket)</small>.
|
||||
* @throws JSONException If there is a syntax error.
|
||||
*/
|
||||
public JSONArray(String source) throws JSONException {
|
||||
this(new JSONTokener(source));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Construct a JSONArray from a Collection.
|
||||
* @param collection A Collection.
|
||||
*/
|
||||
public JSONArray(Collection collection) {
|
||||
this.myArrayList = (collection == null) ?
|
||||
new ArrayList() :
|
||||
new ArrayList(collection);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a JSONArray from a collection of beans.
|
||||
* The collection should have Java Beans.
|
||||
*
|
||||
* @throws JSONException If not an array.
|
||||
*/
|
||||
|
||||
public JSONArray(Collection collection, boolean includeSuperClass) {
|
||||
this.myArrayList = new ArrayList();
|
||||
if (collection != null) {
|
||||
Iterator iter = collection.iterator();
|
||||
while (iter.hasNext()) {
|
||||
Object o = iter.next();
|
||||
if (o instanceof Map) {
|
||||
this.myArrayList.add(new JSONObject((Map)o, includeSuperClass));
|
||||
} else if (!JSONObject.isStandardProperty(o.getClass())) {
|
||||
this.myArrayList.add(new JSONObject(o, includeSuperClass));
|
||||
} else {
|
||||
this.myArrayList.add(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Construct a JSONArray from an array
|
||||
* @throws JSONException If not an array.
|
||||
*/
|
||||
public JSONArray(Object array) throws JSONException {
|
||||
this();
|
||||
if (array.getClass().isArray()) {
|
||||
int length = Array.getLength(array);
|
||||
for (int i = 0; i < length; i += 1) {
|
||||
this.put(Array.get(array, i));
|
||||
}
|
||||
} else {
|
||||
throw new JSONException("JSONArray initial value should be a string or collection or array.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a JSONArray from an array with a bean.
|
||||
* The array should have Java Beans.
|
||||
*
|
||||
* @throws JSONException If not an array.
|
||||
*/
|
||||
public JSONArray(Object array,boolean includeSuperClass) throws JSONException {
|
||||
this();
|
||||
if (array.getClass().isArray()) {
|
||||
int length = Array.getLength(array);
|
||||
for (int i = 0; i < length; i += 1) {
|
||||
Object o = Array.get(array, i);
|
||||
if (JSONObject.isStandardProperty(o.getClass())) {
|
||||
this.myArrayList.add(o);
|
||||
} else {
|
||||
this.myArrayList.add(new JSONObject(o,includeSuperClass));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new JSONException("JSONArray initial value should be a string or collection or array.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the object value associated with an index.
|
||||
* @param index
|
||||
* The index must be between 0 and length() - 1.
|
||||
* @return An object value.
|
||||
* @throws JSONException If there is no value for the index.
|
||||
*/
|
||||
public Object get(int index) throws JSONException {
|
||||
Object o = opt(index);
|
||||
if (o == null) {
|
||||
throw new JSONException("JSONArray[" + index + "] not found.");
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the boolean value associated with an index.
|
||||
* The string values "true" and "false" are converted to boolean.
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return The truth.
|
||||
* @throws JSONException If there is no value for the index or if the
|
||||
* value is not convertable to boolean.
|
||||
*/
|
||||
public boolean getBoolean(int index) throws JSONException {
|
||||
Object o = get(index);
|
||||
if (o.equals(Boolean.FALSE) ||
|
||||
(o instanceof String &&
|
||||
((String)o).equalsIgnoreCase("false"))) {
|
||||
return false;
|
||||
} else if (o.equals(Boolean.TRUE) ||
|
||||
(o instanceof String &&
|
||||
((String)o).equalsIgnoreCase("true"))) {
|
||||
return true;
|
||||
}
|
||||
throw new JSONException("JSONArray[" + index + "] is not a Boolean.");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the double value associated with an index.
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return The value.
|
||||
* @throws JSONException If the key is not found or if the value cannot
|
||||
* be converted to a number.
|
||||
*/
|
||||
public double getDouble(int index) throws JSONException {
|
||||
Object o = get(index);
|
||||
try {
|
||||
return o instanceof Number ?
|
||||
((Number)o).doubleValue() :
|
||||
Double.valueOf((String)o);
|
||||
} catch (Exception e) {
|
||||
throw new JSONException("JSONArray[" + index +
|
||||
"] is not a number.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the int value associated with an index.
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return The value.
|
||||
* @throws JSONException If the key is not found or if the value cannot
|
||||
* be converted to a number.
|
||||
* if the value cannot be converted to a number.
|
||||
*/
|
||||
public int getInt(int index) throws JSONException {
|
||||
Object o = get(index);
|
||||
return o instanceof Number ?
|
||||
((Number)o).intValue() : (int)getDouble(index);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the JSONArray associated with an index.
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return A JSONArray value.
|
||||
* @throws JSONException If there is no value for the index. or if the
|
||||
* value is not a JSONArray
|
||||
*/
|
||||
public JSONArray getJSONArray(int index) throws JSONException {
|
||||
Object o = get(index);
|
||||
if (o instanceof JSONArray) {
|
||||
return (JSONArray)o;
|
||||
}
|
||||
throw new JSONException("JSONArray[" + index +
|
||||
"] is not a JSONArray.");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the JSONObject associated with an index.
|
||||
* @param index subscript
|
||||
* @return A JSONObject value.
|
||||
* @throws JSONException If there is no value for the index or if the
|
||||
* value is not a JSONObject
|
||||
*/
|
||||
public JSONObject getJSONObject(int index) throws JSONException {
|
||||
Object o = get(index);
|
||||
if (o instanceof JSONObject) {
|
||||
return (JSONObject)o;
|
||||
}
|
||||
throw new JSONException("JSONArray[" + index +
|
||||
"] is not a JSONObject.");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the long value associated with an index.
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return The value.
|
||||
* @throws JSONException If the key is not found or if the value cannot
|
||||
* be converted to a number.
|
||||
*/
|
||||
public long getLong(int index) throws JSONException {
|
||||
Object o = get(index);
|
||||
return o instanceof Number ?
|
||||
((Number)o).longValue() : (long)getDouble(index);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the string associated with an index.
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return A string value.
|
||||
* @throws JSONException If there is no value for the index.
|
||||
*/
|
||||
public String getString(int index) throws JSONException {
|
||||
return get(index).toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine if the value is null.
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return true if the value at the index is null, or if there is no value.
|
||||
*/
|
||||
public boolean isNull(int index) {
|
||||
return JSONObject.NULL.equals(opt(index));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make a string from the contents of this JSONArray. The
|
||||
* <code>separator</code> string is inserted between each element.
|
||||
* Warning: This method assumes that the data structure is acyclical.
|
||||
* @param separator A string that will be inserted between the elements.
|
||||
* @return a string.
|
||||
* @throws JSONException If the array contains an invalid number.
|
||||
*/
|
||||
public String join(String separator) throws JSONException {
|
||||
int len = length();
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
for (int i = 0; i < len; i += 1) {
|
||||
if (i > 0) {
|
||||
sb.append(separator);
|
||||
}
|
||||
sb.append(JSONObject.valueToString(this.myArrayList.get(i)));
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the number of elements in the JSONArray, included nulls.
|
||||
*
|
||||
* @return The length (or size).
|
||||
*/
|
||||
public int length() {
|
||||
return this.myArrayList.size();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional object value associated with an index.
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return An object value, or null if there is no
|
||||
* object at that index.
|
||||
*/
|
||||
public Object opt(int index) {
|
||||
return (index < 0 || index >= length()) ?
|
||||
null : this.myArrayList.get(index);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional boolean value associated with an index.
|
||||
* It returns false if there is no value at that index,
|
||||
* or if the value is not Boolean.TRUE or the String "true".
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return The truth.
|
||||
*/
|
||||
public boolean optBoolean(int index) {
|
||||
return optBoolean(index, false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional boolean value associated with an index.
|
||||
* It returns the defaultValue if there is no value at that index or if
|
||||
* it is not a Boolean or the String "true" or "false" (case insensitive).
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @param defaultValue A boolean default.
|
||||
* @return The truth.
|
||||
*/
|
||||
public boolean optBoolean(int index, boolean defaultValue) {
|
||||
try {
|
||||
return getBoolean(index);
|
||||
} catch (Exception e) {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional double value associated with an index.
|
||||
* NaN is returned if there is no value for the index,
|
||||
* or if the value is not a number and cannot be converted to a number.
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return The value.
|
||||
*/
|
||||
public double optDouble(int index) {
|
||||
return optDouble(index, Double.NaN);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional double value associated with an index.
|
||||
* The defaultValue is returned if there is no value for the index,
|
||||
* or if the value is not a number and cannot be converted to a number.
|
||||
*
|
||||
* @param index subscript
|
||||
* @param defaultValue The default value.
|
||||
* @return The value.
|
||||
*/
|
||||
public double optDouble(int index, double defaultValue) {
|
||||
try {
|
||||
return getDouble(index);
|
||||
} catch (Exception e) {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional int value associated with an index.
|
||||
* Zero is returned if there is no value for the index,
|
||||
* or if the value is not a number and cannot be converted to a number.
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return The value.
|
||||
*/
|
||||
public int optInt(int index) {
|
||||
return optInt(index, 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional int value associated with an index.
|
||||
* The defaultValue is returned if there is no value for the index,
|
||||
* or if the value is not a number and cannot be converted to a number.
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @param defaultValue The default value.
|
||||
* @return The value.
|
||||
*/
|
||||
public int optInt(int index, int defaultValue) {
|
||||
try {
|
||||
return getInt(index);
|
||||
} catch (Exception e) {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional JSONArray associated with an index.
|
||||
* @param index subscript
|
||||
* @return A JSONArray value, or null if the index has no value,
|
||||
* or if the value is not a JSONArray.
|
||||
*/
|
||||
public JSONArray optJSONArray(int index) {
|
||||
Object o = opt(index);
|
||||
return o instanceof JSONArray ? (JSONArray)o : null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional JSONObject associated with an index.
|
||||
* Null is returned if the key is not found, or null if the index has
|
||||
* no value, or if the value is not a JSONObject.
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return A JSONObject value.
|
||||
*/
|
||||
public JSONObject optJSONObject(int index) {
|
||||
Object o = opt(index);
|
||||
return o instanceof JSONObject ? (JSONObject)o : null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional long value associated with an index.
|
||||
* Zero is returned if there is no value for the index,
|
||||
* or if the value is not a number and cannot be converted to a number.
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return The value.
|
||||
*/
|
||||
public long optLong(int index) {
|
||||
return optLong(index, 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional long value associated with an index.
|
||||
* The defaultValue is returned if there is no value for the index,
|
||||
* or if the value is not a number and cannot be converted to a number.
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @param defaultValue The default value.
|
||||
* @return The value.
|
||||
*/
|
||||
public long optLong(int index, long defaultValue) {
|
||||
try {
|
||||
return getLong(index);
|
||||
} catch (Exception e) {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional string value associated with an index. It returns an
|
||||
* empty string if there is no value at that index. If the value
|
||||
* is not a string and is not null, then it is coverted to a string.
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @return A String value.
|
||||
*/
|
||||
public String optString(int index) {
|
||||
return optString(index, "");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the optional string associated with an index.
|
||||
* The defaultValue is returned if the key is not found.
|
||||
*
|
||||
* @param index The index must be between 0 and length() - 1.
|
||||
* @param defaultValue The default value.
|
||||
* @return A String value.
|
||||
*/
|
||||
public String optString(int index, String defaultValue) {
|
||||
Object o = opt(index);
|
||||
return o != null ? o.toString() : defaultValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Append a boolean value. This increases the array's length by one.
|
||||
*
|
||||
* @param value A boolean value.
|
||||
* @return this.
|
||||
*/
|
||||
public JSONArray put(boolean value) {
|
||||
put(value ? Boolean.TRUE : Boolean.FALSE);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put a value in the JSONArray, where the value will be a
|
||||
* JSONArray which is produced from a Collection.
|
||||
* @param value A Collection value.
|
||||
* @return this.
|
||||
*/
|
||||
public JSONArray put(Collection value) {
|
||||
put(new JSONArray(value));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Append a double value. This increases the array's length by one.
|
||||
*
|
||||
* @param value A double value.
|
||||
* @throws JSONException if the value is not finite.
|
||||
* @return this.
|
||||
*/
|
||||
public JSONArray put(double value) throws JSONException {
|
||||
Double d = new Double(value);
|
||||
JSONObject.testValidity(d);
|
||||
put(d);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Append an int value. This increases the array's length by one.
|
||||
*
|
||||
* @param value An int value.
|
||||
* @return this.
|
||||
*/
|
||||
public JSONArray put(int value) {
|
||||
put(new Integer(value));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Append an long value. This increases the array's length by one.
|
||||
*
|
||||
* @param value A long value.
|
||||
* @return this.
|
||||
*/
|
||||
public JSONArray put(long value) {
|
||||
put(new Long(value));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put a value in the JSONArray, where the value will be a
|
||||
* JSONObject which is produced from a Map.
|
||||
* @param value A Map value.
|
||||
* @return this.
|
||||
*/
|
||||
public JSONArray put(Map value) {
|
||||
put(new JSONObject(value));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Append an object value. This increases the array's length by one.
|
||||
* @param value An object value. The value should be a
|
||||
* Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or the
|
||||
* JSONObject.NULL object.
|
||||
* @return this.
|
||||
*/
|
||||
public JSONArray put(Object value) {
|
||||
this.myArrayList.add(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put or replace a boolean value in the JSONArray. If the index is greater
|
||||
* than the length of the JSONArray, then null elements will be added as
|
||||
* necessary to pad it out.
|
||||
* @param index The subscript.
|
||||
* @param value A boolean value.
|
||||
* @return this.
|
||||
* @throws JSONException If the index is negative.
|
||||
*/
|
||||
public JSONArray put(int index, boolean value) throws JSONException {
|
||||
put(index, value ? Boolean.TRUE : Boolean.FALSE);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put a value in the JSONArray, where the value will be a
|
||||
* JSONArray which is produced from a Collection.
|
||||
* @param index The subscript.
|
||||
* @param value A Collection value.
|
||||
* @return this.
|
||||
* @throws JSONException If the index is negative or if the value is
|
||||
* not finite.
|
||||
*/
|
||||
public JSONArray put(int index, Collection value) throws JSONException {
|
||||
put(index, new JSONArray(value));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put or replace a double value. If the index is greater than the length of
|
||||
* the JSONArray, then null elements will be added as necessary to pad
|
||||
* it out.
|
||||
* @param index The subscript.
|
||||
* @param value A double value.
|
||||
* @return this.
|
||||
* @throws JSONException If the index is negative or if the value is
|
||||
* not finite.
|
||||
*/
|
||||
public JSONArray put(int index, double value) throws JSONException {
|
||||
put(index, new Double(value));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put or replace an int value. If the index is greater than the length of
|
||||
* the JSONArray, then null elements will be added as necessary to pad
|
||||
* it out.
|
||||
* @param index The subscript.
|
||||
* @param value An int value.
|
||||
* @return this.
|
||||
* @throws JSONException If the index is negative.
|
||||
*/
|
||||
public JSONArray put(int index, int value) throws JSONException {
|
||||
put(index, new Integer(value));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put or replace a long value. If the index is greater than the length of
|
||||
* the JSONArray, then null elements will be added as necessary to pad
|
||||
* it out.
|
||||
* @param index The subscript.
|
||||
* @param value A long value.
|
||||
* @return this.
|
||||
* @throws JSONException If the index is negative.
|
||||
*/
|
||||
public JSONArray put(int index, long value) throws JSONException {
|
||||
put(index, new Long(value));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put a value in the JSONArray, where the value will be a
|
||||
* JSONObject which is produced from a Map.
|
||||
* @param index The subscript.
|
||||
* @param value The Map value.
|
||||
* @return this.
|
||||
* @throws JSONException If the index is negative or if the the value is
|
||||
* an invalid number.
|
||||
*/
|
||||
public JSONArray put(int index, Map value) throws JSONException {
|
||||
put(index, new JSONObject(value));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Put or replace an object value in the JSONArray. If the index is greater
|
||||
* than the length of the JSONArray, then null elements will be added as
|
||||
* necessary to pad it out.
|
||||
* @param index The subscript.
|
||||
* @param value The value to put into the array. The value should be a
|
||||
* Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or the
|
||||
* JSONObject.NULL object.
|
||||
* @return this.
|
||||
* @throws JSONException If the index is negative or if the the value is
|
||||
* an invalid number.
|
||||
*/
|
||||
public JSONArray put(int index, Object value) throws JSONException {
|
||||
JSONObject.testValidity(value);
|
||||
if (index < 0) {
|
||||
throw new JSONException("JSONArray[" + index + "] not found.");
|
||||
}
|
||||
if (index < length()) {
|
||||
this.myArrayList.set(index, value);
|
||||
} else {
|
||||
while (index != length()) {
|
||||
put(JSONObject.NULL);
|
||||
}
|
||||
put(value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove a index and close the hole.
|
||||
* @param index The index of the element to be removed.
|
||||
* @return The value that was associated with the index,
|
||||
* or null if there was no value.
|
||||
*/
|
||||
public Object remove(int index) {
|
||||
Object o = opt(index);
|
||||
this.myArrayList.remove(index);
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Produce a JSONObject by combining a JSONArray of names with the values
|
||||
* of this JSONArray.
|
||||
* @param names A JSONArray containing a list of key strings. These will be
|
||||
* paired with the values.
|
||||
* @return A JSONObject, or null if there are no names or if this JSONArray
|
||||
* has no values.
|
||||
* @throws JSONException If any of the names are null.
|
||||
*/
|
||||
public JSONObject toJSONObject(JSONArray names) throws JSONException {
|
||||
if (names == null || names.length() == 0 || length() == 0) {
|
||||
return null;
|
||||
}
|
||||
JSONObject jo = new JSONObject();
|
||||
for (int i = 0; i < names.length(); i += 1) {
|
||||
jo.put(names.getString(i), this.opt(i));
|
||||
}
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make a JSON text of this JSONArray. For compactness, no
|
||||
* unnecessary whitespace is added. If it is not possible to produce a
|
||||
* syntactically correct JSON text then null will be returned instead. This
|
||||
* could occur if the array contains an invalid number.
|
||||
* <p>
|
||||
* Warning: This method assumes that the data structure is acyclical.
|
||||
*
|
||||
* @return a printable, displayable, transmittable
|
||||
* representation of the array.
|
||||
*/
|
||||
public String toString() {
|
||||
try {
|
||||
return '[' + join(",") + ']';
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make a prettyprinted JSON text of this JSONArray.
|
||||
* Warning: This method assumes that the data structure is acyclical.
|
||||
* @param indentFactor The number of spaces to add to each level of
|
||||
* indentation.
|
||||
* @return a printable, displayable, transmittable
|
||||
* representation of the object, beginning
|
||||
* with <code>[</code> <small>(left bracket)</small> and ending
|
||||
* with <code>]</code> <small>(right bracket)</small>.
|
||||
* @throws JSONException
|
||||
*/
|
||||
public String toString(int indentFactor) throws JSONException {
|
||||
return toString(indentFactor, 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make a prettyprinted JSON text of this JSONArray.
|
||||
* Warning: This method assumes that the data structure is acyclical.
|
||||
* @param indentFactor The number of spaces to add to each level of
|
||||
* indentation.
|
||||
* @param indent The indention of the top level.
|
||||
* @return a printable, displayable, transmittable
|
||||
* representation of the array.
|
||||
* @throws JSONException
|
||||
*/
|
||||
String toString(int indentFactor, int indent) throws JSONException {
|
||||
int len = length();
|
||||
if (len == 0) {
|
||||
return "[]";
|
||||
}
|
||||
int i;
|
||||
StringBuffer sb = new StringBuffer("[");
|
||||
if (len == 1) {
|
||||
sb.append(JSONObject.valueToString(this.myArrayList.get(0),
|
||||
indentFactor, indent));
|
||||
} else {
|
||||
int newindent = indent + indentFactor;
|
||||
sb.append('\n');
|
||||
for (i = 0; i < len; i += 1) {
|
||||
if (i > 0) {
|
||||
sb.append(",\n");
|
||||
}
|
||||
for (int j = 0; j < newindent; j += 1) {
|
||||
sb.append(' ');
|
||||
}
|
||||
sb.append(JSONObject.valueToString(this.myArrayList.get(i),
|
||||
indentFactor, newindent));
|
||||
}
|
||||
sb.append('\n');
|
||||
for (i = 0; i < indent; i += 1) {
|
||||
sb.append(' ');
|
||||
}
|
||||
}
|
||||
sb.append(']');
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Write the contents of the JSONArray as JSON text to a writer.
|
||||
* For compactness, no whitespace is added.
|
||||
* <p>
|
||||
* Warning: This method assumes that the data structure is acyclical.
|
||||
*
|
||||
* @return The writer.
|
||||
* @throws JSONException
|
||||
*/
|
||||
public Writer write(Writer writer) throws JSONException {
|
||||
try {
|
||||
boolean b = false;
|
||||
int len = length();
|
||||
|
||||
writer.write('[');
|
||||
|
||||
for (int i = 0; i < len; i += 1) {
|
||||
if (b) {
|
||||
writer.write(',');
|
||||
}
|
||||
Object v = this.myArrayList.get(i);
|
||||
if (v instanceof JSONObject) {
|
||||
((JSONObject)v).write(writer);
|
||||
} else if (v instanceof JSONArray) {
|
||||
((JSONArray)v).write(writer);
|
||||
} else {
|
||||
writer.write(JSONObject.valueToString(v));
|
||||
}
|
||||
b = true;
|
||||
}
|
||||
writer.write(']');
|
||||
return writer;
|
||||
} catch (IOException e) {
|
||||
throw new JSONException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package egovframework.com.json;
|
||||
|
||||
/**
|
||||
* The JSONException is thrown by the JSON.org classes then things are amiss.
|
||||
* @author JSON.org
|
||||
* @version 2008-09-18
|
||||
*/
|
||||
public class JSONException extends Exception {
|
||||
private Throwable cause;
|
||||
|
||||
/**
|
||||
* Constructs a JSONException with an explanatory message.
|
||||
* @param message Detail about the reason for the exception.
|
||||
*/
|
||||
public JSONException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public JSONException(Throwable t) {
|
||||
super(t.getMessage());
|
||||
this.cause = t;
|
||||
}
|
||||
|
||||
public Throwable getCause() {
|
||||
return this.cause;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,18 @@
|
|||
package egovframework.com.json;
|
||||
/**
|
||||
* The <code>JSONString</code> interface allows a <code>toJSONString()</code>
|
||||
* method so that a class can change the behavior of
|
||||
* <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>,
|
||||
* and <code>JSONWriter.value(</code>Object<code>)</code>. The
|
||||
* <code>toJSONString</code> method will be used instead of the default behavior
|
||||
* of using the Object's <code>toString()</code> method and quoting the result.
|
||||
*/
|
||||
public interface JSONString {
|
||||
/**
|
||||
* The <code>toJSONString</code> method allows a class to produce its own JSON
|
||||
* serialization.
|
||||
*
|
||||
* @return A strictly syntactically correct JSON text.
|
||||
*/
|
||||
public String toJSONString();
|
||||
}
|
||||
|
|
@ -0,0 +1,425 @@
|
|||
package egovframework.com.json;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.io.StringReader;
|
||||
|
||||
/*
|
||||
Copyright (c) 2002 JSON.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
The Software shall be used for Good, not Evil.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A JSONTokener takes a source string and extracts characters and tokens from
|
||||
* it. It is used by the JSONObject and JSONArray constructors to parse
|
||||
* JSON source strings.
|
||||
* @author JSON.org
|
||||
* @version 2008-09-18
|
||||
*/
|
||||
public class JSONTokener {
|
||||
|
||||
private int index;
|
||||
private Reader reader;
|
||||
private char lastChar;
|
||||
private boolean useLastChar;
|
||||
|
||||
|
||||
/**
|
||||
* Construct a JSONTokener from a string.
|
||||
*
|
||||
* @param reader A reader.
|
||||
*/
|
||||
public JSONTokener(Reader reader) {
|
||||
this.reader = reader.markSupported() ?
|
||||
reader : new BufferedReader(reader);
|
||||
this.useLastChar = false;
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Construct a JSONTokener from a string.
|
||||
*
|
||||
* @param s A source string.
|
||||
*/
|
||||
public JSONTokener(String s) {
|
||||
this(new StringReader(s));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Back up one character. This provides a sort of lookahead capability,
|
||||
* so that you can test for a digit or letter before attempting to parse
|
||||
* the next number or identifier.
|
||||
*/
|
||||
public void back() throws JSONException {
|
||||
if (useLastChar || index <= 0) {
|
||||
throw new JSONException("Stepping back two steps is not supported");
|
||||
}
|
||||
index -= 1;
|
||||
useLastChar = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get the hex value of a character (base16).
|
||||
* @param c A character between '0' and '9' or between 'A' and 'F' or
|
||||
* between 'a' and 'f'.
|
||||
* @return An int between 0 and 15, or -1 if c was not a hex digit.
|
||||
*/
|
||||
public static int dehexchar(char c) {
|
||||
if (c >= '0' && c <= '9') {
|
||||
return c - '0';
|
||||
}
|
||||
if (c >= 'A' && c <= 'F') {
|
||||
return c - ('A' - 10);
|
||||
}
|
||||
if (c >= 'a' && c <= 'f') {
|
||||
return c - ('a' - 10);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine if the source string still contains characters that next()
|
||||
* can consume.
|
||||
* @return true if not yet at the end of the source.
|
||||
*/
|
||||
public boolean more() throws JSONException {
|
||||
char nextChar = next();
|
||||
if (nextChar == 0) {
|
||||
return false;
|
||||
}
|
||||
back();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the next character in the source string.
|
||||
*
|
||||
* @return The next character, or 0 if past the end of the source string.
|
||||
*/
|
||||
public char next() throws JSONException {
|
||||
if (this.useLastChar) {
|
||||
this.useLastChar = false;
|
||||
if (this.lastChar != 0) {
|
||||
this.index += 1;
|
||||
}
|
||||
return this.lastChar;
|
||||
}
|
||||
int c;
|
||||
try {
|
||||
c = this.reader.read();
|
||||
} catch (IOException exc) {
|
||||
throw new JSONException(exc);
|
||||
}
|
||||
|
||||
if (c <= 0) { // End of stream
|
||||
this.lastChar = 0;
|
||||
return 0;
|
||||
}
|
||||
this.index += 1;
|
||||
this.lastChar = (char) c;
|
||||
return this.lastChar;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Consume the next character, and check that it matches a specified
|
||||
* character.
|
||||
* @param c The character to match.
|
||||
* @return The character.
|
||||
* @throws JSONException if the character does not match.
|
||||
*/
|
||||
public char next(char c) throws JSONException {
|
||||
char n = next();
|
||||
if (n != c) {
|
||||
throw syntaxError("Expected '" + c + "' and instead saw '" +
|
||||
n + "'");
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the next n characters.
|
||||
*
|
||||
* @param n The number of characters to take.
|
||||
* @return A string of n characters.
|
||||
* @throws JSONException
|
||||
* Substring bounds error if there are not
|
||||
* n characters remaining in the source string.
|
||||
*/
|
||||
public String next(int n) throws JSONException {
|
||||
if (n == 0) {
|
||||
return "";
|
||||
}
|
||||
|
||||
char[] buffer = new char[n];
|
||||
int pos = 0;
|
||||
|
||||
if (this.useLastChar) {
|
||||
this.useLastChar = false;
|
||||
buffer[0] = this.lastChar;
|
||||
pos = 1;
|
||||
}
|
||||
|
||||
try {
|
||||
int len;
|
||||
while ((pos < n) && ((len = reader.read(buffer, pos, n - pos)) != -1)) {
|
||||
pos += len;
|
||||
}
|
||||
} catch (IOException exc) {
|
||||
throw new JSONException(exc);
|
||||
}
|
||||
this.index += pos;
|
||||
|
||||
if (pos < n) {
|
||||
throw syntaxError("Substring bounds error");
|
||||
}
|
||||
|
||||
this.lastChar = buffer[n - 1];
|
||||
return new String(buffer);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the next char in the string, skipping whitespace.
|
||||
* @throws JSONException
|
||||
* @return A character, or 0 if there are no more characters.
|
||||
*/
|
||||
public char nextClean() throws JSONException {
|
||||
for (;;) {
|
||||
char c = next();
|
||||
if (c == 0 || c > ' ') {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the characters up to the next close quote character.
|
||||
* Backslash processing is done. The formal JSON format does not
|
||||
* allow strings in single quotes, but an implementation is allowed to
|
||||
* accept them.
|
||||
* @param quote The quoting character, either
|
||||
* <code>"</code> <small>(double quote)</small> or
|
||||
* <code>'</code> <small>(single quote)</small>.
|
||||
* @return A String.
|
||||
* @throws JSONException Unterminated string.
|
||||
*/
|
||||
public String nextString(char quote) throws JSONException {
|
||||
char c;
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (;;) {
|
||||
c = next();
|
||||
switch (c) {
|
||||
case 0:
|
||||
case '\n':
|
||||
case '\r':
|
||||
throw syntaxError("Unterminated string");
|
||||
case '\\':
|
||||
c = next();
|
||||
switch (c) {
|
||||
case 'b':
|
||||
sb.append('\b');
|
||||
break;
|
||||
case 't':
|
||||
sb.append('\t');
|
||||
break;
|
||||
case 'n':
|
||||
sb.append('\n');
|
||||
break;
|
||||
case 'f':
|
||||
sb.append('\f');
|
||||
break;
|
||||
case 'r':
|
||||
sb.append('\r');
|
||||
break;
|
||||
case 'u':
|
||||
sb.append((char)Integer.parseInt(next(4), 16));
|
||||
break;
|
||||
case '"':
|
||||
case '\'':
|
||||
case '\\':
|
||||
case '/':
|
||||
sb.append(c);
|
||||
break;
|
||||
default:
|
||||
throw syntaxError("Illegal escape.");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (c == quote) {
|
||||
return sb.toString();
|
||||
}
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the text up but not including the specified character or the
|
||||
* end of line, whichever comes first.
|
||||
* @param d A delimiter character.
|
||||
* @return A string.
|
||||
*/
|
||||
public String nextTo(char d) throws JSONException {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (;;) {
|
||||
char c = next();
|
||||
if (c == d || c == 0 || c == '\n' || c == '\r') {
|
||||
if (c != 0) {
|
||||
back();
|
||||
}
|
||||
return sb.toString().trim();
|
||||
}
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the text up but not including one of the specified delimiter
|
||||
* characters or the end of line, whichever comes first.
|
||||
* @param delimiters A set of delimiter characters.
|
||||
* @return A string, trimmed.
|
||||
*/
|
||||
public String nextTo(String delimiters) throws JSONException {
|
||||
char c;
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (;;) {
|
||||
c = next();
|
||||
if (delimiters.indexOf(c) >= 0 || c == 0 ||
|
||||
c == '\n' || c == '\r') {
|
||||
if (c != 0) {
|
||||
back();
|
||||
}
|
||||
return sb.toString().trim();
|
||||
}
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the next value. The value can be a Boolean, Double, Integer,
|
||||
* JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object.
|
||||
* @throws JSONException If syntax error.
|
||||
*
|
||||
* @return An object.
|
||||
*/
|
||||
public Object nextValue() throws JSONException {
|
||||
char c = nextClean();
|
||||
String s;
|
||||
|
||||
switch (c) {
|
||||
case '"':
|
||||
case '\'':
|
||||
return nextString(c);
|
||||
case '{':
|
||||
back();
|
||||
return new JSONObject(this);
|
||||
case '[':
|
||||
case '(':
|
||||
back();
|
||||
return new JSONArray(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle unquoted text. This could be the values true, false, or
|
||||
* null, or it can be a number. An implementation (such as this one)
|
||||
* is allowed to also accept non-standard forms.
|
||||
*
|
||||
* Accumulate characters until we reach the end of the text or a
|
||||
* formatting character.
|
||||
*/
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) {
|
||||
sb.append(c);
|
||||
c = next();
|
||||
}
|
||||
back();
|
||||
|
||||
s = sb.toString().trim();
|
||||
if (s.equals("")) {
|
||||
throw syntaxError("Missing value");
|
||||
}
|
||||
return JSONObject.stringToValue(s);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Skip characters until the next character is the requested character.
|
||||
* If the requested character is not found, no characters are skipped.
|
||||
* @param to A character to skip to.
|
||||
* @return The requested character, or zero if the requested character
|
||||
* is not found.
|
||||
*/
|
||||
public char skipTo(char to) throws JSONException {
|
||||
char c;
|
||||
try {
|
||||
int startIndex = this.index;
|
||||
reader.mark(Integer.MAX_VALUE);
|
||||
do {
|
||||
c = next();
|
||||
if (c == 0) {
|
||||
reader.reset();
|
||||
this.index = startIndex;
|
||||
return c;
|
||||
}
|
||||
} while (c != to);
|
||||
} catch (IOException exc) {
|
||||
throw new JSONException(exc);
|
||||
}
|
||||
|
||||
back();
|
||||
return c;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a JSONException to signal a syntax error.
|
||||
*
|
||||
* @param message The error message.
|
||||
* @return A JSONException object, suitable for throwing
|
||||
*/
|
||||
public JSONException syntaxError(String message) {
|
||||
return new JSONException(message + toString());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make a printable string of this JSONTokener.
|
||||
*
|
||||
* @return " at character [this.index]"
|
||||
*/
|
||||
public String toString() {
|
||||
return " at character " + index;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
package egovframework.com.ssi.syi.iis.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 연계기관 모델 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcInstt implements Serializable {
|
||||
|
||||
/*
|
||||
* 기관ID
|
||||
*/
|
||||
private String insttId = "";
|
||||
|
||||
/*
|
||||
* 기관명
|
||||
*/
|
||||
private String insttNm = "";
|
||||
|
||||
/*
|
||||
* 최초등록자ID
|
||||
*/
|
||||
private String frstRegisterId = "";
|
||||
|
||||
/*
|
||||
* 최종수정자ID
|
||||
*/
|
||||
private String lastUpdusrId = "";
|
||||
|
||||
/**
|
||||
* insttId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getInsttId() {
|
||||
return insttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* insttId attribute 값을 설정한다.
|
||||
* @param insttId String
|
||||
*/
|
||||
public void setInsttId(String insttId) {
|
||||
this.insttId = insttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* insttNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getInsttNm() {
|
||||
return insttNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* insttNm attribute 값을 설정한다.
|
||||
* @param insttNm String
|
||||
*/
|
||||
public void setInsttNm(String insttNm) {
|
||||
this.insttNm = insttNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getFrstRegisterId() {
|
||||
return frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 값을 설정한다.
|
||||
* @param frstRegisterId String
|
||||
*/
|
||||
public void setFrstRegisterId(String frstRegisterId) {
|
||||
this.frstRegisterId = frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getLastUpdusrId() {
|
||||
return lastUpdusrId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 값을 설정한다.
|
||||
* @param lastUpdusrId String
|
||||
*/
|
||||
public void setLastUpdusrId(String lastUpdusrId) {
|
||||
this.lastUpdusrId = lastUpdusrId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
package egovframework.com.ssi.syi.iis.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계기관 VO 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcInsttVO extends CntcInstt implements Serializable {
|
||||
|
||||
/** 검색조건 */
|
||||
private String searchCondition = "";
|
||||
|
||||
/** 검색Keyword */
|
||||
private String searchKeyword = "";
|
||||
|
||||
/** 검색사용여부 */
|
||||
private String searchUseYn = "";
|
||||
|
||||
/** 현재페이지 */
|
||||
private int pageIndex = 1;
|
||||
|
||||
/** 페이지갯수 */
|
||||
private int pageUnit = 10;
|
||||
|
||||
/** 페이지사이즈 */
|
||||
private int pageSize = 10;
|
||||
|
||||
/** firstIndex */
|
||||
private int firstIndex = 1;
|
||||
|
||||
/** lastIndex */
|
||||
private int lastIndex = 1;
|
||||
|
||||
/** recordCountPerPage */
|
||||
private int recordCountPerPage = 10;
|
||||
|
||||
/**
|
||||
* searchCondition attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchCondition() {
|
||||
return searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchCondition attribute 값을 설정한다.
|
||||
* @param searchCondition String
|
||||
*/
|
||||
public void setSearchCondition(String searchCondition) {
|
||||
this.searchCondition = searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchKeyword() {
|
||||
return searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 값을 설정한다.
|
||||
* @param searchKeyword String
|
||||
*/
|
||||
public void setSearchKeyword(String searchKeyword) {
|
||||
this.searchKeyword = searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchUseYn() {
|
||||
return searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 값을 설정한다.
|
||||
* @param searchUseYn String
|
||||
*/
|
||||
public void setSearchUseYn(String searchUseYn) {
|
||||
this.searchUseYn = searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 값을 설정한다.
|
||||
* @param pageIndex int
|
||||
*/
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageUnit() {
|
||||
return pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 값을 설정한다.
|
||||
* @param pageUnit int
|
||||
*/
|
||||
public void setPageUnit(int pageUnit) {
|
||||
this.pageUnit = pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 값을 설정한다.
|
||||
* @param pageSize int
|
||||
*/
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getFirstIndex() {
|
||||
return firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 값을 설정한다.
|
||||
* @param firstIndex int
|
||||
*/
|
||||
public void setFirstIndex(int firstIndex) {
|
||||
this.firstIndex = firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getLastIndex() {
|
||||
return lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 값을 설정한다.
|
||||
* @param lastIndex int
|
||||
*/
|
||||
public void setLastIndex(int lastIndex) {
|
||||
this.lastIndex = lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getRecordCountPerPage() {
|
||||
return recordCountPerPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 값을 설정한다.
|
||||
* @param recordCountPerPage int
|
||||
*/
|
||||
public void setRecordCountPerPage(int recordCountPerPage) {
|
||||
this.recordCountPerPage = recordCountPerPage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
package egovframework.com.ssi.syi.iis.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 연계서비스 모델 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcService implements Serializable {
|
||||
|
||||
/*
|
||||
* 기관ID
|
||||
*/
|
||||
private String insttId = "";
|
||||
|
||||
/*
|
||||
* 시스템ID
|
||||
*/
|
||||
private String sysId = "";
|
||||
|
||||
/*
|
||||
* 서비스ID
|
||||
*/
|
||||
private String svcId = "";
|
||||
|
||||
/*
|
||||
* 서비스명
|
||||
*/
|
||||
private String svcNm = "";
|
||||
|
||||
/*
|
||||
* 요청메시지ID
|
||||
*/
|
||||
private String requestMessageId = "";
|
||||
|
||||
/*
|
||||
* 응답메시지ID
|
||||
*/
|
||||
private String rspnsMessageId = "";
|
||||
|
||||
/*
|
||||
* 최초등록자ID
|
||||
*/
|
||||
private String frstRegisterId = "";
|
||||
|
||||
/*
|
||||
* 최종수정자ID
|
||||
*/
|
||||
private String lastUpdusrId = "";
|
||||
|
||||
/**
|
||||
* insttId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getInsttId() {
|
||||
return insttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* insttId attribute 값을 설정한다.
|
||||
* @param insttId String
|
||||
*/
|
||||
public void setInsttId(String insttId) {
|
||||
this.insttId = insttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* sysId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSysId() {
|
||||
return sysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* sysId attribute 값을 설정한다.
|
||||
* @param sysId String
|
||||
*/
|
||||
public void setSysId(String sysId) {
|
||||
this.sysId = sysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* svcId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSvcId() {
|
||||
return svcId;
|
||||
}
|
||||
|
||||
/**
|
||||
* svcId attribute 값을 설정한다.
|
||||
* @param svcId String
|
||||
*/
|
||||
public void setSvcId(String svcId) {
|
||||
this.svcId = svcId;
|
||||
}
|
||||
|
||||
/**
|
||||
* svcNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSvcNm() {
|
||||
return svcNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* svcNm attribute 값을 설정한다.
|
||||
* @param svcNm String
|
||||
*/
|
||||
public void setSvcNm(String svcNm) {
|
||||
this.svcNm = svcNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* requestMessageId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRequestMessageId() {
|
||||
return requestMessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* requestMessageId attribute 값을 설정한다.
|
||||
* @param requestMessageId String
|
||||
*/
|
||||
public void setRequestMessageId(String requestMessageId) {
|
||||
this.requestMessageId = requestMessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* rspnsMessageId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRspnsMessageId() {
|
||||
return rspnsMessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* rspnsMessageId attribute 값을 설정한다.
|
||||
* @param rspnsMessageId String
|
||||
*/
|
||||
public void setRspnsMessageId(String rspnsMessageId) {
|
||||
this.rspnsMessageId = rspnsMessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getFrstRegisterId() {
|
||||
return frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 값을 설정한다.
|
||||
* @param frstRegisterId String
|
||||
*/
|
||||
public void setFrstRegisterId(String frstRegisterId) {
|
||||
this.frstRegisterId = frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getLastUpdusrId() {
|
||||
return lastUpdusrId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 값을 설정한다.
|
||||
* @param lastUpdusrId String
|
||||
*/
|
||||
public void setLastUpdusrId(String lastUpdusrId) {
|
||||
this.lastUpdusrId = lastUpdusrId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
package egovframework.com.ssi.syi.iis.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계기관 VO 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcServiceVO extends CntcService implements Serializable {
|
||||
|
||||
/** 검색조건 */
|
||||
private String searchCondition = "";
|
||||
|
||||
/** 검색Keyword */
|
||||
private String searchKeyword = "";
|
||||
|
||||
/** 검색사용여부 */
|
||||
private String searchUseYn = "";
|
||||
|
||||
/** 현재페이지 */
|
||||
private int pageIndex = 1;
|
||||
|
||||
/** 페이지갯수 */
|
||||
private int pageUnit = 10;
|
||||
|
||||
/** 페이지사이즈 */
|
||||
private int pageSize = 10;
|
||||
|
||||
/** firstIndex */
|
||||
private int firstIndex = 1;
|
||||
|
||||
/** lastIndex */
|
||||
private int lastIndex = 1;
|
||||
|
||||
/** recordCountPerPage */
|
||||
private int recordCountPerPage = 10;
|
||||
|
||||
/**
|
||||
* searchCondition attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchCondition() {
|
||||
return searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchCondition attribute 값을 설정한다.
|
||||
* @param searchCondition String
|
||||
*/
|
||||
public void setSearchCondition(String searchCondition) {
|
||||
this.searchCondition = searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchKeyword() {
|
||||
return searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 값을 설정한다.
|
||||
* @param searchKeyword String
|
||||
*/
|
||||
public void setSearchKeyword(String searchKeyword) {
|
||||
this.searchKeyword = searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchUseYn() {
|
||||
return searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 값을 설정한다.
|
||||
* @param searchUseYn String
|
||||
*/
|
||||
public void setSearchUseYn(String searchUseYn) {
|
||||
this.searchUseYn = searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 값을 설정한다.
|
||||
* @param pageIndex int
|
||||
*/
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageUnit() {
|
||||
return pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 값을 설정한다.
|
||||
* @param pageUnit int
|
||||
*/
|
||||
public void setPageUnit(int pageUnit) {
|
||||
this.pageUnit = pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 값을 설정한다.
|
||||
* @param pageSize int
|
||||
*/
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getFirstIndex() {
|
||||
return firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 값을 설정한다.
|
||||
* @param firstIndex int
|
||||
*/
|
||||
public void setFirstIndex(int firstIndex) {
|
||||
this.firstIndex = firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getLastIndex() {
|
||||
return lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 값을 설정한다.
|
||||
* @param lastIndex int
|
||||
*/
|
||||
public void setLastIndex(int lastIndex) {
|
||||
this.lastIndex = lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getRecordCountPerPage() {
|
||||
return recordCountPerPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 값을 설정한다.
|
||||
* @param recordCountPerPage int
|
||||
*/
|
||||
public void setRecordCountPerPage(int recordCountPerPage) {
|
||||
this.recordCountPerPage = recordCountPerPage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
package egovframework.com.ssi.syi.iis.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 연계시스템 모델 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcSystem implements Serializable {
|
||||
|
||||
/*
|
||||
* 기관ID
|
||||
*/
|
||||
private String insttId = "";
|
||||
|
||||
/*
|
||||
* 시스템ID
|
||||
*/
|
||||
private String sysId = "";
|
||||
|
||||
/*
|
||||
* 시스템명
|
||||
*/
|
||||
private String sysNm = "";
|
||||
|
||||
/*
|
||||
* 시스템IP
|
||||
*/
|
||||
private String sysIp = "";
|
||||
|
||||
/*
|
||||
* 최초등록자ID
|
||||
*/
|
||||
private String frstRegisterId = "";
|
||||
|
||||
/*
|
||||
* 최종수정자ID
|
||||
*/
|
||||
private String lastUpdusrId = "";
|
||||
|
||||
/**
|
||||
* insttId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getInsttId() {
|
||||
return insttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* insttId attribute 값을 설정한다.
|
||||
* @param insttId String
|
||||
*/
|
||||
public void setInsttId(String insttId) {
|
||||
this.insttId = insttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* sysId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSysId() {
|
||||
return sysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* sysId attribute 값을 설정한다.
|
||||
* @param sysId String
|
||||
*/
|
||||
public void setSysId(String sysId) {
|
||||
this.sysId = sysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* sysNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSysNm() {
|
||||
return sysNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* sysNm attribute 값을 설정한다.
|
||||
* @param sysNm String
|
||||
*/
|
||||
public void setSysNm(String sysNm) {
|
||||
this.sysNm = sysNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* sysIp attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSysIp() {
|
||||
return sysIp;
|
||||
}
|
||||
|
||||
/**
|
||||
* sysIp attribute 값을 설정한다.
|
||||
* @param sysIp String
|
||||
*/
|
||||
public void setSysIp(String sysIp) {
|
||||
this.sysIp = sysIp;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getFrstRegisterId() {
|
||||
return frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 값을 설정한다.
|
||||
* @param frstRegisterId String
|
||||
*/
|
||||
public void setFrstRegisterId(String frstRegisterId) {
|
||||
this.frstRegisterId = frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getLastUpdusrId() {
|
||||
return lastUpdusrId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 값을 설정한다.
|
||||
* @param lastUpdusrId String
|
||||
*/
|
||||
public void setLastUpdusrId(String lastUpdusrId) {
|
||||
this.lastUpdusrId = lastUpdusrId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
package egovframework.com.ssi.syi.iis.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계기관 VO 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcSystemVO extends CntcSystem implements Serializable {
|
||||
|
||||
/** 검색조건 */
|
||||
private String searchCondition = "";
|
||||
|
||||
/** 검색Keyword */
|
||||
private String searchKeyword = "";
|
||||
|
||||
/** 검색사용여부 */
|
||||
private String searchUseYn = "";
|
||||
|
||||
/** 현재페이지 */
|
||||
private int pageIndex = 1;
|
||||
|
||||
/** 페이지갯수 */
|
||||
private int pageUnit = 10;
|
||||
|
||||
/** 페이지사이즈 */
|
||||
private int pageSize = 10;
|
||||
|
||||
/** firstIndex */
|
||||
private int firstIndex = 1;
|
||||
|
||||
/** lastIndex */
|
||||
private int lastIndex = 1;
|
||||
|
||||
/** recordCountPerPage */
|
||||
private int recordCountPerPage = 10;
|
||||
|
||||
/**
|
||||
* searchCondition attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchCondition() {
|
||||
return searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchCondition attribute 값을 설정한다.
|
||||
* @param searchCondition String
|
||||
*/
|
||||
public void setSearchCondition(String searchCondition) {
|
||||
this.searchCondition = searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchKeyword() {
|
||||
return searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 값을 설정한다.
|
||||
* @param searchKeyword String
|
||||
*/
|
||||
public void setSearchKeyword(String searchKeyword) {
|
||||
this.searchKeyword = searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchUseYn() {
|
||||
return searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 값을 설정한다.
|
||||
* @param searchUseYn String
|
||||
*/
|
||||
public void setSearchUseYn(String searchUseYn) {
|
||||
this.searchUseYn = searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 값을 설정한다.
|
||||
* @param pageIndex int
|
||||
*/
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageUnit() {
|
||||
return pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 값을 설정한다.
|
||||
* @param pageUnit int
|
||||
*/
|
||||
public void setPageUnit(int pageUnit) {
|
||||
this.pageUnit = pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 값을 설정한다.
|
||||
* @param pageSize int
|
||||
*/
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getFirstIndex() {
|
||||
return firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 값을 설정한다.
|
||||
* @param firstIndex int
|
||||
*/
|
||||
public void setFirstIndex(int firstIndex) {
|
||||
this.firstIndex = firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getLastIndex() {
|
||||
return lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 값을 설정한다.
|
||||
* @param lastIndex int
|
||||
*/
|
||||
public void setLastIndex(int lastIndex) {
|
||||
this.lastIndex = lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getRecordCountPerPage() {
|
||||
return recordCountPerPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 값을 설정한다.
|
||||
* @param recordCountPerPage int
|
||||
*/
|
||||
public void setRecordCountPerPage(int recordCountPerPage) {
|
||||
this.recordCountPerPage = recordCountPerPage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
package egovframework.com.ssi.syi.iis.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계기관에 관한 서비스 인터페이스 클래스를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public interface EgovCntcInsttService {
|
||||
|
||||
/**
|
||||
* 연계기관을 삭제한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteCntcInstt(CntcInstt cntcInstt) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계시스템을 삭제한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteCntcSystem(CntcSystem cntcSystem) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계서비스를 삭제한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteCntcService(CntcService cntcService) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계기관을 등록한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
void insertCntcInstt(CntcInstt cntcInstt) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계시스템을 등록한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
void insertCntcSystem(CntcSystem cntcSystem) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계서비스를 등록한다.
|
||||
* @param cntcService
|
||||
* @throws Exception
|
||||
*/
|
||||
void insertCntcService(CntcService cntcService) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계기관 상세항목을 조회한다.
|
||||
* @param cntcInstt
|
||||
* @return CntcInstt(연계기관)
|
||||
* @throws Exception
|
||||
*/
|
||||
CntcInstt selectCntcInsttDetail(CntcInstt cntcInstt) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계시스템 상세항목을 조회한다.
|
||||
* @param cntcInstt
|
||||
* @return CntcInstt(연계기관)
|
||||
* @throws Exception
|
||||
*/
|
||||
CntcSystem selectCntcSystemDetail(CntcSystem cntcSystem) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계서비스 상세항목을 조회한다.
|
||||
* @param cntcInstt
|
||||
* @return CntcInstt(연계기관)
|
||||
* @throws Exception
|
||||
*/
|
||||
CntcService selectCntcServiceDetail(CntcService cntcService) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계기관 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계기관 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
List selectCntcInsttList(CntcInsttVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계기관 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계기관 총 갯수)
|
||||
*/
|
||||
int selectCntcInsttListTotCnt(CntcInsttVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계시스템 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계시스템 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
List selectCntcSystemList(CntcSystemVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계시스템 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계시스템 총 갯수)
|
||||
*/
|
||||
int selectCntcSystemListTotCnt(CntcSystemVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계서비스 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계시스템 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
List selectCntcServiceList(CntcServiceVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계서비스 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계시스템 총 갯수)
|
||||
*/
|
||||
int selectCntcServiceListTotCnt(CntcServiceVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계기관을 수정한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateCntcInstt(CntcInstt cntcInstt) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계시스템을 수정한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateCntcSystem(CntcSystem cntcSystem) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계서비스 수정한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateCntcService(CntcService cntcService) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
package egovframework.com.ssi.syi.iis.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcInstt;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcInsttVO;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcService;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcServiceVO;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcSystem;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcSystemVO;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계기관에 대한 데이터 접근 클래스를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
@Repository("CntcInsttDAO")
|
||||
public class CntcInsttDAO extends EgovComAbstractDAO {
|
||||
|
||||
|
||||
/**
|
||||
* 연계기관을 삭제한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteCntcInstt(CntcInstt cntcInstt) throws Exception {
|
||||
delete("CntcInsttDAO.deleteCntcInstt", cntcInstt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템을 삭제한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteCntcSystem(CntcSystem cntcSystem) throws Exception {
|
||||
delete("CntcInsttDAO.deleteCntcSystem", cntcSystem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스를 삭제한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteCntcService(CntcService cntcService) throws Exception {
|
||||
delete("CntcInsttDAO.deleteCntcService", cntcService);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관을 등록한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
public void insertCntcInstt(CntcInstt cntcInstt) throws Exception {
|
||||
insert("CntcInsttDAO.insertCntcInstt", cntcInstt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템을 등록한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
public void insertCntcSystem(CntcSystem cntcSystem) throws Exception {
|
||||
insert("CntcInsttDAO.insertCntcSystem", cntcSystem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스를 등록한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
public void insertCntcService(CntcService cntcService) throws Exception {
|
||||
insert("CntcInsttDAO.insertCntcService", cntcService);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관 상세항목을 조회한다.
|
||||
* @param cntcInstt
|
||||
* @return CntcInstt(연계기관)
|
||||
*/
|
||||
public CntcInstt selectCntcInsttDetail(CntcInstt cntcInstt) throws Exception {
|
||||
return (CntcInstt) selectByPk("CntcInsttDAO.selectCntcInsttDetail", cntcInstt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템 상세항목을 조회한다.
|
||||
* @param cntcInstt
|
||||
* @return CntcInstt(연계기관)
|
||||
*/
|
||||
public CntcSystem selectCntcSystemDetail(CntcSystem cntcSystem) throws Exception {
|
||||
return (CntcSystem) selectByPk("CntcInsttDAO.selectCntcSystemDetail", cntcSystem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스 상세항목을 조회한다.
|
||||
* @param cntcInstt
|
||||
* @return CntcInstt(연계기관)
|
||||
*/
|
||||
public CntcService selectCntcServiceDetail(CntcService cntcService) throws Exception {
|
||||
return (CntcService) selectByPk("CntcInsttDAO.selectCntcServiceDetail", cntcService);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계기관 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List selectCntcInsttList(CntcInsttVO searchVO) throws Exception {
|
||||
return list("CntcInsttDAO.selectCntcInsttList", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계기관 총 갯수)
|
||||
*/
|
||||
public int selectCntcInsttListTotCnt(CntcInsttVO searchVO) throws Exception {
|
||||
return (Integer)getSqlMapClientTemplate().queryForObject("CntcInsttDAO.selectCntcInsttListTotCnt", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계시스템 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List selectCntcSystemList(CntcSystemVO searchVO) throws Exception {
|
||||
return list("CntcInsttDAO.selectCntcSystemList", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계시스템 총 갯수)
|
||||
*/
|
||||
public int selectCntcSystemListTotCnt(CntcSystemVO searchVO) throws Exception {
|
||||
return (Integer)getSqlMapClientTemplate().queryForObject("CntcInsttDAO.selectCntcSystemListTotCnt", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계서비스 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List selectCntcServiceList(CntcServiceVO searchVO) throws Exception {
|
||||
return list("CntcInsttDAO.selectCntcServiceList", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계서비스 총 갯수)
|
||||
*/
|
||||
public int selectCntcServiceListTotCnt(CntcServiceVO searchVO) throws Exception {
|
||||
return (Integer)getSqlMapClientTemplate().queryForObject("CntcInsttDAO.selectCntcServiceListTotCnt", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관을 수정한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateCntcInstt(CntcInstt cntcInstt) throws Exception {
|
||||
update("CntcInsttDAO.updateCntcInstt", cntcInstt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템을 수정한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateCntcSystem(CntcSystem cntcSystem) throws Exception {
|
||||
update("CntcInsttDAO.updateCntcSystem", cntcSystem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템을 수정한다.
|
||||
* @param cntcInstt
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateCntcService(CntcService cntcService) throws Exception {
|
||||
update("CntcInsttDAO.updateCntcService", cntcService);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,174 @@
|
|||
package egovframework.com.ssi.syi.iis.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.com.ssi.syi.iis.service.CntcInstt;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcInsttVO;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcService;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcServiceVO;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcSystem;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcSystemVO;
|
||||
import egovframework.com.ssi.syi.iis.service.EgovCntcInsttService;
|
||||
import egovframework.rte.fdl.cmmn.AbstractServiceImpl;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계기관에 대한 서비스 구현클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
@Service("CntcInsttService")
|
||||
public class EgovCntcInsttServiceImpl extends AbstractServiceImpl implements EgovCntcInsttService {
|
||||
|
||||
|
||||
@Resource(name="CntcInsttDAO")
|
||||
private CntcInsttDAO cntcInsttDAO;
|
||||
|
||||
/**
|
||||
* 연계기관을 삭제한다.
|
||||
*/
|
||||
public void deleteCntcInstt(CntcInstt cntcInstt) throws Exception {
|
||||
cntcInsttDAO.deleteCntcInstt(cntcInstt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템을 삭제한다.
|
||||
*/
|
||||
public void deleteCntcSystem(CntcSystem cntcSystem) throws Exception {
|
||||
cntcInsttDAO.deleteCntcSystem(cntcSystem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스를 삭제한다.
|
||||
*/
|
||||
public void deleteCntcService(CntcService cntcService) throws Exception {
|
||||
cntcInsttDAO.deleteCntcService(cntcService);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 연계기관을 등록한다.
|
||||
*/
|
||||
public void insertCntcInstt(CntcInstt cntcInstt) throws Exception {
|
||||
cntcInsttDAO.insertCntcInstt(cntcInstt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템을 등록한다.
|
||||
*/
|
||||
public void insertCntcSystem(CntcSystem cntcSystem) throws Exception {
|
||||
cntcInsttDAO.insertCntcSystem(cntcSystem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스를 등록한다.
|
||||
*/
|
||||
public void insertCntcService(CntcService cntcService) throws Exception {
|
||||
cntcInsttDAO.insertCntcService(cntcService);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관 상세항목을 조회한다.
|
||||
*/
|
||||
public CntcInstt selectCntcInsttDetail(CntcInstt cntcInstt) throws Exception {
|
||||
CntcInstt ret = (CntcInstt)cntcInsttDAO.selectCntcInsttDetail(cntcInstt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템 상세항목을 조회한다.
|
||||
*/
|
||||
public CntcSystem selectCntcSystemDetail(CntcSystem cntcSystem) throws Exception {
|
||||
CntcSystem ret = (CntcSystem)cntcInsttDAO.selectCntcSystemDetail(cntcSystem);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스 상세항목을 조회한다.
|
||||
*/
|
||||
public CntcService selectCntcServiceDetail(CntcService cntcService) throws Exception {
|
||||
CntcService ret = (CntcService)cntcInsttDAO.selectCntcServiceDetail(cntcService);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관 목록을 조회한다.
|
||||
*/
|
||||
public List selectCntcInsttList(CntcInsttVO searchVO) throws Exception {
|
||||
return cntcInsttDAO.selectCntcInsttList(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관 총 갯수를 조회한다.
|
||||
*/
|
||||
public int selectCntcInsttListTotCnt(CntcInsttVO searchVO) throws Exception {
|
||||
return cntcInsttDAO.selectCntcInsttListTotCnt(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템 목록을 조회한다.
|
||||
*/
|
||||
public List selectCntcSystemList(CntcSystemVO searchVO) throws Exception {
|
||||
return cntcInsttDAO.selectCntcSystemList(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템 총 갯수를 조회한다.
|
||||
*/
|
||||
public int selectCntcSystemListTotCnt(CntcSystemVO searchVO) throws Exception {
|
||||
return cntcInsttDAO.selectCntcSystemListTotCnt(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스 목록을 조회한다.
|
||||
*/
|
||||
public List selectCntcServiceList(CntcServiceVO searchVO) throws Exception {
|
||||
return cntcInsttDAO.selectCntcServiceList(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스 총 갯수를 조회한다.
|
||||
*/
|
||||
public int selectCntcServiceListTotCnt(CntcServiceVO searchVO) throws Exception {
|
||||
return cntcInsttDAO.selectCntcServiceListTotCnt(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관을 수정한다.
|
||||
*/
|
||||
public void updateCntcInstt(CntcInstt cntcInstt) throws Exception {
|
||||
cntcInsttDAO.updateCntcInstt(cntcInstt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템을 수정한다.
|
||||
*/
|
||||
public void updateCntcSystem(CntcSystem cntcSystem) throws Exception {
|
||||
cntcInsttDAO.updateCntcSystem(cntcSystem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스를 수정한다.
|
||||
*/
|
||||
public void updateCntcService(CntcService cntcService) throws Exception {
|
||||
cntcInsttDAO.updateCntcService(cntcService);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,704 @@
|
|||
package egovframework.com.ssi.syi.iis.web;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springmodules.validation.commons.DefaultBeanValidator;
|
||||
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.annotation.IncludedInfo;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcInstt;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcInsttVO;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcService;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcServiceVO;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcSystem;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcSystemVO;
|
||||
import egovframework.com.ssi.syi.iis.service.EgovCntcInsttService;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessageVO;
|
||||
import egovframework.com.ssi.syi.ims.service.EgovCntcMessageService;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계기관 관리에 관한 요청을 받아 서비스 클래스로 요청을 전달하고 서비스클래스에서 처리한 결과를 웹 화면으로 전달을 위한 Controller를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
* 2011.8.26 정진오 IncludedInfo annotation 추가
|
||||
* 2011.09.14 서준식 연계시스템 수정시 입력 데이터 표신 안되는 문제 수정
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Controller
|
||||
public class EgovCntcInsttController {
|
||||
|
||||
|
||||
|
||||
|
||||
@Resource(name = "CntcInsttService")
|
||||
private EgovCntcInsttService cntcInsttService;
|
||||
|
||||
@Resource(name = "CntcMessageService")
|
||||
private EgovCntcMessageService cntcMessageService;
|
||||
|
||||
/** EgovIdGnrService */
|
||||
@Resource(name="egovCntcInsttIdGnrService")
|
||||
private EgovIdGnrService idgenService;
|
||||
|
||||
/** EgovIdGnrService */
|
||||
@Resource(name="egovCntcSystemIdGnrService")
|
||||
private EgovIdGnrService idgenServiceSys;
|
||||
|
||||
/** EgovIdGnrService */
|
||||
@Resource(name="egovCntcServiceIdGnrService")
|
||||
private EgovIdGnrService idgenServiceSvc;
|
||||
|
||||
/** EgovPropertyService */
|
||||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
@Autowired
|
||||
private DefaultBeanValidator beanValidator;
|
||||
|
||||
/**
|
||||
* 연계기관을 삭제한다.
|
||||
* @param loginVO
|
||||
* @param cntcInstt
|
||||
* @param model
|
||||
* @return "forward:/ssi/syi/iis/EgovCcmAdministCodeList.do"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/iis/removeCntcInstt.do")
|
||||
public String deleteCntcInstt (CntcInstt cntcInstt
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
cntcInsttService.deleteCntcInstt(cntcInstt);
|
||||
return "forward:/ssi/syi/iis/getCntcInsttList.do";
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템을 삭제한다.
|
||||
* @param loginVO
|
||||
* @param cntcSystem
|
||||
* @param model
|
||||
* @return "forward:/ssi/syi/iis/EgovCcmAdministCodeList.do"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/iis/removeCntcSystem.do")
|
||||
public String deleteCntcSystem(CntcSystem cntcSystem
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
cntcInsttService.deleteCntcSystem(cntcSystem);
|
||||
return "forward:/ssi/syi/iis/getCntcInsttList.do";
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스를 삭제한다.
|
||||
* @param loginVO
|
||||
* @param cntcSystem
|
||||
* @param model
|
||||
* @return "forward:/ssi/syi/iis/EgovCcmAdministCodeList.do"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/iis/removeCntcService.do")
|
||||
public String deleteCntcService(CntcService cntcService
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
cntcInsttService.deleteCntcService(cntcService);
|
||||
return "forward:/ssi/syi/iis/getCntcInsttList.do";
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관을 등록한다.
|
||||
* @param loginVO
|
||||
* @param cntcInstt
|
||||
* @param bindingResult
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/iis/EgovCntcInsttRegist"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/iis/addCntcInstt.do")
|
||||
public String insertCntcInstt (@ModelAttribute("cntcInstt") CntcInstt cntcInstt
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcInsttRegist";
|
||||
} else if (sCmd.equals("Regist")) {
|
||||
|
||||
beanValidator.validate(cntcInstt, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcInsttRegist";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
cntcInstt.setFrstRegisterId(uniqId);
|
||||
|
||||
// ID Generation
|
||||
String sInsttId = idgenService.getNextStringId();
|
||||
cntcInstt.setInsttId(sInsttId);
|
||||
|
||||
cntcInsttService.insertCntcInstt(cntcInstt);
|
||||
|
||||
return "forward:/ssi/syi/iis/getCntcInsttList.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/iis/getCntcInsttList.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템을 등록한다.
|
||||
* @param loginVO
|
||||
* @param cntcSystem
|
||||
* @param bindingResult
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/iis/EgovCntcSystemRegist"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/iis/addCntcSystem.do")
|
||||
public String insertCntcSystem(@ModelAttribute("cntcSystem") CntcSystem cntcSystem
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = (List)cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcSystemRegist";
|
||||
} else if (sCmd.equals("Regist")) {
|
||||
|
||||
beanValidator.validate(cntcSystem, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = (List)cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcSystemRegist";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
cntcSystem.setFrstRegisterId(uniqId);
|
||||
|
||||
// ID Generation
|
||||
String sSysId = idgenServiceSys.getNextStringId();
|
||||
cntcSystem.setSysId(sSysId);
|
||||
|
||||
cntcInsttService.insertCntcSystem(cntcSystem);
|
||||
return "forward:/ssi/syi/iis/getCntcInsttDetail.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/iis/getCntcInsttDetail.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스를 등록한다.
|
||||
* @param loginVO
|
||||
* @param cntcService
|
||||
* @param bindingResult
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/iis/EgovCntcServiceRegist"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/iis/addCntcService.do")
|
||||
public String insertCntcService(@ModelAttribute("cntcService") CntcService cntcService
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
// 연계시스템 리스트박스 데이터
|
||||
CntcSystemVO searchCntcSystemVO;
|
||||
searchCntcSystemVO = new CntcSystemVO();
|
||||
searchCntcSystemVO.setRecordCountPerPage(999999);
|
||||
searchCntcSystemVO.setFirstIndex(0);
|
||||
searchCntcSystemVO.setSearchCondition("CodeList");
|
||||
if (cntcService.getInsttId().equals("")) {
|
||||
if (cntcInsttList.size() > 0) {
|
||||
EgovMap emp = (EgovMap)cntcInsttList.get(0);
|
||||
cntcService.setInsttId(emp.get("insttId").toString());
|
||||
}
|
||||
}
|
||||
searchCntcSystemVO.setInsttId(cntcService.getInsttId());
|
||||
List cntcSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcSystemList", cntcSystemList);
|
||||
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcServiceRegist";
|
||||
} else if (sCmd.equals("Regist")) {
|
||||
|
||||
beanValidator.validate(cntcService, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
// 연계시스템 리스트박스 데이터
|
||||
CntcSystemVO searchCntcSystemVO;
|
||||
searchCntcSystemVO = new CntcSystemVO();
|
||||
searchCntcSystemVO.setRecordCountPerPage(999999);
|
||||
searchCntcSystemVO.setFirstIndex(0);
|
||||
searchCntcSystemVO.setSearchCondition("CodeList");
|
||||
if (cntcService.getInsttId().equals("")) {
|
||||
if (cntcInsttList.size() > 0) {
|
||||
EgovMap emp = (EgovMap)cntcInsttList.get(0);
|
||||
cntcService.setInsttId(emp.get("insttId").toString());
|
||||
}
|
||||
}
|
||||
searchCntcSystemVO.setInsttId(cntcService.getInsttId());
|
||||
List cntcSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcSystemList", cntcSystemList);
|
||||
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcServiceRegist";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
cntcService.setFrstRegisterId(uniqId);
|
||||
|
||||
// ID Generation
|
||||
String sSvcId = idgenServiceSvc.getNextStringId();
|
||||
cntcService.setSvcId(sSvcId);
|
||||
|
||||
cntcInsttService.insertCntcService(cntcService);
|
||||
return "forward:/ssi/syi/iis/getCntcInsttDetail.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/iis/getCntcInsttDetail.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관 상세내역을 조회한다.
|
||||
* @param loginVO
|
||||
* @param cntcInstt
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/iis/EgovCcmCntcInsttDetail"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/iis/getCntcInsttDetail.do")
|
||||
public String selectCntcInsttDetail (@ModelAttribute("cntcInstt") CntcInstt cntcInstt
|
||||
, @ModelAttribute("cntcSystemVO") CntcSystemVO cntcSystemVO
|
||||
, @ModelAttribute("cntcServiceVO") CntcServiceVO cntcServiceVO
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
/* 연계기관 상세 */
|
||||
CntcInstt vo = cntcInsttService.selectCntcInsttDetail(cntcInstt);
|
||||
model.addAttribute("result", vo);
|
||||
|
||||
/* 연계시스템 리스트 */
|
||||
cntcSystemVO.setRecordCountPerPage(999999);
|
||||
cntcSystemVO.setFirstIndex(0);
|
||||
cntcSystemVO.setSearchCondition("CodeList");
|
||||
List cntcSystemList = cntcInsttService.selectCntcSystemList(cntcSystemVO);
|
||||
model.addAttribute("cntcSystemList", cntcSystemList);
|
||||
|
||||
/* 연계서비스 리스트 */
|
||||
cntcServiceVO.setRecordCountPerPage(999999);
|
||||
cntcServiceVO.setFirstIndex(0);
|
||||
cntcServiceVO.setSearchCondition("CodeList_InsttId");
|
||||
List cntcServiceList = cntcInsttService.selectCntcServiceList(cntcServiceVO);
|
||||
model.addAttribute("cntcServiceList", cntcServiceList);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcInsttDetail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관 목록을 조회한다.
|
||||
* @param loginVO
|
||||
* @param searchVO
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/iis/EgovCntcInsttList"
|
||||
* @throws Exception
|
||||
*/
|
||||
@IncludedInfo(name="연계기관관리", listUrl="/ssi/syi/iis/getCntcInsttList.do", order = 1240,gid = 70)
|
||||
@RequestMapping(value="/ssi/syi/iis/getCntcInsttList.do")
|
||||
public String selectCntcInsttList (@ModelAttribute("searchVO") CntcInsttVO searchVO
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
/** EgovPropertyService.sample */
|
||||
searchVO.setPageUnit(propertiesService.getInt("pageUnit"));
|
||||
searchVO.setPageSize(propertiesService.getInt("pageSize"));
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
|
||||
paginationInfo.setPageSize(searchVO.getPageSize());
|
||||
|
||||
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List CmmnCodeList = cntcInsttService.selectCntcInsttList(searchVO);
|
||||
model.addAttribute("resultList", CmmnCodeList);
|
||||
|
||||
int totCnt = cntcInsttService.selectCntcInsttListTotCnt(searchVO);
|
||||
paginationInfo.setTotalRecordCount(totCnt);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcInsttList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계기관을 수정한다.
|
||||
* @param loginVO
|
||||
* @param cntcInstt
|
||||
* @param bindingResult
|
||||
* @param commandMap
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/iis/EgovCntcInsttUpdt"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/iis/updateCntcInstt.do")
|
||||
public String updateCntcInstt (@ModelAttribute("cntcInstt") CntcInstt cntcInstt
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
CntcInstt vo = cntcInsttService.selectCntcInsttDetail(cntcInstt);
|
||||
model.addAttribute("cntcInstt", vo);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcInsttUpdt";
|
||||
} else if (sCmd.equals("Modify")) {
|
||||
beanValidator.validate(cntcInstt, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
CntcInstt vo = cntcInsttService.selectCntcInsttDetail(cntcInstt);
|
||||
model.addAttribute("cntcInstt", vo);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcInsttUpdt";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
|
||||
cntcInstt.setLastUpdusrId(uniqId);
|
||||
cntcInsttService.updateCntcInstt(cntcInstt);
|
||||
return "forward:/ssi/syi/iis/getCntcInsttList.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/iis/getCntcInsttList.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계시스템을 수정한다.
|
||||
* @param loginVO
|
||||
* @param cntcInstt
|
||||
* @param bindingResult
|
||||
* @param commandMap
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/iis/EgovCntcSystemModify"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/iis/updateCntcSystem.do")
|
||||
public String updateCntcSystem(@ModelAttribute("cntcSystem") CntcSystem cntcSystem
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
// 연계시스템 리스트박스 데이터 2011.09.14
|
||||
CntcSystemVO searchCntcSystemVO;
|
||||
searchCntcSystemVO = new CntcSystemVO();
|
||||
searchCntcSystemVO.setRecordCountPerPage(999999);
|
||||
searchCntcSystemVO.setFirstIndex(0);
|
||||
searchCntcSystemVO.setSearchCondition("CodeList");
|
||||
if (cntcSystem.getInsttId().equals("")) {
|
||||
if (cntcInsttList.size() > 0) {
|
||||
EgovMap emp = (EgovMap)cntcInsttList.get(0);
|
||||
cntcSystem.setInsttId(emp.get("insttId").toString());
|
||||
}
|
||||
}
|
||||
searchCntcSystemVO.setInsttId(cntcSystem.getInsttId());
|
||||
List cntcSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcSystemList", cntcSystemList);
|
||||
|
||||
// 연계메시지 리스트박스 데이터 2011.09.14
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
CntcSystem vo = cntcInsttService.selectCntcSystemDetail(cntcSystem);
|
||||
model.addAttribute("cntcSystem", vo);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcSystemUpdt";
|
||||
} else if (sCmd.equals("Modify")) {
|
||||
beanValidator.validate(cntcSystem, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
// 연계시스템 리스트박스 데이터 2011.09.14
|
||||
CntcSystemVO searchCntcSystemVO;
|
||||
searchCntcSystemVO = new CntcSystemVO();
|
||||
searchCntcSystemVO.setRecordCountPerPage(999999);
|
||||
searchCntcSystemVO.setFirstIndex(0);
|
||||
searchCntcSystemVO.setSearchCondition("CodeList");
|
||||
if (cntcSystem.getInsttId().equals("")) {
|
||||
if (cntcInsttList.size() > 0) {
|
||||
EgovMap emp = (EgovMap)cntcInsttList.get(0);
|
||||
cntcSystem.setInsttId(emp.get("insttId").toString());
|
||||
}
|
||||
}
|
||||
searchCntcSystemVO.setInsttId(cntcSystem.getInsttId());
|
||||
List cntcSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcSystemList", cntcSystemList);
|
||||
|
||||
// 연계메시지 리스트박스 데이터 2011.09.14
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
CntcSystem vo = cntcInsttService.selectCntcSystemDetail(cntcSystem);
|
||||
model.addAttribute("cntcSystem", vo);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcSystemUpdt";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
|
||||
cntcSystem.setLastUpdusrId(uniqId);
|
||||
cntcInsttService.updateCntcSystem(cntcSystem);
|
||||
return "forward:/ssi/syi/iis/getCntcInsttList.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/iis/getCntcInsttList.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계서비스를 수정한다.
|
||||
* @param loginVO
|
||||
* @param cntcService
|
||||
* @param bindingResult
|
||||
* @param commandMap
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/iis/EgovCntcServiceModify"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/iis/updateCntcService.do")
|
||||
public String updateCntcService(@ModelAttribute("cntcService") CntcService cntcService
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
// 연계시스템 리스트박스 데이터
|
||||
CntcSystemVO searchCntcSystemVO;
|
||||
searchCntcSystemVO = new CntcSystemVO();
|
||||
searchCntcSystemVO.setRecordCountPerPage(999999);
|
||||
searchCntcSystemVO.setFirstIndex(0);
|
||||
searchCntcSystemVO.setSearchCondition("CodeList");
|
||||
if (cntcService.getInsttId().equals("")) {
|
||||
if (cntcInsttList.size() > 0) {
|
||||
EgovMap emp = (EgovMap)cntcInsttList.get(0);
|
||||
cntcService.setInsttId(emp.get("insttId").toString());
|
||||
}
|
||||
}
|
||||
searchCntcSystemVO.setInsttId(cntcService.getInsttId());
|
||||
List cntcSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcSystemList", cntcSystemList);
|
||||
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
CntcService vo = cntcInsttService.selectCntcServiceDetail(cntcService);
|
||||
model.addAttribute("cntcService", vo);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcServiceUpdt";
|
||||
} else if (sCmd.equals("Modify")) {
|
||||
beanValidator.validate(cntcService, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
// 연계시스템 리스트박스 데이터
|
||||
CntcSystemVO searchCntcSystemVO;
|
||||
searchCntcSystemVO = new CntcSystemVO();
|
||||
searchCntcSystemVO.setRecordCountPerPage(999999);
|
||||
searchCntcSystemVO.setFirstIndex(0);
|
||||
searchCntcSystemVO.setSearchCondition("CodeList");
|
||||
if (cntcService.getInsttId().equals("")) {
|
||||
if (cntcInsttList.size() > 0) {
|
||||
EgovMap emp = (EgovMap)cntcInsttList.get(0);
|
||||
cntcService.setInsttId(emp.get("insttId").toString());
|
||||
}
|
||||
}
|
||||
searchCntcSystemVO.setInsttId(cntcService.getInsttId());
|
||||
List cntcSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcSystemList", cntcSystemList);
|
||||
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
CntcService vo = cntcInsttService.selectCntcServiceDetail(cntcService);
|
||||
model.addAttribute("cntcService", vo);
|
||||
|
||||
return "egovframework/com/ssi/syi/iis/EgovCntcServiceUpdt";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
|
||||
cntcService.setLastUpdusrId(uniqId);
|
||||
cntcInsttService.updateCntcService(cntcService);
|
||||
return "forward:/ssi/syi/iis/getCntcInsttList.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/iis/getCntcInsttList.do";
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Map 내용을 확인한다.
|
||||
* @param commandMap
|
||||
* @return
|
||||
*/
|
||||
public String printParameterMap(Map commandMap){
|
||||
String ret = "";
|
||||
for(Object key:commandMap.keySet()){
|
||||
Object value = commandMap.get(key);
|
||||
|
||||
ret += "key:" + key.toString() + " value:" + value.toString();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
package egovframework.com.ssi.syi.ims.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 연계메시지 모델 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcMessage implements Serializable {
|
||||
|
||||
/*
|
||||
* 연계메시지ID
|
||||
*/
|
||||
private String cntcMessageId = "";
|
||||
|
||||
/*
|
||||
* 연계메시지명
|
||||
*/
|
||||
private String cntcMessageNm = "";
|
||||
|
||||
/*
|
||||
* 상위연계메시지ID
|
||||
*/
|
||||
private String upperCntcMessageId = "";
|
||||
|
||||
/*
|
||||
* 최초등록자ID
|
||||
*/
|
||||
private String frstRegisterId = "";
|
||||
|
||||
/*
|
||||
* 최종수정자ID
|
||||
*/
|
||||
private String lastUpdusrId = "";
|
||||
|
||||
/**
|
||||
* cntcMessageId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntcMessageId() {
|
||||
return cntcMessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcMessageId attribute 값을 설정한다.
|
||||
* @param cntcMessageId String
|
||||
*/
|
||||
public void setCntcMessageId(String cntcMessageId) {
|
||||
this.cntcMessageId = cntcMessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcMessageNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntcMessageNm() {
|
||||
return cntcMessageNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcMessageNm attribute 값을 설정한다.
|
||||
* @param cntcMessageNm String
|
||||
*/
|
||||
public void setCntcMessageNm(String cntcMessageNm) {
|
||||
this.cntcMessageNm = cntcMessageNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* upperCntcMessageId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUpperCntcMessageId() {
|
||||
return upperCntcMessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* upperCntcMessageId attribute 값을 설정한다.
|
||||
* @param upperCntcMessageId String
|
||||
*/
|
||||
public void setUpperCntcMessageId(String upperCntcMessageId) {
|
||||
this.upperCntcMessageId = upperCntcMessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getFrstRegisterId() {
|
||||
return frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 값을 설정한다.
|
||||
* @param frstRegisterId String
|
||||
*/
|
||||
public void setFrstRegisterId(String frstRegisterId) {
|
||||
this.frstRegisterId = frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getLastUpdusrId() {
|
||||
return lastUpdusrId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 값을 설정한다.
|
||||
* @param lastUpdusrId String
|
||||
*/
|
||||
public void setLastUpdusrId(String lastUpdusrId) {
|
||||
this.lastUpdusrId = lastUpdusrId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
package egovframework.com.ssi.syi.ims.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 연계메시지항목 모델 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcMessageItem implements Serializable {
|
||||
/*
|
||||
* 연계메시지ID
|
||||
*/
|
||||
private String cntcMessageId = "";
|
||||
|
||||
/*
|
||||
* 항목ID
|
||||
*/
|
||||
private String itemId = "";
|
||||
|
||||
/*
|
||||
* 항목명
|
||||
*/
|
||||
private String itemNm = "";
|
||||
|
||||
/*
|
||||
* 항목타입
|
||||
*/
|
||||
private String itemType = "";
|
||||
|
||||
/*
|
||||
* 항목길이
|
||||
*/
|
||||
private int itemLt = 0 ;
|
||||
|
||||
/*
|
||||
* 최초등록자ID
|
||||
*/
|
||||
private String frstRegisterId = "";
|
||||
|
||||
/*
|
||||
* 최종수정자ID
|
||||
*/
|
||||
private String lastUpdusrId = "";
|
||||
|
||||
/**
|
||||
* cntcMessageId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntcMessageId() {
|
||||
return cntcMessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcMessageId attribute 값을 설정한다.
|
||||
* @param cntcMessageId String
|
||||
*/
|
||||
public void setCntcMessageId(String cntcMessageId) {
|
||||
this.cntcMessageId = cntcMessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* itemId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
/**
|
||||
* itemId attribute 값을 설정한다.
|
||||
* @param itemId String
|
||||
*/
|
||||
public void setItemId(String itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
/**
|
||||
* itemNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getItemNm() {
|
||||
return itemNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* itemNm attribute 값을 설정한다.
|
||||
* @param itemNm String
|
||||
*/
|
||||
public void setItemNm(String itemNm) {
|
||||
this.itemNm = itemNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* itemType attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getItemType() {
|
||||
return itemType;
|
||||
}
|
||||
|
||||
/**
|
||||
* itemType attribute 값을 설정한다.
|
||||
* @param itemType String
|
||||
*/
|
||||
public void setItemType(String itemType) {
|
||||
this.itemType = itemType;
|
||||
}
|
||||
|
||||
/**
|
||||
* itemLt attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getItemLt() {
|
||||
return itemLt;
|
||||
}
|
||||
|
||||
/**
|
||||
* itemLt attribute 값을 설정한다.
|
||||
* @param itemLt int
|
||||
*/
|
||||
public void setItemLt(int itemLt) {
|
||||
this.itemLt = itemLt;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getFrstRegisterId() {
|
||||
return frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 값을 설정한다.
|
||||
* @param frstRegisterId String
|
||||
*/
|
||||
public void setFrstRegisterId(String frstRegisterId) {
|
||||
this.frstRegisterId = frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getLastUpdusrId() {
|
||||
return lastUpdusrId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 값을 설정한다.
|
||||
* @param lastUpdusrId String
|
||||
*/
|
||||
public void setLastUpdusrId(String lastUpdusrId) {
|
||||
this.lastUpdusrId = lastUpdusrId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
package egovframework.com.ssi.syi.ims.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계메시지항목 VO 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcMessageItemVO extends CntcMessageItem implements Serializable {
|
||||
|
||||
/** 검색조건 */
|
||||
private String searchCondition = "";
|
||||
|
||||
/** 검색Keyword */
|
||||
private String searchKeyword = "";
|
||||
|
||||
/** 검색사용여부 */
|
||||
private String searchUseYn = "";
|
||||
|
||||
/** 현재페이지 */
|
||||
private int pageIndex = 1;
|
||||
|
||||
/** 페이지갯수 */
|
||||
private int pageUnit = 10;
|
||||
|
||||
/** 페이지사이즈 */
|
||||
private int pageSize = 10;
|
||||
|
||||
/** firstIndex */
|
||||
private int firstIndex = 1;
|
||||
|
||||
/** lastIndex */
|
||||
private int lastIndex = 1;
|
||||
|
||||
/** recordCountPerPage */
|
||||
private int recordCountPerPage = 10;
|
||||
|
||||
/**
|
||||
* searchCondition attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchCondition() {
|
||||
return searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchCondition attribute 값을 설정한다.
|
||||
* @param searchCondition String
|
||||
*/
|
||||
public void setSearchCondition(String searchCondition) {
|
||||
this.searchCondition = searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchKeyword() {
|
||||
return searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 값을 설정한다.
|
||||
* @param searchKeyword String
|
||||
*/
|
||||
public void setSearchKeyword(String searchKeyword) {
|
||||
this.searchKeyword = searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchUseYn() {
|
||||
return searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 값을 설정한다.
|
||||
* @param searchUseYn String
|
||||
*/
|
||||
public void setSearchUseYn(String searchUseYn) {
|
||||
this.searchUseYn = searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 값을 설정한다.
|
||||
* @param pageIndex int
|
||||
*/
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageUnit() {
|
||||
return pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 값을 설정한다.
|
||||
* @param pageUnit int
|
||||
*/
|
||||
public void setPageUnit(int pageUnit) {
|
||||
this.pageUnit = pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 값을 설정한다.
|
||||
* @param pageSize int
|
||||
*/
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getFirstIndex() {
|
||||
return firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 값을 설정한다.
|
||||
* @param firstIndex int
|
||||
*/
|
||||
public void setFirstIndex(int firstIndex) {
|
||||
this.firstIndex = firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getLastIndex() {
|
||||
return lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 값을 설정한다.
|
||||
* @param lastIndex int
|
||||
*/
|
||||
public void setLastIndex(int lastIndex) {
|
||||
this.lastIndex = lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getRecordCountPerPage() {
|
||||
return recordCountPerPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 값을 설정한다.
|
||||
* @param recordCountPerPage int
|
||||
*/
|
||||
public void setRecordCountPerPage(int recordCountPerPage) {
|
||||
this.recordCountPerPage = recordCountPerPage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
package egovframework.com.ssi.syi.ims.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계메시지 VO 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcMessageVO extends CntcMessage implements Serializable {
|
||||
|
||||
/** 검색조건 */
|
||||
private String searchCondition = "";
|
||||
|
||||
/** 검색Keyword */
|
||||
private String searchKeyword = "";
|
||||
|
||||
/** 검색사용여부 */
|
||||
private String searchUseYn = "";
|
||||
|
||||
/** 현재페이지 */
|
||||
private int pageIndex = 1;
|
||||
|
||||
/** 페이지갯수 */
|
||||
private int pageUnit = 10;
|
||||
|
||||
/** 페이지사이즈 */
|
||||
private int pageSize = 10;
|
||||
|
||||
/** firstIndex */
|
||||
private int firstIndex = 1;
|
||||
|
||||
/** lastIndex */
|
||||
private int lastIndex = 1;
|
||||
|
||||
/** recordCountPerPage */
|
||||
private int recordCountPerPage = 10;
|
||||
|
||||
/**
|
||||
* searchCondition attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchCondition() {
|
||||
return searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchCondition attribute 값을 설정한다.
|
||||
* @param searchCondition String
|
||||
*/
|
||||
public void setSearchCondition(String searchCondition) {
|
||||
this.searchCondition = searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchKeyword() {
|
||||
return searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 값을 설정한다.
|
||||
* @param searchKeyword String
|
||||
*/
|
||||
public void setSearchKeyword(String searchKeyword) {
|
||||
this.searchKeyword = searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchUseYn() {
|
||||
return searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 값을 설정한다.
|
||||
* @param searchUseYn String
|
||||
*/
|
||||
public void setSearchUseYn(String searchUseYn) {
|
||||
this.searchUseYn = searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 값을 설정한다.
|
||||
* @param pageIndex int
|
||||
*/
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageUnit() {
|
||||
return pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 값을 설정한다.
|
||||
* @param pageUnit int
|
||||
*/
|
||||
public void setPageUnit(int pageUnit) {
|
||||
this.pageUnit = pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 값을 설정한다.
|
||||
* @param pageSize int
|
||||
*/
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getFirstIndex() {
|
||||
return firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 값을 설정한다.
|
||||
* @param firstIndex int
|
||||
*/
|
||||
public void setFirstIndex(int firstIndex) {
|
||||
this.firstIndex = firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getLastIndex() {
|
||||
return lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 값을 설정한다.
|
||||
* @param lastIndex int
|
||||
*/
|
||||
public void setLastIndex(int lastIndex) {
|
||||
this.lastIndex = lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getRecordCountPerPage() {
|
||||
return recordCountPerPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 값을 설정한다.
|
||||
* @param recordCountPerPage int
|
||||
*/
|
||||
public void setRecordCountPerPage(int recordCountPerPage) {
|
||||
this.recordCountPerPage = recordCountPerPage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
package egovframework.com.ssi.syi.ims.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계메시지에 관한 서비스 인터페이스 클래스를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public interface EgovCntcMessageService {
|
||||
|
||||
/**
|
||||
* 연계메시지를 삭제한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteCntcMessage(CntcMessage cntcMessage) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계메시지 항목을 삭제한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteCntcMessageItem(CntcMessageItem cntcMessageItem) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계메시지를 등록한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
void insertCntcMessage(CntcMessage cntcMessage) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계메시지 항목을 등록한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
void insertCntcMessageItem(CntcMessageItem cntcMessageItem) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계메시지 상세항목을 조회한다.
|
||||
* @param cntcMessage
|
||||
* @return CntcMessage(연계메시지)
|
||||
* @throws Exception
|
||||
*/
|
||||
CntcMessage selectCntcMessageDetail(CntcMessage cntcMessage) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계메시지항목 상세항목을 조회한다.
|
||||
* @param cntcMessage
|
||||
* @return CntcMessage(연계메시지)
|
||||
* @throws Exception
|
||||
*/
|
||||
CntcMessageItem selectCntcMessageItemDetail(CntcMessageItem cntcMessageItem) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계메시지 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계메시지 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
List selectCntcMessageList(CntcMessageVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계메시지 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계메시지 총 갯수)
|
||||
*/
|
||||
int selectCntcMessageListTotCnt(CntcMessageVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계메시지항목 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계메시지 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
List selectCntcMessageItemList(CntcMessageItemVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계메시지항목 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계메시지 총 갯수)
|
||||
*/
|
||||
int selectCntcMessageItemListTotCnt(CntcMessageItemVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계메시지를 수정한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateCntcMessage(CntcMessage cntcMessage) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계메시지 항목을 수정한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateCntcMessageItem(CntcMessageItem cntcMessageItem) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
package egovframework.com.ssi.syi.ims.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessage;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessageItem;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessageItemVO;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessageVO;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계메시지에 대한 데이터 접근 클래스를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
@Repository("CntcMessageDAO")
|
||||
public class CntcMessageDAO extends EgovComAbstractDAO {
|
||||
|
||||
|
||||
/**
|
||||
* 연계메시지를 삭제한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteCntcMessage(CntcMessage cntcMessage) throws Exception {
|
||||
delete("CntcMessageDAO.deleteCntcMessage", cntcMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 항목을 삭제한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteCntcMessageItem(CntcMessageItem cntcMessageItem) throws Exception {
|
||||
delete("CntcMessageDAO.deleteCntcMessageItem", cntcMessageItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지를 등록한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
public void insertCntcMessage(CntcMessage cntcMessage) throws Exception {
|
||||
insert("CntcMessageDAO.insertCntcMessage", cntcMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 항목을 등록한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
public void insertCntcMessageItem(CntcMessageItem cntcMessageItem) throws Exception {
|
||||
insert("CntcMessageDAO.insertCntcMessageItem", cntcMessageItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 상세항목을 조회한다.
|
||||
* @param cntcMessage
|
||||
* @return CntcMessage(연계메시지)
|
||||
*/
|
||||
public CntcMessage selectCntcMessageDetail(CntcMessage cntcMessage) throws Exception {
|
||||
return (CntcMessage) selectByPk("CntcMessageDAO.selectCntcMessageDetail", cntcMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지항목 상세항목을 조회한다.
|
||||
* @param cntcMessage
|
||||
* @return CntcMessage(연계메시지)
|
||||
*/
|
||||
public CntcMessageItem selectCntcMessageItemDetail(CntcMessageItem cntcMessageItem) throws Exception {
|
||||
return (CntcMessageItem) selectByPk("CntcMessageDAO.selectCntcMessageItemDetail", cntcMessageItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계메시지 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List selectCntcMessageList(CntcMessageVO searchVO) throws Exception {
|
||||
return list("CntcMessageDAO.selectCntcMessageList", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계메시지 총 갯수)
|
||||
*/
|
||||
public int selectCntcMessageListTotCnt(CntcMessageVO searchVO) throws Exception {
|
||||
return (Integer)getSqlMapClientTemplate().queryForObject("CntcMessageDAO.selectCntcMessageListTotCnt", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지항목 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계메시지 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List selectCntcMessageItemList(CntcMessageItemVO searchVO) throws Exception {
|
||||
return list("CntcMessageDAO.selectCntcMessageItemList", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지항목 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계메시지 총 갯수)
|
||||
*/
|
||||
public int selectCntcMessageItemListTotCnt(CntcMessageItemVO searchVO) throws Exception {
|
||||
return (Integer)getSqlMapClientTemplate().queryForObject("CntcMessageDAO.selectCntcMessageItemListTotCnt", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지를 수정한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateCntcMessage(CntcMessage cntcMessage) throws Exception {
|
||||
update("CntcMessageDAO.updateCntcMessage", cntcMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 항목을 수정한다.
|
||||
* @param cntcMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateCntcMessageItem(CntcMessageItem cntcMessageItem) throws Exception {
|
||||
update("CntcMessageDAO.updateCntcMessageItem", cntcMessageItem);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
package egovframework.com.ssi.syi.ims.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessage;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessageItem;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessageItemVO;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessageVO;
|
||||
import egovframework.com.ssi.syi.ims.service.EgovCntcMessageService;
|
||||
import egovframework.rte.fdl.cmmn.AbstractServiceImpl;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계메시지에 대한 서비스 구현클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
@Service("CntcMessageService")
|
||||
public class EgovCntcMessageServiceImpl extends AbstractServiceImpl implements EgovCntcMessageService {
|
||||
|
||||
@Resource(name="CntcMessageDAO")
|
||||
private CntcMessageDAO cntcMessageDAO;
|
||||
|
||||
/**
|
||||
* 연계메시지를 삭제한다.
|
||||
*/
|
||||
public void deleteCntcMessage(CntcMessage cntcMessage) throws Exception {
|
||||
cntcMessageDAO.deleteCntcMessage(cntcMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 항목을 삭제한다.
|
||||
*/
|
||||
public void deleteCntcMessageItem(CntcMessageItem cntcMessageItem) throws Exception {
|
||||
cntcMessageDAO.deleteCntcMessageItem(cntcMessageItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지를 등록한다.
|
||||
*/
|
||||
public void insertCntcMessage(CntcMessage cntcMessage) throws Exception {
|
||||
cntcMessageDAO.insertCntcMessage(cntcMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 항목을 등록한다.
|
||||
*/
|
||||
public void insertCntcMessageItem(CntcMessageItem cntcMessageItem) throws Exception {
|
||||
cntcMessageDAO.insertCntcMessageItem(cntcMessageItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 상세항목을 조회한다.
|
||||
*/
|
||||
public CntcMessage selectCntcMessageDetail(CntcMessage cntcMessage) throws Exception {
|
||||
CntcMessage ret = (CntcMessage)cntcMessageDAO.selectCntcMessageDetail(cntcMessage);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지항목 상세항목을 조회한다.
|
||||
*/
|
||||
public CntcMessageItem selectCntcMessageItemDetail(CntcMessageItem cntcMessageItem) throws Exception {
|
||||
CntcMessageItem ret = (CntcMessageItem)cntcMessageDAO.selectCntcMessageItemDetail(cntcMessageItem);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 목록을 조회한다.
|
||||
*/
|
||||
public List selectCntcMessageList(CntcMessageVO searchVO) throws Exception {
|
||||
return cntcMessageDAO.selectCntcMessageList(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 총 갯수를 조회한다.
|
||||
*/
|
||||
public int selectCntcMessageListTotCnt(CntcMessageVO searchVO) throws Exception {
|
||||
return cntcMessageDAO.selectCntcMessageListTotCnt(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지항목 목록을 조회한다.
|
||||
*/
|
||||
public List selectCntcMessageItemList(CntcMessageItemVO searchVO) throws Exception {
|
||||
return cntcMessageDAO.selectCntcMessageItemList(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지항목 총 갯수를 조회한다.
|
||||
*/
|
||||
public int selectCntcMessageItemListTotCnt(CntcMessageItemVO searchVO) throws Exception {
|
||||
return cntcMessageDAO.selectCntcMessageItemListTotCnt(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지를 수정한다.
|
||||
*/
|
||||
public void updateCntcMessage(CntcMessage cntcMessage) throws Exception {
|
||||
cntcMessageDAO.updateCntcMessage(cntcMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 항목을 수정한다.
|
||||
*/
|
||||
public void updateCntcMessageItem(CntcMessageItem cntcMessageItem) throws Exception {
|
||||
cntcMessageDAO.updateCntcMessageItem(cntcMessageItem);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,425 @@
|
|||
package egovframework.com.ssi.syi.ims.web;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springmodules.validation.commons.DefaultBeanValidator;
|
||||
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.annotation.IncludedInfo;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessage;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessageItem;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessageItemVO;
|
||||
import egovframework.com.ssi.syi.ims.service.CntcMessageVO;
|
||||
import egovframework.com.ssi.syi.ims.service.EgovCntcMessageService;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계메시지 관리에 관한 요청을 받아 서비스 클래스로 요청을 전달하고 서비스클래스에서 처리한 결과를 웹 화면으로 전달을 위한 Controller를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
* 2011.8.26 정진오 IncludedInfo annotation 추가
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Controller
|
||||
public class EgovCntcMessageController {
|
||||
|
||||
|
||||
|
||||
|
||||
@Resource(name = "CntcMessageService")
|
||||
private EgovCntcMessageService cntcMessageService;
|
||||
|
||||
/** EgovIdGnrService */
|
||||
@Resource(name="egovCntcMessageIdGnrService")
|
||||
private EgovIdGnrService idgenService;
|
||||
|
||||
/** EgovIdGnrService */
|
||||
@Resource(name="egovCntcMessageItemIdGnrService")
|
||||
private EgovIdGnrService idgenServiceItem;
|
||||
|
||||
/** EgovPropertyService */
|
||||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
@Autowired
|
||||
private DefaultBeanValidator beanValidator;
|
||||
|
||||
/**
|
||||
* 연계메시지를 삭제한다.
|
||||
* @param loginVO
|
||||
* @param cntcMessage
|
||||
* @param model
|
||||
* @return "forward:/ssi/syi/ims/EgovCcmAdministCodeList.do"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/ims/removeCntcMessage.do")
|
||||
public String deleteCntcMessage (CntcMessage cntcMessage
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
cntcMessageService.deleteCntcMessage(cntcMessage);
|
||||
return "forward:/ssi/syi/ims/getCntcMessageList.do";
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지항목을 삭제한다.
|
||||
* @param loginVO
|
||||
* @param cntcMessageItem
|
||||
* @param model
|
||||
* @return "forward:/ssi/syi/ims/EgovCcmAdministCodeList.do"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/ims/removeCntcMessageItem.do")
|
||||
public String deleteCntcMessageItem (CntcMessageItem cntcMessageItem
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
cntcMessageService.deleteCntcMessageItem(cntcMessageItem);
|
||||
return "forward:/ssi/syi/ims/getCntcMessageList.do";
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지를 등록한다.
|
||||
* @param loginVO
|
||||
* @param cntcMessage
|
||||
* @param bindingResult
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/ims/EgovCcmCntcMessageRegist"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/ims/addCntcMessage.do")
|
||||
public String insertCntcMessage (@ModelAttribute("cntcMessage") CntcMessage cntcMessage
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
return "egovframework/com/ssi/syi/ims/EgovCntcMessageRegist";
|
||||
} else if (sCmd.equals("Regist")) {
|
||||
|
||||
beanValidator.validate(cntcMessage, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
return "egovframework/com/ssi/syi/ims/EgovCntcMessageRegist";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
cntcMessage.setFrstRegisterId(uniqId);
|
||||
|
||||
// ID Generation
|
||||
String sCntcMessageId = idgenService.getNextStringId();
|
||||
cntcMessage.setCntcMessageId(sCntcMessageId);
|
||||
|
||||
cntcMessageService.insertCntcMessage(cntcMessage);
|
||||
return "forward:/ssi/syi/ims/getCntcMessageList.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/ims/getCntcMessageList.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 항목을 등록한다.
|
||||
* @param loginVO
|
||||
* @param cntcMessageItem
|
||||
* @param bindingResult
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/ims/EgovCcmCntcMessageRegist"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/ims/addCntcMessageItem.do")
|
||||
public String insertCntcMessageItem (@ModelAttribute("cntcMessageItem") CntcMessageItem cntcMessageItem
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
return "egovframework/com/ssi/syi/ims/EgovCntcMessageItemRegist";
|
||||
} else if (sCmd.equals("Regist")) {
|
||||
|
||||
beanValidator.validate(cntcMessageItem, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
return "egovframework/com/ssi/syi/ims/EgovCntcMessageItemRegist";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
cntcMessageItem.setFrstRegisterId(uniqId);
|
||||
|
||||
// ID Generation
|
||||
String sItemId = idgenServiceItem.getNextStringId();
|
||||
cntcMessageItem.setItemId(sItemId);
|
||||
|
||||
cntcMessageService.insertCntcMessageItem(cntcMessageItem);
|
||||
return "forward:/ssi/syi/ims/getCntcMessageDetail.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/ims/getCntcMessageDetail.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 상세내역을 조회한다.
|
||||
* @param loginVO
|
||||
* @param cntcMessage
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/ims/EgovCcmCntcMessageDetail"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/ims/getCntcMessageDetail.do")
|
||||
public String selectCntcMessageDetail (@ModelAttribute("cntcMessage") CntcMessage cntcMessage
|
||||
, @ModelAttribute("cntcMessageItemVO") CntcMessageItemVO cntcMessageItemVO
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
/* 연계메시지 상세 */
|
||||
CntcMessage vo = cntcMessageService.selectCntcMessageDetail(cntcMessage);
|
||||
model.addAttribute("result", vo);
|
||||
|
||||
/* 연계메시지항목 리스트 */
|
||||
cntcMessageItemVO.setRecordCountPerPage(9999999);
|
||||
cntcMessageItemVO.setFirstIndex(0);
|
||||
|
||||
cntcMessageItemVO.setSearchCondition("CodeList");
|
||||
List cntcMessageItemList = cntcMessageService.selectCntcMessageItemList(cntcMessageItemVO);
|
||||
model.addAttribute("cntcMessageItemList", cntcMessageItemList);
|
||||
|
||||
return "egovframework/com/ssi/syi/ims/EgovCntcMessageDetail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지 목록을 조회한다.
|
||||
* @param loginVO
|
||||
* @param searchVO
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/ims/EgovCcmCntcMessageList"
|
||||
* @throws Exception
|
||||
*/
|
||||
@IncludedInfo(name="연계메시지관리", listUrl="/ssi/syi/ims/getCntcMessageList.do", order = 1230,gid = 70)
|
||||
@RequestMapping(value="/ssi/syi/ims/getCntcMessageList.do")
|
||||
public String selectCntcMessageList (@ModelAttribute("searchVO") CntcMessageVO searchVO
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
/** EgovPropertyService.sample */
|
||||
searchVO.setPageUnit(propertiesService.getInt("pageUnit"));
|
||||
searchVO.setPageSize(propertiesService.getInt("pageSize"));
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
|
||||
paginationInfo.setPageSize(searchVO.getPageSize());
|
||||
|
||||
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List CmmnCodeList = cntcMessageService.selectCntcMessageList(searchVO);
|
||||
model.addAttribute("resultList", CmmnCodeList);
|
||||
|
||||
int totCnt = cntcMessageService.selectCntcMessageListTotCnt(searchVO);
|
||||
paginationInfo.setTotalRecordCount(totCnt);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "egovframework/com/ssi/syi/ims/EgovCntcMessageList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지를 수정한다.
|
||||
* @param loginVO
|
||||
* @param cntcMessage
|
||||
* @param bindingResult
|
||||
* @param commandMap
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/ims/EgovCcmAdministCodeModify"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/ims/updateCntcMessage.do")
|
||||
public String updateCntcMessage (@ModelAttribute("cntcMessage") CntcMessage cntcMessage
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
CntcMessage vo = cntcMessageService.selectCntcMessageDetail(cntcMessage);
|
||||
model.addAttribute("cntcMessage", vo);
|
||||
|
||||
return "egovframework/com/ssi/syi/ims/EgovCntcMessageUpdt";
|
||||
} else if (sCmd.equals("Modify")) {
|
||||
beanValidator.validate(cntcMessage, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
CntcMessage vo = cntcMessageService.selectCntcMessageDetail(cntcMessage);
|
||||
model.addAttribute("cntcMessage", vo);
|
||||
|
||||
return "egovframework/com/ssi/syi/ims/EgovCntcMessageUpdt";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
|
||||
cntcMessage.setLastUpdusrId(uniqId);
|
||||
cntcMessageService.updateCntcMessage(cntcMessage);
|
||||
return "forward:/ssi/syi/ims/getCntcMessageList.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/ims/getCntcMessageList.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계메시지항목을 수정한다.
|
||||
* @param loginVO
|
||||
* @param cntcMessageItem
|
||||
* @param bindingResult
|
||||
* @param commandMap
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/ims/EgovCcmAdministCodeModify"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/ims/updateCntcMessageItem.do")
|
||||
public String updateCntcMessageItem (@ModelAttribute("cntcMessageItem") CntcMessageItem cntcMessageItem
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
CntcMessageItem vo = cntcMessageService.selectCntcMessageItemDetail(cntcMessageItem);
|
||||
model.addAttribute("cntcMessageItem", vo);
|
||||
|
||||
return "egovframework/com/ssi/syi/ims/EgovCntcMessageItemUpdt";
|
||||
} else if (sCmd.equals("Modify")) {
|
||||
beanValidator.validate(cntcMessageItem, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
// 연계메시지 리스트박스 데이터
|
||||
CntcMessageVO searchCntcMessageVO;
|
||||
searchCntcMessageVO = new CntcMessageVO();
|
||||
searchCntcMessageVO.setRecordCountPerPage(999999);
|
||||
searchCntcMessageVO.setFirstIndex(0);
|
||||
searchCntcMessageVO.setSearchCondition("CodeList");
|
||||
List cntcMessageList = (List)cntcMessageService.selectCntcMessageList(searchCntcMessageVO);
|
||||
model.addAttribute("cntcMessageList", cntcMessageList);
|
||||
|
||||
CntcMessageItem vo = cntcMessageService.selectCntcMessageItemDetail(cntcMessageItem);
|
||||
model.addAttribute("cntcMessageItem", vo);
|
||||
|
||||
return "egovframework/com/ssi/syi/ims/EgovCntcMessageItemUpdt";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
|
||||
cntcMessageItem.setLastUpdusrId(uniqId);
|
||||
cntcMessageService.updateCntcMessageItem(cntcMessageItem);
|
||||
return "forward:/ssi/syi/ims/getCntcMessageList.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/ims/getCntcMessageList.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Map 내용을 확인한다.
|
||||
* @param commandMap
|
||||
* @return
|
||||
*/
|
||||
public String printParameterMap(Map commandMap){
|
||||
String ret = "";
|
||||
for(Object key:commandMap.keySet()){
|
||||
Object value = commandMap.get(key);
|
||||
|
||||
ret += "key:" + key.toString() + " value:" + value.toString();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,361 @@
|
|||
package egovframework.com.ssi.syi.ist.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 연계현황 모델 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcSttus implements Serializable {
|
||||
|
||||
/*
|
||||
* 연계ID
|
||||
*/
|
||||
private String cntcId = "";
|
||||
|
||||
/*
|
||||
* 연계명
|
||||
*/
|
||||
private String cntcNm = "";
|
||||
|
||||
/*
|
||||
* 연계유형
|
||||
*/
|
||||
private String cntcType = "";
|
||||
|
||||
/*
|
||||
* 총연계건수
|
||||
*/
|
||||
private String cntAll = "";
|
||||
|
||||
/*
|
||||
* 성공연계수
|
||||
*/
|
||||
private String cntSuccess = "";
|
||||
|
||||
/*
|
||||
* 실패연계수
|
||||
*/
|
||||
private String cntFail = "";
|
||||
|
||||
/*
|
||||
* 제공기관ID
|
||||
*/
|
||||
private String provdInsttId = "";
|
||||
|
||||
/*
|
||||
* 제공기관명
|
||||
*/
|
||||
private String provdInsttNm = "";
|
||||
|
||||
/*
|
||||
* 제공시스템ID
|
||||
*/
|
||||
private String provdSysId = "";
|
||||
|
||||
/*
|
||||
* 제공시스템명
|
||||
*/
|
||||
private String provdSysNm = "";
|
||||
|
||||
/*
|
||||
* 제공서비스ID
|
||||
*/
|
||||
private String provdSvcId = "";
|
||||
|
||||
/*
|
||||
* 제공서비스명
|
||||
*/
|
||||
private String provdSvcNm = "";
|
||||
|
||||
/*
|
||||
* 요청기관ID
|
||||
*/
|
||||
private String requstInsttId = "";
|
||||
|
||||
/*
|
||||
* 요청기관명
|
||||
*/
|
||||
private String requstInsttNm = "";
|
||||
|
||||
/*
|
||||
* 요청시스템ID
|
||||
*/
|
||||
private String requstSysId = "";
|
||||
|
||||
/*
|
||||
* 요청시스템명
|
||||
*/
|
||||
private String requstSysNm = "";
|
||||
|
||||
/**
|
||||
* cntcId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntcId() {
|
||||
return cntcId;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcId attribute 값을 설정한다.
|
||||
* @param cntcId String
|
||||
*/
|
||||
public void setCntcId(String cntcId) {
|
||||
this.cntcId = cntcId;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntcNm() {
|
||||
return cntcNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcNm attribute 값을 설정한다.
|
||||
* @param cntcNm String
|
||||
*/
|
||||
public void setCntcNm(String cntcNm) {
|
||||
this.cntcNm = cntcNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcType attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntcType() {
|
||||
return cntcType;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcType attribute 값을 설정한다.
|
||||
* @param cntcType String
|
||||
*/
|
||||
public void setCntcType(String cntcType) {
|
||||
this.cntcType = cntcType;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntAll attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntAll() {
|
||||
return cntAll;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntAll attribute 값을 설정한다.
|
||||
* @param cntAll String
|
||||
*/
|
||||
public void setCntAll(String cntAll) {
|
||||
this.cntAll = cntAll;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntSuccess attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntSuccess() {
|
||||
return cntSuccess;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntSuccess attribute 값을 설정한다.
|
||||
* @param cntSuccess String
|
||||
*/
|
||||
public void setCntSuccess(String cntSuccess) {
|
||||
this.cntSuccess = cntSuccess;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntFail attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntFail() {
|
||||
return cntFail;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntFail attribute 값을 설정한다.
|
||||
* @param cntFail String
|
||||
*/
|
||||
public void setCntFail(String cntFail) {
|
||||
this.cntFail = cntFail;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdInsttId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getProvdInsttId() {
|
||||
return provdInsttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdInsttId attribute 값을 설정한다.
|
||||
* @param provdInsttId String
|
||||
*/
|
||||
public void setProvdInsttId(String provdInsttId) {
|
||||
this.provdInsttId = provdInsttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdInsttNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getProvdInsttNm() {
|
||||
return provdInsttNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdInsttNm attribute 값을 설정한다.
|
||||
* @param provdInsttNm String
|
||||
*/
|
||||
public void setProvdInsttNm(String provdInsttNm) {
|
||||
this.provdInsttNm = provdInsttNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSysId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getProvdSysId() {
|
||||
return provdSysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSysId attribute 값을 설정한다.
|
||||
* @param provdSysId String
|
||||
*/
|
||||
public void setProvdSysId(String provdSysId) {
|
||||
this.provdSysId = provdSysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSysNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getProvdSysNm() {
|
||||
return provdSysNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSysNm attribute 값을 설정한다.
|
||||
* @param provdSysNm String
|
||||
*/
|
||||
public void setProvdSysNm(String provdSysNm) {
|
||||
this.provdSysNm = provdSysNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSvcId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getProvdSvcId() {
|
||||
return provdSvcId;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSvcId attribute 값을 설정한다.
|
||||
* @param provdSvcId String
|
||||
*/
|
||||
public void setProvdSvcId(String provdSvcId) {
|
||||
this.provdSvcId = provdSvcId;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSvcNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getProvdSvcNm() {
|
||||
return provdSvcNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSvcNm attribute 값을 설정한다.
|
||||
* @param provdSvcNm String
|
||||
*/
|
||||
public void setProvdSvcNm(String provdSvcNm) {
|
||||
this.provdSvcNm = provdSvcNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstInsttId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRequstInsttId() {
|
||||
return requstInsttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstInsttId attribute 값을 설정한다.
|
||||
* @param requstInsttId String
|
||||
*/
|
||||
public void setRequstInsttId(String requstInsttId) {
|
||||
this.requstInsttId = requstInsttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstInsttNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRequstInsttNm() {
|
||||
return requstInsttNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstInsttNm attribute 값을 설정한다.
|
||||
* @param requstInsttNm String
|
||||
*/
|
||||
public void setRequstInsttNm(String requstInsttNm) {
|
||||
this.requstInsttNm = requstInsttNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstSysId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRequstSysId() {
|
||||
return requstSysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstSysId attribute 값을 설정한다.
|
||||
* @param requstSysId String
|
||||
*/
|
||||
public void setRequstSysId(String requstSysId) {
|
||||
this.requstSysId = requstSysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstSysNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRequstSysNm() {
|
||||
return requstSysNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstSysNm attribute 값을 설정한다.
|
||||
* @param requstSysNm String
|
||||
*/
|
||||
public void setRequstSysNm(String requstSysNm) {
|
||||
this.requstSysNm = requstSysNm;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
package egovframework.com.ssi.syi.ist.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계현황 VO 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class CntcSttusVO extends CntcSttus implements Serializable {
|
||||
|
||||
/** 검색조건 */
|
||||
private String searchCondition = "";
|
||||
|
||||
/** 검색Keyword */
|
||||
private String searchKeyword = "";
|
||||
|
||||
/** 검색사용여부 */
|
||||
private String searchUseYn = "";
|
||||
|
||||
/** 현재페이지 */
|
||||
private int pageIndex = 1;
|
||||
|
||||
/** 페이지갯수 */
|
||||
private int pageUnit = 10;
|
||||
|
||||
/** 페이지사이즈 */
|
||||
private int pageSize = 10;
|
||||
|
||||
/** firstIndex */
|
||||
private int firstIndex = 1;
|
||||
|
||||
/** lastIndex */
|
||||
private int lastIndex = 1;
|
||||
|
||||
/** recordCountPerPage */
|
||||
private int recordCountPerPage = 10;
|
||||
|
||||
/**
|
||||
* searchCondition attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchCondition() {
|
||||
return searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchCondition attribute 값을 설정한다.
|
||||
* @param searchCondition String
|
||||
*/
|
||||
public void setSearchCondition(String searchCondition) {
|
||||
this.searchCondition = searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchKeyword() {
|
||||
return searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 값을 설정한다.
|
||||
* @param searchKeyword String
|
||||
*/
|
||||
public void setSearchKeyword(String searchKeyword) {
|
||||
this.searchKeyword = searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchUseYn() {
|
||||
return searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 값을 설정한다.
|
||||
* @param searchUseYn String
|
||||
*/
|
||||
public void setSearchUseYn(String searchUseYn) {
|
||||
this.searchUseYn = searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 값을 설정한다.
|
||||
* @param pageIndex int
|
||||
*/
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageUnit() {
|
||||
return pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 값을 설정한다.
|
||||
* @param pageUnit int
|
||||
*/
|
||||
public void setPageUnit(int pageUnit) {
|
||||
this.pageUnit = pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 값을 설정한다.
|
||||
* @param pageSize int
|
||||
*/
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getFirstIndex() {
|
||||
return firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 값을 설정한다.
|
||||
* @param firstIndex int
|
||||
*/
|
||||
public void setFirstIndex(int firstIndex) {
|
||||
this.firstIndex = firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getLastIndex() {
|
||||
return lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 값을 설정한다.
|
||||
* @param lastIndex int
|
||||
*/
|
||||
public void setLastIndex(int lastIndex) {
|
||||
this.lastIndex = lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getRecordCountPerPage() {
|
||||
return recordCountPerPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 값을 설정한다.
|
||||
* @param recordCountPerPage int
|
||||
*/
|
||||
public void setRecordCountPerPage(int recordCountPerPage) {
|
||||
this.recordCountPerPage = recordCountPerPage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package egovframework.com.ssi.syi.ist.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계현황에 관한 서비스 인터페이스 클래스를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public interface EgovCntcSttusService {
|
||||
|
||||
/**
|
||||
* 연계현황 상세항목을 조회한다.
|
||||
* @param cntcMessage
|
||||
* @return CntcMessage(연계현황)
|
||||
* @throws Exception
|
||||
*/
|
||||
CntcSttus selectCntcSttusDetail(CntcSttus CntcSttus) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계현황 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계현황 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
List selectCntcSttusList(CntcSttusVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 연계현황 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계현황 총 갯수)
|
||||
*/
|
||||
int selectCntcSttusListTotCnt(CntcSttusVO searchVO) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package egovframework.com.ssi.syi.ist.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||
import egovframework.com.ssi.syi.ist.service.CntcSttus;
|
||||
import egovframework.com.ssi.syi.ist.service.CntcSttusVO;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계현황에 대한 데이터 접근 클래스를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
@Repository("CntcSttusDAO")
|
||||
public class CntcSttusDAO extends EgovComAbstractDAO {
|
||||
|
||||
|
||||
/**
|
||||
* 연계현황 상세항목을 조회한다.
|
||||
* @param CntcSttus
|
||||
* @return CntcSttus(연계현황)
|
||||
*/
|
||||
public CntcSttus selectCntcSttusDetail(CntcSttus CntcSttus) throws Exception {
|
||||
return (CntcSttus) selectByPk("CntcSttusDAO.selectCntcSttusDetail", CntcSttus);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 연계현황 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(연계현황 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List selectCntcSttusList(CntcSttusVO searchVO) throws Exception {
|
||||
return list("CntcSttusDAO.selectCntcSttusList", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계현황 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(연계현황 총 갯수)
|
||||
*/
|
||||
public int selectCntcSttusListTotCnt(CntcSttusVO searchVO) throws Exception {
|
||||
return (Integer)getSqlMapClientTemplate().queryForObject("CntcSttusDAO.selectCntcSttusListTotCnt", searchVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package egovframework.com.ssi.syi.ist.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.com.ssi.syi.ist.service.CntcSttus;
|
||||
import egovframework.com.ssi.syi.ist.service.CntcSttusVO;
|
||||
import egovframework.com.ssi.syi.ist.service.EgovCntcSttusService;
|
||||
import egovframework.rte.fdl.cmmn.AbstractServiceImpl;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계현황에 대한 서비스 구현클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
@Service("CntcSttusService")
|
||||
public class EgovCntcSttusServiceImpl extends AbstractServiceImpl implements EgovCntcSttusService {
|
||||
|
||||
@Resource(name="CntcSttusDAO")
|
||||
private CntcSttusDAO cntcSttusDAO;
|
||||
|
||||
/**
|
||||
* 연계현황 상세항목을 조회한다.
|
||||
*/
|
||||
public CntcSttus selectCntcSttusDetail(CntcSttus CntcSttus) throws Exception {
|
||||
CntcSttus ret = (CntcSttus)cntcSttusDAO.selectCntcSttusDetail(CntcSttus);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계현황 목록을 조회한다.
|
||||
*/
|
||||
public List selectCntcSttusList(CntcSttusVO searchVO) throws Exception {
|
||||
return cntcSttusDAO.selectCntcSttusList(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계현황 총 갯수를 조회한다.
|
||||
*/
|
||||
public int selectCntcSttusListTotCnt(CntcSttusVO searchVO) throws Exception {
|
||||
return cntcSttusDAO.selectCntcSttusListTotCnt(searchVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
package egovframework.com.ssi.syi.ist.web;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import egovframework.com.cmm.annotation.IncludedInfo;
|
||||
import egovframework.com.ssi.syi.ist.service.CntcSttus;
|
||||
import egovframework.com.ssi.syi.ist.service.CntcSttusVO;
|
||||
import egovframework.com.ssi.syi.ist.service.EgovCntcSttusService;
|
||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
|
||||
/**
|
||||
*
|
||||
* 연계현황 관리에 관한 요청을 받아 서비스 클래스로 요청을 전달하고 서비스클래스에서 처리한 결과를 웹 화면으로 전달을 위한 Controller를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
* 2011.8.26 정진오 IncludedInfo annotation 추가
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Controller
|
||||
public class EgovCntcSttusController {
|
||||
|
||||
@Resource(name = "CntcSttusService")
|
||||
private EgovCntcSttusService cntcSttusService;
|
||||
|
||||
/** EgovPropertyService */
|
||||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
/**
|
||||
* 연계현황 상세내역을 조회한다.
|
||||
* @param loginVO
|
||||
* @param CntcSttus
|
||||
* @param model
|
||||
* @return "egovframework/com/cmm/sym/ccm/EgovCcmCntcSttusDetail"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/ist/getCntcSttusDetail.do")
|
||||
public String selectCntcSttusLogDetail (CntcSttus CntcSttus
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
CntcSttus vo = cntcSttusService.selectCntcSttusDetail(CntcSttus);
|
||||
model.addAttribute("result", vo);
|
||||
|
||||
return "egovframework/com/ssi/syi/ist/EgovCntcSttusDetail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 연계현황 목록을 조회한다.
|
||||
* @param loginVO
|
||||
* @param searchVO
|
||||
* @param model
|
||||
* @return "egovframework/com/cmm/sym/ccm/EgovCcmCntcSttusList"
|
||||
* @throws Exception
|
||||
*/
|
||||
@IncludedInfo(name="연계현황관리", listUrl="/ssi/syi/ist/getCntcSttusList.do", order = 1220,gid = 70)
|
||||
@RequestMapping(value="/ssi/syi/ist/getCntcSttusList.do")
|
||||
public String selectCntcSttusLogList (@ModelAttribute("searchVO") CntcSttusVO searchVO
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
/** EgovPropertyService.sample */
|
||||
searchVO.setPageUnit(propertiesService.getInt("pageUnit"));
|
||||
searchVO.setPageSize(propertiesService.getInt("pageSize"));
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
|
||||
paginationInfo.setPageSize(searchVO.getPageSize());
|
||||
|
||||
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List CmmnCodeList = cntcSttusService.selectCntcSttusList(searchVO);
|
||||
model.addAttribute("resultList", CmmnCodeList);
|
||||
|
||||
int totCnt = cntcSttusService.selectCntcSttusListTotCnt(searchVO);
|
||||
paginationInfo.setTotalRecordCount(totCnt);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "egovframework/com/ssi/syi/ist/EgovCntcSttusList";
|
||||
}
|
||||
|
||||
/**
|
||||
* Map 내용을 확인한다.
|
||||
* @param commandMap
|
||||
* @return
|
||||
*/
|
||||
public String printParameterMap(Map commandMap){
|
||||
String ret = "";
|
||||
for(Object key:commandMap.keySet()){
|
||||
Object value = commandMap.get(key);
|
||||
|
||||
ret += "key:" + key.toString() + " value:" + value.toString();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package egovframework.com.ssi.syi.sim.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* 시스템연계에 관한 서비스 인터페이스 클래스를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public interface EgovSystemCntcService {
|
||||
|
||||
/**
|
||||
* 시스템연계를 삭제한다.
|
||||
* @param systemCntc
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteSystemCntc(SystemCntc systemCntc) throws Exception;
|
||||
|
||||
/**
|
||||
* 시스템연계를 등록한다.
|
||||
* @param systemCntc
|
||||
* @throws Exception
|
||||
*/
|
||||
void insertSystemCntc(SystemCntc systemCntc) throws Exception;
|
||||
|
||||
/**
|
||||
* 시스템연계 상세항목을 조회한다.
|
||||
* @param systemCntc
|
||||
* @return SystemCntc(시스템연계)
|
||||
* @throws Exception
|
||||
*/
|
||||
SystemCntc selectSystemCntcDetail(SystemCntc systemCntc) throws Exception;
|
||||
|
||||
/**
|
||||
* 시스템연계 승인/승인취소한다.
|
||||
* @param systemCntc
|
||||
* @return SystemCntc(시스템연계)
|
||||
* @throws Exception
|
||||
*/
|
||||
void confirmSystemCntc(SystemCntc systemCntc) throws Exception;
|
||||
|
||||
/**
|
||||
* 시스템연계 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(시스템연계 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
List selectSystemCntcList(SystemCntcVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 시스템연계 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(시스템연계 총 갯수)
|
||||
*/
|
||||
int selectSystemCntcListTotCnt(SystemCntcVO searchVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 시스템연계를 수정한다.
|
||||
* @param systemCntc
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateSystemCntc(SystemCntc systemCntc) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,319 @@
|
|||
package egovframework.com.ssi.syi.sim.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 시스템연계 모델 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class SystemCntc implements Serializable {
|
||||
|
||||
/*
|
||||
* 연계ID
|
||||
*/
|
||||
private String cntcId = "";
|
||||
|
||||
/*
|
||||
* 연계명
|
||||
*/
|
||||
private String cntcNm = "";
|
||||
|
||||
/*
|
||||
* 연계유형코드
|
||||
*/
|
||||
private String cntcType = "";
|
||||
|
||||
/*
|
||||
* 제공기관ID
|
||||
*/
|
||||
private String provdInsttId = "";
|
||||
|
||||
/*
|
||||
* 제공시스템ID
|
||||
*/
|
||||
private String provdSysId = "";
|
||||
|
||||
/*
|
||||
* 제공서비스ID
|
||||
*/
|
||||
private String provdSvcId = "";
|
||||
|
||||
/*
|
||||
* 요청기관ID
|
||||
*/
|
||||
private String requstInsttId = "";
|
||||
|
||||
/*
|
||||
* 요청시스템ID
|
||||
*/
|
||||
private String requstSysId = "";
|
||||
|
||||
/*
|
||||
* 승인여부
|
||||
*/
|
||||
private String confmAt = "";
|
||||
|
||||
/*
|
||||
* 사용여부
|
||||
*/
|
||||
private String useAt = "";
|
||||
|
||||
/*
|
||||
* 유효시작일자
|
||||
*/
|
||||
private String validBeginDe = "";
|
||||
|
||||
/*
|
||||
* 유효종료일자
|
||||
*/
|
||||
private String validEndDe = "";
|
||||
|
||||
/*
|
||||
* 최초등록자ID
|
||||
*/
|
||||
private String frstRegisterId = "";
|
||||
|
||||
/*
|
||||
* 최종수정자ID
|
||||
*/
|
||||
private String lastUpdusrId = "";
|
||||
|
||||
/**
|
||||
* cntcId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntcId() {
|
||||
return cntcId;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcId attribute 값을 설정한다.
|
||||
* @param cntcId String
|
||||
*/
|
||||
public void setCntcId(String cntcId) {
|
||||
this.cntcId = cntcId;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcNm attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntcNm() {
|
||||
return cntcNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcNm attribute 값을 설정한다.
|
||||
* @param cntcNm String
|
||||
*/
|
||||
public void setCntcNm(String cntcNm) {
|
||||
this.cntcNm = cntcNm;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcType attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getCntcType() {
|
||||
return cntcType;
|
||||
}
|
||||
|
||||
/**
|
||||
* cntcType attribute 값을 설정한다.
|
||||
* @param cntcType String
|
||||
*/
|
||||
public void setCntcType(String cntcType) {
|
||||
this.cntcType = cntcType;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdInsttId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getProvdInsttId() {
|
||||
return provdInsttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdInsttId attribute 값을 설정한다.
|
||||
* @param provdInsttId String
|
||||
*/
|
||||
public void setProvdInsttId(String provdInsttId) {
|
||||
this.provdInsttId = provdInsttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSysId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getProvdSysId() {
|
||||
return provdSysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSysId attribute 값을 설정한다.
|
||||
* @param provdSysId String
|
||||
*/
|
||||
public void setProvdSysId(String provdSysId) {
|
||||
this.provdSysId = provdSysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSvcId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getProvdSvcId() {
|
||||
return provdSvcId;
|
||||
}
|
||||
|
||||
/**
|
||||
* provdSvcId attribute 값을 설정한다.
|
||||
* @param provdSvcId String
|
||||
*/
|
||||
public void setProvdSvcId(String provdSvcId) {
|
||||
this.provdSvcId = provdSvcId;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstInsttId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRequstInsttId() {
|
||||
return requstInsttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstInsttId attribute 값을 설정한다.
|
||||
* @param requstInsttId String
|
||||
*/
|
||||
public void setRequstInsttId(String requstInsttId) {
|
||||
this.requstInsttId = requstInsttId;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstSysId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getRequstSysId() {
|
||||
return requstSysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* requstSysId attribute 값을 설정한다.
|
||||
* @param requstSysId String
|
||||
*/
|
||||
public void setRequstSysId(String requstSysId) {
|
||||
this.requstSysId = requstSysId;
|
||||
}
|
||||
|
||||
/**
|
||||
* confmAt attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getConfmAt() {
|
||||
return confmAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* confmAt attribute 값을 설정한다.
|
||||
* @param confmAt String
|
||||
*/
|
||||
public void setConfmAt(String confmAt) {
|
||||
this.confmAt = confmAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* useAt attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getUseAt() {
|
||||
return useAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* useAt attribute 값을 설정한다.
|
||||
* @param useAt String
|
||||
*/
|
||||
public void setUseAt(String useAt) {
|
||||
this.useAt = useAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* validBeginDe attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getValidBeginDe() {
|
||||
return validBeginDe;
|
||||
}
|
||||
|
||||
/**
|
||||
* validBeginDe attribute 값을 설정한다.
|
||||
* @param validBeginDe String
|
||||
*/
|
||||
public void setValidBeginDe(String validBeginDe) {
|
||||
this.validBeginDe = validBeginDe;
|
||||
}
|
||||
|
||||
/**
|
||||
* validEndDe attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getValidEndDe() {
|
||||
return validEndDe;
|
||||
}
|
||||
|
||||
/**
|
||||
* validEndDe attribute 값을 설정한다.
|
||||
* @param validEndDe String
|
||||
*/
|
||||
public void setValidEndDe(String validEndDe) {
|
||||
this.validEndDe = validEndDe;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getFrstRegisterId() {
|
||||
return frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* frstRegisterId attribute 값을 설정한다.
|
||||
* @param frstRegisterId String
|
||||
*/
|
||||
public void setFrstRegisterId(String frstRegisterId) {
|
||||
this.frstRegisterId = frstRegisterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getLastUpdusrId() {
|
||||
return lastUpdusrId;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastUpdusrId attribute 값을 설정한다.
|
||||
* @param lastUpdusrId String
|
||||
*/
|
||||
public void setLastUpdusrId(String lastUpdusrId) {
|
||||
this.lastUpdusrId = lastUpdusrId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
package egovframework.com.ssi.syi.sim.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
*
|
||||
* 시스템연계 VO 클래스
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
public class SystemCntcVO extends SystemCntc implements Serializable {
|
||||
|
||||
/** 검색조건 */
|
||||
private String searchCondition = "";
|
||||
|
||||
/** 검색Keyword */
|
||||
private String searchKeyword = "";
|
||||
|
||||
/** 검색사용여부 */
|
||||
private String searchUseYn = "";
|
||||
|
||||
/** 현재페이지 */
|
||||
private int pageIndex = 1;
|
||||
|
||||
/** 페이지갯수 */
|
||||
private int pageUnit = 10;
|
||||
|
||||
/** 페이지사이즈 */
|
||||
private int pageSize = 10;
|
||||
|
||||
/** firstIndex */
|
||||
private int firstIndex = 1;
|
||||
|
||||
/** lastIndex */
|
||||
private int lastIndex = 1;
|
||||
|
||||
/** recordCountPerPage */
|
||||
private int recordCountPerPage = 10;
|
||||
|
||||
/**
|
||||
* searchCondition attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchCondition() {
|
||||
return searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchCondition attribute 값을 설정한다.
|
||||
* @param searchCondition String
|
||||
*/
|
||||
public void setSearchCondition(String searchCondition) {
|
||||
this.searchCondition = searchCondition;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchKeyword() {
|
||||
return searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchKeyword attribute 값을 설정한다.
|
||||
* @param searchKeyword String
|
||||
*/
|
||||
public void setSearchKeyword(String searchKeyword) {
|
||||
this.searchKeyword = searchKeyword;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 를 리턴한다.
|
||||
* @return String
|
||||
*/
|
||||
public String getSearchUseYn() {
|
||||
return searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* searchUseYn attribute 값을 설정한다.
|
||||
* @param searchUseYn String
|
||||
*/
|
||||
public void setSearchUseYn(String searchUseYn) {
|
||||
this.searchUseYn = searchUseYn;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageIndex attribute 값을 설정한다.
|
||||
* @param pageIndex int
|
||||
*/
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageUnit() {
|
||||
return pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageUnit attribute 값을 설정한다.
|
||||
* @param pageUnit int
|
||||
*/
|
||||
public void setPageUnit(int pageUnit) {
|
||||
this.pageUnit = pageUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* pageSize attribute 값을 설정한다.
|
||||
* @param pageSize int
|
||||
*/
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getFirstIndex() {
|
||||
return firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* firstIndex attribute 값을 설정한다.
|
||||
* @param firstIndex int
|
||||
*/
|
||||
public void setFirstIndex(int firstIndex) {
|
||||
this.firstIndex = firstIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getLastIndex() {
|
||||
return lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* lastIndex attribute 값을 설정한다.
|
||||
* @param lastIndex int
|
||||
*/
|
||||
public void setLastIndex(int lastIndex) {
|
||||
this.lastIndex = lastIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 를 리턴한다.
|
||||
* @return int
|
||||
*/
|
||||
public int getRecordCountPerPage() {
|
||||
return recordCountPerPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* recordCountPerPage attribute 값을 설정한다.
|
||||
* @param recordCountPerPage int
|
||||
*/
|
||||
public void setRecordCountPerPage(int recordCountPerPage) {
|
||||
this.recordCountPerPage = recordCountPerPage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package egovframework.com.ssi.syi.sim.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.com.ssi.syi.sim.service.EgovSystemCntcService;
|
||||
import egovframework.com.ssi.syi.sim.service.SystemCntc;
|
||||
import egovframework.com.ssi.syi.sim.service.SystemCntcVO;
|
||||
import egovframework.rte.fdl.cmmn.AbstractServiceImpl;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 시스템연계에 대한 서비스 구현클래스를 정의한다.
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
@Service("SystemCntcService")
|
||||
public class EgovSystemCntcServiceImpl extends AbstractServiceImpl implements EgovSystemCntcService {
|
||||
|
||||
@Resource(name="SystemCntcDAO")
|
||||
private SystemCntcDAO systemCntcDAO;
|
||||
|
||||
/**
|
||||
* 시스템연계를 삭제한다.
|
||||
*/
|
||||
public void deleteSystemCntc(SystemCntc systemCntc) throws Exception {
|
||||
systemCntcDAO.deleteSystemCntc(systemCntc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계를 등록한다.
|
||||
*/
|
||||
public void insertSystemCntc(SystemCntc systemCntc) throws Exception {
|
||||
systemCntcDAO.insertSystemCntc(systemCntc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계 상세항목을 조회한다.
|
||||
*/
|
||||
public SystemCntc selectSystemCntcDetail(SystemCntc systemCntc) throws Exception {
|
||||
SystemCntc ret = (SystemCntc)systemCntcDAO.selectSystemCntcDetail(systemCntc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계 승인/승인취소한다.
|
||||
*/
|
||||
public void confirmSystemCntc(SystemCntc systemCntc) throws Exception {
|
||||
systemCntcDAO.confirmSystemCntc(systemCntc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계 목록을 조회한다.
|
||||
*/
|
||||
public List selectSystemCntcList(SystemCntcVO searchVO) throws Exception {
|
||||
return systemCntcDAO.selectSystemCntcList(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계 총 갯수를 조회한다.
|
||||
*/
|
||||
public int selectSystemCntcListTotCnt(SystemCntcVO searchVO) throws Exception {
|
||||
return systemCntcDAO.selectSystemCntcListTotCnt(searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계를 수정한다.
|
||||
*/
|
||||
public void updateSystemCntc(SystemCntc systemCntc) throws Exception {
|
||||
systemCntcDAO.updateSystemCntc(systemCntc);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package egovframework.com.ssi.syi.sim.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import egovframework.com.cmm.service.impl.EgovComAbstractDAO;
|
||||
import egovframework.com.ssi.syi.sim.service.SystemCntc;
|
||||
import egovframework.com.ssi.syi.sim.service.SystemCntcVO;
|
||||
|
||||
/**
|
||||
*
|
||||
* 시스템연계에 대한 데이터 접근 클래스를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
@Repository("SystemCntcDAO")
|
||||
public class SystemCntcDAO extends EgovComAbstractDAO {
|
||||
|
||||
|
||||
/**
|
||||
* 시스템연계를 삭제한다.
|
||||
* @param systemCntc
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteSystemCntc(SystemCntc systemCntc) throws Exception {
|
||||
delete("SystemCntcDAO.deleteSystemCntc", systemCntc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계를 등록한다.
|
||||
* @param systemCntc
|
||||
* @throws Exception
|
||||
*/
|
||||
public void insertSystemCntc(SystemCntc systemCntc) throws Exception {
|
||||
insert("SystemCntcDAO.insertSystemCntc", systemCntc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계 상세항목을 조회한다.
|
||||
* @param systemCntc
|
||||
* @return SystemCntc(시스템연계)
|
||||
*/
|
||||
public SystemCntc selectSystemCntcDetail(SystemCntc systemCntc) throws Exception {
|
||||
return (SystemCntc) selectByPk("SystemCntcDAO.selectSystemCntcDetail", systemCntc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계 승인/승인취소한다.
|
||||
* @param systemCntc
|
||||
* @throws Exception
|
||||
*/
|
||||
public void confirmSystemCntc(SystemCntc systemCntc) throws Exception {
|
||||
update("SystemCntcDAO.confirmSystemCntc", systemCntc);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 시스템연계 목록을 조회한다.
|
||||
* @param searchVO
|
||||
* @return List(시스템연계 목록)
|
||||
* @throws Exception
|
||||
*/
|
||||
public List selectSystemCntcList(SystemCntcVO searchVO) throws Exception {
|
||||
return list("SystemCntcDAO.selectSystemCntcList", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계 총 갯수를 조회한다.
|
||||
* @param searchVO
|
||||
* @return int(시스템연계 총 갯수)
|
||||
*/
|
||||
public int selectSystemCntcListTotCnt(SystemCntcVO searchVO) throws Exception {
|
||||
return (Integer)getSqlMapClientTemplate().queryForObject("SystemCntcDAO.selectSystemCntcListTotCnt", searchVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계를 수정한다.
|
||||
* @param systemCntc
|
||||
* @throws Exception
|
||||
*/
|
||||
public void updateSystemCntc(SystemCntc systemCntc) throws Exception {
|
||||
update("SystemCntcDAO.updateSystemCntc", systemCntc);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,560 @@
|
|||
package egovframework.com.ssi.syi.sim.web;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springmodules.validation.commons.DefaultBeanValidator;
|
||||
|
||||
import egovframework.com.cmm.EgovMessageSource;
|
||||
import egovframework.com.cmm.LoginVO;
|
||||
import egovframework.com.cmm.annotation.IncludedInfo;
|
||||
import egovframework.com.cmm.util.EgovUserDetailsHelper;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcInsttVO;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcServiceVO;
|
||||
import egovframework.com.ssi.syi.iis.service.CntcSystemVO;
|
||||
import egovframework.com.ssi.syi.iis.service.EgovCntcInsttService;
|
||||
import egovframework.com.ssi.syi.sim.service.EgovSystemCntcService;
|
||||
import egovframework.com.ssi.syi.sim.service.SystemCntc;
|
||||
import egovframework.com.ssi.syi.sim.service.SystemCntcVO;
|
||||
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
|
||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
|
||||
/**
|
||||
*
|
||||
* 시스템연계 관리에 관한 요청을 받아 서비스 클래스로 요청을 전달하고 서비스클래스에서 처리한 결과를 웹 화면으로 전달을 위한 Controller를 정의한다
|
||||
* @author 공통서비스 개발팀 이중호
|
||||
* @since 2009.04.01
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2009.04.01 이중호 최초 생성
|
||||
* 2011.8.26 정진오 IncludedInfo annotation 추가
|
||||
*
|
||||
* Copyright (C) 2009 by MOPAS All right reserved.
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@Controller
|
||||
public class EgovSystemCntcController {
|
||||
|
||||
|
||||
|
||||
|
||||
@Resource(name = "SystemCntcService")
|
||||
private EgovSystemCntcService systemCntcService;
|
||||
|
||||
@Resource(name = "CntcInsttService")
|
||||
private EgovCntcInsttService cntcInsttService;
|
||||
|
||||
/** EgovIdGnrService */
|
||||
@Resource(name="egovSystemCntcIdGnrService")
|
||||
private EgovIdGnrService idgenService;
|
||||
|
||||
/** EgovMessageSource */
|
||||
@Resource(name="egovMessageSource")
|
||||
EgovMessageSource egovMessageSource;
|
||||
|
||||
/** EgovPropertyService */
|
||||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
@Autowired
|
||||
private DefaultBeanValidator beanValidator;
|
||||
|
||||
/**
|
||||
* 시스템연계를 삭제한다.
|
||||
* @param loginVO
|
||||
* @param systemCntc
|
||||
* @param model
|
||||
* @return "forward:/ssi/syi/sim/EgovCcmAdministCodeList.do"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/sim/removeSystemCntc.do")
|
||||
public String deleteSystemCntc (SystemCntc systemCntc
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
systemCntcService.deleteSystemCntc(systemCntc);
|
||||
return "forward:/ssi/syi/sim/getSystemCntcList.do";
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계를 등록한다.
|
||||
* @param loginVO
|
||||
* @param systemCntc
|
||||
* @param bindingResult
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/sim/EgovCcmSystemCntcRegist"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/sim/addSystemCntc.do")
|
||||
public String insertSystemCntc (@ModelAttribute("systemCntc") SystemCntc systemCntc
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
// 연계시스템 리스트박스 데이터
|
||||
CntcSystemVO searchCntcSystemVO;
|
||||
searchCntcSystemVO = new CntcSystemVO();
|
||||
searchCntcSystemVO.setRecordCountPerPage(999999);
|
||||
searchCntcSystemVO.setFirstIndex(0);
|
||||
searchCntcSystemVO.setSearchCondition("CodeList");
|
||||
if (systemCntc.getProvdInsttId().equals("")) {
|
||||
if(cntcInsttList.size()>0) {
|
||||
EgovMap emp = (EgovMap)cntcInsttList.get(0);
|
||||
systemCntc.setProvdInsttId(emp.get("insttId").toString());
|
||||
}
|
||||
}
|
||||
searchCntcSystemVO.setInsttId(systemCntc.getProvdInsttId());
|
||||
List cntcProvdSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcProvdSystemList", cntcProvdSystemList);
|
||||
|
||||
if (systemCntc.getRequstInsttId().equals("")) {
|
||||
if(cntcInsttList.size()>0) {
|
||||
EgovMap emp = (EgovMap)cntcInsttList.get(0);
|
||||
systemCntc.setRequstInsttId(emp.get("insttId").toString());
|
||||
}
|
||||
}
|
||||
searchCntcSystemVO.setInsttId(systemCntc.getRequstInsttId());
|
||||
List cntcRequstSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcRequstSystemList", cntcRequstSystemList);
|
||||
|
||||
// 연계서비스 리스트박스 데이터
|
||||
CntcServiceVO searchCntcServiceVO;
|
||||
searchCntcServiceVO = new CntcServiceVO();
|
||||
searchCntcServiceVO.setRecordCountPerPage(999999);
|
||||
searchCntcServiceVO.setFirstIndex(0);
|
||||
searchCntcServiceVO.setSearchCondition("CodeList");
|
||||
searchCntcServiceVO.setInsttId(systemCntc.getProvdInsttId());
|
||||
if (systemCntc.getProvdSysId().equals("")) {
|
||||
if(cntcProvdSystemList.size()>0) {
|
||||
EgovMap emp = (EgovMap)cntcProvdSystemList.get(0);
|
||||
systemCntc.setProvdSysId(emp.get("sysId").toString());
|
||||
}
|
||||
}
|
||||
searchCntcServiceVO.setSysId(systemCntc.getProvdSysId());
|
||||
List cntcProvdServiceList = cntcInsttService.selectCntcServiceList(searchCntcServiceVO);
|
||||
model.addAttribute("cntcProvdServiceList", cntcProvdServiceList);
|
||||
|
||||
return "egovframework/com/ssi/syi/sim/EgovSystemCntcRegist";
|
||||
} else if (sCmd.equals("Regist")) {
|
||||
|
||||
beanValidator.validate(systemCntc, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
|
||||
return "egovframework/com/ssi/syi/sim/EgovSystemCntcRegist";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
systemCntc.setFrstRegisterId(uniqId);
|
||||
|
||||
// ID Generation
|
||||
String sCntcId = idgenService.getNextStringId();
|
||||
systemCntc.setCntcId(sCntcId);
|
||||
|
||||
systemCntcService.insertSystemCntc(systemCntc);
|
||||
return "forward:/ssi/syi/sim/getSystemCntcList.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/sim/getSystemCntcList.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계 상세내역을 조회한다.
|
||||
* @param loginVO
|
||||
* @param systemCntc
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/sim/EgovCcmSystemCntcDetail"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/sim/getSystemCntcDetail.do")
|
||||
public String selectSystemCntcDetail (SystemCntc systemCntc
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
|
||||
// 0. Spring Security 사용자권한 처리
|
||||
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
|
||||
if(!isAuthenticated) {
|
||||
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
||||
return "egovframework/com/uat/uia/EgovLoginUsr";
|
||||
}
|
||||
|
||||
String selfUri = "/ssi/syi/sim/getSystemCntcDetail.do";
|
||||
model.addAttribute("selfUri", selfUri);
|
||||
|
||||
SystemCntc vo = systemCntcService.selectSystemCntcDetail(systemCntc);
|
||||
model.addAttribute("result", vo);
|
||||
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
// 연계시스템 리스트박스 데이터
|
||||
CntcSystemVO searchCntcSystemVO;
|
||||
searchCntcSystemVO = new CntcSystemVO();
|
||||
searchCntcSystemVO.setRecordCountPerPage(999999);
|
||||
searchCntcSystemVO.setFirstIndex(0);
|
||||
searchCntcSystemVO.setSearchCondition("CodeList");
|
||||
searchCntcSystemVO.setInsttId(vo.getProvdInsttId());
|
||||
List cntcProvdSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcProvdSystemList", cntcProvdSystemList);
|
||||
|
||||
searchCntcSystemVO.setInsttId(vo.getRequstInsttId());
|
||||
List cntcRequstSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcRequstSystemList", cntcRequstSystemList);
|
||||
|
||||
// 연계서비스 리스트박스 데이터
|
||||
CntcServiceVO searchCntcServiceVO;
|
||||
searchCntcServiceVO = new CntcServiceVO();
|
||||
searchCntcServiceVO.setRecordCountPerPage(999999);
|
||||
searchCntcServiceVO.setFirstIndex(0);
|
||||
searchCntcServiceVO.setSearchCondition("CodeList");
|
||||
searchCntcServiceVO.setInsttId(vo.getProvdInsttId());
|
||||
searchCntcServiceVO.setSysId(vo.getProvdSysId());
|
||||
List cntcProvdServiceList = cntcInsttService.selectCntcServiceList(searchCntcServiceVO);
|
||||
model.addAttribute("cntcProvdServiceList", cntcProvdServiceList);
|
||||
|
||||
return "egovframework/com/ssi/syi/sim/EgovSystemCntcDetail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계 목록을 조회한다.
|
||||
* @param loginVO
|
||||
* @param searchVO
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/sim/EgovCcmSystemCntcList"
|
||||
* @throws Exception
|
||||
*/
|
||||
@IncludedInfo(name="시스템연계관리", listUrl="/ssi/syi/sim/getSystemCntcList.do", order = 1210,gid = 70)
|
||||
@RequestMapping(value="/ssi/syi/sim/getSystemCntcList.do")
|
||||
public String selectSystemCntcList (@ModelAttribute("searchVO") SystemCntcVO searchVO
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
|
||||
// 0. Spring Security 사용자권한 처리
|
||||
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
|
||||
if(!isAuthenticated) {
|
||||
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
||||
return "egovframework/com/uat/uia/EgovLoginUsr";
|
||||
}
|
||||
|
||||
String selfUri = "/ssi/syi/sim/getSystemCntcList.do";
|
||||
model.addAttribute("selfUri", selfUri);
|
||||
|
||||
/** EgovPropertyService.sample */
|
||||
searchVO.setPageUnit(propertiesService.getInt("pageUnit"));
|
||||
searchVO.setPageSize(propertiesService.getInt("pageSize"));
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
|
||||
paginationInfo.setPageSize(searchVO.getPageSize());
|
||||
|
||||
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List CmmnCodeList = systemCntcService.selectSystemCntcList(searchVO);
|
||||
model.addAttribute("resultList", CmmnCodeList);
|
||||
|
||||
int totCnt = systemCntcService.selectSystemCntcListTotCnt(searchVO);
|
||||
paginationInfo.setTotalRecordCount(totCnt);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "egovframework/com/ssi/syi/sim/EgovSystemCntcList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계를 수정한다.
|
||||
* @param loginVO
|
||||
* @param integInstt
|
||||
* @param bindingResult
|
||||
* @param commandMap
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/sim/EgovCcmAdministCodeModify"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/sim/updateSystemCntc.do")
|
||||
public String updateSystemCntc (@ModelAttribute("systemCntc") SystemCntc systemCntc
|
||||
, BindingResult bindingResult
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("")) {
|
||||
if (systemCntc.getCntcNm().equals("")) {
|
||||
SystemCntc vo = systemCntcService.selectSystemCntcDetail(systemCntc);
|
||||
model.addAttribute("systemCntc", vo);
|
||||
systemCntc.setProvdInsttId(vo.getProvdInsttId());
|
||||
systemCntc.setRequstInsttId(vo.getRequstInsttId());
|
||||
systemCntc.setProvdSysId(vo.getProvdSysId());
|
||||
}
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
// 연계시스템 리스트박스 데이터
|
||||
CntcSystemVO searchCntcSystemVO;
|
||||
searchCntcSystemVO = new CntcSystemVO();
|
||||
searchCntcSystemVO.setRecordCountPerPage(999999);
|
||||
searchCntcSystemVO.setFirstIndex(0);
|
||||
searchCntcSystemVO.setSearchCondition("CodeList");
|
||||
searchCntcSystemVO.setInsttId(systemCntc.getProvdInsttId());
|
||||
List cntcProvdSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcProvdSystemList", cntcProvdSystemList);
|
||||
|
||||
searchCntcSystemVO.setInsttId(systemCntc.getRequstInsttId());
|
||||
List cntcRequstSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcRequstSystemList", cntcRequstSystemList);
|
||||
|
||||
// 연계서비스 리스트박스 데이터
|
||||
CntcServiceVO searchCntcServiceVO;
|
||||
searchCntcServiceVO = new CntcServiceVO();
|
||||
searchCntcServiceVO.setRecordCountPerPage(999999);
|
||||
searchCntcServiceVO.setFirstIndex(0);
|
||||
searchCntcServiceVO.setSearchCondition("CodeList");
|
||||
searchCntcServiceVO.setInsttId(systemCntc.getProvdInsttId());
|
||||
searchCntcServiceVO.setSysId(systemCntc.getProvdSysId());
|
||||
List cntcProvdServiceList = cntcInsttService.selectCntcServiceList(searchCntcServiceVO);
|
||||
model.addAttribute("cntcProvdServiceList", cntcProvdServiceList);
|
||||
|
||||
return "egovframework/com/ssi/syi/sim/EgovSystemCntcUpdt";
|
||||
} else if (sCmd.equals("Modify")) {
|
||||
beanValidator.validate(systemCntc, bindingResult);
|
||||
if (bindingResult.hasErrors()){
|
||||
if (systemCntc.getCntcNm().equals("")) {
|
||||
SystemCntc vo = systemCntcService.selectSystemCntcDetail(systemCntc);
|
||||
model.addAttribute("systemCntc", vo);
|
||||
systemCntc.setProvdInsttId(vo.getProvdInsttId());
|
||||
systemCntc.setRequstInsttId(vo.getRequstInsttId());
|
||||
systemCntc.setProvdSysId(vo.getProvdSysId());
|
||||
}
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
// 연계시스템 리스트박스 데이터
|
||||
CntcSystemVO searchCntcSystemVO;
|
||||
searchCntcSystemVO = new CntcSystemVO();
|
||||
searchCntcSystemVO.setRecordCountPerPage(999999);
|
||||
searchCntcSystemVO.setFirstIndex(0);
|
||||
searchCntcSystemVO.setSearchCondition("CodeList");
|
||||
searchCntcSystemVO.setInsttId(systemCntc.getProvdInsttId());
|
||||
List cntcProvdSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcProvdSystemList", cntcProvdSystemList);
|
||||
|
||||
searchCntcSystemVO.setInsttId(systemCntc.getRequstInsttId());
|
||||
List cntcRequstSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcRequstSystemList", cntcRequstSystemList);
|
||||
|
||||
// 연계서비스 리스트박스 데이터
|
||||
CntcServiceVO searchCntcServiceVO;
|
||||
searchCntcServiceVO = new CntcServiceVO();
|
||||
searchCntcServiceVO.setRecordCountPerPage(999999);
|
||||
searchCntcServiceVO.setFirstIndex(0);
|
||||
searchCntcServiceVO.setSearchCondition("CodeList");
|
||||
searchCntcServiceVO.setInsttId(systemCntc.getProvdInsttId());
|
||||
searchCntcServiceVO.setSysId(systemCntc.getProvdSysId());
|
||||
List cntcProvdServiceList = cntcInsttService.selectCntcServiceList(searchCntcServiceVO);
|
||||
model.addAttribute("cntcProvdServiceList", cntcProvdServiceList);
|
||||
|
||||
return "egovframework/com/ssi/syi/sim/EgovSystemCntcUpdt";
|
||||
}
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
|
||||
systemCntc.setLastUpdusrId(uniqId);
|
||||
systemCntcService.updateSystemCntc(systemCntc);
|
||||
return "forward:/ssi/syi/sim/getSystemCntcList.do";
|
||||
} else {
|
||||
return "forward:/ssi/syi/sim/getSystemCntcList.do";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계 승인 목록을 조회한다.
|
||||
* @param loginVO
|
||||
* @param integInstt
|
||||
* @param bindingResult
|
||||
* @param commandMap
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/sim/EgovCcmAdministCodeModify"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/scm/getConfirmSystemCntcList.do")
|
||||
//@RequestMapping(value="/ssi/syi/sim/getSystemCntcList.do")
|
||||
public String selectConfirmSystemCntcList (@ModelAttribute("searchVO") SystemCntcVO searchVO
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
|
||||
// 0. Spring Security 사용자권한 처리
|
||||
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
|
||||
if(!isAuthenticated) {
|
||||
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
||||
return "egovframework/com/uat/uia/EgovLoginUsr";
|
||||
}
|
||||
|
||||
String selfUri = "/ssi/syi/scm/getConfirmSystemCntcList.do";
|
||||
model.addAttribute("selfUri", selfUri);
|
||||
|
||||
/** EgovPropertyService.sample */
|
||||
searchVO.setPageUnit(propertiesService.getInt("pageUnit"));
|
||||
searchVO.setPageSize(propertiesService.getInt("pageSize"));
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
|
||||
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
|
||||
paginationInfo.setPageSize(searchVO.getPageSize());
|
||||
|
||||
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
|
||||
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
|
||||
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List CmmnCodeList = systemCntcService.selectSystemCntcList(searchVO);
|
||||
model.addAttribute("resultList", CmmnCodeList);
|
||||
|
||||
int totCnt = systemCntcService.selectSystemCntcListTotCnt(searchVO);
|
||||
paginationInfo.setTotalRecordCount(totCnt);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "egovframework/com/ssi/syi/sim/EgovSystemCntcList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 시스템연계 승인 상세내역을 조회한다.
|
||||
* @param loginVO
|
||||
* @param systemCntc
|
||||
* @param model
|
||||
* @return "egovframework/com/ssi/syi/sim/EgovCcmSystemCntcDetail"
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/ssi/syi/scm/getConfirmSystemCntcDetail.do")
|
||||
//@RequestMapping(value="/ssi/syi/sim/getSystemCntcDetail.do")
|
||||
public String selectConfirmSystemCntcDetail (SystemCntc systemCntc
|
||||
, Map commandMap
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
|
||||
// 0. Spring Security 사용자권한 처리
|
||||
Boolean isAuthenticated = EgovUserDetailsHelper.isAuthenticated();
|
||||
if(!isAuthenticated) {
|
||||
model.addAttribute("message", egovMessageSource.getMessage("fail.common.login"));
|
||||
return "egovframework/com/uat/uia/EgovLoginUsr";
|
||||
}
|
||||
|
||||
String sCmd = commandMap.get("cmd") == null ? "" : (String)commandMap.get("cmd");
|
||||
if (sCmd.equals("Confirm")) {
|
||||
|
||||
// 로그인VO에서 사용자 정보 가져오기
|
||||
LoginVO loginVO = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
|
||||
String uniqId = loginVO.getUniqId();
|
||||
|
||||
systemCntc.setLastUpdusrId(uniqId);
|
||||
systemCntcService.confirmSystemCntc(systemCntc);
|
||||
}
|
||||
|
||||
String selfUri = "/ssi/syi/scm/getConfirmSystemCntcDetail.do";
|
||||
model.addAttribute("selfUri", selfUri);
|
||||
|
||||
SystemCntc vo = systemCntcService.selectSystemCntcDetail(systemCntc);
|
||||
model.addAttribute("result", vo);
|
||||
|
||||
// 연계기관 리스트박스 데이터
|
||||
CntcInsttVO searchCntcInsttVO;
|
||||
searchCntcInsttVO = new CntcInsttVO();
|
||||
searchCntcInsttVO.setRecordCountPerPage(999999);
|
||||
searchCntcInsttVO.setFirstIndex(0);
|
||||
searchCntcInsttVO.setSearchCondition("CodeList");
|
||||
List cntcInsttList = cntcInsttService.selectCntcInsttList(searchCntcInsttVO);
|
||||
model.addAttribute("cntcInsttList", cntcInsttList);
|
||||
|
||||
// 연계시스템 리스트박스 데이터
|
||||
CntcSystemVO searchCntcSystemVO;
|
||||
searchCntcSystemVO = new CntcSystemVO();
|
||||
searchCntcSystemVO.setRecordCountPerPage(999999);
|
||||
searchCntcSystemVO.setFirstIndex(0);
|
||||
searchCntcSystemVO.setSearchCondition("CodeList");
|
||||
searchCntcSystemVO.setInsttId(vo.getProvdInsttId());
|
||||
List cntcProvdSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcProvdSystemList", cntcProvdSystemList);
|
||||
|
||||
searchCntcSystemVO.setInsttId(vo.getRequstInsttId());
|
||||
List cntcRequstSystemList = cntcInsttService.selectCntcSystemList(searchCntcSystemVO);
|
||||
model.addAttribute("cntcRequstSystemList", cntcRequstSystemList);
|
||||
|
||||
// 연계서비스 리스트박스 데이터
|
||||
CntcServiceVO searchCntcServiceVO;
|
||||
searchCntcServiceVO = new CntcServiceVO();
|
||||
searchCntcServiceVO.setRecordCountPerPage(999999);
|
||||
searchCntcServiceVO.setFirstIndex(0);
|
||||
searchCntcServiceVO.setSearchCondition("CodeList");
|
||||
searchCntcServiceVO.setInsttId(vo.getProvdInsttId());
|
||||
searchCntcServiceVO.setSysId(vo.getProvdSysId());
|
||||
List cntcProvdServiceList = cntcInsttService.selectCntcServiceList(searchCntcServiceVO);
|
||||
model.addAttribute("cntcProvdServiceList", cntcProvdServiceList);
|
||||
|
||||
return "egovframework/com/ssi/syi/sim/EgovSystemCntcDetail";
|
||||
}
|
||||
|
||||
/**
|
||||
* Map 내용을 확인한다.
|
||||
* @param commandMap
|
||||
* @return
|
||||
*/
|
||||
public String printParameterMap(Map commandMap){
|
||||
String ret = "";
|
||||
for(Object key:commandMap.keySet()){
|
||||
Object value = commandMap.get(key);
|
||||
|
||||
ret += "key:" + key.toString() + " value:" + value.toString();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,459 @@
|
|||
package geoinfo.admins.board;
|
||||
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import geoinfo.admins.board.service.CommunityService;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.session.UserInfo;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Calendar;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
@Controller
|
||||
public class CommunityController {
|
||||
@Resource(name = "communityService")
|
||||
private CommunityService masterService;
|
||||
private final String savePath = EgovProperties.getProperty("Geoinfo.FilePath");
|
||||
|
||||
@RequestMapping(value = "admins/board/12.do")
|
||||
public String board00( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(10);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> result = masterService.selectInfo(params);
|
||||
|
||||
paginationInfo.setTotalRecordCount(Integer.valueOf(((EgovMap) result.get(0)).get("totalrows").toString()));
|
||||
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "admins/board/12";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/12_write.do")
|
||||
public String write12( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "admins/board/12_write";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/12_save", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap saveInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request, MultipartHttpServletRequest multiRequest) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
request.setCharacterEncoding("euc-kr");
|
||||
|
||||
String topnotice = params.get("topChk").toString();
|
||||
|
||||
params.put("topnotice", topnotice);
|
||||
params.put("password", "kictgis1234");
|
||||
|
||||
MultipartFile fileName1 = multiRequest.getFile("fileName1");
|
||||
MultipartFile fileName2 = multiRequest.getFile("fileName2");
|
||||
MultipartFile fileName3 = multiRequest.getFile("fileName3");
|
||||
|
||||
try {
|
||||
if(fileName1.getOriginalFilename().equals("")) {
|
||||
params.put("fileName1", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName1 = L_dat + "_" + L_tmp + fileName1.getOriginalFilename().substring(fileName1.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName1", saveName1);
|
||||
params.put("fileName1", fileName1.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName1));
|
||||
fileName1.transferTo(saveFile);
|
||||
}
|
||||
|
||||
if(fileName2.getOriginalFilename().equals("")) {
|
||||
params.put("fileName2", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName2 = L_dat + "_" + L_tmp + fileName2.getOriginalFilename().substring(fileName2.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName2", saveName2);
|
||||
params.put("fileName2", fileName2.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName2));
|
||||
fileName2.transferTo(saveFile);
|
||||
}
|
||||
|
||||
if(fileName3.getOriginalFilename().equals("")) {
|
||||
params.put("fileName3", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName3 = L_dat + "_" + L_tmp + fileName3.getOriginalFilename().substring(fileName3.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName3", saveName3);
|
||||
params.put("fileName3", fileName3.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName3));
|
||||
fileName3.transferTo(saveFile);
|
||||
}
|
||||
masterService.saveInfo(params);
|
||||
|
||||
jsonMap.put("success", true);
|
||||
} catch (IOException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/12-view.do")
|
||||
public String view01( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String aid;
|
||||
if(Objects.isNull(params.get("aid"))) {
|
||||
aid = params.get("idx").toString();
|
||||
} else {
|
||||
aid = params.get("aid").toString();
|
||||
}
|
||||
|
||||
EgovMap result = masterService.selectDetailInfo(params);
|
||||
|
||||
model.addAttribute("aid", aid);
|
||||
model.addAttribute("result", result);
|
||||
model.addAttribute("br", "\r");
|
||||
|
||||
return "admins/board/12-view";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/12-delete", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap delete12(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
try {
|
||||
masterService.deleteInfo(params);
|
||||
|
||||
String fileName1 = GeoinfoCommon.parseData(params.get("fileName1").toString());
|
||||
String fileName2 = GeoinfoCommon.parseData(params.get("fileName2").toString());
|
||||
String fileName3 = GeoinfoCommon.parseData(params.get("fileName3").toString());
|
||||
|
||||
File deleteFile1 = new File(savePath + "/" + FilenameUtils.getName(fileName1));
|
||||
if(deleteFile1.exists()) {
|
||||
deleteFile1.delete();
|
||||
}
|
||||
|
||||
File deleteFile2 = new File(savePath + "/" + FilenameUtils.getName(fileName2));
|
||||
if(deleteFile2.exists()) {
|
||||
deleteFile2.delete();
|
||||
}
|
||||
|
||||
File deleteFile3 = new File(savePath + "/" + FilenameUtils.getName(fileName3));
|
||||
if(deleteFile3.exists()) {
|
||||
deleteFile3.delete();
|
||||
}
|
||||
|
||||
jsonMap.put("success", true);
|
||||
} catch (IOException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/12-modify.do")
|
||||
public String modify12( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String aid = params.get("aid").toString();
|
||||
|
||||
EgovMap result = masterService.selectModifyInfo(params);
|
||||
|
||||
model.addAttribute("aid", aid);
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "admins/board/12-modify";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/12-modify-post", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap updateInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request, MultipartHttpServletRequest multiRequest) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
request.setCharacterEncoding("euc-kr");
|
||||
|
||||
String topnotice = params.get("top").toString();
|
||||
|
||||
params.put("topnotice", topnotice);
|
||||
params.put("password", "kictgis1234");
|
||||
|
||||
String delFile1 = params.get("delFile1").toString();
|
||||
String delFile2 = params.get("delFile2").toString();
|
||||
String delFile3 = params.get("delFile3").toString();
|
||||
|
||||
String preFile1 = params.get("preFile1").toString();
|
||||
String preFile2 = params.get("preFile2").toString();
|
||||
String preFile3 = params.get("preFile3").toString();
|
||||
|
||||
String preSaveNm1 = params.get("preSaveNm1").toString();
|
||||
String preSaveNm2 = params.get("preSaveNm2").toString();
|
||||
String preSaveNm3 = params.get("preSaveNm3").toString();
|
||||
|
||||
MultipartFile fileName1 = multiRequest.getFile("fileName1");
|
||||
MultipartFile fileName2 = multiRequest.getFile("fileName2");
|
||||
MultipartFile fileName3 = multiRequest.getFile("fileName3");
|
||||
|
||||
try {
|
||||
// if(!preFile1.equals("") && delFile1.equals("0") ) {
|
||||
if(!"".equals(preFile1) && "0".equals(delFile1)) {
|
||||
params.put("saveName1", preSaveNm1);
|
||||
params.put("fileName1", preFile1);
|
||||
} else {
|
||||
if(fileName1.getOriginalFilename().equals("")) {
|
||||
params.put("fileName1", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName1 = L_dat + "_" + L_tmp + fileName1.getOriginalFilename().substring(fileName1.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName1", saveName1);
|
||||
params.put("fileName1", fileName1.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName1));
|
||||
fileName1.transferTo(saveFile);
|
||||
}
|
||||
}
|
||||
|
||||
if(!"".equals(preFile2) && "0".equals(delFile2)) {
|
||||
params.put("saveName2", preSaveNm2);
|
||||
params.put("fileName2", preFile2);
|
||||
} else {
|
||||
if(fileName2.getOriginalFilename().equals("")) {
|
||||
params.put("fileName2", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName2 = L_dat + "_" + L_tmp + fileName2.getOriginalFilename().substring(fileName2.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName2", saveName2);
|
||||
params.put("fileName2", fileName2.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName2));
|
||||
fileName2.transferTo(saveFile);
|
||||
}
|
||||
}
|
||||
|
||||
if(!"".equals(preFile3) && "0".equals(delFile3)) {
|
||||
params.put("saveName3", preSaveNm3);
|
||||
params.put("fileName3", preFile3);
|
||||
} else {
|
||||
if(fileName3.getOriginalFilename().equals("")) {
|
||||
params.put("fileName3", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName3 = L_dat + "_" + L_tmp + fileName3.getOriginalFilename().substring(fileName3.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName3", saveName3);
|
||||
params.put("fileName3", fileName3.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName3));
|
||||
fileName3.transferTo(saveFile);
|
||||
}
|
||||
}
|
||||
masterService.updateInfo(params);
|
||||
|
||||
jsonMap.put("success", true);
|
||||
} catch (IOException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/12_reply_write.do")
|
||||
public String replyWrite(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
int pos = 0;
|
||||
String content = "";
|
||||
|
||||
EgovMap result = masterService.selectReplyInfo(params);
|
||||
|
||||
content = result.get("content").toString();
|
||||
|
||||
while((pos=content.indexOf("\'", pos)) != -1) {
|
||||
String left = content.substring(0, pos);
|
||||
String right = content.substring(pos, content.length());
|
||||
content = left + "\'" + right;
|
||||
pos += 2;
|
||||
}
|
||||
|
||||
result.put("content", content);
|
||||
|
||||
model.addAttribute("A", "작성자");
|
||||
model.addAttribute("B", "비밀번호");
|
||||
model.addAttribute("C", "제목");
|
||||
model.addAttribute("D", "내 용");
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "admins/board/12_reply_write";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/12_reply_save", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap replySave(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request, MultipartHttpServletRequest multiRequest) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
try {
|
||||
params.put("password", "kictgis1234");
|
||||
MultipartFile fileName = multiRequest.getFile("fileName");
|
||||
String seq = GeoinfoCommon.parseData(params.get("seq").toString());
|
||||
String lseq = seq.substring(0, 1);
|
||||
int seq_num = Integer.parseInt(seq);
|
||||
|
||||
String L_dat = null;
|
||||
String L_tmp = null;
|
||||
String saveName = "";
|
||||
|
||||
int idx = 0;
|
||||
|
||||
params.put("fileName2", "");
|
||||
params.put("saveName2", "");
|
||||
params.put("fileName3", "");
|
||||
params.put("saveName3", "");
|
||||
|
||||
boolean replyMax = true;
|
||||
|
||||
int maxIdx = masterService.getMaxIdx();
|
||||
|
||||
if(maxIdx == 0) {
|
||||
idx = 1;
|
||||
} else {
|
||||
idx = maxIdx + 1;
|
||||
}
|
||||
|
||||
params.put("idx", idx);
|
||||
|
||||
int seq_temp = 0;
|
||||
String mseq_right = "";
|
||||
|
||||
if(seq_num == 0) {
|
||||
int maxSeq = masterService.getMaxSeq(params);
|
||||
|
||||
seq_temp = maxSeq + 10;
|
||||
seq = Integer.toString(seq_temp);
|
||||
|
||||
params.put("seq", seq);
|
||||
|
||||
if(fileName.getOriginalFilename().equals("")) {
|
||||
params.put("fileName", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
saveName = L_dat + "_" + L_tmp + fileName.getOriginalFilename().substring(fileName.getOriginalFilename().lastIndexOf("."));
|
||||
|
||||
params.put("saveName", saveName);
|
||||
params.put("fileName", fileName.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName));
|
||||
fileName.transferTo(saveFile);
|
||||
}
|
||||
masterService.replyWrite(params);
|
||||
} else {
|
||||
params.put("lseq", lseq);
|
||||
|
||||
int maxSeq2 = masterService.getMaxSeq2(params);
|
||||
|
||||
mseq_right = Integer.toString(maxSeq2).substring(1, 2);
|
||||
|
||||
if("9".equals(mseq_right)) {
|
||||
replyMax = false;
|
||||
} else {
|
||||
seq_temp = maxSeq2 + 1;
|
||||
seq = Integer.toString(seq_temp);
|
||||
|
||||
params.put("seq", seq);
|
||||
|
||||
if(fileName.getOriginalFilename().equals("")) {
|
||||
params.put("fileName", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
saveName = L_dat + "_" + L_tmp + fileName.getOriginalFilename().substring(fileName.getOriginalFilename().lastIndexOf("."));
|
||||
|
||||
params.put("saveName", saveName);
|
||||
params.put("fileName", fileName.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName));
|
||||
fileName.transferTo(saveFile);
|
||||
}
|
||||
masterService.replyWrite(params);
|
||||
}
|
||||
}
|
||||
|
||||
jsonMap.put("replyMax", replyMax);
|
||||
jsonMap.put("success", true);
|
||||
} catch (IOException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
package geoinfo.admins.board;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import geoinfo.admins.board.service.FreqAskQueService;
|
||||
import geoinfo.session.UserInfo;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@Controller
|
||||
public class FreqAskQueController {
|
||||
@Resource(name = "freqAskQueService")
|
||||
private FreqAskQueService masterService;
|
||||
|
||||
@RequestMapping(value = "admins/board/11.do")
|
||||
public String board00( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(10);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> result = masterService.selectInfo(params);
|
||||
|
||||
paginationInfo.setTotalRecordCount(Integer.valueOf(((EgovMap) result.get(0)).get("totalrows").toString()));
|
||||
|
||||
model.addAttribute("LT", "<");
|
||||
model.addAttribute("GT", ">");
|
||||
model.addAttribute("br", "\r");
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "admins/board/11";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/11-write.do")
|
||||
public String write11( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "admins/board/11-write";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/11-write-post", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap saveInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
String subject = params.get("subject").toString();
|
||||
String contents = params.get("contents").toString();
|
||||
|
||||
if(subject != null) {
|
||||
subject = subject.replaceAll("<","<");
|
||||
subject = subject.replaceAll(">",">");
|
||||
|
||||
params.put("subject", subject);
|
||||
}
|
||||
if(contents != null){
|
||||
contents = contents.replaceAll("<","<");
|
||||
contents = contents.replaceAll(">",">");
|
||||
contents = contents.replaceAll("\n","<br>");
|
||||
|
||||
params.put("contents", contents);
|
||||
}
|
||||
|
||||
try{
|
||||
params.put("password", "kictgis1234");
|
||||
int maxIdx = masterService.getMaxIdx();
|
||||
|
||||
params.put("maxIdx", maxIdx);
|
||||
params.put("cls", "2");
|
||||
|
||||
masterService.saveInfo(params);
|
||||
|
||||
jsonMap.put("success", true);
|
||||
} catch (SQLException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/11-delete", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap deleteInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
try {
|
||||
masterService.deleteInfo(params);
|
||||
jsonMap.put("success", true);
|
||||
} catch (SQLException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/11-modify.do")
|
||||
public String modifyInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
EgovMap result = masterService.selectModifyInfo(params);
|
||||
|
||||
String subject = result.get("subject").toString();
|
||||
String content = result.get("content").toString();
|
||||
|
||||
if(subject != null) {
|
||||
subject = subject.replaceAll("<","<");
|
||||
subject = subject.replaceAll(">",">");
|
||||
|
||||
result.put("subject", subject);
|
||||
}
|
||||
|
||||
if(content != null) {
|
||||
content = content.replaceAll("<","<");
|
||||
content = content.replaceAll(">",">");
|
||||
content = content.replaceAll("<br>","\n");
|
||||
|
||||
result.put("content", content);
|
||||
}
|
||||
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "admins/board/11-modify";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/11-modify-post", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap updateInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
String subject = params.get("subject").toString();
|
||||
String content = params.get("content").toString();
|
||||
|
||||
if(subject != null) {
|
||||
subject = subject.replaceAll("<","<");
|
||||
subject = subject.replaceAll(">",">");
|
||||
|
||||
params.put("subject", subject);
|
||||
}
|
||||
|
||||
if(content != null) {
|
||||
content = content.replaceAll("<","<");
|
||||
content = content.replaceAll(">",">");
|
||||
content = content.replaceAll("\n","<br>");
|
||||
|
||||
params.put("content", content);
|
||||
}
|
||||
|
||||
try{
|
||||
masterService.updateInfo(params);
|
||||
jsonMap.put("success", true);
|
||||
} catch (SQLException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,346 @@
|
|||
package geoinfo.admins.board;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Calendar;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import geoinfo.admins.board.service.GroundReportService;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.session.UserInfo;
|
||||
|
||||
@Controller
|
||||
public class GroundReportController {
|
||||
|
||||
@Resource(name = "groundReportService")
|
||||
private GroundReportService masterService;
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(RefrncRoomController.class.getName());
|
||||
|
||||
// 운영서버 실제 경로
|
||||
private final String savePath = EgovProperties.getProperty("Geoinfo.FilePath");
|
||||
//private final String savePath = "C:\\app\\files\\ground_report";
|
||||
|
||||
@RequestMapping(value = "admins/greport/13.do")
|
||||
public String greport00( @RequestParam HashMap<String, Object> params,
|
||||
ModelMap model,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(10);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> result = masterService.selectInfo(params);
|
||||
|
||||
int totalRows = 0;
|
||||
if ( ! result.isEmpty() ) {
|
||||
EgovMap totalRowsMap = (EgovMap) result.get(0);
|
||||
if ( totalRowsMap != null ) {
|
||||
String totalRowsStr = (String) totalRowsMap.get("totalrows");
|
||||
totalRows = Integer.valueOf(totalRowsStr);
|
||||
}
|
||||
}
|
||||
paginationInfo.setTotalRecordCount(totalRows);
|
||||
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "admins/greport/13";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/greport/13_write.do")
|
||||
public String write13( @RequestParam HashMap<String, Object> params,
|
||||
ModelMap model,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "admins/greport/13_write";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/greport/13_save", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap saveInfo(@RequestParam HashMap<String, Object> params,
|
||||
ModelMap model,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request,
|
||||
MultipartHttpServletRequest multiRequest) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
request.setCharacterEncoding("euc-kr");
|
||||
|
||||
String topnotice = params.get("topChk").toString();
|
||||
|
||||
params.put("topnotice", topnotice);
|
||||
|
||||
MultipartFile fileName1 = multiRequest.getFile("fileName1");
|
||||
MultipartFile fileName2 = multiRequest.getFile("fileName2");
|
||||
MultipartFile fileName3 = multiRequest.getFile("fileName3");
|
||||
|
||||
try {
|
||||
if(fileName1.getOriginalFilename().equals("")) {
|
||||
params.put("fileName1", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName1 = L_dat + "_" + L_tmp + fileName1.getOriginalFilename().substring(fileName1.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName1", saveName1);
|
||||
params.put("fileName1", fileName1.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName1));
|
||||
fileName1.transferTo(saveFile);
|
||||
}
|
||||
|
||||
if(fileName2.getOriginalFilename().equals("")) {
|
||||
params.put("fileName2", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName2 = L_dat + "_" + L_tmp + fileName2.getOriginalFilename().substring(fileName2.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName2", saveName2);
|
||||
params.put("fileName2", fileName2.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName2));
|
||||
fileName2.transferTo(saveFile);
|
||||
}
|
||||
|
||||
if(fileName3.getOriginalFilename().equals("")) {
|
||||
params.put("fileName3", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName3 = L_dat + "_" + L_tmp + fileName3.getOriginalFilename().substring(fileName3.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName3", saveName3);
|
||||
params.put("fileName3", fileName3.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName3));
|
||||
fileName3.transferTo(saveFile);
|
||||
}
|
||||
masterService.saveInfo(params);
|
||||
|
||||
jsonMap.put("success", true);
|
||||
} catch (IOException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/greport/13-view.do")
|
||||
public String view01( @RequestParam HashMap<String, Object> params,
|
||||
ModelMap model,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String idx = params.get("idx").toString();
|
||||
|
||||
EgovMap result = masterService.selectDetailInfo(params);
|
||||
|
||||
model.addAttribute("idx", idx);
|
||||
model.addAttribute("result", result);
|
||||
model.addAttribute("br", "\r");
|
||||
|
||||
return "admins/greport/13-view";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/greport/13-delete", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap delete13(@RequestParam HashMap<String, Object> params,
|
||||
ModelMap model,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return model;
|
||||
}
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
try {
|
||||
masterService.deleteInfo(params);
|
||||
|
||||
String fileName1 = GeoinfoCommon.parseData(params.get("fileName1").toString());
|
||||
|
||||
File deleteFile1 = new File(savePath + "/" + FilenameUtils.getName(fileName1));
|
||||
if(deleteFile1.exists()) {
|
||||
deleteFile1.delete();
|
||||
}
|
||||
|
||||
jsonMap.put("success", true);
|
||||
} catch (IOException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/greport/13-modify.do")
|
||||
public String modify13( @RequestParam HashMap<String, Object> params,
|
||||
ModelMap model,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String idx = params.get("idx").toString();
|
||||
|
||||
EgovMap result = masterService.selectModifyInfo(params);
|
||||
|
||||
model.addAttribute("idx", idx);
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "admins/greport/13-modify";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/greport/13-modify-post", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap updateInfo(@RequestParam HashMap<String, Object> params,
|
||||
ModelMap model,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request,
|
||||
MultipartHttpServletRequest multiRequest) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
request.setCharacterEncoding("euc-kr");
|
||||
|
||||
//String topnotice = params.get("top").toString();
|
||||
|
||||
//params.put("topnotice", topnotice);
|
||||
|
||||
//String delFile1 = params.get("delFile1").toString();
|
||||
|
||||
//String preFile1 = params.get("preFile1").toString();
|
||||
|
||||
//String preSaveNm1 = params.get("preSaveNm1").toString();
|
||||
|
||||
MultipartFile fileName1 = multiRequest.getFile("REPORT_FILE");
|
||||
|
||||
try {
|
||||
|
||||
if(fileName1.getOriginalFilename().equals("")) {
|
||||
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName1 = L_dat + "_" + L_tmp + fileName1.getOriginalFilename().substring(fileName1.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveNm", saveName1);
|
||||
params.put("fileNm", fileName1.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName1));
|
||||
fileName1.transferTo(saveFile);
|
||||
}
|
||||
|
||||
String idx = (String) request.getParameter("idx");
|
||||
String regNm = (String) request.getParameter("regNm");
|
||||
String regOrg = (String) request.getParameter("regOrg");
|
||||
String regHp = (String) request.getParameter("regHp");
|
||||
|
||||
params.put("idx", idx);
|
||||
params.put("regNm", regNm);
|
||||
params.put("regOrg", regOrg);
|
||||
params.put("regHp", regHp);
|
||||
|
||||
masterService.updateInfo(params);
|
||||
|
||||
jsonMap.put("success", true);
|
||||
} catch (IOException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
// 2018-11-30
|
||||
// 파일 다운로드 민간조사보고서 다운로드 기능
|
||||
@RequestMapping(value = "admins/greport/fileDownload.do")
|
||||
public void fileDownload(@RequestParam HashMap<String, Object> params,
|
||||
ModelMap model,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) throws Exception {
|
||||
|
||||
String savename = params.get("savename").toString();
|
||||
|
||||
File file = new File(savePath + "\\" + FilenameUtils.getName(savename));
|
||||
|
||||
response.setContentType("multipart/form-data");
|
||||
response.setContentLength((int)file.length());
|
||||
response.setHeader("Content-Disposition", GeoinfoCommon.safeHttpHeader("attachment; filename=\"" + savename + "\""));
|
||||
response.setHeader("Content-Transfer-Encoding", "binary");
|
||||
|
||||
OutputStream out = response.getOutputStream();
|
||||
FileInputStream fis = null;
|
||||
|
||||
try {
|
||||
fis = new FileInputStream(file);
|
||||
FileCopyUtils.copy(fis, out);
|
||||
}
|
||||
catch(IOException e){
|
||||
LOGGER.error(e);
|
||||
}finally{
|
||||
if(fis != null){
|
||||
try{
|
||||
fis.close();
|
||||
}catch(IOException e){
|
||||
LOGGER.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
out.flush();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,265 @@
|
|||
package geoinfo.admins.board;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import geoinfo.admins.board.service.QnaService;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.session.UserInfo;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@Controller
|
||||
public class QnaController {
|
||||
@Resource(name = "qnaService")
|
||||
private QnaService masterService;
|
||||
|
||||
// #####
|
||||
@RequestMapping(value = "admins/board/00.do")
|
||||
public String board00( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
paginationInfo.setRecordCountPerPage(10);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
int maxRowNum = masterService.getMaxRowNum(params);
|
||||
|
||||
paginationInfo.setTotalRecordCount(maxRowNum);
|
||||
|
||||
if (params.get("pageIndex") == null || params.get("pageIndex").equals("") || Integer.parseInt((String) params.get("pageIndex"))<=0 ) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
}else if(Integer.parseInt((String)params.get("pageIndex")) > paginationInfo.getLastPageNo()){
|
||||
paginationInfo.setCurrentPageNo(paginationInfo.getLastPageNo());
|
||||
params.put("pageIndex", paginationInfo.getLastPageNo());
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo((Integer) Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
//System.out.println("sss - " + paginationInfo.getFirstRecordIndex());
|
||||
params.put("firstIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> qnaList = masterService.getQnaList(params);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("rowNo", maxRowNum);
|
||||
model.addAttribute("qnaList", qnaList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
// 2018. 08.03 추가 게시판 검색 기능
|
||||
model.addAttribute("pageIndex",params.get("pageIndex") );
|
||||
model.addAttribute("searchTitle",params.get("searchTitle") );
|
||||
model.addAttribute("searchKey",params.get("searchKey") );
|
||||
|
||||
return "admins/board/00";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/00-view.do")
|
||||
public String selectInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
//int aid = Integer.parseInt(params.get("aid").toString());
|
||||
|
||||
List<?> result = masterService.selectQnaInfo(params);
|
||||
|
||||
System.out.println("params - " + params);
|
||||
model.addAttribute("result", result);
|
||||
model.addAttribute("br", "\r");
|
||||
// 2018. 08.03 추가 게시판 검색 기능
|
||||
model.addAttribute("params", params);
|
||||
return "admins/board/00-view";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/00-delete", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap deleteInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
try {
|
||||
masterService.deleteInfo(params);
|
||||
jsonMap.put("success", true);
|
||||
} catch (SQLException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/00-modify.do")
|
||||
public String modifyInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
int aid = Integer.parseInt(params.get("aid").toString());
|
||||
|
||||
EgovMap result = masterService.selectModifyInfo(params);
|
||||
|
||||
model.addAttribute("aid", aid);
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "admins/board/00-modify";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/00-modify-post", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap updateInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
try{
|
||||
masterService.updateInfo(params);
|
||||
jsonMap.put("success", true);
|
||||
} catch (SQLException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "body/psboard/psboard_reply_write.do")
|
||||
public String replyWrite(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
int pos = 0;
|
||||
String content = "";
|
||||
|
||||
EgovMap result = masterService.selectReplyInfo(params);
|
||||
|
||||
content = result.get("content").toString();
|
||||
|
||||
while((pos=content.indexOf("\'", pos)) != -1) {
|
||||
String left = content.substring(0, pos);
|
||||
String right = content.substring(pos, content.length());
|
||||
content = left + "\'" + right;
|
||||
pos += 2;
|
||||
}
|
||||
|
||||
result.put("content", content);
|
||||
|
||||
model.addAttribute("A", "작성자");
|
||||
model.addAttribute("B", "비밀번호");
|
||||
model.addAttribute("C", "제목");
|
||||
model.addAttribute("D", "내 용");
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "body/psboard/psboard_reply_write";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "body/psboard/psboard_reply_save", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap replySave(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
try {
|
||||
String seq = GeoinfoCommon.parseData(params.get("seq").toString());
|
||||
String lseq = seq.substring(0, 1);
|
||||
int seq_num = Integer.parseInt(seq);
|
||||
params.put("password", "kictgis1234");
|
||||
|
||||
int idx = 0;
|
||||
|
||||
boolean replyMax = true;
|
||||
|
||||
int maxIdx = masterService.getMaxIdx();
|
||||
|
||||
if(maxIdx == 0) {
|
||||
idx = 1;
|
||||
} else {
|
||||
idx = maxIdx + 1;
|
||||
}
|
||||
|
||||
params.put("idx", idx);
|
||||
|
||||
int seq_temp = 0;
|
||||
String mseq_right = "";
|
||||
|
||||
if(seq_num == 0) {
|
||||
int maxSeq = masterService.getMaxSeq(params);
|
||||
|
||||
seq_temp = maxSeq + 10;
|
||||
seq = Integer.toString(seq_temp);
|
||||
|
||||
params.put("seq", seq);
|
||||
masterService.replyWrite(params);
|
||||
} else {
|
||||
params.put("lseq", lseq);
|
||||
|
||||
int maxSeq2 = masterService.getMaxSeq2(params);
|
||||
|
||||
mseq_right = Integer.toString(maxSeq2).substring(1, 2);
|
||||
|
||||
if("9".equals(mseq_right)) {
|
||||
replyMax = false;
|
||||
} else {
|
||||
seq_temp = maxSeq2 + 1;
|
||||
seq = Integer.toString(seq_temp);
|
||||
|
||||
params.put("seq", seq);
|
||||
masterService.replyWrite(params);
|
||||
}
|
||||
}
|
||||
|
||||
jsonMap.put("replyMax", replyMax);
|
||||
jsonMap.put("success", true);
|
||||
} catch (SQLException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/00_write.do")
|
||||
public String writeInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "admins/board/00_write";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/00_save", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap saveInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
params.put("password", "kictgis1234");
|
||||
try{
|
||||
masterService.saveInfo(params);
|
||||
jsonMap.put("success", true);
|
||||
} catch (SQLException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,380 @@
|
|||
package geoinfo.admins.board;
|
||||
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import geoinfo.admins.board.service.RefrncRoomService;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.session.UserInfo;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Calendar;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
@Controller
|
||||
public class RefrncRoomController {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(RefrncRoomController.class.getName());
|
||||
|
||||
@Resource(name = "refrncRoomService")
|
||||
private RefrncRoomService masterService;
|
||||
|
||||
private final String savePath = EgovProperties.getProperty("Geoinfo.FilePath");
|
||||
|
||||
@RequestMapping(value = "admins/board/01.do")
|
||||
public String board01( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(10);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> result = masterService.selectInfoList(params);
|
||||
|
||||
paginationInfo.setTotalRecordCount(Integer.valueOf(((EgovMap) result.get(0)).get("totalrows").toString()));
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("result", result);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "admins/board/01";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/01_write.do")
|
||||
public String write01( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String pId = params.get("pId").toString();
|
||||
|
||||
model.addAttribute("pId", pId);
|
||||
|
||||
return "admins/board/01_write";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/01_write-post", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap saveInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request, MultipartHttpServletRequest multiRequest) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
request.setCharacterEncoding("utf-8");
|
||||
|
||||
String subject = params.get("subject").toString();
|
||||
String contents = params.get("contents").toString();
|
||||
String cls = params.get("cls").toString();
|
||||
String topnotice = params.get("topChk").toString();
|
||||
|
||||
params.put("subject", subject);
|
||||
params.put("contents", contents);
|
||||
params.put("cls", cls);
|
||||
params.put("topnotice", topnotice);
|
||||
|
||||
MultipartFile fileName1 = multiRequest.getFile("fileName1");
|
||||
MultipartFile fileName2 = multiRequest.getFile("fileName2");
|
||||
MultipartFile fileName3 = multiRequest.getFile("fileName3");
|
||||
|
||||
try {
|
||||
if(fileName1.getOriginalFilename().equals("")) {
|
||||
params.put("fileName1", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName1 = L_dat + "_" + L_tmp + fileName1.getOriginalFilename().substring(fileName1.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName1", saveName1);
|
||||
params.put("fileName1", fileName1.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName1));
|
||||
fileName1.transferTo(saveFile);
|
||||
}
|
||||
|
||||
if(fileName2.getOriginalFilename().equals("")) {
|
||||
params.put("fileName2", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName2 = L_dat + "_" + L_tmp + fileName2.getOriginalFilename().substring(fileName2.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName2", saveName2);
|
||||
params.put("fileName2", fileName2.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName2));
|
||||
fileName2.transferTo(saveFile);
|
||||
}
|
||||
|
||||
if(fileName3.getOriginalFilename().equals("")) {
|
||||
params.put("fileName3", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName3 = L_dat + "_" + L_tmp + fileName3.getOriginalFilename().substring(fileName3.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName3", saveName3);
|
||||
params.put("fileName3", fileName3.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName3));
|
||||
fileName3.transferTo(saveFile);
|
||||
}
|
||||
masterService.saveInfo(params);
|
||||
|
||||
jsonMap.put("success", true);
|
||||
} catch (IOException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/01_view.do")
|
||||
public String view01( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String aid;
|
||||
if(Objects.isNull(params.get("aid"))) {
|
||||
aid = params.get("idx").toString();
|
||||
} else {
|
||||
aid = params.get("aid").toString();
|
||||
}
|
||||
|
||||
EgovMap result = masterService.selectDetailInfo(params);
|
||||
|
||||
model.addAttribute("aid", aid);
|
||||
model.addAttribute("result", result);
|
||||
model.addAttribute("br", "\r");
|
||||
|
||||
return "admins/board/01_view";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/01_delete", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap delete01(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
try {
|
||||
masterService.deleteInfo(params);
|
||||
|
||||
String fileName1 = GeoinfoCommon.parseData(params.get("fileName1").toString());
|
||||
String fileName2 = GeoinfoCommon.parseData(params.get("fileName2").toString());
|
||||
String fileName3 = GeoinfoCommon.parseData(params.get("fileName3").toString());
|
||||
|
||||
params.put("fileName1", fileName1);
|
||||
params.put("fileName2", fileName2);
|
||||
params.put("fileName3", fileName3);
|
||||
|
||||
File deleteFile1 = new File(savePath + "/" + FilenameUtils.getName(fileName1));
|
||||
if(deleteFile1.exists()) {
|
||||
deleteFile1.delete();
|
||||
}
|
||||
|
||||
File deleteFile2 = new File(savePath + "/" + FilenameUtils.getName(fileName2));
|
||||
if(deleteFile2.exists()) {
|
||||
deleteFile2.delete();
|
||||
}
|
||||
|
||||
File deleteFile3 = new File(savePath + "/" + FilenameUtils.getName(fileName3));
|
||||
if(deleteFile3.exists()) {
|
||||
deleteFile3.delete();
|
||||
}
|
||||
|
||||
jsonMap.put("success", true);
|
||||
} catch (IOException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/01-modify.do")
|
||||
public String modify01( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String aid = params.get("aid").toString();
|
||||
|
||||
EgovMap result = masterService.selectModifyInfo(params);
|
||||
|
||||
model.addAttribute("aid", aid);
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "admins/board/01-modify";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/fileDownload.do")
|
||||
public void fileDownload(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
String savename = params.get("savename").toString();
|
||||
|
||||
File file = new File(savePath + "\\" + FilenameUtils.getName(savename));
|
||||
|
||||
response.setContentType("multipart/form-data");
|
||||
response.setContentLength((int)file.length());
|
||||
response.setHeader("Content-Disposition", GeoinfoCommon.safeHttpHeader("attachment; filename=\"" + savename + "\""));
|
||||
response.setHeader("Content-Transfer-Encoding", "binary");
|
||||
|
||||
OutputStream out = response.getOutputStream();
|
||||
FileInputStream fis = null;
|
||||
|
||||
try {
|
||||
fis = new FileInputStream(file);
|
||||
FileCopyUtils.copy(fis, out);
|
||||
}
|
||||
catch(IOException e){
|
||||
LOGGER.error(e);
|
||||
}finally{
|
||||
if(fis != null){
|
||||
try{
|
||||
fis.close();
|
||||
}catch(IOException e){
|
||||
LOGGER.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
out.flush();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/board/01-modify-post", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap updateInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request, MultipartHttpServletRequest multiRequest) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
request.setCharacterEncoding("utf-8");
|
||||
|
||||
String subject = params.get("subject").toString();
|
||||
String contents = params.get("contents").toString();
|
||||
String topnotice = params.get("top").toString();
|
||||
|
||||
params.put("subject", subject);
|
||||
params.put("contents", contents);
|
||||
params.put("topnotice", topnotice);
|
||||
|
||||
String delFile1 = params.get("delFile1").toString();
|
||||
String delFile2 = params.get("delFile2").toString();
|
||||
String delFile3 = params.get("delFile3").toString();
|
||||
|
||||
String preFile1 = params.get("preFile1").toString();
|
||||
String preFile2 = params.get("preFile2").toString();
|
||||
String preFile3 = params.get("preFile3").toString();
|
||||
|
||||
String preSaveNm1 = params.get("preSaveNm1").toString();
|
||||
String preSaveNm2 = params.get("preSaveNm2").toString();
|
||||
String preSaveNm3 = params.get("preSaveNm3").toString();
|
||||
|
||||
MultipartFile fileName1 = multiRequest.getFile("fileName1");
|
||||
MultipartFile fileName2 = multiRequest.getFile("fileName2");
|
||||
MultipartFile fileName3 = multiRequest.getFile("fileName3");
|
||||
|
||||
try {
|
||||
if(!"".equals(preFile1) && "0".equals(delFile1)) {
|
||||
params.put("saveName1", preSaveNm1);
|
||||
params.put("fileName1", preFile1);
|
||||
} else {
|
||||
if(fileName1.getOriginalFilename().equals("")) {
|
||||
params.put("fileName1", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName1 = L_dat + "_" + L_tmp + fileName1.getOriginalFilename().substring(fileName1.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName1", saveName1);
|
||||
params.put("fileName1", fileName1.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName1));
|
||||
fileName1.transferTo(saveFile);
|
||||
}
|
||||
}
|
||||
|
||||
if(!"".equals(preFile2) && "0".equals(delFile2)) {
|
||||
params.put("saveName2", preSaveNm2);
|
||||
params.put("fileName2", preFile2);
|
||||
} else {
|
||||
if(fileName2.getOriginalFilename().equals("")) {
|
||||
params.put("fileName2", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName2 = L_dat + "_" + L_tmp + fileName2.getOriginalFilename().substring(fileName2.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName2", saveName2);
|
||||
params.put("fileName2", fileName2.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName2));
|
||||
fileName2.transferTo(saveFile);
|
||||
}
|
||||
}
|
||||
|
||||
if(!"".equals(preFile3) && "0".equals(delFile3)) {
|
||||
params.put("saveName3", preSaveNm3);
|
||||
params.put("fileName3", preFile3);
|
||||
} else {
|
||||
if(fileName3.getOriginalFilename().equals("")) {
|
||||
params.put("fileName3", "");
|
||||
} else {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
String L_dat = cal.get(Calendar.YEAR) + "_" + cal.get(Calendar.MONTH)+ "_" + cal.get(Calendar.DATE);
|
||||
String L_tmp = cal.get(Calendar.HOUR) + "_" + cal.get(Calendar.MINUTE)+ "_" + cal.get(Calendar.SECOND);
|
||||
String saveName3 = L_dat + "_" + L_tmp + fileName3.getOriginalFilename().substring(fileName3.getOriginalFilename().lastIndexOf("."));
|
||||
params.put("saveName3", saveName3);
|
||||
params.put("fileName3", fileName3.getOriginalFilename());
|
||||
|
||||
File saveFile = new File(savePath, FilenameUtils.getName(saveName3));
|
||||
fileName3.transferTo(saveFile);
|
||||
}
|
||||
}
|
||||
masterService.updateInfo(params);
|
||||
|
||||
jsonMap.put("success", true);
|
||||
} catch (IOException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package geoinfo.admins.board.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Mapper("communityMapper")
|
||||
public interface CommunityMapper {
|
||||
|
||||
public List<?> selectInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectDetailInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectReplyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxIdx() throws Exception;
|
||||
|
||||
public int getMaxSeq(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxSeq2(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void replyWrite(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package geoinfo.admins.board.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
|
||||
|
||||
public interface CommunityService {
|
||||
|
||||
public List<?> selectInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectDetailInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectReplyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxIdx() throws Exception;
|
||||
|
||||
public int getMaxSeq(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxSeq2(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void replyWrite(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package geoinfo.admins.board.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Mapper("freqAskQueMapper")
|
||||
public interface FreqAskQueMapper {
|
||||
|
||||
public List<?> selectInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxIdx() throws Exception;
|
||||
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package geoinfo.admins.board.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
|
||||
|
||||
public interface FreqAskQueService {
|
||||
|
||||
public List<?> selectInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxIdx() throws Exception;
|
||||
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package geoinfo.admins.board.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Mapper("groundReportMapper")
|
||||
public interface GroundReportMapper {
|
||||
|
||||
public List<?> selectInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectDetailInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectReplyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxIdx() throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package geoinfo.admins.board.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
|
||||
|
||||
public interface GroundReportService {
|
||||
|
||||
public List<?> selectInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectDetailInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectReplyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxIdx() throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package geoinfo.admins.board.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Mapper("qnaMapper")
|
||||
public interface QnaMapper {
|
||||
|
||||
public int getMaxRowNum(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public List<?> getQnaList(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public List<?> selectQnaInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectReplyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxIdx() throws Exception;
|
||||
|
||||
public int getMaxSeq(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxSeq2(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void replyWrite(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package geoinfo.admins.board.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
|
||||
|
||||
public interface QnaService {
|
||||
|
||||
public int getMaxRowNum(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public List<?> getQnaList(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public List<?> selectQnaInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectReplyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxIdx() throws Exception;
|
||||
|
||||
public int getMaxSeq(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int getMaxSeq2(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void replyWrite(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package geoinfo.admins.board.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Mapper("refrncRoomMapper")
|
||||
public interface RefrncRoomMapper {
|
||||
|
||||
public List<?> selectInfoList(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectDetailInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package geoinfo.admins.board.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
|
||||
|
||||
public interface RefrncRoomService {
|
||||
|
||||
public List<?> selectInfoList(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectDetailInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package geoinfo.admins.board.service.impl;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.admins.board.service.CommunityMapper;
|
||||
import geoinfo.admins.board.service.CommunityService;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("communityService")
|
||||
public class CommunityServiceImpl implements CommunityService {
|
||||
|
||||
@Resource(name = "communityMapper")
|
||||
private CommunityMapper masterMapper;
|
||||
|
||||
@Override
|
||||
public List<?> selectInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.saveInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectDetailInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectDetailInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.deleteInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectModifyInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.updateInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectReplyInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectReplyInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxIdx() throws Exception {
|
||||
return masterMapper.getMaxIdx();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSeq(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.getMaxSeq(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSeq2(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.getMaxSeq2(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replyWrite(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.replyWrite(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package geoinfo.admins.board.service.impl;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.admins.board.service.FreqAskQueMapper;
|
||||
import geoinfo.admins.board.service.FreqAskQueService;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("freqAskQueService")
|
||||
public class FreqAskQueServiceImpl implements FreqAskQueService {
|
||||
|
||||
@Resource(name = "freqAskQueMapper")
|
||||
private FreqAskQueMapper masterMapper;
|
||||
|
||||
@Override
|
||||
public List<?> selectInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxIdx() throws Exception {
|
||||
return masterMapper.getMaxIdx();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.saveInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.deleteInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectModifyInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.updateInfo(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package geoinfo.admins.board.service.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.admins.board.service.GroundReportMapper;
|
||||
import geoinfo.admins.board.service.GroundReportService;
|
||||
|
||||
@Service("groundReportService")
|
||||
public class GroundReportServiceImpl implements GroundReportService {
|
||||
|
||||
@Resource(name = "groundReportMapper")
|
||||
private GroundReportMapper masterMapper;
|
||||
|
||||
@Override
|
||||
public List<?> selectInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.saveInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectDetailInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectDetailInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.deleteInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectModifyInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.updateInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectReplyInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectReplyInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxIdx() throws Exception {
|
||||
return masterMapper.getMaxIdx();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package geoinfo.admins.board.service.impl;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.admins.board.service.QnaMapper;
|
||||
import geoinfo.admins.board.service.QnaService;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("qnaService")
|
||||
public class QnaServiceImpl implements QnaService {
|
||||
|
||||
@Resource(name = "qnaMapper")
|
||||
private QnaMapper masterMapper;
|
||||
|
||||
@Override
|
||||
public int getMaxRowNum(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.getMaxRowNum(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<?> getQnaList(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.getQnaList(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<?> selectQnaInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectQnaInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.deleteInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectModifyInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.updateInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectReplyInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectReplyInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxIdx() throws Exception {
|
||||
return masterMapper.getMaxIdx();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSeq(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.getMaxSeq(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSeq2(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.getMaxSeq2(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replyWrite(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.replyWrite(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.saveInfo(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package geoinfo.admins.board.service.impl;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.admins.board.service.RefrncRoomMapper;
|
||||
import geoinfo.admins.board.service.RefrncRoomService;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("refrncRoomService")
|
||||
public class RefrncRoomServiceImpl implements RefrncRoomService {
|
||||
|
||||
@Resource(name = "refrncRoomMapper")
|
||||
private RefrncRoomMapper masterMapper;
|
||||
|
||||
@Override
|
||||
public List<?> selectInfoList(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectInfoList(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.saveInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectDetailInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectDetailInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.deleteInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectModifyInfo(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectModifyInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateInfo(HashMap<String, Object> params) throws Exception {
|
||||
masterMapper.updateInfo(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,201 @@
|
|||
package geoinfo.admins.chLog;
|
||||
|
||||
import geoinfo.admins.chLog.service.BoringInfoStatService;
|
||||
import geoinfo.com.EgovExcel;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.comm.util.strUtil;
|
||||
import geoinfo.session.UserInfo;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URLEncoder;
|
||||
import java.sql.SQLException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import com.clipsoft.clipreport.oof.OOFDocument;
|
||||
import com.clipsoft.clipreport.oof.OOFFile;
|
||||
import com.clipsoft.clipreport.oof.connection.OOFConnection;
|
||||
import com.clipsoft.clipreport.server.service.ReportUtil;
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 유통/공급 통계분석 > 시추정보통계를 처리하는 Controller 클래스
|
||||
*
|
||||
* @author 공간정보기술(주)
|
||||
* @since 2017.06.07
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------------ ---------------- ---------------------------
|
||||
* 2017.06.07 공간정보기술(주) 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class BoringInfoStatController {
|
||||
@Resource(name = "boringInfoStatService")
|
||||
private BoringInfoStatService masterService;
|
||||
|
||||
@RequestMapping(value = "admins/staticState/30.do")
|
||||
public String selectInfoListStaticState(ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "admins/staticState/30";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/staticState/30_jsondata_grid1", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap selectInfoGrid(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
strUtil sUtil = new strUtil();
|
||||
|
||||
String srchMode = sUtil.checkNull(GeoinfoCommon.parseData(params.get("searchMode").toString()));
|
||||
String startDate = sUtil.checkNull(GeoinfoCommon.parseData(params.get("startDate").toString()));
|
||||
String endDate = sUtil.checkNull(GeoinfoCommon.parseData(params.get("endDate").toString()));
|
||||
|
||||
if("search".equals(srchMode) == false) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
Calendar currentDate = Calendar.getInstance();
|
||||
|
||||
currentDate.add(Calendar.MONTH, -3);
|
||||
startDate = dateFormat.format(currentDate.getTime());
|
||||
|
||||
endDate = dateFormat.format(currentDate.getTime());
|
||||
}
|
||||
|
||||
if(("").equals(startDate)) {
|
||||
startDate = "00000000";
|
||||
}
|
||||
|
||||
if(("").equals(endDate)) {
|
||||
endDate = "99999999";
|
||||
}
|
||||
|
||||
params.put("srchStartDate", startDate);
|
||||
params.put("srchEndDate", endDate);
|
||||
|
||||
try{
|
||||
ArrayList<?> result = masterService.selectInfoGrid(params);
|
||||
|
||||
jsonMap.put("srchStartDate", startDate);
|
||||
jsonMap.put("srchEndDate", endDate);
|
||||
jsonMap.put("dataList1", result);
|
||||
jsonMap.put("success", true);
|
||||
} catch (SQLException Ex) {
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "web/popup/calender.do")
|
||||
public String selectInfoCalender(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
strUtil sUtil = new strUtil();
|
||||
String inputID = sUtil.checkNull(params.get("id").toString());
|
||||
|
||||
model.addAttribute("inputID", inputID);
|
||||
|
||||
return "web/popup/calender";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/staticState/input.do")
|
||||
public String selectInfoListInput(ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "admins/staticState/input";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/staticState/downloadStatReport.do")
|
||||
public String selectInfoListReport(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String srchStartDate = params.get("startDate").toString();
|
||||
String srchEndDate = params.get("endDate").toString();
|
||||
|
||||
OOFDocument oof = OOFDocument.newOOF();
|
||||
|
||||
String domain = "localhost".equals(request.getServerName()) ?
|
||||
request.getServerName()+":"+request.getServerPort() : request.getServerName();
|
||||
|
||||
OOFFile file = oof.addFile("crf.root", "http://"+domain+"/web/rex/statistic/statistic.crf");
|
||||
OOFConnection oc = file.addConnectionData("*","oracle1");
|
||||
oof.addField("start_year", srchStartDate);
|
||||
oof.addField("end_year", srchEndDate);
|
||||
|
||||
String propertyPath = request.getSession().getServletContext().getRealPath("") + File.separator + "WEB-INF" + File.separator + "clipreport4" + File.separator + "clipreport4.properties";
|
||||
|
||||
String resultKey = ReportUtil.createReport(request, oof.toString(), "false", "false", "localhost", propertyPath);
|
||||
|
||||
model.addAttribute("resultKey", resultKey);
|
||||
|
||||
return "admins/staticState/downloadStatReport";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/userLog/30_excel.do")
|
||||
public void selectInfoListVisitorExcel(XSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
List<?> selectInfoListExcel = masterService.selectInfoListExcel();
|
||||
|
||||
String[] arrHeader = {"다운로드 날짜", "이메일", "핸드폰", "프로젝트 명", "이름", "아이디", "활용범위"};
|
||||
|
||||
map.put("selectInfoListExcel", selectInfoListExcel);
|
||||
map.put("arrHeader", arrHeader);
|
||||
map.put("sheetName", "시추정보 다운로드 현황");
|
||||
map.put("fileName", "시추정보다운로드현황_");
|
||||
|
||||
buildExcelDocument(map, workbook, request, response);
|
||||
}
|
||||
|
||||
public void buildExcelDocument(Map<String, Object> model, XSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
List<?> selectInfoListExcel = (List<?>) model.get("selectInfoListExcel");
|
||||
|
||||
String[] arrHeader = (String[]) model.get("arrHeader");
|
||||
|
||||
Sheet sheet = workbook.createSheet((String) model.get("sheetName"));
|
||||
|
||||
EgovExcel.SetExcelList(workbook, sheet, arrHeader, selectInfoListExcel, 0, 0);
|
||||
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("Content-disposition", "attachment;filename="
|
||||
+ URLEncoder.encode((String) model.get("fileName") + (new SimpleDateFormat("yyyy.MM.dd", Locale.KOREA)).format(new Date()), "UTF-8") + ".xlsx" + ";");
|
||||
ServletOutputStream myOut = response.getOutputStream();
|
||||
workbook.write(myOut); // 파일 저장
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,977 @@
|
|||
package geoinfo.admins.chLog;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.poi.hssf.usermodel.HSSFRow;
|
||||
import org.apache.poi.hssf.usermodel.HSSFSheet;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.CellStyle;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import geoinfo.admins.board.RefrncRoomController;
|
||||
import geoinfo.admins.chLog.service.ChInfoService;
|
||||
import geoinfo.com.EgovExcel;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.session.UserInfo;
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 유통/공급 통계분석 > 유통정보를 처리하는 Controller 클래스
|
||||
*
|
||||
* @author 공간정보기술(주)
|
||||
* @since 2017.06.07
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------------ ---------------- ---------------------------
|
||||
* 2017.06.07 공간정보기술(주) 최초 생성
|
||||
* 2023.11.01 ICTWAY 임효주 공종/공정/광역시도/시군구별 통계 추가
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class ChInfoController {
|
||||
@Resource(name = "chInfoService")
|
||||
private ChInfoService masterService;
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(RefrncRoomController.class.getName());
|
||||
|
||||
// 운영서버 경로
|
||||
// private final String savePath = "D:\\Tomcat6\\geoinfoEgov\\webapps\\geoinfo\\files";
|
||||
// 개발서버 경로
|
||||
private final String savePath = EgovProperties.getProperty("Geoinfo.FilePath");
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 유통/공급 통계분석 > 유통정보 > 날짜별 리스트
|
||||
*
|
||||
* @param params
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/00.do")
|
||||
public String selectInfoListDate(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
List<?> getYear_date = masterService.getYear_date();
|
||||
|
||||
if ("".equals(params.get("year")) || params.get("year") == null) {
|
||||
params.put("year", ((EgovMap) getYear_date.get(0)).get("value"));
|
||||
}
|
||||
|
||||
List<?> getMonth_date = masterService.getMonth_date(params);
|
||||
|
||||
if ("".equals(params.get("month")) || params.get("month") == null || (getMonth_date.size() != 0 && getMonth_date.size() < Integer.valueOf((String) params.get("month")))) {
|
||||
params.put("month", ((EgovMap) getMonth_date.get(0)).get("value"));
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(20);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
if (params.get("agreeyn") == null || "".equals(params.get("agreeyn"))) {
|
||||
params.put("agreeyn", "0");
|
||||
}
|
||||
if (params.get("downyn") == null || "".equals(params.get("downyn"))) {
|
||||
params.put("downyn", "0");
|
||||
}
|
||||
|
||||
List<?> resultList = masterService.selectInfoListDate(params);
|
||||
|
||||
int totalCnt = resultList.size() == 0 ? 0 : Integer.valueOf(((EgovMap) resultList.get(0)).get("totalrows").toString());
|
||||
paginationInfo.setTotalRecordCount(totalCnt);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("getYear_date", getYear_date);
|
||||
model.addAttribute("getMonth_date", getMonth_date);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "admins/chLog/00";
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 유통/공급 통계분석 > 유통정보 > 날짜별 리스트 > 그래프
|
||||
*
|
||||
* @param params
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/00_graph.do")
|
||||
public String selectInfoGraph(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
List<?> getYear_date = masterService.getYear_date();
|
||||
|
||||
if ("".equals(params.get("year")) || params.get("year") == null) {
|
||||
params.put("year", ((EgovMap) getYear_date.get(0)).get("value"));
|
||||
}
|
||||
|
||||
List<?> getMonth_date = masterService.getMonth_date(params);
|
||||
|
||||
if ("".equals(params.get("month")) || params.get("month") == null || (getMonth_date.size() != 0 && getMonth_date.size() < Integer.valueOf((String) params.get("month")))) {
|
||||
params.put("month", ((EgovMap) getMonth_date.get(0)).get("value"));
|
||||
}
|
||||
|
||||
EgovMap result = masterService.selectInfoGraph(params);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("getYear_date", getYear_date);
|
||||
model.addAttribute("getMonth_date", getMonth_date);
|
||||
model.addAttribute("result", result);
|
||||
|
||||
return "admins/chLog/00_graph";
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 유통/공급 통계분석 > 유통정보 > 날짜별 리스트 엑셀 다운로드
|
||||
*
|
||||
* @param params
|
||||
* @param workbook
|
||||
* @param request
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/00_excel.do")
|
||||
public void selectInfoListDateExcel(@RequestParam HashMap<String, Object> params, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response)
|
||||
throws Exception {
|
||||
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
List<?> selectInfoListExcel = masterService.selectInfoListDateExcel(params);
|
||||
|
||||
String[] arrHeader = { "번호", "사업명", "다운로드 수" };
|
||||
|
||||
map.put("selectInfoListExcel", selectInfoListExcel);
|
||||
map.put("arrHeader", arrHeader);
|
||||
map.put("sheetName", "날짜별 유통정보");
|
||||
map.put("fileName", "날짜별유통정보_");
|
||||
|
||||
buildExcelDocument(map, workbook, request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 유통/공급 통계분석 > 유통정보 > 사업별 리스트
|
||||
*
|
||||
* @param params
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/01.do")
|
||||
public String selectInfoListBusiness(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(20);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> resultList = masterService.selectInfoListBusiness(params);
|
||||
|
||||
int totalCnt = resultList.size() == 0 ? 0 : Integer.valueOf(((EgovMap) resultList.get(0)).get("totalrows").toString());
|
||||
paginationInfo.setTotalRecordCount(totalCnt);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "admins/chLog/01";
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 유통/공급 통계분석 > 유통정보 > 사업별 리스트 엑셀 다운로드
|
||||
*
|
||||
* @param params
|
||||
* @param workbook
|
||||
* @param request
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/01_excel.do")
|
||||
public void selectInfoListBusinessExcel(@RequestParam HashMap<String, Object> params, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response)
|
||||
throws Exception {
|
||||
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
List<?> selectInfoListExcel = masterService.selectInfoListBusinessExcel(params);
|
||||
|
||||
String[] arrHeader = { "번호", "사업명", "다운로드 수" };
|
||||
|
||||
map.put("selectInfoListExcel", selectInfoListExcel);
|
||||
map.put("arrHeader", arrHeader);
|
||||
map.put("sheetName", "사업별 유통정보");
|
||||
map.put("fileName", "사업별유통정보_");
|
||||
|
||||
buildExcelDocument(map, workbook, request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 유통/공급 통계분석 > 유통정보 > 다운로드 로그정보 팝업
|
||||
*
|
||||
* @param params
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/download_view.do")
|
||||
public String selectInfoListDateLogPop(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request)
|
||||
throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(6);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> resultList = masterService.selectInfoListDateLogPop(params);
|
||||
|
||||
int totalCnt = resultList.size() == 0 ? 0 : Integer.valueOf(((EgovMap) resultList.get(0)).get("totalrows").toString());
|
||||
paginationInfo.setTotalRecordCount(totalCnt);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "admins/chLog/download_view";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/03.do")
|
||||
public String selectInfoListPurpose(ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
List<?> resultList = masterService.selectInfoListPurpose();
|
||||
|
||||
model.addAttribute("resultList", resultList);
|
||||
|
||||
return "admins/chLog/03";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/03_excel.do")
|
||||
public void selectInfoListPurposeExcel(HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
List<?> selectInfoListExcel = masterService.selectInfoListPurpose();
|
||||
|
||||
String[] arrHeader = { "년도", "정책입안", "학술연구", "공사계획 및 예비조사", "기본설계", "실시설계", "시공 및 유지관리", "사업비산정", "지하시설물 유지관리",
|
||||
"스마트시티","도시재생","지진 예방","산사태 예방","급경사지 관리","홍수 예방","지하안전영향평가","소규모지하안전영향평가","사후지하안전영향조사","지반침하위험도평가","지하안전점검",
|
||||
"기타", "검수", "총계" };
|
||||
|
||||
map.put("selectInfoListExcel", selectInfoListExcel);
|
||||
map.put("arrHeader", arrHeader);
|
||||
map.put("sheetName", "목적별 유통정보");
|
||||
map.put("fileName", "목적별유통정보_");
|
||||
|
||||
buildExcelDocument(map, workbook, request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 2023.11.01 LHJ 공종별 시추공등록 통계 추가
|
||||
* 2023.11.01 LHJ 유통/공급 통계분석 > 유통정보 > 공종별 리스트
|
||||
*
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/11.do")
|
||||
public String selectInfoListGongjong(ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
List<Map<String, Object>> originalList = masterService.selectInfoListGongjong();
|
||||
List<List<Object>> transposedList = new ArrayList<>();
|
||||
transposedList = transposeMatrix(originalList);
|
||||
List<List<Object>> resultList = transposedList;
|
||||
model.addAttribute("resultList", resultList);
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String jsonList = mapper.writeValueAsString(resultList);
|
||||
model.addAttribute("jsonList", jsonList);
|
||||
|
||||
return "admins/chLog/11";
|
||||
}
|
||||
|
||||
/**
|
||||
* 2024.01.09 LHJ 공정별 시추공등록 통계 추가
|
||||
* 2023.01.09 LHJ 유통/공급 통계분석 > 유통정보 > 공정별 리스트
|
||||
*
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/12.do")
|
||||
public String selectInfoListGongjeong(ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
List<Map<String, Object>> originalList = masterService.selectInfoListGongjeong();
|
||||
List<List<Object>> transposedList = new ArrayList<>();
|
||||
transposedList = transposeMatrix(originalList);
|
||||
List<List<Object>> resultList = transposedList;
|
||||
model.addAttribute("resultList", resultList);
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String jsonList = mapper.writeValueAsString(resultList);
|
||||
model.addAttribute("jsonList", jsonList);
|
||||
|
||||
return "admins/chLog/12";
|
||||
}
|
||||
|
||||
/**
|
||||
* 2024.01.10 LHJ 시도별 프로젝트 등록 통계 추가
|
||||
* 2023.01.10 LHJ 유통/공급 통계분석 > 유통정보 > 시도별 리스트
|
||||
*
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/13.do")
|
||||
public String selectInfoListSido(ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
List<Map<String, Object>> originalList = masterService.selectInfoListSido();
|
||||
List<List<Object>> transposedList = new ArrayList<>();
|
||||
transposedList = transposeMatrix(originalList);
|
||||
List<List<Object>> resultList = transposedList;
|
||||
model.addAttribute("resultList", resultList);
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String jsonList = mapper.writeValueAsString(resultList);
|
||||
model.addAttribute("jsonList", jsonList);
|
||||
|
||||
return "admins/chLog/13";
|
||||
}
|
||||
|
||||
/**
|
||||
* 2024.01.30 LHJ 시군구별 프로젝트 등록 통계 추가
|
||||
* 2023.01.30 LHJ 유통/공급 통계분석 > 유통정보 > 시군구별 리스트
|
||||
*
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/14.do")
|
||||
public String selectInfoListSigungu_imsi(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
String sidoCode;
|
||||
|
||||
if(params != null && params.get("sidoCode") != null && !((params.get("sidoCode")).equals(""))) {
|
||||
sidoCode = params.get("sidoCode").toString();
|
||||
} else {
|
||||
sidoCode = "04:";
|
||||
}
|
||||
|
||||
List<Map<String, Object>> sigunguCode = masterService.selectSigunguCode(sidoCode);
|
||||
|
||||
int sidoLength = 0;
|
||||
List<String> aliasList = new ArrayList<>();
|
||||
outerloop:
|
||||
|
||||
for (char first = 'A'; first <= 'Z'; ++first) {
|
||||
for (char second = 'A'; second <= 'Z'; ++second) {
|
||||
aliasList.add("" + first + second);
|
||||
sidoLength++;
|
||||
if (sidoLength == sigunguCode.size()) {
|
||||
break outerloop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HashMap<String, Object> paramMap = new HashMap<>();
|
||||
|
||||
paramMap.put("sigunguCode", sigunguCode);
|
||||
paramMap.put("sidoCode", sidoCode);
|
||||
paramMap.put("aliasList", aliasList);
|
||||
|
||||
List<Map<String, Object>> originalList = masterService.selectInfoListSigungu(paramMap);
|
||||
List<List<Object>> transposedList = new ArrayList<>();
|
||||
transposedList = transposeMatrix(originalList);
|
||||
List<List<Object>> resultList = transposedList;
|
||||
model.addAttribute("resultList", resultList);
|
||||
|
||||
model.addAttribute("sidoCode", sidoCode);
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String jsonList = mapper.writeValueAsString(resultList);
|
||||
model.addAttribute("jsonList", jsonList);
|
||||
|
||||
return "admins/chLog/14";
|
||||
}
|
||||
|
||||
|
||||
public void buildExcelDocument(Map<String, Object> model, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
List<?> selectInfoListExcel = (List<?>) model.get("selectInfoListExcel");
|
||||
|
||||
String[] arrHeader = (String[]) model.get("arrHeader");
|
||||
|
||||
Sheet sheet = workbook.createSheet((String) model.get("sheetName"));
|
||||
|
||||
if (Objects.nonNull(arrHeader)) {
|
||||
EgovExcel.SetExcelList(workbook, sheet, arrHeader, selectInfoListExcel, 0, 0);
|
||||
} else {
|
||||
EgovExcel.SetExcelList(workbook, sheet, selectInfoListExcel, 0, 0);
|
||||
}
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("Content-disposition", "attachment;filename="
|
||||
+ URLEncoder.encode((String) model.get("fileName") + (new SimpleDateFormat("yyyyMMdd", Locale.KOREA)).format(new Date()), "UTF-8") + ".xls" + ";");
|
||||
ServletOutputStream myOut = response.getOutputStream();
|
||||
workbook.write(myOut); // 파일 저장
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/41.do")
|
||||
public String selectLiqInfoList( @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(10); //searchVO.getPageUnit()
|
||||
paginationInfo.setPageSize(10); //searc1hVO.getPageSize()
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> resultList = masterService.selectLiqInfoList(params);
|
||||
int totCnt = masterService.selectLiqInfoListCnt(params);
|
||||
paginationInfo.setTotalRecordCount(totCnt);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("liqInfo", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "admins/chLog/41";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/41_view.do")
|
||||
public String selectLiqInfoDetailView(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
EgovMap resultList = masterService.selectWebLiqInfo(params);
|
||||
|
||||
String cntChk = "R";
|
||||
String purpose_code = "READ";
|
||||
|
||||
params.put("cntChk", cntChk);
|
||||
params.put("purpose_code", purpose_code);
|
||||
|
||||
masterService.updateLiqInfoLog(params);
|
||||
|
||||
model.addAttribute("detailView", resultList);
|
||||
model.addAttribute("br", "\r");
|
||||
|
||||
return "admins/chLog/41_view";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/41_write.do")
|
||||
public String selectLiqInfoListWrite(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "admins/chLog/41_write";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/51.do")
|
||||
public String selectLiqInfoListDate(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(20);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
if((params.get("searchTitle") == null || "".equals(params.get("searchTitle")))) {
|
||||
params.put("searchTitle", "2");
|
||||
}else {
|
||||
params.put("searchTitle", params.get("searchTitle"));
|
||||
}
|
||||
|
||||
List<?> resultList = masterService.selectLiqInfoListDate(params);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
|
||||
return "admins/chLog/51";
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 액상화 위험지도 사업별 통계 엑셀 다운로드
|
||||
*
|
||||
* @param params
|
||||
* @param workbook
|
||||
* @param request
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/notice/51_excel.do")
|
||||
public void selectLiqInfoListDateExcel(@RequestParam HashMap<String, Object> params, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response)
|
||||
throws Exception {
|
||||
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
List<?> selectLiqInfoListExcel = masterService.selectLiqInfoListDateExcel(params);
|
||||
|
||||
String[] arrHeader = { "번호", "파일명", "주소", "조회 수" , "다운로드 수" };
|
||||
|
||||
map.put("selectLiqInfoListExcel", selectLiqInfoListExcel);
|
||||
map.put("arrHeader", arrHeader);
|
||||
map.put("sheetName", "액상화 위험정보");
|
||||
map.put("fileName", "액상화 위험정보_");
|
||||
|
||||
buildExcelLiq(map, workbook, request, response);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/52.do")
|
||||
public String selectSidoInfoListDate(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(20);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
if((params.get("searchTitle") == null || "".equals(params.get("searchTitle")))) {
|
||||
params.put("searchTitle", "1");
|
||||
}else {
|
||||
params.put("searchTitle", params.get("searchTitle"));
|
||||
}
|
||||
List<?> resultList = masterService.selectLiqSidoInfoListDate(params);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
|
||||
return "admins/chLog/52";
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 액상화 위험지도 지역별 통계 엑셀 다운로드
|
||||
*
|
||||
* @param params
|
||||
* @param workbook
|
||||
* @param request
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/notice/52_excel.do")
|
||||
public void selectSidoInfoListDateExcel(@RequestParam HashMap<String, Object> params, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response)
|
||||
throws Exception {
|
||||
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
List<?> selectLiqInfoListExcel = masterService.selectLiqInfoListDateExcel(params);
|
||||
|
||||
String[] arrHeader = { "번호", "파일명", "주소", "조회 수" , "다운로드 수" };
|
||||
|
||||
map.put("selectLiqInfoListExcel", selectLiqInfoListExcel);
|
||||
map.put("arrHeader", arrHeader);
|
||||
map.put("sheetName", "액상화 위험정보");
|
||||
map.put("fileName", "액상화 위험정보_");
|
||||
|
||||
buildExcelLiq(map, workbook, request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 액상화 위험지도 로그정보 팝업
|
||||
*
|
||||
* @param params
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/download_liq.do")
|
||||
public String selectLiqInfoListDateLogPop(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request)
|
||||
throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(6);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> resultList = masterService.selectLiqInfoListLogPop(params);
|
||||
|
||||
int totalCnt = resultList.size() == 0 ? 0 : Integer.valueOf(((EgovMap) resultList.get(0)).get("totalrows").toString());
|
||||
paginationInfo.setTotalRecordCount(totalCnt);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "admins/chLog/download_liq";
|
||||
}
|
||||
|
||||
public void buildExcelLiq(Map<String, Object> model, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
List<?> selectLiqInfoListExcel = (List<?>) model.get("selectLiqInfoListExcel");
|
||||
|
||||
String[] arrHeader = (String[]) model.get("arrHeader");
|
||||
|
||||
Sheet sheet = workbook.createSheet((String) model.get("sheetName"));
|
||||
|
||||
EgovExcel.SetExcelList(workbook, sheet, arrHeader, selectLiqInfoListExcel, 0, 0);
|
||||
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setHeader("Content-disposition", "attachment;filename="
|
||||
+ URLEncoder.encode((String) model.get("fileName") + (new SimpleDateFormat("yyyy.MM.dd", Locale.KOREA)).format(new Date()), "UTF-8") + ".xls" + ";");
|
||||
ServletOutputStream myOut = response.getOutputStream();
|
||||
workbook.write(myOut); // 파일 저장
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/liq/fileDownload.do")
|
||||
public void fileDownload(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
String savename = params.get("savename").toString();
|
||||
|
||||
String cntChk = "D";
|
||||
String purpose_code = "DOWN";
|
||||
|
||||
params.put("cntChk", cntChk);
|
||||
params.put("purpose_code", purpose_code);
|
||||
masterService.updateLiqInfoLog(params);
|
||||
|
||||
File file = new File(savePath + "\\" + FilenameUtils.getName(savename));
|
||||
|
||||
response.setContentType("multipart/form-data");
|
||||
response.setContentLength((int)file.length());
|
||||
response.setHeader("Content-Disposition", GeoinfoCommon.safeHttpHeader("attachment; filename=\"" + savename + "\""));
|
||||
response.setHeader("Content-Transfer-Encoding", "binary");
|
||||
|
||||
OutputStream out = response.getOutputStream();
|
||||
FileInputStream fis = null;
|
||||
|
||||
try {
|
||||
fis = new FileInputStream(file);
|
||||
FileCopyUtils.copy(fis, out);
|
||||
}
|
||||
catch(IOException e){
|
||||
LOGGER.error(e);
|
||||
}finally{
|
||||
if(fis != null){
|
||||
try{
|
||||
fis.close();
|
||||
}catch(IOException e){
|
||||
LOGGER.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
out.flush();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private List<List<Object>> transposeMatrix(List<Map<String, Object>> originalList) {
|
||||
|
||||
List<List<Object>> valueList = new ArrayList<>();
|
||||
List<List<Object>> transposedList = new ArrayList<>();
|
||||
|
||||
/** originalList의 value만 list로 만듬 **/
|
||||
for (Map<String, Object> row : originalList) {
|
||||
valueList.add(new ArrayList<>(row.values()));
|
||||
}
|
||||
|
||||
/** 행과 열 뒤집음 **/
|
||||
if (!valueList.isEmpty()) {
|
||||
int size = valueList.get(0).size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
List<Object> columnData = new ArrayList<>();
|
||||
for (List<Object> row : valueList) {
|
||||
columnData.add(row.get(i));
|
||||
}
|
||||
transposedList.add(columnData);
|
||||
}
|
||||
}
|
||||
|
||||
/** 첫번째 열 숫자의 오름차순 순서대로 행의 순서를 정리하고, 그 첫번째 열을 삭제함 **/
|
||||
Collections.sort(transposedList, new java.util.Comparator<List<Object>>() {
|
||||
@Override
|
||||
public int compare(List<Object> o1, List<Object> o2) {
|
||||
return Integer.compare(Integer.parseInt((String) o1.get(0)), Integer.parseInt((String) o2.get(0)));
|
||||
}
|
||||
});
|
||||
for (List<Object> row : transposedList) {
|
||||
row.remove(0);
|
||||
}
|
||||
|
||||
/** 숫자 포맷팅 **/
|
||||
DecimalFormat df = new DecimalFormat("#,###");
|
||||
for (int i = 1; i < transposedList.size(); i++) {
|
||||
List<Object> row = transposedList.get(i);
|
||||
for (int j = 0; j < row.size(); j++) {
|
||||
Object data = row.get(j);
|
||||
if (data instanceof String) {
|
||||
try {
|
||||
Number num = df.parse((String) data);
|
||||
row.set(j, df.format(num));
|
||||
} catch (ParseException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return transposedList;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/downloadExcel.do", method = RequestMethod.POST)
|
||||
public void downloadExcel(@RequestParam HashMap<String, Object> params, HSSFWorkbook workbook, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
String pId = (String) params.get("pId");
|
||||
String resultListJson = (String) params.get("resultList");
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
List<List<Object>> result = mapper.readValue(resultListJson, new TypeReference<List<List<Object>>>(){});
|
||||
|
||||
String fileName = "";
|
||||
String sheetName = "";
|
||||
|
||||
switch (pId) {
|
||||
case "11":
|
||||
fileName = "공종별등록정보_";
|
||||
sheetName = "공종별등록정보";
|
||||
break;
|
||||
case "12":
|
||||
fileName = "공정별등록정보_";
|
||||
sheetName = "공정별등록정보";
|
||||
break;
|
||||
case "13":
|
||||
fileName = "시도별등록정보_";
|
||||
sheetName = "시도별등록정보";
|
||||
break;
|
||||
case "14":
|
||||
String sidoCode = (String) params.get("sidoCode");
|
||||
switch (sidoCode) {
|
||||
case "04:":
|
||||
fileName = "시군구별_서울특별시_";
|
||||
sheetName = "시군구별_서울특별시";
|
||||
break;
|
||||
case "05:":
|
||||
fileName = "시군구별_부산광역시_";
|
||||
sheetName = "시군구별_부산광역시";
|
||||
break;
|
||||
case "06:":
|
||||
fileName = "시군구별_광주광역시_";
|
||||
sheetName = "시군구별_광주광역시";
|
||||
break;
|
||||
case "07:":
|
||||
fileName = "시군구별_대전광역시_";
|
||||
sheetName = "시군구별_대전광역시";
|
||||
break;
|
||||
case "08:":
|
||||
fileName = "시군구별_대구광역시_";
|
||||
sheetName = "시군구별_대구광역시";
|
||||
break;
|
||||
case "09:":
|
||||
fileName = "시군구별_인천광역시_";
|
||||
sheetName = "시군구별_인천광역시";
|
||||
break;
|
||||
case "10:":
|
||||
fileName = "시군구별_울산광역시_";
|
||||
sheetName = "시군구별_울산광역시";
|
||||
break;
|
||||
case "11:":
|
||||
fileName = "시군구별_경기도_";
|
||||
sheetName = "시군구별_경기도";
|
||||
break;
|
||||
case "12:":
|
||||
fileName = "시군구별_강원도_";
|
||||
sheetName = "시군구별_강원도";
|
||||
break;
|
||||
case "13:":
|
||||
fileName = "시군구별_충청북도_";
|
||||
sheetName = "시군구별_충청북도";
|
||||
break;
|
||||
case "14:":
|
||||
fileName = "시군구별_충청남도_";
|
||||
sheetName = "시군구별_충청남도";
|
||||
break;
|
||||
case "15:":
|
||||
fileName = "시군구별_경상북도_";
|
||||
sheetName = "시군구별_경상북도";
|
||||
break;
|
||||
case "16:":
|
||||
fileName = "시군구별_경상남도_";
|
||||
sheetName = "시군구별_경상남도";
|
||||
break;
|
||||
case "17:":
|
||||
fileName = "시군구별_전라북도_";
|
||||
sheetName = "시군구별_전라북도";
|
||||
break;
|
||||
case "18:":
|
||||
fileName = "시군구별_전라남도_";
|
||||
sheetName = "시군구별_전라남도";
|
||||
break;
|
||||
case "19:":
|
||||
fileName = "시군구별_제주특별자치도_";
|
||||
sheetName = "시군구별_제주특별자치도";
|
||||
break;
|
||||
case "20:":
|
||||
fileName = "시군구별_세종특별자치시_";
|
||||
sheetName = "시군구별_세종특별자치시";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
map.put("selectInfoListExcel", result);
|
||||
map.put("fileName", fileName);
|
||||
map.put("sheetName", sheetName);
|
||||
|
||||
buildExcelDocument(map, workbook, request, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,366 @@
|
|||
package geoinfo.admins.chLog;
|
||||
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import geoinfo.admins.chLog.service.DownloadAppService;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.session.UserInfo;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 유통/공급 통계분석 > 다운로드승인을 처리하는 Controller 클래스
|
||||
*
|
||||
* @author 공간정보기술(주)
|
||||
* @since 2017.06.07
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------------ ---------------- ---------------------------
|
||||
* 2017.06.07 공간정보기술(주) 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class DownloadAppController {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(DownloadAppController.class.getName());
|
||||
|
||||
@Resource(name = "downloadAppService")
|
||||
private DownloadAppService masterService;
|
||||
|
||||
@RequestMapping(value = "admins/chLog/20.do")
|
||||
public String selectInfoList(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(10);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
if (params.get("agreeyn") == null || "".equals(params.get("agreeyn"))) {
|
||||
params.put("agreeyn", "0");
|
||||
}
|
||||
if (params.get("downyn") == null || "".equals(params.get("downyn"))) {
|
||||
params.put("downyn", "0");
|
||||
}
|
||||
if (params.get("filecheck") == null || "".equals(params.get("filecheck"))) {
|
||||
params.put("filecheck", "0");
|
||||
}
|
||||
|
||||
List<?> resultList = masterService.selectInfoList(params);
|
||||
|
||||
int totalCnt = resultList.size() == 0 ? 0 : Integer.valueOf(((EgovMap) resultList.get(0)).get("totalrows").toString());
|
||||
paginationInfo.setTotalRecordCount(totalCnt);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "admins/chLog/20";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/20_view.do")
|
||||
public String selectInfo(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception{
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
EgovMap result = masterService.selectInfoData(params);
|
||||
|
||||
int today = Integer.parseInt((String) result.get("todate"));
|
||||
int endday = Integer.parseInt((String) result.get("toenddate"));
|
||||
String useContents = (String) result.get("use_contents");
|
||||
String fileName = (String) result.get("fileName");
|
||||
String fileName2 = (String) result.get("fileName2");
|
||||
String fname = result.get("metadataid").toString() + ".zip";
|
||||
String sichuInfo = (String) result.get("sichuInfo"); // 시추공 정보
|
||||
|
||||
|
||||
model.addAttribute("fname", fname);
|
||||
|
||||
if(("").equals(useContents) && ("").equals(fileName) && ("").equals(fileName2)){
|
||||
model.addAttribute("conCheck", "Y");
|
||||
}else{
|
||||
model.addAttribute("conCheck", "N");
|
||||
}
|
||||
|
||||
if(today > endday){
|
||||
model.addAttribute("daypass", "Y");
|
||||
}else{
|
||||
model.addAttribute("daypass", "N");
|
||||
}
|
||||
|
||||
model.addAttribute("result", result);
|
||||
model.addAttribute("agreeyn", params.get("agreeyn"));
|
||||
|
||||
return "admins/chLog/20_view";
|
||||
}
|
||||
|
||||
/*
|
||||
* 지반정보다운로드 승인 상세페이지
|
||||
* 저장되는 값 : 활용사례파일 확인여부(Y,N), 활용내용파일, 활용성과 파일)
|
||||
* */
|
||||
@RequestMapping(value = "admins/chLog/downloadApp/20_view_save", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap selectInfo_save(
|
||||
ModelMap model, HttpServletResponse response, HttpServletRequest request, @RequestParam HashMap<String, Object> params
|
||||
,final MultipartHttpServletRequest multiRequest
|
||||
) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
jsonMap.put("flag", false);
|
||||
return null;
|
||||
}
|
||||
|
||||
masterService.savePrcUseCase(params, multiRequest);
|
||||
|
||||
jsonMap.put("flag", true);
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/downloadApp/agreePop", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap passChange_save(ModelMap model, HttpServletResponse response, HttpServletRequest request, @RequestParam HashMap<String, Object> params) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
jsonMap.put("flag", false);
|
||||
return null;
|
||||
}
|
||||
|
||||
String con = GeoinfoCommon.parseData((String) params.get("con"));
|
||||
String userid = GeoinfoCommon.parseData((String) params.get("userid"));
|
||||
String idx = GeoinfoCommon.parseData((String) params.get("idx"));
|
||||
String saveType = GeoinfoCommon.parseData((String) params.get("saveType"));
|
||||
|
||||
params.put("userid", userid);
|
||||
params.put("idx", idx);
|
||||
params.put("saveType", saveType);
|
||||
|
||||
// try {
|
||||
int allCnt = masterService.selectWebDownloadLogCnt(params); //활용기간이 지났고, 활용승인이 승인되지 않은것들
|
||||
int sCnt = 0;
|
||||
|
||||
if(allCnt <= 1){
|
||||
if("Y".equals(con)){
|
||||
masterService.updateWebDownloadLogDown(params); //idx
|
||||
jsonMap.put("downyn", "Y");
|
||||
sCnt = 1;
|
||||
}else{
|
||||
masterService.updateWebDownloadLogApprove(params);
|
||||
jsonMap.put("approve", "Y");
|
||||
}
|
||||
}else{
|
||||
if("Y".equals(con)){
|
||||
masterService.updateWebDownloadLogDown(params);
|
||||
jsonMap.put("downyn", "Y");
|
||||
}else{
|
||||
masterService.updateWebDownloadLogApprove(params);
|
||||
jsonMap.put("approve", "Y");
|
||||
}
|
||||
}
|
||||
|
||||
if(sCnt == 1){
|
||||
masterService.updateWebDownloadLogScnt(params);//활용 빈칸인 것들에 대해 일괄적으로 다운승인을 해준다.
|
||||
// jsonMap.put("approve", "Y");
|
||||
}
|
||||
|
||||
jsonMap.put("flag", true);
|
||||
// } catch (Exception Ex) {
|
||||
// jsonMap.put("flag", false);
|
||||
// }
|
||||
|
||||
/* 화면에서 다운로드 승인 처리 삭제로 활용사례 승인 시 다운로드 승인 기능 추가 (2017.08.04) */
|
||||
masterService.updateApproveLog(params);
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/downloadApp/cancelPopSave", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap cancelPopSave(ModelMap model, HttpServletResponse response, HttpServletRequest request, @RequestParam HashMap<String, Object> params) throws Exception {
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
jsonMap.put("flag", false);
|
||||
return null;
|
||||
}
|
||||
|
||||
String con = GeoinfoCommon.parseData((String) params.get("con"));
|
||||
String idx = GeoinfoCommon.parseData((String) params.get("idx"));
|
||||
String reason = GeoinfoCommon.parseData((String) params.get("reason"));
|
||||
String etcname = GeoinfoCommon.parseData((String) params.get("etcName"));
|
||||
|
||||
params.put("idx", idx);
|
||||
params.put("reason", reason);
|
||||
params.put("etcname", etcname);
|
||||
|
||||
try {
|
||||
if("Y".equals(con)){
|
||||
masterService.updateWdaDownCancel(params);
|
||||
}else{
|
||||
masterService.updateWdaApproveCancel(params);
|
||||
}
|
||||
|
||||
jsonMap.put("flag", true);
|
||||
} catch (SQLException Ex) {
|
||||
jsonMap.put("flag", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/downloadApp/cancelPop.do")
|
||||
public String cancelPopup(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception{
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
List<?> resultList = masterService.selectWebDownCancelCode(params);
|
||||
|
||||
// 메시지 추가
|
||||
List<?> msgList = masterService.selectWebSmsMsg(params);
|
||||
|
||||
|
||||
model.addAttribute("cancelCde", resultList);
|
||||
model.addAttribute("smsMsg", msgList);
|
||||
model.addAttribute("params", params);
|
||||
|
||||
return "admins/chLog/cancelPop";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "admins/chLog/downloadApp/fileDownload.do")
|
||||
public ModelAndView fileDownload(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
|
||||
String fileName = params.get("savename").toString();
|
||||
|
||||
// 한글 파일이름 깨질 경우
|
||||
// String docName = new String(GeoinfoCommon.parseData(fileName).getBytes("8859_1"), "utf-8");
|
||||
//String filePath = "D:\\Tomcat6\\geoinfoEgov\\webapps\\geoinfo\\files";
|
||||
String filePath = EgovProperties.getProperty("Geoinfo.FilePath");
|
||||
|
||||
OutputStream os = response.getOutputStream();
|
||||
FileInputStream fis = null;
|
||||
File file = null;
|
||||
|
||||
try {
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + URLEncoder.encode(params.get("filename").toString(), "UTF-8").replace('+', ' '));
|
||||
response.setContentType("application/download; charset=utf-8");
|
||||
|
||||
file = new File(filePath + FilenameUtils.getName(fileName));
|
||||
|
||||
fis = new FileInputStream(file);
|
||||
FileCopyUtils.copy(fis, os);
|
||||
} catch (IOException Ex) {
|
||||
LOGGER.error(Ex);
|
||||
|
||||
if (fis != null) {
|
||||
try {
|
||||
fis.close();
|
||||
} catch (IOException ex) {
|
||||
LOGGER.error(ex);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
if (fis != null) {
|
||||
try {
|
||||
fis.close();
|
||||
} catch (IOException e) {
|
||||
LOGGER.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
os.flush();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* SMS 발송 정보 조회
|
||||
* @param idx 다운로드 신청 Index
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/downloadApp/openSmsForm.do")
|
||||
public String openSmsForm(@RequestParam HashMap<String, Object> params, HttpSession session, ModelMap model) throws Exception{
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
// 2017.10.30 dhlee sms 내용추가
|
||||
String idx = GeoinfoCommon.parseData((String) params.get("idx"));
|
||||
String content = "\n" + GeoinfoCommon.parseData((String) params.get("etcName"));
|
||||
|
||||
String userId = (String)session.getAttribute("admin.userID");
|
||||
|
||||
model.addAttribute("userId", userId);
|
||||
model.addAttribute("content", content);
|
||||
model.addAttribute("RSLT", masterService.selectSmsInfo(idx));
|
||||
|
||||
return "admins/chLog/20_sms";
|
||||
}
|
||||
|
||||
/**
|
||||
* 문자메시지(SMS) 전송
|
||||
* @return 문자메시지 전송 결과 코드, 결과 메시지
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/downloadApp/sendSms", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE })
|
||||
public ModelMap sendSms(@RequestParam HashMap<String, Object> param, ModelMap model) throws Exception{
|
||||
|
||||
HashMap<String, Object> jsonMap = new HashMap<String, Object>();
|
||||
|
||||
try{
|
||||
HashMap<String, Object> rslt = masterService.sendSms(param);
|
||||
jsonMap.put("RSLT_CD", rslt.get("retCode"));
|
||||
jsonMap.put("RSLT_MSG", rslt.get("retMessage"));
|
||||
jsonMap.put("success", true);
|
||||
}catch(Exception e){
|
||||
jsonMap.put("success", false);
|
||||
}
|
||||
|
||||
model.addAttribute("jsonView", jsonMap); // JSON으로 리턴하기 위해서는 모델키를 'jsonView'로 지정해야함
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package geoinfo.admins.chLog;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
|
||||
import geoinfo.admins.chLog.service.SupplyInfoService;
|
||||
import geoinfo.session.UserInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 유통/공급 통계분석 > 공급정보를 처리하는 Controller 클래스
|
||||
*
|
||||
* @author 공간정보기술(주)
|
||||
* @since 2017.06.07
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------------ ---------------- ---------------------------
|
||||
* 2017.06.07 공간정보기술(주) 최초 생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Controller
|
||||
public class SupplyInfoController {
|
||||
@Resource(name = "supplyInfoService")
|
||||
private SupplyInfoService masterService;
|
||||
|
||||
/**
|
||||
* 관리자시스템 > 유통/공급 통계분석 > 공급정보 리스트
|
||||
*
|
||||
* @param params
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/chLog/10.do")
|
||||
public String selectInfoList(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
List<?> getState = masterService.getState();
|
||||
|
||||
if ("".equals(params.get("state")) || params.get("state") == null) {
|
||||
params.put("state", ((EgovMap) getState.get(0)).get("value"));
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(20);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> resultList = masterService.selectInfoList(params);
|
||||
|
||||
int totalCnt = resultList.size() == 0 ? 0 : Integer.valueOf(((EgovMap) resultList.get(0)).get("totalrows").toString());
|
||||
paginationInfo.setTotalRecordCount(totalCnt);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("getState", getState);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "admins/chLog/10";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package geoinfo.admins.chLog.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
|
||||
@Mapper("boringInfoStatMapper")
|
||||
public interface BoringInfoStatMapper {
|
||||
|
||||
public ArrayList<?> selectInfoGrid(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public ArrayList<?> selectInfoListExcel() throws Exception;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue