diff --git a/src/main/java/geoinfo/regi/manageList/ManageExcelUploadProc03Controller.java b/src/main/java/geoinfo/regi/manageList/ManageExcelUploadProc03Controller.java index 8697821c..261b276a 100644 --- a/src/main/java/geoinfo/regi/manageList/ManageExcelUploadProc03Controller.java +++ b/src/main/java/geoinfo/regi/manageList/ManageExcelUploadProc03Controller.java @@ -1812,7 +1812,7 @@ public class ManageExcelUploadProc03Controller { jsonObj.put("wp3sList", (null == jaWpSub || "".equals(jaWpSub))?"":jaWpSub.toString()); jsonObj.put("pe3sList", (null == jaPeSub || "".equals(jaPeSub))?"":jaPeSub.toString()); - jsonObj.put("sm4List", (null == jaCp || "".equals(jaSm4))?"":jaSm4.toString()); + jsonObj.put("sm4List", (null == jaCp || jaSm4 == null || "".equals(jaSm4))?"":jaSm4.toString()); // 기본물성시험정보 jsonObj.put("cl5List", (null == jaCl5 || "".equals(jaCl5))?"":jaCl5.toString()); jsonObj.put("cb5List", (null == jaCb5 || "".equals(jaCb5))?"":jaCb5.toString()); @@ -6465,10 +6465,18 @@ public class ManageExcelUploadProc03Controller { String resultMsg = ""; String fmtMsg = "[기본물성시험정보] %s|"; + + RsWrapper excelWpHeader = ExcelUtil.getRsWp(strFile, "기본물성시험정보", 1, 0, 11); + String szHasNoBasicPhysicalPropertyTest = excelWpHeader.get("col10",0).trim(); // 기본물성시험 데이터가 없는 사업 여부를 체크한다. TRUE면 기본물성시험 데이터가 없는사업이며, FALSE면 기본물성시험 데이터가 있는 일반적인 사업이다. + boolean hasNoBasicPhysicalPropertyTest = false; + if( szHasNoBasicPhysicalPropertyTest != null && szHasNoBasicPhysicalPropertyTest.equalsIgnoreCase("true") ) { + hasNoBasicPhysicalPropertyTest = true; + } try{ List> list = new ArrayList>(); - for(int i=1; i < excelWp.getLength(); i++) { + int excelWpLength = excelWp.getLength(); + for(int i=1; i < excelWpLength; i++) { if(!StringUtil.containsCharOnly(excelWp.get("col0",i).trim(),"0123456789.")){ resultMsg = String.format(fmtMsg, i + "번째 심도(from)는 실수만 입력이 가능합니다."); } @@ -6543,25 +6551,74 @@ public class ManageExcelUploadProc03Controller { break; } } - + //List items2 = sampleService.getSampleInfo(params); + String sampleCode = _holeCode + shapeCode + StringUtil.lpad(String.valueOf(i), "0", 2); + if( hasNoBasicPhysicalPropertyTest ) { + sampleCode = _holeCode + "-999"; + } + String sampleNumber = shapeCode + StringUtil.lpad(String.valueOf(i), "0", 2); + if( hasNoBasicPhysicalPropertyTest ) { + sampleNumber = "-999"; + } + String sampleDepthFrom = excelWp.get("col0", i).trim(); + if( hasNoBasicPhysicalPropertyTest ) { + sampleDepthFrom = "-999"; + } + String sampleDepthTo = excelWp.get("col1", i).trim(); + if( hasNoBasicPhysicalPropertyTest ) { + sampleDepthTo = "-999"; + } + String sampleUscs = excelWp.get("col10", i).trim(); + if( hasNoBasicPhysicalPropertyTest ) { + sampleUscs = "-999"; + } + String sampleSamplingMethod = samplingCode; + String sampleShape = shapeCode; + if( hasNoBasicPhysicalPropertyTest ) { + sampleShape = "-999"; + } + String sampleGs = excelWp.get("col4", i).trim(); + if( hasNoBasicPhysicalPropertyTest ) { + sampleGs = "-999"; + } + String sampleWc = excelWp.get("col5", i).trim(); + if( hasNoBasicPhysicalPropertyTest ) { + sampleWc = "-999"; + } + String sampleLl = excelWp.get("col6", i).trim(); + if( hasNoBasicPhysicalPropertyTest ) { + sampleLl = "-999"; + } + String samplePi = excelWp.get("col7", i).trim(); + if( hasNoBasicPhysicalPropertyTest ) { + samplePi = "-999"; + } + String sampleDesc = excelWp.get("col8", i).trim(); + if( hasNoBasicPhysicalPropertyTest ) { + sampleDesc = "-"; + } + String sampleRd = excelWp.get("col9", i).trim(); + if( hasNoBasicPhysicalPropertyTest ) { + sampleRd = "-999"; + } HashMap map = new HashMap<>(); map.put("PROJECT_CODE" , _projectCode); map.put("HOLE_CODE" , _holeCode); - map.put("SAMPLE_CODE" , _holeCode+shapeCode+ StringUtil.lpad(String.valueOf(i), "0", 2)); - map.put("SAMPLE_NUMBER" , shapeCode+ StringUtil.lpad(String.valueOf(i), "0", 2)); - map.put("SAMPLE_DEPTH_FROM" , excelWp.get("col0", i).trim()); - map.put("SAMPLE_DEPTH_TO" , excelWp.get("col1", i).trim()); - map.put("SAMPLE_USCS" , excelWp.get("col10", i).trim()); - map.put("SAMPLE_SAMPLING_METHOD", samplingCode); - map.put("SAMPLE_SHAPE" , shapeCode); - map.put("SAMPLE_GS" , excelWp.get("col4", i).trim()); - map.put("SAMPLE_WC" , excelWp.get("col5", i).trim()); - map.put("SAMPLE_LL" , excelWp.get("col6", i).trim()); - map.put("SAMPLE_PI" , excelWp.get("col7", i).trim()); - map.put("SAMPLE_DESC" , excelWp.get("col8", i).trim()); - map.put("SAMPLE_RD" , excelWp.get("col9", i).trim()); + map.put("SAMPLE_CODE", sampleCode); + map.put("SAMPLE_NUMBER", sampleNumber); + map.put("SAMPLE_DEPTH_FROM", sampleDepthFrom); + map.put("SAMPLE_DEPTH_TO", sampleDepthTo); + map.put("SAMPLE_USCS", sampleUscs); + map.put("SAMPLE_SAMPLING_METHOD", sampleSamplingMethod); + map.put("SAMPLE_SHAPE", sampleShape); + map.put("SAMPLE_GS", sampleGs); + map.put("SAMPLE_WC", sampleWc); + map.put("SAMPLE_LL", sampleLl); + map.put("SAMPLE_PI", samplePi); + map.put("SAMPLE_DESC", sampleDesc); + map.put("SAMPLE_RD", sampleRd); map.put("USERID" , request.getSession().getAttribute("USERID")); //map.put("SAMPLE_CODE", _holeCode+shapeCode+ StringUtil.lpad(String.valueOf(items2.size()+1), "0", 2)); //map.put("SAMPLE_NUMBER", shapeCode+ StringUtil.lpad(String.valueOf(items2.size()+1), "0", 2)); @@ -6570,6 +6627,43 @@ public class ManageExcelUploadProc03Controller { list.add(map); } + if( excelWpLength == 1) { // header 맨 아래줄 때문에 excelWpLength가 항상 1이다. + if( hasNoBasicPhysicalPropertyTest ) { + String sampleCode = _holeCode + "-999"; + String sampleNumber = "-999"; + String sampleDepthFrom = "-999"; + String sampleDepthTo = "-999"; + String sampleUscs = "-999"; + String sampleShape = "-999"; + String sampleGs = "-999"; + String sampleWc = "-999"; + String sampleLl = "-999"; + String samplePi = "-999"; + String sampleDesc = "-"; + String sampleRd = "-999"; + + HashMap map = new HashMap<>(); + map.put("PROJECT_CODE" , _projectCode); + map.put("HOLE_CODE" , _holeCode); + map.put("SAMPLE_CODE", sampleCode); + map.put("SAMPLE_NUMBER", sampleNumber); + map.put("SAMPLE_DEPTH_FROM", sampleDepthFrom); + map.put("SAMPLE_DEPTH_TO", sampleDepthTo); + map.put("SAMPLE_USCS", sampleUscs); + //map.put("SAMPLE_SAMPLING_METHOD", sampleSamplingMethod); + map.put("SAMPLE_SHAPE", sampleShape); + map.put("SAMPLE_GS", sampleGs); + map.put("SAMPLE_WC", sampleWc); + map.put("SAMPLE_LL", sampleLl); + map.put("SAMPLE_PI", samplePi); + map.put("SAMPLE_DESC", sampleDesc); + map.put("SAMPLE_RD", sampleRd); + map.put("USERID" , request.getSession().getAttribute("USERID")); + list.add(map); + } else { + params.put("resultMsg", "기본물성시험정보 데이터가 없습니다. 기본물성시험정보가 없는 사업인 경우, '기본물성시험 데이터가 없는 사업:'에서 TRUE를 선택해주세요. 엑셀에 '기본물성시험 데이터가 없는 사업:'이 없는 경우, 엑셀양식을 새로 다운로드 해주세요."); + } + } params.put("list", (list.size() < 1)?"":list); } catch (NumberFormatException e) { params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요."); @@ -6743,6 +6837,13 @@ public class ManageExcelUploadProc03Controller { String _holeWlUnit = excel1Wp.get("col2",12).trim(); //지하수위단위 String _holeTotalDepth = excel1Wp.get("col3",13).trim(); //굴진심도 String _holeCasingDepth = excel1Wp.get("col3",14).trim(); //케이싱심도 + if( _holeCasingDepth == null ) { + params.put("resultMsg", "케이싱 심도 값이 null입니다."); + return params; + } + if( _holeCasingDepth.trim().equals("-") ) { + _holeCasingDepth = "-999"; // 케이싱 심도 값을 - 처리한다. + } String _holeDia = excel1Wp.get("col2",16).trim(); //시추공경 String _holeBoringMethod = (excel1Wp.get("col2",18).trim().equals("회전수세식")) ? "1" : (excel1Wp.get("col2",18).trim().equals("회전유압식")) ? "2":"3"; //시추방법 @@ -6860,7 +6961,7 @@ public class ManageExcelUploadProc03Controller { if(excel1Wp.get("col10",10).trim().length() != 8 || !DateUtil.isDate(_eDate,"yyyyMMdd")){ resultMsg += String.format(fmtDate, "시추종료일의"); } - if(!StringUtil.containsCharOnly(excel1Wp.get("col2",11).trim(),"0123456789.")){ + if(!StringUtil.containsCharOnly(excel1Wp.get("col2",11).trim(),"0123456789.-")){ resultMsg += String.format(fmtFloat, "표고 (m)는"); } if(!StringUtil.containsCharOnly(excel1Wp.get("col3",12).trim(),"0123456789.")){ @@ -6869,7 +6970,7 @@ public class ManageExcelUploadProc03Controller { if(!StringUtil.containsCharOnly(excel1Wp.get("col3",13).trim(),"0123456789.")){ resultMsg += String.format(fmtFloat, "굴진심도 (m)는"); } - if(!StringUtil.containsCharOnly(excel1Wp.get("col3",14).trim(),"0123456789.")){ + if(!StringUtil.containsCharOnly(excel1Wp.get("col3",14).trim(),"0123456789.-")){ resultMsg += String.format(fmtFloat, "케이싱심도 (m)"); } if(!StringUtil.containsCharOnly(excel1Wp.get("col2",15).trim(),"0123456789.")){ diff --git a/src/main/webapp/WEB-INF/views/web/input/excel_step00.jsp b/src/main/webapp/WEB-INF/views/web/input/excel_step00.jsp index 0ad60f8b..0aa12693 100644 --- a/src/main/webapp/WEB-INF/views/web/input/excel_step00.jsp +++ b/src/main/webapp/WEB-INF/views/web/input/excel_step00.jsp @@ -200,7 +200,7 @@ function getFileInfo(e) {

시추공 정보 엑셀 업로드

-
- 엑셀입력 양식이 변경되었습니다. 메인페이지에서 엑셀입력 양식을 확인 부탁드립니다.
+
- 엑셀입력 양식이 변경되었습니다. 메인페이지에서 엑셀입력 양식을 확인 부탁드립니다. 변경일자: 2026년 03월 25일 수요일
diff --git a/src/main/webapp/WEB-INF/views/web/input/excel_step31.jsp b/src/main/webapp/WEB-INF/views/web/input/excel_step31.jsp index 33e2afbe..37ce6ecc 100644 --- a/src/main/webapp/WEB-INF/views/web/input/excel_step31.jsp +++ b/src/main/webapp/WEB-INF/views/web/input/excel_step31.jsp @@ -948,7 +948,7 @@ function fn_help_tour(){
- 저장버튼은 ↑↑↑↑ 위로 화면 스크롤 후, 시추공번호(BH001, TB001 등) 우측에 '저장 후 다음 시추공 입력' 버튼이 존재합니다. + 입력 완료 시 저장 버튼이 나타납니다. 화면 상단 시추공 번호 옆의 [저장 후 다음 시추공 입력] 버튼을 확인하세요.