기업사용자 입력시스템: 암석시험- 점하중(TEMP_ROCK_POINTLOAD), 절리면전단(TEMP_ROCK_JOINTSHEAR)
- 양식 상단줄에 안내문구 추가되어 시트구역 재정의 excelWp = ExcelUtil.getRsWp(strFile, 부분 - 엑셀 양식'테스트번호, 시료번호, 시험횟수' 추가로 인덱스밀림 처리 - 그래프 개수는 row 수가 아닌 시료번호 개수로 처리되도록 수정 - 중복입력 검사(동일한 테스트번호(물성시험샘플번호), 시료번호, 시험횟수) 시에는 메세지 반환 - 엑셀업로드 저장시 TEMP파일 이동 처리 중 점하중, 절리면전단은 그래프 수가 row 수와 1:1이 아닌 시료개수와 1:1인 관계로 예외처리 추가.(public boolean imageSave 의 Set<String> movedFileSet 부분) - 테이블에 추가된 컬럼 SAMPLE_CODE 복합 PK 처리됨에 따라 NULL에러 발생 방지 (/RockServiceImpl.java)jiyoo
parent
9ca6ad130a
commit
3defdae200
|
|
@ -15,8 +15,10 @@ 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;
|
||||
|
|
@ -27,7 +29,6 @@ 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;
|
||||
|
|
@ -180,6 +181,7 @@ 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 {
|
||||
|
|
@ -847,6 +849,7 @@ 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){
|
||||
|
|
@ -1709,14 +1712,14 @@ public class ManageExcelUploadProc03Controller {
|
|||
}
|
||||
if("Y".equals(classInfoMap.get("rockPointload"))){
|
||||
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);
|
||||
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, 1, 9);
|
||||
excelWp = ExcelUtil.getRsWp(strFile, "절리면전단정보", 0, 2, 12);// 1번째 행에 가이드 내용 있음
|
||||
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"));
|
||||
}
|
||||
|
|
@ -3231,27 +3234,48 @@ 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());
|
||||
// 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++){
|
||||
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.")){
|
||||
resultMsg += String.format(fmtMsg, "심도To는 실수만 입력이 가능합니다.");
|
||||
resultMsg += String.format(fmtMsg, "시료번호는 실수만 입력이 가능합니다.");
|
||||
}
|
||||
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.")){
|
||||
resultMsg += String.format(fmtMsg, "점착력은 실수만 입력이 가능합니다.");
|
||||
resultMsg += String.format(fmtMsg, "심도From는 실수만 입력이 가능합니다.");
|
||||
}
|
||||
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.")){
|
||||
resultMsg += String.format(fmtMsg, "전단응력은 실수만 입력이 가능합니다.");
|
||||
resultMsg += String.format(fmtMsg, "내부마찰각은 실수만 입력이 가능합니다.");
|
||||
}
|
||||
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, "절리면 압축강도는 실수만 입력이 가능합니다.");
|
||||
}
|
||||
|
||||
|
|
@ -3261,26 +3285,57 @@ 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("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("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("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) );
|
||||
map.put("graphLocal" , params.get("GRAPH_LOCAL"+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("GRAPH_IMAGE" , params.get("GRAPH_IMAGE"+i) );
|
||||
map.put("GRAPH_LOCAL" , 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)) );
|
||||
|
||||
//rockService.insertTempRockJointshearInfo(params);
|
||||
list.add(map);
|
||||
|
|
@ -3292,7 +3347,10 @@ public class ManageExcelUploadProc03Controller {
|
|||
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
||||
logger.debug(e.getMessage());
|
||||
logger.debug("error", e);
|
||||
} catch (Exception e) {
|
||||
} catch (IllegalArgumentException e) {
|
||||
params.put("resultMsg", e.getMessage());
|
||||
logger.debug(e.getMessage());
|
||||
} catch (Exception e) {
|
||||
params.put("resultMsg", "엑셀형식이 맞지 않습니다. 확인하세요.");
|
||||
logger.debug(e.getMessage());
|
||||
logger.debug("error", e);
|
||||
|
|
@ -3310,27 +3368,49 @@ public class ManageExcelUploadProc03Controller {
|
|||
|
||||
try{
|
||||
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++){
|
||||
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.")){
|
||||
resultMsg += String.format(fmtMsg, "심도To는 실수만 입력이 가능합니다.");
|
||||
resultMsg += String.format(fmtMsg, "시료번호는 실수만 입력이 가능합니다.");
|
||||
}
|
||||
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.")){
|
||||
resultMsg += String.format(fmtMsg, "시료길이는 실수만 입력이 가능합니다.");
|
||||
resultMsg += String.format(fmtMsg, "심도From는 실수만 입력이 가능합니다.");
|
||||
}
|
||||
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.")){
|
||||
resultMsg += String.format(fmtMsg, "점하중강도는 실수만 입력이 가능합니다.");
|
||||
resultMsg += String.format(fmtMsg, "시료직경은 실수만 입력이 가능합니다.");
|
||||
}
|
||||
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, "일축압축강도는 실수만 입력이 가능합니다.");
|
||||
}
|
||||
|
||||
|
|
@ -3340,26 +3420,57 @@ 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("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("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("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) );
|
||||
map.put("graphLocal" , params.get("GRAPH_LOCAL"+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("GRAPH_IMAGE" , params.get("GRAPH_IMAGE"+i) );
|
||||
map.put("GRAPH_LOCAL" , 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)) );
|
||||
|
||||
//rockService.insertTempRockPointloadInfo(params);
|
||||
list.add(map);
|
||||
|
|
@ -3371,6 +3482,9 @@ 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());
|
||||
|
|
@ -8229,12 +8343,20 @@ 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++) {
|
||||
if(blFileMove){
|
||||
blFileMove = moveFile(request, (String)listMap2.get(i).get("graphImage"), moveFolder, "");
|
||||
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); // 🔥 이동 완료 기록
|
||||
}
|
||||
String path2 = request.getSession().getServletContext().getRealPath("/");
|
||||
path2 = path2 + "files"+ "\\" + "web"+ "\\" + "CH"+"\\" + _projectCode+"\\"+_holeCode+"\\"+moveSaveFolder;
|
||||
String path3 = request.getSession().getServletContext().getRealPath("/");
|
||||
|
|
|
|||
|
|
@ -187,6 +187,9 @@ public class RockServiceImpl implements RockService {
|
|||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
@ -207,6 +210,9 @@ public class RockServiceImpl implements RockService {
|
|||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
@ -232,6 +238,9 @@ public class RockServiceImpl implements RockService {
|
|||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
@Override
|
||||
|
|
@ -251,6 +260,9 @@ public class RockServiceImpl implements RockService {
|
|||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -669,7 +669,8 @@
|
|||
GRAPH_IMAGE ,
|
||||
GRAPH_LOCAL ,
|
||||
USERID ,
|
||||
DATETIME
|
||||
DATETIME,
|
||||
SAMPLE_CODE
|
||||
)VALUES(
|
||||
#{PROJECT_CODE},
|
||||
#{HOLE_CODE},
|
||||
|
|
@ -686,7 +687,8 @@
|
|||
#{GRAPH_IMAGE},
|
||||
#{GRAPH_LOCAL},
|
||||
#{USERID},
|
||||
SYSDATE
|
||||
SYSDATE,
|
||||
#{SAMPLE_CODE}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
|
@ -823,7 +825,8 @@
|
|||
GRAPH_IMAGE ,
|
||||
GRAPH_LOCAL ,
|
||||
USERID ,
|
||||
DATETIME
|
||||
DATETIME,
|
||||
SAMPLE_CODE
|
||||
)VALUES(
|
||||
#{PROJECT_CODE},
|
||||
#{HOLE_CODE},
|
||||
|
|
@ -840,7 +843,8 @@
|
|||
#{GRAPH_IMAGE},
|
||||
#{GRAPH_LOCAL},
|
||||
#{USERID},
|
||||
SYSDATE
|
||||
SYSDATE,
|
||||
#{SAMPLE_CODE}
|
||||
)
|
||||
|
||||
</insert>
|
||||
|
|
|
|||
Loading…
Reference in New Issue