Merge branch 'main' of http://10.dbnt.co.kr:50501/DBNT/geoinfo_eGov_work
commit
2026d7580e
|
|
@ -15,8 +15,10 @@ import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
@ -27,7 +29,6 @@ import org.codehaus.jackson.JsonParseException;
|
||||||
import org.codehaus.jackson.map.JsonMappingException;
|
import org.codehaus.jackson.map.JsonMappingException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
@ -181,6 +182,7 @@ public class ManageExcelUploadProc03Controller {
|
||||||
_holeCode = _holeCode.replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll ("&","");
|
_holeCode = _holeCode.replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll ("&","");
|
||||||
String _uploadCd = request.getParameter("UPLOAD_CD");
|
String _uploadCd = request.getParameter("UPLOAD_CD");
|
||||||
_uploadCd = _uploadCd.replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll ("&","");
|
_uploadCd = _uploadCd.replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll ("&","");
|
||||||
|
|
||||||
JSONArray _jsonArray = JSONArray.fromObject((String)request.getParameter("DATA"));
|
JSONArray _jsonArray = JSONArray.fromObject((String)request.getParameter("DATA"));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
@ -848,6 +850,7 @@ public class ManageExcelUploadProc03Controller {
|
||||||
rockService.insertTempRockPointloadInfo(map);
|
rockService.insertTempRockPointloadInfo(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
listMap = ("".equals(saveMap.get("rjo6List")))?null:(List<HashMap<String, Object>>) saveMap.get("rjo6List");
|
listMap = ("".equals(saveMap.get("rjo6List")))?null:(List<HashMap<String, Object>>) saveMap.get("rjo6List");
|
||||||
if(null != listMap){
|
if(null != listMap){
|
||||||
for(HashMap<String, Object> map : listMap){
|
for(HashMap<String, Object> map : listMap){
|
||||||
|
|
@ -1710,14 +1713,14 @@ public class ManageExcelUploadProc03Controller {
|
||||||
}
|
}
|
||||||
if("Y".equals(classInfoMap.get("rockPointload"))){
|
if("Y".equals(classInfoMap.get("rockPointload"))){
|
||||||
if("".equals((String)resultMap.get("resultMsg"))){
|
if("".equals((String)resultMap.get("resultMsg"))){
|
||||||
excelWp = ExcelUtil.getRsWp(strFile, "점하중정보", 0, 1, 9);
|
excelWp = ExcelUtil.getRsWp(strFile, "점하중정보", 0, 2, 12); // 1번째 행에 가이드 내용 있음
|
||||||
resultMap = checkStep03_600_rockPointload(request, params, excelWp, savePath, strFile,_projectCode,_holeCode);
|
resultMap = checkStep03_600_rockPointload(request, params, excelWp, savePath, strFile,_projectCode,_holeCode);
|
||||||
jaRpo6 = (null == resultMap.get("list") || "".equals(resultMap.get("list")))?null:JSONArray.fromObject(resultMap.get("list"));
|
jaRpo6 = (null == resultMap.get("list") || "".equals(resultMap.get("list")))?null:JSONArray.fromObject(resultMap.get("list"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if("Y".equals(classInfoMap.get("rockJointshear"))){
|
if("Y".equals(classInfoMap.get("rockJointshear"))){
|
||||||
if("".equals((String)resultMap.get("resultMsg"))){
|
if("".equals((String)resultMap.get("resultMsg"))){
|
||||||
excelWp = ExcelUtil.getRsWp(strFile, "절리면전단정보", 0, 1, 9);
|
excelWp = ExcelUtil.getRsWp(strFile, "절리면전단정보", 0, 2, 12);// 1번째 행에 가이드 내용 있음
|
||||||
resultMap = checkStep03_600_rockJointshear(request, params, excelWp, savePath, strFile,_projectCode,_holeCode);
|
resultMap = checkStep03_600_rockJointshear(request, params, excelWp, savePath, strFile,_projectCode,_holeCode);
|
||||||
jaRjo6 = (null == resultMap.get("list") || "".equals(resultMap.get("list")))?null:JSONArray.fromObject(resultMap.get("list"));
|
jaRjo6 = (null == resultMap.get("list") || "".equals(resultMap.get("list")))?null:JSONArray.fromObject(resultMap.get("list"));
|
||||||
}
|
}
|
||||||
|
|
@ -3232,27 +3235,48 @@ public class ManageExcelUploadProc03Controller {
|
||||||
String fmtMsg = "[암석시험정보 - 절리면전단정보] %s|";
|
String fmtMsg = "[암석시험정보 - 절리면전단정보] %s|";
|
||||||
try{
|
try{
|
||||||
List<HashMap<String, Object>> list = new ArrayList<HashMap<String,Object>>();
|
List<HashMap<String, Object>> list = new ArrayList<HashMap<String,Object>>();
|
||||||
resultMsg = imageUpload(params,"절리면전단정보 그래프", savePath, strFile, resultMsg, "[암석시험정보 - 절리면전단정보시험 그래프] %s|", "절리면전단시험결과 그래프",excelWp.getLength());
|
// resultMsg = imageUpload(params,"절리면전단정보 그래프", savePath, strFile, resultMsg, "[암석시험정보 - 절리면전단정보시험 그래프] %s|", "절리면전단시험결과 그래프",excelWp.getLength());
|
||||||
|
// [YJI / 26.04.14] 그래프 개수는 시료개수(RJOINT_CODE단위) 와 같다.
|
||||||
|
Set<String> SampleSet = new HashSet<>();
|
||||||
|
|
||||||
|
for(int i = 0; i < excelWp.getLength(); i++){
|
||||||
|
String sampleNo = excelWp.get("col1", i).trim();
|
||||||
|
if(!sampleNo.isEmpty()){
|
||||||
|
SampleSet.add(sampleNo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int SampleCnt = SampleSet.size(); // [YJI / 26.04.14] 시료개수
|
||||||
|
resultMsg = imageUpload(params,"절리면전단정보 그래프", savePath, strFile, resultMsg, "[암석시험정보 - 절리면전단정보시험 그래프] %s|", "절리면전단시험결과 그래프",SampleCnt);
|
||||||
|
Set<String> duplicateCheckSet = new HashSet<>(); // [YJI / 26.04.14] 중복입력값 확인용 테스트번호(물성시험 샘플코드), 시료번호(rjoint_code), 시험횟수(test_order)
|
||||||
for(int i=0; i < excelWp.getLength(); i++){
|
for(int i=0; i < excelWp.getLength(); i++){
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col0",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col0",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "심도From는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "테스트번호는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col1",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col1",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "심도To는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "시료번호는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col2",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col2",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "내부마찰각은 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "시험횟수는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col3",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col3",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "점착력은 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "심도From는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col4",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col4",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "수직응력은 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "심도To는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col5",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col5",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "전단응력은 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "내부마찰각은 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col6",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col6",i).trim(),"0123456789.")){
|
||||||
|
resultMsg += String.format(fmtMsg, "점착력은 실수만 입력이 가능합니다.");
|
||||||
|
}
|
||||||
|
if(!StringUtil.containsCharOnly(excelWp.get("col7",i).trim(),"0123456789.")){
|
||||||
|
resultMsg += String.format(fmtMsg, "수직응력은 실수만 입력이 가능합니다.");
|
||||||
|
}
|
||||||
|
if(!StringUtil.containsCharOnly(excelWp.get("col8",i).trim(),"0123456789.")){
|
||||||
|
resultMsg += String.format(fmtMsg, "전단응력은 실수만 입력이 가능합니다.");
|
||||||
|
}
|
||||||
|
if(!StringUtil.containsCharOnly(excelWp.get("col9",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "절리면 압축강도는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "절리면 압축강도는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3262,26 +3286,57 @@ public class ManageExcelUploadProc03Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
HashMap<String,Object> map = new HashMap<>();
|
HashMap<String,Object> map = new HashMap<>();
|
||||||
|
int testNo = Integer.valueOf(excelWp.get("col0",i).trim()); // 사용자가 입력한 순번(물성시험 샘플을 순번으로 찾을때 사용)
|
||||||
|
String targetSampleCode = null;
|
||||||
|
for (Map<String, Object> sample : _sampleInfoList) {
|
||||||
|
String sampleCode = (String) sample.get("SAMPLE_CODE");
|
||||||
|
// SAMPLE_CODE 끝 숫자 추출
|
||||||
|
String numberPart = sampleCode.replaceAll(".*?(\\d+)$", "$1");
|
||||||
|
int number = Integer.parseInt(numberPart);
|
||||||
|
if (number == testNo) {
|
||||||
|
targetSampleCode = sampleCode;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetSampleCode == null) { // 테스트번호에 매핑되는 물성시험 sample코드가 존재하지 않음
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
String.format("물성시험 시료번호를 확인 하세요. (테스트 번호:%s)",testNo));
|
||||||
|
}
|
||||||
|
String sampleNo = excelWp.get("col1",i).trim(); // 시료번호
|
||||||
|
String testOrderStr = excelWp.get("col2",i).trim(); // 시험횟수
|
||||||
|
// 🔥 중복 체크 KEY 생성
|
||||||
|
String duplicateKey = targetSampleCode + "|" + sampleNo + "|" + testOrderStr;
|
||||||
|
// 🔥 중복 검사
|
||||||
|
if (duplicateCheckSet.contains(duplicateKey)) {
|
||||||
|
params.put("resultMsg", "중복되는 시료번호 및 시험횟수가 있습니다. 확인하세요.");
|
||||||
|
return params;
|
||||||
|
} else {
|
||||||
|
duplicateCheckSet.add(duplicateKey);
|
||||||
|
}
|
||||||
|
|
||||||
map.put("PROJECT_CODE" , _projectCode);
|
map.put("PROJECT_CODE" , _projectCode);
|
||||||
map.put("HOLE_CODE" , _holeCode);
|
map.put("HOLE_CODE" , _holeCode);
|
||||||
map.put("RJOINT_CODE" , _holeCode + "J" + StringUtil.lpad(Integer.toString(i+1), "0", 2));
|
map.put("SAMPLE_CODE" , targetSampleCode);
|
||||||
map.put("testOrder" , i+1);
|
map.put("RJOINT_CODE" , _holeCode + "J" + StringUtil.lpad(excelWp.get("col1", i), "0", 2));
|
||||||
map.put("rjointDepthFrom" , excelWp.get("col0", i));
|
map.put("testOrder" , excelWp.get("col2", i));
|
||||||
map.put("rjointDepthTo" , excelWp.get("col1", i));
|
map.put("rjointDepthFrom" , excelWp.get("col3", i));
|
||||||
map.put("rjointPhi" , excelWp.get("col2", i));
|
map.put("rjointDepthTo" , excelWp.get("col4", i));
|
||||||
map.put("rjointC" , excelWp.get("col3", i));
|
map.put("rjointPhi" , excelWp.get("col5", i));
|
||||||
map.put("rjointNoramlStress", excelWp.get("col4", i));
|
map.put("rjointC" , excelWp.get("col6", i));
|
||||||
map.put("rjointShearStress" , excelWp.get("col5", i));
|
map.put("rjointNoramlStress", excelWp.get("col7", i));
|
||||||
map.put("rjointJcs" , excelWp.get("col6", i));
|
map.put("rjointShearStress" , excelWp.get("col8", i));
|
||||||
map.put("rjointRemark" , excelWp.get("col7", i));
|
map.put("rjointJcs" , excelWp.get("col9", i));
|
||||||
|
map.put("rjointRemark" , excelWp.get("col10", i));
|
||||||
map.put("USERID" , request.getSession().getAttribute("USERID"));
|
map.put("USERID" , request.getSession().getAttribute("USERID"));
|
||||||
map.put("testNo" , excelWp.get("col0", i));
|
// map.put("testNo" , excelWp.get("col0", i));
|
||||||
|
|
||||||
map.put("graphImage" , params.get("GRAPH_IMAGE"+i) );
|
// [YJI / 26.04.14] 각 샘플번호 순서에 해당하는 그래프와 연결해줘야한다. (params의 그래프이미지는 index로 처리되어 맞춰준다)
|
||||||
map.put("graphLocal" , params.get("GRAPH_LOCAL"+i) );
|
map.put("graphImage" , params.get("GRAPH_IMAGE"+(Integer.parseInt(sampleNo)-1)) );
|
||||||
|
map.put("graphLocal" , params.get("GRAPH_LOCAL"+(Integer.parseInt(sampleNo)-1)) );
|
||||||
|
|
||||||
map.put("GRAPH_IMAGE" , params.get("GRAPH_IMAGE"+i) );
|
map.put("GRAPH_IMAGE" , params.get("GRAPH_IMAGE"+(Integer.parseInt(sampleNo)-1)) );
|
||||||
map.put("GRAPH_LOCAL" , params.get("GRAPH_LOCAL"+i) );
|
map.put("GRAPH_LOCAL" , params.get("GRAPH_LOCAL"+(Integer.parseInt(sampleNo)-1)) );
|
||||||
|
|
||||||
//rockService.insertTempRockJointshearInfo(params);
|
//rockService.insertTempRockJointshearInfo(params);
|
||||||
list.add(map);
|
list.add(map);
|
||||||
|
|
@ -3293,6 +3348,9 @@ public class ManageExcelUploadProc03Controller {
|
||||||
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
||||||
logger.debug(e.getMessage());
|
logger.debug(e.getMessage());
|
||||||
logger.debug("error", e);
|
logger.debug("error", e);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
params.put("resultMsg", e.getMessage());
|
||||||
|
logger.debug(e.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
||||||
logger.debug(e.getMessage());
|
logger.debug(e.getMessage());
|
||||||
|
|
@ -3311,27 +3369,49 @@ public class ManageExcelUploadProc03Controller {
|
||||||
|
|
||||||
try{
|
try{
|
||||||
List<HashMap<String, Object>> list = new ArrayList<HashMap<String,Object>>();
|
List<HashMap<String, Object>> list = new ArrayList<HashMap<String,Object>>();
|
||||||
resultMsg = imageUpload(params,"점하중정보 그래프", savePath, strFile, resultMsg, "[암석시험정보 - 점하중정보시험 그래프] %s|", "점하중시험결과 그래프",excelWp.getLength());
|
// resultMsg = imageUpload(params,"점하중정보 그래프", savePath, strFile, resultMsg, "[암석시험정보 - 점하중정보시험 그래프] %s|", "점하중시험결과 그래프",excelWp.getLength());
|
||||||
|
// [YJI / 26.04.14] 그래프 개수는 시료개수(ROCK_POINT_CODE단위) 와 같다.
|
||||||
|
Set<String> sampleSet = new HashSet<>();
|
||||||
|
|
||||||
|
for(int i = 0; i < excelWp.getLength(); i++){
|
||||||
|
String sampleNo = excelWp.get("col1", i).trim();
|
||||||
|
if(!sampleNo.isEmpty()){
|
||||||
|
sampleSet.add(sampleNo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int sampleCnt = sampleSet.size(); // [YJI / 26.04.14] 시료개수
|
||||||
|
resultMsg = imageUpload(params,"점하중정보 그래프", savePath, strFile, resultMsg, "[암석시험정보 - 점하중정보시험 그래프] %s|", "점하중시험결과 그래프",sampleCnt);
|
||||||
|
|
||||||
|
Set<String> duplicateCheckSet = new HashSet<>(); // [YJI / 26.04.14] 중복입력값 확인용 테스트번호(물성시험 샘플코드), 시료번호(rock_point_code), 시험횟수(test_order)
|
||||||
for(int i=0; i < excelWp.getLength(); i++){
|
for(int i=0; i < excelWp.getLength(); i++){
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col0",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col0",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "심도From는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "테스트번호는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col1",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col1",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "심도To는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "시료번호는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col2",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col2",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "시료직경은 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "시험횟수는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col3",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col3",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "시료길이는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "심도From는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col4",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col4",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "인장강도는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "심도To는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col5",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col5",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "점하중강도는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "시료직경은 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col6",i).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col6",i).trim(),"0123456789.")){
|
||||||
|
resultMsg += String.format(fmtMsg, "시료길이는 실수만 입력이 가능합니다.");
|
||||||
|
}
|
||||||
|
if(!StringUtil.containsCharOnly(excelWp.get("col7",i).trim(),"0123456789.")){
|
||||||
|
resultMsg += String.format(fmtMsg, "인장강도는 실수만 입력이 가능합니다.");
|
||||||
|
}
|
||||||
|
if(!StringUtil.containsCharOnly(excelWp.get("col8",i).trim(),"0123456789.")){
|
||||||
|
resultMsg += String.format(fmtMsg, "점하중강도는 실수만 입력이 가능합니다.");
|
||||||
|
}
|
||||||
|
if(!StringUtil.containsCharOnly(excelWp.get("col9",i).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, "일축압축강도는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, "일축압축강도는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3341,26 +3421,57 @@ public class ManageExcelUploadProc03Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
HashMap<String,Object> map = new HashMap<>();
|
HashMap<String,Object> map = new HashMap<>();
|
||||||
|
int testNo = Integer.valueOf(excelWp.get("col0",i).trim()); // 사용자가 입력한 순번(물성시험 샘플을 순번으로 찾을때 사용)
|
||||||
|
String targetSampleCode = null;
|
||||||
|
for (Map<String, Object> sample : _sampleInfoList) {
|
||||||
|
String sampleCode = (String) sample.get("SAMPLE_CODE");
|
||||||
|
// SAMPLE_CODE 끝 숫자 추출
|
||||||
|
String numberPart = sampleCode.replaceAll(".*?(\\d+)$", "$1");
|
||||||
|
int number = Integer.parseInt(numberPart);
|
||||||
|
if (number == testNo) {
|
||||||
|
targetSampleCode = sampleCode;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (targetSampleCode == null) { // 테스트번호에 매핑되는 물성시험 sample코드가 존재하지 않음
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
String.format("물성시험 시료번호를 확인 하세요. (테스트 번호:%s)",testNo));
|
||||||
|
}
|
||||||
|
String sampleNo = excelWp.get("col1",i).trim(); // 시료번호
|
||||||
|
String testOrderStr = excelWp.get("col2",i).trim(); // 시험횟수
|
||||||
|
// 🔥 중복 체크 KEY 생성
|
||||||
|
String duplicateKey = targetSampleCode + "|" + sampleNo + "|" + testOrderStr;
|
||||||
|
// 🔥 중복 검사
|
||||||
|
if (duplicateCheckSet.contains(duplicateKey)) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
String.format("점하중 정보가 중복됩니다. 확인하세요. (테스트번호:%s, 시료번호:%s, 시험횟수:%s)",
|
||||||
|
testNo, sampleNo, testOrderStr));
|
||||||
|
} else {
|
||||||
|
duplicateCheckSet.add(duplicateKey);
|
||||||
|
}
|
||||||
|
|
||||||
map.put("PROJECT_CODE" , _projectCode);
|
map.put("PROJECT_CODE" , _projectCode);
|
||||||
map.put("HOLE_CODE" , _holeCode);
|
map.put("HOLE_CODE" , _holeCode);
|
||||||
map.put("ROCK_POINT_CODE" , _holeCode + "O" + StringUtil.lpad(Integer.toString(i+1), "0", 2));
|
map.put("SAMPLE_CODE" , targetSampleCode);
|
||||||
map.put("testOrder" , i+1);
|
map.put("ROCK_POINT_CODE" , _holeCode + "O" + StringUtil.lpad(excelWp.get("col1", i), "0", 2));
|
||||||
map.put("depthFrom" , excelWp.get("col0", i));
|
map.put("testOrder" , excelWp.get("col2", i));
|
||||||
map.put("depthTo" , excelWp.get("col1", i));
|
map.put("depthFrom" , excelWp.get("col3", i));
|
||||||
map.put("dia" , excelWp.get("col2", i));
|
map.put("depthTo" , excelWp.get("col4", i));
|
||||||
map.put("length" , excelWp.get("col3", i));
|
map.put("dia" , excelWp.get("col5", i));
|
||||||
map.put("tesilestrength", excelWp.get("col4", i));
|
map.put("length" , excelWp.get("col6", i));
|
||||||
map.put("pointstrength" , excelWp.get("col5", i));
|
map.put("tesilestrength", excelWp.get("col7", i));
|
||||||
map.put("uniaxial" , excelWp.get("col6", i));
|
map.put("pointstrength" , excelWp.get("col8", i));
|
||||||
map.put("remark" , excelWp.get("col7", i));
|
map.put("uniaxial" , excelWp.get("col9", i));
|
||||||
|
map.put("remark" , excelWp.get("col10", i));
|
||||||
map.put("USERID" , request.getSession().getAttribute("USERID"));
|
map.put("USERID" , request.getSession().getAttribute("USERID"));
|
||||||
map.put("testNo" , excelWp.get("col0", i));
|
// map.put("testNo" , excelWp.get("col0", i));
|
||||||
|
|
||||||
map.put("graphImage" , params.get("GRAPH_IMAGE"+i) );
|
// [YJI / 26.04.14] 각 샘플번호 순서에 해당하는 그래프와 연결해줘야한다. (params의 그래프이미지는 index로 처리되어 맞춰준다)
|
||||||
map.put("graphLocal" , params.get("GRAPH_LOCAL"+i) );
|
map.put("graphImage" , params.get("GRAPH_IMAGE"+(Integer.parseInt(sampleNo)-1)) );
|
||||||
|
map.put("graphLocal" , params.get("GRAPH_LOCAL"+(Integer.parseInt(sampleNo)-1)) );
|
||||||
|
|
||||||
map.put("GRAPH_IMAGE" , params.get("GRAPH_IMAGE"+i) );
|
map.put("GRAPH_IMAGE" , params.get("GRAPH_IMAGE"+(Integer.parseInt(sampleNo)-1)) );
|
||||||
map.put("GRAPH_LOCAL" , params.get("GRAPH_LOCAL"+i) );
|
map.put("GRAPH_LOCAL" , params.get("GRAPH_LOCAL"+(Integer.parseInt(sampleNo)-1)) );
|
||||||
|
|
||||||
//rockService.insertTempRockPointloadInfo(params);
|
//rockService.insertTempRockPointloadInfo(params);
|
||||||
list.add(map);
|
list.add(map);
|
||||||
|
|
@ -3372,6 +3483,9 @@ public class ManageExcelUploadProc03Controller {
|
||||||
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
||||||
logger.debug(e.getMessage());
|
logger.debug(e.getMessage());
|
||||||
logger.debug("error", e);
|
logger.debug("error", e);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
params.put("resultMsg", e.getMessage());
|
||||||
|
logger.debug(e.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
||||||
logger.debug(e.getMessage());
|
logger.debug(e.getMessage());
|
||||||
|
|
@ -5458,6 +5572,7 @@ public class ManageExcelUploadProc03Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
params.put("list", (list.size() < 1)?"":list);
|
params.put("list", (list.size() < 1)?"":list);
|
||||||
|
params.put("resultMsg", resultMsg);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
||||||
logger.debug(e.getMessage());
|
logger.debug(e.getMessage());
|
||||||
|
|
@ -5498,24 +5613,21 @@ public class ManageExcelUploadProc03Controller {
|
||||||
resultMsg = String.format(fmtMsg, k+"번째 테스트 번호는 반드시 입력해야 합니다.");
|
resultMsg = String.format(fmtMsg, k+"번째 테스트 번호는 반드시 입력해야 합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col1",k).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col1",k).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, k+"번째 시간간격은 실수만 입력이 가능합니다.");
|
|
||||||
}
|
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col2",k).trim(),"0123456789.")){
|
|
||||||
resultMsg += String.format(fmtMsg, k+"번째 시간간격(sec)은 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, k+"번째 시간간격(sec)은 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col3",k).trim(),"0123456789.-")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col2",k).trim(),"0123456789.-")){
|
||||||
resultMsg += String.format(fmtMsg, k+"번째 총수두(cm)는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, k+"번째 총수두(cm)는 실수와 -(하이픈) 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col4",k).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col3",k).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, k+"번째 수두차(cm)는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, k+"번째 수두차(cm)는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col5",k).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col4",k).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, k+"번째 유출수량(c㎥)은 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, k+"번째 유출수량(c㎥)은 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col6",k).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col5",k).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, k+"번째 수량(c㎥)은 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, k+"번째 수량(c㎥)은 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
if(!StringUtil.containsCharOnly(excelWp.get("col7",k).trim(),"0123456789.")){
|
if(!StringUtil.containsCharOnly(excelWp.get("col6",k).trim(),"0123456789.")){
|
||||||
resultMsg += String.format(fmtMsg, k+"번째 투수계수(K,cm/sec)는 실수만 입력이 가능합니다.");
|
resultMsg += String.format(fmtMsg, k+"번째 투수계수(K,cm/sec)는 실수만 입력이 가능합니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5552,6 +5664,10 @@ public class ManageExcelUploadProc03Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
HashMap<String,Object> map = new HashMap<>();
|
HashMap<String,Object> map = new HashMap<>();
|
||||||
|
String fieldperSubTotalHead = excelWp.get("col2", k).trim();
|
||||||
|
if("-".equals(fieldperSubTotalHead)) {
|
||||||
|
fieldperSubTotalHead = "-999";
|
||||||
|
}
|
||||||
String fieldperSubFallingHead = excelWp.get("col3", k).trim();
|
String fieldperSubFallingHead = excelWp.get("col3", k).trim();
|
||||||
if("-".equals(fieldperSubFallingHead)) {
|
if("-".equals(fieldperSubFallingHead)) {
|
||||||
fieldperSubFallingHead = "-999";
|
fieldperSubFallingHead = "-999";
|
||||||
|
|
@ -5562,8 +5678,7 @@ public class ManageExcelUploadProc03Controller {
|
||||||
map.put("fieldperCode", mFieldperCode);
|
map.put("fieldperCode", mFieldperCode);
|
||||||
map.put("fieldperOrder", tNo);
|
map.put("fieldperOrder", tNo);
|
||||||
map.put("fieldperSubTime", excelWp.get("col1", k).trim());
|
map.put("fieldperSubTime", excelWp.get("col1", k).trim());
|
||||||
map.put("fieldperSubTotalHead", excelWp.get("col2", k).trim());
|
map.put("fieldperSubTotalHead", fieldperSubTotalHead);
|
||||||
// map.put("fieldperSubFallingHead", excelWp.get("col3", k).trim()); // [YJI / 26.04.09] 엑셀 업로드 '-' 입력 지원. 입력값이 '-' 이면 DB에 저장은 -999로 한다.
|
|
||||||
map.put("fieldperSubFallingHead", fieldperSubFallingHead);
|
map.put("fieldperSubFallingHead", fieldperSubFallingHead);
|
||||||
map.put("fieldperSubWaterLoose", excelWp.get("col4", k).trim());
|
map.put("fieldperSubWaterLoose", excelWp.get("col4", k).trim());
|
||||||
map.put("fieldperSubQuantity", excelWp.get("col5", k).trim());
|
map.put("fieldperSubQuantity", excelWp.get("col5", k).trim());
|
||||||
|
|
@ -8255,9 +8370,17 @@ public class ManageExcelUploadProc03Controller {
|
||||||
List<HashMap<String, Object>> listMap2 = null;
|
List<HashMap<String, Object>> listMap2 = null;
|
||||||
listMap2 = ("".equals(saveMap.get(checkList)))?null:(List<HashMap<String, Object>>) saveMap.get(checkList);
|
listMap2 = ("".equals(saveMap.get(checkList)))?null:(List<HashMap<String, Object>>) saveMap.get(checkList);
|
||||||
if(null != listMap2) {
|
if(null != listMap2) {
|
||||||
|
Set<String> movedFileSet = new HashSet<>(); // [YJI / 26.04.15] 암석-점하중, 절리면전단은 샘플+횟수 별 list 데이타가 있음. 그래프는 샘플별이라 중복되어 if문을 탈출하여 중복 체크 처리에 사용
|
||||||
for(int i=0; i< listMap2.size(); i++) {
|
for(int i=0; i< listMap2.size(); i++) {
|
||||||
if(blFileMove){
|
String fileName = (String) listMap2.get(i).get("graphImage"); //[YJI / 26.04.15] 파일이동 처리 전 동일 파일 처리 여부 확인을 위한 파일명 취득
|
||||||
blFileMove = moveFile(request, (String)listMap2.get(i).get("graphImage"), moveFolder, "");
|
// if(blFileMove){
|
||||||
|
if(blFileMove && !movedFileSet.contains(fileName)){
|
||||||
|
// [YJI / 26.04.15] 파일 이동 처리 전 동일 파일 처리인지 먼저 체크.
|
||||||
|
// blFileMove = moveFile(request, (String)listMap2.get(i).get("graphImage"), moveFolder, "");
|
||||||
|
boolean result = moveFile(request, fileName, moveFolder, "");
|
||||||
|
if(result){
|
||||||
|
movedFileSet.add(fileName); // 🔥 이동 완료 기록
|
||||||
|
}
|
||||||
String path2 = request.getSession().getServletContext().getRealPath("/");
|
String path2 = request.getSession().getServletContext().getRealPath("/");
|
||||||
path2 = path2 + "files"+ "\\" + "web"+ "\\" + "CH"+"\\" + _projectCode+"\\"+_holeCode+"\\"+moveSaveFolder;
|
path2 = path2 + "files"+ "\\" + "web"+ "\\" + "CH"+"\\" + _projectCode+"\\"+_holeCode+"\\"+moveSaveFolder;
|
||||||
String path3 = request.getSession().getServletContext().getRealPath("/");
|
String path3 = request.getSession().getServletContext().getRealPath("/");
|
||||||
|
|
|
||||||
|
|
@ -187,6 +187,9 @@ public class RockServiceImpl implements RockService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insertTempRockJointshear(HashMap<String,Object> params) throws Exception {
|
public int insertTempRockJointshear(HashMap<String,Object> params) throws Exception {
|
||||||
|
if ("".equals(params.get("SAMPLE_CODE"))) { // [YJI / 26.04.14] 컬러 추가(SAMPLE_CODE)로 Not NULL 관련 처리
|
||||||
|
params.put("SAMPLE_CODE", "NODATA");
|
||||||
|
}
|
||||||
return rockMapper.insertTempRockJointshear(params);
|
return rockMapper.insertTempRockJointshear(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -207,6 +210,9 @@ public class RockServiceImpl implements RockService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insertTempRockJointshearInfo(HashMap<String,Object> params) throws Exception {
|
public int insertTempRockJointshearInfo(HashMap<String,Object> params) throws Exception {
|
||||||
|
if ("".equals(params.get("SAMPLE_CODE"))) { // [YJI / 26.04.14] 컬러 추가(SAMPLE_CODE)로 Not NULL 관련 처리
|
||||||
|
params.put("SAMPLE_CODE", "NODATA");
|
||||||
|
}
|
||||||
return rockMapper.insertTempRockJointshearInfo(params);
|
return rockMapper.insertTempRockJointshearInfo(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -232,6 +238,9 @@ public class RockServiceImpl implements RockService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insertTempRockPointload(HashMap<String,Object> params) throws Exception {
|
public int insertTempRockPointload(HashMap<String,Object> params) throws Exception {
|
||||||
|
if ("".equals(params.get("SAMPLE_CODE"))) { // [YJI / 26.04.14] 컬러 추가(SAMPLE_CODE)로 Not NULL 관련 처리
|
||||||
|
params.put("SAMPLE_CODE", "NODATA");
|
||||||
|
}
|
||||||
return rockMapper.insertTempRockPointload(params);
|
return rockMapper.insertTempRockPointload(params);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -251,6 +260,9 @@ public class RockServiceImpl implements RockService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insertTempRockPointloadInfo(HashMap<String,Object> params) throws Exception {
|
public int insertTempRockPointloadInfo(HashMap<String,Object> params) throws Exception {
|
||||||
|
if ("".equals(params.get("SAMPLE_CODE"))) { // [YJI / 26.04.14] 컬러 추가(SAMPLE_CODE)로 Not NULL 관련 처리
|
||||||
|
params.put("SAMPLE_CODE", "NODATA");
|
||||||
|
}
|
||||||
return rockMapper.insertTempRockPointloadInfo(params);
|
return rockMapper.insertTempRockPointloadInfo(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -669,7 +669,8 @@
|
||||||
GRAPH_IMAGE ,
|
GRAPH_IMAGE ,
|
||||||
GRAPH_LOCAL ,
|
GRAPH_LOCAL ,
|
||||||
USERID ,
|
USERID ,
|
||||||
DATETIME
|
DATETIME,
|
||||||
|
SAMPLE_CODE
|
||||||
)VALUES(
|
)VALUES(
|
||||||
#{PROJECT_CODE},
|
#{PROJECT_CODE},
|
||||||
#{HOLE_CODE},
|
#{HOLE_CODE},
|
||||||
|
|
@ -686,7 +687,8 @@
|
||||||
#{GRAPH_IMAGE},
|
#{GRAPH_IMAGE},
|
||||||
#{GRAPH_LOCAL},
|
#{GRAPH_LOCAL},
|
||||||
#{USERID},
|
#{USERID},
|
||||||
SYSDATE
|
SYSDATE,
|
||||||
|
#{SAMPLE_CODE}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -823,7 +825,8 @@
|
||||||
GRAPH_IMAGE ,
|
GRAPH_IMAGE ,
|
||||||
GRAPH_LOCAL ,
|
GRAPH_LOCAL ,
|
||||||
USERID ,
|
USERID ,
|
||||||
DATETIME
|
DATETIME,
|
||||||
|
SAMPLE_CODE
|
||||||
)VALUES(
|
)VALUES(
|
||||||
#{PROJECT_CODE},
|
#{PROJECT_CODE},
|
||||||
#{HOLE_CODE},
|
#{HOLE_CODE},
|
||||||
|
|
@ -840,7 +843,8 @@
|
||||||
#{GRAPH_IMAGE},
|
#{GRAPH_IMAGE},
|
||||||
#{GRAPH_LOCAL},
|
#{GRAPH_LOCAL},
|
||||||
#{USERID},
|
#{USERID},
|
||||||
SYSDATE
|
SYSDATE,
|
||||||
|
#{SAMPLE_CODE}
|
||||||
)
|
)
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue