diff --git a/src/main/java/geoinfo/main/main/MainController.java b/src/main/java/geoinfo/main/main/MainController.java index ad217a85..d1bed21e 100644 --- a/src/main/java/geoinfo/main/main/MainController.java +++ b/src/main/java/geoinfo/main/main/MainController.java @@ -996,21 +996,7 @@ public class MainController // 2017.10.17 dhlee session ip 브라우져 검증 추가 String ip = InetAddress.getLocalHost().toString(); // IP String agent = request.getHeader("User-Agent"); // 브라우져 -// String brower = ""; -// -// if (agent != null) { -// if (agent.indexOf("Trident") > -1) { -// brower = "MSIE"; -// } else if (agent.indexOf("Chrome") > -1) { -// brower = "Chrome"; -// } else if (agent.indexOf("Opera") > -1) { -// brower = "Opera"; -// } else if (agent.indexOf("iPhone") > -1 && agent.indexOf("Mobile") > -1) { -// brower = "iPhone"; -// } else if (agent.indexOf("Android") > -1 && agent.indexOf("Mobile") > -1) { -// brower = "Android"; -// } -// } + String id = request.getSession().getAttribute("USERID").toString(); String s_ip = request.getSession().getAttribute("USERIP").toString(); String s_agent = request.getSession().getAttribute("USERAGENT").toString(); @@ -1064,8 +1050,6 @@ public class MainController month = now.get(Calendar.MONTH) + 1; date = now.get(Calendar.DATE); - // System.out.println(year+"년 "+month+"월 "+date+"일 "+ hour + - // "시 "+mm+"분 "); dayofweek = now.get(Calendar.DAY_OF_WEEK); map.put("year", year); @@ -1105,634 +1089,16 @@ public class MainController String visitors = mainService.selectVisitors(); // 방문자수 String registrant = mainService.selectRegistrant(); // 등록자수 - int total_cnt = mainService.selecrTotal_cnt(); // 총 시추공수 -/* - * 20230216 사용하지 않는 부문으로 판단 - * int cnt01 = 0; - int cnt02 = 0; - int cnt03 = 0; - int cnt04 = 0; - int cnt05 = 0; - int cnt06 = 0; - int cnt11 = 0; - int cnt12 = 0; - int cnt13 = 0; - int cnt14 = 0; - int cnt15 = 0; - int cnt16 = 0; - int cnt17 = 0; - int cnt18 = 0; - int cnt201 = 0; - int cnt202 = 0; - int cnt203 = 0; - int cnt204 = 0; - int cnt205 = 0; - int cnt206 = 0; - int cnt207 = 0; - int cnt208 = 0; - int cnt209 = 0; - int cnt210 = 0; - int cnt211 = 0; - int cnt212 = 0; - int cnt213 = 0; - int cnt214 = 0; - int cnt215 = 0; - int cnt216 = 0; - int cnt_not = 0; - String code_ex1 = "070,363"; // 국토해양부 서울청 - String code_ex2 = "025,413"; // 국토해양부 부산청 - String code_ex3 = "001,394"; // 국토해양부 대전청 - String code_ex4 = "013,367"; // 국토해양부 익산청 - String code_ex5 = "056,365"; // 국토해양부 원주청 - // 11개 해양항만청 - String code_ex6 = "801,802,803,804,805,806,807,808,809,810,811,556,401,416,399,353"; - - String code_ex11 = "004,051,362"; // 한국토지주택공사 - String code_ex12 = "031"; // 한국도로공사 - String code_ex13 = "134"; // 한국수자원공사 - String code_ex14 = "400,703"; // 연안계획과 - String code_ex15 = "131"; // 한국철도시설공단 - String code_ex16 = "082"; // 한국수력원자력 - String code_ex17 = "305"; // 한국공항공사 - String code_ex18 = "702"; // 한국항만공사 - - String code_ex201 = "419"; // 서울특별시 - String code_ex202 = "088"; // 부산광역시 - String code_ex203 = "263"; // 대구광역시 - String code_ex204 = "412"; // 인천광역시 - String code_ex205 = "077"; // 광주광역시 - String code_ex206 = "391"; // 대전광역시 - String code_ex207 = "048"; // 울산광역시 - - String code_ex208 = "554"; // 경기도 - String code_ex209 = "065"; // 강원도 - String code_ex210 = "548"; // 충청남도 - String code_ex211 = "902"; // 충청북도 - String code_ex212 = "903"; // 경상남도 - String code_ex213 = "904"; // 경상북도 - String code_ex214 = "127"; // 전라남도 - String code_ex215 = "905"; // 전라북도 - String code_ex216 = "907"; // 제주도 -*/ - // //시추공수 - // ///////////////////////////////////////////////////////////////////////////////// - // 국토해양부 서울청 - /*try - { - map.put("code", code_ex1); - int resultinfo = cnt01 = mainService.selectInformationInfo(map); - cnt01 = resultinfo; - mv.addObject("CNT1", resultinfo); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - // 국토해양부 부산청 - try - { - map.put("code", code_ex2); - int resultinfo = cnt02 = mainService.selectInformationInfo(map); - mv.addObject("CNT2", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 국토해양부 대전청 - try - { - map.put("code", code_ex3); - int resultinfo = cnt03 = mainService.selectInformationInfo(map); - mv.addObject("CNT3", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 국토해양부 익산청 - try - { - map.put("code", code_ex4); - int resultinfo = cnt04 = mainService.selectInformationInfo(map); - mv.addObject("CNT4", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 국토해양부 원주청 - try - { - map.put("code", code_ex5); - int resultinfo = cnt05 = mainService.selectInformationInfo(map); - mv.addObject("CNT5", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 11개 해양항만청 - try - { - map.put("code", code_ex6); - int resultinfo = cnt06 = mainService.selectInformationInfo(map); - mv.addObject("CNT6", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - // 합계 - int sum1 = (cnt01) + (cnt02) + (cnt03) + (cnt04) + (cnt05) + (cnt06); - mv.addObject("SUM1", getFormattedMoney(Integer.toString(sum1))); - - // 한국토지주택공사 - try - { - map.put("code", code_ex11); - int resultinfo = cnt11 = mainService.selectInformationInfo(map); - mv.addObject("CNT11", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 한국도로공사 - try - { - map.put("code", code_ex12); - int resultinfo = cnt12 = mainService.selectInformationInfo(map); - mv.addObject("CNT12", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 한국수자원공사 - try - { - map.put("code", code_ex13); - int resultinfo = cnt13 = mainService.selectInformationInfo(map); - mv.addObject("CNT13", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 연안계획과 - try - { - map.put("code", code_ex14); - int resultinfo = cnt14 = mainService.selectInformationInfo(map); - mv.addObject("CNT14", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 한국철도시설공단 - try - { - map.put("code", code_ex15); - int resultinfo = cnt15 = mainService.selectInformationInfo(map); - mv.addObject("CNT15", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 한국수력원자력 - try - { - map.put("code", code_ex16); - int resultinfo = cnt16 = mainService.selectInformationInfo(map); - mv.addObject("CNT16", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 한국공항공사 - try - { - map.put("code", code_ex17); - int resultinfo = cnt17 = mainService.selectInformationInfo(map); - mv.addObject("CNT17", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 한국항만공사 - try - { - map.put("code", code_ex18); - int resultinfo = cnt18 = mainService.selectInformationInfo(map); - mv.addObject("CNT18", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - // 합계 - int sum2 = (cnt11) + (cnt12) + (cnt13) + (cnt14) + (cnt15) + (cnt16) + (cnt17) + (cnt18); - mv.addObject("SUM2", getFormattedMoney(Integer.toString(sum2))); - int sum3 = sum1 + sum2; - mv.addObject("SUM3", getFormattedMoney(Integer.toString(sum3))); - - // 서울특별시 - try - { - map.put("code", code_ex201); - int resultinfo = cnt201 = mainService.selectInformationInfo(map); - mv.addObject("CNT201", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 부산광역시 - try - { - map.put("code", code_ex202); - int resultinfo = cnt202 = mainService.selectInformationInfo(map); - mv.addObject("CNT202", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 대구광역시 - try - { - map.put("code", code_ex203); - int resultinfo = cnt203 = mainService.selectInformationInfo(map); - mv.addObject("CNT203", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 인천광역시 - try - { - map.put("code", code_ex204); - int resultinfo = cnt204 = mainService.selectInformationInfo(map); - mv.addObject("CNT204", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 광주광역시 - try - { - map.put("code", code_ex205); - int resultinfo = cnt205 = mainService.selectInformationInfo(map); - mv.addObject("CNT205", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 대전광역시 - try - { - map.put("code", code_ex206); - int resultinfo = cnt206 = mainService.selectInformationInfo(map); - mv.addObject("CNT206", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 울산광역시 - try - { - map.put("code", code_ex207); - int resultinfo = cnt207 = mainService.selectInformationInfo(map); - mv.addObject("CNT207", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 경기도 - try - { - map.put("code", code_ex208); - int resultinfo = cnt208 = mainService.selectInformationInfo(map); - mv.addObject("CNT208", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - // 강원도 - try - { - map.put("code", code_ex209); - int resultinfo = cnt209 = mainService.selectInformationInfo(map); - mv.addObject("CNT209", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 충청남도 - try - { - map.put("code", code_ex210); - int resultinfo = cnt210 = mainService.selectInformationInfo(map); - mv.addObject("CNT210", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - // 충청북도 - try - { - map.put("code", code_ex211); - int resultinfo = cnt211 = mainService.selectInformationInfo(map); - mv.addObject("CNT211", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 경상남도 - try - { - map.put("code", code_ex212); - int resultinfo = cnt212 = mainService.selectInformationInfo(map); - mv.addObject("CNT212", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 경상북도 - try - { - map.put("code", code_ex213); - int resultinfo = cnt213 = mainService.selectInformationInfo(map); - mv.addObject("CNT213", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 전라남도 - try - { - map.put("code", code_ex214); - int resultinfo = cnt214 = mainService.selectInformationInfo(map); - mv.addObject("CNT214", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 전라북도 - try - { - map.put("code", code_ex215); - int resultinfo = cnt215 = mainService.selectInformationInfo(map); - mv.addObject("CNT215", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 제주도 - try - { - map.put("code", code_ex216); - int resultinfo = cnt216 = mainService.selectInformationInfo(map); - mv.addObject("CNT216", getFormattedMoney(resultinfo)); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - } - - // 합계 - int sum4 = (cnt201) + (cnt202) + (cnt203) + (cnt204) + (cnt205) + (cnt206) + (cnt207) + (cnt208) + (cnt209) + (cnt210) + (cnt211) + (cnt212) + (cnt213) + (cnt214) + (cnt215) + (cnt216); - mv.addObject("SUM4", getFormattedMoney(Integer.toString(sum4))); - - // 미지정 - try - { - String code = code_ex1 + "," + code_ex2 + "," + code_ex3 + "," + code_ex4 + "," + code_ex5 + "," + code_ex6 + "," + code_ex11 + "," + code_ex12 + "," + code_ex13 + "," + code_ex14 + "," + code_ex15 + "," + code_ex16 + "," - + code_ex17 + "," + code_ex18 + "," + code_ex201 + "," + code_ex202 + "," + code_ex203 + "," + code_ex204 + "," + code_ex205 + "," + code_ex206 + "," + code_ex207 + "," + code_ex208 + "," + code_ex209 + "," + code_ex210 - + "," + code_ex211 + "," + code_ex212 + "," + code_ex213 + "," + code_ex214 + "," + code_ex215 + "," + code_ex216; - - map.put("code", code); - int resultinfo = cnt_not = mainService.selectInformationInfoNon(map); - mv.addObject("CNTNOT", getFormattedMoney(resultinfo)); - int cnt_not_temp = (cnt_not); - int sum5 = sum3 + sum4 + cnt_not_temp; - - mv.addObject("SUM5", getFormattedMoney(Integer.toString(sum5))); - } - catch (NumberFormatException e) { - log.debug("error", e); - } - catch (IndexOutOfBoundsException e) { - log.debug("error", e); - } - catch (Exception e) { - log.debug("error", e); - }*/ mv.addObject("cls", cls); mv.addObject("mod_cnt", mod_cnt); mv.addObject("input_cnt", input_cnt); mv.addObject("visitors", visitors); mv.addObject("registrant", registrant); - mv.addObject("total_cnt", total_cnt); mv.addObject("year", year); mv.addObject("month", month); mv.addObject("date", date); -// mv.addObject("sessionId", request.getSession().getId()); -// mv.addObject("name", request.getSession().getAttribute("userId")); if (flag) { mv.addObject("dupLogin", flag); diff --git a/src/main/resources/egovframework/egovProps/geoinfo.properties b/src/main/resources/egovframework/egovProps/geoinfo.properties index 642a8028..3faa9526 100644 --- a/src/main/resources/egovframework/egovProps/geoinfo.properties +++ b/src/main/resources/egovframework/egovProps/geoinfo.properties @@ -45,8 +45,8 @@ Globals.PAGELIST = 10 Globals.FileCreatePathZip = c:\\test2\\ # Active X # \uc9c0\ub3c4\uc11c\ubc84 -#Globals.OcxHostUrl = http://218.232.234.166/Server/ -Globals.OcxHostUrl = http://172.12.192.44/Server/ +Globals.OcxHostUrl = http://218.232.234.166/Server/ +#Globals.OcxHostUrl = http://172.12.192.44/Server/ Globals.OcxMapFileVer = 2,0,0,3 Globals.OcxMapClassID = CC13D8F5-F406-4833-855D-F44DA7875776 diff --git a/src/main/webapp/WEB-INF/views/home/index.jsp b/src/main/webapp/WEB-INF/views/home/index.jsp index 8988f40e..80b9008c 100644 --- a/src/main/webapp/WEB-INF/views/home/index.jsp +++ b/src/main/webapp/WEB-INF/views/home/index.jsp @@ -51,6 +51,10 @@ if(val) val.focus(); }); /* == 공지팝업 로드 끝 == */ + + const commaNumberEles = document.getElementsByClassName("comma-number"); + for (i = 0; i < commaNumberEles.length; i++) + commaNumberEles[i].textContent = addComma(commaNumberEles[i].textContent); }); function dupLoginCheck(flag) { @@ -239,6 +243,38 @@ // url = "noticeView.do?idx="+idx; parent.location.href="topMenuSelect.do?url=pdsView&idx="+idx; } + + function addComma( val ) { + val = String(val); + + if( typeof val == "undefined" || val == null || val == "" ) { + return "0"; + } + var decimal = ''; + var num = val.replace(/,/gi, ""); + + //음수이면 잠깐 부호를 떼었다가 나중에 붙여준다. + var isNegative = false; + if( num.indexOf('-') == 0 ) { + isNegative = true; + num = num.replace(/-/gi, ""); + } + + if( num.indexOf('.') > -1 ) { + var arrSplitDecimalPoint = num.split('.'); + num = arrSplitDecimalPoint[0]; + decimal = '.' + arrSplitDecimalPoint[1]; + } + + var num2 = num.split(/(?=(?:\d{3})+$)/).join(",") + decimal; + + //음수이면 잠깐 떼었던 부호를 붙여준다. + if( isNegative == true ) { + num2 = "-" + num2; + } + + return num2; // "1,234,567" + } @@ -314,7 +356,7 @@
시추정보 보유현황
- (${ year }년 ${ month }월 ${ date }일 기준) + (2023년 12월 31일 기준) 자세히보기
@@ -566,7 +608,7 @@

시추정보 DB 구축 현황

- 333,902공의 시추정보DB가 구축되어 있습니다.(2021년 12월 31일 기준) + 390197의 시추정보DB가 구축되어 있습니다.(2023년 12월 31일 기준)

발주처별 구축현황

@@ -593,250 +635,254 @@ 국토교통부 소속기관 - 서울청 - 9,241공 + 서울지방국토관리청 + 9493 국토교통부 보유 - 부산청 - 22,488공 + 부산지방국토관리청 + 22772 - 대전청 - 16,908공 + 대전지방국토관리청 + 17020 - 익산청 - 14,303공 + 익산지방국토관리청 + 14563 - 원주청 - 6,054공 + 원주지방국토관리청 + 6178 행정중심복합도시건설청 - 1,616공 + 1692 새만금개발청 - 399공 + 399 합계 - 71,009공 + 72117 산하기관 한국토지주택공사 - 92,800공 + 94879 국토교통부 보유 한국도로공사 - 34,976공 + 37399 한국수자원공사 - 5,991공 + 7013 한국철도시설공단 - 22,617공 + 24208 한국수력원자력 - 227공 + 227 한국공항공사 - 94공 + 94공 - 한국항만공사 - 519공 + 한국철도공사 + 519 합계 - 157,224공 + 164491 국토교통부 및 산하기관 총 합계 - 228,233공 + 236608 해양수산부 직속 어촌어항과 - 847공 + 847 - 소속기관 부산항만청 - 2,393공 + 2501 해양수산부 보유 인천항만청 - 1,525공 + 1601 여수항만청 - 1010공 + 1131 울산항만청 - 608공 + 629 포항항만청 - 403공 + 406 목포항만청 - 675공 + 709 군산항만청 - 1,128공 + 1168 마산항만청 - 480공 + 522 동해항만청 - 585공 + 592 대산항만청 - 218공 + 226 평택항만청 - 770공 + 793 합계 - 10,642공 + 11125 산하기관 부산항만공사 - 518공 + 603 경기평택항만공사 - 52공 + 52 울산항만공사 - 221공 + 245 인천항만공사 - 393공 + 407 여수광양항만공사 - 107공 + 124 합계 - 1,291공 + 1431 해양수산부 및 산하기관 총 합계 - 11,933공 + 12556 - 지자체 - 광역자치단체 + 지자체 + 광역자치단체 서울특별시 - 16,650공 + 17410 - 부산광역시 - 4,724공 + 5364 대구광역시 - 2,820공 + 3024 인천광역시 - 1,884공 + 2012 광주광역시 - 918공 + 1118 대전광역시 - 457공 + 532 울산광역시 - 832공 + 867 + + + 세종특별자치시 + 315 기초자치단체 경기도 - 9,254공 + 9902 강원도 - 3,507공 + 4161 충청남도 - 2,766공 + 3050 충청북도 - 1,181공 + 1341 경상남도 - 2,059공 + 2182 경상북도 - 2,293공 + 2632 전라남도 - 3,443공 + 4764 전라북도 - 705공 + 733 제주특별자치도 - 211공 + 227 지자체 총 합계 - 53,936공 + 59634 행정안전부 재난관리책임기관 - 10,422공 + 12492 - 민간기관 - 29,378공 + 68907 - 전체 총 합계 - 333,902공 + 390197 diff --git a/src/main/webapp/proxyo2map.jsp b/src/main/webapp/proxyo2map.jsp index 271edc3c..47234374 100644 --- a/src/main/webapp/proxyo2map.jsp +++ b/src/main/webapp/proxyo2map.jsp @@ -7,14 +7,14 @@ <%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% try { - + // 한글인코딩 request.setCharacterEncoding("UTF-8"); // post, get에서 쓸 url을 - //String reqUrl = "http://218.232.234.166/o2map/services/wms"; - String reqUrl = "http://100.10.111.21:8080/o2map/services/wms"; - + String reqUrl = "http://218.232.234.166/o2map/services/wms"; + //String reqUrl = "http://100.10.111.21:8080/o2map/services/wms"; + //GET방식에서 key, value를 url에 넣는 과정 Map paramMap = request.getParameterMap(); Iterator iterator = paramMap.keySet().iterator(); @@ -30,33 +30,33 @@ //get에서 knv를 url에 담는 과정 String middleUrl = ""; while (iterator.hasNext()) { - + String key = (String) iterator.next(); - + if (key.equalsIgnoreCase("url")) { continue; } - + String values[] = (String[]) paramMap.get(key); if (values[0] != null) { middleUrl = middleUrl + key.toUpperCase() + "=" + URLEncoder.encode(values[0], "UTF-8") + "&"; } - + // System.out.println("key : " + key + " ___ value : " + values[0]); - + } - + String resultUrl = reqUrl + middleUrl; - + URL url = null; HttpURLConnection con = null; - + if (request.getMethod().equalsIgnoreCase("GET")) { - + url = new URL(resultUrl); //System.out.println("request : (" + request.getMethod() + ") "+ resultUrl); - + con = (HttpURLConnection) url.openConnection(); con.setDoOutput(true); con.setRequestMethod(request.getMethod()); @@ -72,32 +72,32 @@ os.write(bytes, 0, bytesRead); } } - + } else { - + url = new URL(reqUrl); //System.out.println("request : (" + request.getMethod() + ") "+ reqUrl); - + // POST방식에서 inputStream을 StringBuilder에 붙임 StringBuilder sb = new StringBuilder(); InputStreamReader is = new InputStreamReader(request.getInputStream()); BufferedReader br = new BufferedReader(is); String read = br.readLine(); - + while (read != null) { - sb.append(read); + sb.append(read); read = br.readLine(); } - + String strBody = sb.toString(); System.out.println("before body : " + strBody); - + con = (HttpURLConnection) url.openConnection(); con.setRequestMethod(request.getMethod()); con.setRequestProperty("charset", "UTF-8"); con.setDoOutput(true); con.setUseCaches(false); - + if (strBody.trim().startsWith("<")) { // XML of Post Method con.setRequestProperty("Content-Type", "application/xml"); @@ -106,18 +106,18 @@ strBody = strBody + middleUrl; con.setRequestProperty("Content-Type", request.getContentType()); } - + System.out.println("after body : " + strBody); // StringBuilder를 byte화 시켜서 post로 넘어온 데이터를 담는다 byte[] postData = strBody.getBytes(); con.setRequestProperty("Content-Length", Integer.toString(postData.length)); con.getOutputStream().write(postData); - + } - + out.clear(); out = pageContext.pushBody(); - + response.setContentType(con.getContentType()); InputStream inStream = con.getInputStream(); OutputStream outStream = response.getOutputStream(); @@ -127,16 +127,16 @@ int bytesRead = 0; while ((bytesRead = inStream.read(bytes, 0, length)) > 0) { outStream.write(bytes, 0, bytesRead); - } + } }finally { if (inStream !=null){ inStream.close(); - } + } if (outStream !=null){ outStream.close(); - } + } } - + } catch (Exception e) { System.out.println("proxyo2map proxy exception : " + e); response.setStatus(500);