diff --git a/2_apply.bat b/apply.bat similarity index 100% rename from 2_apply.bat rename to apply.bat diff --git a/list.txt b/list.txt index 606a577c..9ef77b7e 100644 --- a/list.txt +++ b/list.txt @@ -1,11 +1,8 @@ -#src\main\resources\egovframework\egovProps\globals.properties +src\main\resources\egovframework\egovProps\globals.properties #src\main\java\geoinfo\regi\manageList\ManageExcelUploadProc01Controller.java #src\main\webapp\WEB-INF\views\web\input\excel_step00.jsp #src\main\webapp\WEB-INF\views\web\input\excel_step31.jsp src\main\webapp\com\css\common.v2.0.css src\main\webapp\com\css\common.v2.0.css.map -src\main\webapp\WEB-INF\views\home\index.jsp -src\main\webapp\WEB-INF\views\web\manage\createZip.jsp -src\main\java\geoinfo\regi\basicInfo\BasicController.java -src\main\webapp\WEB-INF\views\web\input\basic\labInfoFieldPressuremeter.jsp -src\main\webapp\js\map\main\left\left.js \ No newline at end of file +src\main\webapp\WEB-INF\views\web\input\meta_info1.jsp +src\main\webapp\WEB-INF\views\web\manage\list_reg.jsp \ No newline at end of file diff --git a/src/main/java/geoinfo/com/file/service/impl/FileServiceImpl.java b/src/main/java/geoinfo/com/file/service/impl/FileServiceImpl.java index 9cd76c3d..5f448db3 100644 --- a/src/main/java/geoinfo/com/file/service/impl/FileServiceImpl.java +++ b/src/main/java/geoinfo/com/file/service/impl/FileServiceImpl.java @@ -12,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") @@ -20,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 selectFileInfo(Map map) throws Exception { @@ -43,6 +47,7 @@ public class FileServiceImpl implements FileService{ List> 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")) { diff --git a/src/main/java/geoinfo/main/login/LoginController.java b/src/main/java/geoinfo/main/login/LoginController.java index cda9d1ef..b88b3509 100644 --- a/src/main/java/geoinfo/main/login/LoginController.java +++ b/src/main/java/geoinfo/main/login/LoginController.java @@ -1613,6 +1613,12 @@ public class LoginController { map.clear(); map.put("table", "WEB_MEMBER_IN"); map.put("values", "PSWD_MONTH=SYSDATE, PASSWD='" + passwordch + "'"); + if( DI != null && !DI.isEmpty() ) { + //DI값을 업데이트 한다. + String values = MyUtil.getStringFromObject( map.get("values") ); + values += ", DUPINFO='" + DI + "'"; + map.put("values", values); + } map.put("where", "TRIM(USERID)='" + SessionuserId + "'"); affectedRows = loginService.userUpdate(map); @@ -1654,7 +1660,7 @@ public class LoginController { // 이미 등록되어 있는경우 날짜만 업데이트한다. 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]; diff --git a/src/main/java/geoinfo/map/main/MapMainController.java b/src/main/java/geoinfo/map/main/MapMainController.java index ea815ee1..10e998c1 100644 --- a/src/main/java/geoinfo/map/main/MapMainController.java +++ b/src/main/java/geoinfo/map/main/MapMainController.java @@ -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; @@ -52,8 +53,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") ) { diff --git a/src/main/java/geoinfo/map/mapControl/MapContorlController.java b/src/main/java/geoinfo/map/mapControl/MapContorlController.java index c77c347b..f0232349 100644 --- a/src/main/java/geoinfo/map/mapControl/MapContorlController.java +++ b/src/main/java/geoinfo/map/mapControl/MapContorlController.java @@ -36,6 +36,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 +364,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 +456,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 +551,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 = ""; @@ -802,7 +803,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 projectHodeCode = mapControlService.selectHodeCode(params); if(projectHodeCode != null ) { String hodeCode[] = new String[projectHodeCode.size()]; @@ -848,7 +854,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") ) { diff --git a/src/main/java/geoinfo/util/MyUtil.java b/src/main/java/geoinfo/util/MyUtil.java index 7fa0e39b..13aa7f6f 100644 --- a/src/main/java/geoinfo/util/MyUtil.java +++ b/src/main/java/geoinfo/util/MyUtil.java @@ -5,6 +5,7 @@ import java.math.BigDecimal; import java.net.URLDecoder; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; +import java.sql.SQLException; import java.sql.Timestamp; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; @@ -798,5 +799,39 @@ public final class MyUtil { return false; } + + /** + * Oracle 11g의 CLOB값을 String 값으로 변환한다. + * @param clob + * @return + * @throws SQLException + */ + public static String ClobToString(java.sql.Clob clob) throws SQLException { + String clobData = ""; + if (clob != null) { + java.io.Reader reader = clob.getCharacterStream(); + java.io.BufferedReader br = new java.io.BufferedReader(reader); + StringBuilder sb = new StringBuilder(); + String line; + try { + while ((line = br.readLine()) != null) { + sb.append(line); + sb.append("\n"); // 필요에 따라 줄바꿈 추가 + } + clobData = sb.toString(); + } catch (java.io.IOException e) { + e.printStackTrace(); + // 오류 처리 + } finally { + try { + br.close(); + reader.close(); + } catch (java.io.IOException e) { + e.printStackTrace(); + } + } + } + return clobData; + } } diff --git a/src/main/resources/egovframework/sqlmap/mapper/main/Login_SQL.xml b/src/main/resources/egovframework/sqlmap/mapper/main/Login_SQL.xml index e0e1359a..173bad68 100644 --- a/src/main/resources/egovframework/sqlmap/mapper/main/Login_SQL.xml +++ b/src/main/resources/egovframework/sqlmap/mapper/main/Login_SQL.xml @@ -55,7 +55,7 @@ WEB_MEMBER_IN WHERE USERID = #{userId} AND - DUPINFO = #{DI} + (DUPINFO = #{DI} OR DUPINFO IS NULL) - * 비밀번호는 숫자와 영문자 조합으로 10~15 자리를 사용해야 합니다.* 비밀번호는 숫자와 영문자 조합으로 10~15 자리를 사용해야 합니다. diff --git a/src/main/webapp/WEB-INF/views/map/mapInformation/sichuDownload.jsp b/src/main/webapp/WEB-INF/views/map/mapInformation/sichuDownload.jsp index 58a47eb5..ae49dd59 100644 --- a/src/main/webapp/WEB-INF/views/map/mapInformation/sichuDownload.jsp +++ b/src/main/webapp/WEB-INF/views/map/mapInformation/sichuDownload.jsp @@ -17,9 +17,9 @@ function downloadSichu(){ this.close(); } - +