|
|
|
|
@ -15,10 +15,8 @@ import java.util.ArrayList;
|
|
|
|
|
import java.util.Calendar;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
@ -29,6 +27,7 @@ import org.codehaus.jackson.JsonParseException;
|
|
|
|
|
import org.codehaus.jackson.map.JsonMappingException;
|
|
|
|
|
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;
|
|
|
|
|
@ -182,7 +181,6 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
_holeCode = _holeCode.replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll ("&","");
|
|
|
|
|
String _uploadCd = request.getParameter("UPLOAD_CD");
|
|
|
|
|
_uploadCd = _uploadCd.replaceAll("\\.", "").replaceAll("/", "").replaceAll("\\\\", "").replaceAll ("&","");
|
|
|
|
|
|
|
|
|
|
JSONArray _jsonArray = JSONArray.fromObject((String)request.getParameter("DATA"));
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
@ -850,7 +848,6 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
rockService.insertTempRockPointloadInfo(map);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
listMap = ("".equals(saveMap.get("rjo6List")))?null:(List<HashMap<String, Object>>) saveMap.get("rjo6List");
|
|
|
|
|
if(null != listMap){
|
|
|
|
|
for(HashMap<String, Object> map : listMap){
|
|
|
|
|
@ -1713,14 +1710,14 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
}
|
|
|
|
|
if("Y".equals(classInfoMap.get("rockPointload"))){
|
|
|
|
|
if("".equals((String)resultMap.get("resultMsg"))){
|
|
|
|
|
excelWp = ExcelUtil.getRsWp(strFile, "점하중정보", 0, 2, 12); // 1번째 행에 가이드 내용 있음
|
|
|
|
|
excelWp = ExcelUtil.getRsWp(strFile, "점하중정보", 0, 1, 9);
|
|
|
|
|
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"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if("Y".equals(classInfoMap.get("rockJointshear"))){
|
|
|
|
|
if("".equals((String)resultMap.get("resultMsg"))){
|
|
|
|
|
excelWp = ExcelUtil.getRsWp(strFile, "절리면전단정보", 0, 2, 12);// 1번째 행에 가이드 내용 있음
|
|
|
|
|
excelWp = ExcelUtil.getRsWp(strFile, "절리면전단정보", 0, 1, 9);
|
|
|
|
|
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"));
|
|
|
|
|
}
|
|
|
|
|
@ -3235,48 +3232,27 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
String fmtMsg = "[암석시험정보 - 절리면전단정보] %s|";
|
|
|
|
|
try{
|
|
|
|
|
List<HashMap<String, Object>> list = new ArrayList<HashMap<String,Object>>();
|
|
|
|
|
// 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)
|
|
|
|
|
resultMsg = imageUpload(params,"절리면전단정보 그래프", savePath, strFile, resultMsg, "[암석시험정보 - 절리면전단정보시험 그래프] %s|", "절리면전단시험결과 그래프",excelWp.getLength());
|
|
|
|
|
for(int i=0; i < excelWp.getLength(); i++){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col0",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "테스트번호는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col1",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "시료번호는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col2",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "시험횟수는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col3",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "심도From는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col4",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col1",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "심도To는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col5",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col2",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "내부마찰각은 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col6",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col3",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "점착력은 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col7",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col4",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "수직응력은 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col8",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col5",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "전단응력은 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col9",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col6",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "절리면 압축강도는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -3286,57 +3262,26 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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("HOLE_CODE" , _holeCode);
|
|
|
|
|
map.put("SAMPLE_CODE" , targetSampleCode);
|
|
|
|
|
map.put("RJOINT_CODE" , _holeCode + "J" + StringUtil.lpad(excelWp.get("col1", i), "0", 2));
|
|
|
|
|
map.put("testOrder" , excelWp.get("col2", i));
|
|
|
|
|
map.put("rjointDepthFrom" , excelWp.get("col3", i));
|
|
|
|
|
map.put("rjointDepthTo" , excelWp.get("col4", i));
|
|
|
|
|
map.put("rjointPhi" , excelWp.get("col5", i));
|
|
|
|
|
map.put("rjointC" , excelWp.get("col6", i));
|
|
|
|
|
map.put("rjointNoramlStress", excelWp.get("col7", i));
|
|
|
|
|
map.put("rjointShearStress" , excelWp.get("col8", i));
|
|
|
|
|
map.put("rjointJcs" , excelWp.get("col9", i));
|
|
|
|
|
map.put("rjointRemark" , excelWp.get("col10", i));
|
|
|
|
|
map.put("RJOINT_CODE" , _holeCode + "J" + StringUtil.lpad(Integer.toString(i+1), "0", 2));
|
|
|
|
|
map.put("testOrder" , i+1);
|
|
|
|
|
map.put("rjointDepthFrom" , excelWp.get("col0", i));
|
|
|
|
|
map.put("rjointDepthTo" , excelWp.get("col1", i));
|
|
|
|
|
map.put("rjointPhi" , excelWp.get("col2", i));
|
|
|
|
|
map.put("rjointC" , excelWp.get("col3", i));
|
|
|
|
|
map.put("rjointNoramlStress", excelWp.get("col4", i));
|
|
|
|
|
map.put("rjointShearStress" , excelWp.get("col5", i));
|
|
|
|
|
map.put("rjointJcs" , excelWp.get("col6", i));
|
|
|
|
|
map.put("rjointRemark" , excelWp.get("col7", i));
|
|
|
|
|
map.put("USERID" , request.getSession().getAttribute("USERID"));
|
|
|
|
|
// map.put("testNo" , excelWp.get("col0", i));
|
|
|
|
|
map.put("testNo" , excelWp.get("col0", i));
|
|
|
|
|
|
|
|
|
|
// [YJI / 26.04.14] 각 샘플번호 순서에 해당하는 그래프와 연결해줘야한다. (params의 그래프이미지는 index로 처리되어 맞춰준다)
|
|
|
|
|
map.put("graphImage" , params.get("GRAPH_IMAGE"+(Integer.parseInt(sampleNo)-1)) );
|
|
|
|
|
map.put("graphLocal" , params.get("GRAPH_LOCAL"+(Integer.parseInt(sampleNo)-1)) );
|
|
|
|
|
map.put("graphImage" , params.get("GRAPH_IMAGE"+i) );
|
|
|
|
|
map.put("graphLocal" , params.get("GRAPH_LOCAL"+i) );
|
|
|
|
|
|
|
|
|
|
map.put("GRAPH_IMAGE" , params.get("GRAPH_IMAGE"+(Integer.parseInt(sampleNo)-1)) );
|
|
|
|
|
map.put("GRAPH_LOCAL" , params.get("GRAPH_LOCAL"+(Integer.parseInt(sampleNo)-1)) );
|
|
|
|
|
map.put("GRAPH_IMAGE" , params.get("GRAPH_IMAGE"+i) );
|
|
|
|
|
map.put("GRAPH_LOCAL" , params.get("GRAPH_LOCAL"+i) );
|
|
|
|
|
|
|
|
|
|
//rockService.insertTempRockJointshearInfo(params);
|
|
|
|
|
list.add(map);
|
|
|
|
|
@ -3348,10 +3293,7 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
|
|
|
|
logger.debug(e.getMessage());
|
|
|
|
|
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", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
|
|
|
|
logger.debug(e.getMessage());
|
|
|
|
|
logger.debug("error", e);
|
|
|
|
|
@ -3369,49 +3311,27 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
List<HashMap<String, Object>> list = new ArrayList<HashMap<String,Object>>();
|
|
|
|
|
// 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)
|
|
|
|
|
resultMsg = imageUpload(params,"점하중정보 그래프", savePath, strFile, resultMsg, "[암석시험정보 - 점하중정보시험 그래프] %s|", "점하중시험결과 그래프",excelWp.getLength());
|
|
|
|
|
for(int i=0; i < excelWp.getLength(); i++){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col0",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "테스트번호는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col1",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "시료번호는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col2",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "시험횟수는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col3",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "심도From는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col4",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col1",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "심도To는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col5",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col2",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "시료직경은 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col6",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col3",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "시료길이는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col7",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col4",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "인장강도는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col8",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col5",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "점하중강도는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col9",i).trim(),"0123456789.")){
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col6",i).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, "일축압축강도는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -3421,57 +3341,26 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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("HOLE_CODE" , _holeCode);
|
|
|
|
|
map.put("SAMPLE_CODE" , targetSampleCode);
|
|
|
|
|
map.put("ROCK_POINT_CODE" , _holeCode + "O" + StringUtil.lpad(excelWp.get("col1", i), "0", 2));
|
|
|
|
|
map.put("testOrder" , excelWp.get("col2", i));
|
|
|
|
|
map.put("depthFrom" , excelWp.get("col3", i));
|
|
|
|
|
map.put("depthTo" , excelWp.get("col4", i));
|
|
|
|
|
map.put("dia" , excelWp.get("col5", i));
|
|
|
|
|
map.put("length" , excelWp.get("col6", i));
|
|
|
|
|
map.put("tesilestrength", excelWp.get("col7", i));
|
|
|
|
|
map.put("pointstrength" , excelWp.get("col8", i));
|
|
|
|
|
map.put("uniaxial" , excelWp.get("col9", i));
|
|
|
|
|
map.put("remark" , excelWp.get("col10", i));
|
|
|
|
|
map.put("ROCK_POINT_CODE" , _holeCode + "O" + StringUtil.lpad(Integer.toString(i+1), "0", 2));
|
|
|
|
|
map.put("testOrder" , i+1);
|
|
|
|
|
map.put("depthFrom" , excelWp.get("col0", i));
|
|
|
|
|
map.put("depthTo" , excelWp.get("col1", i));
|
|
|
|
|
map.put("dia" , excelWp.get("col2", i));
|
|
|
|
|
map.put("length" , excelWp.get("col3", i));
|
|
|
|
|
map.put("tesilestrength", excelWp.get("col4", i));
|
|
|
|
|
map.put("pointstrength" , excelWp.get("col5", i));
|
|
|
|
|
map.put("uniaxial" , excelWp.get("col6", i));
|
|
|
|
|
map.put("remark" , excelWp.get("col7", i));
|
|
|
|
|
map.put("USERID" , request.getSession().getAttribute("USERID"));
|
|
|
|
|
// map.put("testNo" , excelWp.get("col0", i));
|
|
|
|
|
map.put("testNo" , excelWp.get("col0", i));
|
|
|
|
|
|
|
|
|
|
// [YJI / 26.04.14] 각 샘플번호 순서에 해당하는 그래프와 연결해줘야한다. (params의 그래프이미지는 index로 처리되어 맞춰준다)
|
|
|
|
|
map.put("graphImage" , params.get("GRAPH_IMAGE"+(Integer.parseInt(sampleNo)-1)) );
|
|
|
|
|
map.put("graphLocal" , params.get("GRAPH_LOCAL"+(Integer.parseInt(sampleNo)-1)) );
|
|
|
|
|
map.put("graphImage" , params.get("GRAPH_IMAGE"+i) );
|
|
|
|
|
map.put("graphLocal" , params.get("GRAPH_LOCAL"+i) );
|
|
|
|
|
|
|
|
|
|
map.put("GRAPH_IMAGE" , params.get("GRAPH_IMAGE"+(Integer.parseInt(sampleNo)-1)) );
|
|
|
|
|
map.put("GRAPH_LOCAL" , params.get("GRAPH_LOCAL"+(Integer.parseInt(sampleNo)-1)) );
|
|
|
|
|
map.put("GRAPH_IMAGE" , params.get("GRAPH_IMAGE"+i) );
|
|
|
|
|
map.put("GRAPH_LOCAL" , params.get("GRAPH_LOCAL"+i) );
|
|
|
|
|
|
|
|
|
|
//rockService.insertTempRockPointloadInfo(params);
|
|
|
|
|
list.add(map);
|
|
|
|
|
@ -3483,9 +3372,6 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
|
|
|
|
logger.debug(e.getMessage());
|
|
|
|
|
logger.debug("error", e);
|
|
|
|
|
} catch (IllegalArgumentException e) {
|
|
|
|
|
params.put("resultMsg", e.getMessage());
|
|
|
|
|
logger.debug(e.getMessage());
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
|
|
|
|
logger.debug(e.getMessage());
|
|
|
|
|
@ -5572,7 +5458,6 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
params.put("list", (list.size() < 1)?"":list);
|
|
|
|
|
params.put("resultMsg", resultMsg);
|
|
|
|
|
} catch (NumberFormatException e) {
|
|
|
|
|
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
|
|
|
|
logger.debug(e.getMessage());
|
|
|
|
|
@ -5613,21 +5498,24 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
resultMsg = String.format(fmtMsg, k+"번째 테스트 번호는 반드시 입력해야 합니다.");
|
|
|
|
|
}
|
|
|
|
|
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)은 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col2",k).trim(),"0123456789.-")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, k+"번째 총수두(cm)는 실수와 -(하이픈) 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col3",k).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, k+"번째 수두차(cm)는 실수만 입력이 가능합니다.");
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col3",k).trim(),"0123456789.-")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, k+"번째 총수두(cm)는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col4",k).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, k+"번째 유출수량(c㎥)은 실수만 입력이 가능합니다.");
|
|
|
|
|
resultMsg += String.format(fmtMsg, k+"번째 수두차(cm)는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
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("col6",k).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, k+"번째 수량(c㎥)은 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
if(!StringUtil.containsCharOnly(excelWp.get("col7",k).trim(),"0123456789.")){
|
|
|
|
|
resultMsg += String.format(fmtMsg, k+"번째 투수계수(K,cm/sec)는 실수만 입력이 가능합니다.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -5664,10 +5552,6 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
if("-".equals(fieldperSubFallingHead)) {
|
|
|
|
|
fieldperSubFallingHead = "-999";
|
|
|
|
|
@ -5678,7 +5562,8 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
map.put("fieldperCode", mFieldperCode);
|
|
|
|
|
map.put("fieldperOrder", tNo);
|
|
|
|
|
map.put("fieldperSubTime", excelWp.get("col1", k).trim());
|
|
|
|
|
map.put("fieldperSubTotalHead", fieldperSubTotalHead);
|
|
|
|
|
map.put("fieldperSubTotalHead", excelWp.get("col2", k).trim());
|
|
|
|
|
// map.put("fieldperSubFallingHead", excelWp.get("col3", k).trim()); // [YJI / 26.04.09] 엑셀 업로드 '-' 입력 지원. 입력값이 '-' 이면 DB에 저장은 -999로 한다.
|
|
|
|
|
map.put("fieldperSubFallingHead", fieldperSubFallingHead);
|
|
|
|
|
map.put("fieldperSubWaterLoose", excelWp.get("col4", k).trim());
|
|
|
|
|
map.put("fieldperSubQuantity", excelWp.get("col5", k).trim());
|
|
|
|
|
@ -8367,20 +8252,12 @@ public class ManageExcelUploadProc03Controller {
|
|
|
|
|
*/
|
|
|
|
|
public boolean imageSave(boolean blFileMove,HashMap<String,Object> saveMap,HttpServletRequest request,String moveFolder,
|
|
|
|
|
String _projectCode, String _holeCode, String moveSaveFolder,WebUtil wUtil,String checkList)throws Exception{
|
|
|
|
|
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);
|
|
|
|
|
if(null != listMap2) {
|
|
|
|
|
Set<String> movedFileSet = new HashSet<>(); // [YJI / 26.04.15] 암석-점하중, 절리면전단은 샘플+횟수 별 list 데이타가 있음. 그래프는 샘플별이라 중복되어 if문을 탈출하여 중복 체크 처리에 사용
|
|
|
|
|
for(int i=0; i< listMap2.size(); i++) {
|
|
|
|
|
String fileName = (String) listMap2.get(i).get("graphImage"); //[YJI / 26.04.15] 파일이동 처리 전 동일 파일 처리 여부 확인을 위한 파일명 취득
|
|
|
|
|
// 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); // 🔥 이동 완료 기록
|
|
|
|
|
}
|
|
|
|
|
if(blFileMove){
|
|
|
|
|
blFileMove = moveFile(request, (String)listMap2.get(i).get("graphImage"), moveFolder, "");
|
|
|
|
|
String path2 = request.getSession().getServletContext().getRealPath("/");
|
|
|
|
|
path2 = path2 + "files"+ "\\" + "web"+ "\\" + "CH"+"\\" + _projectCode+"\\"+_holeCode+"\\"+moveSaveFolder;
|
|
|
|
|
String path3 = request.getSession().getServletContext().getRealPath("/");
|
|
|
|
|
|