Compare commits
394 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
008767112d | |
|
|
6d56b33796 | |
|
|
cfa4e3832e | |
|
|
055e3dac75 | |
|
|
1f2198e11f | |
|
|
a64c495f5b | |
|
|
ab91d39ac4 | |
|
|
379a755d44 | |
|
|
69a4adfb88 | |
|
|
edd6523d9d | |
|
|
16d57f554c | |
|
|
b9dd601e2a | |
|
|
ade7d2347d | |
|
|
e542f55820 | |
|
|
9a425389f9 | |
|
|
3a230a2157 | |
|
|
9b77c34e58 | |
|
|
2a5f8edc0a | |
|
|
cc840a38cf | |
|
|
0f164cf739 | |
|
|
71754b3c94 | |
|
|
adb9a078ad | |
|
|
543dbb1258 | |
|
|
c11ee36c67 | |
|
|
18ae059303 | |
|
|
65653addb4 | |
|
|
04769fb511 | |
|
|
c35a0ea521 | |
|
|
62f170b4d4 | |
|
|
92bdfe9e6a | |
|
|
27c86fc973 | |
|
|
68d34c5863 | |
|
|
d9821ee7da | |
|
|
09f09766a2 | |
|
|
a2ef9363ec | |
|
|
41f4de08fe | |
|
|
023afd63b7 | |
|
|
45846a70ec | |
|
|
91ad7725d4 | |
|
|
4b5c82d5bd | |
|
|
2c6b2fcf39 | |
|
|
59408ae87b | |
|
|
0227785269 | |
|
|
d66f5bb604 | |
|
|
6c6451220a | |
|
|
533d0c1405 | |
|
|
c5a8096ee0 | |
|
|
7e1e71a179 | |
|
|
a59689642c | |
|
|
c34ceaa4b8 | |
|
|
e8cac0f26c | |
|
|
6d93ac6d40 | |
|
|
e2c2be3975 | |
|
|
45d11d3536 | |
|
|
be5e7b1129 | |
|
|
c424e5f2bd | |
|
|
284ba53325 | |
|
|
05fafa162f | |
|
|
831dd6b313 | |
|
|
928ae0d361 | |
|
|
051ab6526e | |
|
|
7f0392f989 | |
|
|
737d44674b | |
|
|
b3c177c994 | |
|
|
d570a4b713 | |
|
|
e8d480224b | |
|
|
ce00512e7c | |
|
|
d3ea5d648f | |
|
|
744c2c42bd | |
|
|
6dd6ebe3f8 | |
|
|
6795e72740 | |
|
|
49a2a8d1c4 | |
|
|
ab07630626 | |
|
|
7ab619f002 | |
|
|
e638bc48e6 | |
|
|
bb3c8a3499 | |
|
|
2856b4a956 | |
|
|
e1bbf5f666 | |
|
|
19dc7dd29e | |
|
|
6039f04bcb | |
|
|
53839ddb2b | |
|
|
0fb18ca34c | |
|
|
b4328f2579 | |
|
|
5d1fd0efda | |
|
|
472d907fba | |
|
|
bd0c4633de | |
|
|
b98bed787b | |
|
|
76a69bb252 | |
|
|
71e59d72fd | |
|
|
28e9185677 | |
|
|
ae4fb039c1 | |
|
|
ab0b225b37 | |
|
|
6c4e9f382c | |
|
|
4cb210adb6 | |
|
|
fb1e0b34fb | |
|
|
9bde6258f7 | |
|
|
1a3f94524c | |
|
|
ac1aea006a | |
|
|
ec66381b42 | |
|
|
e01a94d714 | |
|
|
dd95fdf716 | |
|
|
d160f60216 | |
|
|
5cf28edb71 | |
|
|
7e193e4b04 | |
|
|
56eeafd889 | |
|
|
586a2dbb46 | |
|
|
8f792c7bbf | |
|
|
b34b061008 | |
|
|
d60e425c10 | |
|
|
fc7a1bae7c | |
|
|
bbdb820b4a | |
|
|
c215284ff8 | |
|
|
26374eb243 | |
|
|
22847409fd | |
|
|
b422380f16 | |
|
|
b8c26b33ac | |
|
|
d22ad9aafe | |
|
|
61eb060bfa | |
|
|
a310e657b2 | |
|
|
08ef1b507d | |
|
|
d2af9d9d6a | |
|
|
acce2ef9eb | |
|
|
6493413941 | |
|
|
5ccb79dc71 | |
|
|
4a4ee41870 | |
|
|
ff56fe1dae | |
|
|
56cf37e9b4 | |
|
|
10c3d847ec | |
|
|
33a0e49b9b | |
|
|
074e065ec3 | |
|
|
d1fb14cf15 | |
|
|
96b961d3a6 | |
|
|
536043d387 | |
|
|
927058d733 | |
|
|
8a7798c69f | |
|
|
812a10b004 | |
|
|
4e19566bf0 | |
|
|
c26a7d60fd | |
|
|
757150db37 | |
|
|
3ac28ed8a8 | |
|
|
d4117d5d09 | |
|
|
82a20351cb | |
|
|
e4b077eb20 | |
|
|
dc1074efc9 | |
|
|
9392a116d2 | |
|
|
f7a23c96e3 | |
|
|
1be2f3dcfc | |
|
|
427aeddfd2 | |
|
|
b61cbded64 | |
|
|
d98248c586 | |
|
|
c919750d36 | |
|
|
39c4fb1f46 | |
|
|
60cdaae017 | |
|
|
c918bbc6be | |
|
|
f4898c508d | |
|
|
67679f4e71 | |
|
|
208c39ed4f | |
|
|
924f5fde3f | |
|
|
ea1849289f | |
|
|
ada3f17c56 | |
|
|
6d0dab72f6 | |
|
|
04c1cf1ace | |
|
|
c00c0df837 | |
|
|
4f480a2254 | |
|
|
1cb5599a54 | |
|
|
5b8d1e0b03 | |
|
|
397c355a08 | |
|
|
4b8c156220 | |
|
|
4e571c6525 | |
|
|
27ae70e013 | |
|
|
de35d402a8 | |
|
|
bcbe7bcbd8 | |
|
|
9290c1edc9 | |
|
|
f2ccdc2389 | |
|
|
371be92a16 | |
|
|
2684374663 | |
|
|
eebf295e96 | |
|
|
d07961029d | |
|
|
cfedd0a719 | |
|
|
694733546d | |
|
|
0a3a2c4ce3 | |
|
|
7b5c1a5146 | |
|
|
435f7dc795 | |
|
|
5fcfa549b4 | |
|
|
1686ff808b | |
|
|
45ef75e1c3 | |
|
|
acfd5504b8 | |
|
|
828bc3234c | |
|
|
9145bd2f6a | |
|
|
cd026187c1 | |
|
|
34e9421ba2 | |
|
|
40ea5fedac | |
|
|
d0785059ea | |
|
|
aeb52eccda | |
|
|
57a5e87778 | |
|
|
1529c7ccaa | |
|
|
91b72e5fc9 | |
|
|
3eff840e71 | |
|
|
396073a070 | |
|
|
5d10ef2575 | |
|
|
bd5d965402 | |
|
|
c76c288ad3 | |
|
|
0ed51bee5b | |
|
|
b92e55b6f0 | |
|
|
3a5e036b5a | |
|
|
885333ff51 | |
|
|
4530c6a5b0 | |
|
|
697d9603f6 | |
|
|
18eb6b9b91 | |
|
|
2d6bfce180 | |
|
|
52e885fb51 | |
|
|
9c1570761a | |
|
|
ff8f9f6fcb | |
|
|
e6bfd33c93 | |
|
|
ddeaf7a19a | |
|
|
7a00f55822 | |
|
|
5d225e8d27 | |
|
|
3126a10b3c | |
|
|
fcc3868883 | |
|
|
d86ec429a7 | |
|
|
1ba6a9d502 | |
|
|
e747e2273b | |
|
|
f310066eee | |
|
|
8004401036 | |
|
|
ade34fad44 | |
|
|
34d9311eaa | |
|
|
76447207eb | |
|
|
ee8cbc1efa | |
|
|
efca2160a0 | |
|
|
7542d9064e | |
|
|
5f99ed3c3b | |
|
|
ea171f199f | |
|
|
a3aade3a03 | |
|
|
7b1869ba59 | |
|
|
cd2a77ff95 | |
|
|
a4af6edf60 | |
|
|
34964aca84 | |
|
|
fa5b57d269 | |
|
|
a6ca50c495 | |
|
|
85c85cf7a7 | |
|
|
268abc377a | |
|
|
8dc6ffe035 | |
|
|
713cc1b1b8 | |
|
|
530069e85a | |
|
|
7ba04c744c | |
|
|
1a67d34ca9 | |
|
|
87306a7636 | |
|
|
f7954e7e87 | |
|
|
cc447b3ede | |
|
|
739f96d47b | |
|
|
1d1636198e | |
|
|
47055cc170 | |
|
|
6facb2eb51 | |
|
|
7c27d84708 | |
|
|
5dca735159 | |
|
|
8fb9d954e8 | |
|
|
741d07e3ac | |
|
|
396b300848 | |
|
|
c1431c01e2 | |
|
|
feb90632da | |
|
|
3997f3d262 | |
|
|
1ee135bf9c | |
|
|
f080b73926 | |
|
|
d9bf09221f | |
|
|
25c1ee3a29 | |
|
|
d753052d8f | |
|
|
09ba6896af | |
|
|
a4cbb83a59 | |
|
|
476fa66d7b | |
|
|
5c18871ab9 | |
|
|
f34e18fba2 | |
|
|
3c4ef38e71 | |
|
|
f73b31ce57 | |
|
|
0c27c57d90 | |
|
|
f7bbe0d62f | |
|
|
5667560c1c | |
|
|
cb90c10405 | |
|
|
01ae7780ae | |
|
|
79a787d884 | |
|
|
a1c0555040 | |
|
|
41cca0b766 | |
|
|
21a2a6780b | |
|
|
4bc15f36da | |
|
|
9e773f16ac | |
|
|
8b730a30b1 | |
|
|
edcec0971f | |
|
|
3677ea6a9a | |
|
|
a06baeea96 | |
|
|
15ae49c673 | |
|
|
c793ad03c1 | |
|
|
dbed79b889 | |
|
|
0737aa6428 | |
|
|
2e71fc8cd7 | |
|
|
431381e25d | |
|
|
edd1555427 | |
|
|
2c6f8cc27a | |
|
|
55e590eabc | |
|
|
dafa0df984 | |
|
|
ba0969523d | |
|
|
ca837c7ecf | |
|
|
c3d60bcdfe | |
|
|
58a42254fb | |
|
|
b639e65807 | |
|
|
a6a37290f2 | |
|
|
2732be5d3e | |
|
|
7953208b04 | |
|
|
f35652a5da | |
|
|
f9fe8d2f2e | |
|
|
a167cee4ba | |
|
|
f68d5c6e67 | |
|
|
5dbf1e9f49 | |
|
|
2e6d2c930f | |
|
|
788ce6fc2e | |
|
|
d87c35167f | |
|
|
34206bb713 | |
|
|
ba7967fcb7 | |
|
|
45b6b9feb8 | |
|
|
2ef579ad51 | |
|
|
7479d7c77c | |
|
|
ea62570439 | |
|
|
1047cbe2be | |
|
|
df93148a51 | |
|
|
8bdc50fefc | |
|
|
78f7626e51 | |
|
|
e154121c7d | |
|
|
35e5cf9b9b | |
|
|
79384ad851 | |
|
|
561e05b4fc | |
|
|
e47c88fb6c | |
|
|
373f1429da | |
|
|
54235f765c | |
|
|
5ae9b432ff | |
|
|
7a048c66f4 | |
|
|
b8e8ef2fb1 | |
|
|
f47a6b6e16 | |
|
|
8ff2bb54e2 | |
|
|
b89ee534f4 | |
|
|
e0e04e891f | |
|
|
7978ffaed0 | |
|
|
181e062ee3 | |
|
|
15828e0dc9 | |
|
|
631cd44246 | |
|
|
7a400ecd59 | |
|
|
f7746066ec | |
|
|
147b1bd603 | |
|
|
ae282014a3 | |
|
|
4c5c827f9d | |
|
|
d6b4c6fd68 | |
|
|
5213043c5e | |
|
|
0892a9bec9 | |
|
|
f0eae1eac1 | |
|
|
c70c23046a | |
|
|
0753b6b0a0 | |
|
|
dbbe53e46a | |
|
|
42020bea12 | |
|
|
f7356447be | |
|
|
61b487f129 | |
|
|
2360ffbec0 | |
|
|
5b80b63ff2 | |
|
|
fdf1e41eca | |
|
|
fdec913637 | |
|
|
03f81788ab | |
|
|
90659583a9 | |
|
|
b7cc865b48 | |
|
|
d20fd9df17 | |
|
|
812997fa95 | |
|
|
9fee63a31c | |
|
|
95e46bdc63 | |
|
|
196133c096 | |
|
|
9635c418e2 | |
|
|
41ef9d0446 | |
|
|
b12139b957 | |
|
|
e9bab39683 | |
|
|
93ef53e255 | |
|
|
da4e05ae5d | |
|
|
74ce6111ba | |
|
|
b368f93aa5 | |
|
|
b8ffbaeffe | |
|
|
1866eb8873 | |
|
|
21ac88c0c1 | |
|
|
860cf39d83 | |
|
|
1c9f3405f9 | |
|
|
3ada2309a5 | |
|
|
a5c72c4540 | |
|
|
462d1d80e5 | |
|
|
f4526c195d | |
|
|
ba0404f20f | |
|
|
7e55987586 | |
|
|
c1c29b1587 | |
|
|
82c1cb4513 | |
|
|
b8661cb834 | |
|
|
9c40859396 | |
|
|
ece78f07bc | |
|
|
3398c52a29 |
|
|
@ -1,5 +1,10 @@
|
|||
<?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 kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
|
|
@ -9,14 +14,12 @@
|
|||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
|
|
@ -26,38 +29,30 @@
|
|||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/classes"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/UserLibrary"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/json-lib-2.4-jdk15.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/commons-lang-2.3.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/proj4j.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/jts-1.8.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/jtsio-1.8.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/serializer.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/javaproj-1.0.6.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/xdoclet-1.2.1.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/ClipReport4.0-1.0.0.301.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/jxl.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/gt-api-14.5.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/gt-data-14.5.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/gt-main-14.5.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/gt-metadata-14.5.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/gt-opengis-14.5.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/gt-referencing-14.5.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/gt-shapefile-14.5.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/ICERTSecu_JDK18.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/ClipReport4.0-Common.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/OpenXLS.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/OrgService.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/ClipReport4.0-Common.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/UserLibrary"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.5"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/ICERTSecu_JDK18.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.5">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="target/generated-sources/annotations">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="owner.project.facets" value="jst.web"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/ojdbc6-11.2.0.4.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/pngj-2.1.1.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/picocontainer-1.2.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/tibero5-jdbc.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/geowave-driver-0.9.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/jdom-1.1.3.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/wms.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/proj4j.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/ClipReport4.0-1.0.0.301.jar"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.wst.jsdt.core.javascriptValidator"/>
|
||||
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
|
||||
</launchConfiguration>
|
||||
|
|
@ -1,56 +1,44 @@
|
|||
.idea/
|
||||
/target
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
.recommenders
|
||||
.DS_Store
|
||||
._.DS_Store
|
||||
**/.DS_Store
|
||||
**/._.DS_Store
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
HELP.md
|
||||
.gradle
|
||||
build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
# PyDev specific (Python IDE for Eclipse)
|
||||
*.pydevproject
|
||||
|
||||
# CDT-specific (C/C++ Development Tooling)
|
||||
.cproject
|
||||
|
||||
# CDT- autotools
|
||||
.autotools
|
||||
|
||||
# Java annotation processor (APT)
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
|
||||
# PDT-specific (PHP Development Tools)
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# Tern plugin
|
||||
.tern-project
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
# STS (Spring Tool Suite)
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
bin/
|
||||
!**/src/main/**/bin/
|
||||
!**/src/test/**/bin/
|
||||
|
||||
# Code Recommenders
|
||||
.recommenders/
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
# Annotation Processing
|
||||
.apt_generated/
|
||||
.apt_generated_test/
|
||||
|
||||
# Scala IDE specific (Scala & Java development for Eclipse)
|
||||
.cache-main
|
||||
|
|
@ -62,10 +50,10 @@ local.properties
|
|||
#.project
|
||||
|
||||
.svn
|
||||
=======
|
||||
|
||||
# ---> Java
|
||||
# Compiled class file
|
||||
*.class
|
||||
#*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
|
@ -77,7 +65,6 @@ local.properties
|
|||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
|
|
@ -88,3 +75,17 @@ local.properties
|
|||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
.vs/
|
||||
|
||||
|
||||
# Added by thkim
|
||||
.classpath
|
||||
/src/main/resources/egovframework/egovProps/globals.properties
|
||||
/src/main/webapp/WEB-INF/clipreport4/DataConnection.properties
|
||||
|
||||
list.txt
|
||||
path.txt
|
||||
21
.project
21
.project
|
|
@ -5,6 +5,16 @@
|
|||
<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>
|
||||
|
|
@ -47,15 +57,4 @@
|
|||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||
<nature>com.soyatec.additional.Nature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1706861866193</id>
|
||||
<name></name>
|
||||
<type>30</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.core.resources.regexFilterMatcher</id>
|
||||
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>geoinfo_eGov_work</name>
|
||||
<comment>@key 32303037303533312D31302067656F696E666F5F65476F762F544A </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>com.soyatec.additional.Builder</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>
|
||||
<nature>com.soyatec.additional.Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
projectKey=geoinfo
|
||||
serverUrl=http://localhost:9000
|
||||
serverVersion=9.6.1.59531
|
||||
dashboardUrl=http://localhost:9000/dashboard?id=geoinfo
|
||||
ceTaskId=AYPkQT_oFODTiojy3qza
|
||||
ceTaskUrl=http://localhost:9000/api/ce/task?id=AYPkQT_oFODTiojy3qza
|
||||
|
|
@ -0,0 +1 @@
|
|||
- to "C:\Users\dbnt\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\geoinfo_eGov_work\WEB-INF\views\drilling\statistics\drilling_statistics.jsp"
|
||||
28
README.md
28
README.md
|
|
@ -1,28 +0,0 @@
|
|||
# old-geoinfo-or-kr-user
|
||||
|
||||
### 국토지반정보 포털사이트 <https://www.geoinfo.or.kr/>의 기존 사이트 사용자단 소스코드.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### 디비엔텍 회사 내 서버에 구축되어 있다.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### URL:
|
||||
<https://old-geoinfo-or-kr.dbnt.co.kr/>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
set "source_prefix=src\main\webapp\"
|
||||
set "target_prefix=C:\Users\dbnt\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\geoinfo_eGov_work\"
|
||||
set "target_directory=D:\git\dbnt\geoinfo.or.kr\geoinfo_eGov_work\"
|
||||
|
||||
echo --- File Copy Script Start (Robust Version) ---
|
||||
echo.
|
||||
|
||||
rem for 루프는 각 줄을 서브루틴으로 넘기는 역할만 수행
|
||||
for /f "delims=" %%i in (list.txt) do (
|
||||
call :processLine "%%i"
|
||||
)
|
||||
|
||||
echo.
|
||||
echo --- All operations completed. ---
|
||||
pause
|
||||
goto :eof
|
||||
|
||||
|
||||
rem ======================================================
|
||||
rem :processLine 서브루틴 - 실제 파일 처리 로직
|
||||
rem ======================================================
|
||||
:processLine
|
||||
set "line=%~1"
|
||||
|
||||
rem 루프 시작 시 변수 초기화
|
||||
set "source_file="
|
||||
set "target_file="
|
||||
set "relative_path="
|
||||
|
||||
rem #으로 시작하는 주석 라인 건너뛰기
|
||||
if "!line:~0,1!" == "#" (
|
||||
echo [SKIP] Comment: !line!
|
||||
goto :eof
|
||||
)
|
||||
|
||||
echo [PROCESS] !line!
|
||||
|
||||
rem .java 파일 건너뛰기
|
||||
if "!line:~-5!" == ".java" (
|
||||
echo [SKIP] Java source file.
|
||||
goto :eof
|
||||
)
|
||||
|
||||
set "source_file=%target_directory%!line!"
|
||||
set "relative_path=!line:%source_prefix%=!"
|
||||
|
||||
rem .xml 파일은 WEB-INF\classes 경로로 처리
|
||||
if "!line:~-4!" == ".xml" (
|
||||
set "relative_path=!line:*src\main\resources\=!"
|
||||
set "target_file=%target_prefix%WEB-INF\classes\!relative_path!"
|
||||
) else (
|
||||
rem 그 외 모든 파일 처리
|
||||
set "target_file=%target_prefix%!relative_path!"
|
||||
)
|
||||
|
||||
rem --- [수정된 부분] 파일 복사 실행 및 결과 출력 ---
|
||||
if defined source_file (
|
||||
if exist "!source_file!" (
|
||||
echo [COPY]
|
||||
echo FROM: "!source_file!"
|
||||
echo TO: "!target_file!"
|
||||
xcopy /i /Y "!source_file!" "!target_file!" > nul
|
||||
|
||||
rem xcopy 성공 여부 확인 (errorlevel이 0이면 성공)
|
||||
if !errorlevel! == 0 (
|
||||
echo -> SUCCESS
|
||||
) else (
|
||||
echo -> FAILED (Error Code: !errorlevel!)
|
||||
)
|
||||
) else (
|
||||
echo [ERROR] Source file not found: "!source_file!"
|
||||
)
|
||||
)
|
||||
|
||||
echo.
|
||||
goto :eof
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
rem # ----------------------------------------------------------------------
|
||||
rem # 환경 설정: path.txt에서 이클립스 경로를 읽고 워크스페이스 경로를 설정합니다.
|
||||
rem # ----------------------------------------------------------------------
|
||||
|
||||
rem # target_directory를 현재 배치 파일이 실행되는 경로로 설정합니다.
|
||||
set "target_directory=%~dp0"
|
||||
set "path_file=%target_directory%path.txt"
|
||||
set "eclipse_path="
|
||||
|
||||
rem # path.txt 파일이 존재하는지 확인합니다.
|
||||
if not exist "%path_file%" (
|
||||
echo [ERROR] "%path_file%"을 찾을 수 없습니다. 스크립트를 종료합니다.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
rem # path.txt에서 'eclipse='로 시작하는 라인을 찾아 이클립스 경로를 설정합니다.
|
||||
for /f "tokens=1,* delims==" %%a in ('findstr /b "eclipse=" "%path_file%"') do (
|
||||
set "eclipse_path=%%b"
|
||||
)
|
||||
|
||||
if not defined eclipse_path (
|
||||
echo [ERROR] "%path_file%"에서 이클립스 경로를 찾을 수 없습니다.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
rem # 이클립스 설정 파일 경로를 만듭니다.
|
||||
set "prefs_file=!eclipse_path!\configuration\.settings\org.eclipse.ui.ide.prefs"
|
||||
|
||||
if not exist "!prefs_file!" (
|
||||
echo [ERROR] Eclipse 설정 파일을 찾을 수 없습니다: "!prefs_file!"
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
rem # 설정 파일에서 최근 워크스페이스 목록을 읽어옵니다.
|
||||
for /f "tokens=1,* delims==" %%a in ('findstr /b "RECENT_WORKSPACES=" "!prefs_file!"') do (
|
||||
set "workspaces_line=%%b"
|
||||
)
|
||||
|
||||
rem # \n을 공백으로 치환하여 여러 경로가 있을 경우 첫 번째 경로만 가져옵니다.
|
||||
set "workspaces_line_cleaned=!workspaces_line:\n= !"
|
||||
for /f "tokens=1" %%w in ("!workspaces_line_cleaned!") do (
|
||||
set "workspace_path=%%w"
|
||||
)
|
||||
|
||||
rem # 경로에 포함된 이스케이프 문자(\\)를 단일 백슬래시(\)로 변경합니다.
|
||||
set "workspace_path=!workspace_path:\\=\!"
|
||||
|
||||
rem # 드라이브 경로 형식이 'D\:\'와 같이 잘못된 경우 'D:\'로 바로잡습니다.
|
||||
set "drive_letter=!workspace_path:~0,1!"
|
||||
if /i "!workspace_path:~1,2!" == "\:" (
|
||||
set "workspace_path=!drive_letter!:!workspace_path:~3!"
|
||||
)
|
||||
|
||||
rem # 최종 target_prefix를 설정합니다.
|
||||
set "target_prefix=!workspace_path!\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\geoinfo_eGov_work\"
|
||||
|
||||
explorer "!target_prefix!"
|
||||
|
||||
echo target_prefix: "!target_prefix!"
|
||||
|
|
@ -0,0 +1 @@
|
|||
explorer .\src\main\webapp\com\css\sass
|
||||
692
pom.xml
692
pom.xml
|
|
@ -15,54 +15,72 @@
|
|||
</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>
|
||||
|
||||
<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>
|
||||
|
||||
<geotools.version>11.0</geotools.version>
|
||||
<jts.version>1.13</jts.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>
|
||||
<repository>
|
||||
<id>mvn2s</id>
|
||||
<url>https://repo1.maven.org/maven2/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>egovframe</id>
|
||||
<url>https://maven.egovframe.go.kr/maven/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>osgeo</id>
|
||||
<name>OSGeo Release Repository</name>
|
||||
<url>https://repo.osgeo.org/repository/release/</url>
|
||||
<snapshots><enabled>false</enabled></snapshots>
|
||||
<releases><enabled>true</enabled></releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>osgeo-snapshot</id>
|
||||
<name>OSGeo Snapshot Repository</name>
|
||||
<url>https://repo.osgeo.org/repository/snapshot/</url>
|
||||
<snapshots><enabled>true</enabled></snapshots>
|
||||
<!-- Corrected the closing tag from </releases> to </enabled> -->
|
||||
<releases><enabled>false</enabled></releases>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>jaspersoft-third-party</id>
|
||||
<url>https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Swagger API Annotation -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.5.22</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SMS -->
|
||||
<!-- SMS -->
|
||||
<dependency>
|
||||
<groupId>org.apache.ws.xmlrpc</groupId>
|
||||
<artifactId>xmlrpc</artifactId>
|
||||
|
|
@ -94,6 +112,7 @@
|
|||
<artifactId>egovframework.rte.fdl.idgnr</artifactId>
|
||||
<version>${egovframework.rte.version}</version>
|
||||
</dependency>
|
||||
<!-- Removed duplicate egovframework.rte.fdl.property declaration with hardcoded 2.7.0, keeping the one with property -->
|
||||
<dependency>
|
||||
<groupId>egovframework.rte</groupId>
|
||||
<artifactId>egovframework.rte.fdl.property</artifactId>
|
||||
|
|
@ -190,6 +209,7 @@
|
|||
<version>7.0.53</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Removed duplicate commons-dbcp declaration -->
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
|
|
@ -281,11 +301,7 @@
|
|||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${org.slf4j-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.3alpha-8</version>
|
||||
</dependency>
|
||||
<!-- Removed log4j:1.3alpha-8, keeping 1.2.17 below -->
|
||||
<dependency>
|
||||
<groupId>org.lazyluke</groupId>
|
||||
<artifactId>log4jdbc-remix</artifactId>
|
||||
|
|
@ -325,13 +341,6 @@
|
|||
<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>
|
||||
|
|
@ -395,12 +404,11 @@
|
|||
<version>26Dec2008</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.jdom/jdom -->
|
||||
<dependency>
|
||||
<groupId>org.jdom</groupId>
|
||||
<artifactId>jdom</artifactId>
|
||||
<version>2.0.2</version>
|
||||
<version>1.1.3</version>
|
||||
</dependency>
|
||||
<!-- lucy -->
|
||||
|
||||
|
|
@ -409,33 +417,599 @@
|
|||
<artifactId>lucy-xss-servlet</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20180813</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.websocket</groupId>
|
||||
<artifactId>javax.websocket-api</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-websocket</artifactId>
|
||||
<version>4.1.2.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.12</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.googlecode.json-simple</groupId>
|
||||
<artifactId>json-simple</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.12.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-dbcp/commons-dbcp -->
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.picocontainer/picocontainer -->
|
||||
<dependency>
|
||||
<groupId>org.picocontainer</groupId>
|
||||
<artifactId>picocontainer</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.geotools.ogc/net.opengis.fes -->
|
||||
<dependency>
|
||||
<groupId>org.geotools.ogc</groupId>
|
||||
<artifactId>net.opengis.fes</artifactId>
|
||||
<version>11.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-referencing</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>xalan</groupId>
|
||||
<artifactId>xalan</artifactId>
|
||||
<version>2.7.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.12.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>txw2</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>txw2</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.json-lib</groupId>
|
||||
<artifactId>json-lib</artifactId>
|
||||
<version>2.4</version> <classifier>jdk15</classifier> <exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.lowagie</groupId>
|
||||
<artifactId>itext</artifactId>
|
||||
<version>2.1.7.js2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>0.9.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-main</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
<!-- Explicitly exclude jdom from gt-main -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.jdom</groupId>
|
||||
<artifactId>jdom</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-opengis</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-referencing</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-epsg-hsql</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-cql</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-data</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-swing</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.jdom</groupId>
|
||||
<artifactId>jdom</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-coverage</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>javax.media</groupId>
|
||||
<artifactId>jai_imageio</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-imageio</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-imageio-ext-gdal</artifactId>
|
||||
</exclusion>
|
||||
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jdom</groupId>
|
||||
<artifactId>jdom</artifactId>
|
||||
<version>1.1.3</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.geotools/gt-coverage -->
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-coverage</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-metadata</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.media</groupId>
|
||||
<artifactId>jai_imageio</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-imageio</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-imageio-ext-gdal</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-render</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-shapefile</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
<!-- Explicitly exclude jdom from gt-shapefile -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.jdom</groupId>
|
||||
<artifactId>jdom</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools.xsd</groupId>
|
||||
<artifactId>gt-xsd-sld</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-geojson</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-process</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-jdbc</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools.jdbc</groupId>
|
||||
<artifactId>gt-jdbc-postgis</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools.jdbc</groupId>
|
||||
<artifactId>gt-jdbc-oracle</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools.jdbc</groupId>
|
||||
<artifactId>gt-jdbc-h2</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools.jdbc</groupId>
|
||||
<artifactId>gt-jdbc-mysql</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools.jdbc</groupId>
|
||||
<artifactId>gt-jdbc-db2</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools.jdbc</groupId>
|
||||
<artifactId>gt-jdbc-sqlserver</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vividsolutions</groupId>
|
||||
<artifactId>jts</artifactId>
|
||||
<version>${jts.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-wms</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-metadata</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools.xsd</groupId>
|
||||
<artifactId>gt-xsd-wfs</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-metadata</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-xml</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.geotools.xsd</groupId>
|
||||
<artifactId>gt-xsd-wfs</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-graph</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-metadata</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-api</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.geotools.xsd</groupId>
|
||||
<artifactId>gt-xsd-fes</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools.xsd</groupId>
|
||||
<artifactId>gt-xsd-gml3</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-metadata</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools.xsd</groupId>
|
||||
<artifactId>gt-xsd-ows</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.geotools</groupId>
|
||||
<artifactId>gt-shapefile-old</artifactId>
|
||||
<version>${geotools.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>javax.vecmath</groupId>
|
||||
<artifactId>vecmath</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/xml-apis/xml-apis -->
|
||||
<dependency>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<version>1.0.b2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-collections/commons-collections -->
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/junit/junit -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/postgresql/postgresql -->
|
||||
<dependency>
|
||||
<groupId>postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>8.4-701.jdbc3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.17</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-httpclient/commons-httpclient -->
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/commons-collections/commons-collections -->
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.14</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.osgeo/proj4j -->
|
||||
<dependency>
|
||||
<groupId>org.osgeo</groupId>
|
||||
<artifactId>proj4j</artifactId>
|
||||
<version>0.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.jhlabs/javaproj -->
|
||||
<dependency>
|
||||
<groupId>com.jhlabs</groupId>
|
||||
<artifactId>javaproj</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.oracle.database.security/oraclepki -->
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.security</groupId>
|
||||
<artifactId>oraclepki</artifactId>
|
||||
<version>11.2.0.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat</groupId>
|
||||
<artifactId>tomcat-catalina</artifactId>
|
||||
<version>7.0.53</version> <!-- 또는 프로젝트에서 사용하는 Tomcat 버전에 맞게 조정 -->
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.eclipse.xsd/org.eclipse.xsd -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.emf</groupId>
|
||||
<artifactId>org.eclipse.emf.ecore</artifactId>
|
||||
<version>2.9.1-v20130827-0309</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.extentech</groupId>
|
||||
<artifactId>ExtenXLS</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jxl</groupId>
|
||||
<artifactId>jxl</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ojdbc6</groupId>
|
||||
<artifactId>ojdbc6</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ICERTSecu_JDK18</groupId>
|
||||
<artifactId>ICERTSecu_JDK18</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ictway</groupId>
|
||||
<artifactId>shape-and-image-maker</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ictway</groupId>
|
||||
<artifactId>shape-maker-only</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ictway</groupId>
|
||||
<artifactId>ows-projection</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ictway</groupId>
|
||||
<artifactId>ictway</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>comm</groupId>
|
||||
<artifactId>comm</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.clipsoft</groupId>
|
||||
<artifactId>com-clipsoft</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.clipsoft</groupId>
|
||||
<artifactId>com-clipsoft-google</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- ▼▼▼ 세션을 Redis에 저장 ▼▼▼ -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.session</groupId>
|
||||
<artifactId>spring-session-data-redis</artifactId>
|
||||
<version>1.2.2.RELEASE</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-redis</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-redis</artifactId>
|
||||
<version>1.6.2.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</dependency>
|
||||
<!-- ▲▲▲ 세션을 Redis에 저장 ▲▲▲ -->
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,156 @@
|
|||
package geoinfo.api.geoinfo;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
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 org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import geoinfo.api.geoinfo.service.GeoinfoApiV1Service;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
@Controller
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/geoinfo/v1")
|
||||
public class GeoinfoApiV1Controller {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(GeoinfoApiV1Controller.class);
|
||||
|
||||
@Autowired
|
||||
GeoinfoApiV1Service geoinfoApiV1Service;
|
||||
|
||||
/**
|
||||
* GeoInfo API 서비스의 동적 처리를 위한 통합 메서드입니다.
|
||||
* URL 경로의 서비스명을 기반으로 분기하여 해당 비즈니스 로직을 호출합니다.
|
||||
* @param serviceName URL 경로에서 추출된 서비스명 (예: abc, def)
|
||||
* @param request HttpServletRequest 객체
|
||||
* @param strJSON 클라이언트로부터 받은 JSON 형식의 요청 본문
|
||||
* @param response HttpServletResponse 객체
|
||||
* @return 처리 결과를 담은 JSONObject
|
||||
*/
|
||||
@ApiOperation(value = "GeoInfo API 서비스 통합 엔드포인트", notes = "URL 경로에 지정된 서비스명에 따라 적절한 비즈니스 로직을 동적으로 처리합니다.<br />" +
|
||||
"- 요청 본문(body)에 JSON 형식의 파라미터를 전달해야 합니다.<br />" +
|
||||
"- 예시 URL: /api/geoinfo/v1/getProjectInfo.do, /api/geoinfo/v1/getBoreholeInfo.do<br />" +
|
||||
"- 변경자명 : 김종훈<br />" +
|
||||
"- 변경일자 : 2025.08.14")
|
||||
// @RequestMapping(value = "/{spName}.do", method = RequestMethod.GET)
|
||||
@RequestMapping(value = "/{spName:^(?!borehole-log$).+}.do", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public JSONObject handleApiService(
|
||||
@ApiParam(value = "URL 경로에 포함된 서비스 이름", required = true, example = "getProjectInfo") @PathVariable("spName") String spName,
|
||||
HttpServletRequest request,
|
||||
@RequestParam HashMap<String, Object> params,
|
||||
HttpServletResponse response) {
|
||||
|
||||
|
||||
|
||||
JSONObject jsonResponse = new JSONObject();
|
||||
|
||||
|
||||
// 2. HashMap을 사용하여 JSONObject 생성
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
for (HashMap.Entry<String, Object> entry : params.entrySet()) {
|
||||
if ("".equals(entry.getValue())) {
|
||||
entry.setValue(null);
|
||||
jsonObject.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 3. toJSONString() 메서드로 JSON 문자열 출력
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
|
||||
logger.info("\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"procedure Name: " + spName + "\n" +
|
||||
"Request params: \n" + jsonString + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
JSONParser jsonParser = new JSONParser();
|
||||
JSONArray jsonArr = null;
|
||||
|
||||
|
||||
try {
|
||||
geoinfoApiV1Service.handleApiService(request, params, spName, jsonResponse);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"jsonString:[\n" + jsonString + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
jsonResponse.put("resultCode", -1);
|
||||
jsonResponse.put("result", "false");
|
||||
jsonResponse.put("message", e.getMessage());
|
||||
}
|
||||
|
||||
logger.info("\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"Response JSON: [" + jsonResponse.toJSONString() + "]\n" +
|
||||
"\n--------------------------------------------------------------\n");
|
||||
|
||||
return jsonResponse;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/borehole-log.do", method = RequestMethod.GET)
|
||||
public void getBoreholeLogPdf(
|
||||
@RequestParam String holeCode,
|
||||
@RequestParam HashMap<String, Object> params,
|
||||
HttpServletResponse response) throws Exception {
|
||||
int validApiKey = 0;
|
||||
validApiKey = geoinfoApiV1Service.isValidWebApiKey(params);
|
||||
|
||||
if (validApiKey != 1) {
|
||||
JSONObject jsonResponse = new JSONObject();
|
||||
if (validApiKey == -1) {
|
||||
jsonResponse.put("resultCode", -1);
|
||||
jsonResponse.put("result", "false");
|
||||
jsonResponse.put("message", "미승인 API키 입니다.");
|
||||
} else if (validApiKey == -2) {
|
||||
jsonResponse.put("resultCode", -2);
|
||||
jsonResponse.put("result", "false");
|
||||
jsonResponse.put("message", "기간이 만료된 API키 입니다.");
|
||||
} else { // validApiKey == 0
|
||||
jsonResponse.put("resultCode", 0);
|
||||
jsonResponse.put("result", "false");
|
||||
jsonResponse.put("message", "등록되지 않은 API키 입니다.");
|
||||
}
|
||||
// JSON 반환 설정
|
||||
response.setContentType("application/json; charset=UTF-8");
|
||||
response.getWriter().write(jsonResponse.toJSONString());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 3. API Key 정상일 경우 PDF URL로 리디렉션 실행
|
||||
String redirectUrl = "/ClipReport4/export/exportForPDF_Jusangdo.jsp?data=" + holeCode;
|
||||
|
||||
response.sendRedirect(redirectUrl);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
package geoinfo.api.geoinfo.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
/**
|
||||
* Geoinfo API v1 데이터처리를 위한 Mapper 인터페이스
|
||||
* @author
|
||||
* @since 2025.08.18
|
||||
* @version 1.0
|
||||
* @see
|
||||
*
|
||||
* <pre>
|
||||
* << 개정이력(Modification Information) >>
|
||||
*
|
||||
* 수정일 수정자 수정내용
|
||||
* ------- -------- ---------------------------
|
||||
* 2025.08.18 김태호 최초 생성 및 전체 메서드 정의
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Mapper("geoinfoApiV1Mapper")
|
||||
public interface GeoinfoApiV1Mapper {
|
||||
|
||||
// ==================================================================================================
|
||||
// 프로젝트 정보 (Project Info)
|
||||
// ==================================================================================================
|
||||
|
||||
/** API ON/OFF 처리를 위한 활성상태 조회 처리 */
|
||||
public String selectApiActiveYn(String spNamep) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblProjectInfo(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblProjectInfo(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetSelectclassInfoP(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetSelectclassInfoPh(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblTopoGeology(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblTopoGeology(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblResistivitySurvey(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblResistivitySurvey(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblRefractionSurvey(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRefractionSurvey(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
// ==================================================================================================
|
||||
// 시추공 정보 (Borehole Info)
|
||||
// ==================================================================================================
|
||||
|
||||
public ArrayList<EgovMap> spGetTblHeader(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblHeader(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetSelectclassInfoH(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
// ==================================================================================================
|
||||
// 시추공 부속 정보 (Borehole Appendix)
|
||||
// ==================================================================================================
|
||||
|
||||
// 지층/시료 정보
|
||||
public ArrayList<EgovMap> spGetTblLayerInfo(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblLayerInfo(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblSampleInfo(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblSampleInfo(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
// 현장 시험
|
||||
public ArrayList<EgovMap> spGetTblSpt(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblSpt(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblSlickensideInfo(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblSlickensideInfo(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblRqd(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRqd(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblDsf(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblDsf(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblRmr(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRmr(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblQ(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblQ(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblFieldWaterpressure(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblFieldWaterpressure(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblWpTest(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblWpTest(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblFieldPermeability(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblFieldPermeability(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblFieldperSub(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblFieldperSub(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblFieldPressuremeter(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblFieldPressuremeter(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblFieldConePenetra(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblFieldConePenetra(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblBoreholeWave(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblBoreholeWave(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblDownhole(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblDownhole(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblDensity(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblDensity(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
// 실내 시험
|
||||
public ArrayList<EgovMap> spGetTblClassification(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblClassification(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblCbrCompac(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblCbrCompac(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblConsolidationUsual(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblConsolidationUsual(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblConsolidation(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblConsolidation(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblUnconfinedUsual(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblUnconfinedUsual(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblTriaxialUsual(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblTriaxialUsual(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblTriaxialCu(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblTriaxialCu(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblTriaxialUu(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblTriaxialUu(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblResonantUsual(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblResonantUsual(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblResonant(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblResonant(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblRepeatedTriaxialU(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRepeatedTriaxialU(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblRepeatedTriaxial(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRepeatedTriaxial(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
// 암석 시험
|
||||
public ArrayList<EgovMap> spGetTblRockUniaxial(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRockUniaxial(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblRockTriaxial(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRockTriaxial(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblRockPointload(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRockPointload(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblRockJointshear(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRockJointshear(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblRockResonantUsual(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRockResonantUsual(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblRockReptTriU(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRockReptTriU(HashMap<String, Object> params) throws SQLException;
|
||||
public ArrayList<EgovMap> spGetTblRockReptTri(HashMap<String, Object> params) throws SQLException;
|
||||
public int spCntTblRockReptTri(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
// API Key 검증
|
||||
public int spIsValidWebApiKeyId(HashMap<String, Object> params) throws SQLException;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package geoinfo.api.geoinfo.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
|
||||
public interface GeoinfoApiV1Service {
|
||||
int handleApiService(HttpServletRequest request, HashMap<String, Object> params, String spName, JSONObject jsonResponse) throws Exception;
|
||||
int isValidWebApiKey(HashMap<String, Object> params) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,240 @@
|
|||
package geoinfo.api.geoinfo.service.impl;
|
||||
|
||||
import geoinfo.api.geoinfo.service.GeoinfoApiV1Mapper;
|
||||
import geoinfo.api.geoinfo.service.GeoinfoApiV1Service;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Service("geoinfoApiV1Service")
|
||||
public class GeoinfoApiV1ServiceImpl implements GeoinfoApiV1Service {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(GeoinfoApiV1ServiceImpl.class);
|
||||
|
||||
@Resource(name="geoinfoApiV1Mapper")
|
||||
private GeoinfoApiV1Mapper geoinfoApiV1Mapper;
|
||||
|
||||
|
||||
public int handleApiService(HttpServletRequest request, HashMap<String, Object> params, String spName, JSONObject jsonResponse) throws Exception {
|
||||
|
||||
if( params.get("ipAddress") == null ) {
|
||||
String ipAddress = MyUtil.getIpAddress(request);
|
||||
params.put("ipAddress", ipAddress);
|
||||
}
|
||||
|
||||
|
||||
//호출 프로시저 유효성 체크
|
||||
spName = spName.trim();
|
||||
// API ACTIVE_YN 판별하여 'N'일 경우 일시중단상태.
|
||||
String apiStatus = geoinfoApiV1Mapper.selectApiActiveYn(spName);
|
||||
if (apiStatus != null && "N".equals(apiStatus)) {
|
||||
// 성공 응답 기본값 설정
|
||||
jsonResponse.put("resultCode", 0);
|
||||
jsonResponse.put("result", "true");
|
||||
jsonResponse.put("message", "DISABLE");
|
||||
|
||||
// 성공 코드 반환
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 서비스 이름에 따라 분기 처리
|
||||
if ("sp-get-tbl-project-info".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblProjectInfo(params));
|
||||
} else if ("sp-cnt-tbl-project-info".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblProjectInfo(params));
|
||||
} else if ("sp-get-selectclass-info-p".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetSelectclassInfoP(params));
|
||||
} else if ("sp-get-selectclass-info-ph".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetSelectclassInfoPh(params));
|
||||
} else if ("sp-get-tbl-topo-geology".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblTopoGeology(params));
|
||||
} else if ("sp-cnt-tbl-topo-geology".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblTopoGeology(params));
|
||||
} else if ("sp-get-tbl-resistivity-survey".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblResistivitySurvey(params));
|
||||
} else if ("sp-cnt-tbl-resistivity-survey".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblResistivitySurvey(params));
|
||||
} else if ("sp-get-tbl-refraction-survey".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRefractionSurvey(params));
|
||||
} else if ("sp-cnt-tbl-refraction-survey".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRefractionSurvey(params));
|
||||
} else if ("sp-get-tbl-header".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblHeader(params));
|
||||
} else if ("sp-cnt-tbl-header".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblHeader(params));
|
||||
} else if ("sp-get-selectclass-info-h".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetSelectclassInfoH(params));
|
||||
} else if ("sp-get-tbl-layer-info".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblLayerInfo(params));
|
||||
} else if ("sp-cnt-tbl-layer-info".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblLayerInfo(params));
|
||||
} else if ("sp-get-tbl-sample-info".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblSampleInfo(params));
|
||||
} else if ("sp-cnt-tbl-sample-info".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblSampleInfo(params));
|
||||
} else if ("sp-get-tbl-spt".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblSpt(params));
|
||||
} else if ("sp-cnt-tbl-spt".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblSpt(params));
|
||||
} else if ("sp-get-tbl-slickenside-info".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblSlickensideInfo(params));
|
||||
} else if ("sp-cnt-tbl-slickenside-info".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblSlickensideInfo(params));
|
||||
} else if ("sp-get-tbl-rqd".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRqd(params));
|
||||
} else if ("sp-cnt-tbl-rqd".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRqd(params));
|
||||
} else if ("sp-get-tbl-dsf".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblDsf(params));
|
||||
} else if ("sp-cnt-tbl-dsf".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblDsf(params));
|
||||
} else if ("sp-get-tbl-rmr".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRmr(params));
|
||||
} else if ("sp-cnt-tbl-rmr".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRmr(params));
|
||||
} else if ("sp-get-tbl-q".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblQ(params));
|
||||
} else if ("sp-cnt-tbl-q".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblQ(params));
|
||||
} else if ("sp-get-tbl-field-waterpressure".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblFieldWaterpressure(params));
|
||||
} else if ("sp-cnt-tbl-field-waterpressure".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblFieldWaterpressure(params));
|
||||
} else if ("sp-get-tbl-wp-test".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblWpTest(params));
|
||||
} else if ("sp-cnt-tbl-wp-test".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblWpTest(params));
|
||||
} else if ("sp-get-tbl-field-permeability".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblFieldPermeability(params));
|
||||
} else if ("sp-cnt-tbl-field-permeability".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblFieldPermeability(params));
|
||||
} else if ("sp-get-tbl-fieldper-sub".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblFieldperSub(params));
|
||||
} else if ("sp-cnt-tbl-fieldper-sub".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblFieldperSub(params));
|
||||
} else if ("sp-get-tbl-field-pressuremeter".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblFieldPressuremeter(params));
|
||||
} else if ("sp-cnt-tbl-field-pressuremeter".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblFieldPressuremeter(params));
|
||||
} else if ("sp-get-tbl-field-cone-penetra".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblFieldConePenetra(params));
|
||||
} else if ("sp-cnt-tbl-field-cone-penetra".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblFieldConePenetra(params));
|
||||
} else if ("sp-get-tbl-borehole-wave".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblBoreholeWave(params));
|
||||
} else if ("sp-cnt-tbl-borehole-wave".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblBoreholeWave(params));
|
||||
} else if ("sp-get-tbl-downhole".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblDownhole(params));
|
||||
} else if ("sp-cnt-tbl-downhole".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblDownhole(params));
|
||||
} else if ("sp-get-tbl-density".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblDensity(params));
|
||||
} else if ("sp-cnt-tbl-density".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblDensity(params));
|
||||
} else if ("sp-get-tbl-classification".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblClassification(params));
|
||||
} else if ("sp-cnt-tbl-classification".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblClassification(params));
|
||||
} else if ("sp-get-tbl-cbr-compac".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblCbrCompac(params));
|
||||
} else if ("sp-cnt-tbl-cbr-compac".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblCbrCompac(params));
|
||||
} else if ("sp-get-tbl-consolidation-usual".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblConsolidationUsual(params));
|
||||
} else if ("sp-cnt-tbl-consolidation-usual".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblConsolidationUsual(params));
|
||||
} else if ("sp-get-tbl-consolidation".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblConsolidation(params));
|
||||
} else if ("sp-cnt-tbl-consolidation".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblConsolidation(params));
|
||||
} else if ("sp-get-tbl-unconfined-usual".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblUnconfinedUsual(params));
|
||||
} else if ("sp-cnt-tbl-unconfined-usual".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblUnconfinedUsual(params));
|
||||
} else if ("sp-get-tbl-triaxial-usual".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblTriaxialUsual(params));
|
||||
} else if ("sp-cnt-tbl-triaxial-usual".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblTriaxialUsual(params));
|
||||
} else if ("sp-get-tbl-triaxial-cu".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblTriaxialCu(params));
|
||||
} else if ("sp-cnt-tbl-triaxial-cu".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblTriaxialCu(params));
|
||||
} else if ("sp-get-tbl-triaxial-uu".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblTriaxialUu(params));
|
||||
} else if ("sp-cnt-tbl-triaxial-uu".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblTriaxialUu(params));
|
||||
} else if ("sp-get-tbl-resonant-usual".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblResonantUsual(params));
|
||||
} else if ("sp-cnt-tbl-resonant-usual".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblResonantUsual(params));
|
||||
} else if ("sp-get-tbl-resonant".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblResonant(params));
|
||||
} else if ("sp-cnt-tbl-resonant".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblResonant(params));
|
||||
} else if ("sp-get-tbl-repeated-triaxial-u".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRepeatedTriaxialU(params));
|
||||
} else if ("sp-cnt-tbl-repeated-triaxial-u".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRepeatedTriaxialU(params));
|
||||
} else if ("sp-get-tbl-repeated-triaxial".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRepeatedTriaxial(params));
|
||||
} else if ("sp-cnt-tbl-repeated-triaxial".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRepeatedTriaxial(params));
|
||||
} else if ("sp-get-tbl-rock-uniaxial".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRockUniaxial(params));
|
||||
} else if ("sp-cnt-tbl-rock-uniaxial".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRockUniaxial(params));
|
||||
} else if ("sp-get-tbl-rock-triaxial".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRockTriaxial(params));
|
||||
} else if ("sp-cnt-tbl-rock-triaxial".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRockTriaxial(params));
|
||||
} else if ("sp-get-tbl-rock-pointload".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRockPointload(params));
|
||||
} else if ("sp-cnt-tbl-rock-pointload".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRockPointload(params));
|
||||
} else if ("sp-get-tbl-rock-jointshear".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRockJointshear(params));
|
||||
} else if ("sp-cnt-tbl-rock-jointshear".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRockJointshear(params));
|
||||
} else if ("sp-get-tbl-rock-resonant-usual".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRockResonantUsual(params));
|
||||
} else if ("sp-cnt-tbl-rock-resonant-usual".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRockResonantUsual(params));
|
||||
} else if ("sp-get-tbl-rock-rept-tri-u".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRockReptTriU(params));
|
||||
} else if ("sp-cnt-tbl-rock-rept-tri-u".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRockReptTriU(params));
|
||||
} else if ("sp-get-tbl-rock-rept-tri".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spGetTblRockReptTri(params));
|
||||
} else if ("sp-cnt-tbl-rock-rept-tri".equalsIgnoreCase(spName)) {
|
||||
jsonResponse.put("data", geoinfoApiV1Mapper.spCntTblRockReptTri(params));
|
||||
} else {
|
||||
// 지원하지 않는 서비스명인 경우 오류 처리
|
||||
throw new Exception("Unsupported service name: " + spName);
|
||||
}
|
||||
|
||||
// 성공 응답 기본값 설정
|
||||
jsonResponse.put("resultCode", 0);
|
||||
jsonResponse.put("result", "true");
|
||||
jsonResponse.put("message", "SUCCESS");
|
||||
|
||||
// 성공 코드 반환
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int isValidWebApiKey(HashMap<String, Object> params) throws Exception {
|
||||
return geoinfoApiV1Mapper.spIsValidWebApiKeyId(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -22,7 +22,29 @@ import javax.crypto.spec.IvParameterSpec;
|
|||
import javax.crypto.spec.PBEKeySpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
|
||||
public class CryptoUtil {
|
||||
// ===== [고정 키 AES - 빠른 버전] =====
|
||||
private static SecretKeySpec FIXED_SECRET_KEY;
|
||||
|
||||
/**
|
||||
* encryptQuickAES key
|
||||
* 서버 기동시 1회 자동 실행됨
|
||||
*/
|
||||
static {
|
||||
try {
|
||||
String key = EgovProperties.getProperty("SHA256.secret_key").trim();
|
||||
|
||||
MessageDigest sha = MessageDigest.getInstance("SHA-256");
|
||||
byte[] keyBytes = sha.digest(key.getBytes("UTF-8"));
|
||||
|
||||
FIXED_SECRET_KEY = new SecretKeySpec(keyBytes, "AES");
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("CryptoUtil AES key initialization failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* MD5 로 해시 한다.
|
||||
*
|
||||
|
|
@ -142,4 +164,27 @@ public class CryptoUtil {
|
|||
byte[] decryptedTextBytes = cipher.doFinal(encryoptedTextBytes);
|
||||
return new String(decryptedTextBytes);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* AES 고정 키 암호화 (빠름)
|
||||
*/
|
||||
public static String encryptQuickAES(String plainText) throws Exception {
|
||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, FIXED_SECRET_KEY);
|
||||
return Base64.getEncoder()
|
||||
.encodeToString(cipher.doFinal(plainText.getBytes("UTF-8")));
|
||||
}
|
||||
|
||||
/**
|
||||
* AES 고정 키 복호화
|
||||
*/
|
||||
public static String decryptQuickAES(String cipherText) throws Exception {
|
||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
cipher.init(Cipher.DECRYPT_MODE, FIXED_SECRET_KEY);
|
||||
return new String(
|
||||
cipher.doFinal(Base64.getDecoder().decode(cipherText)),
|
||||
"UTF-8"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -33,7 +33,7 @@ public class File2019Controller {
|
|||
private File2019Service file2019Service;
|
||||
|
||||
public String filePath = EgovProperties.getProperty("Geoinfo.FilePath");
|
||||
|
||||
|
||||
// 파일 다운로드
|
||||
@RequestMapping(value = "file2019.do")
|
||||
public void download(Map<String, Object> map, HttpServletResponse response, HttpServletRequest request, @RequestParam("stored_file_name") String stored_file_name, @RequestParam("target") String target, @RequestParam("idx") int idx) throws Exception {
|
||||
|
|
@ -100,41 +100,41 @@ public class File2019Controller {
|
|||
System.out.println(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/com/file2019DownloadPopup")
|
||||
public void fileDownload(ModelMap model,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
public void fileDownload(ModelMap model,
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@RequestParam Map<String, Object> params) throws Exception {
|
||||
|
||||
|
||||
//System.out.println("/com/fileDownloadPopup.do start!!!~~~~~~~");
|
||||
String filePath3D = request.getSession().getServletContext().getRealPath("/") + EgovProperties.getProperty("Geoinfo.FilePath3D");
|
||||
String reportPath = request.getSession().getServletContext().getRealPath("/") + EgovProperties.getProperty("Geoinfo.Report");
|
||||
|
||||
|
||||
String version = (String)params.get("version");
|
||||
|
||||
|
||||
String filePath = "";
|
||||
String saveFileName = "";
|
||||
String saveFileName1 = "";
|
||||
|
||||
|
||||
if("old".equals(version)){
|
||||
String sFileFolder = request.getSession().getServletContext().getRealPath("/") + "files/4dim/";
|
||||
String cFileFolder = request.getSession().getServletContext().getRealPath("/") + "files/cad/";
|
||||
String iFileFolder = request.getSession().getServletContext().getRealPath("/") + "files/shape/";
|
||||
|
||||
|
||||
String agu = (String)params.get("agu");
|
||||
String agu2 = (String)params.get("agu2");
|
||||
String aFolder = (String)params.get("aFolder");
|
||||
String adong1 = (String)params.get("adong");
|
||||
String type = (String)params.get("type");
|
||||
|
||||
|
||||
if(type.equals("cad")){
|
||||
filePath = cFileFolder + agu + "/"+agu2+"/" + aFolder + "/" + adong1 + ".zip";
|
||||
}else if(type.equals("shp")){
|
||||
filePath = iFileFolder + agu + "/"+agu2+"/" + aFolder + "/" + adong1 + ".zip";
|
||||
}else{
|
||||
filePath = sFileFolder + agu + "/"+agu2+"/" + aFolder + "/" + adong1 + ".4d";
|
||||
}
|
||||
}
|
||||
}else{
|
||||
String crwdId = (String)params.get("crwdId");
|
||||
String folder = (String)params.get("model");
|
||||
|
|
@ -146,7 +146,7 @@ public class File2019Controller {
|
|||
saveFileName1 = saveFileName ;
|
||||
System.out.println("1filePath - " + filePath);
|
||||
}
|
||||
|
||||
|
||||
if("report".equals(version)){
|
||||
String projectCode = (String)params.get("projectCode");
|
||||
String saveName = (String)params.get("fileName");
|
||||
|
|
@ -159,7 +159,7 @@ public class File2019Controller {
|
|||
}
|
||||
|
||||
File file = new File(filePath);
|
||||
|
||||
|
||||
if (file.exists()) {
|
||||
FileInputStream fis = new FileInputStream(file);
|
||||
byte[] buffer = new byte[(int) file.length()];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package geoinfo.com.file.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -12,7 +13,7 @@ public interface FileService {
|
|||
|
||||
void insertFile(Map<String, Object> map) throws Exception;
|
||||
|
||||
List<Map<String, Object>> selectFiles(Map<String, Object> map) throws Exception;
|
||||
List<Map<String, Object>> selectFiles(Map<String, Object> map) throws Exception, SQLException;
|
||||
|
||||
void deleteFiles(Map<String, Object> map) throws Exception;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,5 +38,5 @@ public class File2019ServiceImpl implements File2019Service{
|
|||
public List<Map<String, Object>> selectWebCommFile(Map<String, Object> map) throws Exception {
|
||||
return file2019Mapper.selectWebCommFile(map);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package geoinfo.com.file.service.impl;
|
|||
import geoinfo.com.file.service.FileMapper;
|
||||
import geoinfo.com.file.service.FileService;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -11,6 +12,7 @@ import javax.annotation.Resource;
|
|||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Service("fileService")
|
||||
|
|
@ -19,6 +21,9 @@ public class FileServiceImpl implements FileService{
|
|||
@Resource(name="fileMapper")
|
||||
private FileMapper fileMapper;
|
||||
|
||||
String DB_URL = EgovProperties.getProperty("Oracle.Url").trim();
|
||||
String DB_USER = EgovProperties.getProperty("Oracle.ID").trim();
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectFileInfo(Map<String, Object> map) throws Exception
|
||||
{
|
||||
|
|
@ -38,8 +43,23 @@ public class FileServiceImpl implements FileService{
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectFiles(Map<String, Object> map) throws Exception {
|
||||
return fileMapper.selectFiles(map);
|
||||
public List<Map<String, Object>> selectFiles(Map<String, Object> map) throws Exception, SQLException {
|
||||
|
||||
List<Map<String, Object>> res = null;
|
||||
try {
|
||||
System.out.println("DB URL:[" + DB_URL + "]\n" + "DB USER:[" + DB_USER + "]\n" + "");
|
||||
res = fileMapper.selectFiles(map);
|
||||
} catch (SQLException e) {
|
||||
if (e.getMessage().contains("Socket read timed out")) {
|
||||
// 시간 초과 예외 처리 로직
|
||||
System.err.println("데이터베이스 연결 시간 초과!");
|
||||
// 예외 상황에 대한 적절한 처리 (재시도, 사용자에게 알림 등)
|
||||
} else {
|
||||
// 다른 SQL 예외 처리
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -67,14 +67,14 @@ public class JusangdoController {
|
|||
EgovMap result = jusangdoService.selectTblHeader(params);
|
||||
if (result != null) {
|
||||
String projectCode = (String)result.get("projectCode");
|
||||
OOFFile file = oof.addFile("crf.root", realPath + File.separator + "web" + File.separator + "rex" + File.separator + "holeForMap.reb");
|
||||
OOFFile file = oof.addFile("crf.root", realPath + "web" + File.separator + "rex" + File.separator + "holeForMap.reb");
|
||||
file.addField("p_code", projectCode);
|
||||
file.addField("h_code", holeCodeSplit[i]);
|
||||
file.addField("server_ip", imagePath);
|
||||
|
||||
System.out.println("생성위치로그확인하기."+realPath + File.separator + "web" + File.separator + "rex" + File.separator + "holeForMap.reb");
|
||||
System.out.println("생성위치로그확인하기."+realPath + "web" + File.separator + "rex" + File.separator + "holeForMap.reb");
|
||||
System.out.println("p_code----------------->"+projectCode);
|
||||
System.out.println("h_code----------------->"+holeCodeSplit);
|
||||
System.out.println("h_code----------------->"+holeCodeSplit[i]);
|
||||
System.out.println("server_ip----------------->"+imagePath);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
package geoinfo.drilling.account;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
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 org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import geoinfo.drilling.account.service.DrillingAccountService;
|
||||
|
||||
@Controller
|
||||
public class DrillingAccountController {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DrillingAccountController.class);
|
||||
|
||||
@Autowired
|
||||
DrillingAccountService drillingAccountService;
|
||||
|
||||
@RequestMapping(value = "/drilling/mypage.do")
|
||||
public String drillingAccountMypage(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
return "redirect:/index.do";
|
||||
}
|
||||
|
||||
return "/drilling/account/mypage";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/drilling/account/updateMypage.do", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public JSONObject drillingInputAdd(HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap<String,Object> params) throws Exception {
|
||||
|
||||
JSONObject jSONOResponse = new JSONObject();
|
||||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
int resultCnt = 0;
|
||||
if ("".equals(userId)) {
|
||||
|
||||
jSONOResponse.put("result", "FAIL");
|
||||
jSONOResponse.put("message", "아이디 정보가 없습니다. 다시 로그인하시기 바랍니다.");
|
||||
} else {
|
||||
params.put("userid", userId);
|
||||
resultCnt = drillingAccountService.updateDrillingAccountMyPage(request, params);
|
||||
if(resultCnt < 1) {
|
||||
jSONOResponse.put("result", "FAIL");
|
||||
jSONOResponse.put("message", "회원정보 수정처리 중 오류가 발생했습니다. 다시 시도해주시기 바랍니다.");
|
||||
} else {
|
||||
jSONOResponse.put("result", "SUCCESS");
|
||||
jSONOResponse.put("message", "회원정보가 수정되었습니다.");
|
||||
|
||||
request.getSession().setAttribute("USERNAME", params.get("userName"));
|
||||
request.getSession().setAttribute("PHONE", params.get("phone"));
|
||||
request.getSession().setAttribute("EMAIL", params.get("email"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return jSONOResponse;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package geoinfo.drilling.account.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Mapper("drillingAccountMapper")
|
||||
public interface DrillingAccountMapper {
|
||||
|
||||
public int updateDrillingAccountMyPage(Map<String, Object> map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package geoinfo.drilling.account.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public interface DrillingAccountService {
|
||||
|
||||
int updateDrillingAccountMyPage(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package geoinfo.drilling.account.service.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import geoinfo.drilling.account.service.DrillingAccountMapper;
|
||||
import geoinfo.drilling.account.service.DrillingAccountService;
|
||||
|
||||
@Service("drillingAccountService")
|
||||
public class DrillingAccountServiceImpl implements DrillingAccountService {
|
||||
|
||||
|
||||
@Resource(name="drillingAccountMapper")
|
||||
private DrillingAccountMapper drillingAccountMapper;
|
||||
|
||||
@Override
|
||||
public int updateDrillingAccountMyPage(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
||||
int resultCnt = 0;
|
||||
|
||||
resultCnt = drillingAccountMapper.updateDrillingAccountMyPage(params);
|
||||
return resultCnt;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package geoinfo.drilling.common;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||
import geoinfo.main.login.service.LoginService;
|
||||
|
||||
@Controller
|
||||
public class DrillingCommonController {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DrillingCommonController.class);
|
||||
|
||||
@Resource(name = "loginService")
|
||||
private LoginService loginService;
|
||||
|
||||
@Autowired
|
||||
DrillingInquiryService drillingInquiryService;
|
||||
|
||||
@RequestMapping(value = "/drilling/common/includeTopMenu.do")
|
||||
public String memberRegi(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
return "isError";
|
||||
}
|
||||
|
||||
model.put("userName", String.valueOf(request.getSession().getAttribute("USERNAME")));
|
||||
model.put("cls", String.valueOf(request.getSession().getAttribute("CLS")));
|
||||
model.put("companyName", request.getSession().getAttribute("COMPANYNAME"));
|
||||
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("userid", String.valueOf(request.getSession().getAttribute("USERID")));
|
||||
try {
|
||||
Map<String, Object> result = loginService.selectWebMemberIn(map);
|
||||
model.put("masterCompanyCode", result.get("master_company_code"));
|
||||
model.put("partName", result.get("part_name"));
|
||||
model.put("phone", result.get("phone"));
|
||||
} catch (Exception e) {
|
||||
model.put("errorMessage", "계정이 존재하지 않습니다");
|
||||
return "/error";
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
HashMap<String, Object> spGetProjectMbrParams = drillingInquiryService.spGetProjectMbr( request, params, String.valueOf(request.getSession().getAttribute("USERID")) );
|
||||
model.addAttribute("mbr", spGetProjectMbrParams);
|
||||
} catch (Exception e) {
|
||||
model.put("errorMessage", e.getMessage());
|
||||
return "/error";
|
||||
}
|
||||
|
||||
return "/drilling/common/includeTopMenu";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,226 @@
|
|||
package geoinfo.drilling.home;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.com.WebConfirm;
|
||||
import geoinfo.drilling.home.service.DrillingHomeService;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||
import geoinfo.main.login.service.LoginService;
|
||||
import geoinfo.main.notice.service.NoticeService;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
@Controller
|
||||
public class DrillingHomeController {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DrillingHomeController.class);
|
||||
|
||||
@Resource(name = "loginService")
|
||||
private LoginService loginService;
|
||||
|
||||
@Autowired
|
||||
DrillingHomeService drillingHomeService;
|
||||
|
||||
@Autowired
|
||||
DrillingInquiryService drillingInquiryService;
|
||||
|
||||
@Autowired
|
||||
private NoticeService noticeService;
|
||||
|
||||
@RequestMapping(value = "/drilling/index.do")
|
||||
public ModelAndView drillingInquiry(@RequestParam HashMap<String, Object> params, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
ModelAndView mav = new ModelAndView();
|
||||
|
||||
|
||||
|
||||
params.put("firstIndex", 0);
|
||||
params.put("recordCountPerPage", 5);
|
||||
List<?> noticeList = noticeService.selectInfoList(params);
|
||||
|
||||
if (request.getSession().getAttribute("USERNAME") == null) {
|
||||
mav.setViewName("redirect:/index.do");
|
||||
return mav;
|
||||
}
|
||||
|
||||
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
String cls = MyUtil.getStringFromObject(request.getSession().getAttribute("CLS"));
|
||||
|
||||
mav.addObject("userId", userId);
|
||||
mav.addObject("cls", cls);
|
||||
|
||||
try {
|
||||
if (request.getSession().getAttribute("USERNAME") == null) {
|
||||
mav.setViewName("isError");
|
||||
return mav;
|
||||
}
|
||||
|
||||
mav.addObject("userName", String.valueOf(request.getSession().getAttribute("USERNAME")));
|
||||
mav.addObject("cls", String.valueOf(request.getSession().getAttribute("CLS")));
|
||||
mav.addObject("companyName", request.getSession().getAttribute("COMPANYNAME"));
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("userid", String.valueOf(request.getSession().getAttribute("USERID")));
|
||||
|
||||
Map<String, Object> result = loginService.selectWebMemberIn(map);
|
||||
|
||||
mav.addObject("masterCompanyCode", result.get("master_company_code"));
|
||||
|
||||
} catch (Exception e) {
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n";
|
||||
System.out.println(strTxt);
|
||||
}
|
||||
|
||||
mav.addObject("noticeList", noticeList);
|
||||
mav.setViewName("/drilling/home/drilling_index");
|
||||
return mav;
|
||||
}
|
||||
|
||||
// 지도에서 발주기관 소속 시추공 표시
|
||||
@RequestMapping(value = "/drilling/map/search-hole.do", method = RequestMethod.GET)
|
||||
public String drillingMapSearchHole(HttpServletRequest request, String projectCode, ModelMap model) throws Exception {
|
||||
model.put("data", drillingHomeService.drillingMapSearchHole(projectCode));
|
||||
|
||||
HashMap<String, Object> params = new HashMap<String, Object>();
|
||||
HashMap<String, Object> spGetProjectMbrParams = drillingInquiryService.spGetProjectMbr( request, params, String.valueOf(request.getSession().getAttribute("USERID")) );
|
||||
model.addAttribute("mbr", spGetProjectMbrParams);
|
||||
|
||||
return "jsonView";
|
||||
}
|
||||
|
||||
// MBR을 이용해 지도에서 발주기관 소속 시추공 표시
|
||||
@RequestMapping(value = "/drilling/map/search-hole-with-mbr.do", method = RequestMethod.GET)
|
||||
public String drillingMapSearchHoleWithMbr(HttpServletRequest request, String companyCode, ModelMap model) throws Exception {
|
||||
|
||||
|
||||
HashMap<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("COM_CODE", companyCode);
|
||||
|
||||
EgovMap mbr = drillingInquiryService.getTblMasterCompanyMbrByComCode(request, params, String.valueOf(request.getSession().getAttribute("USERID")));
|
||||
model.addAttribute("mbr", mbr);
|
||||
|
||||
double nOffsetKm = 2.0f; // 2Km 밖 까지 허용한다.
|
||||
if( mbr != null && mbr.get("minX") != null && mbr.get("minY") != null && mbr.get("maxX") != null && mbr.get("maxY") != null ) {
|
||||
} else {
|
||||
HashMap<String, Object> spGetProjectMbrParams = drillingInquiryService.spGetProjectMbr( request, params, String.valueOf(request.getSession().getAttribute("USERID")) );
|
||||
mbr = new EgovMap();
|
||||
mbr.put("minX", MyUtil.getDoubleFromObject( spGetProjectMbrParams.get("v_min_x") ) - nOffsetKm*1000);
|
||||
mbr.put("minY", MyUtil.getDoubleFromObject( spGetProjectMbrParams.get("v_min_y") ) - nOffsetKm*1000);
|
||||
mbr.put("maxX", MyUtil.getDoubleFromObject( spGetProjectMbrParams.get("v_max_x") ) + nOffsetKm*1000);
|
||||
mbr.put("maxY", MyUtil.getDoubleFromObject( spGetProjectMbrParams.get("v_max_y") ) + nOffsetKm*1000);
|
||||
}
|
||||
|
||||
if( mbr != null && mbr.get("minX") != null && mbr.get("minY") != null && mbr.get("maxX") != null && mbr.get("maxY") != null ) {
|
||||
params.put("MIN_X", MyUtil.getDoubleFromObject( mbr.get("minX") ) - nOffsetKm*1000);
|
||||
params.put("MIN_Y", MyUtil.getDoubleFromObject( mbr.get("minY") ) - nOffsetKm*1000);
|
||||
params.put("MAX_X", MyUtil.getDoubleFromObject( mbr.get("maxX") ) + nOffsetKm*1000);
|
||||
params.put("MAX_Y", MyUtil.getDoubleFromObject( mbr.get("maxY") ) + nOffsetKm*1000);
|
||||
model.put("data", drillingHomeService.drillingMapSearchHoleWithMbr(params));
|
||||
}
|
||||
|
||||
return "jsonView";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/drilling/topMenuSelect.do")
|
||||
public String memberRegi(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
return "isError";
|
||||
}
|
||||
|
||||
model.put("userName", String.valueOf(request.getSession().getAttribute("USERNAME")));
|
||||
model.put("cls", String.valueOf(request.getSession().getAttribute("CLS")));
|
||||
model.put("companyName", request.getSession().getAttribute("COMPANYNAME"));
|
||||
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("userid", String.valueOf(request.getSession().getAttribute("USERID")));
|
||||
|
||||
model.put("isFromDrillingSystem", false);
|
||||
|
||||
|
||||
|
||||
return "/home/center_01";
|
||||
}
|
||||
|
||||
// 상단 메뉴 선택
|
||||
@RequestMapping(value = "/drilling/top-menu-select.do")
|
||||
public ModelAndView drillingTopMenuSelect(@RequestParam Map<String, Object> params, HttpServletRequest request, HttpServletResponse response, @RequestParam("url") String url,
|
||||
RedirectAttributes rda) throws Exception
|
||||
{
|
||||
ModelAndView mv = new ModelAndView();
|
||||
|
||||
Enumeration<String> enumeration = request.getSession().getAttributeNames();
|
||||
|
||||
while (enumeration.hasMoreElements()) {
|
||||
String attributeName = enumeration.nextElement();
|
||||
System.out.println(attributeName);
|
||||
}
|
||||
|
||||
if (request.getSession().getAttribute("USERID") == null)
|
||||
{
|
||||
// login 아래 btn 설정 html
|
||||
mv.addObject("isLogin", false);
|
||||
int joinsearchIndex = url.indexOf("joinsearch");
|
||||
int joinIndex = url.indexOf("join");
|
||||
int pwsearchIndex = url.indexOf("pwsearch");
|
||||
|
||||
if( joinsearchIndex == -1 && joinIndex == -1 && pwsearchIndex == -1) {
|
||||
mv.addObject("msg", "로그인이 필요한 서비스입니다.");
|
||||
}
|
||||
|
||||
}else {
|
||||
mv.addObject("isLogin", true);
|
||||
}
|
||||
|
||||
String userId = "";
|
||||
String eGovUrl = "";
|
||||
|
||||
if (url.equals("center")) {
|
||||
mv.addObject("isFromDrillingSystem", false);
|
||||
mv.setViewName("/drilling/home/center");
|
||||
}
|
||||
|
||||
mv.addObject("userid", request.getSession().getAttribute("USERID"));
|
||||
mv.addObject("username", request.getSession().getAttribute("USERNAME"));
|
||||
mv.addObject("companyname", request.getSession().getAttribute("COMPANYNAME"));
|
||||
mv.addObject("url", url);
|
||||
mv.addObject("cls", request.getSession().getAttribute("CLS"));
|
||||
|
||||
mv.addObject("partname", request.getSession().getAttribute("PARTNNAME"));
|
||||
mv.addObject("phone", request.getSession().getAttribute("PHONE"));
|
||||
mv.addObject("email", request.getSession().getAttribute("EMAIL"));
|
||||
|
||||
mv.addObject("eGovUrl", eGovUrl);
|
||||
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package geoinfo.drilling.home.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Mapper("drillingHomeMapper")
|
||||
public interface DrillingHomeMapper {
|
||||
List<EgovMap> drillingMapSearchHole(String comCode);
|
||||
List<EgovMap> drillingMapSearchHoleWithMbr(HashMap<String, Object> params);
|
||||
public List<String> projectCodesByProjectMasterCompanyCodeAsList(@Param("comCodeList") List<String> comCodeList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package geoinfo.drilling.home.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
|
||||
public interface DrillingHomeService {
|
||||
public List<EgovMap> drillingMapSearchHole(String projectCode);
|
||||
public List<EgovMap> drillingMapSearchHoleWithMbr(HashMap<String, Object> params);
|
||||
|
||||
public List<String> projectCodesByProjectMasterCompanyCodeAsList(HashMap<String, Object> params) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package geoinfo.drilling.home.service.impl;
|
||||
|
||||
import geoinfo.drilling.home.service.DrillingHomeMapper;
|
||||
import geoinfo.drilling.home.service.DrillingHomeService;
|
||||
import geoinfo.drilling.input.service.DrillingInputService;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryMapper;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||
import geoinfo.main.login.service.LoginMapper;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import oracle.sql.TIMESTAMP;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Service("drillingHomeService")
|
||||
public class DrillingHomeServiceImpl implements DrillingHomeService {
|
||||
|
||||
|
||||
@Resource(name="drillingHomeMapper")
|
||||
private DrillingHomeMapper drillingHomeMapper;
|
||||
|
||||
@Override
|
||||
public List<EgovMap> drillingMapSearchHole(String projectCode) {
|
||||
return drillingHomeMapper.drillingMapSearchHole(projectCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EgovMap> drillingMapSearchHoleWithMbr(HashMap<String, Object> params) {
|
||||
return drillingHomeMapper.drillingMapSearchHoleWithMbr(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> projectCodesByProjectMasterCompanyCodeAsList(HashMap<String, Object> params) throws Exception {
|
||||
if( params.get("COM_CODE") == null ) {
|
||||
throw new Exception("comCode 값은 필수입니다.");
|
||||
}
|
||||
String comCode = MyUtil.getStringFromObject( params.get("COM_CODE") );
|
||||
List<String> comCodeList = new ArrayList<String>();
|
||||
comCodeList.add(comCode);
|
||||
|
||||
// 1. Mapper에서 List<String>으로 결과를 받습니다.
|
||||
List<String> projectCodes = drillingHomeMapper.projectCodesByProjectMasterCompanyCodeAsList(comCodeList);
|
||||
|
||||
if (projectCodes == null || projectCodes.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
/*
|
||||
|
||||
// 2. StringBuilder를 사용해 쉼표(,)로 문자열을 조합합니다.
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < projectCodes.size(); i++) {
|
||||
sb.append(projectCodes.get(i));
|
||||
if (i < projectCodes.size() - 1) {
|
||||
sb.append(",");
|
||||
}
|
||||
}
|
||||
|
||||
// 3. 조합된 문자열을 반환합니다.
|
||||
return sb.toString();
|
||||
*/
|
||||
|
||||
return projectCodes;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,540 @@
|
|||
package geoinfo.drilling.input;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.sql.SQLException;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jfree.util.Log;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
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 org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
import geoinfo.com.WebConfirm;
|
||||
import geoinfo.drilling.input.service.DrillingInputService;
|
||||
import geoinfo.map.mapControl.service.MapControlService;
|
||||
import geoinfo.regi.projectList.ProjectListController;
|
||||
import geoinfo.regi.selectClassInfo.service.SelectClassService;
|
||||
import geoinfo.regi.status.service.RegiPageService;
|
||||
import geoinfo.regi.util.exportGeotechnicalPointShp2;
|
||||
import geoinfo.util.MyUtil;
|
||||
import ictway.comm.util.parseData;
|
||||
import ictway.comm.util.strUtil;
|
||||
import ictway.comm.web.WebUtil;
|
||||
import ictway.whois.whoisSMS;
|
||||
|
||||
/**
|
||||
* 건설현장 입력 및 수정
|
||||
* @author thkim
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
public class DrillingInputController {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DrillingInputController.class);
|
||||
|
||||
@Autowired
|
||||
DrillingInputService drillingInputService;
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/drilling/input.do")
|
||||
public String memberRegi(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
return "redirect:/index.do";
|
||||
}
|
||||
|
||||
return "/drilling/input/drilling_input";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/drilling/input/add.do", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public JSONObject drillingInputAdd(
|
||||
HttpServletRequest request,
|
||||
@RequestBody String strJSON,
|
||||
HttpServletResponse response) {
|
||||
|
||||
JSONObject jSONOResponse = new JSONObject();
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jstrJSON: \n" + strJSON + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
JSONParser jsonParser = new JSONParser();
|
||||
JSONArray jsonArr = null;
|
||||
boolean isFail = false;
|
||||
String failMsg = "";
|
||||
try {
|
||||
jsonArr = (JSONArray)jsonParser.parse(strJSON);
|
||||
for (Object obj : jsonArr) {
|
||||
JSONObject jsonObject = (JSONObject) obj;
|
||||
|
||||
// JSONObject를 HashMap으로 변환
|
||||
HashMap<String, Object> params = MyUtil.JSONObjectToHashMap( jsonObject );
|
||||
|
||||
|
||||
try {
|
||||
HashMap<String, Object> hashMap = drillingInputService.drillingInputAdd(request, response, params);
|
||||
int nRetCode = MyUtil.getIntegerFromObject(hashMap.get("v_RetCode"));
|
||||
String lpszRetMsg = MyUtil.getStringFromObject(hashMap.get("v_RetMsg"));
|
||||
|
||||
if( nRetCode == 100 ) {
|
||||
jSONOResponse.put("resultCode", nRetCode);
|
||||
jSONOResponse.put("result", "true");
|
||||
jSONOResponse.put("message", "등록이 완료되었습니다.");
|
||||
} else {
|
||||
if( nRetCode == 11 ) {
|
||||
lpszRetMsg += "\n" +
|
||||
"사업명: " + params.get("constName");
|
||||
}
|
||||
jSONOResponse.put("resultCode", nRetCode);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", lpszRetMsg);
|
||||
|
||||
isFail = true;
|
||||
failMsg = lpszRetMsg;
|
||||
break;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"strJSON:[\n" + strJSON + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
jSONOResponse.put("resultCode", -1);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
} catch (org.json.simple.parser.ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if( isFail ) {
|
||||
jSONOResponse.put("resultCode", -2);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", failMsg);
|
||||
}
|
||||
|
||||
System.out.println("\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jSONOResponse.toJSONString():[" + jSONOResponse.toJSONString() + "]\n" +
|
||||
"\n--------------------------------------------------------------\n");
|
||||
|
||||
return jSONOResponse;
|
||||
}
|
||||
|
||||
// 발주기관 건설사목록 가져오기
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/drilling-company-list", method = RequestMethod.GET, produces = "application/json; charset=UTF-8")
|
||||
public String getDrillingCompanyList(HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap<String,Object> params) throws Exception {
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
strUtil sUtil = new strUtil();
|
||||
|
||||
String projectName = sUtil.checkNull((String)params.get("companyName"));
|
||||
|
||||
JSONArray jsonListObject = new JSONArray();
|
||||
|
||||
if( projectName == ""){
|
||||
jsonObject.put("resultMessage", "OK");
|
||||
jsonObject.put("resultCode", 200);
|
||||
jsonObject.put("result", new JSONObject().put("list", jsonListObject));
|
||||
} else {
|
||||
JSONObject result = new JSONObject();
|
||||
long start = System.currentTimeMillis();
|
||||
result.put("list", drillingInputService.selectConstructCompanyList(params));
|
||||
long end = System.currentTimeMillis();
|
||||
LOGGER.info("(CONTROLLER) selectConstructCompanyList 실행시간: {} ms", (end - start));
|
||||
|
||||
jsonObject.put("resultMessage", "OK");
|
||||
jsonObject.put("resultCode", 200);
|
||||
jsonObject.put("result", result);
|
||||
}
|
||||
|
||||
response.setContentType("application/json; charset=UTF-8"); // 응답 헤더 설정
|
||||
response.setCharacterEncoding("UTF-8"); // 응답 데이터 인코딩 설정 (중요)
|
||||
|
||||
try (OutputStream os = response.getOutputStream()) { // OutputStream 사용
|
||||
os.write(jsonObject.toString().getBytes("UTF-8")); // UTF-8 인코딩하여 출력
|
||||
}
|
||||
|
||||
return null; // @ResponseBody이므로 반환 값은 필요 없습니다.
|
||||
}
|
||||
|
||||
// [발주기관 > 건설현장입력] 건설사 계정 선택시 이름, 연락처 자동셋팅
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/const-user-info", method = RequestMethod.GET, produces = "application/json; charset=UTF-8")
|
||||
public String getConstUserInfo(HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap<String,Object> params) throws Exception {
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
strUtil sUtil = new strUtil();
|
||||
|
||||
String userid = sUtil.checkNull((String)params.get("userid"));
|
||||
|
||||
JSONArray jsonListObject = new JSONArray();
|
||||
|
||||
if( userid == ""){
|
||||
jsonObject.put("resultMessage", "OK");
|
||||
jsonObject.put("resultCode", 200);
|
||||
jsonObject.put("result", new JSONObject().put("data", jsonListObject));
|
||||
} else {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("data", drillingInputService.selectConstructUserInfo(params));
|
||||
|
||||
jsonObject.put("resultMessage", "OK");
|
||||
jsonObject.put("resultCode", 200);
|
||||
jsonObject.put("result", result);
|
||||
}
|
||||
|
||||
response.setContentType("application/json; charset=UTF-8"); // 응답 헤더 설정
|
||||
response.setCharacterEncoding("UTF-8"); // 응답 데이터 인코딩 설정 (중요)
|
||||
|
||||
try (OutputStream os = response.getOutputStream()) { // OutputStream 사용
|
||||
os.write(jsonObject.toString().getBytes("UTF-8")); // UTF-8 인코딩하여 출력
|
||||
}
|
||||
|
||||
return null; // @ResponseBody이므로 반환 값은 필요 없습니다.
|
||||
}
|
||||
|
||||
/**
|
||||
* 발주 기관 사용자의 소속을 가져온다.
|
||||
* @param request
|
||||
* @param params
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/drilling/input/departments.do", method = RequestMethod.GET, produces = { "application/json; charset=utf-8" })
|
||||
@ResponseBody
|
||||
public ResponseEntity<JSONObject> getDepartments (
|
||||
HttpServletRequest request,
|
||||
@RequestParam HashMap<String, Object> params,
|
||||
HttpServletResponse response
|
||||
) {
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"params" + params.toString() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
JSONObject jsonResponse = null;
|
||||
try {
|
||||
jsonResponse = new JSONObject();
|
||||
drillingInputService.getDepartments( request, params, jsonResponse );
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
jsonResponse = new JSONObject();
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
jsonResponse.put("resultCode", -1);
|
||||
jsonResponse.put("result", "false");
|
||||
jsonResponse.put("message", e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
System.out.println("\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jSONOResponse.toJSONString():[" + jsonResponse.toJSONString() + "]\n" +
|
||||
"\n--------------------------------------------------------------\n");
|
||||
|
||||
|
||||
int contentLength = 0;
|
||||
try {
|
||||
contentLength = jsonResponse.toJSONString().getBytes("UTF-8").length;
|
||||
} catch (UnsupportedEncodingException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setHeader("Content-Type", "application/json; charset=utf-8");
|
||||
response.setContentLength(contentLength); // Content-Length 설정
|
||||
try {
|
||||
response.getWriter().print(jsonResponse);
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/drilling/modify.do")
|
||||
public String drillingModify(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
return "redirect:/index.do";
|
||||
}
|
||||
|
||||
model.put("params", params);
|
||||
return "/drilling/input/drilling_input";
|
||||
}
|
||||
|
||||
/**
|
||||
* 기 입력된 하나의 건설현장을 수정하는 method.
|
||||
* @param request
|
||||
* @param strJSON
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/drilling/input/modify.do", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public JSONObject drillingInputModify(
|
||||
HttpServletRequest request,
|
||||
@RequestBody String strJSON,
|
||||
HttpServletResponse response) {
|
||||
|
||||
JSONObject jSONOResponse = new JSONObject();
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jstrJSON: \n" + strJSON + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
JSONParser jsonParser = new JSONParser();
|
||||
JSONArray jsonArr = null;
|
||||
boolean isFail = false;
|
||||
String failMsg = "";
|
||||
|
||||
try {
|
||||
jsonArr = (JSONArray)jsonParser.parse(strJSON);
|
||||
for (Object obj : jsonArr) {
|
||||
JSONObject jsonObject = (JSONObject) obj;
|
||||
|
||||
// JSONObject를 HashMap으로 변환
|
||||
HashMap<String, Object> params = MyUtil.JSONObjectToHashMap(jsonObject);
|
||||
try {
|
||||
|
||||
HashMap<String, Object> hashMap = drillingInputService.drillingInputModify(request, response, params);
|
||||
int nRetCode = MyUtil.getIntegerFromObject(hashMap.get("v_RetCode"));
|
||||
String lpszRetMsg = MyUtil.getStringFromObject(hashMap.get("v_RetMsg"));
|
||||
|
||||
if( nRetCode == 100 ) {
|
||||
jSONOResponse.put("resultCode", nRetCode);
|
||||
jSONOResponse.put("result", "true");
|
||||
jSONOResponse.put("message", "등록이 완료되었습니다.");
|
||||
} else {
|
||||
if( nRetCode == 11 ) {
|
||||
lpszRetMsg += "\n" +
|
||||
"사업명: " + params.get("constName");
|
||||
}
|
||||
jSONOResponse.put("resultCode", nRetCode);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", lpszRetMsg);
|
||||
|
||||
isFail = true;
|
||||
failMsg = lpszRetMsg;
|
||||
break;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"strJSON:[\n" + strJSON + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
jSONOResponse.put("resultCode", -1);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
} catch (org.json.simple.parser.ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if( isFail ) {
|
||||
jSONOResponse.put("resultCode", -2);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", failMsg);
|
||||
}
|
||||
|
||||
System.out.println("\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jSONOResponse.toJSONString():[" + jSONOResponse.toJSONString() + "]\n" +
|
||||
"\n--------------------------------------------------------------\n");
|
||||
|
||||
return jSONOResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* 발주기관 건설현장 수정화면 - 건설사 미선정 처리
|
||||
* @param request
|
||||
* @param strJSON
|
||||
* @param response
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/drilling/input/uncheckConstCompany.do", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public JSONObject modifyUncheckConstCompany( HttpServletRequest request, @RequestParam HashMap<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
|
||||
JSONObject jsonResult = new JSONObject();
|
||||
// HashMap<String, Object> params = new HashMap<>();
|
||||
int rowCnt = 0; // 처리 행 개수(3-정상:TEMP_META_INFO 정보, TEMP_PROJECT_INFO 정보 DELETE됨, TEMP_CONSTRUCTION_SITE_INFO 정보UPDATE됨)
|
||||
|
||||
rowCnt = drillingInputService.deleteTempMetaInfo(params);
|
||||
rowCnt += drillingInputService.deleteTempProjectInfo(params);
|
||||
rowCnt += drillingInputService.updateTempConstructSiteInfoSetPROJECT_CODE_NULL(params);
|
||||
|
||||
if (rowCnt < 3) {
|
||||
jsonResult.put("resultCode", rowCnt);
|
||||
jsonResult.put("result", "FAIL");
|
||||
jsonResult.put("message", "삭제처리 중 오류가 발생했습니다.");
|
||||
} else {
|
||||
jsonResult.put("resultCode", rowCnt);
|
||||
jsonResult.put("result", "SUCCESS");
|
||||
jsonResult.put("message", "삭제되었습니다.");
|
||||
}
|
||||
|
||||
|
||||
return jsonResult; // @ResponseBody이므로 반환 값은 필요 없습니다.
|
||||
}
|
||||
|
||||
/**
|
||||
* 발주기관 건설현장 삭제처리
|
||||
* @param request
|
||||
* @param strJSON
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/drilling/input/delete.do", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public JSONObject drillingInputDelete(HttpServletRequest request,@RequestParam HashMap<String,Object> params, HttpServletResponse response) {
|
||||
|
||||
JSONObject jSONOResponse = new JSONObject();
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
// "jstrJSON: \n" + strJSON + "\n" +
|
||||
"params: \n" + params + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
JSONParser jsonParser = new JSONParser();
|
||||
JSONArray jsonArr = null;
|
||||
boolean isFail = false;
|
||||
String failMsg = "";
|
||||
|
||||
try {
|
||||
|
||||
// HashMap<String, Object> hashMap = drillingInputService.drillingInputDel(request, response, params);
|
||||
drillingInputService.drillingInputDel(request, response, params);
|
||||
int nRetCode = MyUtil.getIntegerFromObject(params.get("v_RetCode"));
|
||||
String lpszRetMsg = MyUtil.getStringFromObject(params.get("v_RetMsg"));
|
||||
|
||||
if( nRetCode == 100 ) {
|
||||
jSONOResponse.put("resultCode", nRetCode);
|
||||
jSONOResponse.put("result", "true");
|
||||
jSONOResponse.put("message", "삭제가 완료되었습니다.");
|
||||
} else {
|
||||
jSONOResponse.put("resultCode", nRetCode);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", lpszRetMsg);
|
||||
|
||||
isFail = true;
|
||||
failMsg = lpszRetMsg;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
jSONOResponse.put("resultCode", -1);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", e.getMessage());
|
||||
}
|
||||
|
||||
if( isFail ) {
|
||||
jSONOResponse.put("resultCode", -2);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", failMsg);
|
||||
}
|
||||
|
||||
System.out.println("\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jSONOResponse.toJSONString():[" + jSONOResponse.toJSONString() + "]\n" +
|
||||
"\n--------------------------------------------------------------\n");
|
||||
|
||||
return jSONOResponse;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package geoinfo.drilling.input.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Mapper("drillingInputMapper")
|
||||
public interface DrillingInputMapper {
|
||||
public HashMap<String, Object> spAddTblCsi(HashMap<String, Object> params) throws SQLException;
|
||||
public HashMap<String, Object> spDelTblCsi(HashMap<String, Object> params) throws SQLException;
|
||||
public String test(HashMap<String, Object> params) throws SQLException;
|
||||
public Long findConstCompanyCodeByConstCompanyName(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
public void spGetMasterCompanyDistrict(HashMap<String, Object> spGetMasterCompanyDistrictParams) throws SQLException;
|
||||
|
||||
public List<EgovMap> selectConstructCompanyList(HashMap<String, Object> params) throws SQLException;
|
||||
public EgovMap getDepartments(HashMap<String, Object> params) throws SQLException;
|
||||
public HashMap<String, Object> spUdtTblCsi(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
public List<EgovMap> sPGetTblCsiByCid(HashMap<String, Object> params) throws SQLException;
|
||||
public EgovMap getItemByCid(HashMap<String, Object> params) throws SQLException;
|
||||
public EgovMap getItemByProjectCode(HashMap<String, Object> params) throws SQLException;
|
||||
public int selectConstructCompanyProjectByProjectCodeCnt(HashMap<String, Object> params) throws SQLException;
|
||||
public EgovMap selectConstructCompanyProjectWriting(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
public int updateProjectCodeAndProjectStateCodeByCid(HashMap<String, Object> params) throws SQLException;
|
||||
public int updateProjectCodeAndProjectStateCodeByProjectCode(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
/**
|
||||
* 건설현장 정보 상태 변경 이력을 등록합니다.
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SQLException
|
||||
*/
|
||||
public int insertConstructSiteHist(HashMap<String, Object> params) throws SQLException;
|
||||
public int deleteTempMetaInfo(HashMap<String, Object> params) throws SQLException;
|
||||
public int deleteTempProjectInfo(HashMap<String, Object> params) throws SQLException;
|
||||
public int updateTempConstructSiteInfoSetPROJECT_CODE_NULL(HashMap<String, Object> params) throws SQLException;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package geoinfo.drilling.input.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
|
||||
public interface DrillingInputService {
|
||||
HashMap<String, Object> getOrganizationUserGlGmGsGfCodes(String userId) throws Exception;
|
||||
HashMap<String, Object> drillingInputAdd(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params) throws Exception;
|
||||
HashMap<String, Object> drillingInputDel(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params) throws Exception;
|
||||
List<EgovMap> selectConstructCompanyList(HashMap<String, Object> params) throws Exception;
|
||||
Map<String, Object> selectConstructUserInfo(HashMap<String, Object> params) throws Exception;
|
||||
void getDepartments(HttpServletRequest request, HashMap<String, Object> params, JSONObject jsonResponse) throws Exception;
|
||||
public int selectConstructCompanyProjectByProjectCodeCnt(HashMap<String, Object> params) throws Exception;
|
||||
HashMap<String, Object> updateProjectCodeAndProjectStateCodeByCid(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||
HashMap<String, Object> updateProjectCodeAndProjectStateCodeByProjectCode(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||
|
||||
HashMap<String, Object> drillingInputModify(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params) throws Exception;
|
||||
HashMap<String, Object> findConstCompanyCodeByConstCompanyName(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public int deleteTempMetaInfo(HashMap<String, Object> params) throws Exception;
|
||||
public int deleteTempProjectInfo(HashMap<String, Object> params) throws Exception;
|
||||
public int updateTempConstructSiteInfoSetPROJECT_CODE_NULL(HashMap<String, Object> params) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,684 @@
|
|||
package geoinfo.drilling.input.service.impl;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.drilling.input.DrillingInputController;
|
||||
import geoinfo.drilling.input.service.DrillingInputMapper;
|
||||
import geoinfo.drilling.input.service.DrillingInputService;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||
import geoinfo.main.login.service.LoginMapper;
|
||||
import geoinfo.ntfc.service.NotificationService;
|
||||
import geoinfo.ntfc.service.NotificationVO;
|
||||
import geoinfo.regi.common.service.CommonService;
|
||||
import geoinfo.regi.projectList.service.ProjectListService;
|
||||
import geoinfo.util.MyUtil;
|
||||
import ictway.comm.util.strUtil;
|
||||
|
||||
@Service("drillingInputService")
|
||||
public class DrillingInputServiceImpl implements DrillingInputService {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DrillingInputServiceImpl.class);
|
||||
|
||||
@Resource(name="drillingInputMapper")
|
||||
private DrillingInputMapper drillingInputMapper;
|
||||
|
||||
@Resource(name="loginMapper")
|
||||
private LoginMapper loginMapper;
|
||||
|
||||
@Autowired
|
||||
DrillingInquiryService drillingInquiryService;
|
||||
|
||||
@Resource(name ="commonService")
|
||||
private CommonService commonService;
|
||||
|
||||
|
||||
@Resource(name = "projectListService")
|
||||
private ProjectListService projectListService;
|
||||
|
||||
@Resource(name = "notificationService")
|
||||
private NotificationService notificationService;
|
||||
|
||||
|
||||
/**
|
||||
* 발주기관 사용자의 Gl Gm Gs Gf Codes 구한다
|
||||
*/
|
||||
@Override
|
||||
public HashMap<String, Object> getOrganizationUserGlGmGsGfCodes(String userId) throws Exception {
|
||||
|
||||
String projectMasterCompanyName = loginMapper.findProjectMasterCompanyNameByUserid(userId);
|
||||
|
||||
if( projectMasterCompanyName == null ) {
|
||||
throw new Exception( "발주 기관 계정에 설정된 기관이 존재하지 않습니다. 로그인이 해제된 것으로 추측됩니다." );
|
||||
}
|
||||
|
||||
HashMap<String, Object> spGetMasterCompanyDistrictParams = new HashMap<String, Object>();
|
||||
|
||||
//String[] words = projectMasterCompanyName.split(" ");
|
||||
//String lastWord = words[words.length - 1];
|
||||
//spGetMasterCompanyDistrictParams.put("projectMasterCompanyName", lastWord);
|
||||
spGetMasterCompanyDistrictParams.put("projectMasterCompanyName", projectMasterCompanyName);
|
||||
|
||||
|
||||
drillingInputMapper.spGetMasterCompanyDistrict(spGetMasterCompanyDistrictParams);
|
||||
|
||||
return spGetMasterCompanyDistrictParams;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> drillingInputAdd(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params) throws Exception {
|
||||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
String addConstUserid = MyUtil.getStringFromObject( params.get("constUserid") );
|
||||
|
||||
HashMap<String, Object> spGetMasterCompanyDistrictParams = getOrganizationUserGlGmGsGfCodes(userId);
|
||||
|
||||
params.put("userId", userId);
|
||||
|
||||
params.put("masterCompanyOCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gl") ));
|
||||
params.put("masterCompanyTwCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gm") ));
|
||||
params.put("masterCompanyThCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gs") ));
|
||||
params.put("masterCompanyName", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gf") ));
|
||||
|
||||
|
||||
try {
|
||||
String constCompanyName = MyUtil.getStringFromObject( params.get("constCompanyName") );
|
||||
Long constCompanyCode = drillingInputMapper.findConstCompanyCodeByConstCompanyName(params);
|
||||
params.put("constCompanyCode", constCompanyCode);
|
||||
drillingInputMapper.spAddTblCsi(params);
|
||||
|
||||
if( constCompanyName == null ) {
|
||||
return params;
|
||||
}
|
||||
if( constCompanyName.trim().equals("") ) { // '건설사 미선정'에 체크 함.
|
||||
return params;
|
||||
}
|
||||
/**
|
||||
* 기업사용자를 지정했다면
|
||||
* : 기업사용자 프로젝트 목록에도 등록이 필요함. 등록시 필요한 파라미터를 셋팅한다.
|
||||
* @constUserId 복호화된 기업 사용자 아이디
|
||||
* @holeNumber 시추공 수(기업사용자 프로젝트 등록시 필수입력값으로, 신규생성임을 표시하기 위해 -999 입력)
|
||||
*/
|
||||
if (!"".equals(addConstUserid)) {
|
||||
params.put("constUserId", addConstUserid);
|
||||
params.put("holeNumber", -999);
|
||||
saveAndInsertMeta(params, request, response);
|
||||
}
|
||||
return params;
|
||||
} catch (SQLException e) {
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> drillingInputDel(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params) throws Exception {
|
||||
params.put("CID", params.get("cid"));
|
||||
|
||||
JSONObject tempConstructSiteInfo = drillingInquiryService.drillingInquiryOneItem(request, params);
|
||||
// JSONObject를 HashMap으로 변환
|
||||
ArrayList<EgovMap> arrayList = (ArrayList<EgovMap>) MyUtil.JSONObjectToHashMap( tempConstructSiteInfo ).get("datas");
|
||||
|
||||
if( arrayList.size() == 0) {
|
||||
throw new Exception("이미 삭제가 완료된 건설현장입니다.");
|
||||
}
|
||||
HashMap<String, Object> oldTempConstructSiteInfo = new HashMap<String, Object>(arrayList.get(0));
|
||||
|
||||
String projectCode = MyUtil.getStringFromObject( oldTempConstructSiteInfo.get("projectCode") );
|
||||
if (!"0".equals(oldTempConstructSiteInfo.get("projectStateCode")) && isInputInProgress(oldTempConstructSiteInfo)) { // 5-1)
|
||||
params.put("v_RetCode", 11);
|
||||
params.put("v_RetMsg", "해당 프로젝트는 기업 사용자가 입력을 시작하였으므로 삭제가 불가합니다.\n프로젝트 코드: [" + projectCode + "]");
|
||||
return params;
|
||||
} else { // 5-2)
|
||||
deleteTempMetaInfo(oldTempConstructSiteInfo);
|
||||
deleteTempProjectInfo(oldTempConstructSiteInfo);
|
||||
oldTempConstructSiteInfo.put("PROJECT_STATE_CODE", "0");
|
||||
updateTempConstructSiteInfoSetPROJECT_CODE_NULL(oldTempConstructSiteInfo);
|
||||
drillingInputMapper.spDelTblCsi(params);
|
||||
|
||||
// 기업사용자 알림내역에 추가한다.
|
||||
deleteNotification(request, response, params, oldTempConstructSiteInfo, projectCode);
|
||||
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
/**
|
||||
* 기업사용자에게 삭제 알림내역을 추가한다.
|
||||
* @param request
|
||||
* @param response
|
||||
* @param params
|
||||
* @param oldTempConstructSiteInfo
|
||||
* @param projectCode
|
||||
* @throws Exception
|
||||
*/
|
||||
private void deleteNotification(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params, HashMap<String, Object> oldTempConstructSiteInfo, String projectCode) throws Exception {
|
||||
NotificationVO vo = new NotificationVO();
|
||||
|
||||
// [알림 구분 및 내용 설정]
|
||||
String projectName = MyUtil.getStringFromObject(oldTempConstructSiteInfo.get("constName")); // 사업명 추출
|
||||
vo.setNtfcSeCode("PRJ_DEL"); // 알림구분코드: 신규 프로젝트 등록
|
||||
vo.setNtfcCn("[" + projectName + "] 건설현장 프로젝트 배정이 취소되었습니다. 발주기관 사용자에 의해 삭제되었습니다.");
|
||||
|
||||
|
||||
// [이동 파라미터 설정] JSON 형태로 저장하여 나중에 스크립트에서 활용
|
||||
String pcode = MyUtil.getStringFromObject(projectCode);
|
||||
vo.setLinkParamCn("{\"PROJECT_CODE\":\"" + pcode + "\"}");
|
||||
|
||||
// [이동 경로 및 방식 설정]
|
||||
// 클릭 시 이동할 URL (예: 프로젝트 상세조회 페이지)
|
||||
vo.setLinkUrl("/meta_info.do?REPORT_TYPE=CH&PROJECT_CODE=" + pcode);
|
||||
vo.setLinkMthdCode("GET"); // 이동 방식 (GET/POST)
|
||||
|
||||
|
||||
params.put("constUserId", oldTempConstructSiteInfo.get("constUserid"));
|
||||
insertNotification(request, response, params, vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EgovMap> selectConstructCompanyList(HashMap<String, Object> params) throws Exception {
|
||||
List<EgovMap> list = new ArrayList<EgovMap>();
|
||||
String companyName = MyUtil.getStringFromObject(params.get("companyName"));
|
||||
|
||||
if (companyName == null || companyName.isEmpty()) {
|
||||
return list;
|
||||
}
|
||||
|
||||
companyName = companyName.trim();
|
||||
|
||||
// 1. 자음/모음만 있는 불완전한 한글(ㄱ~ㅎ, ㅏ~ㅣ)이 포함되어 있는지 체크
|
||||
if (companyName.matches(".*[ㄱ-ㅎㅏ-ㅣ].*") && !companyName.matches(".*[가-힣].*")) {
|
||||
return list; // 검색을 수행하지 않고 즉시 반환
|
||||
}
|
||||
|
||||
// 2. 너무 흔한 단어 단독 검색 차단
|
||||
if (companyName.equals("(주)") || companyName.equals("주식회사")) {
|
||||
return list;
|
||||
}
|
||||
|
||||
String escapedName = companyName.replaceAll("^\\(.*?\\)", "");
|
||||
escapedName = escapedName.replaceAll("\\(.*?\\)$", "");
|
||||
escapedName = escapedName.replaceAll("\\(.*?\\).*", "");
|
||||
|
||||
//String escapedName = companyName.replace("(", "\\(").replace(")", "\\)");
|
||||
|
||||
params.put("companyName", escapedName);
|
||||
list = drillingInputMapper.selectConstructCompanyList(params);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectConstructUserInfo(HashMap<String, Object> params) throws Exception {
|
||||
Map<String, Object> result = new HashMap<String, Object>();
|
||||
|
||||
Map<String, Object> infoData = loginMapper.selectWebMemberIn(params);
|
||||
|
||||
if (result != infoData) {
|
||||
result.put("phone", infoData.get("phone"));
|
||||
result.put("userName", infoData.get("user_name"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDepartments(HttpServletRequest request, HashMap<String, Object> params, JSONObject jsonResponse) throws Exception {
|
||||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
|
||||
|
||||
String projectMasterCompanyName = loginMapper.findProjectMasterCompanyNameByUserid(userId);
|
||||
|
||||
if( projectMasterCompanyName == null ) {
|
||||
throw new Exception( "발주 기관 계정에 설정된 기관이 존재하지 않습니다" );
|
||||
}
|
||||
|
||||
HashMap<String, Object> spGetMasterCompanyDistrictParams = new HashMap<String, Object>();
|
||||
|
||||
//String[] words = projectMasterCompanyName.split(" ");
|
||||
//String lastWord = words[words.length - 1];
|
||||
//spGetMasterCompanyDistrictParams.put("projectMasterCompanyName", lastWord);
|
||||
projectMasterCompanyName = projectMasterCompanyName.trim();
|
||||
spGetMasterCompanyDistrictParams.put("projectMasterCompanyName", projectMasterCompanyName);
|
||||
|
||||
drillingInputMapper.spGetMasterCompanyDistrict(spGetMasterCompanyDistrictParams);
|
||||
|
||||
params.put("userId", userId);
|
||||
|
||||
params.put("glCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gl") ));
|
||||
params.put("gmCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gm") ));
|
||||
params.put("gsCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gs") ));
|
||||
params.put("gfCode", MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gf") ));
|
||||
|
||||
|
||||
try {
|
||||
EgovMap constCompanyCode = drillingInputMapper.getDepartments(params);
|
||||
jsonResponse.put("data", constCompanyCode);
|
||||
} catch (SQLException e) {
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int selectConstructCompanyProjectByProjectCodeCnt(HashMap<String, Object> params) throws Exception {
|
||||
return drillingInputMapper.selectConstructCompanyProjectByProjectCodeCnt(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> updateProjectCodeAndProjectStateCodeByCid(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
||||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
|
||||
params.put("userId", userId);
|
||||
|
||||
try {
|
||||
|
||||
EgovMap tbl = null;
|
||||
Long lCid = MyUtil.getLongFromObject( params.get("CID") );
|
||||
if( lCid == null ) {
|
||||
tbl = drillingInputMapper.getItemByProjectCode( params );
|
||||
if( tbl == null ) {
|
||||
// 발주기관 프로젝트 아님
|
||||
return params;
|
||||
}
|
||||
params.put("CID", tbl.get("cid"));
|
||||
} else {
|
||||
tbl = drillingInputMapper.getItemByCid( params );
|
||||
}
|
||||
if( tbl != null ) {
|
||||
HashMap<String, Object> updateProjectCodeParams = new HashMap<String, Object>();
|
||||
|
||||
updateProjectCodeParams.put("userId", userId);
|
||||
updateProjectCodeParams.put("PROJECT_CODE", params.get("PROJECT_CODE"));
|
||||
updateProjectCodeParams.put("PROJECT_STATE_CODE", params.get("PROJECT_STATE_CODE"));
|
||||
updateProjectCodeParams.put("CID", params.get("CID"));
|
||||
if (params.get("CONST_COMPANY_CODE") != null && !"".equals(params.get("CONST_COMPANY_CODE"))) updateProjectCodeParams.put("CONST_COMPANY_CODE", params.get("CONST_COMPANY_CODE"));
|
||||
if (params.get("CONST_COMPANY_ADMIN") != null && !"".equals(params.get("CONST_COMPANY_ADMIN"))) updateProjectCodeParams.put("CONST_COMPANY_ADMIN", params.get("CONST_COMPANY_ADMIN"));
|
||||
if (params.get("CONST_COMPANY_TEL") != null && !"".equals(params.get("CONST_COMPANY_TEL"))) updateProjectCodeParams.put("CONST_COMPANY_TEL", params.get("CONST_COMPANY_TEL"));
|
||||
if (params.get("CONST_USERID") != null && !"".equals(params.get("CONST_USERID"))) updateProjectCodeParams.put("CONST_USERID", params.get("CONST_USERID"));
|
||||
|
||||
int nResult = drillingInputMapper.updateProjectCodeAndProjectStateCodeByCid(updateProjectCodeParams);
|
||||
if( nResult == 0 ) {
|
||||
if( tbl.get("projectCode") != null && !tbl.get("projectCode").equals(params.get("PROJECT_CODE")) ) {
|
||||
throw new Exception( "해당 프로젝트는 이미 다른 프로젝트와 연결되어 있습니다." );
|
||||
}
|
||||
}
|
||||
|
||||
if ( 0 < nResult) { // 업데이트가 성공했을 경우에만 이력 기록
|
||||
int nAffectedRows = insertTempConstructSiteInfo(request, tbl, updateProjectCodeParams, userId); // TEMP_CONSTRUCT_SITE_HIST에 이력도 남겨준다.
|
||||
if( nAffectedRows == 0) {
|
||||
System.out.println("TEMP_CONSTRUCT_SITE_HIST insert에 실패하였습니다. cid:" + tbl.get("cid"));
|
||||
}
|
||||
}
|
||||
}
|
||||
return params;
|
||||
} catch (SQLException e) {
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> updateProjectCodeAndProjectStateCodeByProjectCode(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
||||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
|
||||
params.put("userId", userId);
|
||||
|
||||
try {
|
||||
EgovMap tbl = null;
|
||||
Long lCid = MyUtil.getLongFromObject( params.get("CID") );
|
||||
if( lCid == null ) {
|
||||
tbl = drillingInputMapper.getItemByProjectCode( params );
|
||||
if( tbl != null ) {
|
||||
params.put("CID", tbl.get("cid"));
|
||||
} else {
|
||||
return params;
|
||||
}
|
||||
} else {
|
||||
tbl = drillingInputMapper.getItemByCid( params );
|
||||
}
|
||||
if( tbl != null ) {
|
||||
|
||||
HashMap<String, Object> updateProjectCodeParams = new HashMap<String, Object>();
|
||||
|
||||
updateProjectCodeParams.put("userId", userId);
|
||||
updateProjectCodeParams.put("PROJECT_CODE", params.get("PROJECT_CODE"));
|
||||
updateProjectCodeParams.put("WHERE_PROJECT_CODE", params.get("WHERE_PROJECT_CODE"));
|
||||
updateProjectCodeParams.put("PROJECT_STATE_CODE", params.get("PROJECT_STATE_CODE"));
|
||||
updateProjectCodeParams.put("CID", params.get("CID"));
|
||||
|
||||
|
||||
int nResult = drillingInputMapper.updateProjectCodeAndProjectStateCodeByProjectCode(updateProjectCodeParams);
|
||||
if( nResult == 0 ) {
|
||||
} else {
|
||||
int nAffectedRows = insertTempConstructSiteInfo(request, tbl, updateProjectCodeParams, userId); // TEMP_CONSTRUCT_SITE_HIST에 이력도 남겨준다.
|
||||
if( nAffectedRows == 0) {
|
||||
System.out.println("TEMP_CONSTRUCT_SITE_HIST insert에 실패하였습니다. cid:" + tbl.get("cid"));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("TEMP_CONSTRUCT_SITE_INFO에서 대상을 찾을 수 없습니다.");
|
||||
}
|
||||
return params;
|
||||
} catch (SQLException e) {
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> drillingInputModify(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params)
|
||||
throws Exception {
|
||||
strUtil sUtil = new strUtil();
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
params.put("CID", params.get("cid"));
|
||||
|
||||
JSONObject tempConstructSiteInfo = drillingInquiryService.drillingInquiryOneItem(request, params);
|
||||
|
||||
// JSONObject를 HashMap으로 변환
|
||||
ArrayList<EgovMap> arrayList = (ArrayList<EgovMap>) MyUtil.JSONObjectToHashMap( tempConstructSiteInfo ).get("datas");
|
||||
HashMap<String, Object> oldTempConstructSiteInfo = new HashMap<String, Object>(arrayList.get(0));
|
||||
String projectCode = MyUtil.getStringFromObject( oldTempConstructSiteInfo.get("projectCode") );
|
||||
|
||||
HashMap<String, Object> findConstCompanyCodeByConstCompanyNameParams = getOrganizationUserGlGmGsGfCodes(userId);
|
||||
|
||||
|
||||
findConstCompanyCodeByConstCompanyNameParams.put("userId", userId);
|
||||
|
||||
findConstCompanyCodeByConstCompanyNameParams.put("masterCompanyOCode", MyUtil.getStringFromObject( findConstCompanyCodeByConstCompanyNameParams.get("v_gl") ));
|
||||
findConstCompanyCodeByConstCompanyNameParams.put("masterCompanyTwCode", MyUtil.getStringFromObject( findConstCompanyCodeByConstCompanyNameParams.get("v_gm") ));
|
||||
findConstCompanyCodeByConstCompanyNameParams.put("masterCompanyThCode", MyUtil.getStringFromObject( findConstCompanyCodeByConstCompanyNameParams.get("v_gs") ));
|
||||
findConstCompanyCodeByConstCompanyNameParams.put("masterCompanyName", MyUtil.getStringFromObject( findConstCompanyCodeByConstCompanyNameParams.get("v_gf") ));
|
||||
|
||||
// 건설사 계정 연결(암호화된 userid 복호화)
|
||||
String addConstUserid = MyUtil.getStringFromObject( params.get("constUserid") );
|
||||
params.put("constUserid", addConstUserid);
|
||||
|
||||
try {
|
||||
|
||||
findConstCompanyCodeByConstCompanyNameParams.put("constCompanyName", params.get("constCompanyName"));
|
||||
Long constCompanyCode = drillingInputMapper.findConstCompanyCodeByConstCompanyName(findConstCompanyCodeByConstCompanyNameParams);
|
||||
|
||||
|
||||
HashMap<String, Object> spUdtTblCsiParams = (HashMap<String, Object>) params.clone();
|
||||
|
||||
spUdtTblCsiParams.put("masterCompanyOCode", findConstCompanyCodeByConstCompanyNameParams.get("masterCompanyOCode"));
|
||||
spUdtTblCsiParams.put("masterCompanyTwCode", findConstCompanyCodeByConstCompanyNameParams.get("masterCompanyTwCode"));
|
||||
spUdtTblCsiParams.put("masterCompanyThCode", findConstCompanyCodeByConstCompanyNameParams.get("masterCompanyThCode"));
|
||||
spUdtTblCsiParams.put("constCompanyCode", constCompanyCode);
|
||||
spUdtTblCsiParams.put("crtUserid", oldTempConstructSiteInfo.get("crtUserid"));
|
||||
spUdtTblCsiParams.put("modUserid", userId);
|
||||
spUdtTblCsiParams.put("userId", userId);
|
||||
|
||||
|
||||
String orgConstUserid = ""; // 기존에 발주기관이 지정한 건설사 계정
|
||||
if (oldTempConstructSiteInfo.get("constUserid") != null && !"".equals(oldTempConstructSiteInfo.get("constUserid"))) {
|
||||
orgConstUserid = sUtil.checkNull((String) oldTempConstructSiteInfo.get("constUserid"));
|
||||
}
|
||||
/** addConstUserid 값 여부: 수정하면서 건설사 지정 처리 여부
|
||||
* 1) encryptId == "" && orgConstUserid == "" : 기지정 하지 않았고 새로 지정하지 않음 -> spUdtTblCsi 호출
|
||||
* 2) encryptId == "" && orgConstUserid != "" : 기지정했는데 미선정으로 수정 -> TEMP_META_~, TEMP_PROJECT_~ 삭제 그리고 TEMP_CONSTRUCT_~ UPDATE 완료 후 spUdtTblCsi 호출
|
||||
* 3) encryptId != "" && orgConstUserid == "" : 기지정 하지 않았는데 새로 지정함 -> SaveAndInsertMeta 호출. (기존에 생성된 PROJECT_CODE 없음, TEMP_META~, TEMP_PROJECT~에 추가) 그리고 spUdtTblCsi 호출
|
||||
* 4) encryptId != "" && orgConstUserid != "" : 기지정했고 그대로 둠 -> spUdtTblCsi 호출
|
||||
* 5) encryptId != "" && orgConstUserid != "" : 기지정했는데 다른 사람으로 지정 -> orgConstUser 입력 진행 여부 판단 쿼리 수행()
|
||||
* 5-1) orgConstUser가 입력을 시작했음 -> spUdtTblCsiParams.put("message", '기업사용자 수정 불가. 이전 기업사용자가 이미 입력을 시작한 프로젝트입니다'); // 발주기관 사용자에게 해당 메시지 보여주기
|
||||
* 5-2) orgConstUser가 입력을 전임 -> 기지정계정 삭제하고 SaveAndInsertMeta 호출. (기존에 생성된 PROJECT_CODE 없음, TEMP_META~, TEMP_PROJECT~에 추가) 그리고 spUdtTblCsi 호출
|
||||
*/
|
||||
|
||||
if ("".equals(addConstUserid)) {
|
||||
if ("".equals(orgConstUserid)) { // 1)
|
||||
} else { // 2)
|
||||
deleteTempMetaInfo(oldTempConstructSiteInfo);
|
||||
deleteTempProjectInfo(oldTempConstructSiteInfo);
|
||||
updateTempConstructSiteInfoSetPROJECT_CODE_NULL(oldTempConstructSiteInfo);
|
||||
// 프로젝트 삭제를 기업사용자의 알림내역에 추가한다.
|
||||
deleteNotification(request, response, params, oldTempConstructSiteInfo, projectCode);
|
||||
}
|
||||
drillingInputMapper.spUdtTblCsi(spUdtTblCsiParams);
|
||||
} else { // !"".equals(encryptId)
|
||||
if (orgConstUserid != null && "".equals(orgConstUserid)) { // 3)
|
||||
EgovMap tbl = null; // cid로 발주기관 등록 건설현장 정보 조회(PROJECT_CODE 취득)
|
||||
String constUserId = addConstUserid;
|
||||
params.put("constUserId", constUserId);
|
||||
tbl = drillingInputMapper.getItemByCid( params );
|
||||
if (tbl.get("projectCode") != null && !"".equals(tbl.get("projectCode")) && isInputInProgress(oldTempConstructSiteInfo)) { // PROJECT_CODE가 존재하면 입력중인 프로젝트.
|
||||
spUdtTblCsiParams.put("v_RetCode", 11);
|
||||
spUdtTblCsiParams.put("v_RetMsg", "기업사용자 수정 불가. 이전 기업사용자가 이미 입력을 시작한 프로젝트입니다.");
|
||||
} else { // 입력된 정보 없음. INSERT 처리 후 끝
|
||||
params.put("constProjectCode", "");
|
||||
params.put("holeNumber", -999);
|
||||
}
|
||||
saveAndInsertMeta(params, request, response);
|
||||
drillingInputMapper.spUdtTblCsi(spUdtTblCsiParams);
|
||||
} else { // !"".equals(orgConstUserId)
|
||||
if (addConstUserid.equals(orgConstUserid)) { // 4)
|
||||
} else { // !encryptId.equals(orgConstUserid) 5)
|
||||
// 기업사용자 입력 진행 여부: !NULL -> 입력 전, NULL -> 입력 중(삭제불가)
|
||||
EgovMap constCompanyProjectWriting = drillingInputMapper.selectConstructCompanyProjectWriting(oldTempConstructSiteInfo);
|
||||
if (constCompanyProjectWriting == null) { // 5-1)
|
||||
spUdtTblCsiParams.put("v_RetCode", 11);
|
||||
spUdtTblCsiParams.put("v_RetMsg", "기업사용자 수정 불가. 이전 기업사용자가 이미 입력을 시작한 프로젝트입니다.");
|
||||
return spUdtTblCsiParams;
|
||||
} else { // 5-2)
|
||||
deleteTempMetaInfo(oldTempConstructSiteInfo);
|
||||
deleteTempProjectInfo(oldTempConstructSiteInfo);
|
||||
// 프로젝트 삭제를 기업사용자의 알림내역에 추가한다.
|
||||
deleteNotification(request, response, params, oldTempConstructSiteInfo, projectCode);
|
||||
params.put("holeNumber", -999);
|
||||
params.put("constProjectCode", oldTempConstructSiteInfo.get("projectCode")); // 기존에 부여된 PROJECT_CODE 유지
|
||||
params.put("constUserId", addConstUserid); // 새로 선정한 건설사계정
|
||||
saveAndInsertMeta(params, request, response);
|
||||
}
|
||||
}
|
||||
drillingInputMapper.spUdtTblCsi(spUdtTblCsiParams);
|
||||
}
|
||||
}
|
||||
|
||||
return spUdtTblCsiParams;
|
||||
} catch (SQLException e) {
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> findConstCompanyCodeByConstCompanyName(HashMap<String, Object> params) throws Exception {
|
||||
Long constCompanyCode = drillingInputMapper.findConstCompanyCodeByConstCompanyName(params);
|
||||
params.put("constCompanyCode", constCompanyCode);
|
||||
return params;
|
||||
}
|
||||
|
||||
private int insertTempConstructSiteInfo(HttpServletRequest request, EgovMap tbl, HashMap<String, Object> params, String userId) throws SQLException {
|
||||
HashMap<String, Object> histParams = new HashMap<String, Object>();
|
||||
|
||||
// 이전 상태값 (EgovMap은 보통 camelCase로 키를 반환합니다)
|
||||
Object preStateCode = tbl.get("projectStateCode");
|
||||
|
||||
histParams.put("CID", params.get("CID"));
|
||||
histParams.put("PROJECT_CODE", params.get("PROJECT_CODE"));
|
||||
histParams.put("PRE_PROJECT_STATE_CODE", preStateCode != null ? preStateCode.toString() : null); // 이전 상태
|
||||
histParams.put("PROJECT_STATE_CODE", params.get("PROJECT_STATE_CODE")); // 현재 변경된 상태
|
||||
histParams.put("MOD_REASON", "지반정보 등록 프로젝트 연결"); // 변경 사유 (필요에 따라 파라미터로 받아서 설정 가능)
|
||||
histParams.put("userId", userId);
|
||||
|
||||
return drillingInputMapper.insertConstructSiteHist(histParams);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteTempMetaInfo(HashMap<String, Object> params) throws Exception {
|
||||
return drillingInputMapper.deleteTempMetaInfo(params);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteTempProjectInfo(HashMap<String, Object> params) throws Exception {
|
||||
return drillingInputMapper.deleteTempProjectInfo(params);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int updateTempConstructSiteInfoSetPROJECT_CODE_NULL(HashMap<String, Object> params) throws Exception {
|
||||
return drillingInputMapper.updateTempConstructSiteInfoSetPROJECT_CODE_NULL(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 건설현장 입력 시, 기업사용자(수주기관)를 선택하고 저장 시, 입력된 프로젝트가 기업사용자 프로젝트 목록에 추가하는 메서드
|
||||
*/
|
||||
public ModelAndView saveAndInsertMeta(@RequestParam HashMap<String, Object> params, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
HashMap<String,Object> getProviderInfoParams = new HashMap<String, Object>();
|
||||
getProviderInfoParams.put("USERID", params.get("constUserId"));
|
||||
EgovMap constUserInfo = commonService.getProviderInfo(getProviderInfoParams); // 기업사용자 회원정보
|
||||
|
||||
// 1. 전달받은 파라미터 설정
|
||||
HashMap<String, Object> metaParams = new HashMap<String, Object>();
|
||||
metaParams.put("REPORT_TYPE", "CH");
|
||||
metaParams.put("PROJECT_CODE", params.get("constProjectCode")); // 프로젝트코드
|
||||
metaParams.put("TEMP_CONSTRUCT_SITE_INFO-CID", params.get("v_CID")); // Add처리에서 넘어온 cid 값
|
||||
if (params.get("cid") != null && !"".equals(params.get("cid"))) { // Modify처리에서 넘어온 cid 값
|
||||
metaParams.put("TEMP_CONSTRUCT_SITE_INFO-CID", params.get("CID"));
|
||||
}
|
||||
metaParams.put("constUserId", params.get("constUserId")); // 발주기관 선택 건설사 계정
|
||||
|
||||
metaParams.put("INPUT_COMPANY", params.get("constCompanyName")); // 입력기관.
|
||||
metaParams.put("DEPT", constUserInfo.get("partName")); // 부서명. 해당 기업 사용자의 부서명 조회해서 넣기.
|
||||
metaParams.put("ADMIN_NAME", params.get("constCompanyAdmin")); // 담당자 명
|
||||
metaParams.put("EMAIL", constUserInfo.get("email")); // Email. 해당 기업 사용자 정보 조회해서 넣기.
|
||||
|
||||
|
||||
|
||||
metaParams.put("TEL", params.get("constCompanyTel")); // 전화번호 <- 건설현장 입력 시 사용된 전화번호를 넣는다.
|
||||
metaParams.put("PHONE", params.get("constCompanyTel")); // 핸드폰 <- 건설현장 입력 시 사용된 전화번호를 넣는다.
|
||||
metaParams.put("SEARCHDATE", ""); // 시추 날짜
|
||||
metaParams.put("PROJECT_NAME", params.get("constName")); // 사업명
|
||||
metaParams.put("HOLE_NUMBER", params.get("holeNumber")); // 총 시추공수
|
||||
metaParams.put("HOLE_ADMIN_NAME", ""); // 시추담당자
|
||||
metaParams.put("HOLE_COMPANY", ""); // 시추업체
|
||||
metaParams.put("HOLE_SPOT_SD", ""); // 시추지역 - 시도
|
||||
metaParams.put("HOLE_SPOT_SGG", ""); // 시추지역 - 시군구
|
||||
metaParams.put("HOLE_SPOT", ""); // 시추지역 - 지역명
|
||||
metaParams.put("REMARK", ""); // 비고
|
||||
metaParams.put("rUrl", "");
|
||||
|
||||
// 2. ProjectListController의 insertMeta 호출
|
||||
ModelAndView model = new ModelAndView();
|
||||
|
||||
model = projectListService.insertMeta(metaParams, model, request, response); // insertMeta 호출 시 발생되는 오류는 조치하기.
|
||||
|
||||
// 기업사용자 알림내역에 추가한다.
|
||||
NotificationVO vo = new NotificationVO();
|
||||
|
||||
// [알림 구분 및 내용 설정]
|
||||
String projectName = MyUtil.getStringFromObject(metaParams.get("PROJECT_NAME")); // 사업명 추출
|
||||
vo.setNtfcSeCode("PRJ_NEW"); // 알림구분코드: 신규 프로젝트 등록
|
||||
vo.setNtfcCn("[" + projectName + "] 건설현장 프로젝트가 배정되었습니다. 목록을 확인해 주세요.");
|
||||
|
||||
|
||||
// [이동 파라미터 설정] JSON 형태로 저장하여 나중에 스크립트에서 활용
|
||||
String pcode = MyUtil.getStringFromObject(metaParams.get("PROJECT_CODE"));
|
||||
vo.setLinkParamCn("{\"pcode\":\"" + pcode + "\"}");
|
||||
|
||||
// [이동 경로 및 방식 설정]
|
||||
// 클릭 시 이동할 URL (예: 프로젝트 상세조회 페이지)
|
||||
vo.setLinkUrl("/meta_info.do?REPORT_TYPE=CH&PROJECT_CODE=" + pcode);
|
||||
vo.setLinkMthdCode("GET"); // 이동 방식 (GET/POST)
|
||||
|
||||
insertNotification(request, response, params, vo);
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
private void insertNotification(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params, NotificationVO vo) throws Exception {
|
||||
// 알림 등록을 위한 데이터 설정
|
||||
|
||||
// [수신자 설정] params에서 기업사용자 ID(constUserId)를 가져옴
|
||||
String targetUserId = MyUtil.getStringFromObject(params.get("constUserId"));
|
||||
vo.setRecvUserId(targetUserId);
|
||||
|
||||
// [등록자 설정] 현재 세션의 발주기관 사용자 ID
|
||||
String rgtrId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
|
||||
if (rgtrId != null && targetUserId != null) {
|
||||
|
||||
|
||||
// [등록자 설정 및 저장]
|
||||
vo.setRgtrId(rgtrId);
|
||||
|
||||
try {
|
||||
// 실제 DB Insert 실행
|
||||
notificationService.insertNotification(vo);
|
||||
|
||||
// 결과 로그 또는 메시지 처리
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("resultCode", 200);
|
||||
resultMap.put("message", "기업사용자에게 알림이 전송되었습니다.");
|
||||
} catch (Exception e) {
|
||||
// 알림 등록 실패 시 로그 처리 (비즈니스 로직에 큰 영향이 없다면 에러를 던지지 않고 로그만 남김)
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
// 필수 정보 누락 시 처리
|
||||
System.out.println("알림 발송 실패: 수신자 ID 또는 등록자 ID가 존재하지 않습니다.");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 건설현장 수정 시, 특정 기업사용자에서 다른 기업사용자로 변경하면 기존 기업사용자의 프로젝트제거하는 메서드
|
||||
*/
|
||||
public ModelAndView deleteProject(@RequestParam HashMap<String, Object> params, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
// 1. 전달받은 파라미터 설정
|
||||
HashMap<String, Object> deleteParams = new HashMap<String, Object>();
|
||||
deleteParams.put("REPORT_TYPE", "CH");
|
||||
deleteParams.put("PROJECT_CODE", params.get("constProjectCode")); // 프로젝트코드
|
||||
|
||||
|
||||
// 2. ProjectListController의 deleteAll 호출
|
||||
ModelAndView model = new ModelAndView();
|
||||
|
||||
model = projectListService.deleteAll(deleteParams, model, request, response); // deleteAll 호출 시 발생되는 오류는 조치하기.
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 건설현장 삭제 시, 해당 프로젝트를 기업사용자가 이미 수정을 시작했는지 판단하는 method.
|
||||
* @return
|
||||
* @throws SQLException
|
||||
*/
|
||||
private boolean isInputInProgress(HashMap<String, Object> oldTempConstructSiteInfo) throws SQLException {
|
||||
oldTempConstructSiteInfo.put("PROJECT_CODE", oldTempConstructSiteInfo.get("projectCode"));
|
||||
|
||||
int nCnt = drillingInputMapper.selectConstructCompanyProjectByProjectCodeCnt(oldTempConstructSiteInfo);
|
||||
if( nCnt == 0 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
EgovMap constCompanyProjectWriting = drillingInputMapper.selectConstructCompanyProjectWriting(oldTempConstructSiteInfo);
|
||||
if (constCompanyProjectWriting == null) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,464 @@
|
|||
package geoinfo.drilling.inquiry;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
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.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
@Controller
|
||||
public class DrillingInquiryController {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DrillingInquiryController.class);
|
||||
|
||||
@Autowired
|
||||
DrillingInquiryService drillingInquiryService;
|
||||
|
||||
@RequestMapping(value = "/drilling/inquiry.do")
|
||||
public String drillingInquiry(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
return "redirect:/index.do";
|
||||
}
|
||||
|
||||
return "/drilling/inquiry/drilling_inquiry";
|
||||
}
|
||||
|
||||
/**
|
||||
* 시추정보 관리
|
||||
* 모든 입력상태의 건설현장 정보 목록을 표시한다.
|
||||
* @param map
|
||||
* @param params
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/drilling/mgmt-project.do")
|
||||
public ModelAndView drillingMgmtProject(Map<String, Object> map, @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
ModelAndView mv = new ModelAndView("/drilling/mgmt/project");
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
mv.setViewName("redirect:/index.do?cntyn=0");
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
||||
String cls = MyUtil.getStringFromObject( request.getSession().getAttribute("CLS") );
|
||||
|
||||
mv.addObject("userId", userId);
|
||||
mv.addObject("cls", cls);
|
||||
|
||||
try {
|
||||
HashMap<String, Object> spGetProjectMbrParams = drillingInquiryService.spGetProjectMbr( request, params, userId );
|
||||
mv.addObject("mbr", spGetProjectMbrParams);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
}
|
||||
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 관리 시추정보 현황
|
||||
* 입력상태가 등록완료인 건설현장 정보만 목록을 표시한다.
|
||||
* @param map
|
||||
* @param params
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/drilling/inquiry-project.do")
|
||||
public ModelAndView drillingInquiryProject(Map<String, Object> map, @RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
ModelAndView mv = new ModelAndView("/drilling/inquiry/drilling_inquiry_project");
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
mv.setViewName("redirect:/index.do?cntyn=0");
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
||||
String cls = MyUtil.getStringFromObject( request.getSession().getAttribute("CLS") );
|
||||
|
||||
mv.addObject("userId", userId);
|
||||
mv.addObject("cls", cls);
|
||||
|
||||
try {
|
||||
HashMap<String, Object> spGetProjectMbrParams = drillingInquiryService.spGetProjectMbr( request, params, userId );
|
||||
mv.addObject("mbr", spGetProjectMbrParams);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
}
|
||||
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/drilling/inquiry/list.do", method = RequestMethod.GET, produces = { "application/json; charset=utf-8" })
|
||||
@ResponseBody
|
||||
public ResponseEntity<JSONObject> drillingInquiryList (
|
||||
HttpServletRequest request,
|
||||
@RequestParam HashMap<String, Object> params,
|
||||
HttpServletResponse response
|
||||
) {
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"params" + params.toString() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
JSONObject jSONOResponse = null;
|
||||
try {
|
||||
jSONOResponse = drillingInquiryService.drillingInquiryList( request, params );
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
jSONOResponse = new JSONObject();
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
jSONOResponse.put("resultCode", -1);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jSONOResponse.toJSONString():[" + jSONOResponse.toJSONString() + "]\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
|
||||
int contentLength = 0;
|
||||
try {
|
||||
contentLength = jSONOResponse.toJSONString().getBytes("UTF-8").length;
|
||||
} catch (UnsupportedEncodingException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setHeader("Content-Type", "application/json; charset=utf-8");
|
||||
response.setContentLength(contentLength); // Content-Length 설정
|
||||
try {
|
||||
response.getWriter().print(jSONOResponse);
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/drilling/inquiry/one-item.do", method = RequestMethod.GET, produces = { "application/json; charset=utf-8" })
|
||||
@ResponseBody
|
||||
public ResponseEntity<JSONObject> drillingInquiryOneItem (
|
||||
HttpServletRequest request,
|
||||
@RequestParam HashMap<String, Object> params,
|
||||
HttpServletResponse response
|
||||
) {
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"params" + params.toString() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
JSONObject jSONOResponse = null;
|
||||
try {
|
||||
jSONOResponse = drillingInquiryService.drillingInquiryOneItem( request, params );
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
jSONOResponse = new JSONObject();
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
jSONOResponse.put("resultCode", -1);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jSONOResponse.toJSONString():[" + jSONOResponse.toJSONString() + "]\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
|
||||
int contentLength = 0;
|
||||
try {
|
||||
contentLength = jSONOResponse.toJSONString().getBytes("UTF-8").length;
|
||||
} catch (UnsupportedEncodingException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setHeader("Content-Type", "application/json; charset=utf-8");
|
||||
response.setContentLength(contentLength); // Content-Length 설정
|
||||
try {
|
||||
response.getWriter().print(jSONOResponse);
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 발주기관에 소속된 프로젝트 코드 목록을 조회한다.
|
||||
* @param request
|
||||
* @param params
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/drilling/inquiry/project-codes.do", method = RequestMethod.GET, produces = { "application/json; charset=utf-8" })
|
||||
@ResponseBody
|
||||
public ResponseEntity<JSONObject> drillingInquiryProjectCodes (
|
||||
HttpServletRequest request,
|
||||
@RequestParam HashMap<String, Object> params,
|
||||
HttpServletResponse response
|
||||
) {
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"params" + params.toString() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
JSONObject jSONOResponse = null;
|
||||
try {
|
||||
jSONOResponse = drillingInquiryService.drillingInquiryProjectCodes( request, params );
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
jSONOResponse = new JSONObject();
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
jSONOResponse.put("resultCode", -1);
|
||||
jSONOResponse.put("result", "false");
|
||||
jSONOResponse.put("message", e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jSONOResponse.toJSONString():[" + jSONOResponse.toJSONString() + "]\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
|
||||
int contentLength = 0;
|
||||
try {
|
||||
contentLength = jSONOResponse.toJSONString().getBytes("UTF-8").length;
|
||||
} catch (UnsupportedEncodingException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setHeader("Content-Type", "application/json; charset=utf-8");
|
||||
response.setContentLength(contentLength); // Content-Length 설정
|
||||
try {
|
||||
response.getWriter().print(jSONOResponse);
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 발주기관 프로젝트 CSV 다운로드 처리
|
||||
* @param request
|
||||
* @param params
|
||||
* @param response
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/drilling/inquiry/csvDownload.do", method = RequestMethod.GET, produces = { "text/csv; charset=UTF-8" })
|
||||
@ResponseBody
|
||||
public void drillingInquiryCsvDownload (
|
||||
HttpServletRequest request,
|
||||
@RequestParam HashMap<String, Object> params,
|
||||
HttpServletResponse response
|
||||
) throws Exception {
|
||||
int startIndex = 0;
|
||||
Long totalCount = 0L;
|
||||
// DB 조회
|
||||
JSONObject resultObj = drillingInquiryService.drillingInquiryList(request, params);
|
||||
|
||||
// 여기에서 list 꺼내기
|
||||
List<EgovMap> list = (List<EgovMap>) resultObj.get("datas");
|
||||
totalCount = (Long) resultObj.get("count");
|
||||
// CSV 생성
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
// 헤더
|
||||
sb.append("연번,사업명,입력상태,사업기간,사업단계,담당부서,담당자,담당연락처,건설사명,건설사담당자,건설사연락처\n");
|
||||
|
||||
Long idx = 0L; // 연번계산
|
||||
// 바디
|
||||
for (EgovMap row : list) {
|
||||
long index = totalCount - (startIndex + idx);
|
||||
|
||||
sb.append(index).append(","); // ★ 연번 화면 동일하게 출력
|
||||
idx++;
|
||||
// sb.append(row.get("cid")).append(",");
|
||||
|
||||
sb.append(csv(row.get("constName"))).append(",");
|
||||
sb.append(csv(row.get("projectStateCodeName"))).append(",");
|
||||
|
||||
// 사업기간 constStartDate ~ constEndDate
|
||||
sb.append(csv(row.get("constStartDate"))).append(" ~ ").append(csv(row.get("constEndDate"))).append(",");
|
||||
|
||||
sb.append(csv(row.get("constStateCodeName"))).append(",");
|
||||
sb.append(csv(row.get("masterCompanyDept"))).append(",");
|
||||
sb.append(csv(row.get("masterCompanyAdmin"))).append(",");
|
||||
sb.append(csv(row.get("masterCompanyTel"))).append(",");
|
||||
sb.append(csv(row.get("coinstCompanyDept"))).append(",");
|
||||
sb.append(csv(row.get("constCompanyAdmin"))).append(",");
|
||||
sb.append(csv(row.get("constCompanyTel"))).append("\n");
|
||||
}
|
||||
|
||||
byte[] csvBytes = sb.toString().getBytes("UTF-8");
|
||||
byte[] bom = new byte[] {(byte)0xEF, (byte)0xBB, (byte)0xBF};
|
||||
|
||||
// ---------- ★ 한글 파일명 브라우저별 처리 ----------
|
||||
String excelFileNm = "건설현장조회";
|
||||
if (params.get("excelFileNm") != null && !"".equals(params.get("excelFileNm"))) {
|
||||
excelFileNm = (String) params.get("excelFileNm");
|
||||
|
||||
}
|
||||
String filename = excelFileNm+".csv";
|
||||
String userAgent = request.getHeader("User-Agent");
|
||||
String encodedFilename;
|
||||
|
||||
if (userAgent.contains("MSIE") || userAgent.contains("Trident")) {
|
||||
// IE 11 이하
|
||||
encodedFilename = URLEncoder.encode(filename, "UTF-8").replaceAll("\\+", "%20");
|
||||
} else if (userAgent.contains("Edge")) {
|
||||
// Edge (Chromium 의 이전 EdgeHTML 버전)
|
||||
encodedFilename = URLEncoder.encode(filename, "UTF-8");
|
||||
} else {
|
||||
// Chrome, Firefox, Safari, New Edge
|
||||
encodedFilename = "UTF-8''" + URLEncoder.encode(filename, "UTF-8");
|
||||
}
|
||||
// -------------------------------------------------
|
||||
response.setContentType("text/csv; charset=UTF-8");
|
||||
response.setHeader("Content-Disposition", "attachment; filename*=" + encodedFilename);
|
||||
response.setContentLength(bom.length + csvBytes.length);
|
||||
|
||||
OutputStream os = response.getOutputStream();
|
||||
os.write(bom); // 먼저 BOM 쓰기
|
||||
os.write(csvBytes); // 그 다음 CSV 내용
|
||||
os.flush();
|
||||
}
|
||||
|
||||
private String s(Object o) {
|
||||
return o == null ? "" : o.toString();
|
||||
}
|
||||
|
||||
private String csv(Object o) {
|
||||
if (o == null) return "";
|
||||
|
||||
String value = o.toString();
|
||||
|
||||
boolean needQuote =
|
||||
value.contains(",") ||
|
||||
value.contains("\"") ||
|
||||
value.contains("\n") ||
|
||||
value.contains("\r");
|
||||
|
||||
if (value.contains("\"")) {
|
||||
value = value.replace("\"", "\"\"");
|
||||
}
|
||||
|
||||
if (needQuote) {
|
||||
value = "\"" + value + "\"";
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package geoinfo.drilling.inquiry.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Mapper("drillingInquiryMapper")
|
||||
public interface DrillingInquiryMapper {
|
||||
|
||||
public Long sPCntTblCsiByKeyword(HashMap<String, Object> params) throws SQLException;
|
||||
public List<EgovMap> spGetTblCsiByKeyword(HashMap<String, Object> params) throws SQLException;
|
||||
public String getComCodes(HashMap<String, Object> params) throws SQLException;
|
||||
public String spGetConstCompanyName(Long constCompanyCode) throws SQLException;
|
||||
public String spGetProjectMbr(HashMap<String, Object> params) throws SQLException;
|
||||
public List<EgovMap> drillingInquiryAutocompleteList(HashMap<String, Object> params) throws SQLException;
|
||||
public EgovMap getItemByProjectCode(HashMap<String, Object> params) throws SQLException;
|
||||
public EgovMap getTblMasterCompanyMbrByComCode(HashMap<String, Object> params) throws SQLException;
|
||||
public List<EgovMap> drillingInquiryProjectCodes(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package geoinfo.drilling.inquiry.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
|
||||
public interface DrillingInquiryService {
|
||||
JSONObject drillingInquiryList(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||
|
||||
JSONObject drillingInquiryOneItem(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||
|
||||
HashMap<String, Object> spGetProjectMbr(HttpServletRequest request, HashMap<String, Object> params, String userId) throws Exception;
|
||||
List<EgovMap> drillingInquiryAutocompleteList(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||
EgovMap getItemByProjectCode(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap getTblMasterCompanyMbrByComCode(HttpServletRequest request, HashMap<String, Object> params, String userId) throws Exception;
|
||||
JSONObject drillingInquiryProjectCodes(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,574 @@
|
|||
package geoinfo.drilling.inquiry.service.impl;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.com.CryptoUtil;
|
||||
import geoinfo.drilling.input.service.DrillingInputMapper;
|
||||
import geoinfo.drilling.input.service.DrillingInputService;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryMapper;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||
import geoinfo.main.login.service.LoginMapper;
|
||||
import geoinfo.main.login.service.LoginService;
|
||||
import geoinfo.util.MyUtil;
|
||||
import oracle.sql.TIMESTAMP;
|
||||
|
||||
@Service("drillingInquiryService")
|
||||
public class DrillingInquiryServiceImpl implements DrillingInquiryService {
|
||||
|
||||
|
||||
@Resource(name="drillingInquiryMapper")
|
||||
private DrillingInquiryMapper drillingInquiryMapper;
|
||||
|
||||
@Resource(name="drillingInputMapper")
|
||||
private DrillingInputMapper drillingInputMapper;
|
||||
|
||||
@Autowired
|
||||
DrillingInputService drillingInputService;
|
||||
|
||||
|
||||
@Resource(name = "loginService")
|
||||
private LoginService loginService;
|
||||
|
||||
|
||||
@Resource(name="loginMapper")
|
||||
private LoginMapper loginMapper;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject drillingInquiryList(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
||||
|
||||
JSONObject jsonResponse = new JSONObject();
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
||||
String excelDownload = MyUtil.getStringFromObject( params.get("excelDownload") );
|
||||
|
||||
if( userId == null){
|
||||
throw new Exception( "로그인이 필요한 서비스입니다." );
|
||||
}
|
||||
|
||||
|
||||
HashMap<String, Object> spGetMasterCompanyDistrictParams = drillingInputService.getOrganizationUserGlGmGsGfCodes(userId);
|
||||
|
||||
String masterCompanyOCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gl") );
|
||||
String masterCompanyTwCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gm") );
|
||||
String masterCompanyThCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gs") );
|
||||
String masterCompanyName = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gf") );
|
||||
String sortfield = "C".equals(MyUtil.getStringFromObject(params.get("constTag"))) ? "0" : "2";
|
||||
String sorttype = "2";
|
||||
params.put("masterCompanyOCode", masterCompanyOCode);
|
||||
params.put("masterCompanyTwCode", masterCompanyTwCode);
|
||||
params.put("masterCompanyThCode", masterCompanyThCode);
|
||||
params.put("masterCompanyName", masterCompanyName);
|
||||
params.put("sortfield", sortfield);
|
||||
params.put("sorttype", sorttype);
|
||||
|
||||
|
||||
try {
|
||||
|
||||
try {
|
||||
String keyName = "constName";
|
||||
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
|
||||
|
||||
keyName = "constCompanyAdmin";
|
||||
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
|
||||
|
||||
keyName = "constCompanyTel";
|
||||
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
|
||||
|
||||
keyName = "constCompanyName";
|
||||
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
|
||||
|
||||
keyName = "constComCodes";
|
||||
if( params.get("constCompanyName") != null && !MyUtil.getStringFromObject(params.get("constCompanyName")).trim().isEmpty() ) {
|
||||
params.put(keyName, drillingInquiryMapper.getComCodes(params));
|
||||
} else {
|
||||
params.put(keyName, null);
|
||||
}
|
||||
|
||||
|
||||
Long count = drillingInquiryMapper.sPCntTblCsiByKeyword(params);
|
||||
if ("Y".equals(excelDownload)) {
|
||||
params.put("nCount", count);
|
||||
}
|
||||
List<EgovMap> datas = drillingInquiryMapper.spGetTblCsiByKeyword(params);
|
||||
|
||||
|
||||
|
||||
String constStateCodeKey = "constStateCode";
|
||||
String constCompanyCodeKey = "constCompanyCode";
|
||||
String projectStateCodeKey = "projectStateCode";
|
||||
String crtDtKey = "crtDt";
|
||||
String modDtKey = "modDt";
|
||||
|
||||
for( EgovMap data : datas ) {
|
||||
|
||||
Integer nConstStateCodeKey = MyUtil.getIntegerFromObject(data.get(constStateCodeKey));
|
||||
if( nConstStateCodeKey == null ) {
|
||||
nConstStateCodeKey = -1;
|
||||
}
|
||||
String constStateCodeName = "";
|
||||
switch(nConstStateCodeKey) {
|
||||
case 1:
|
||||
constStateCodeName = "타당성조사 및 계획검토";
|
||||
break;
|
||||
case 2:
|
||||
constStateCodeName = "기본설계";
|
||||
break;
|
||||
case 3:
|
||||
constStateCodeName = "실시설계";
|
||||
break;
|
||||
case 4:
|
||||
constStateCodeName = "시공중";
|
||||
break;
|
||||
case 5:
|
||||
constStateCodeName = "준공";
|
||||
break;
|
||||
case 6:
|
||||
constStateCodeName = "유지보수";
|
||||
break;
|
||||
default:
|
||||
constStateCodeName = "알 수 없음";
|
||||
break;
|
||||
|
||||
}
|
||||
data.put("constStateCodeName", constStateCodeName);
|
||||
|
||||
|
||||
|
||||
Long nConstCompanyCodeKey = MyUtil.getLongFromObject(data.get(constCompanyCodeKey));
|
||||
if( nConstCompanyCodeKey != null ) {
|
||||
params.put(constCompanyCodeKey, nConstCompanyCodeKey);
|
||||
String constCompanyDept = drillingInquiryMapper.spGetConstCompanyName(nConstCompanyCodeKey);
|
||||
data.put("constCompanyDept", constCompanyDept);
|
||||
}
|
||||
|
||||
|
||||
Integer nProjectStateCodeKey = MyUtil.getIntegerFromObject(data.get(projectStateCodeKey) );
|
||||
if( nProjectStateCodeKey == null ) {
|
||||
nProjectStateCodeKey = -1;
|
||||
}
|
||||
String projectStateCodeName = "";
|
||||
switch(nProjectStateCodeKey) {
|
||||
case 0:
|
||||
projectStateCodeName = "미입력";
|
||||
break;
|
||||
case 1:
|
||||
projectStateCodeName = "입력 중";
|
||||
break;
|
||||
case 2:
|
||||
projectStateCodeName = "검수 준비 대기중";
|
||||
break;
|
||||
case 3:
|
||||
projectStateCodeName = "검수 중";
|
||||
break;
|
||||
case 4:
|
||||
projectStateCodeName = "수정 요청";
|
||||
break;
|
||||
case 5:
|
||||
projectStateCodeName = "검수 완료";
|
||||
break;
|
||||
case 6:
|
||||
projectStateCodeName = "등록 완료";
|
||||
break;
|
||||
default:
|
||||
constStateCodeName = "알 수 없음";
|
||||
break;
|
||||
|
||||
}
|
||||
data.put("projectStateCodeName", projectStateCodeName);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
TIMESTAMP oracleTimestamp = (TIMESTAMP)data.get(crtDtKey);
|
||||
if( oracleTimestamp != null ) {
|
||||
Timestamp javaTimestamp = oracleTimestamp.timestampValue();
|
||||
String formattedDate = dateFormat.format(javaTimestamp);
|
||||
data.put(crtDtKey, formattedDate);
|
||||
}
|
||||
|
||||
oracleTimestamp = (TIMESTAMP)data.get(modDtKey);
|
||||
if( oracleTimestamp != null ) {
|
||||
Timestamp javaTimestamp = oracleTimestamp.timestampValue();
|
||||
String formattedDate = dateFormat.format(javaTimestamp);
|
||||
data.put(modDtKey, formattedDate);
|
||||
}
|
||||
}
|
||||
jsonResponse.put("count", count);
|
||||
jsonResponse.put("datas", datas);
|
||||
return jsonResponse;
|
||||
} catch (SQLException e) {
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
throw new Exception( "오류가 발생하였습니다." + "\n" + "SQLException" );
|
||||
}
|
||||
|
||||
|
||||
} catch (org.json.simple.parser.ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
}
|
||||
/*
|
||||
*
|
||||
* @Override
|
||||
public JSONObject drillingInquiryList(HttpServletRequest request, String strJSON) throws Exception {
|
||||
|
||||
JSONObject jsonResponse = new JSONObject();
|
||||
JSONParser jsonParser = new JSONParser();
|
||||
|
||||
try {
|
||||
|
||||
JSONObject jsonObject = (JSONObject)jsonParser.parse(strJSON);
|
||||
|
||||
// JSONObject를 HashMap으로 변환
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
for (Object key : jsonObject.keySet()) {
|
||||
String keyStr = (String) key;
|
||||
Object value = jsonObject.get(keyStr);
|
||||
params.put(keyStr, value);
|
||||
}
|
||||
|
||||
try {
|
||||
Long count = drillingInquiryMapper.sPCntTblCsiByKeyword(params);
|
||||
List<HashMap<String, Object>> data = drillingInquiryMapper.spGetTblCsiByKeyword(params);
|
||||
jsonResponse.put("count", count);
|
||||
jsonResponse.put("data", data);
|
||||
return jsonResponse;
|
||||
} catch (SQLException e) {
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
|
||||
|
||||
} catch (org.json.simple.parser.ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public JSONObject drillingInquiryOneItem(HttpServletRequest request, HashMap<String, Object> params)
|
||||
throws Exception {
|
||||
JSONObject jsonResponse = new JSONObject();
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
||||
|
||||
if( userId == null){
|
||||
throw new Exception( "로그인이 필요한 서비스입니다." );
|
||||
}
|
||||
|
||||
List<EgovMap> datas = drillingInputMapper.sPGetTblCsiByCid(params);
|
||||
for( EgovMap data : datas ) {
|
||||
String orgConstUserId = "";
|
||||
if (data.get("constUserid")!= null /*&& !"".equals(data.get("constUserid"))*/) {
|
||||
orgConstUserId = (String) data.get("constUserid");
|
||||
data.put("orgConstUserId", orgConstUserId);
|
||||
}
|
||||
|
||||
Long nConstCompanyCodeKey = MyUtil.getLongFromObject(data.get("constCompanyCode"));
|
||||
if( nConstCompanyCodeKey != null ) {
|
||||
params.put("constCompanyCode", nConstCompanyCodeKey);
|
||||
String constCompanyName = drillingInquiryMapper.spGetConstCompanyName(nConstCompanyCodeKey);
|
||||
data.put("constCompanyName", constCompanyName);
|
||||
}
|
||||
|
||||
TIMESTAMP oracleTimestamp = (TIMESTAMP)data.get("crtDt");
|
||||
if( oracleTimestamp != null ) {
|
||||
Timestamp javaTimestamp = oracleTimestamp.timestampValue();
|
||||
String formattedDate = dateFormat.format(javaTimestamp);
|
||||
data.put("crtDt", formattedDate);
|
||||
}
|
||||
|
||||
oracleTimestamp = (TIMESTAMP)data.get("modDt");
|
||||
if( oracleTimestamp != null ) {
|
||||
Timestamp javaTimestamp = oracleTimestamp.timestampValue();
|
||||
String formattedDate = dateFormat.format(javaTimestamp);
|
||||
data.put("modDt", formattedDate);
|
||||
}
|
||||
|
||||
// 건설사 미선정 여부를 판단한다.
|
||||
boolean contractorTbd = false;
|
||||
String constCompanyCode = MyUtil.getStringFromObject( data.get("constCompanyCode") );
|
||||
String constCompanyAdmin = MyUtil.getStringFromObject( data.get("constCompanyAdmin") );
|
||||
String constCompanyTel = MyUtil.getStringFromObject( data.get("constCompanyTel") );
|
||||
if( constCompanyCode == null && constCompanyAdmin == null && constCompanyTel == null ) {
|
||||
contractorTbd = true;
|
||||
}
|
||||
data.put("contractorTbd", contractorTbd);
|
||||
|
||||
|
||||
}
|
||||
jsonResponse.put("datas", datas);
|
||||
return jsonResponse;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> spGetProjectMbr(HttpServletRequest request, HashMap<String, Object> params, String userId)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
if( userId == null || userId.trim().isEmpty() ) {
|
||||
throw new Exception( "로그인이 필요한 서비스입니다." );
|
||||
}
|
||||
|
||||
|
||||
String projectMasterCompanyCode = loginMapper.findProjectMasterCompanyCodeByUserid(userId);
|
||||
|
||||
if( projectMasterCompanyCode == null || projectMasterCompanyCode.trim().isEmpty() ) {
|
||||
throw new Exception( "발주 기관 계정에 설정된 기관이 존재하지 않습니다. code: 1" );
|
||||
}
|
||||
|
||||
|
||||
String projectMasterCompanyName = loginMapper.findProjectMasterCompanyNameByUserid(userId);
|
||||
|
||||
if( projectMasterCompanyName == null || projectMasterCompanyName.trim().isEmpty() ) {
|
||||
throw new Exception( "발주 기관 계정에 설정된 기관이 존재하지 않습니다. code: 2" );
|
||||
}
|
||||
|
||||
HashMap<String, Object> spGetProjectMbrParams = new HashMap<String, Object>();
|
||||
|
||||
spGetProjectMbrParams.put("type", "ORG_TEMP");
|
||||
spGetProjectMbrParams.put("ProjectCode", projectMasterCompanyCode);
|
||||
drillingInquiryMapper.spGetProjectMbr( spGetProjectMbrParams );
|
||||
|
||||
spGetProjectMbrParams.put("projectMasterCompanyName", projectMasterCompanyName);
|
||||
|
||||
return spGetProjectMbrParams;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<EgovMap> drillingInquiryAutocompleteList(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
||||
|
||||
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
||||
|
||||
if( userId == null){
|
||||
throw new Exception( "로그인이 필요한 서비스입니다." );
|
||||
}
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("userid", userId);
|
||||
|
||||
Map<String, Object> result = loginService.selectWebMemberIn(map);
|
||||
|
||||
int cls = MyUtil.getIntegerFromObject( result.get("cls") );
|
||||
|
||||
if( cls == 2 ) {
|
||||
// 발주기관 계정으로 조회한 경우, 본인의 영역에 해당하는 프로젝트만 조회한다.
|
||||
String masterCompanyCode = MyUtil.getStringFromObject( result.get("master_company_code") );
|
||||
|
||||
HashMap<String, Object> spGetMasterCompanyDistrictParams = drillingInputService.getOrganizationUserGlGmGsGfCodes(userId);
|
||||
|
||||
String glDistrict = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gl") );
|
||||
String gmDistrict = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gm") );
|
||||
String gsDistrict = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gs") );
|
||||
params.put("glDistrict", glDistrict);
|
||||
params.put("gmDistrict", gmDistrict);
|
||||
params.put("gsDistrict", gsDistrict);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
try {
|
||||
try {
|
||||
List<EgovMap> list = drillingInquiryMapper.drillingInquiryAutocompleteList(params);
|
||||
return list;
|
||||
} catch (SQLException e) {
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
throw new Exception( "오류가 발생하였습니다." + "\n" + "SQLException" );
|
||||
}
|
||||
|
||||
|
||||
} catch (org.json.simple.parser.ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap getItemByProjectCode(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
||||
|
||||
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
||||
|
||||
if( userId == null){
|
||||
throw new Exception( "로그인이 필요한 서비스입니다." );
|
||||
}
|
||||
|
||||
try {
|
||||
EgovMap item = drillingInquiryMapper.getItemByProjectCode(params);
|
||||
return item;
|
||||
} catch (SQLException e) {
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
throw new Exception( "오류가 발생하였습니다." + "\n" + "SQLException" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public EgovMap getTblMasterCompanyMbrByComCode(HttpServletRequest request,
|
||||
HashMap<String, Object> params, String userId) throws Exception {
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
if( userId == null || userId.trim().isEmpty() ) {
|
||||
throw new Exception( "로그인이 필요한 서비스입니다." );
|
||||
}
|
||||
|
||||
|
||||
HashMap<String, Object> getTblMasterCompanyMbrByComCodeParams = new HashMap<String, Object>();
|
||||
getTblMasterCompanyMbrByComCodeParams.put("COM_CODE", params.get("COM_CODE"));
|
||||
|
||||
try {
|
||||
EgovMap item = drillingInquiryMapper.getTblMasterCompanyMbrByComCode( getTblMasterCompanyMbrByComCodeParams );
|
||||
return item;
|
||||
} catch (SQLException e) {
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
throw new Exception( "오류가 발생하였습니다." + "\n" + "SQLException" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject drillingInquiryProjectCodes(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
|
||||
|
||||
JSONObject jsonResponse = new JSONObject();
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
|
||||
|
||||
if( userId == null){
|
||||
throw new Exception( "로그인이 필요한 서비스입니다." );
|
||||
}
|
||||
|
||||
|
||||
HashMap<String, Object> spGetMasterCompanyDistrictParams = drillingInputService.getOrganizationUserGlGmGsGfCodes(userId);
|
||||
|
||||
String masterCompanyOCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gl") );
|
||||
String masterCompanyTwCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gm") );
|
||||
String masterCompanyThCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gs") );
|
||||
String masterCompanyName = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gf") );
|
||||
String sortfield = "C".equals(MyUtil.getStringFromObject(params.get("constTag"))) ? "0" : "2";
|
||||
String sorttype = "2";
|
||||
params.put("masterCompanyOCode", masterCompanyOCode);
|
||||
params.put("masterCompanyTwCode", masterCompanyTwCode);
|
||||
params.put("masterCompanyThCode", masterCompanyThCode);
|
||||
params.put("masterCompanyName", masterCompanyName);
|
||||
params.put("sortfield", sortfield);
|
||||
params.put("sorttype", sorttype);
|
||||
|
||||
|
||||
try {
|
||||
|
||||
try {
|
||||
String keyName = "constName";
|
||||
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
|
||||
|
||||
keyName = "constCompanyAdmin";
|
||||
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
|
||||
|
||||
keyName = "constCompanyTel";
|
||||
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
|
||||
|
||||
keyName = "constCompanyName";
|
||||
params.put(keyName, MyUtil.removeBlank( params.get(keyName) ));
|
||||
|
||||
keyName = "constComCodes";
|
||||
|
||||
if( params.get("constCompanyName") != null && !MyUtil.getStringFromObject(params.get("constCompanyName")).trim().isEmpty() ) {
|
||||
params.put(keyName, drillingInquiryMapper.getComCodes(params));
|
||||
} else {
|
||||
params.put(keyName, null);
|
||||
}
|
||||
|
||||
List<EgovMap> datas = drillingInquiryMapper.drillingInquiryProjectCodes(params);
|
||||
|
||||
|
||||
|
||||
String lpszProjectCodesWithComma = "";
|
||||
for( EgovMap data : datas ) {
|
||||
|
||||
String projectCode = MyUtil.getStringFromObject(data.get("projectCode"));
|
||||
if( projectCode != null ) {
|
||||
if( !lpszProjectCodesWithComma.equals("") ) {
|
||||
lpszProjectCodesWithComma += ", ";
|
||||
}
|
||||
lpszProjectCodesWithComma += "'" + projectCode + "'";
|
||||
}
|
||||
}
|
||||
|
||||
jsonResponse.put("datas", lpszProjectCodesWithComma);
|
||||
return jsonResponse;
|
||||
} catch (SQLException e) {
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"params:[\n" + params.toString() + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
throw new Exception( "오류가 발생하였습니다." + "\n" + "SQLException" );
|
||||
}
|
||||
|
||||
|
||||
} catch (org.json.simple.parser.ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,250 @@
|
|||
package geoinfo.drilling.statistics;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
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.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import geoinfo.drilling.input.service.DrillingInputService;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||
import geoinfo.drilling.statistics.service.DrillingStatisticsService;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
@Controller
|
||||
public class DrillingStatisticsController {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DrillingStatisticsController.class);
|
||||
|
||||
@Autowired
|
||||
DrillingInquiryService drillingInquiryService;
|
||||
|
||||
@Autowired
|
||||
DrillingInputService drillingInputService;
|
||||
|
||||
@Autowired
|
||||
DrillingStatisticsService drillingStatisticsService;
|
||||
|
||||
@RequestMapping(value = "/drilling/statistics.do")
|
||||
public String drillingStatistics(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
return "redirect:/index.do";
|
||||
}
|
||||
|
||||
return "/drilling/statistics/drilling_statistics";
|
||||
}
|
||||
@RequestMapping(value = "/drilling/notice.do")
|
||||
public String drillingNotice(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
return "redirect:/index.do";
|
||||
}
|
||||
|
||||
return "/drilling/statistics/drilling_notice";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/drilling/statistics/hist-list.do", method = RequestMethod.GET, produces = { "application/json; charset=utf-8" })
|
||||
@ResponseBody
|
||||
public ResponseEntity<JSONObject> drillingStatisticsHistList (
|
||||
HttpServletRequest request,
|
||||
@RequestParam HashMap<String, Object> params,
|
||||
HttpServletResponse response
|
||||
) {
|
||||
JSONObject jSONOResponse = null;
|
||||
try {
|
||||
jSONOResponse = drillingStatisticsService.getConstructSiteHistList(request, params);
|
||||
jSONOResponse.put("resultCode", 200);
|
||||
jSONOResponse.put("resultMessage", "OK");
|
||||
|
||||
} catch (Exception e) {
|
||||
jSONOResponse = new JSONObject();
|
||||
jSONOResponse.put("resultCode", -1);
|
||||
jSONOResponse.put("resultMessage", e.getMessage());
|
||||
LOGGER.error("drillingStatisticsHistList Error: ", e);
|
||||
}
|
||||
|
||||
response.setStatus(HttpServletResponse.SC_OK);
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setHeader("Content-Type", "application/json; charset=utf-8");
|
||||
|
||||
try {
|
||||
response.getWriter().print(jSONOResponse);
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("Response Write Error: ", e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [신규] 통계 페이지 - 프로젝트 상태 파이 차트 데이터 조회
|
||||
* @param session
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/drilling/statistics/project-status-chart.do", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
|
||||
@ResponseBody
|
||||
public ResponseEntity<JSONObject> getProjectStatusChartData( HttpServletRequest request, HttpSession session ) {
|
||||
|
||||
JSONObject response = new JSONObject();
|
||||
|
||||
try {
|
||||
// 세션에서 사용자 정보 (Box 또는 VO)를 가져옵니다.
|
||||
// "sessionInfo"는 예시이며, 실제 세션에 저장된 Key를 사용해야 합니다.
|
||||
// DrillingInquiryController의 로직을 참고하여 사용자 조직 코드를 가져옵니다.
|
||||
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
|
||||
if (userId == null) {
|
||||
response.put("resultCode", 401);
|
||||
response.put("resultMessage", "로그인이 필요합니다.");
|
||||
return new ResponseEntity<>(response, HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
|
||||
HashMap<String, Object> spGetMasterCompanyDistrictParams = drillingInputService.getOrganizationUserGlGmGsGfCodes(userId);
|
||||
|
||||
String masterCompanyOCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gl") );
|
||||
String masterCompanyTwCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gm") );
|
||||
String masterCompanyThCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gs") );
|
||||
String masterCompanyName = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gf") );
|
||||
|
||||
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
|
||||
// DrillingInquiryController에서 사용하는 파라미터와 동일하게 설정
|
||||
// (예: O_CODE, TW_CODE, TH_CODE 등)
|
||||
params.put("masterCompanyOCode", masterCompanyOCode);
|
||||
params.put("masterCompanyTwCode", masterCompanyTwCode);
|
||||
params.put("masterCompanyThCode", masterCompanyThCode);
|
||||
// params.put("USERID", sessionInfo.getString("USERID"));
|
||||
|
||||
List<HashMap<String, Object>> chartData = drillingStatisticsService.getProjectStatusCounts(params);
|
||||
|
||||
response.put("resultCode", 200);
|
||||
response.put("datas", chartData);
|
||||
|
||||
} catch (Exception e) {
|
||||
response.put("resultCode", 500);
|
||||
response.put("resultMessage", "차트 데이터 조회 중 오류가 발생했습니다: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return new ResponseEntity<>(response, HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [신규] 통계 페이지 - 용역사별 성과 현황
|
||||
* @param session
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/drilling/statistics/company-performance.do", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
|
||||
@ResponseBody
|
||||
public ResponseEntity<JSONObject> getCompanyPerformanceStats( HttpServletRequest request, HttpSession session) {
|
||||
|
||||
JSONObject response = new JSONObject();
|
||||
|
||||
try {
|
||||
|
||||
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
|
||||
if (userId == null) {
|
||||
response.put("resultCode", 401);
|
||||
response.put("resultMessage", "로그인이 필요합니다.");
|
||||
return new ResponseEntity<>(response, HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
|
||||
HashMap<String, Object> spGetMasterCompanyDistrictParams = drillingInputService.getOrganizationUserGlGmGsGfCodes(userId);
|
||||
|
||||
String masterCompanyOCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gl") );
|
||||
String masterCompanyTwCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gm") );
|
||||
String masterCompanyThCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gs") );
|
||||
String masterCompanyName = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gf") );
|
||||
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
|
||||
// DrillingInquiryController의 발주기관 필터링 로직과 동일하게 파라미터 설정
|
||||
params.put("masterCompanyOCode", masterCompanyOCode);
|
||||
params.put("masterCompanyTwCode", masterCompanyTwCode);
|
||||
params.put("masterCompanyThCode", masterCompanyThCode);
|
||||
|
||||
List<HashMap<String, Object>> statsData = drillingStatisticsService.getCompanyPerformanceStats(params);
|
||||
|
||||
response.put("resultCode", 200);
|
||||
response.put("datas", statsData);
|
||||
|
||||
} catch (Exception e) {
|
||||
response.put("resultCode", 500);
|
||||
response.put("resultMessage", "성과 현황 조회 중 오류가 발생했습니다: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return new ResponseEntity<>(response, HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 통계 페이지 - 데이터 품질 현황 (수정 요청 횟수)
|
||||
* @param request
|
||||
* @param session
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/drilling/statistics/data-quality-stats.do", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
|
||||
@ResponseBody
|
||||
public ResponseEntity<JSONObject> getDataQualityStats(HttpServletRequest request, HttpSession session) {
|
||||
|
||||
JSONObject response = new JSONObject();
|
||||
|
||||
try {
|
||||
// 세션에서 사용자 정보 (USERID)
|
||||
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
if (userId == null) {
|
||||
response.put("resultCode", 401);
|
||||
response.put("resultMessage", "로그인이 필요합니다.");
|
||||
return new ResponseEntity<>(response, HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
|
||||
// 세션 사용자의 조직 코드 조회
|
||||
HashMap<String, Object> spGetMasterCompanyDistrictParams = drillingInputService.getOrganizationUserGlGmGsGfCodes(userId);
|
||||
String masterCompanyOCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gl") );
|
||||
String masterCompanyTwCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gm") );
|
||||
String masterCompanyThCode = MyUtil.getStringFromObject( spGetMasterCompanyDistrictParams.get("v_gs") );
|
||||
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
params.put("masterCompanyOCode", masterCompanyOCode);
|
||||
params.put("masterCompanyTwCode", masterCompanyTwCode);
|
||||
params.put("masterCompanyThCode", masterCompanyThCode);
|
||||
|
||||
// Service 호출
|
||||
HashMap<String, Object> statsData = drillingStatisticsService.getDataQualityStats(params);
|
||||
|
||||
response.put("resultCode", 200);
|
||||
response.put("datas", statsData); // { "projects": [...], "companies": [...] }
|
||||
|
||||
} catch (Exception e) {
|
||||
response.put("resultCode", 500);
|
||||
response.put("resultMessage", "데이터 품질 현황 조회 중 오류가 발생했습니다: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return new ResponseEntity<>(response, HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package geoinfo.drilling.statistics.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Mapper("drillingStatisticsMapper")
|
||||
public interface DrillingStatisticsMapper {
|
||||
public List<EgovMap> selectConstructSiteHistList(HashMap<String, Object> params) throws SQLException;
|
||||
public Long selectConstructSiteHistListCnt(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
/**
|
||||
* 소속 기관의 프로젝트 상태별 건수 조회 (XML 매핑)
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<HashMap<String, Object>> selectProjectStatusCounts(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
/**
|
||||
* 소속 기관의 용역사(조사기관)별 성과 통계 조회 (XML 매핑)
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<HashMap<String, Object>> selectCompanyPerformanceStats(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
/**
|
||||
* 수정 요청이 많은 프로젝트 Top 5 조회 (XML 매핑)
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<HashMap<String, Object>> selectRevisionCountByProject(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
/**
|
||||
* 용역사(시공사)별 누적 수정 요청 횟수 조회 (XML 매핑)
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<HashMap<String, Object>> selectRevisionCountByCompany(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package geoinfo.drilling.statistics.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
|
||||
public interface DrillingStatisticsService {
|
||||
public JSONObject getConstructSiteHistList(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
|
||||
|
||||
/**
|
||||
* 소속 기관의 프로젝트 상태별 건수 조회
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<HashMap<String, Object>> getProjectStatusCounts(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* 소속 기관의 용역사(조사기관)별 성과 통계 조회
|
||||
* @param params
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
List<HashMap<String, Object>> getCompanyPerformanceStats(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* 데이터 품질(수정 요청 횟수) 통계 조회
|
||||
* @param params
|
||||
* @return projects (Top 5) 와 companies (전체) 리스트가 담긴 Map
|
||||
* @throws Exception
|
||||
*/
|
||||
HashMap<String, Object> getDataQualityStats(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
package geoinfo.drilling.statistics.service.impl;
|
||||
|
||||
import geoinfo.drilling.input.service.DrillingInputMapper;
|
||||
import geoinfo.drilling.input.service.DrillingInputService;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryMapper;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||
import geoinfo.drilling.statistics.service.DrillingStatisticsMapper;
|
||||
import geoinfo.drilling.statistics.service.DrillingStatisticsService;
|
||||
import geoinfo.main.login.service.LoginMapper;
|
||||
import geoinfo.main.login.service.LoginService;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import oracle.sql.TIMESTAMP;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Service("drillingStatisticsService")
|
||||
public class DrillingStatisticsServiceImpl implements DrillingStatisticsService {
|
||||
|
||||
|
||||
|
||||
@Resource(name="drillingInquiryMapper")
|
||||
private DrillingInquiryMapper drillingInquiryMapper;
|
||||
|
||||
@Resource(name="drillingInputMapper")
|
||||
private DrillingInputMapper drillingInputMapper;
|
||||
|
||||
@Resource(name="drillingStatisticsMapper")
|
||||
private DrillingStatisticsMapper drillingStatisticsMapper;
|
||||
|
||||
@Autowired
|
||||
DrillingInputService drillingInputService;
|
||||
|
||||
|
||||
@Resource(name = "loginService")
|
||||
private LoginService loginService;
|
||||
|
||||
|
||||
@Resource(name="loginMapper")
|
||||
private LoginMapper loginMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject getConstructSiteHistList(HttpServletRequest request, HashMap<String, Object> params)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
JSONObject jsonResponse = new JSONObject();
|
||||
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
|
||||
if (userId == null) {
|
||||
throw new Exception("로그인이 필요한 서비스입니다.");
|
||||
}
|
||||
|
||||
// 1. 현재 로그인한 사용자의 지역(영역) 코드 조회
|
||||
HashMap<String, Object> userAreaCodes = drillingInputService.getOrganizationUserGlGmGsGfCodes(userId);
|
||||
|
||||
params.put("masterCompanyOCode", MyUtil.getStringFromObject(userAreaCodes.get("v_gl")));
|
||||
params.put("masterCompanyTwCode", MyUtil.getStringFromObject(userAreaCodes.get("v_gm")));
|
||||
params.put("masterCompanyThCode", MyUtil.getStringFromObject(userAreaCodes.get("v_gs")));
|
||||
|
||||
// 2. 페이징 처리를 위한 파라미터 설정
|
||||
int page = params.get("page") == null ? 1 : Integer.parseInt(params.get("page").toString());
|
||||
int rows = params.get("rows") == null ? 10 : Integer.parseInt(params.get("rows").toString());
|
||||
params.put("firstIndex", (page - 1) * rows + 1);
|
||||
params.put("lastIndex", page * rows);
|
||||
|
||||
try {
|
||||
// 3. 총 카운트 및 목록 조회
|
||||
Long count = drillingStatisticsMapper.selectConstructSiteHistListCnt(params);
|
||||
List<EgovMap> datas = drillingStatisticsMapper.selectConstructSiteHistList(params);
|
||||
|
||||
jsonResponse.put("count", count);
|
||||
jsonResponse.put("datas", datas);
|
||||
|
||||
return jsonResponse;
|
||||
|
||||
} catch (SQLException e) {
|
||||
System.out.println("Error at getConstructSiteHistList: " + e.getMessage());
|
||||
throw new Exception("이력 조회 중 오류가 발생하였습니다.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 소속 기관의 프로젝트 상태별 건수 조회
|
||||
*/
|
||||
@Override
|
||||
public List<HashMap<String, Object>> getProjectStatusCounts(HashMap<String, Object> params) throws Exception {
|
||||
return drillingStatisticsMapper.selectProjectStatusCounts(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 소속 기관의 용역사(조사기관)별 성과 통계 조회
|
||||
*/
|
||||
@Override
|
||||
public List<HashMap<String, Object>> getCompanyPerformanceStats(HashMap<String, Object> params) throws Exception {
|
||||
return drillingStatisticsMapper.selectCompanyPerformanceStats(params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 데이터 품질(수정 요청 횟수) 통계 조회
|
||||
*/
|
||||
@Override
|
||||
public HashMap<String, Object> getDataQualityStats(HashMap<String, Object> params) throws Exception {
|
||||
|
||||
// 1. 수정 요청 많은 프로젝트 Top 5
|
||||
List<HashMap<String, Object>> projectStats = drillingStatisticsMapper.selectRevisionCountByProject(params);
|
||||
|
||||
// 2. 용역사별 누적 수정 요청 횟수
|
||||
List<HashMap<String, Object>> companyStats = drillingStatisticsMapper.selectRevisionCountByCompany(params);
|
||||
|
||||
HashMap<String, Object> result = new HashMap<>();
|
||||
result.put("projects", projectStats);
|
||||
result.put("companies", companyStats);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package geoinfo.main.api;
|
||||
|
||||
import java.util.HashMap;
|
||||
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.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.main.api.service.ApiService;
|
||||
import geoinfo.util.KeyGenerator;
|
||||
import ictway.comm.util.parseData;
|
||||
import ictway.comm.util.strUtil;
|
||||
|
||||
@Controller
|
||||
public class ApiController {
|
||||
Logger log = Logger.getLogger(this.getClass());
|
||||
|
||||
@Resource(name = "apiService")
|
||||
private ApiService apiService;
|
||||
|
||||
/*
|
||||
* 사용자 > API 신청 화면
|
||||
*/
|
||||
@RequestMapping(value = "apiKey.do")
|
||||
public ModelAndView goApiKeyPage(HttpServletRequest request, HttpServletResponse response, ModelAndView model, @RequestParam HashMap<String, Object> params) throws Exception {
|
||||
|
||||
String loginUserId = String.valueOf(request.getSession().getAttribute("USERID"));
|
||||
params.put("userid", loginUserId);
|
||||
HashMap<String, Object> userLastApiKey = apiService.selectUserLatestKey(params);
|
||||
|
||||
model.addObject("userLastApiKey", userLastApiKey);
|
||||
model.setViewName("body/api/apiKey");
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "createApiKey.do")
|
||||
@ResponseBody
|
||||
public Map<String, Object> UserApiInfo(HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap<String, Object> params) throws Exception {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
strUtil sUtil = new strUtil();
|
||||
String userType = sUtil.checkNull(parseData.parseData((String)params.get("userType")));
|
||||
|
||||
String loginUserId = String.valueOf(request.getSession().getAttribute("USERID"));
|
||||
params.put("userid", loginUserId);
|
||||
params.put("userType", userType);
|
||||
|
||||
apiService.addApiKey(params);
|
||||
//
|
||||
resultMap.put("code", params.get("p_result_code"));
|
||||
resultMap.put("msg", params.get("p_err_msg"));
|
||||
resultMap.put("data",params.get("apiKey"));
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "discardApiKey.do")
|
||||
@ResponseBody
|
||||
public Map<String, Object> discardApiKey(HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap<String, Object> params) throws Exception {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
strUtil sUtil = new strUtil();
|
||||
String apiSeq = sUtil.checkNull(parseData.parseData((String)params.get("apiSeq")));
|
||||
|
||||
String loginUserId = String.valueOf(request.getSession().getAttribute("USERID"));
|
||||
params.put("userid", loginUserId);
|
||||
params.put("apiSeq", apiSeq);
|
||||
|
||||
resultMap = apiService.deleteWebApiKey(params);
|
||||
//
|
||||
// resultMap.put("code", params.get("p_result_code"));
|
||||
// resultMap.put("msg", params.get("p_err_msg"));
|
||||
// resultMap.put("data",params.get("apiKey"));
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package geoinfo.main.api.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
@Mapper("ApiMapper")
|
||||
public interface ApiMapper {
|
||||
|
||||
public int selectInfoListCnt(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public List<?> selectInfoList(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
HashMap<String, Object> selectUserLatestKey(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public HashMap<String, Object> spAddWebApiKey(HashMap<String, Object> params) throws SQLException;
|
||||
|
||||
int deleteWebApiKey(HashMap<String, Object> params) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package geoinfo.main.api.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
public interface ApiService {
|
||||
|
||||
int selectInfoListCnt(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
List<?> selectInfoList(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
HashMap<String, Object> selectUserLatestKey(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
HashMap<String, Object> addApiKey(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
HashMap<String, Object> deleteWebApiKey(HashMap<String, Object> params) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package geoinfo.main.api.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.main.api.service.ApiMapper;
|
||||
import geoinfo.main.api.service.ApiService;
|
||||
import geoinfo.util.KeyGenerator;
|
||||
|
||||
@Service("apiService")
|
||||
public class ApiServiceImpl implements ApiService{
|
||||
|
||||
@Resource(name="ApiMapper")
|
||||
private ApiMapper apiMapper;
|
||||
|
||||
@Override
|
||||
public int selectInfoListCnt(HashMap<String, Object> params) throws Exception {
|
||||
return apiMapper.selectInfoListCnt(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<?> selectInfoList(HashMap<String, Object> params) throws Exception {
|
||||
return apiMapper.selectInfoList(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> selectUserLatestKey(HashMap<String, Object> params) throws Exception {
|
||||
return apiMapper.selectUserLatestKey(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> addApiKey(HashMap<String, Object> params) throws Exception {
|
||||
|
||||
String retCode = "";
|
||||
String retMsg = "";
|
||||
final int MAX_RETRY = 10;
|
||||
|
||||
for (int i = 0; i < MAX_RETRY; i++) {
|
||||
// 1. 새 키 생성
|
||||
String apiKey = KeyGenerator.generateUniqueKey();
|
||||
params.put("apiKey", apiKey);
|
||||
|
||||
// 2. SP 호출
|
||||
apiMapper.spAddWebApiKey(params);
|
||||
retCode = (String) params.get("p_result_code");
|
||||
retMsg = (String) params.get("p_err_msg");
|
||||
|
||||
// 3. 중복(61)이면 새로 생성해서 다시 시도
|
||||
if ("61".equals(retCode)) {
|
||||
System.out.println("중복된 키 감지(" + apiKey + "), 재시도 중...(" + (i + 1) + ")");
|
||||
continue;
|
||||
}
|
||||
|
||||
// 4. 중복이 아니면 루프 탈출
|
||||
break;
|
||||
}
|
||||
|
||||
// 5. 결과에 따라 처리 (switch → if)
|
||||
if ("100".equals(retCode)) {
|
||||
System.out.println("API Key 생성 성공");
|
||||
} else if ("62".equals(retCode)) {
|
||||
System.out.println("관리자 승인 대기: " + retMsg);
|
||||
} else if ("63".equals(retCode)) {
|
||||
System.out.println("유효기간 만료: " + retMsg);
|
||||
} else if ("82".equals(retCode)) {
|
||||
System.out.println("사용자 불가: " + retMsg);
|
||||
} else if ("61".equals(retCode)) {
|
||||
System.out.println("API Key 생성 실패: 중복으로 인해 " + MAX_RETRY + "회 시도 후 중단됨");
|
||||
} else {
|
||||
System.out.println("기타 코드: " + retCode + " (" + retMsg + ")");
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> deleteWebApiKey(HashMap<String, Object> params) throws Exception {
|
||||
HashMap<String, Object> result = new HashMap<String, Object>();
|
||||
int resultCnt = 0;
|
||||
|
||||
resultCnt = apiMapper.deleteWebApiKey(params);
|
||||
|
||||
if (resultCnt > 0) {
|
||||
result.put("code", "SUCCESS");
|
||||
} else {
|
||||
result.put("code", "ERROR");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -35,6 +35,7 @@ import egovframework.com.cmm.service.EgovProperties;
|
|||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.com.file.FileCmmn;
|
||||
import geoinfo.main.community.service.CommunityService;
|
||||
import geoinfo.util.MyUtil;
|
||||
import geoinfo.util.RequestWrapper;
|
||||
|
||||
|
||||
|
|
@ -63,7 +64,11 @@ public class CommunityController {
|
|||
List<Map<String, Object>> row = communityService.selectRow(page);
|
||||
mv.addObject("rows", row);
|
||||
|
||||
mv = GeoinfoCommon.setPage(Integer.parseInt(rowCount.get("lastpage").toString()) - 1, page, mv, "cmuboard");
|
||||
if( rowCount != null ) {
|
||||
mv = GeoinfoCommon.setPage(Integer.parseInt(rowCount.get("lastpage").toString()) - 1, page, mv, "cmuboard");
|
||||
} else {
|
||||
mv = GeoinfoCommon.setPage(-1, page, mv, "cmuboard");
|
||||
}
|
||||
|
||||
return mv;
|
||||
}
|
||||
|
|
@ -94,6 +99,8 @@ public class CommunityController {
|
|||
mv.addObject("USEREMAIL", email);
|
||||
|
||||
mv.addObject("USERNAME", name);
|
||||
mv.addObject("companyname", request.getSession().getAttribute("COMPANYNAME"));
|
||||
mv.addObject("cls", request.getSession().getAttribute("CLS"));
|
||||
}
|
||||
|
||||
return mv;
|
||||
|
|
@ -134,8 +141,7 @@ public class CommunityController {
|
|||
file_name = file_name.replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll ("&","");
|
||||
//웹 취약점 때문에 수정 23.02.14
|
||||
|
||||
String new_file = (savePath + file_name + "." + file_ext);
|
||||
//File file = new File(savePath + file_name + "."+file_ext);
|
||||
String new_file = (savePath + file_name + "." + file_ext);
|
||||
System.out.println(new_file);
|
||||
File file = new File(new_file);
|
||||
if(!file.isFile()) {
|
||||
|
|
@ -161,6 +167,14 @@ public class CommunityController {
|
|||
String homepage = request.getParameter("homepage");
|
||||
String subject = request.getParameter("subject");
|
||||
String content = request.getParameter("content");
|
||||
|
||||
// 금칙어 검증 메소드 호출
|
||||
String detected = MyUtil.checkForbiddenWords(content);
|
||||
if (!detected.isEmpty()) {
|
||||
String alertMsg = "운영에 허용되지 않는 단어로 인해 게시글 등록이 실패하였습니다.\\n차단된 단어: " + detected;
|
||||
mv.addObject("msg", "<script>alert('" + alertMsg + "');history.go(-1);</script>");
|
||||
return mv;
|
||||
}
|
||||
|
||||
//String subject = new String(request.getParameter("subject").getBytes("8859_1"),"utf-8");
|
||||
//String content = new String(request.getParameter("content").getBytes("8859_1"),"utf-8");
|
||||
|
|
@ -293,11 +307,11 @@ public class CommunityController {
|
|||
@RequestMapping(value = "/cmuboard_read.do")
|
||||
public ModelAndView cmuboard_read(@RequestParam Map<String, Object> params, HttpServletRequest request, HttpServletResponse response, @RequestParam("id") int id) throws Exception {
|
||||
ModelAndView mv = new ModelAndView("body/cmuboard/cmuboard_read");
|
||||
|
||||
|
||||
Map<String, Object> result = communityService.selectContent(id);
|
||||
|
||||
|
||||
if (result != null) {
|
||||
if ((result.get("email") != null && result.get("name") != null)) {
|
||||
if ( false && (result.get("email") != null && result.get("name") != null)) {
|
||||
mv.addObject("EM", "<a href=mailto:" + result.get("email") + ">" + result.get("name") + "</a>");
|
||||
} else {
|
||||
mv.addObject("EM", result.get("name"));
|
||||
|
|
@ -882,6 +896,7 @@ public class CommunityController {
|
|||
mv.addObject("content", content);
|
||||
String name = (String)request.getSession().getAttribute("USERNAME");
|
||||
mv.addObject("username", name);
|
||||
mv.addObject("companyname", request.getSession().getAttribute("COMPANYNAME"));
|
||||
mv.addObject("A", "작성자");
|
||||
mv.addObject("B", "비밀번호");
|
||||
mv.addObject("C", "제목");
|
||||
|
|
|
|||
|
|
@ -249,6 +249,11 @@ public class JoinController {
|
|||
public ModelAndView join_post(MultipartRequest multi, Map<String, Object> map,HttpServletRequest request, HttpServletResponse response,@RequestParam HashMap<String, Object> params, RedirectAttributes rda)throws Exception {
|
||||
ModelAndView mv = new ModelAndView("body/join/join_post");
|
||||
log.info("JoinController 회원 가입 폼 전송");
|
||||
|
||||
/**
|
||||
* msgCd
|
||||
* 1 : 이미가입된 회원
|
||||
*/
|
||||
|
||||
String passwdCode;
|
||||
|
||||
|
|
@ -274,28 +279,28 @@ public ModelAndView join_post(MultipartRequest multi, Map<String, Object> map,Ht
|
|||
}
|
||||
catch (IndexOutOfBoundsException ex) {
|
||||
log.debug("error", ex);
|
||||
mv.addObject("msg", "잘못된 접근입니다.");
|
||||
mv.addObject("msg", "잘못된 접근입니다. code: 1");
|
||||
mv.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
}
|
||||
catch (NumberFormatException ex) {
|
||||
log.debug("error", ex);
|
||||
mv.addObject("msg", "잘못된 접근입니다.");
|
||||
mv.addObject("msg", "잘못된 접근입니다. code: 2");
|
||||
mv.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
}
|
||||
catch (IOException ex) {
|
||||
log.debug("error", ex);
|
||||
mv.addObject("msg", "잘못된 접근입니다.");
|
||||
mv.addObject("msg", "잘못된 접근입니다. code: 3");
|
||||
mv.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
}
|
||||
catch(Exception ex){
|
||||
log.info("JoinController 회원 가입 폼 전송 잘못된 접근");
|
||||
mv.addObject("msg", "잘못된 접근입니다.");
|
||||
mv.addObject("msg", "잘못된 접근입니다. code: 4");
|
||||
mv.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
}
|
||||
|
||||
if(!nameTx1.equals(name)) {
|
||||
log.info("JoinController 회원 가입 폼 전송 이름 값 변조(잘못된 접근)");
|
||||
rda.addFlashAttribute("msg","잘못된 접근입니다.");
|
||||
rda.addFlashAttribute("msg","잘못된 접근입니다. code: 5");
|
||||
mv.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
return mv;
|
||||
}
|
||||
|
|
@ -315,6 +320,16 @@ public ModelAndView join_post(MultipartRequest multi, Map<String, Object> map,Ht
|
|||
if(checkWebMember != 0) {
|
||||
log.info("JoinController 회원 가입 폼 전송 // 이미 가입된 회원");
|
||||
mv.addObject("msg","alert('이미 회원 가입되어있습니다.');history.go(-1);");
|
||||
map.put("msgCd", 1);
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " " + " join_post" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"name:[" + name + "]\n" +
|
||||
"cls:[" + cls + "]\n" +
|
||||
"DI:[" + DI + "]\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
|
@ -328,6 +343,19 @@ public ModelAndView join_post(MultipartRequest multi, Map<String, Object> map,Ht
|
|||
params.put("companyName2", "0");
|
||||
}
|
||||
|
||||
String userId = GeoinfoCommon.parseData(String.valueOf(params.get("userId")));
|
||||
|
||||
Pattern pSpecialChar = null;
|
||||
Matcher match;
|
||||
int nCharType = 0;
|
||||
pSpecialChar = Pattern.compile("\\p{Punct}");
|
||||
match = pSpecialChar.matcher(userId);
|
||||
if(match.find()) nCharType++;
|
||||
if(nCharType > 0) {
|
||||
mv.addObject("msg","alert('아이디에 특수문자를 넣을 수 없습니다.');history.go(-1);");
|
||||
return mv;
|
||||
}
|
||||
|
||||
String oriPassword = GeoinfoCommon.parseData(String.valueOf(params.get("password")));
|
||||
passwdCode = checkPw(oriPassword);
|
||||
if(passwdCode.equals("0")) {
|
||||
|
|
@ -440,10 +468,10 @@ public ModelAndView join_post(MultipartRequest multi, Map<String, Object> map,Ht
|
|||
file_ext = file_ext.replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll("&", "");
|
||||
fileName[pos] = fileName[pos].replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll("&", "");
|
||||
fileName[pos] = fileName[pos].replace(file_ext, "." + file_ext);
|
||||
|
||||
|
||||
|
||||
|
||||
File file = new File(String.valueOf(savePath) + fileName[pos]);
|
||||
|
||||
|
||||
if (!file.isFile()) {
|
||||
file.createNewFile();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,38 @@
|
|||
package geoinfo.main.kict;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.jfree.util.Log;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
|
||||
/*import egovframework.cmmn.web.SessionManager;*/
|
||||
import egovframework.rte.fdl.property.EgovPropertyService;
|
||||
import geoinfo.main.login.service.LoginService;
|
||||
import geoinfo.util.MobileCertificationUtil;
|
||||
|
||||
@Controller
|
||||
|
|
@ -28,8 +41,21 @@ public class KmcisController {
|
|||
@Resource(name = "propertiesService")
|
||||
protected EgovPropertyService propertiesService;
|
||||
|
||||
@Resource(name = "loginService")
|
||||
private LoginService loginService;
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(KmcisController.class);
|
||||
|
||||
/**
|
||||
* 2024.02.15 LHJ 본인확인서비스(결과 전송 API 방식) 안전성 강화 조치
|
||||
* 2023.11.01 LHJ PASS 모바일 인증 요청
|
||||
*
|
||||
* @param response
|
||||
* @param request
|
||||
* @return ModelAndView
|
||||
* @throws Exception
|
||||
*/
|
||||
/** EgovPropertyService */
|
||||
@RequestMapping(value = "/mobileCertRequest.do")
|
||||
public ModelAndView mobileCertRequest(HttpServletRequest req, ModelAndView mav) throws Exception {
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 리퀘스트");
|
||||
|
|
@ -48,14 +74,22 @@ public class KmcisController {
|
|||
String cpId = propertiesService.getString("cert.cpId"); // 회원사ID
|
||||
String urlCode = propertiesService.getString("cert.urlCode"); // URL코드
|
||||
String certMet = "M"; // 본인인증방법(M:휴대폰, C:신용카드, P:공인인증서)
|
||||
String tr_add = "N"; // IFrame사용여부
|
||||
|
||||
String plusInfo = ""; // 추가DATA정보
|
||||
String extendVar = "0000000000000000"; // 확장변수
|
||||
String tr_url = propertiesService.getString("cert.retUrl"); //인증후 호출 URL
|
||||
|
||||
/*
|
||||
String name = ""; // 성명
|
||||
String phoneNo = ""; // 휴대폰번호
|
||||
String phoneCorp = ""; // 이동통신사(SKT:SKT, KT:KT, LGT:LG U+, SKM:SKTmvno
|
||||
String birthDay = ""; // 생년월일(YYYYMMDD)
|
||||
String gender = ""; // 성별(0:남, 1:여)
|
||||
String nation = ""; // 내외국인(0:내국인, 1:외국인)
|
||||
String plusInfo = ""; // 추가DATA정보
|
||||
*/
|
||||
|
||||
/*
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 리퀘스트 암호화 이전");
|
||||
tr_cert = MobileCertificationUtil.encryptCertData(cpId, urlCode, certNum, date, certMet, name, phoneNo, phoneCorp, birthDay, gender, nation, plusInfo);
|
||||
|
||||
|
|
@ -67,90 +101,301 @@ public class KmcisController {
|
|||
|
||||
mav.addObject("tr_cert", tr_cert);
|
||||
mav.addObject("tr_url", retUrl);
|
||||
*/
|
||||
|
||||
//01. 한국모바일인증(주) 암호화 모듈 선언
|
||||
com.icert.comm.secu.IcertSecuManager seed = new com.icert.comm.secu.IcertSecuManager();
|
||||
|
||||
//02. 1차 암호화 (tr_cert 데이터변수 조합 후 암호화)
|
||||
String enc_tr_cert = "";
|
||||
tr_cert = cpId +"/"+ urlCode +"/"+ certNum +"/"+ date +"/"+ certMet +"///////"+ plusInfo +"/"+ extendVar;
|
||||
enc_tr_cert = seed.getEnc(tr_cert, "");
|
||||
|
||||
//03. 1차 암호화 데이터에 대한 위변조 검증값 생성 (HMAC)
|
||||
String hmacMsg = "";
|
||||
hmacMsg = seed.getMsg(enc_tr_cert);
|
||||
|
||||
//04. 2차 암호화 (1차 암호화 데이터, HMAC 데이터, extendVar 조합 후 암호화)
|
||||
tr_cert = seed.getEnc(enc_tr_cert + "/" + hmacMsg + "/" + extendVar, "");
|
||||
|
||||
mav.addObject("tr_cert", tr_cert);
|
||||
mav.addObject("tr_url", tr_url);
|
||||
mav.addObject("tr_add", tr_add);
|
||||
|
||||
return mav;
|
||||
}
|
||||
|
||||
/**
|
||||
* 2024.02.15 LHJ 본인확인서비스(결과 전송 API 방식) 안전성 강화 조치
|
||||
* 2023.11.01 LHJ PASS 모바일 인증 응답
|
||||
*
|
||||
* @param response
|
||||
* @param request
|
||||
* @return ModelAndView
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/mobileCertResult.do")
|
||||
public ModelAndView mobileCertResult(HttpServletRequest request, ModelAndView mav,
|
||||
RedirectAttributes rda) throws Exception {
|
||||
mav.setViewName("body/kmcis/kmcis_result");
|
||||
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료");
|
||||
// 변수 -------------------------------------------------------------------------------------------------------------
|
||||
String api_token = ""; // 토큰값(암호화)
|
||||
|
||||
String k_rec_cert = ""; // 결과수신 원본 DATA
|
||||
String k_certNum = ""; // 파라미터로 수신한 요청번호
|
||||
String certNum = ""; // 요청번호
|
||||
String date = ""; // 요청일시
|
||||
String CI = ""; // 연계정보(CI)
|
||||
String DI = ""; // 중복가입확인정보(DI)
|
||||
String phoneNo = ""; // 휴대폰번호
|
||||
String phoneCorp = ""; // 이동통신사
|
||||
String birthDay = ""; // 생년월일
|
||||
String gender = ""; // 성별
|
||||
String nation = ""; // 내국인
|
||||
String name = ""; // 성명
|
||||
String M_name = ""; // 미성년자 성명
|
||||
String M_birthDay = ""; // 미성년자 생년월일
|
||||
String M_Gender = ""; // 미성년자 성별
|
||||
String M_nation = ""; // 미성년자 내외국인
|
||||
String result = ""; // 결과값
|
||||
String message = ""; // JSON 전문
|
||||
String result_cd = ""; // JSON 결과코드
|
||||
String result_msg = ""; // JSON 결과-상세
|
||||
String strResult = ""; // JSON 결과
|
||||
String apiRecCert = ""; // JSON 전송 데이터
|
||||
String apiCertNum = ""; // JSON 전송 데이터
|
||||
|
||||
String certMet = ""; // 인증방법
|
||||
String ip = ""; // ip주소
|
||||
String plusInfo = "";
|
||||
String rec_cert = ""; // 결과수신DATA
|
||||
String k_certNum = ""; // 요청번호 파라미터
|
||||
String certNum = ""; // 요청번호
|
||||
String date = ""; // 요청일시
|
||||
String CI = ""; // 연계정보(CI)
|
||||
String DI = ""; // 중복가입확인정보(DI)
|
||||
String phoneNo = ""; // 휴대폰번호
|
||||
String phoneCorp = ""; // 이동통신사
|
||||
String birthDay = ""; // 생년월일
|
||||
String gender = ""; // 성별
|
||||
String nation = ""; // 내국인
|
||||
String name = ""; // 성명
|
||||
String reserve1 = ""; // 예비필드
|
||||
String reserve2 = ""; // 예비필드
|
||||
String reserve3 = ""; // 예비필드
|
||||
String reserve4 = ""; // 예비필드
|
||||
String result = ""; // 결과값
|
||||
|
||||
try {
|
||||
k_rec_cert = request.getParameter("rec_cert").trim(); // 복호화 하기전 수신값
|
||||
k_certNum = request.getParameter("certNum").trim();
|
||||
String certMet = ""; // 본인확인방법
|
||||
String ip = ""; // ip주소
|
||||
String plusInfo = "";
|
||||
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료, rec_cert : " + k_rec_cert + " k_certNum : " + k_certNum);
|
||||
String encPara = "";
|
||||
String encMsg1 = "";
|
||||
String encMsg2 = "";
|
||||
String msgChk = "";
|
||||
|
||||
Map<String, String> certResult = MobileCertificationUtil.decryptCertData(k_rec_cert, k_certNum);
|
||||
//01. 한국모바일인증(주) 암호화 모듈 선언
|
||||
com.icert.comm.secu.IcertSecuManager seed = new com.icert.comm.secu.IcertSecuManager();
|
||||
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료 복호화 이후 // DI : " + certResult.get("DI") + " name : " + certResult.get("name"));
|
||||
try{
|
||||
// Parameter 수신 --------------------------------------------------------------------
|
||||
api_token = request.getParameter("apiToken");
|
||||
|
||||
certNum = certResult.get("certNum");
|
||||
date = certResult.get("date");
|
||||
CI = certResult.get("CI");
|
||||
phoneNo = certResult.get("phoneNo");
|
||||
phoneCorp = certResult.get("phoneCorp");
|
||||
birthDay = certResult.get("birthDay");
|
||||
gender = certResult.get("gender");
|
||||
nation = certResult.get("nation");
|
||||
name = certResult.get("name");
|
||||
result = certResult.get("result");
|
||||
certMet = certResult.get("certMet");
|
||||
ip = certResult.get("ip");
|
||||
M_name = certResult.get("M_name");
|
||||
M_birthDay = certResult.get("M_birthDay");
|
||||
M_Gender = certResult.get("M_Gender");
|
||||
M_nation = certResult.get("M_nation");
|
||||
plusInfo = certResult.get("plusInfo");
|
||||
DI = certResult.get("DI");
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료, "+ api_token);
|
||||
|
||||
/** 수신내역 유효성 검증 **/
|
||||
// 현재 서버시각 구하기
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss",Locale.KOREAN);
|
||||
String strCurrentTime = formatter.format(new Date());
|
||||
// 파라미터 유효성 검증
|
||||
if(api_token.length() == 0 ){
|
||||
LOGGER.info("KmcisController : 토큰값 비정상");
|
||||
rda.addFlashAttribute("msg", "인증에 실패하였습니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
return mav;
|
||||
}
|
||||
|
||||
Date toDate = formatter.parse(strCurrentTime);
|
||||
Date fromDate = formatter.parse(date);
|
||||
long timediff = toDate.getTime()-fromDate.getTime();
|
||||
if(timediff < -30*60*1000 || 30*60*100 < timediff ) {
|
||||
throw new Exception("비정상적인 접근입니다. (요청시간경과)");
|
||||
}else {
|
||||
// 사용자 IP 구하기
|
||||
String client_ip = request.getHeader("HTTP_X_FORWARDED_FOR");
|
||||
if(client_ip != null) {
|
||||
if(client_ip.indexOf(",") != -1) { client_ip = client_ip.substring(0,client_ip.indexOf(",")); }
|
||||
}
|
||||
//현재시각 세팅(YYYYMMDDHI24MISS)
|
||||
Calendar today = Calendar.getInstance();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String api_date = sdf.format(today.getTime());
|
||||
|
||||
if(client_ip == null || client_ip.length() == 0) { client_ip = request.getRemoteAddr(); }
|
||||
if(!client_ip.equals(ip) ) {
|
||||
//sMessage = "비정상적인 접근입니다. (IP불일치)";
|
||||
}
|
||||
//api_token 복호화
|
||||
api_token = seed.getDec(api_token, k_certNum);
|
||||
|
||||
// 파라미터 유효성 검증
|
||||
if( api_token.length() == 0 ){
|
||||
LOGGER.info("KmcisController : 토큰값 비정상(복호화 후)");
|
||||
rda.addFlashAttribute("msg", "인증에 실패하였습니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
return mav;
|
||||
}
|
||||
|
||||
// 1. URL 설정
|
||||
String serverURL = "https://www.kmcert.com/kmcis/api/kmcisToken_api.jsp";
|
||||
|
||||
// 2. 연결 생성
|
||||
URL url = new URL(serverURL);
|
||||
|
||||
// 3. HttpURLConnection 객체 생성.
|
||||
HttpURLConnection con = null;
|
||||
OutputStream wr = null;
|
||||
BufferedReader bufferedReader = null;
|
||||
|
||||
// 4. URL 연결 (웹페이지 URL 연결.)
|
||||
con = (HttpURLConnection)url.openConnection();
|
||||
|
||||
con.setConnectTimeout(20000); // TimeOut 시간 (서버 접속시 연결 시간 - 20초)
|
||||
con.setReadTimeout(20000); // TimeOut 시간 (Read시 연결 시간 - 20초)
|
||||
con.setDoOutput(true); // OutputStream으로 POST 데이터를 넘겨주겠다는 옵션.
|
||||
|
||||
con.setRequestProperty("Content-Type", "application/json;charset=utf-8"); // 타입설정(application/json) 형식으로 전송 (Request Body 전달시 application/json로 서버에 전달.)
|
||||
con.setRequestProperty("Accept", "application/json"); // 서버 Response Data를 JSON 형식의 타입으로 요청.
|
||||
con.setRequestMethod("POST"); // 요청 방식 선택 (POST)
|
||||
|
||||
// 5. JSON 전문 구성
|
||||
|
||||
JSONObject jsonData = new JSONObject();
|
||||
|
||||
jsonData.put("apiToken", api_token);
|
||||
jsonData.put("apiDate", api_date);
|
||||
|
||||
message = jsonData.toString();
|
||||
|
||||
// 6. 전송
|
||||
// Request Body에 Data를 담기위해 OutputStream 객체를 생성.
|
||||
wr = con.getOutputStream();
|
||||
|
||||
// Request Body에 Data 셋팅.(한글깨짐 방지를 위해 utf-8인코딩 처리
|
||||
wr.write(message.getBytes("utf-8"));
|
||||
wr.flush();
|
||||
wr.close();
|
||||
|
||||
// 실제 서버로 Request 요청 하는 부분. (응답 코드를 받는다. 200 성공, 나머지 에러)
|
||||
int responseCode = con.getResponseCode();
|
||||
|
||||
// 4. 결과 수신
|
||||
if(responseCode == 200){
|
||||
bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"));
|
||||
}else{
|
||||
bufferedReader = new BufferedReader(new InputStreamReader(con.getErrorStream(), "UTF-8"));
|
||||
}
|
||||
|
||||
if(bufferedReader != null){
|
||||
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
String line = "";
|
||||
|
||||
while((line = bufferedReader.readLine()) != null){
|
||||
stringBuilder.append(line);
|
||||
}
|
||||
bufferedReader.close();
|
||||
|
||||
String stringRet = stringBuilder.toString();
|
||||
|
||||
// 5. 넘어온 문자열을 JSON 객체로 변환
|
||||
JSONParser jsonParser = new JSONParser();
|
||||
|
||||
//JSON데이터를 넣어 JSON Object 로 만들어 준다.
|
||||
JSONObject jsonObj = (JSONObject)jsonParser.parse(stringRet);
|
||||
|
||||
// 6. JSON 객체에서 데이터 가져오기
|
||||
|
||||
if(jsonObj.get("result_cd") != null){
|
||||
result_cd = jsonObj.get("result_cd").toString();
|
||||
if(result_cd.equals("APR01")){
|
||||
//통신성공
|
||||
strResult = "Y";
|
||||
rec_cert = jsonObj.get("apiRecCert").toString();
|
||||
k_certNum = jsonObj.get("apiCertNum").toString();
|
||||
}else if(result_cd.equals("APR02")){
|
||||
//실패 - Token Expire
|
||||
strResult = "N";
|
||||
result_msg = "실패 - Token Expire";
|
||||
}else if(result_cd.equals("APR03")){
|
||||
//실패 - Token Not Found
|
||||
strResult = "N";
|
||||
result_msg = "실패 - Token Not Found";
|
||||
}else if(result_cd.equals("APR04")){
|
||||
//실패 - API 요청일시 길이 오류
|
||||
strResult = "N";
|
||||
result_msg = "실패 - API 요청일시 길이 오류";
|
||||
}else if(result_cd.equals("APR05")){
|
||||
//실패 - API 토큰 길이 오류
|
||||
strResult = "N";
|
||||
result_msg = "실패 - API 토큰 길이 오류";
|
||||
}else if(result_cd.equals("APR06")){
|
||||
//실패 - 결과전송 재요청(3회 제한)
|
||||
strResult = "N";
|
||||
result_msg = "실패 - 결과전송 재요청(3회 제한)";
|
||||
}
|
||||
}else{
|
||||
//JSON 결과코드 에러
|
||||
strResult = "F";
|
||||
}
|
||||
}else{ //timeout except 처리
|
||||
strResult = "F";
|
||||
}
|
||||
|
||||
// 파라미터 유효성 검증
|
||||
if(!strResult.equals("Y")){
|
||||
LOGGER.info("KmcisController : 결과값 비정상, 결과코드 : " + result_cd + ", 상세내용 : " + result_msg);
|
||||
rda.addFlashAttribute("msg", "인증에 실패하였습니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
return mav;
|
||||
}
|
||||
|
||||
/*
|
||||
//02. 1차 복호화
|
||||
rec_cert = seed.getDec(rec_cert, k_certNum);
|
||||
|
||||
//03. 1차 파싱
|
||||
int inf1 = rec_cert.indexOf("/",0);
|
||||
int inf2 = rec_cert.indexOf("/",inf1+1);
|
||||
|
||||
encPara = rec_cert.substring(0,inf1); //암호화된 통합 파라미터
|
||||
encMsg1 = rec_cert.substring(inf1+1,inf2); //암호화된 통합 파라미터의 Hash값
|
||||
|
||||
//04. 위변조 검증
|
||||
encMsg2 = seed.getMsg(encPara);
|
||||
|
||||
if(encMsg2.equals(encMsg1)){
|
||||
msgChk="Y";
|
||||
}
|
||||
|
||||
if(msgChk.equals("N")){
|
||||
LOGGER.info("KmcisController : Hash값 위변조");
|
||||
rda.addFlashAttribute("msg", "인증에 실패하였습니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
return mav;
|
||||
}
|
||||
|
||||
//05. 2차 복호화
|
||||
rec_cert = seed.getDec(encPara, k_certNum);
|
||||
|
||||
//06. 2차 파싱
|
||||
int info1 = rec_cert.indexOf("/",0);
|
||||
int info2 = rec_cert.indexOf("/",info1+1);
|
||||
int info3 = rec_cert.indexOf("/",info2+1);
|
||||
int info4 = rec_cert.indexOf("/",info3+1);
|
||||
int info5 = rec_cert.indexOf("/",info4+1);
|
||||
int info6 = rec_cert.indexOf("/",info5+1);
|
||||
int info7 = rec_cert.indexOf("/",info6+1);
|
||||
int info8 = rec_cert.indexOf("/",info7+1);
|
||||
int info9 = rec_cert.indexOf("/",info8+1);
|
||||
int info10 = rec_cert.indexOf("/",info9+1);
|
||||
int info11 = rec_cert.indexOf("/",info10+1);
|
||||
int info12 = rec_cert.indexOf("/",info11+1);
|
||||
int info13 = rec_cert.indexOf("/",info12+1);
|
||||
int info14 = rec_cert.indexOf("/",info13+1);
|
||||
int info15 = rec_cert.indexOf("/",info14+1);
|
||||
int info16 = rec_cert.indexOf("/",info15+1);
|
||||
int info17 = rec_cert.indexOf("/",info16+1);
|
||||
int info18 = rec_cert.indexOf("/",info17+1);
|
||||
|
||||
certNum = rec_cert.substring(0,info1);
|
||||
date = rec_cert.substring(info1+1,info2);
|
||||
CI = rec_cert.substring(info2+1,info3);
|
||||
phoneNo = rec_cert.substring(info3+1,info4);
|
||||
phoneCorp = rec_cert.substring(info4+1,info5);
|
||||
birthDay = rec_cert.substring(info5+1,info6);
|
||||
gender = rec_cert.substring(info6+1,info7);
|
||||
nation = rec_cert.substring(info7+1,info8);
|
||||
name = rec_cert.substring(info8+1,info9);
|
||||
result = rec_cert.substring(info9+1,info10);
|
||||
certMet = rec_cert.substring(info10+1,info11);
|
||||
ip = rec_cert.substring(info11+1,info12);
|
||||
reserve1 = rec_cert.substring(info12+1,info13);
|
||||
reserve2 = rec_cert.substring(info13+1,info14);
|
||||
reserve3 = rec_cert.substring(info14+1,info15);
|
||||
reserve4 = rec_cert.substring(info15+1,info16);
|
||||
plusInfo = rec_cert.substring(info16+1,info17);
|
||||
DI = rec_cert.substring(info17+1,info18);
|
||||
|
||||
//07. CI, DI 복호화
|
||||
CI = seed.getDec(CI, k_certNum);
|
||||
DI = seed.getDec(DI, k_certNum);
|
||||
|
||||
LOGGER.info("KmcisController : 복호화 완료");
|
||||
|
||||
mav.addObject("certNum", certNum);
|
||||
mav.addObject("date", date);
|
||||
mav.addObject("CI", CI);
|
||||
|
|
@ -163,30 +408,122 @@ public class KmcisController {
|
|||
mav.addObject("result", result);
|
||||
mav.addObject("certMet", certMet);
|
||||
mav.addObject("ip", ip);
|
||||
mav.addObject("M_name", M_name);
|
||||
mav.addObject("M_birthDay", M_birthDay);
|
||||
mav.addObject("M_Gender", M_Gender);
|
||||
mav.addObject("M_nation", M_nation);
|
||||
mav.addObject("plusInfo", plusInfo);
|
||||
mav.addObject("DI", DI);
|
||||
mav.addObject("recCert", k_rec_cert);
|
||||
} catch(IndexOutOfBoundsException ex){
|
||||
LOGGER.error("[KMCIS] Receive Error -"+ ex);
|
||||
mav.addObject("recCert", rec_cert);
|
||||
*/
|
||||
mav.addObject("certNum", k_certNum);
|
||||
mav.addObject("recCert", rec_cert);
|
||||
|
||||
}catch(StringIndexOutOfBoundsException ex){
|
||||
LOGGER.error("[KMCIS] Receive Error -"+ ex);
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료 // 잘못된 접근");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
} catch(NumberFormatException ex){
|
||||
LOGGER.error("[KMCIS] Receive Error -"+ ex);
|
||||
}catch(NullPointerException ex){
|
||||
LOGGER.error("[KMCIS] Receive Error -"+ ex);
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료 // 잘못된 접근");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
} catch(Exception ex){
|
||||
LOGGER.error("[KMCIS] Receive Error -"+ ex);
|
||||
}catch(NumberFormatException ex){
|
||||
LOGGER.error("[KMCIS] Receive Error -"+ ex);
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료 // 잘못된 접근");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
}catch(PatternSyntaxException ex){
|
||||
LOGGER.error("[KMCIS] Receive Error -"+ ex);
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료 // 잘못된 접근");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
}catch(IllegalStateException ex){
|
||||
LOGGER.error("[KMCIS] Receive Error -"+ ex);
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료 // 잘못된 접근");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
}catch(IndexOutOfBoundsException ex){
|
||||
LOGGER.error("[KMCIS] Receive Error -"+ ex);
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료 // 잘못된 접근");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=join");
|
||||
}
|
||||
|
||||
/** 기업회원 비밀번호 초기화 시 필요 */
|
||||
|
||||
String changePhone = "";
|
||||
String changePhone1 = "";
|
||||
String changePhone2 = "";
|
||||
String changePhone3 = "";
|
||||
|
||||
try {
|
||||
Map<String, String> certResult = MobileCertificationUtil.decryptCertData(rec_cert, k_certNum);
|
||||
name = certResult.get("name");
|
||||
phoneNo = certResult.get("phoneNo");
|
||||
|
||||
changePhone = phoneNo.substring(0, 3) + "-" + phoneNo.substring(3, 7) + "-" + phoneNo.substring(7);
|
||||
changePhone1 = phoneNo.substring(0, 3);
|
||||
changePhone2 = phoneNo.substring(3, 7);
|
||||
changePhone3 = phoneNo.substring(7);
|
||||
}
|
||||
catch(IndexOutOfBoundsException ex){
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료 // 잘못된 접근");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=joinsearch");
|
||||
return mav;
|
||||
}
|
||||
catch(NumberFormatException ex){
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료 // 잘못된 접근");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=joinsearch");
|
||||
return mav;
|
||||
}
|
||||
catch(Exception ex){
|
||||
LOGGER.info("KmcisController : 휴대폰 인증 완료 // 잘못된 접근");
|
||||
rda.addFlashAttribute("msg", "잘못된 접근입니다.");
|
||||
mav.setViewName("redirect:topMenuSelect.do?url=joinsearch");
|
||||
return mav;
|
||||
}
|
||||
|
||||
return mav;
|
||||
mav.addObject("name", name);
|
||||
mav.addObject("changePhone", changePhone);
|
||||
mav.addObject("changePhone1", changePhone1);
|
||||
mav.addObject("changePhone2", changePhone2);
|
||||
mav.addObject("changePhone3", changePhone3);
|
||||
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
||||
// 사용자식별 정보 업데이트
|
||||
@RequestMapping(value = "/updateUserDI.do")
|
||||
public void updateUserDI(Map<String, Object> map, HttpServletRequest request, HttpServletResponse response, HttpSession session) throws Exception {
|
||||
int affectedRow = 0;
|
||||
|
||||
//위변조 체크
|
||||
String name = request.getParameter("name");
|
||||
String hdnCertNum = request.getParameter("hdnCertNum");
|
||||
String hdnCertification = request.getParameter("hdnCertification");
|
||||
String phone1 = request.getParameter("phone1");
|
||||
String phone2 = request.getParameter("phone2");
|
||||
String phone3 = request.getParameter("phone3");
|
||||
String userId = request.getParameter("userId");
|
||||
if (userId == null) {
|
||||
userId = (String)session.getAttribute("userId");
|
||||
}
|
||||
String DI = "";
|
||||
|
||||
Map<String, String> certResult = MobileCertificationUtil.decryptCertData(hdnCertification, hdnCertNum);
|
||||
DI = certResult.get("DI");
|
||||
map.put("userid", userId);
|
||||
if (userId != null && !"".equals(userId)) {
|
||||
map.put("table", "WEB_MEMBER_IN");
|
||||
map.put("values", "PHONE='" + phone1 + "-" + phone2 + "-" + phone3 + "', " + "USER_NAME='" + name + "'," + "DUPINFO='" + DI + "'");
|
||||
map.put("where", "TRIM(USERID) = '" + userId + "'");
|
||||
|
||||
affectedRow = loginService.userUpdate(map);
|
||||
}
|
||||
|
||||
|
||||
LOGGER.info("사용자정보 {}건 변경됨", affectedRow);
|
||||
LOGGER.info("사용자식별 정보 업데이트 처리 끝 ---------------------------");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,6 @@
|
|||
package geoinfo.main.login.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -25,8 +26,14 @@ public interface LoginMapper {
|
|||
void pswdResetWebMemberIn(Map<String, Object> map);
|
||||
|
||||
Map<String, Object> selectSearchId(Map<String, Object> map);
|
||||
|
||||
Map<String, Object> selectSearchIdByNameAndPhoneAndDupinfoIsNullAndCertificationYnFalse(Map<String, Object> map);
|
||||
|
||||
|
||||
Map<String, Object> selectSearchPass(Map<String, Object> map);
|
||||
ArrayList<Map<String, Object>> selectSearchPassByUserIdOrEmail(Map<String, Object> map);
|
||||
ArrayList<Map<String, Object>> selectSearchPassByDupinfo(Map<String, Object> map);
|
||||
|
||||
|
||||
void updateSearchPassch(Map<String, Object> map);
|
||||
|
||||
|
|
@ -94,5 +101,9 @@ public interface LoginMapper {
|
|||
|
||||
EgovMap selectSearchIniUserId(Map<String, Object> params);
|
||||
|
||||
|
||||
public int checkWebMemberIn(Map<String, Object> map) throws Exception;
|
||||
|
||||
String findProjectMasterCompanyNameByUserid(String userId);
|
||||
String findProjectMasterCompanyCodeByUserid(String userId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package geoinfo.main.login.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -17,10 +18,13 @@ public interface LoginService {
|
|||
Map<String, Object> selectWebMemberInLoginCount(Map<String, Object> map) throws Exception;
|
||||
void insertWebRequestLog(Map<String, Object> map) throws Exception;
|
||||
void updateWebMemberIn(Map<String, Object> map) throws Exception;
|
||||
int insertSearchPassLog(Map<String, Object> map)throws Exception;
|
||||
int insertSearchPassLog(Map<String, Object> map)throws Exception;
|
||||
void pswdResetWebMemberIn(Map<String,Object> map) throws Exception;
|
||||
Map<String, Object> selectSearchId(Map<String, Object> map) throws Exception;
|
||||
Map<String, Object> selectSearchIdByNameAndPhoneAndDupinfoIsNullAndCertificationYnFalse(Map<String, Object> map) throws Exception;
|
||||
Map<String, Object> selectSearchPass(Map<String, Object> map) throws Exception;
|
||||
ArrayList<Map<String, Object>> selectSearchPassByUserIdOrEmail(Map<String, Object> map) throws Exception;
|
||||
ArrayList<Map<String, Object>> selectSearchPassByDupinfo(Map<String, Object> map) throws Exception;
|
||||
void updateSearchPassch(Map<String, Object> map) throws Exception;
|
||||
int selectWebDownLoadLog(Map<String, Object> map);
|
||||
List<Map<String, Object>> selectDownLoadContent(Map<String, Object> map);
|
||||
|
|
@ -53,4 +57,6 @@ public interface LoginService {
|
|||
List<EgovMap> selectSearchCompanyNumber(Map<String, Object> params) throws Exception;
|
||||
EgovMap searchUserIdInformation(Map<String, Object> params) throws Exception;
|
||||
EgovMap selectSearchIniUserId(Map<String, Object> params) throws Exception;
|
||||
|
||||
int checkWebMemberIn(Map<String, Object> map) throws Exception;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import geoinfo.util.FileUtil;
|
|||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
|
@ -24,9 +25,6 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.TransactionStatus;
|
||||
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
|
@ -43,12 +41,6 @@ public class LoginServiceImpl implements LoginService{
|
|||
@Resource(name="loginMapper")
|
||||
private LoginMapper loginMapper;
|
||||
|
||||
@Autowired
|
||||
private PlatformTransactionManager transactionManager;
|
||||
|
||||
DefaultTransactionDefinition def = null;
|
||||
TransactionStatus status = null;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectWebDupMember(Map<String, Object> map) throws Exception {
|
||||
return loginMapper.selectWebDupMember(map);
|
||||
|
|
@ -83,12 +75,28 @@ public class LoginServiceImpl implements LoginService{
|
|||
public Map<String, Object> selectSearchId(Map<String, Object> map) throws Exception {
|
||||
return loginMapper.selectSearchId(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectSearchIdByNameAndPhoneAndDupinfoIsNullAndCertificationYnFalse(Map<String, Object> map) throws Exception {
|
||||
return loginMapper.selectSearchIdByNameAndPhoneAndDupinfoIsNullAndCertificationYnFalse(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectSearchPass(Map<String, Object> map) throws Exception {
|
||||
return loginMapper.selectSearchPass(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Map<String, Object>> selectSearchPassByUserIdOrEmail(Map<String, Object> map) throws Exception {
|
||||
return loginMapper.selectSearchPassByUserIdOrEmail(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Map<String, Object>> selectSearchPassByDupinfo(Map<String, Object> map) throws Exception {
|
||||
return loginMapper.selectSearchPassByDupinfo(map);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateSearchPassch(Map<String, Object> map) throws Exception {
|
||||
loginMapper.updateSearchPassch(map);
|
||||
|
|
@ -337,10 +345,6 @@ public class LoginServiceImpl implements LoginService{
|
|||
map.put("idx", request.getParameter("idx"));
|
||||
if(request.getParameter("content") != null) map.put("content", request.getParameter("content")); // 추후삭제
|
||||
|
||||
def = new DefaultTransactionDefinition();
|
||||
def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
|
||||
status = transactionManager.getTransaction(def);
|
||||
|
||||
try{
|
||||
// 활용사례 DB 등록
|
||||
int cnt = loginMapper.savePrcUseCase(map);
|
||||
|
|
@ -354,21 +358,16 @@ public class LoginServiceImpl implements LoginService{
|
|||
if(!prcUseSaveName.equals("")) FileUtil.writeUploadedFile(prcUseFile, prcUseSaveName, savePath);
|
||||
if(!referSaveName.equals("")) FileUtil.writeUploadedFile(referFile, referSaveName, savePath);
|
||||
}
|
||||
transactionManager.commit(status);
|
||||
} catch(FileNotFoundException e){
|
||||
transactionManager.rollback(status);
|
||||
logger.debug("error", e);
|
||||
throw new Exception("PrcUseCase Save Exception!!");
|
||||
} catch(NumberFormatException e){
|
||||
transactionManager.rollback(status);
|
||||
logger.debug("error", e);
|
||||
throw new Exception("PrcUseCase Save Exception!!");
|
||||
} catch(IndexOutOfBoundsException e){
|
||||
transactionManager.rollback(status);
|
||||
logger.debug("error", e);
|
||||
throw new Exception("PrcUseCase Save Exception!!");
|
||||
} catch(Exception e){
|
||||
transactionManager.rollback(status);
|
||||
logger.debug("error", e);
|
||||
throw new Exception("PrcUseCase Save Exception!!");
|
||||
}
|
||||
|
|
@ -508,4 +507,9 @@ public class LoginServiceImpl implements LoginService{
|
|||
return loginMapper.getMember(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int checkWebMemberIn(Map<String, Object> map) throws Exception {
|
||||
return loginMapper.checkWebMemberIn(map);
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -9,7 +9,6 @@ import javax.annotation.Resource;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jfree.util.Log;
|
||||
import org.osgeo.proj4j.CRSFactory;
|
||||
import org.osgeo.proj4j.CoordinateReferenceSystem;
|
||||
import org.osgeo.proj4j.CoordinateTransform;
|
||||
|
|
@ -27,11 +26,10 @@ import com.jhlabs.map.proj.Projection;
|
|||
import com.jhlabs.map.proj.ProjectionFactory;
|
||||
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
import egovframework.com.json.JSONArray;
|
||||
import egovframework.com.json.JSONObject;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.map.coordSearch.service.MapCoordSearchService;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
@Controller
|
||||
public class MapCoordSearchController {
|
||||
|
|
@ -186,6 +184,8 @@ public class MapCoordSearchController {
|
|||
@RequestMapping(value = "/map/coordSearch.do")
|
||||
public String coordSearch(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
|
||||
int nCls = MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
||||
|
||||
String tmx = GeoinfoCommon.parseData(String.valueOf(params.get("tmx")));
|
||||
String tmy = GeoinfoCommon.parseData(String.valueOf(params.get("tmy")));
|
||||
String tawon = GeoinfoCommon.parseData(String.valueOf(params.get("tawon")));// 1.bessel
|
||||
|
|
@ -486,8 +486,8 @@ public class MapCoordSearchController {
|
|||
Iterator<EgovMap> iter = items.iterator();
|
||||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user")) {
|
||||
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
String code = (String)iter.next().get("holeCode");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -499,7 +499,7 @@ public class MapCoordSearchController {
|
|||
}
|
||||
|
||||
iter = items.iterator();
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
String code = (String)iter.next().get("holeCode");
|
||||
code = code.substring(0, 5);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import geoinfo.com.GeoinfoCommon;
|
|||
import geoinfo.map.information.service.MapInformationService;
|
||||
import geoinfo.map.mapControl.service.MapControlService;
|
||||
import geoinfo.regi.util.exportGeotechnicalPointShp2;
|
||||
import geoinfo.util.MyUtil;
|
||||
import geoinfo.util.RequestWrapper;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONException;
|
||||
|
|
@ -69,7 +70,9 @@ public class MapInformationController {
|
|||
|
||||
@RequestMapping(value = "/map/detailSichuDownCh.do")
|
||||
public String detailSichuDownCh(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
|
||||
|
||||
int nCls = MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
||||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
params.put("userId", userId);
|
||||
|
||||
|
|
@ -150,7 +153,7 @@ public class MapInformationController {
|
|||
List<EgovMap> items = mapControlService.selectDetailItems(params);
|
||||
Iterator<EgovMap> itr = items.iterator();
|
||||
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (itr.hasNext()) {
|
||||
String code = (String)itr.next().get("holeCode");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -162,7 +165,7 @@ public class MapInformationController {
|
|||
}
|
||||
|
||||
itr = items.iterator();
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (itr.hasNext()) {
|
||||
String code = (String)itr.next().get("holeCode");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -207,6 +210,8 @@ public class MapInformationController {
|
|||
public String detailSichuS(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
int holeCount = 0;
|
||||
|
||||
int nCls = MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
||||
|
||||
String minx = GeoinfoCommon.parseData(String.valueOf(params.get("minx")));
|
||||
String maxx = GeoinfoCommon.parseData(String.valueOf(params.get("maxx")));
|
||||
String miny = GeoinfoCommon.parseData(String.valueOf(params.get("miny")));
|
||||
|
|
@ -298,7 +303,7 @@ public class MapInformationController {
|
|||
holeList = mapInformationService.selectHoleList(params);
|
||||
itr = holeList.iterator();
|
||||
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (itr.hasNext()) {
|
||||
String code = (String)itr.next().get("holeCode");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -310,7 +315,7 @@ public class MapInformationController {
|
|||
}
|
||||
|
||||
itr = holeList.iterator();
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (itr.hasNext()) {
|
||||
String code = (String)itr.next().get("holeCode");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -361,7 +366,7 @@ public class MapInformationController {
|
|||
items = mapInformationService.selectInfoItems(params);
|
||||
itr = items.iterator();
|
||||
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (itr.hasNext()) {
|
||||
String code = (String)itr.next().get("holeCode");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -373,7 +378,7 @@ public class MapInformationController {
|
|||
}
|
||||
|
||||
itr = items.iterator();
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (itr.hasNext()) {
|
||||
String code = (String)itr.next().get("holeCode");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -402,6 +407,8 @@ public class MapInformationController {
|
|||
String temp = GeoinfoCommon.parseData(String.valueOf(params.get("sichuValue")));
|
||||
int holeCount = Integer.parseInt(temp);
|
||||
int totalCnt = 0;
|
||||
|
||||
int nCls = MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
||||
|
||||
model.put("userId", request.getSession().getAttribute("USERID"));
|
||||
|
||||
|
|
@ -431,7 +438,7 @@ public class MapInformationController {
|
|||
List<EgovMap> holeList = mapInformationService.selectHoleList(params);
|
||||
Iterator<EgovMap> itr = holeList.iterator();
|
||||
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (itr.hasNext()) {
|
||||
String code = (String)itr.next().get("holeCode");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -443,7 +450,7 @@ public class MapInformationController {
|
|||
}
|
||||
|
||||
itr = holeList.iterator();
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (itr.hasNext()) {
|
||||
String code = (String)itr.next().get("holeCode");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -505,6 +512,9 @@ public class MapInformationController {
|
|||
if(request.getSession().getAttribute("USERID") == null) {
|
||||
return "redirect:/index.do";
|
||||
}
|
||||
|
||||
int nCls = MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
||||
|
||||
String fName = "";
|
||||
String folder = "";
|
||||
String mId = "";
|
||||
|
|
@ -585,7 +595,8 @@ public class MapInformationController {
|
|||
|
||||
model.put("project", projectList);
|
||||
model.put("params", params);
|
||||
|
||||
model.put("cls", nCls);
|
||||
|
||||
//return "map/popup/downloadPurpose";
|
||||
return "map/popup/downloadPurposeSichuNew";
|
||||
}
|
||||
|
|
@ -639,7 +650,7 @@ public class MapInformationController {
|
|||
public String getSichudanData(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
StringBuffer sb = request.getRequestURL();
|
||||
String url = sb.substring(0, sb.lastIndexOf("/"));
|
||||
url = "http://218.232.234.161/body/sichudan";
|
||||
url = "http://218.232.234.161/body/sichudan ";
|
||||
// url =
|
||||
// request.getSession().getServletContext().getRealPath("/WEB-INF");
|
||||
|
||||
|
|
|
|||
|
|
@ -23,19 +23,21 @@ public class MapJibanModelController {
|
|||
@Resource(name = "jibanModelService")
|
||||
private JibanModelService jibanModelService;
|
||||
|
||||
|
||||
@RequestMapping(value = "/map/ajaxGetJibanInfoList.do", method = RequestMethod.GET)
|
||||
public ModelAndView ajaxGetJibanInfoList(ModelAndView mv) throws Exception {
|
||||
|
||||
|
||||
mv.setViewName("jsonView");
|
||||
|
||||
|
||||
List<EgovMap> result = jibanModelService.selectJibanInfoList();
|
||||
|
||||
|
||||
mv.addObject("result", result);
|
||||
|
||||
|
||||
LOGGER.info("지반모델 ajax호출");
|
||||
|
||||
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/map/searchHoleByHjdCode.do", method = RequestMethod.GET)
|
||||
public ModelAndView searchHoleByHjdCode(String hjdCde, ModelAndView mv) throws Exception {
|
||||
|
|
|
|||
|
|
@ -30,14 +30,10 @@ import org.apache.commons.io.FileUtils;
|
|||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.jfree.util.Log;
|
||||
import org.osgeo.proj4j.CRSFactory;
|
||||
import org.osgeo.proj4j.CoordinateReferenceSystem;
|
||||
import org.osgeo.proj4j.CoordinateTransform;
|
||||
import org.osgeo.proj4j.CoordinateTransformFactory;
|
||||
import org.osgeo.proj4j.Proj4jException;
|
||||
import org.osgeo.proj4j.ProjCoordinate;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
|
@ -49,15 +45,19 @@ import org.springframework.web.servlet.ModelAndView;
|
|||
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.api.geoinfo.service.GeoinfoApiV1Service;
|
||||
import geoinfo.com.GeoInfoSessionMgrListener;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.com.MultiLoginPreventor;
|
||||
import geoinfo.com.file.FileCmmn;
|
||||
import geoinfo.drilling.home.service.DrillingHomeService;
|
||||
import geoinfo.main.login.service.LoginService;
|
||||
import geoinfo.map.left.service.MapLeftService;
|
||||
import geoinfo.map.mapControl.service.MapControlService;
|
||||
import geoinfo.regi.header.service.HeaderService;
|
||||
import geoinfo.regi.util.exportShp;
|
||||
import geoinfo.util.JwtUtil;
|
||||
import geoinfo.util.MyUtil;
|
||||
import geoinfo.util.RequestWrapper;
|
||||
|
||||
|
||||
|
|
@ -83,6 +83,14 @@ public class MapLeftController {
|
|||
private HeaderService headerService;
|
||||
|
||||
|
||||
@Resource(name = "drillingHomeService")
|
||||
private DrillingHomeService drillingHomeService;
|
||||
|
||||
@Autowired
|
||||
private GeoinfoApiV1Service geoinfoApiV1Service;
|
||||
|
||||
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(GeoInfoSessionMgrListener.class);
|
||||
|
||||
@RequestMapping(value = "/map/dq.do")
|
||||
|
|
@ -259,6 +267,18 @@ public class MapLeftController {
|
|||
model.put("bbox", bbox);
|
||||
model.put("locationDataYn", locationDataYn);*/
|
||||
model.put("userId", request.getSession().getAttribute("USERID"));
|
||||
|
||||
JSONObject jsonResponse = new JSONObject();
|
||||
HashMap<String, Object> handleApiServiceParams = new HashMap<String, Object>();
|
||||
handleApiServiceParams.put("holeCode", params.get("hcode"));
|
||||
handleApiServiceParams.put("apiKey", "91MhmaF8YlMZJlg6H4zruj8B5sKZWeRSoA5N4uXZjXg");
|
||||
geoinfoApiV1Service.handleApiService(request, handleApiServiceParams, "sp-get-selectclass-info-h", jsonResponse);
|
||||
ArrayList<HashMap<String, Object>> dataList = (ArrayList<HashMap<String, Object>>)jsonResponse.get("data");
|
||||
if( dataList != null && 0 < dataList.size() ) {
|
||||
model.put("data", dataList.get(0));
|
||||
} else {
|
||||
model.put("data", new HashMap<String, Object>());
|
||||
}
|
||||
|
||||
return "jsonView";
|
||||
}
|
||||
|
|
@ -297,6 +317,8 @@ public class MapLeftController {
|
|||
@RequestMapping(value = "/map/mapSearchAllArea.do")
|
||||
public String mapSearchAllArea(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
|
||||
int nCls = MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
||||
|
||||
String sido = GeoinfoCommon.parseData(params.get("sido").toString());
|
||||
String gugun = GeoinfoCommon.parseData(params.get("gugun").toString());
|
||||
String dong = GeoinfoCommon.parseData(params.get("dong").toString());
|
||||
|
|
@ -304,15 +326,24 @@ public class MapLeftController {
|
|||
String gugunSub = "";
|
||||
String dongSub = "";
|
||||
|
||||
if (!(sido.equals("all"))) {
|
||||
sidoSub = sido.substring(0, 4);
|
||||
}
|
||||
if (!(gugun.equals("all"))) {
|
||||
gugunSub = gugun.substring(0, 4);
|
||||
}
|
||||
if (!(dong.equals("all"))) {
|
||||
dongSub = dong.substring(0, 5);
|
||||
// 발주기관 프로젝트 코드만 조회
|
||||
String masterCompanyCode = null;
|
||||
List<String> masterCompanyProjectCodes = null;
|
||||
if( params.get("masterCompanyCode") != null ) {
|
||||
masterCompanyCode = GeoinfoCommon.parseData(params.get("masterCompanyCode").toString().trim());
|
||||
|
||||
//HashMap<String, Object> paramsMasterCompanyCode = new HashMap<String, Object>();
|
||||
//paramsMasterCompanyCode.put("COM_CODE", masterCompanyCode);
|
||||
//masterCompanyProjectCodes = drillingHomeService.projectCodesByProjectMasterCompanyCodeAsList(paramsMasterCompanyCode);
|
||||
|
||||
params.put("masterCompanyCode", masterCompanyCode);
|
||||
//params.put("masterCompanyProjectCodes", masterCompanyProjectCodes);
|
||||
}
|
||||
|
||||
sidoSub = getSidoSub(sido);
|
||||
gugunSub = getGugunSub(gugun);
|
||||
dongSub = getDongSub(dong);
|
||||
|
||||
String big_region = "";
|
||||
if (sidoSub.equals("1001")) {
|
||||
big_region = "12:"; // 강원도
|
||||
|
|
@ -503,7 +534,7 @@ public class MapLeftController {
|
|||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
if (iter.next().get("projectCode").equals(particularProjectCode1)) {
|
||||
iter.remove();
|
||||
|
|
@ -512,7 +543,7 @@ public class MapLeftController {
|
|||
}
|
||||
|
||||
iter = result.iterator();
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
if (iter.next().get("projectCode").equals(particularProjectCode2)) {
|
||||
iter.remove();
|
||||
|
|
@ -534,6 +565,8 @@ public class MapLeftController {
|
|||
|
||||
@RequestMapping(value = "/map/mapSearchPolygonCheck.do")
|
||||
public String mapSearchPolygonCheck(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
int nCls = JwtUtil.getCls(request);
|
||||
|
||||
String holeCode = "";
|
||||
String polygonType = (String)(params.get("polygonType"));
|
||||
String minX = GeoinfoCommon.parseData(String.valueOf(params.get("minX")));
|
||||
|
|
@ -597,7 +630,7 @@ public class MapLeftController {
|
|||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
String code = (String)iter.next().get("code");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -609,7 +642,7 @@ public class MapLeftController {
|
|||
}
|
||||
|
||||
iter = searchHoleCode.iterator();
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
String code = (String)iter.next().get("code");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -629,22 +662,16 @@ public class MapLeftController {
|
|||
@RequestMapping(value = "/map/mapSichInformation.do")
|
||||
public String mapSichInformation(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
|
||||
/*List<EgovMap> result = mapControlService.selectSichInformation(params);*/
|
||||
/*List<EgovMap> hole = mapLeftService.selectHeaderFromProjectCode(params);*/
|
||||
|
||||
params.put("pcodePer", params.get("pcode") +"%");
|
||||
EgovMap bbox = mapLeftService.selectTblHeaderBBOX(params);
|
||||
/*EgovMap project = mapLeftService.selectProjectInfo2(params);*/
|
||||
logger.debug("-------------------동작확인1");
|
||||
/*EgovMap locationDataYn = mapLeftService.getLoYn(params);*/
|
||||
/*EgovMap project = mapLeftService.selectProjectInfo(params);*/
|
||||
|
||||
logger.debug("-------------------동작확인2");
|
||||
/* List<EgovMap> projectYn = mapLeftService.selectTblProjectInformationYn(params);*/
|
||||
logger.debug("-------------------동작확인3");
|
||||
/*model.put("locationDataYn", locationDataYn);*/
|
||||
|
||||
|
||||
EgovMap bbox = mapLeftService.selectTblHeaderBBOX(params);
|
||||
|
||||
JSONObject jsonResponse = new JSONObject();
|
||||
|
||||
HashMap<String, Object> handleApiServiceParams = new HashMap<String, Object>();
|
||||
handleApiServiceParams.put("projCode", params.get("pcode"));
|
||||
handleApiServiceParams.put("apiKey", "91MhmaF8YlMZJlg6H4zruj8B5sKZWeRSoA5N4uXZjXg");
|
||||
geoinfoApiV1Service.handleApiService(request, handleApiServiceParams, "sp-get-selectclass-info-p", jsonResponse);
|
||||
|
||||
EgovMap projectCount = mapLeftService.selectTblProjectCount(params);
|
||||
|
||||
params.put("stanSpt", projectCount.get("stanSpt"));
|
||||
|
|
@ -677,26 +704,23 @@ public class MapLeftController {
|
|||
params.put("sampleInfo", projectCount.get("sampleInfo"));
|
||||
|
||||
|
||||
model.put("projectCount", projectCount);
|
||||
model.put("projectCount", projectCount);
|
||||
model.put("data", jsonResponse.get("data"));
|
||||
|
||||
EgovMap project = mapLeftService.selectProjectInfo(params);
|
||||
model.put("project", project);
|
||||
|
||||
// projectYn에 시추공 별 시험여부가 들어간다.
|
||||
List<EgovMap> projectYn = mapLeftService.selectTblProjectInformationYn(params);
|
||||
logger.debug("-------------------동작확인4");
|
||||
geoinfoApiV1Service.handleApiService(request, handleApiServiceParams, "sp-get-selectclass-info-ph", jsonResponse);
|
||||
model.put("testCountsPerBorehole", jsonResponse.get("data"));
|
||||
|
||||
|
||||
|
||||
|
||||
logger.debug("-------------------동작확인5");
|
||||
model.put("projectYn", projectYn);
|
||||
|
||||
model.put("userId", request.getSession().getAttribute("USERID"));
|
||||
/*model.put("hole", hole);*/
|
||||
model.put("bbox", bbox);
|
||||
/*model.put("result", result);*/
|
||||
|
||||
/*model.put("projectYn", projectYn);*/
|
||||
|
||||
|
||||
return "jsonView";
|
||||
}
|
||||
|
||||
|
|
@ -717,6 +741,8 @@ public class MapLeftController {
|
|||
|
||||
@RequestMapping(value = "/map/mapSearchSqurePolygonCheck.do")
|
||||
public String mapSearchSqurePolygonCheck(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
int nCls = JwtUtil.getCls(request);
|
||||
|
||||
String holeCode = "";
|
||||
String polygonType = "squre";
|
||||
EgovMap searchPassCount = mapControlService.searchPassCountHoleCode(params);
|
||||
|
|
@ -735,7 +761,7 @@ public class MapLeftController {
|
|||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
String code = (String)iter.next().get("code");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -747,7 +773,7 @@ public class MapLeftController {
|
|||
}
|
||||
|
||||
iter = data.iterator();
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
String code = (String)iter.next().get("code");
|
||||
code = code.substring(0, 5);
|
||||
|
|
@ -783,9 +809,39 @@ public class MapLeftController {
|
|||
}
|
||||
|
||||
|
||||
private String getSidoSub(String sido) {
|
||||
|
||||
if (!(sido.equals("all"))) {
|
||||
String[] arrSido = sido.split("\\^");
|
||||
if( arrSido != null && 0 < arrSido.length ) {
|
||||
return arrSido[0];
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private String getGugunSub(String gugun) {
|
||||
|
||||
String[] arrGugun = gugun.split("\\^");
|
||||
if( arrGugun != null && 0 < arrGugun.length ) {
|
||||
return arrGugun[0];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private String getDongSub(String dong) {
|
||||
String[] arrDong = dong.split("\\^");
|
||||
if( arrDong != null && 0 < arrDong.length ) {
|
||||
return arrDong[0];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/map/mapSearchArea.do")
|
||||
public String mapSearchArea(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
|
||||
int nCls = JwtUtil.getCls(request);
|
||||
|
||||
String sido = GeoinfoCommon.parseData(params.get("sido").toString());
|
||||
String gugun = GeoinfoCommon.parseData(params.get("gugun").toString());
|
||||
String dong = GeoinfoCommon.parseData(params.get("dong").toString());
|
||||
|
|
@ -796,15 +852,10 @@ public class MapLeftController {
|
|||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
|
||||
if (!(sido.equals("all"))) {
|
||||
sidoSub = sido.substring(0, 4);
|
||||
}
|
||||
if (!(gugun.equals("all"))) {
|
||||
gugunSub = gugun.substring(0, 4);
|
||||
}
|
||||
if (!(dong.equals("all"))) {
|
||||
dongSub = dong.substring(0, 5);
|
||||
}
|
||||
sidoSub = getSidoSub(sido);
|
||||
gugunSub = getGugunSub(gugun);
|
||||
dongSub = getDongSub(dong);
|
||||
|
||||
// System.out.println("sidoSub========================="+sidoSub);
|
||||
String big_region = "";
|
||||
if (sidoSub.equals("1001")) {
|
||||
|
|
@ -874,7 +925,7 @@ public class MapLeftController {
|
|||
List<EgovMap> result = mapLeftService.getAreaSearchList(params);
|
||||
Iterator<EgovMap> iter = result.iterator();
|
||||
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
if (iter.next().get("projectCode").equals(particularProjectCode1)) {
|
||||
iter.remove();
|
||||
|
|
@ -883,7 +934,7 @@ public class MapLeftController {
|
|||
}
|
||||
|
||||
iter = result.iterator();
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
if (iter.next().get("projectCode").equals(particularProjectCode2)) {
|
||||
iter.remove();
|
||||
|
|
@ -902,6 +953,47 @@ public class MapLeftController {
|
|||
return "map/left/include/mapSearchArea";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/map/mapSearchDis.do")
|
||||
public String mapSearchDist(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
params.put("viewPage", viewPage);
|
||||
EgovMap result = mapLeftService.selectProjectListByDist( params );
|
||||
|
||||
|
||||
if (params.get("page")!= null) {
|
||||
pageIndex = Integer.parseInt(GeoinfoCommon.parseData(String.valueOf(params.get("page")))); // 현재페이지번호
|
||||
} else {
|
||||
pageIndex = 0;
|
||||
}
|
||||
|
||||
int lastPage = Integer.parseInt(result.get("count").toString()) / viewPage;
|
||||
// if (!lastPage) {
|
||||
lastPageIndex = lastPage - 1;
|
||||
|
||||
pageIndex = (pageIndex > 0) ? pageIndex : 0;
|
||||
lastPageIndex = (lastPageIndex > 0) ? lastPageIndex : 0;
|
||||
pageIndex = (pageIndex > lastPageIndex) ? lastPageIndex : pageIndex;
|
||||
// }
|
||||
|
||||
|
||||
initPageIndex(pageIndex, lastPageIndex);
|
||||
|
||||
|
||||
params.put("pageIndex", nowPage+1);
|
||||
|
||||
EgovMap rtn_result = mapLeftService.selectProjectListByDist( params );
|
||||
|
||||
model.addAttribute("result", rtn_result.get("datas"));
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("startPage", startPage);
|
||||
model.addAttribute("endPage", endPage);
|
||||
model.addAttribute("nowPage", nowPage);
|
||||
model.addAttribute("nextPage", next);
|
||||
model.addAttribute("prePage", pre);
|
||||
|
||||
// 발주처 검색
|
||||
return "map/left/include/mapSearchDist";
|
||||
}
|
||||
|
||||
int pageIndex = 0; // 현재페이지번호
|
||||
int lastPageIndex = 0; // 마지막페이지번호
|
||||
int viewPage = Integer.parseInt(EgovProperties.getGeoinfoProperty("Globals.VIEWPAGE")) - 1; // 한번에
|
||||
|
|
@ -1384,143 +1476,176 @@ public class MapLeftController {
|
|||
String use_contents = request.getParameter("use_contents");
|
||||
String use_example = request.getParameter("use_example");
|
||||
String idx = request.getParameter("idx");
|
||||
String[] fnamaeArray;
|
||||
String fname="";
|
||||
String path = "";
|
||||
if(metadataID.indexOf(",") > -1){
|
||||
fnamaeArray = metadataID.split(",");
|
||||
}else {
|
||||
fnamaeArray = new String[1];
|
||||
fnamaeArray[0] = metadataID;
|
||||
|
||||
//웹 취약점 때문에 수정 23.02.15
|
||||
//String savePath = EgovProperties.getProperty("Geoinfo.FilePath");
|
||||
String savePath = EgovProperties.getProperty("Geoinfo.FilePath").trim();
|
||||
}
|
||||
|
||||
String fileName[] = new String[4];
|
||||
String saveName[] = new String[4];
|
||||
int pos = 1;
|
||||
fname = fnamaeArray[0] + ".zip";
|
||||
//웹 취약점 때문에 수정 23.02.15
|
||||
//path = EgovProperties.getProperty("Geoinfo.FilePath");
|
||||
path = EgovProperties.getProperty("Geoinfo.FilePath").trim();
|
||||
path = path + "\\report\\service\\";
|
||||
File file2 = new File(path + fname);
|
||||
int filesize = (int)file2.length();
|
||||
if (filesize > 0) {
|
||||
//웹 취약점 때문에 수정 23.02.15
|
||||
//String savePath = EgovProperties.getProperty("Geoinfo.FilePath");
|
||||
String savePath = EgovProperties.getProperty("Geoinfo.FilePath").trim();
|
||||
|
||||
Map<String, MultipartFile> multipartFiles = multi.getFileMap();
|
||||
String fileName[] = new String[4];
|
||||
String saveName[] = new String[4];
|
||||
int pos = 1;
|
||||
|
||||
for (Map.Entry<String, MultipartFile> entry : multipartFiles.entrySet()) {
|
||||
MultipartFile multipartFile = (MultipartFile)entry.getValue();
|
||||
if (!multipartFile.isEmpty()) {
|
||||
fileName[pos] = new String(multipartFile.getOriginalFilename().getBytes());
|
||||
Map<String, MultipartFile> multipartFiles = multi.getFileMap();
|
||||
|
||||
for (Map.Entry<String, MultipartFile> entry : multipartFiles.entrySet()) {
|
||||
MultipartFile multipartFile = (MultipartFile)entry.getValue();
|
||||
if (!multipartFile.isEmpty()) {
|
||||
fileName[pos] = new String(multipartFile.getOriginalFilename().getBytes());
|
||||
|
||||
|
||||
|
||||
System.out.println(String.valueOf((String)entry.getKey()) + " : " + fileName[pos]);
|
||||
System.out.println("savePath = " + savePath);
|
||||
System.out.println(String.valueOf((String)entry.getKey()) + " : " + fileName[pos]);
|
||||
System.out.println("savePath = " + savePath);
|
||||
|
||||
//웹 취약점 때문에 수정
|
||||
String file_ext = fileName[pos].substring(fileName[pos].lastIndexOf(".") + 1);
|
||||
file_ext = file_ext.replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll("&", "");
|
||||
fileName[pos] = fileName[pos].replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll("&", "");
|
||||
fileName[pos] = fileName[pos].replace(file_ext, "." + file_ext);
|
||||
//웹 취약점 때문에 수정
|
||||
String file_ext = fileName[pos].substring(fileName[pos].lastIndexOf(".") + 1);
|
||||
file_ext = file_ext.replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll("&", "");
|
||||
fileName[pos] = fileName[pos].replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll("&", "");
|
||||
fileName[pos] = fileName[pos].replace(file_ext, "." + file_ext);
|
||||
|
||||
File file = new File(String.valueOf(savePath) + fileName[pos]);
|
||||
File file = new File(String.valueOf(savePath) + fileName[pos]);
|
||||
|
||||
if (!file.isFile()) {
|
||||
file.createNewFile();
|
||||
if (!file.isFile()) {
|
||||
file.createNewFile();
|
||||
}
|
||||
OutputStream output = new FileOutputStream(file);
|
||||
IOUtils.copy(multipartFile.getInputStream(), output);
|
||||
output.close();
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int fileSizeLimit = 524288000;
|
||||
int affectedRows = 0;
|
||||
String L_dat = null;
|
||||
String L_tmp = null;
|
||||
|
||||
FileCmmn fileCmmn = FileCmmn.getInstance();
|
||||
boolean isFileChk = true;
|
||||
|
||||
for (int i = 1; i < 4; i++) {
|
||||
if (fileName[i] != null) {
|
||||
String file_ext = fileName[i].substring(fileName[i].lastIndexOf('.') + 1);
|
||||
|
||||
if (!FileCmmn.isZipCheck(fileName[i])) {
|
||||
mv.addObject("msg", "<script>alert('등록할 수 없는 파일입니다.');window.location.href='downloadPurpose.do?pcrode='"+metadataID+";</script>");
|
||||
fileName[i] = null;
|
||||
//return mv;
|
||||
}
|
||||
OutputStream output = new FileOutputStream(file);
|
||||
IOUtils.copy(multipartFile.getInputStream(), output);
|
||||
output.close();
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
for (int i = 1; i < 4; i++) {
|
||||
|
||||
int fileSizeLimit = 524288000;
|
||||
int affectedRows = 0;
|
||||
String L_dat = null;
|
||||
String L_tmp = null;
|
||||
|
||||
FileCmmn fileCmmn = FileCmmn.getInstance();
|
||||
boolean isFileChk = true;
|
||||
System.out.println("fileName = " + fileName[i]);
|
||||
if (fileName[i] != null) {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
L_dat = String.valueOf(cal.get(1)) + "_" + cal.get(2) + "_" + cal.get(5);
|
||||
L_tmp = String.valueOf(cal.get(10)) + "_" + cal.get(12) + "_" + cal.get(13);
|
||||
saveName[i] = String.valueOf(L_dat) + "_" + L_tmp + i + fileName[i].substring(fileName[i].lastIndexOf("."));
|
||||
} else {
|
||||
fileName[i] = "";
|
||||
saveName[i] = "";
|
||||
}
|
||||
File up1 = new File(String.valueOf(savePath) + "/", FilenameUtils.getName(fileName[i]));
|
||||
File up2 = new File(String.valueOf(savePath) + "/", FilenameUtils.getName(saveName[i]));
|
||||
|
||||
for (int i = 1; i < 4; i++) {
|
||||
if (fileName[i] != null) {
|
||||
String file_ext = fileName[i].substring(fileName[i].lastIndexOf('.') + 1);
|
||||
if (up1.exists()) {
|
||||
boolean bool = up1.renameTo(up2);
|
||||
}
|
||||
}
|
||||
|
||||
String fileName1 = fileName[1];
|
||||
String fileName2 = fileName[2];
|
||||
String saveName1 = saveName[1];
|
||||
String saveName2 = saveName[2];
|
||||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
params.put("userId", userId);
|
||||
|
||||
params.put("metadataId", metadataID);
|
||||
params.put("purposeCode", purpose_code);
|
||||
params.put("purposeEtc", purpose_etc);
|
||||
params.put("subject", subject);
|
||||
params.put("startDate", startDate);
|
||||
params.put("endDate", endDate);
|
||||
params.put("task_startdate", task_startdate);
|
||||
params.put("task_enddate", task_enddate);
|
||||
params.put("use_contents", use_contents);
|
||||
params.put("use_example", use_example);
|
||||
params.put("idx", idx);
|
||||
|
||||
params.put("fileName", fileName1);
|
||||
params.put("saveName", saveName1);
|
||||
params.put("fileName2", fileName2);
|
||||
params.put("saveName2", saveName2);
|
||||
|
||||
|
||||
affectedRows = mapLeftService.insertWebDownloadLog(params);
|
||||
params.put("userId", userId);
|
||||
int ref_idx = mapLeftService.selectWebDownLoadIdx(params);
|
||||
|
||||
// 시추공 자료 다운로드시 필요한 값들....
|
||||
System.out.println("REF_IDX -" + ref_idx);
|
||||
mv.addObject("IDX", String.valueOf(ref_idx));
|
||||
affectedRows = 1;
|
||||
} catch (FileNotFoundException e) {
|
||||
logger.debug("error", e);
|
||||
} catch (NumberFormatException e) {
|
||||
logger.debug("error", e);
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
logger.debug("error", e);
|
||||
} catch (Exception i) {
|
||||
logger.debug("error", i);
|
||||
}
|
||||
|
||||
if (affectedRows > 0) {
|
||||
mv.addObject("msg", "<script>alert('정상적으로 등록이 완료되었습니다.');window.location.href='map/downloadPurpose.do?pcrode='"+metadataID+";</script>");
|
||||
} else {
|
||||
mv.addObject("msg", "<script>alert('파일다운이 실패하였습니다.');window.location.href='map/popup/downloadPurpose.do?pcrode='"+metadataID+";</script>");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
mv.addObject("fileName",fileName);
|
||||
|
||||
// return mv;
|
||||
return "forward:/map/downloadZip.do";
|
||||
}else {
|
||||
mv.addObject("msg", "<script>alert('파일다운이 실패하였습니다.');window.location.href='map/popup/downloadPurpose.do?pcrode='"+metadataID+";</script>");
|
||||
|
||||
/*mv.addObject("msg", "<script>alert('파일을 다운받을 수 없습니다');</script>");*/
|
||||
response.setCharacterEncoding("euc-kr");
|
||||
PrintWriter writer = response.getWriter();
|
||||
writer.println("<script type='text/javascript'>");
|
||||
writer.println("alert('해당 파일이 존재하지 않습니다.');");
|
||||
writer.println("</script>");
|
||||
writer.flush();
|
||||
return "forward:/map/downloadZipFail.do";
|
||||
|
||||
if (!FileCmmn.isZipCheck(fileName[i])) {
|
||||
mv.addObject("msg", "<script>alert('등록할 수 없는 파일입니다.');window.location.href='downloadPurpose.do?pcrode='"+metadataID+";</script>");
|
||||
fileName[i] = null;
|
||||
//return mv;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
for (int i = 1; i < 4; i++) {
|
||||
|
||||
|
||||
System.out.println("fileName = " + fileName[i]);
|
||||
if (fileName[i] != null) {
|
||||
GregorianCalendar cal = new GregorianCalendar();
|
||||
L_dat = String.valueOf(cal.get(1)) + "_" + cal.get(2) + "_" + cal.get(5);
|
||||
L_tmp = String.valueOf(cal.get(10)) + "_" + cal.get(12) + "_" + cal.get(13);
|
||||
saveName[i] = String.valueOf(L_dat) + "_" + L_tmp + i + fileName[i].substring(fileName[i].lastIndexOf("."));
|
||||
} else {
|
||||
fileName[i] = "";
|
||||
saveName[i] = "";
|
||||
}
|
||||
File up1 = new File(String.valueOf(savePath) + "/", FilenameUtils.getName(fileName[i]));
|
||||
File up2 = new File(String.valueOf(savePath) + "/", FilenameUtils.getName(saveName[i]));
|
||||
|
||||
if (up1.exists()) {
|
||||
boolean bool = up1.renameTo(up2);
|
||||
}
|
||||
}
|
||||
|
||||
String fileName1 = fileName[1];
|
||||
String fileName2 = fileName[2];
|
||||
String saveName1 = saveName[1];
|
||||
String saveName2 = saveName[2];
|
||||
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
params.put("userId", userId);
|
||||
|
||||
params.put("metadataId", metadataID);
|
||||
params.put("purposeCode", purpose_code);
|
||||
params.put("purposeEtc", purpose_etc);
|
||||
params.put("subject", subject);
|
||||
params.put("startDate", startDate);
|
||||
params.put("endDate", endDate);
|
||||
params.put("task_startdate", task_startdate);
|
||||
params.put("task_enddate", task_enddate);
|
||||
params.put("use_contents", use_contents);
|
||||
params.put("use_example", use_example);
|
||||
params.put("idx", idx);
|
||||
|
||||
params.put("fileName", fileName1);
|
||||
params.put("saveName", saveName1);
|
||||
params.put("fileName2", fileName2);
|
||||
params.put("saveName2", saveName2);
|
||||
|
||||
|
||||
affectedRows = mapLeftService.insertWebDownloadLog(params);
|
||||
params.put("userId", userId);
|
||||
int ref_idx = mapLeftService.selectWebDownLoadIdx(params);
|
||||
|
||||
// 시추공 자료 다운로드시 필요한 값들....
|
||||
System.out.println("REF_IDX -" + ref_idx);
|
||||
mv.addObject("IDX", String.valueOf(ref_idx));
|
||||
affectedRows = 1;
|
||||
} catch (FileNotFoundException e) {
|
||||
logger.debug("error", e);
|
||||
} catch (NumberFormatException e) {
|
||||
logger.debug("error", e);
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
logger.debug("error", e);
|
||||
} catch (Exception i) {
|
||||
logger.debug("error", i);
|
||||
}
|
||||
|
||||
if (affectedRows > 0) {
|
||||
mv.addObject("msg", "<script>alert('정상적으로 등록이 완료되었습니다.');window.location.href='map/downloadPurpose.do?pcrode='"+metadataID+";</script>");
|
||||
} else {
|
||||
mv.addObject("msg", "<script>alert('오류입니다.');window.location.href='map/popup/downloadPurpose.do?pcrode='"+metadataID+";</script>");
|
||||
}
|
||||
|
||||
|
||||
mv.addObject("fileName",fileName);
|
||||
|
||||
// return mv;
|
||||
return "forward:/map/downloadZip.do";
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/map/downloadLogSave2.do")
|
||||
|
|
@ -2031,6 +2156,15 @@ public class MapLeftController {
|
|||
return null;
|
||||
}
|
||||
|
||||
// downloadZip
|
||||
@RequestMapping(value = "/map/downloadZipFail.do")
|
||||
public ModelAndView downloadZipFail(ModelMap model, @RequestParam Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
ModelAndView mv = new ModelAndView("/map/popup/downloadZipFail");
|
||||
|
||||
|
||||
return mv;
|
||||
}
|
||||
|
||||
public String getProjectCode(int type, String hCode){
|
||||
String code = "";
|
||||
if( hCode != null ){
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ public interface MapLeftMapper {
|
|||
|
||||
EgovMap selectProjectInfo2(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap selectTempProjectInfo(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap selectGetHoleCodeInfo(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap selectGetHoleCodeDetailInfo(Map<String, Object> params) throws Exception;
|
||||
|
|
@ -107,4 +109,8 @@ public interface MapLeftMapper {
|
|||
|
||||
EgovMap selectTblProjectCount(Map<String, Object> params) throws Exception;
|
||||
|
||||
Long sPCntTblCsiByKeyword(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> spGetTblCsiByKeyword(Map<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,5 +111,7 @@ public interface MapLeftService {
|
|||
|
||||
EgovMap selectTblProjectCount(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap selectProjectListByDist(Map<String, Object> params) throws Exception;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import java.io.FileNotFoundException;
|
|||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
|
@ -24,6 +25,7 @@ import org.springframework.web.multipart.MultipartRequest;
|
|||
|
||||
import egovframework.com.cmm.service.EgovProperties;
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.com.file.FileCmmn;
|
||||
import geoinfo.map.left.service.MapLeftMapper;
|
||||
import geoinfo.map.left.service.MapLeftService;
|
||||
|
|
@ -58,7 +60,12 @@ public class MapLeftServiceImpl implements MapLeftService{
|
|||
|
||||
@Override
|
||||
public EgovMap selectProjectInfo(Map<String, Object> params) throws Exception {
|
||||
return mapLeftMapper.selectProjectInfo(params);
|
||||
EgovMap resultMap = new EgovMap();
|
||||
resultMap = mapLeftMapper.selectProjectInfo(params);
|
||||
if (resultMap == null) {
|
||||
resultMap = mapLeftMapper.selectTempProjectInfo(params);
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -515,4 +522,31 @@ public class MapLeftServiceImpl implements MapLeftService{
|
|||
return mapLeftMapper.selectTblProjectCount(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public EgovMap selectProjectListByDist(Map<String, Object> params) throws Exception {
|
||||
EgovMap resultMap = new EgovMap();
|
||||
|
||||
params.put("constTag", "P");
|
||||
params.put("masterCompanyOCode", GeoinfoCommon.parseData(params.get("o").toString()));
|
||||
params.put("masterCompanyTwCode", GeoinfoCommon.parseData(params.get("tw").toString()));
|
||||
params.put("masterCompanyThCode", GeoinfoCommon.parseData(params.get("th").toString()));
|
||||
params.put("masterCompanyName", "");
|
||||
params.put("nPage", params.get("pageIndex"));
|
||||
params.put("nCount", params.get("viewPage"));
|
||||
|
||||
Long count = mapLeftMapper.sPCntTblCsiByKeyword(params);
|
||||
List<EgovMap> datas = mapLeftMapper.spGetTblCsiByKeyword(params);
|
||||
|
||||
if (datas.size() < 1) {
|
||||
datas = new ArrayList<EgovMap>();
|
||||
}
|
||||
|
||||
|
||||
resultMap.put("count", count);
|
||||
resultMap.put("datas", datas);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package geoinfo.map.main;
|
|||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.map.main.service.MapMainService;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
|
@ -10,6 +11,14 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
|
@ -52,8 +61,8 @@ public class MapMainController {
|
|||
|
||||
EgovMap selectCode = mapMainService.selectWebSelectCode(params);
|
||||
|
||||
if(selectCode != null) {
|
||||
String code[] = (String.valueOf(selectCode.get("selectCode"))).split(",");
|
||||
if(selectCode != null) {
|
||||
String code[] = MyUtil.ClobToString((java.sql.Clob)selectCode.get("selectCode")).split(",");
|
||||
int codeCount = 0;
|
||||
for(int i =0; i < code.length; i++ ) {
|
||||
if(code[i] != null && !code[i].equals("") && !code[i].equals(" ") && !code[i].equals("null") ) {
|
||||
|
|
@ -93,7 +102,7 @@ public class MapMainController {
|
|||
@RequestMapping(value = "/map/getDong.do")
|
||||
public String getDong(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap<String, Object> params) throws Exception {
|
||||
|
||||
List<EgovMap> dong = mapMainService.selectWebBoundDong(params); // 지역검색(구/군 선택)
|
||||
List<EgovMap> dong = mapMainService.selectWebBoundDong(params); // 지역검색(읍/면/동 선택)
|
||||
|
||||
model.addAttribute("dong", dong);
|
||||
|
||||
|
|
@ -157,4 +166,162 @@ public class MapMainController {
|
|||
|
||||
return "map/left/include/comMove";
|
||||
}
|
||||
|
||||
/**
|
||||
* 광산 정보 WFS 프록시 (CORS 해결용)
|
||||
* @param request
|
||||
* @param response
|
||||
* @param params
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/map/getMineWFS.do")
|
||||
public void getMineWFS(HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap<String, Object> params) throws Exception {
|
||||
|
||||
// 1. 공공데이터포털 서비스 키 (Decoding 된 키 사용)
|
||||
String serviceKey = "L1z0zEpxNLB0Sqwv97WAIyL1lB+shPemDLNaG9hy9g3BzbkXRVG2/aSTZ7PiAAivgaCYn9p1tLmq2keiC4yFZA==";
|
||||
|
||||
// 2. 요청 파라미터 받기 (OpenLayers에서 bbox를 보냄)
|
||||
String bbox = request.getParameter("bbox");
|
||||
|
||||
// 3. API URL 생성
|
||||
StringBuilder urlBuilder = new StringBuilder("https://apis.data.go.kr/1480523/GeologicalService/getMineWFS");
|
||||
urlBuilder.append("?" + URLEncoder.encode("ServiceKey", "UTF-8") + "=" + URLEncoder.encode(serviceKey, "UTF-8"));
|
||||
urlBuilder.append("&" + URLEncoder.encode("srsName", "UTF-8") + "=" + URLEncoder.encode("EPSG:3857", "UTF-8"));
|
||||
urlBuilder.append("&" + URLEncoder.encode("maxFeatures", "UTF-8") + "=" + URLEncoder.encode("100", "UTF-8"));
|
||||
urlBuilder.append("&" + URLEncoder.encode("resultType", "UTF-8") + "=" + URLEncoder.encode("results", "UTF-8"));
|
||||
|
||||
// 버전을 1.0.0으로 명시 (GML 2 포맷 요청)
|
||||
urlBuilder.append("&" + URLEncoder.encode("version", "UTF-8") + "=" + URLEncoder.encode("1.0.0", "UTF-8"));
|
||||
|
||||
// bbox가 있을 경우에만 추가 (OpenLayers Strategy.BBOX가 자동으로 보냄)
|
||||
if (bbox != null && !bbox.isEmpty()) {
|
||||
urlBuilder.append("&" + URLEncoder.encode("bbox", "UTF-8") + "=" + URLEncoder.encode(bbox, "UTF-8"));
|
||||
}
|
||||
|
||||
// 4. HTTP 연결 설정
|
||||
URL url = new URL(urlBuilder.toString());
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setRequestProperty("Content-type", "application/xml"); // WFS는 XML 응답
|
||||
|
||||
// 5. 응답 코드 확인 및 스트림 연결
|
||||
// 응답을 읽어서 브라우저로 바로 쏘아줍니다 (Pass-through)
|
||||
response.setContentType("text/xml;charset=UTF-8"); // 브라우저에게 XML임을 알림
|
||||
|
||||
BufferedReader rd;
|
||||
if(conn.getResponseCode() >= 200 && conn.getResponseCode() <= 300) {
|
||||
rd = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
|
||||
} else {
|
||||
rd = new BufferedReader(new InputStreamReader(conn.getErrorStream(), "UTF-8"));
|
||||
}
|
||||
|
||||
// 6. 데이터 읽기 및 쓰기
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String line;
|
||||
while ((line = rd.readLine()) != null) {
|
||||
sb.append(line);
|
||||
}
|
||||
rd.close();
|
||||
conn.disconnect();
|
||||
|
||||
// 클라이언트로 응답 전송
|
||||
response.getWriter().write(sb.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 광산 상세 정보 조회 (getInfo API 프록시)
|
||||
* @param request
|
||||
* @param response
|
||||
* @param params
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/map/getMineInfo.do")
|
||||
public void getMineInfo(HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap<String, Object> params) throws Exception {
|
||||
|
||||
// 1. 서비스 키 & 파라미터 설정
|
||||
String serviceKey = "L1z0zEpxNLB0Sqwv97WAIyL1lB+shPemDLNaG9hy9g3BzbkXRVG2/aSTZ7PiAAivgaCYn9p1tLmq2keiC4yFZA==";
|
||||
String mgtNo = request.getParameter("mgtNo");
|
||||
|
||||
// 2. API URL 생성 (JSON 요청)
|
||||
StringBuilder urlBuilder = new StringBuilder("https://apis.data.go.kr/1480523/GeologicalService/getMine");
|
||||
urlBuilder.append("?" + URLEncoder.encode("ServiceKey", "UTF-8") + "=" + URLEncoder.encode(serviceKey, "UTF-8"));
|
||||
urlBuilder.append("&" + URLEncoder.encode("mgtNo", "UTF-8") + "=" + URLEncoder.encode(mgtNo, "UTF-8"));
|
||||
urlBuilder.append("&" + URLEncoder.encode("type", "UTF-8") + "=" + URLEncoder.encode("json", "UTF-8")); // JSON 응답 요청
|
||||
|
||||
// 3. API 호출
|
||||
URL url = new URL(urlBuilder.toString());
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setRequestProperty("Content-type", "application/json");
|
||||
|
||||
// 4. 응답 전달
|
||||
response.setContentType("application/json;charset=UTF-8");
|
||||
|
||||
BufferedReader rd;
|
||||
if(conn.getResponseCode() >= 200 && conn.getResponseCode() <= 300) {
|
||||
rd = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
|
||||
} else {
|
||||
rd = new BufferedReader(new InputStreamReader(conn.getErrorStream(), "UTF-8"));
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String line;
|
||||
while ((line = rd.readLine()) != null) {
|
||||
sb.append(line);
|
||||
}
|
||||
rd.close();
|
||||
conn.disconnect();
|
||||
|
||||
// 클라이언트로 JSON 문자열 전송
|
||||
response.getWriter().write(sb.toString());
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/map/getWellWFS.do")
|
||||
public void getWellWFS(HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestParam HashMap<String, Object> params) throws Exception {
|
||||
|
||||
// GIMS WFS 서비스 URL (실제 서비스 typename에 맞춰 수정 필요)
|
||||
String targetUrl = "https://www.gims.go.kr/api/wfs";
|
||||
|
||||
String serviceKey = "1bdb567fc21bb0396023a6ba9ea189fee8aa9e5a355c1b998d071d530dbd3";
|
||||
|
||||
|
||||
// 요청 파라미터 구성 (OpenLayers에서 전달받은 bbox, srsName 등 활용)
|
||||
StringBuilder requestUrl = new StringBuilder(targetUrl);
|
||||
requestUrl.append("?KEY=" + URLEncoder.encode(serviceKey, "UTF-8")); // 필수 항목
|
||||
requestUrl.append("&service=wfs&version=1.1.0&request=GetFeature"); // 필수 항목
|
||||
requestUrl.append("&output=" + URLEncoder.encode("text/xml;subType=gml/3.1.1/profiles/gmlsf/1.0.0/0", "UTF-8")); // 필수 항목
|
||||
requestUrl.append("&exceptions=" + URLEncoder.encode("text/xml", "UTF-8")); // 필수 항목
|
||||
requestUrl.append("&typename=YHJS_WELL,WT_GENERAL_WGS,WT_STRATUM,DRILL_KICT"); // typename: 옵션 이라고 하지만 실제로는 필수 항목
|
||||
if (params.get("bbox") != null) {
|
||||
requestUrl.append("&bbox=").append(params.get("bbox")); // 필수 항목
|
||||
}
|
||||
|
||||
requestUrl.append("&propertyname=GENNUM,JOSACODE,DCODE,LONGITUDE,LATITUDE,TMX,TMY"); //propertyname: 옵션
|
||||
requestUrl.append("&maxfeatures=1000"); //maxfeatures: 필수
|
||||
|
||||
requestUrl.append("&srsName=").append(URLEncoder.encode("EPSG:3857", "UTF-8")); // 필수 항목 : 3857로 요청해도 실제로는 EPSG:5181로 응답한다...
|
||||
|
||||
URL url = new URL(requestUrl.toString());
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("GET");
|
||||
conn.setConnectTimeout(5000);
|
||||
conn.setReadTimeout(5000);
|
||||
|
||||
response.setContentType("application/json; charset=UTF-8");
|
||||
|
||||
// 서버 응답을 클라이언트로 스트리밍
|
||||
try (InputStream is = conn.getInputStream();
|
||||
OutputStream os = response.getOutputStream()) {
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = is.read(buffer)) != -1) {
|
||||
os.write(buffer, 0, bytesRead);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 예외 처리: GIMS 서버 연결 실패 시 등
|
||||
response.setStatus(HttpServletResponse.SC_BAD_GATEWAY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import java.net.MalformedURLException;
|
|||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.jfree.util.Log;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
|
@ -36,6 +37,7 @@ import egovframework.rte.psl.dataaccess.util.EgovMap;
|
|||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.map.mapControl.service.MapControlService;
|
||||
import geoinfo.regi.selectClassInfo.service.SelectClassService;
|
||||
import geoinfo.util.MyUtil;
|
||||
import net.sf.json.JSONArray;
|
||||
|
||||
@Controller
|
||||
|
|
@ -363,7 +365,7 @@ public class MapContorlController {
|
|||
// 이미 등록되어 있는경우 날짜만 업데이트한다.
|
||||
if (egovMap != null) {
|
||||
int sCount = 0;
|
||||
String sCode = GeoinfoCommon.parseData(String.valueOf(egovMap.get("selectCode")));
|
||||
String sCode = GeoinfoCommon.parseData(MyUtil.ClobToString((java.sql.Clob) egovMap.get("selectCode")));
|
||||
sCode = sCode.replaceAll("null,", "");
|
||||
sCode = sCode.replaceAll(",null", "");
|
||||
String[] sCodeArray = new String[sCount];
|
||||
|
|
@ -455,7 +457,7 @@ public class MapContorlController {
|
|||
EgovMap idx = mapControlService.selectWebCartIndex(params);
|
||||
// 이미 등록되어 있는경우 날짜만 업데이트한다.
|
||||
if (idx != null) {
|
||||
String sCode = GeoinfoCommon.parseData(String.valueOf(idx.get("selectCode")));
|
||||
String sCode = GeoinfoCommon.parseData(MyUtil.ClobToString((java.sql.Clob)idx.get("selectCode")));
|
||||
sCode = sCode + "," +params.get("selectCode");
|
||||
params.put("selectCode", sCode);
|
||||
mapControlService.updateWebCartDate(params);
|
||||
|
|
@ -550,7 +552,7 @@ public class MapContorlController {
|
|||
params.put("metadataId", mId);
|
||||
params.put("holeCode", hcode);
|
||||
|
||||
String selectCode = (String)(mapControlService.selectWebCartUserId(params)).get("selectCode");
|
||||
String selectCode = MyUtil.ClobToString((java.sql.Clob)mapControlService.selectWebCartUserId(params).get("selectCode"));
|
||||
String selectCodeArray[] = selectCode.split(",");
|
||||
String selectCodeWebCart = "";
|
||||
|
||||
|
|
@ -573,6 +575,28 @@ public class MapContorlController {
|
|||
|
||||
return "map/mapControl/deleteCart";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/map/delete-all-cart-list.do", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public JSONObject deleteAllCartList(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
|
||||
JSONObject jSONOResponse = new JSONObject();
|
||||
|
||||
String userId = request.getSession().getAttribute("USERID").toString();
|
||||
|
||||
params.put("userId", userId);
|
||||
|
||||
mapControlService.deleteAllCartList(params);
|
||||
|
||||
System.out.println("\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jSONOResponse.toJSONString():[" + jSONOResponse.toJSONString() + "]\n" +
|
||||
"\n--------------------------------------------------------------\n");
|
||||
|
||||
return jSONOResponse;
|
||||
}
|
||||
|
||||
// 장바구니 관련 다운로드
|
||||
@RequestMapping(value = "/map/downloadCart.do", method = RequestMethod.GET)
|
||||
|
|
@ -802,7 +826,12 @@ public class MapContorlController {
|
|||
|
||||
EgovMap webCart = mapControlService.selectWebCartUserId(params);
|
||||
System.out.println(webCart != null);
|
||||
String selectCode[] = (webCart != null)? ((String)webCart.get("selectCode")).split(","):null;
|
||||
|
||||
//CLOB TO STRING
|
||||
String clobData = MyUtil.ClobToString((java.sql.Clob) webCart.get("selectCode"));
|
||||
System.out.println(clobData);
|
||||
|
||||
String selectCode[] = (webCart != null)? clobData.split(","):null;
|
||||
List<EgovMap> projectHodeCode = mapControlService.selectHodeCode(params);
|
||||
if(projectHodeCode != null ) {
|
||||
String hodeCode[] = new String[projectHodeCode.size()];
|
||||
|
|
@ -848,7 +877,7 @@ public class MapContorlController {
|
|||
EgovMap selectCode = mapControlService.selectWebCartUserId(params);
|
||||
|
||||
if(selectCode != null) {
|
||||
String code[] = (String.valueOf(selectCode.get("selectCode"))).split(",");
|
||||
String code[] = MyUtil.ClobToString((java.sql.Clob)selectCode.get("selectCode")).split(",");
|
||||
int codeCount = 0;
|
||||
for(int i =0; i < code.length; i++ ) {
|
||||
if(code[i] != null && !code[i].equals("") && !code[i].equals(" ") && !code[i].equals("null") ) {
|
||||
|
|
@ -900,5 +929,19 @@ public class MapContorlController {
|
|||
}
|
||||
return crosses % 2 > 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 시추공번호로 사용자가 입력한 시추명을 가져온다.
|
||||
* @param params
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/map/hole-name-by-user.do", method = RequestMethod.GET)
|
||||
public String holeNameByUser(@RequestParam Map<String, Object> params, ModelMap model) throws Exception {
|
||||
model.put("data", mapControlService.holeNameByUser(params));
|
||||
return "jsonView";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@ public interface MapControlMapper {
|
|||
EgovMap selectWebCartCount(Map<String, Object> params) throws Exception;
|
||||
|
||||
void deleteCart(Map<String, Object> params) throws Exception;
|
||||
|
||||
|
||||
void deleteAllCartList(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap selectWebCartUserId(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap selectWebDownloadLog(Map<String, Object> params) throws Exception;
|
||||
|
|
@ -76,4 +78,5 @@ public interface MapControlMapper {
|
|||
|
||||
List<EgovMap> selectHeaderSichInformation(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> holeNameByUser(Map<String, Object> params) throws Exception;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ public interface MapControlService {
|
|||
EgovMap selectWebCartCount(Map<String, Object> params) throws Exception;
|
||||
|
||||
void deleteCart(Map<String, Object> params) throws Exception;
|
||||
|
||||
void deleteAllCartList(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap selectWebDownloadLog(Map<String, Object> params) throws Exception;
|
||||
|
||||
|
|
@ -74,5 +76,7 @@ public interface MapControlService {
|
|||
List<EgovMap> selectSichInformation(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> selectHeaderSichInformation(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> holeNameByUser(Map<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,6 +87,11 @@ public class MapContorlServiceImpl implements MapControlService{
|
|||
public void deleteCart(Map<String, Object> params) throws Exception {
|
||||
mapControlMapper.deleteCart(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAllCartList(Map<String, Object> params) throws Exception {
|
||||
mapControlMapper.deleteAllCartList(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap selectWebCartUserId(Map<String, Object> params) throws Exception {
|
||||
|
|
@ -184,5 +189,8 @@ public class MapContorlServiceImpl implements MapControlService{
|
|||
return mapControlMapper.selectHeaderSichInformation(params);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<EgovMap> holeNameByUser(Map<String, Object> params) throws Exception {
|
||||
return mapControlMapper.holeNameByUser(params);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ import egovframework.com.cmm.service.EgovProperties;
|
|||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.map.projectSearch.service.MapProjectSearchService;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
import java.net.URLDecoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -33,11 +35,15 @@ public class MapProjectSearchController {
|
|||
|
||||
@RequestMapping(value = "/map/projectSearch.do")
|
||||
public String projectSearch(ModelMap model, HttpServletRequest request, HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
|
||||
|
||||
int nCls = MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
||||
|
||||
String test1 = GeoinfoCommon.parseData(String.valueOf(params.get("test1")));
|
||||
String tcr = GeoinfoCommon.parseData(String.valueOf(params.get("tcr")));
|
||||
String dsf = GeoinfoCommon.parseData(String.valueOf(params.get("dsf")));//
|
||||
String slickenside = GeoinfoCommon.parseData(String.valueOf(params.get("slickenside")));
|
||||
String q = GeoinfoCommon.parseData(String.valueOf(params.get("q")));
|
||||
String cone = GeoinfoCommon.parseData(String.valueOf(params.get("cone")));
|
||||
String rmr = GeoinfoCommon.parseData(String.valueOf(params.get("rmr")));
|
||||
|
||||
String classification9 = GeoinfoCommon.parseData(String.valueOf(params.get("classification9")));
|
||||
|
|
@ -61,6 +67,7 @@ public class MapProjectSearchController {
|
|||
String rock_resonant_usual = GeoinfoCommon.parseData(String.valueOf(params.get("rock_resonant_usual")));
|
||||
|
||||
String density = GeoinfoCommon.parseData(String.valueOf(params.get("density")));
|
||||
String ps = GeoinfoCommon.parseData(String.valueOf(params.get("ps")));
|
||||
String downhole = GeoinfoCommon.parseData(String.valueOf(params.get("downhole")));
|
||||
String refraction_survey = GeoinfoCommon.parseData(String.valueOf(params.get("refraction_survey")));
|
||||
String resistivity_survey = GeoinfoCommon.parseData(String.valueOf(params.get("resistivity_survey")));
|
||||
|
|
@ -92,6 +99,11 @@ public class MapProjectSearchController {
|
|||
} else if (q.equals("on") || q.equals("1")) {
|
||||
q = "1";
|
||||
}
|
||||
if (cone == null) {
|
||||
cone = "0";
|
||||
} else if (cone.equals("on") || cone.equals("1")) {
|
||||
cone = "1";
|
||||
}
|
||||
if (rmr == null) {
|
||||
rmr = "0";
|
||||
} else if (rmr.equals("on") || rmr.equals("1")) {
|
||||
|
|
@ -185,6 +197,11 @@ public class MapProjectSearchController {
|
|||
else if ((density.equals("on")) || (density.equals("1"))) {
|
||||
density = "1";
|
||||
}
|
||||
if (ps == null) {
|
||||
ps = "0";
|
||||
} else if ((ps.equals("on")) || (ps.equals("1"))) {
|
||||
ps = "1";
|
||||
}
|
||||
if (downhole == null)
|
||||
downhole = "0";
|
||||
else if ((downhole.equals("on")) || (downhole.equals("1"))) {
|
||||
|
|
@ -218,6 +235,14 @@ public class MapProjectSearchController {
|
|||
|
||||
//pname = pname.replaceAll(" ", "");
|
||||
params.put("pname", pname);
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"pname: [" + pname + "]\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
if (params.get("page")!= null) {
|
||||
pageIndex = Integer.parseInt(GeoinfoCommon.parseData(String.valueOf(params.get("page")))); // 현재페이지번호
|
||||
|
|
@ -254,10 +279,15 @@ public class MapProjectSearchController {
|
|||
params.put("firstRow", pageIndex * viewPage);
|
||||
params.put("lastRow", (pageIndex + 1) * viewPage);
|
||||
|
||||
List<EgovMap> items = mapProjectSearchService.selectItems(params);
|
||||
List<EgovMap> items = null;
|
||||
if( lastPage == null) {
|
||||
items = new ArrayList<EgovMap>();
|
||||
} else {
|
||||
items = mapProjectSearchService.selectItems(params);
|
||||
}
|
||||
Iterator<EgovMap> iter = items.iterator();
|
||||
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId1) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
if (iter.next().get("projectCode").equals(particularProjectCode1)) {
|
||||
iter.remove();
|
||||
|
|
@ -266,7 +296,7 @@ public class MapProjectSearchController {
|
|||
}
|
||||
|
||||
iter = items.iterator();
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user")) {
|
||||
if (!userId.equals(particularId2) && !userId.equals("admin_user") && nCls != 65535) {
|
||||
while (iter.hasNext()) {
|
||||
if (iter.next().get("projectCode").equals(particularProjectCode2)) {
|
||||
iter.remove();
|
||||
|
|
|
|||
|
|
@ -91,13 +91,13 @@ public class MapSubsidenceController {
|
|||
|
||||
@RequestMapping(value = "/map/ajaxGetSubsidenceInfoList.do", method = RequestMethod.GET)
|
||||
public ModelAndView ajaxGetSubsidenceInfoList(ModelAndView mav) throws Exception {
|
||||
|
||||
|
||||
LOGGER.info("지반침하사고 정보 리스트 조회(Ajax)");
|
||||
|
||||
|
||||
mav.setViewName("jsonView");
|
||||
|
||||
|
||||
mav.addObject("subsidenceInfoList", subsidenceService.selectSubsidenceInfoList());
|
||||
|
||||
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,203 @@
|
|||
package geoinfo.ntfc;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import geoinfo.ntfc.service.NotificationService;
|
||||
import geoinfo.ntfc.service.NotificationVO;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
@Controller
|
||||
public class NotificationController {
|
||||
|
||||
@Resource(name = "notificationService")
|
||||
private NotificationService notificationService;
|
||||
|
||||
/**
|
||||
* 헤더 영역의 읽지 않은 알림 개수 조회 (Ajax)
|
||||
*/
|
||||
@RequestMapping(value = "/ntfc/getUnreadCount.do")
|
||||
@ResponseBody
|
||||
public Map<String, Object> getUnreadCount(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
if (userId == null) {
|
||||
resultMap.put("resultCode", 401);
|
||||
resultMap.put("result", "false");
|
||||
resultMap.put("message", "로그인이 필요한 서비스입니다.");
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
int count = notificationService.selectUnreadNotificationCount(userId);
|
||||
resultMap.put("count", count);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림 목록 조회 (Ajax)
|
||||
*/
|
||||
@RequestMapping(value = "/ntfc/getList.do")
|
||||
@ResponseBody
|
||||
public Map<String, Object> getNtfcList(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
if (userId == null) {
|
||||
resultMap.put("resultCode", 401);
|
||||
resultMap.put("result", "false");
|
||||
resultMap.put("message", "로그인이 필요한 서비스입니다.");
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
NotificationVO vo = new NotificationVO();
|
||||
vo.setRecvUserId(userId);
|
||||
List<NotificationVO> list = notificationService.selectNotificationList(vo);
|
||||
resultMap.put("list", list);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림 클릭 시 확인 처리 및 연결 정보 반환
|
||||
*/
|
||||
@RequestMapping(value = "/ntfc/clickAction.do")
|
||||
@ResponseBody
|
||||
public Map<String, Object> clickAction(HttpServletRequest request, HttpServletResponse response, @RequestParam("ntfcSn") long ntfcSn) throws Exception {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
// 1. 읽음 상태로 업데이트
|
||||
notificationService.updateNotificationConfirm(ntfcSn);
|
||||
|
||||
// 2. 이후 프론트엔드에서 LINK_URL 및 LINK_MTHD_CODE에 따라
|
||||
// GET/POST 방식으로 이동할 수 있도록 정보를 성공 메시지와 함께 전달합니다.
|
||||
resultMap.put("status", "success");
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 화면에 노출된 미확인 알림들을 일괄 확인 처리 (자동 읽음 기능용)
|
||||
*/
|
||||
@RequestMapping(value = "/ntfc/updateBulkRead.do")
|
||||
@ResponseBody
|
||||
public Map<String, Object> updateBulkRead(HttpServletRequest request, @RequestParam("ntfcSns") String ntfcSns) throws Exception {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
|
||||
if (userId == null) {
|
||||
resultMap.put("resultCode", 401);
|
||||
resultMap.put("message", "로그인이 필요한 서비스입니다.");
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
if (ntfcSns != null && !ntfcSns.isEmpty()) {
|
||||
// 콤마로 구분된 SN들을 배열로 분리
|
||||
String[] snArray = ntfcSns.split(",");
|
||||
for (String sn : snArray) {
|
||||
try {
|
||||
long ntfcSn = Long.parseLong(sn.trim());
|
||||
// 개별 알림 확인 처리 로직 재활용
|
||||
notificationService.updateNotificationConfirm(ntfcSn);
|
||||
} catch (NumberFormatException e) {
|
||||
// 유효하지 않은 번호는 스킵
|
||||
continue;
|
||||
}
|
||||
}
|
||||
resultMap.put("resultCode", 200);
|
||||
resultMap.put("status", "success");
|
||||
resultMap.put("message", "알림이 모두 읽음 처리되었습니다.");
|
||||
} else {
|
||||
resultMap.put("resultCode", 400);
|
||||
resultMap.put("message", "처리할 알림 번호가 없습니다.");
|
||||
}
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 신규 알림 등록 (관리자/시스템용)
|
||||
*/
|
||||
@RequestMapping(value = "/ntfc/insertNtfc.do")
|
||||
@ResponseBody
|
||||
public Map<String, Object> insertNtfc(HttpServletRequest request, NotificationVO vo) throws Exception {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
String rgtrId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
|
||||
if (rgtrId == null) {
|
||||
resultMap.put("resultCode", 401);
|
||||
resultMap.put("message", "로그인이 필요한 서비스입니다.");
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
// 수신자ID 및 필수 내용 체크
|
||||
if (vo.getRecvUserId() == null || vo.getNtfcCn() == null) {
|
||||
resultMap.put("resultCode", 400);
|
||||
resultMap.put("message", "필수 파라미터가 누락되었습니다.");
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
vo.setRgtrId(rgtrId); // 등록자를 현재 세션 사용자로 설정
|
||||
notificationService.insertNotification(vo);
|
||||
|
||||
resultMap.put("resultCode", 200);
|
||||
resultMap.put("message", "알림이 정상적으로 등록되었습니다.");
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림 정보 수정
|
||||
*/
|
||||
@RequestMapping(value = "/ntfc/updateNtfc.do")
|
||||
@ResponseBody
|
||||
public Map<String, Object> updateNtfc(HttpServletRequest request, NotificationVO vo) throws Exception {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
|
||||
if (userId == null) {
|
||||
resultMap.put("resultCode", 401);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
if (vo.getNtfcSn() <= 0) {
|
||||
resultMap.put("resultCode", 400);
|
||||
resultMap.put("message", "수정할 알림 번호가 유효하지 않습니다.");
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
notificationService.updateNotification(vo);
|
||||
|
||||
resultMap.put("resultCode", 200);
|
||||
resultMap.put("message", "알림이 수정되었습니다.");
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림 삭제
|
||||
*/
|
||||
@RequestMapping(value = "/ntfc/deleteNtfc.do")
|
||||
@ResponseBody
|
||||
public Map<String, Object> deleteNtfc(HttpServletRequest request, @RequestParam("ntfcSn") long ntfcSn) throws Exception {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
String userId = MyUtil.getStringFromObject(request.getSession().getAttribute("USERID"));
|
||||
|
||||
if (userId == null) {
|
||||
resultMap.put("resultCode", 401);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
notificationService.deleteNotification(ntfcSn);
|
||||
|
||||
resultMap.put("resultCode", 200);
|
||||
resultMap.put("message", "알림이 삭제되었습니다.");
|
||||
return resultMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package geoinfo.ntfc.service;
|
||||
|
||||
import java.util.List;
|
||||
import egovframework.rte.psl.dataaccess.mapper.Mapper;
|
||||
|
||||
/**
|
||||
* 알림 정보 관리를 위한 데이터 접근 인터페이스 (MyBatis Mapper)
|
||||
* TBL_NTFC 테이블과 매핑되어 알림 데이터의 CRUD 및 조회 기능을 수행한다.
|
||||
*/
|
||||
@Mapper("notificationMapper")
|
||||
public interface NotificationMapper {
|
||||
|
||||
/**
|
||||
* 특정 사용자의 알림 목록을 조회한다.
|
||||
* @param vo 알림 정보 검색 조건 (수신사용자ID 및 페이징 범위 firstRow, lastRow 포함)
|
||||
* @return 알림 목록
|
||||
* @throws Exception
|
||||
*/
|
||||
List<NotificationVO> selectNotificationList(NotificationVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 알림 목록의 전체 건수를 조회한다.
|
||||
* 마이페이지 등에서 페이징 번호를 계산하기 위해 활용된다.
|
||||
* @param vo 알림 정보 검색 조건
|
||||
* @return 전체 건수
|
||||
* @throws Exception
|
||||
*/
|
||||
int selectNotificationListCount(NotificationVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 사용자의 확인하지 않은(읽지 않은) 알림 개수를 조회한다.
|
||||
* 헤더의 종모양 아이콘 옆에 표시될 숫자를 가져온다.
|
||||
* @param userId 수신사용자ID
|
||||
* @return 미확인 알림 개수
|
||||
* @throws Exception
|
||||
*/
|
||||
int selectUnreadNotificationCount(String userId) throws Exception;
|
||||
|
||||
/**
|
||||
* 사용자가 알림을 클릭했을 때 확인 여부(CONF_YN)를 'Y'로 업데이트한다.
|
||||
* @param ntfcSn 알림순번 (PK)
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateNotificationConfirm(long ntfcSn) throws Exception;
|
||||
|
||||
/**
|
||||
* 신규 알림 정보를 등록한다.
|
||||
* 발주기관의 현장 입력 이벤트 발생 시 시스템에서 호출하거나 관리자가 등록할 때 사용한다.
|
||||
* @param vo 등록할 알림 정보
|
||||
* @throws Exception
|
||||
*/
|
||||
void insertNotification(NotificationVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 기존 알림의 내용이나 연결 URL 등을 수정한다.
|
||||
* 주로 관리자 기능에서 사용된다.
|
||||
* @param vo 수정할 알림 정보
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateNotification(NotificationVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 특정 알림 정보를 데이터베이스에서 삭제한다.
|
||||
* @param ntfcSn 삭제할 알림순번
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteNotification(long ntfcSn) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package geoinfo.ntfc.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 알림 정보 관리를 위한 서비스 인터페이스
|
||||
* 사용자의 알림 조회, 상태 변경 및 관리자용 CRUD 기능을 정의한다.
|
||||
*/
|
||||
public interface NotificationService {
|
||||
|
||||
/**
|
||||
* 특정 사용자의 알림 목록을 조회한다. (페이징 처리 포함)
|
||||
* @param vo 알림 정보 검색 조건 (recvUserId, firstRow, lastRow 등)
|
||||
* @return 알림 목록
|
||||
* @throws Exception
|
||||
*/
|
||||
List<NotificationVO> selectNotificationList(NotificationVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 알림 목록의 전체 건수를 조회한다. (페이징 계산용)
|
||||
* @param vo 알림 정보 검색 조건
|
||||
* @return 전체 건수
|
||||
* @throws Exception
|
||||
*/
|
||||
int selectNotificationListCount(NotificationVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 사용자의 확인하지 않은(읽지 않은) 알림 개수를 조회한다. (헤더 종모양 아이콘용)
|
||||
* @param userId 수신사용자ID
|
||||
* @return 미확인 알림 개수
|
||||
* @throws Exception
|
||||
*/
|
||||
int selectUnreadNotificationCount(String userId) throws Exception;
|
||||
|
||||
/**
|
||||
* 알림을 확인(읽음) 상태로 업데이트한다.
|
||||
* @param ntfcSn 알림순번
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateNotificationConfirm(long ntfcSn) throws Exception;
|
||||
|
||||
/**
|
||||
* 신규 알림을 등록한다. (건설현장 입력 시 시스템 자동 호출 또는 관리자 등록)
|
||||
* @param vo 등록할 알림 정보
|
||||
* @throws Exception
|
||||
*/
|
||||
void insertNotification(NotificationVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 기존 알림 내용을 수정한다. (관리자용)
|
||||
* @param vo 수정할 알림 정보
|
||||
* @throws Exception
|
||||
*/
|
||||
void updateNotification(NotificationVO vo) throws Exception;
|
||||
|
||||
/**
|
||||
* 특정 알림을 삭제한다. (관리자용)
|
||||
* @param ntfcSn 삭제할 알림순번
|
||||
* @throws Exception
|
||||
*/
|
||||
void deleteNotification(long ntfcSn) throws Exception;
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package geoinfo.ntfc.service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 알림 정보 VO 클래스
|
||||
*/
|
||||
public class NotificationVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private long ntfcSn; // 알림순번
|
||||
private String recvUserId; // 수신사용자ID
|
||||
private String ntfcSeCode; // 알림구분코드
|
||||
private String ntfcCn; // 알림내용
|
||||
private String linkUrl; // 연결URL
|
||||
private String linkMthdCode; // 연결방식코드 (GET/POST)
|
||||
private String linkParamCn; // 연결파라미터내용 (JSON 형식 등)
|
||||
private String confYn; // 확인여부
|
||||
private String confDt; // 확인일시
|
||||
private String rgtrId; // 등록자ID
|
||||
private String regDt; // 등록일시
|
||||
|
||||
// Getter 및 Setter
|
||||
public long getNtfcSn() { return ntfcSn; }
|
||||
public void setNtfcSn(long ntfcSn) { this.ntfcSn = ntfcSn; }
|
||||
public String getRecvUserId() { return recvUserId; }
|
||||
public void setRecvUserId(String recvUserId) { this.recvUserId = recvUserId; }
|
||||
public String getNtfcSeCode() { return ntfcSeCode; }
|
||||
public void setNtfcSeCode(String ntfcSeCode) { this.ntfcSeCode = ntfcSeCode; }
|
||||
public String getNtfcCn() { return ntfcCn; }
|
||||
public void setNtfcCn(String ntfcCn) { this.ntfcCn = ntfcCn; }
|
||||
public String getLinkUrl() { return linkUrl; }
|
||||
public void setLinkUrl(String linkUrl) { this.linkUrl = linkUrl; }
|
||||
public String getLinkMthdCode() { return linkMthdCode; }
|
||||
public void setLinkMthdCode(String linkMthdCode) { this.linkMthdCode = linkMthdCode; }
|
||||
public String getLinkParamCn() { return linkParamCn; }
|
||||
public void setLinkParamCn(String linkParamCn) { this.linkParamCn = linkParamCn; }
|
||||
public String getConfYn() { return confYn; }
|
||||
public void setConfYn(String confYn) { this.confYn = confYn; }
|
||||
public String getConfDt() { return confDt; }
|
||||
public void setConfDt(String confDt) { this.confDt = confDt; }
|
||||
public String getRgtrId() { return rgtrId; }
|
||||
public void setRgtrId(String rgtrId) { this.rgtrId = rgtrId; }
|
||||
public String getRegDt() { return regDt; }
|
||||
public void setRegDt(String regDt) { this.regDt = regDt; }
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package geoinfo.ntfc.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import geoinfo.ntfc.service.NotificationMapper;
|
||||
import geoinfo.ntfc.service.NotificationService;
|
||||
import geoinfo.ntfc.service.NotificationVO;
|
||||
|
||||
/**
|
||||
* 알림 정보 관리를 위한 서비스 구현 클래스
|
||||
* 비즈니스 로직을 수행하고 Mapper를 통해 DB에 접근한다.
|
||||
*/
|
||||
@Service("notificationService")
|
||||
public class NotificationServiceImpl implements NotificationService {
|
||||
|
||||
/** 알림 데이터 접근을 위한 Mapper 주입 */
|
||||
@Resource(name="notificationMapper")
|
||||
private NotificationMapper notificationMapper;
|
||||
|
||||
/**
|
||||
* 알림 목록 조회
|
||||
*/
|
||||
@Override
|
||||
public List<NotificationVO> selectNotificationList(NotificationVO vo) throws Exception {
|
||||
return notificationMapper.selectNotificationList(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림 목록 전체 건수 조회 (페이징용)
|
||||
*/
|
||||
@Override
|
||||
public int selectNotificationListCount(NotificationVO vo) throws Exception {
|
||||
return notificationMapper.selectNotificationListCount(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 읽지 않은 알림 개수 조회
|
||||
*/
|
||||
@Override
|
||||
public int selectUnreadNotificationCount(String userId) throws Exception {
|
||||
return notificationMapper.selectUnreadNotificationCount(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림 확인(읽음) 처리
|
||||
* 사용자가 알림을 클릭했을 때 호출되어 확인 여부(CONF_YN)와 확인일시를 업데이트한다.
|
||||
*/
|
||||
@Override
|
||||
public void updateNotificationConfirm(long ntfcSn) throws Exception {
|
||||
notificationMapper.updateNotificationConfirm(ntfcSn);
|
||||
}
|
||||
|
||||
/**
|
||||
* 신규 알림 등록
|
||||
* 발주기관의 프로젝트 등록 등 이벤트 발생 시 호출된다.
|
||||
*/
|
||||
@Override
|
||||
public void insertNotification(NotificationVO vo) throws Exception {
|
||||
notificationMapper.insertNotification(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림 정보 수정
|
||||
*/
|
||||
@Override
|
||||
public void updateNotification(NotificationVO vo) throws Exception {
|
||||
notificationMapper.updateNotification(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 알림 삭제
|
||||
*/
|
||||
@Override
|
||||
public void deleteNotification(long ntfcSn) throws Exception {
|
||||
notificationMapper.deleteNotification(ntfcSn);
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ import java.io.IOException;
|
|||
import java.io.StringReader;
|
||||
import java.net.MalformedURLException;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
|
@ -49,6 +50,8 @@ import geoinfo.regi.basicInfo.service.BasicService;
|
|||
import geoinfo.regi.common.service.CommonService;
|
||||
import geoinfo.regi.selectClassInfo.service.SelectClassService;
|
||||
import geoinfo.regi.status.RegiController;
|
||||
import geoinfo.util.MyUtil;
|
||||
import geoinfo.util.StringUtil;
|
||||
import ictway.comm.util.strUtil;
|
||||
import ictway.comm.web.WebUtil;
|
||||
|
||||
|
|
@ -514,13 +517,27 @@ public class BasicController {
|
|||
NodeList nSLICKENSIDE_AVG = data.getElementsByTagName("slickensideAvg");
|
||||
NodeList nSLICKENSIDE_ROUGH = data.getElementsByTagName("slickensideRough");
|
||||
|
||||
final String defaultNA = "-999";
|
||||
String slickensideMax = wUtil.isNullNode(nSLICKENSIDE_MAX);
|
||||
if( slickensideMax.equals("-") == true ) {
|
||||
slickensideMax = defaultNA;
|
||||
}
|
||||
String slickensideMin = wUtil.isNullNode(nSLICKENSIDE_MIN);
|
||||
if( slickensideMin.equals("-") == true ) {
|
||||
slickensideMin = defaultNA;
|
||||
}
|
||||
String slickensideAvg = wUtil.isNullNode(nSLICKENSIDE_AVG);
|
||||
if( slickensideAvg.equals("-") == true ) {
|
||||
slickensideAvg = defaultNA;
|
||||
}
|
||||
|
||||
params.put("slickensideDepthFrom", wUtil.isNullNode(nSLICKENSIDE_DEPTH_FROM));
|
||||
params.put("slickensideDepthTo", wUtil.isNullNode(nSLICKENSIDE_DEPTH_TO));
|
||||
params.put("slickensideDirection", wUtil.isNullNode(nSLICKENSIDE_DIRECTION));
|
||||
params.put("slickensideAngle", wUtil.isNullNode(nSLICKENSIDE_ANGLE));
|
||||
params.put("slickensideMax", wUtil.isNullNode(nSLICKENSIDE_MAX));
|
||||
params.put("slickensideMin", wUtil.isNullNode(nSLICKENSIDE_MIN));
|
||||
params.put("slickensideAvg", wUtil.isNullNode(nSLICKENSIDE_AVG));
|
||||
params.put("slickensideMax", slickensideMax);
|
||||
params.put("slickensideMin", slickensideMin);
|
||||
params.put("slickensideAvg", slickensideAvg);
|
||||
params.put("slickensideRough", wUtil.isNullNode(nSLICKENSIDE_ROUGH));
|
||||
params.put("userId", request.getSession().getAttribute("USERID"));
|
||||
|
||||
|
|
@ -854,17 +871,17 @@ public class BasicController {
|
|||
params.put("depthTo", wUtil.isNullNode(nDEPTH_TO));
|
||||
params.put("rockType", wUtil.isNullNode(nROCK_TYPE));
|
||||
params.put("rqd", wUtil.isNullNode(nRQD));
|
||||
params.put("rqdDesc", wUtil.isNullNode(nRQD_DESC));
|
||||
params.put("rqdDesc", StringUtil.removeTabStr(wUtil.isNullNode(nRQD_DESC)));// 비고 1
|
||||
params.put("jn", wUtil.isNullNode(nJN));
|
||||
params.put("jnDesc", wUtil.isNullNode(nJN_DESC));
|
||||
params.put("jnDesc", StringUtil.removeTabStr(wUtil.isNullNode(nJN_DESC))); // 비고2
|
||||
params.put("jr", wUtil.isNullNode(nJR));
|
||||
params.put("jrDesc", wUtil.isNullNode(nJR_DESC));
|
||||
params.put("jrDesc", StringUtil.removeTabStr(wUtil.isNullNode(nJR_DESC))); // 비고 3
|
||||
params.put("ja", wUtil.isNullNode(nJA));
|
||||
params.put("jaDesc", wUtil.isNullNode(nJA_DESC));
|
||||
params.put("jaDesc", StringUtil.removeTabStr(wUtil.isNullNode(nJA_DESC))); // 비고 4
|
||||
params.put("jw", wUtil.isNullNode(nJW));
|
||||
params.put("jwDesc", wUtil.isNullNode(nJW_DESC));
|
||||
params.put("jwDesc", StringUtil.removeTabStr(wUtil.isNullNode(nJW_DESC))); // 비고 5
|
||||
params.put("srf", wUtil.isNullNode(nSRF));
|
||||
params.put("srfDesc", wUtil.isNullNode(nSRF_DESC));
|
||||
params.put("srfDesc", StringUtil.removeTabStr(wUtil.isNullNode(nSRF_DESC)));// 비고 6
|
||||
params.put("userId", request.getSession().getAttribute("USERID"));
|
||||
|
||||
basicService.insertTempQ(params);
|
||||
|
|
@ -1027,6 +1044,10 @@ public class BasicController {
|
|||
List<EgovMap> commCode = basicService.selectWebCommCode(params);
|
||||
model.put("commCode", commCode);
|
||||
|
||||
params.put("commCode", "CM017");
|
||||
List<EgovMap> commCode2 = basicService.selectWebCommCode(params);
|
||||
model.put("commCode2", commCode2);
|
||||
|
||||
params.put("projectCode", oPROJECT_CODE);
|
||||
params.put("holeCode", oHOLE_CODE);
|
||||
params.put("viewTabArray", oViewTabArray);
|
||||
|
|
@ -1034,8 +1055,30 @@ public class BasicController {
|
|||
params.put("reportType", oREPORT_TYPE);
|
||||
|
||||
List<EgovMap> items = basicService.selectTempFieldPressuremeter(params);
|
||||
|
||||
Iterator<EgovMap> iteratorItems = items.iterator();
|
||||
|
||||
List<EgovMap> newItems = new ArrayList<>();
|
||||
// Iterator를 사용하여 리스트의 요소들을 순회할 수 있습니다.
|
||||
while (iteratorItems.hasNext()) {
|
||||
EgovMap item = iteratorItems.next();
|
||||
String key = "fieldpresInspectedBy";
|
||||
Object itemValue = item.get(key);
|
||||
if( itemValue != null ) {
|
||||
item.put(key, MyUtil.getStringFromObject( itemValue ).replaceAll("\t", "") );
|
||||
}
|
||||
|
||||
key = "fieldpresCheckedBy";
|
||||
itemValue = item.get(key);
|
||||
if( itemValue != null ) {
|
||||
item.put(key, MyUtil.getStringFromObject( itemValue ).replaceAll("\t", "") );
|
||||
}
|
||||
|
||||
newItems.add(item);
|
||||
}
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("items", items);
|
||||
json.put("items", newItems);
|
||||
|
||||
model.put("params", params);
|
||||
model.put("items", items);
|
||||
|
|
@ -2115,9 +2158,9 @@ public class BasicController {
|
|||
params.put("fieldperCasingDia", wUtil.isNullNode(nFIELDPER_CASING_DIA));
|
||||
params.put("fieldperCasingHeight", wUtil.isNullNode(nFIELDPER_CASING_HEIGHT));
|
||||
params.put("fieldperAvgPermeability", wUtil.isNullNode(nFIELDPER_AVG_PERMEABILITY));
|
||||
params.put("fieldperInspectedBy", wUtil.isNullNode(nFIELDPER_INSPECTED_BY));
|
||||
params.put("fieldperCheckedBy", wUtil.isNullNode(nFIELDPER_CHECKED_BY));
|
||||
params.put("fieldperRemark", wUtil.isNullNode(nFIELDPER_REMARK));
|
||||
params.put("fieldperInspectedBy", StringUtil.removeTabStr(wUtil.isNullNode(nFIELDPER_INSPECTED_BY)));
|
||||
params.put("fieldperCheckedBy", StringUtil.removeTabStr(wUtil.isNullNode(nFIELDPER_CHECKED_BY)));
|
||||
params.put("fieldperRemark", StringUtil.removeTabStr(wUtil.isNullNode(nFIELDPER_REMARK)));
|
||||
|
||||
// ----------------------file처리---------------------
|
||||
// 현장수압 graph
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -77,14 +77,22 @@ public interface CommonMapper {
|
|||
|
||||
EgovMap getRockJointshear(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getRockJointshearList(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap getRockPointload(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getRockPointloadList(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap getRockTriaxial(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getRockTriaxialList(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap getRockUniaxial(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getRockUniaxialList(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getRockUniaxialListRuni(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap getCbrCompac(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getClassification(Map<String, Object> params) throws Exception;
|
||||
|
|
|
|||
|
|
@ -74,14 +74,22 @@ public interface CommonService {
|
|||
|
||||
EgovMap getRockJointshear(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap>getRockJointshearList(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap getRockPointload(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap>getRockPointloadList(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap getRockTriaxial(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getRockTriaxialList(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap getRockUniaxial(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getRockUniaxialList(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getRockUniaxialListRuni(Map<String, Object> params) throws Exception;
|
||||
|
||||
EgovMap getCbrCompac(Map<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getClassification(Map<String, Object> params) throws Exception;
|
||||
|
|
|
|||
|
|
@ -182,16 +182,31 @@ public class CommonServiceImpl implements CommonService {
|
|||
return commonMapper.getRockJointshear(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EgovMap> getRockJointshearList(Map<String, Object> params) throws Exception {
|
||||
return commonMapper.getRockJointshearList(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap getRockPointload(Map<String, Object> params) throws Exception {
|
||||
return commonMapper.getRockPointload(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EgovMap> getRockPointloadList(Map<String, Object> params) throws Exception {
|
||||
return commonMapper.getRockPointloadList(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap getRockTriaxial(Map<String, Object> params) throws Exception {
|
||||
return commonMapper.getRockTriaxial(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EgovMap> getRockTriaxialList(Map<String, Object> params) throws Exception {
|
||||
return commonMapper.getRockTriaxialList(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap getRockUniaxial(Map<String, Object> params) throws Exception {
|
||||
return commonMapper.getRockUniaxial(params);
|
||||
|
|
@ -202,6 +217,11 @@ public class CommonServiceImpl implements CommonService {
|
|||
return commonMapper.getRockUniaxialList(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EgovMap> getRockUniaxialListRuni(Map<String, Object> params) throws Exception {
|
||||
return commonMapper.getRockUniaxialListRuni(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EgovMap getCbrCompac(Map<String, Object> params) throws Exception {
|
||||
return commonMapper.getCbrCompac(params);
|
||||
|
|
@ -249,7 +269,8 @@ public class CommonServiceImpl implements CommonService {
|
|||
|
||||
@Override
|
||||
public String getInfoUnit(Map<String, Object> params) throws Exception {
|
||||
if(commonMapper.getInfoUnit(params) == null) {
|
||||
EgovMap res = commonMapper.getInfoUnit(params);
|
||||
if( res == null) {
|
||||
return (String)params.get("INI_UNIT");
|
||||
}else {
|
||||
return (String)((commonMapper.getInfoUnit(params)).get("referenceDese"));
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
package geoinfo.regi.complete;
|
||||
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.com.PaginationInfo;
|
||||
import geoinfo.regi.complete.service.CompleteService;
|
||||
import geoinfo.util.MyUtil;
|
||||
import ictway.comm.util.strUtil;
|
||||
import ictway.comm.web.WebUtil;
|
||||
import ictway.session.UserInfoYu;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -15,12 +18,15 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jfree.util.Log;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
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.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.util.UrlPathHelper;
|
||||
|
||||
@Controller
|
||||
|
|
@ -55,6 +61,8 @@ public class CompleteController {
|
|||
model.put("topUserId", topUserId);
|
||||
model.put("topTabId", topTabId);
|
||||
model.put("userName", userName);
|
||||
model.put("cls", topCls);
|
||||
model.put("companyName", request.getSession().getAttribute("COMPANYNAME"));
|
||||
|
||||
return "web/include/includeTopInput";
|
||||
}
|
||||
|
|
@ -70,66 +78,37 @@ public class CompleteController {
|
|||
// 지반정보 입력시스템 - 검수등록완료 목록
|
||||
@RequestMapping(value = "/manage/complete")
|
||||
public String complete(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
WebUtil wUtil = new WebUtil();
|
||||
wUtil.topTabId = "manageComplete"; // 검수일때 tab 활성화 시켜주기 위해
|
||||
// 관리자 아닐 경우 back();
|
||||
if (!request.getSession().getAttribute("CLS").equals("9")) {
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN: You are not administrator!!!!" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"params.toString()" + params.toString() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
strUtil sUtil = new strUtil();
|
||||
WebUtil wUtil = new WebUtil();
|
||||
wUtil.topTabId = "manageComplete"; // 검수일때 tab 활성화 시켜주기 위해
|
||||
String LoginUserId = String.valueOf(request.getSession().getAttribute("USERID"));
|
||||
|
||||
// request
|
||||
//240108 임효주 프로젝트 목록에 검색조건 추가
|
||||
String srchStartDate = sUtil.checkNull((String)params.get("startDate"));
|
||||
String srchEndDate = sUtil.checkNull((String)params.get("endDate"));
|
||||
String srchReportType = sUtil.checkNull((String)params.get("searchReportType"));
|
||||
String searchProjectName = sUtil.checkNull((String)params.get("searchProjectName"));
|
||||
String searchProjectCode = sUtil.checkNull((String)params.get("searchProjectCode"));
|
||||
String searchHistSeq = sUtil.checkNull((String)params.get("searchHistSeq"));
|
||||
String searchUserName = sUtil.checkNull((String)params.get("searchUserName"));
|
||||
String searchCreateName = sUtil.checkNull((String)params.get("searchCreateName"));
|
||||
|
||||
ArrayList arrayData = new ArrayList();
|
||||
ArrayList arrayColumn = new ArrayList();
|
||||
ArrayList arrayCommon = new ArrayList();
|
||||
HashMap mapCommon = new HashMap();
|
||||
|
||||
int count = 0;
|
||||
// data조회
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"params.toString()" + params.toString() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
try {
|
||||
// **************************************공통코드**************************************//
|
||||
String commCode = "CM016";
|
||||
String commCode02 = "'CM016'";
|
||||
params.put("commCode", commCode);
|
||||
|
||||
// common Array 로 받기
|
||||
arrayCommon = completeService.selectWebCommCode(params);
|
||||
|
||||
// SelectBox형태로 map으로 받기
|
||||
mapCommon = wUtil.getCommCodeSel(commCode, arrayCommon, "");
|
||||
|
||||
params.put("srchReportType", srchReportType);
|
||||
params.put("searchProjectName", searchProjectName);
|
||||
params.put("searchProjectCode", searchProjectCode);
|
||||
params.put("searchHistSeq", searchHistSeq);
|
||||
params.put("searchUserName", searchUserName);
|
||||
params.put("searchCreateName", searchCreateName);
|
||||
/*params.put("LoginUserId", LoginUserId);*/
|
||||
|
||||
// data정보
|
||||
arrayData = completeService.selectCompleteItems(params);
|
||||
String LoginUserId = String.valueOf(request.getSession().getAttribute("USERID"));
|
||||
params.put("LoginUserId", LoginUserId);
|
||||
// column정보
|
||||
// arrayColumn = wUtil.getColArrayList(rsmd, count);
|
||||
|
||||
model.put("arrayCommon", arrayCommon);
|
||||
model.put("result", arrayData);
|
||||
model.put("params", params);
|
||||
|
||||
} catch (SQLException e) {
|
||||
Log.debug("error", e);
|
||||
model.put("result", new ArrayList<Object>());
|
||||
//completeService.getCompleteList(request, response, null, params, model);
|
||||
} catch (NumberFormatException e) {
|
||||
Log.debug("error", e);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -138,4 +117,56 @@ public class CompleteController {
|
|||
|
||||
return "web/manage/complete";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/manage/complete/list.do", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public JSONObject getCompleteList(
|
||||
HttpServletRequest request,
|
||||
@RequestParam HashMap<String, Object> params,
|
||||
HttpServletResponse response) {
|
||||
|
||||
|
||||
JSONObject jsonResponse = new JSONObject();
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"params.toString()" + params.toString() + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
|
||||
try {
|
||||
completeService.getCompleteList(request, response, jsonResponse, params, null);
|
||||
jsonResponse.put("resultCode", 100);
|
||||
jsonResponse.put("result", "true");
|
||||
jsonResponse.put("message", "조회가 완료되었습니다.");
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
jsonResponse.put("resultCode", -1);
|
||||
jsonResponse.put("result", "false");
|
||||
jsonResponse.put("message", e.getMessage());
|
||||
}
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jsonResponse.toJSONString():[" + jsonResponse.toJSONString() + "]\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
return jsonResponse;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,4 +14,6 @@ public interface CompleteMapper {
|
|||
public ArrayList selectWebCommCode(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public ArrayList selectCompleteItems(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public long selectCompleteItemsCnt(HashMap<String, Object> params) throws Exception;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,12 @@ package geoinfo.regi.complete.service;
|
|||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.json.simple.JSONObject;
|
||||
import org.springframework.ui.ModelMap;
|
||||
|
||||
|
||||
public interface CompleteService {
|
||||
|
||||
|
|
@ -10,5 +16,7 @@ public interface CompleteService {
|
|||
|
||||
ArrayList selectCompleteItems(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
long selectCompleteItemsCnt(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public void getCompleteList(HttpServletRequest request, HttpServletResponse response, JSONObject jsonResponse, HashMap<String, Object> params, ModelMap model) throws Exception;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,30 @@
|
|||
package geoinfo.regi.complete.service.impl;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.com.PaginationInfo;
|
||||
import geoinfo.regi.complete.service.CompleteMapper;
|
||||
import geoinfo.regi.complete.service.CompleteService;
|
||||
import geoinfo.regi.status.service.RegiPageMapper;
|
||||
import geoinfo.regi.status.service.RegiPageService;
|
||||
import geoinfo.util.MyUtil;
|
||||
import ictway.comm.util.strUtil;
|
||||
import ictway.comm.web.WebUtil;
|
||||
import oracle.sql.TIMESTAMP;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.jfree.util.Log;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.ui.ModelMap;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
|
@ -36,4 +49,133 @@ public class CompleteServiceImpl implements CompleteService {
|
|||
return completeMapper.selectCompleteItems(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long selectCompleteItemsCnt(HashMap<String, Object> params) throws Exception {
|
||||
return completeMapper.selectCompleteItemsCnt(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCompleteList(HttpServletRequest request, HttpServletResponse response, JSONObject jsonResponse, HashMap<String, Object> params, ModelMap model) throws Exception {
|
||||
|
||||
int nCls = MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
||||
|
||||
// 관리자 아닐 경우 back();
|
||||
if (!request.getSession().getAttribute("CLS").equals("9")) {
|
||||
throw new Exception( "로그인이 필요한 서비스 입니다." );
|
||||
}
|
||||
|
||||
strUtil sUtil = new strUtil();
|
||||
WebUtil wUtil = new WebUtil();
|
||||
wUtil.topTabId = "manageComplete"; // 검수일때 tab 활성화 시켜주기 위해
|
||||
String LoginUserId = String.valueOf(request.getSession().getAttribute("USERID"));
|
||||
|
||||
// request
|
||||
//240108 임효주 프로젝트 목록에 검색조건 추가
|
||||
String srchStartDate = sUtil.checkNull((String)params.get("startDate"));
|
||||
String srchEndDate = sUtil.checkNull((String)params.get("endDate"));
|
||||
String srchReportType = sUtil.checkNull((String)params.get("searchReportType"));
|
||||
String searchProjectName = sUtil.checkNull((String)params.get("searchProjectName"));
|
||||
String searchProjectCode = sUtil.checkNull((String)params.get("searchProjectCode"));
|
||||
String searchHistSeq = sUtil.checkNull((String)params.get("searchHistSeq"));
|
||||
String searchUserName = sUtil.checkNull((String)params.get("searchUserName"));
|
||||
String searchCreateName = sUtil.checkNull((String)params.get("searchCreateName"));
|
||||
|
||||
ArrayList arrayData = new ArrayList();
|
||||
ArrayList arrayColumn = new ArrayList();
|
||||
ArrayList arrayCommon = new ArrayList();
|
||||
HashMap mapCommon = new HashMap();
|
||||
|
||||
int count = 0;
|
||||
|
||||
// **************************************공통코드**************************************//
|
||||
String commCode = "CM016";
|
||||
String commCode02 = "'CM016'";
|
||||
params.put("commCode", commCode);
|
||||
|
||||
// common Array 로 받기
|
||||
arrayCommon = selectWebCommCode(params);
|
||||
|
||||
// SelectBox형태로 map으로 받기
|
||||
mapCommon = wUtil.getCommCodeSel(commCode, arrayCommon, "");
|
||||
|
||||
params.put("srchReportType", srchReportType);
|
||||
params.put("searchProjectName", searchProjectName);
|
||||
params.put("searchProjectCode", searchProjectCode);
|
||||
params.put("searchHistSeq", searchHistSeq);
|
||||
params.put("searchUserName", searchUserName);
|
||||
params.put("searchCreateName", searchCreateName);
|
||||
/*params.put("LoginUserId", LoginUserId);*/
|
||||
params.put("cls", nCls);
|
||||
|
||||
// 정렬 파라미터 가공
|
||||
if (params.get("sort[0][field]") != null) {
|
||||
String sortField = (String) params.get("sort[0][field]");
|
||||
String sortDir = (String) params.get("sort[0][dir]");
|
||||
|
||||
// SQL Injection 방지를 위해 허용된 컬럼명인지 확인하는 로직 추가 필요
|
||||
// 예: if ("projectName".equals(sortField) || "userName".equals(sortField) ...)
|
||||
|
||||
// MyBatis에서 사용할 단순한 이름으로 파라미터를 추가합니다.
|
||||
params.put("sortField", sortField);
|
||||
params.put("sortDir", sortDir);
|
||||
}
|
||||
|
||||
int total = MyUtil.getIntegerFromObject(selectCompleteItemsCnt(params)).intValue();
|
||||
Long pageSize = MyUtil.getLongFromObject( params.get("pageSize") );
|
||||
if( pageSize == null ) {
|
||||
// pageSize = 10l;
|
||||
pageSize = (long) total; // 25.11.05(YJI) Kendo grid pager 'All' 처리
|
||||
}
|
||||
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
paginationInfo.setRecordCountPerPage(pageSize.intValue());
|
||||
paginationInfo.setPageSize(pageSize.intValue());
|
||||
paginationInfo.setTotalRecordCount( MyUtil.getIntegerFromObject(selectCompleteItemsCnt(params)).intValue() );
|
||||
|
||||
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")));
|
||||
}
|
||||
|
||||
params.put("firstIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
|
||||
params.put("cls", nCls);
|
||||
// data정보
|
||||
arrayData = selectCompleteItems(params);
|
||||
params.put("LoginUserId", LoginUserId);
|
||||
// column정보
|
||||
// arrayColumn = wUtil.getColArrayList(rsmd, count);
|
||||
|
||||
if( model != null ) {
|
||||
model.put("paginationInfo", paginationInfo);
|
||||
model.put("arrayCommon", arrayCommon);
|
||||
//model.put("result", arrayData);
|
||||
model.put("params", params);
|
||||
}
|
||||
|
||||
if( jsonResponse != null ) {
|
||||
jsonResponse.put("paginationInfo", paginationInfo);
|
||||
jsonResponse.put("arrayCommon", arrayCommon);
|
||||
jsonResponse.put("data", arrayData);
|
||||
jsonResponse.put("params", params);
|
||||
/*
|
||||
jsonResponse.put("take", 1);
|
||||
jsonResponse.put("skip", 2);
|
||||
jsonResponse.put("page", 3);
|
||||
jsonResponse.put("pageSize", 4);
|
||||
*/
|
||||
jsonResponse.put("filter", null);
|
||||
jsonResponse.put("total", paginationInfo.getTotalRecordCount());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -400,88 +400,88 @@ public class HeaderController {
|
|||
@RequestMapping(value = "/web/map/mapTop.do")
|
||||
public String mapTop(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
//request
|
||||
String oPROJECT_CODE = StringUtils.defaultString((String) String.valueOf(params.get("PROJECT_CODE"))); //프로젝트코드
|
||||
String GUBUN = StringUtils.defaultString((String) String.valueOf(params.get("GUBUN")));
|
||||
|
||||
//gubun 직접입력일때
|
||||
String COORDINATE_2 = StringUtils.defaultString((String) String.valueOf(params.get("COORDINATE_2")));
|
||||
String HOLE_COORDINATE = StringUtils.defaultString((String) String.valueOf(params.get("HOLE_COORDINATE")));
|
||||
String oHOLE_CODE = StringUtils.defaultString((String) String.valueOf(params.get("HOLE_CODE")));
|
||||
String X = StringUtils.defaultString((String) String.valueOf(params.get("X")));
|
||||
String Y = StringUtils.defaultString((String) String.valueOf(params.get("Y")));
|
||||
|
||||
WebUtil wUtil = new WebUtil();
|
||||
EgovMap map = new EgovMap();
|
||||
ArrayList array = new ArrayList();
|
||||
int count = 0;
|
||||
|
||||
String fX = "";
|
||||
String fY = "";
|
||||
//좌표 가져오기
|
||||
|
||||
//내용조회
|
||||
if("".equals(oPROJECT_CODE) == false){
|
||||
String sQry = "";
|
||||
|
||||
//시추공정보 가져오기
|
||||
if("POP".equals(GUBUN) == true){
|
||||
params.put("PROJECT_CODE", oPROJECT_CODE);
|
||||
array = headerService.getHoleInfoTrue(params);
|
||||
|
||||
|
||||
}else{
|
||||
params.put("PROJECT_CODE", oPROJECT_CODE);
|
||||
params.put("HOLE_CODE", oHOLE_CODE);
|
||||
array = headerService.getHoleInfoElse(params);
|
||||
//request
|
||||
String oPROJECT_CODE = StringUtils.defaultString((String) String.valueOf(params.get("PROJECT_CODE"))); //프로젝트코드
|
||||
String GUBUN = StringUtils.defaultString((String) String.valueOf(params.get("GUBUN")));
|
||||
|
||||
//gubun 직접입력일때
|
||||
String COORDINATE_2 = StringUtils.defaultString((String) String.valueOf(params.get("COORDINATE_2")));
|
||||
String HOLE_COORDINATE = StringUtils.defaultString((String) String.valueOf(params.get("HOLE_COORDINATE")));
|
||||
String oHOLE_CODE = StringUtils.defaultString((String) String.valueOf(params.get("HOLE_CODE")));
|
||||
String X = StringUtils.defaultString((String) String.valueOf(params.get("X")));
|
||||
String Y = StringUtils.defaultString((String) String.valueOf(params.get("Y")));
|
||||
|
||||
WebUtil wUtil = new WebUtil();
|
||||
EgovMap map = new EgovMap();
|
||||
ArrayList array = new ArrayList();
|
||||
int count = 0;
|
||||
|
||||
String fX = "";
|
||||
String fY = "";
|
||||
//좌표 가져오기
|
||||
|
||||
//내용조회
|
||||
if("".equals(oPROJECT_CODE) == false){
|
||||
String sQry = "";
|
||||
|
||||
//시추공정보 가져오기
|
||||
if("POP".equals(GUBUN) == true){
|
||||
params.put("PROJECT_CODE", oPROJECT_CODE);
|
||||
array = headerService.getHoleInfoTrue(params);
|
||||
|
||||
|
||||
}else{
|
||||
params.put("PROJECT_CODE", oPROJECT_CODE);
|
||||
params.put("HOLE_CODE", oHOLE_CODE);
|
||||
array = headerService.getHoleInfoElse(params);
|
||||
}
|
||||
|
||||
// Array 로 받기
|
||||
|
||||
}
|
||||
|
||||
// Array 로 받기
|
||||
|
||||
}
|
||||
|
||||
if("POP".equals(GUBUN) == false && "".equals(oHOLE_CODE) == false){
|
||||
|
||||
Double inX = 0.0 ;
|
||||
Double inY = 0.0 ;
|
||||
|
||||
//degree일때
|
||||
if("Degree".equals(COORDINATE_2) == true){
|
||||
|
||||
//경위도 일때 도분초 계산
|
||||
String[] arrayX = X.split("-");
|
||||
String[] arrayY = Y.split("-");
|
||||
|
||||
inX = wUtil.getDegreeLatLongMS(Double.parseDouble(arrayX[0]), Double.parseDouble(arrayX[1]), Double.parseDouble(arrayX[2]));
|
||||
inY = wUtil.getDegreeLatLongMS(Double.parseDouble(arrayY[0]), Double.parseDouble(arrayY[1]), Double.parseDouble(arrayY[2]));
|
||||
fX = inX+"";
|
||||
fY = inY+"";
|
||||
|
||||
}else{
|
||||
|
||||
//경위도로 변환
|
||||
HashMap map01 = wUtil.setCoordinateConvertXY(Double.parseDouble(X), Double.parseDouble(Y) , HOLE_COORDINATE , "4326");
|
||||
String tempX = wUtil.isNullOb(map01.get("X"),"0");
|
||||
String tempY = wUtil.isNullOb(map01.get("Y"),"0");
|
||||
inX = Double.parseDouble(tempX);
|
||||
inY = Double.parseDouble(tempY);
|
||||
fX = inX+"";
|
||||
fY = inY+"";
|
||||
|
||||
if("POP".equals(GUBUN) == false && "".equals(oHOLE_CODE) == false){
|
||||
|
||||
Double inX = 0.0 ;
|
||||
Double inY = 0.0 ;
|
||||
|
||||
//degree일때
|
||||
if("Degree".equals(COORDINATE_2) == true){
|
||||
|
||||
//경위도 일때 도분초 계산
|
||||
String[] arrayX = X.split("-");
|
||||
String[] arrayY = Y.split("-");
|
||||
|
||||
inX = wUtil.getDegreeLatLongMS(Double.parseDouble(arrayX[0]), Double.parseDouble(arrayX[1]), Double.parseDouble(arrayX[2]));
|
||||
inY = wUtil.getDegreeLatLongMS(Double.parseDouble(arrayY[0]), Double.parseDouble(arrayY[1]), Double.parseDouble(arrayY[2]));
|
||||
fX = inX+"";
|
||||
fY = inY+"";
|
||||
|
||||
}else{
|
||||
|
||||
//경위도로 변환
|
||||
HashMap map01 = wUtil.setCoordinateConvertXY(Double.parseDouble(X), Double.parseDouble(Y) , HOLE_COORDINATE , "4326");
|
||||
String tempX = wUtil.isNullOb(map01.get("X"),"0");
|
||||
String tempY = wUtil.isNullOb(map01.get("Y"),"0");
|
||||
inX = Double.parseDouble(tempX);
|
||||
inY = Double.parseDouble(tempY);
|
||||
fX = inX+"";
|
||||
fY = inY+"";
|
||||
}
|
||||
|
||||
model.put("inX", inX);
|
||||
model.put("inY", inY);
|
||||
}
|
||||
|
||||
model.put("inX", inX);
|
||||
model.put("inY", inY);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
model.put("fX", fX);
|
||||
model.put("fY", fY);
|
||||
model.put("array", array);
|
||||
model.put("gubun", GUBUN);
|
||||
model.put("oHOLE_CODE", oHOLE_CODE);
|
||||
model.put("COORDINATE_2", COORDINATE_2);
|
||||
|
||||
|
||||
|
||||
|
||||
model.put("fX", fX);
|
||||
model.put("fY", fY);
|
||||
model.put("array", array);
|
||||
model.put("gubun", GUBUN);
|
||||
model.put("oHOLE_CODE", oHOLE_CODE);
|
||||
model.put("COORDINATE_2", COORDINATE_2);
|
||||
|
||||
|
||||
|
||||
|
|
@ -779,6 +779,11 @@ public class HeaderController {
|
|||
|
||||
//INSERT TEMP_HEADER
|
||||
}
|
||||
|
||||
//케이싱심도의 -(hyphen 값 입력을 허용한다. 케이싱심도값이 없는 경우, -999로 변환하여 저장한다. 왜냐하면 케이싱심도가 저장되는 column이 숫자만 들어가기 때문이다.
|
||||
if( oHOLE_CASING_DEPTH.equals("-") ) {
|
||||
oHOLE_CASING_DEPTH = "-999";
|
||||
}
|
||||
|
||||
//PARAM SET
|
||||
params.put("PROJECT_CODE",oPROJECT_CODE );
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package geoinfo.regi.holeCoordinate;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -12,20 +13,27 @@ import org.springframework.stereotype.Controller;
|
|||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import comm.util.strUtil;
|
||||
import comm.web.WebSupplyXml;
|
||||
import egovframework.com.json.JSONObject;
|
||||
import geoinfo.regi.common.service.CommonService;
|
||||
import geoinfo.regi.holeCoordinate.service.HoleCoordinateService;
|
||||
import geoinfo.regi.manageList.service.ManageListService;
|
||||
import geoinfo.regi.status.service.RegiPageService;
|
||||
import geoinfo.util.MyUtil;
|
||||
import ictway.comm.util.parseData;
|
||||
import ictway.comm.web.WebUtil;
|
||||
|
||||
@Controller
|
||||
public class HoleCoordinateController {
|
||||
|
||||
@Resource(name = "commonService")
|
||||
private CommonService commService;
|
||||
|
||||
@Resource(name = "holeCoordinateService")
|
||||
private HoleCoordinateService masterService;
|
||||
|
||||
|
|
@ -38,11 +46,216 @@ public class HoleCoordinateController {
|
|||
// 지반정보등록 (관리자) - 좌표수정목록
|
||||
@RequestMapping(value = "/holeCoord.do")
|
||||
public String holeCoord(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
int nCls = MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
||||
|
||||
strUtil sUtil = new strUtil();
|
||||
WebUtil wUtil = new WebUtil();
|
||||
wUtil.topTabId = "manageCoordinate"; // 검수일때 tab 활성화 시켜주기 위해
|
||||
String loginUserId = String.valueOf(request.getSession().getAttribute("USERID"));
|
||||
|
||||
// request
|
||||
String srchStartDate = sUtil.checkNull(parseData.parseData((String)params.get("startDate")));
|
||||
String srchEndDate = sUtil.checkNull(parseData.parseData((String)params.get("endDate")));
|
||||
String searchProjectName = sUtil.checkNull(parseData.parseData((String)params.get("searchProjectName")));
|
||||
String searchUserName = sUtil.checkNull(parseData.parseData((String)params.get("searchUserName")));
|
||||
String searchCreateName = sUtil.checkNull(parseData.parseData((String)params.get("searchCreateName")));
|
||||
params.put("loginUserId", loginUserId);
|
||||
params.put("cls", nCls);
|
||||
|
||||
int count = 0;
|
||||
|
||||
// data조회
|
||||
// **************************************공통코드**************************************//
|
||||
String commCode = "CM016";
|
||||
String commCode02 = "'CM016'";
|
||||
|
||||
// common Array 로 받기
|
||||
ArrayList arrayCommon = commonService.getCommonCode();
|
||||
|
||||
// SelectBox형태로 map으로 받기
|
||||
HashMap<?, ?> mapCommon = wUtil.getCommCodeSel(commCode, arrayCommon, "");
|
||||
|
||||
// ArrayList<?> result = masterService.getDataList(params);
|
||||
ArrayList<?> result = new ArrayList<>();
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("items", result);
|
||||
count = commonService.getCommonCodeCount();
|
||||
|
||||
model.addAttribute("CM016", mapCommon.get("CM016"));
|
||||
model.addAttribute("searchProjectName", searchProjectName);
|
||||
model.addAttribute("searchUserName", searchUserName);
|
||||
model.addAttribute("searchCreateName", searchCreateName);
|
||||
model.addAttribute("loginUserId", loginUserId);
|
||||
model.addAttribute("arrayCommon", arrayCommon);
|
||||
model.addAttribute("result", result);
|
||||
model.addAttribute("json", json);
|
||||
|
||||
return "/web/manage/hole_coord";
|
||||
};
|
||||
|
||||
/**
|
||||
* kendo grid 목록데이타 AJAX 요청
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping("/getHoleCoordList.do")
|
||||
@ResponseBody
|
||||
public Map<String, Object> getHoleCoordList(HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap<String, Object> params) throws Exception {
|
||||
int nCls = MyUtil.getIntegerFromObject(request.getSession().getAttribute("CLS"));
|
||||
strUtil sUtil = new strUtil();
|
||||
WebUtil wUtil = new WebUtil();
|
||||
wUtil.topTabId = "manageCoordinate"; // 검수일때 tab 활성화 시켜주기 위해
|
||||
String loginUserId = String.valueOf(request.getSession().getAttribute("USERID"));
|
||||
|
||||
// 정렬 필드/방향 처리
|
||||
String sortField = sUtil.checkNull(parseData.parseData((String)params.get("sortField")));
|
||||
String sortDir = sUtil.checkNull(parseData.parseData((String)params.get("sortDir")));
|
||||
|
||||
// 기본 정렬 지정 (없을 경우)
|
||||
if (sortField == null || sortField.isEmpty()) sortField = "datetime";
|
||||
if (sortDir == null || sortDir.isEmpty()) sortDir = "desc";
|
||||
|
||||
// MyBatis에 넣을 때는 깔끔하게 키 이름 정리
|
||||
params.put("sortField", sortField);
|
||||
params.put("sortDir", sortDir);
|
||||
|
||||
// request
|
||||
String srchStartDate = sUtil.checkNull(parseData.parseData((String)params.get("startDate")));
|
||||
String srchEndDate = sUtil.checkNull(parseData.parseData((String)params.get("endDate")));
|
||||
String searchProjectName = sUtil.checkNull(parseData.parseData((String)params.get("searchProjectName")));
|
||||
String searchUserName = sUtil.checkNull(parseData.parseData((String)params.get("searchUserName")));
|
||||
String searchCreateName = sUtil.checkNull(parseData.parseData((String)params.get("searchCreateName")));
|
||||
params.put("loginUserId", loginUserId);
|
||||
params.put("cls", nCls);
|
||||
|
||||
int total = masterService.getDataListCount(params);
|
||||
int page = params.get("page").toString() != null ? Integer.parseInt(params.get("page").toString()) : 1;
|
||||
int pageSize = params.get("pageSize") != null ? Integer.parseInt((String)params.get("pageSize")) : total; // 기본값 10
|
||||
params.put("startRow", ((page - 1) * pageSize) + 1);
|
||||
params.put("endRow", (((page - 1) * pageSize) + 1) + pageSize - 1); // startRow + pageSize - 1
|
||||
|
||||
List<?> items = masterService.getDataListPaging(params);
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("items", items);
|
||||
result.put("total", total);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 좌표수정 (관리자)
|
||||
@RequestMapping(value = "/holeCoordModify.do")
|
||||
public String holeCoordModify(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
strUtil sUtil = new strUtil();
|
||||
WebUtil wUtil = new WebUtil();
|
||||
wUtil.topTabId = "manageCoordinate"; // 검수일때 tab 활성화 시켜주기 위해
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
// request
|
||||
String PROJECT_CODE = sUtil.checkNull(parseData.parseData(String.valueOf(params.get("PROJECT_CODE"))));
|
||||
|
||||
ArrayList arrayData = new ArrayList();
|
||||
ArrayList arrayColumn = new ArrayList();
|
||||
ArrayList arrayCommon = new ArrayList();
|
||||
HashMap mapCommon = new HashMap();
|
||||
HashMap mapCoor = new HashMap(); // 좌표계 selectBox
|
||||
ArrayList arrayCoor = new ArrayList();
|
||||
|
||||
int count = 0;
|
||||
|
||||
String PROJECT_NAME = "";
|
||||
|
||||
// data조회
|
||||
params.put("PROJECT_CODE", PROJECT_CODE);
|
||||
String pName = masterService.getCoordName(params);
|
||||
ArrayList<?> result = masterService.getCoordList(params);
|
||||
//**************************************좌표정보**************************************//
|
||||
arrayCoor = commService.getCoordinateQuery();
|
||||
|
||||
// Array 로 받기
|
||||
|
||||
//SelectBox형태로 map으로 받기
|
||||
mapCoor = wUtil.getCommCodeSel("COORDINATE_1,COORDINATE_3", arrayCoor,"");
|
||||
|
||||
String param = "onclick=\"fn_onSelChangeCoor(document.frmHeader.HOLE_COORDINATE_E, document.frmHeader.HOLE_COORDINATE, 'COORDINATE_1_COORDINATE_2', 'COORDINATE_3'); fn_CoorInputType();\" validNm=\"타원체\"";
|
||||
wUtil.getCommCodeRad("COORDINATE_2",arrayCoor,mapCoor,param);
|
||||
|
||||
// EPSG 문자열 추가
|
||||
String coord3Html = (String) mapCoor.get("COORDINATE_3");
|
||||
coord3Html = coord3Html.replaceAll(
|
||||
"<option value='(\\d+)'>([^<]*)</option>",
|
||||
"<option value='$1'>$2 EPSG:$1</option>"
|
||||
);
|
||||
mapCoor.put("COORDINATE_3", coord3Html);
|
||||
|
||||
model.put("arrayCoor", arrayCoor); //타원체
|
||||
model.put("mapCoor", mapCoor); // 좌표계
|
||||
model.addAttribute("projectCode", PROJECT_CODE);
|
||||
model.addAttribute("pName", pName);
|
||||
model.addAttribute("result", result);
|
||||
model.addAttribute("jsonResult", mapper.writeValueAsString(result));
|
||||
return "/web/manage/hole_coord_modify";
|
||||
};
|
||||
|
||||
// 좌표수정 (관리자)
|
||||
@RequestMapping(value = "/holeCoordUpdate.do")
|
||||
public ModelAndView holeCoordUpdate(@RequestParam HashMap<String, Object> params, ModelAndView model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
// 변수선언
|
||||
WebUtil wUtil = new WebUtil();
|
||||
strUtil sUtil = new strUtil();
|
||||
|
||||
// request
|
||||
String REPORT_TYPE = sUtil.checkNull(String.valueOf(params.get("REPORT_TYPE")));
|
||||
String PROJECT_CODE = sUtil.checkNull(String.valueOf(params.get("PROJECT_CODE")));
|
||||
String PROC = sUtil.checkNull(String.valueOf(params.get("PROC")));
|
||||
int rowCnt = 0;
|
||||
if ("".equals(sUtil.checkNull(String.valueOf(params.get("rowCnt")))) == false) {
|
||||
rowCnt = Integer.parseInt(sUtil.checkNull(String.valueOf(params.get("rowCnt"))));
|
||||
}
|
||||
// 좌표 수정 : MODIFY -- TEMP_HEADER, TBL_HEADER 수정.
|
||||
//웹 취약점 때문에 수정
|
||||
if (rowCnt > 0) {
|
||||
HashMap<String, Object> spParams = new HashMap<>();
|
||||
if ("MODIFY_COORDINATE".equals(PROC)) { // 좌표계 수정
|
||||
for (int i = 1; i < rowCnt + 1; i++) {
|
||||
String HOLE_CODE = sUtil.checkNull(String.valueOf(params.get("HOLE_CODE_" + i)));
|
||||
String COORD_SYS = sUtil.checkNull(String.valueOf(params.get("COORD_SYS_" + i)));
|
||||
String HOLE_OR_X = sUtil.checkNull(String.valueOf(params.get("HOLE_OR_X_" + i)));
|
||||
String HOLE_OR_Y = sUtil.checkNull(String.valueOf(params.get("HOLE_OR_Y_" + i)));
|
||||
|
||||
spParams.put("holeCode", HOLE_CODE);
|
||||
spParams.put("isOrgInclude", 1);
|
||||
spParams.put("coordSys", Integer.parseInt(COORD_SYS));
|
||||
spParams.put("orgX", Double.parseDouble(HOLE_OR_X));
|
||||
spParams.put("orgY", Double.parseDouble(HOLE_OR_Y));
|
||||
masterService.changeCoordHole(request, response, spParams);
|
||||
}
|
||||
model.setViewName("redirect:/holeCoord.do");
|
||||
|
||||
} else { //("MODIFY_NAME".equals(PROC)) // 프로젝트명 수정
|
||||
|
||||
for (int i = 1; i < rowCnt + 1; i++) {
|
||||
String PROJECT_NAME = sUtil.checkNull(String.valueOf(params.get("projName")));
|
||||
String NEW_P_NAME = sUtil.checkNull(String.valueOf(params.get("re-name")));
|
||||
spParams.put("projectCode", PROJECT_CODE);
|
||||
spParams.put("projectName", PROJECT_NAME);
|
||||
spParams.put("newPName", NEW_P_NAME);
|
||||
masterService.changeProjName(request, response, spParams);
|
||||
}
|
||||
model.setViewName("redirect:/re-name.do");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return model;
|
||||
};
|
||||
|
||||
// 지반정보등록 (관리자) - 이름수정목록
|
||||
@RequestMapping(value = "/re-name.do")
|
||||
public String reName(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
strUtil sUtil = new strUtil();
|
||||
WebUtil wUtil = new WebUtil();
|
||||
wUtil.topTabId = "manageName"; // 검수일때 tab 활성화 시켜주기 위해
|
||||
String loginUserId = String.valueOf(request.getSession().getAttribute("USERID"));
|
||||
|
||||
// request
|
||||
String srchStartDate = sUtil.checkNull(parseData.parseData((String)params.get("startDate")));
|
||||
String srchEndDate = sUtil.checkNull(parseData.parseData((String)params.get("endDate")));
|
||||
|
|
@ -64,7 +277,8 @@ public class HoleCoordinateController {
|
|||
// SelectBox형태로 map으로 받기
|
||||
HashMap<?, ?> mapCommon = wUtil.getCommCodeSel(commCode, arrayCommon, "");
|
||||
|
||||
ArrayList<?> result = masterService.getDataList(params);
|
||||
// ArrayList<?> result = masterService.getDataList(params);
|
||||
ArrayList<?> result = new ArrayList<>();
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("items", result);
|
||||
count = commonService.getCommonCodeCount();
|
||||
|
|
@ -78,15 +292,15 @@ public class HoleCoordinateController {
|
|||
model.addAttribute("result", result);
|
||||
model.addAttribute("json", json);
|
||||
|
||||
return "/web/manage/hole_coord";
|
||||
return "/web/manage/re_name";
|
||||
};
|
||||
|
||||
// 좌표수정 (관리자)
|
||||
@RequestMapping(value = "/holeCoordModify.do")
|
||||
public String holeCoordModify(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
|
||||
// 프로젝트명 수정 화면 (관리자)
|
||||
@RequestMapping(value = "/re-name-modify.do")
|
||||
public String reNameModify(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
strUtil sUtil = new strUtil();
|
||||
WebUtil wUtil = new WebUtil();
|
||||
wUtil.topTabId = "manageCoordinate"; // 검수일때 tab 활성화 시켜주기 위해
|
||||
wUtil.topTabId = "manageName"; // 검수일때 tab 활성화 시켜주기 위해
|
||||
|
||||
// request
|
||||
String PROJECT_CODE = sUtil.checkNull(parseData.parseData(String.valueOf(params.get("PROJECT_CODE"))));
|
||||
|
|
@ -108,12 +322,12 @@ public class HoleCoordinateController {
|
|||
model.addAttribute("projectCode", PROJECT_CODE);
|
||||
model.addAttribute("pName", pName);
|
||||
model.addAttribute("result", result);
|
||||
return "/web/manage/hole_coord_modify";
|
||||
return "/web/manage/re_name_modify";
|
||||
};
|
||||
|
||||
// 좌표수정 (관리자)
|
||||
@RequestMapping(value = "/holeCoordUpdate.do")
|
||||
public ModelAndView holeCoordUpdate(@RequestParam HashMap<String, Object> params, ModelAndView model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
@RequestMapping(value = "/re-name-update.do")
|
||||
public ModelAndView reNameUpdate(@RequestParam HashMap<String, Object> params, ModelAndView model, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
// 변수선언
|
||||
WebUtil wUtil = new WebUtil();
|
||||
strUtil sUtil = new strUtil();
|
||||
|
|
@ -150,7 +364,7 @@ public class HoleCoordinateController {
|
|||
}
|
||||
}
|
||||
|
||||
model.setViewName("redirect:/holeCoord.do");
|
||||
model.setViewName("redirect:/re-name.do");
|
||||
|
||||
return model;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package geoinfo.regi.holeCoordinate.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
|
@ -10,6 +11,8 @@ import egovframework.rte.psl.dataaccess.util.EgovMap;
|
|||
@Mapper("holeCoordinateMapper")
|
||||
public interface HoleCoordinateMapper {
|
||||
|
||||
public Integer getDataListCount(HashMap<String,Object> params) throws Exception;
|
||||
public ArrayList<?> getDataListPaging(HashMap<String,Object> params) throws Exception;
|
||||
public ArrayList<?> getDataList(HashMap<String,Object> params) throws Exception;
|
||||
public ArrayList<?> getCoordList(HashMap<String,Object> params) throws Exception;
|
||||
public String getCoordName(HashMap<String,Object> params) throws Exception;
|
||||
|
|
@ -17,5 +20,7 @@ public interface HoleCoordinateMapper {
|
|||
public void upCoord2(HashMap<String,Object> params) throws Exception;
|
||||
public void upData1(HashMap<String,Object> params) throws Exception;
|
||||
public void upData2(HashMap<String,Object> params) throws Exception;
|
||||
public void callSpRenProjName(HashMap<String, Object> params) throws SQLException;
|
||||
public void callSpChangeCoordHole(HashMap<String, Object> params) throws SQLException;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,16 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
|
||||
public interface HoleCoordinateService {
|
||||
|
||||
public Integer getDataListCount(HashMap<String,Object> params) throws Exception;
|
||||
public ArrayList<?> getDataListPaging(HashMap<String,Object> params) throws Exception;
|
||||
public ArrayList<?> getDataList(HashMap<String,Object> params) throws Exception;
|
||||
public ArrayList<?> getCoordList(HashMap<String,Object> params) throws Exception;
|
||||
public String getCoordName(HashMap<String,Object> params) throws Exception;
|
||||
|
|
@ -16,4 +21,6 @@ public interface HoleCoordinateService {
|
|||
public void upCoord2(HashMap<String,Object> params) throws Exception;
|
||||
public void upData1(HashMap<String,Object> params) throws Exception;
|
||||
public void upData2(HashMap<String,Object> params) throws Exception;
|
||||
public HashMap<String, Object> changeProjName(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params) throws Exception;
|
||||
public HashMap<String, Object> changeCoordHole(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params) throws Exception;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
package geoinfo.regi.holeCoordinate.service.impl;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
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.Service;
|
||||
|
||||
|
|
@ -17,6 +20,16 @@ public class HoleCoordinateServiceImpl implements HoleCoordinateService {
|
|||
|
||||
@Resource(name = "holeCoordinateMapper")
|
||||
private HoleCoordinateMapper holeCoordinateMapper;
|
||||
|
||||
@Override
|
||||
public Integer getDataListCount(HashMap<String,Object> params) throws Exception {
|
||||
return holeCoordinateMapper.getDataListCount(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<?> getDataListPaging(HashMap<String,Object> params) throws Exception {
|
||||
return holeCoordinateMapper.getDataListPaging(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<?> getDataList(HashMap<String,Object> params) throws Exception {
|
||||
|
|
@ -46,4 +59,36 @@ public class HoleCoordinateServiceImpl implements HoleCoordinateService {
|
|||
public void upData2(HashMap<String, Object> params) throws Exception {
|
||||
holeCoordinateMapper.upData2(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> changeProjName(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params) throws Exception {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
throw new Exception( "로그인이 필요한 서비스 입니다." );
|
||||
}
|
||||
|
||||
try {
|
||||
holeCoordinateMapper.callSpRenProjName(params);
|
||||
return params;
|
||||
} catch (SQLException e) {
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> changeCoordHole(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params) throws Exception {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
throw new Exception( "로그인이 필요한 서비스 입니다." );
|
||||
}
|
||||
|
||||
try {
|
||||
holeCoordinateMapper.callSpChangeCoordHole(params);
|
||||
return params;
|
||||
} catch (SQLException e) {
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import egovframework.com.cmm.service.EgovProperties;
|
|||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
import geoinfo.com.GeoinfoCommon;
|
||||
import geoinfo.com.file.FileCmmn;
|
||||
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
|
||||
import geoinfo.regi.info.service.InfoService;
|
||||
import ictway.comm.web.GlobalsWeb;
|
||||
import ictway.comm.web.WebUtil;
|
||||
|
|
@ -52,6 +53,9 @@ public class InfoController {
|
|||
|
||||
@Resource(name = "infoService")
|
||||
private InfoService infoService;
|
||||
|
||||
@Resource(name = "drillingInquiryService")
|
||||
DrillingInquiryService drillingInquiryService;
|
||||
|
||||
/* 20231223 트랜젝션 중복문제로 제거
|
||||
* @Autowired
|
||||
|
|
@ -87,6 +91,36 @@ public class InfoController {
|
|||
|
||||
List<EgovMap> dis = infoService.getDisList(params);
|
||||
jsonObj.put("dis", dis);
|
||||
|
||||
//발주기관에서 등록한 프로젝트와 맵핑되는 프로젝트를 검색한다.
|
||||
EgovMap tempConstructSiteInfo = drillingInquiryService.getItemByProjectCode(request, params);
|
||||
if( tempConstructSiteInfo != null && tempConstructSiteInfo.get("projectCode") != null ) {
|
||||
|
||||
JSONObject jsonTempConstructSiteInfo = new JSONObject();
|
||||
|
||||
jsonTempConstructSiteInfo.put("cid", tempConstructSiteInfo.get("cid"));
|
||||
jsonTempConstructSiteInfo.put("constName", tempConstructSiteInfo.get("constName"));
|
||||
jsonTempConstructSiteInfo.put("constStartDate", tempConstructSiteInfo.get("constStartDate"));
|
||||
jsonTempConstructSiteInfo.put("constEndDate", tempConstructSiteInfo.get("constEndDate"));
|
||||
jsonTempConstructSiteInfo.put("constStateCode", tempConstructSiteInfo.get("constStateCode"));
|
||||
jsonTempConstructSiteInfo.put("masterCompanyOCode", tempConstructSiteInfo.get("masterCompanyOCode"));
|
||||
jsonTempConstructSiteInfo.put("masterCompanyTwCode", tempConstructSiteInfo.get("masterCompanyTwCode"));
|
||||
jsonTempConstructSiteInfo.put("masterCompanyThCode", tempConstructSiteInfo.get("masterCompanyThCode"));
|
||||
jsonTempConstructSiteInfo.put("masterCompanyName", tempConstructSiteInfo.get("masterCompanyName"));
|
||||
jsonTempConstructSiteInfo.put("masterCompanyDept", tempConstructSiteInfo.get("masterCompanyDept"));
|
||||
jsonTempConstructSiteInfo.put("masterCompanyAdmin", tempConstructSiteInfo.get("masterCompanyAdmin"));
|
||||
jsonTempConstructSiteInfo.put("masterCompanyTel", tempConstructSiteInfo.get("masterCompanyTel"));
|
||||
jsonTempConstructSiteInfo.put("constCompanyCode", tempConstructSiteInfo.get("constCompanyCode"));
|
||||
jsonTempConstructSiteInfo.put("constCompanyAdmin", tempConstructSiteInfo.get("constCompanyAdmin"));
|
||||
jsonTempConstructSiteInfo.put("constCompanyTel", tempConstructSiteInfo.get("constCompanyTel"));
|
||||
jsonTempConstructSiteInfo.put("projectStateCode", tempConstructSiteInfo.get("projectStateCode"));
|
||||
jsonTempConstructSiteInfo.put("projectHoleNumber", tempConstructSiteInfo.get("projectHoleNumber"));
|
||||
jsonTempConstructSiteInfo.put("constTag", tempConstructSiteInfo.get("constTag"));
|
||||
jsonTempConstructSiteInfo.put("projectCode", tempConstructSiteInfo.get("projectCode"));
|
||||
|
||||
jsonObj.put("tempConstructSiteInfo", jsonTempConstructSiteInfo);
|
||||
}
|
||||
|
||||
|
||||
// 수정모드
|
||||
if ("".equals(oProjectCode) == false) {
|
||||
|
|
@ -422,7 +456,12 @@ public class InfoController {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (oPROJECT_CODE != null && "".equals(oPROJECT_CODE) == false && oPROJECT_HOLE_NUMBER != null && "".equals(oPROJECT_HOLE_NUMBER) == false ) {
|
||||
params.put("PROJECT_CODE", oPROJECT_CODE);
|
||||
params.put("HOLE_NUMBER", oPROJECT_HOLE_NUMBER);
|
||||
int nReturn = infoService.updateMetaHoleNumber(params);
|
||||
}
|
||||
model.put("msg", "저장 성공");
|
||||
} catch (ParseException e) {
|
||||
model.put("msg", "저장 실패");
|
||||
|
|
|
|||
|
|
@ -42,7 +42,10 @@ public interface InfoMapper {
|
|||
|
||||
void updateTempExpertOpinion(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getGDisCode(Map<String, Object> params);
|
||||
List<EgovMap> getGDisCode(Map<String, Object> params);
|
||||
|
||||
int updateMetaHoleNumber(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,5 +42,7 @@ public interface InfoService {
|
|||
void updateTempExpertOpinion(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
List<EgovMap> getGDisCode(Map<String, Object> params);
|
||||
|
||||
public int updateMetaHoleNumber(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,4 +103,11 @@ public class InfoServiceImpl implements InfoService {
|
|||
public List<EgovMap> getGDisCode(Map<String, Object> params) {
|
||||
return infoMapper.getGDisCode(params);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int updateMetaHoleNumber(HashMap<String, Object> params) throws Exception {
|
||||
return infoMapper.updateMetaHoleNumber(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package geoinfo.regi.listReg;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -8,15 +9,20 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.codehaus.jackson.map.ObjectMapper;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
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 org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import geoinfo.regi.listReg.service.ListRegService;
|
||||
import geoinfo.regi.manageList.service.ManageListService;
|
||||
import geoinfo.regi.status.service.RegiPageService;
|
||||
import geoinfo.util.MyUtil;
|
||||
import ictway.comm.util.parseData;
|
||||
import ictway.comm.util.strUtil;
|
||||
import ictway.comm.web.WebUtil;
|
||||
|
|
@ -64,17 +70,144 @@ public class ListRegController {
|
|||
String searchUserName = sUtil.checkNull(parseData.parseData((String)params.get("searchUserName")));
|
||||
//request
|
||||
System.out.println("searchProjectName:"+request.getParameter("searchProjectName"));
|
||||
|
||||
|
||||
// 정렬 필드/방향 처리
|
||||
String sortField = sUtil.checkNull(parseData.parseData((String)params.get("sortField")));
|
||||
String sortDir = sUtil.checkNull(parseData.parseData((String)params.get("sortDir")));
|
||||
|
||||
// 기본 정렬 지정 (없을 경우)
|
||||
if (sortField == null || sortField.isEmpty()) sortField = "datetime";
|
||||
if (sortDir == null || sortDir.isEmpty()) sortDir = "desc";
|
||||
|
||||
// MyBatis에 넣을 때는 깔끔하게 키 이름 정리
|
||||
params.put("sortField", sortField);
|
||||
params.put("sortDir", sortDir);
|
||||
|
||||
int total = masterService.getRegListCount(params);
|
||||
int page = params.get("page").toString() != null ? Integer.parseInt(params.get("page").toString()) : 1;
|
||||
int pageSize = params.get("pageSize") != null ? Integer.parseInt((String)params.get("pageSize")) : total; // 기본값 10
|
||||
params.put("startRow", ((page - 1) * pageSize) + 1);
|
||||
params.put("endRow", (((page - 1) * pageSize) + 1) + pageSize - 1); // startRow + pageSize - 1
|
||||
|
||||
//data정보
|
||||
ArrayList result = masterService.getRegList(params);
|
||||
|
||||
HashMap resultMap = new HashMap();
|
||||
resultMap.put("dataList1", result);
|
||||
resultMap.put("items", result);
|
||||
resultMap.put("total", total);
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.putAll( resultMap );
|
||||
response.getWriter().print(json);
|
||||
};
|
||||
|
||||
/**
|
||||
* '입력중인프로젝트 현황'에서 '검수등록대기 목록'으로 이동 기능 추가
|
||||
* @param request
|
||||
* @param strJSON
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "list_reg/move-to-manage-wait.do", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public org.json.simple.JSONObject moveToManageWait (
|
||||
HttpServletRequest request,
|
||||
@RequestBody String strJSON,
|
||||
HttpServletResponse response) {
|
||||
|
||||
|
||||
org.json.simple.JSONObject jsonResponse = new org.json.simple.JSONObject();
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " IN:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"strJSON" + strJSON + "\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
JSONParser jsonParser = new JSONParser();
|
||||
JSONArray jsonArr = null;
|
||||
boolean isFail = false;
|
||||
String failMsg = "";
|
||||
|
||||
|
||||
try {
|
||||
jsonArr = (JSONArray)jsonParser.parse(strJSON);
|
||||
for (Object obj : jsonArr) {
|
||||
org.json.simple.JSONObject jsonObject = (org.json.simple.JSONObject) obj;
|
||||
|
||||
// JSONObject를 HashMap으로 변환
|
||||
HashMap<String, Object> params = new HashMap<>();
|
||||
for (Object key : jsonObject.keySet()) {
|
||||
String keyStr = (String) key;
|
||||
Object value = jsonObject.get(keyStr);
|
||||
params.put(keyStr, value);
|
||||
}
|
||||
|
||||
try {
|
||||
HashMap<String, Object> hashMap = masterService.moveToManageWait(request, response, params);
|
||||
int nRetCode = 100;
|
||||
String lpszRetMsg = "No message.";
|
||||
|
||||
if( nRetCode == 100 ) {
|
||||
jsonResponse.put("resultCode", nRetCode);
|
||||
jsonResponse.put("result", "true");
|
||||
jsonResponse.put("message", "");
|
||||
} else {
|
||||
jsonResponse.put("resultCode", nRetCode);
|
||||
jsonResponse.put("result", "false");
|
||||
jsonResponse.put("message", lpszRetMsg);
|
||||
|
||||
isFail = true;
|
||||
failMsg = lpszRetMsg;
|
||||
break;
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
String strTxt =
|
||||
"---------- BUG REPORTING START ----------" + "\n" +
|
||||
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
|
||||
"strJSON:[\n" + strJSON + "\n]\n" +
|
||||
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
|
||||
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
|
||||
"---------- BUG REPORTING END ----------" + "\n" +
|
||||
"";
|
||||
System.out.println(strTxt);
|
||||
int resultCode = -1;
|
||||
|
||||
if( e.getMessage().equals("로그인이 필요한 서비스 입니다.") ) {
|
||||
resultCode = 401;
|
||||
}
|
||||
jsonResponse.put("resultCode", resultCode);
|
||||
jsonResponse.put("result", "false");
|
||||
jsonResponse.put("message", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
} catch (org.json.simple.parser.ParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if( isFail ) {
|
||||
jsonResponse.put("resultCode", -2);
|
||||
jsonResponse.put("result", "false");
|
||||
jsonResponse.put("message", failMsg);
|
||||
}
|
||||
|
||||
System.out.println(
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
request.getRequestURI() + " OUT:" +
|
||||
"\n--------------------------------------------------------------\n" +
|
||||
"jsonResponse.toJSONString():[" + jsonResponse.toJSONString() + "]\n" +
|
||||
"\n--------------------------------------------------------------\n"
|
||||
);
|
||||
|
||||
return jsonResponse;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package geoinfo.regi.listReg.service;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
|
@ -10,6 +11,8 @@ import egovframework.rte.psl.dataaccess.util.EgovMap;
|
|||
@Mapper("listRegMapper")
|
||||
public interface ListRegMapper {
|
||||
|
||||
public ArrayList<?> getRegList(HashMap<String,Object> params) throws Exception;
|
||||
public Integer getRegListCount(HashMap<String,Object> params) throws Exception;
|
||||
public ArrayList<?> getRegList(HashMap<String,Object> params) throws Exception;
|
||||
public void callSpChangeStateTempProject(HashMap<String, Object> params) throws SQLException;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,15 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.util.EgovMap;
|
||||
|
||||
|
||||
public interface ListRegService {
|
||||
|
||||
public Integer getRegListCount(HashMap<String,Object> params) throws Exception;
|
||||
public ArrayList<?> getRegList(HashMap<String,Object> params) throws Exception;
|
||||
public HashMap<String, Object> moveToManageWait(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params) throws Exception;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,15 @@ package geoinfo.regi.listReg.service.impl;
|
|||
|
||||
import geoinfo.regi.listReg.service.ListRegMapper;
|
||||
import geoinfo.regi.listReg.service.ListRegService;
|
||||
import geoinfo.util.MyUtil;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -16,9 +20,46 @@ public class ListRegServiceImpl implements ListRegService {
|
|||
@Resource(name = "listRegMapper")
|
||||
private ListRegMapper listRegMapper;
|
||||
|
||||
@Override
|
||||
public Integer getRegListCount(HashMap<String,Object> params) throws Exception {
|
||||
return listRegMapper.getRegListCount(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<?> getRegList(HashMap<String,Object> params) throws Exception {
|
||||
return listRegMapper.getRegList(params);
|
||||
}
|
||||
|
||||
|
||||
private boolean isValidMoveToManageWait(HashMap<String, Object> params) throws Exception {
|
||||
|
||||
String projectCode = MyUtil.getStringFromObject( params.get("projectCode") );
|
||||
if( projectCode == null || projectCode.isEmpty()) {
|
||||
throw new Exception( "프로젝트코드가 존재하지 않습니다." );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, Object> moveToManageWait(HttpServletRequest request, HttpServletResponse response, HashMap<String, Object> params) throws Exception {
|
||||
|
||||
if(request.getSession().getAttribute("USERNAME") == null){
|
||||
throw new Exception( "로그인이 필요한 서비스 입니다." );
|
||||
}
|
||||
|
||||
params.put("state", 1);
|
||||
String userId = (String)request.getSession().getAttribute("USERID");
|
||||
params.put("userId", userId);
|
||||
|
||||
isValidMoveToManageWait(params);
|
||||
|
||||
try {
|
||||
listRegMapper.callSpChangeStateTempProject(params);
|
||||
return params;
|
||||
} catch (SQLException e) {
|
||||
throw new Exception( e.getMessage() );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue